![]() |
Autodrone
Multi-Domain Vehicle
|
#include "board.h"
Functions | |
void | spi2Init (void) |
Initializes SPI1. More... | |
void | spi2ReadBytes (uint8_t reg, uint8_t *pData, uint8_t size) |
Reads multiple bytes of data in. More... | |
void | spi2WriteBytes (uint8_t *pData, uint8_t size) |
Writes multiple bytes of data in. More... | |
void | spi2ReadOneByte (uint8_t reg, uint8_t *pData) |
Reads one byte of data in. More... | |
void | spi2WriteOneByte (uint8_t reg, uint8_t data) |
Writes one byte of data. More... | |
void spi2Init | ( | void | ) |
Initializes SPI1.
void spi2ReadBytes | ( | uint8_t | reg, |
uint8_t * | pData, | ||
uint8_t | size | ||
) |
Reads multiple bytes of data in.
reg | The hex value of the first register to read from. |
*pData | A pointer to location where you want to read data to. |
size | The amount of bytes to be read. |
void spi2ReadOneByte | ( | uint8_t | reg, |
uint8_t * | pData | ||
) |
Reads one byte of data in.
reg | The hex value of the register to read from. |
*pData | A pointer to location where you want to read data to. |
void spi2WriteBytes | ( | uint8_t * | pData, |
uint8_t | size | ||
) |
Writes multiple bytes of data in.
reg | The hex value of the register to write to. |
*pData | A pointer to the data you want to write. |
size | The amount of bytes to write. |
void spi2WriteOneByte | ( | uint8_t | reg, |
uint8_t | data | ||
) |
Writes one byte of data.
reg | The hex value of the register to write to. |
data | The data to write. |