Appiko
|
Functions | |
void | SdkEvalSpiDeinit (void) |
Deinitializes the SPI. More... | |
void | SdkEvalSpiInit (void) |
Write single or multiple registers. More... | |
StatusBytes | SdkEvalSpiWriteRegisters (uint8_t cRegAddress, uint8_t cNbBytes, uint8_t *pcBuffer) |
Write single or multiple registers. More... | |
StatusBytes | SdkEvalSpiReadRegisters (uint8_t cRegAddress, uint8_t cNbBytes, uint8_t *pcBuffer) |
Read single or multiple registers. More... | |
StatusBytes | SdkEvalSpiCommandStrobes (uint8_t cCommandCode) |
Send a command. More... | |
StatusBytes | SdkEvalSpiWriteFifo (uint8_t cNbBytes, uint8_t *pcBuffer) |
Write data into TX FIFO. More... | |
StatusBytes | SdkEvalSpiReadFifo (uint8_t cNbBytes, uint8_t *pcBuffer) |
Read data from RX FIFO. More... | |
void | EepromSpiInitialization (void) |
Initializes the SPI for the EEPROM. SPI, MISO, MOSI and SCLK are the same used for the SPIRIT1. This function can be replaced by EepromCsPinInitialization if SpiritSpiInit is called. More... | |
void | EepromCsPinInitialization (void) |
Initialization of the CSn pin of the EEPROM. This function is called internally by EepromCsPinInitialization. More... | |
void | EepromCsXnucleoPinInitialization (void) |
Initialization of the CSn pin of the EEPROM for XNUCLEO boards. More... | |
void | EepromWaitEndWriteOperation (void) |
Wait polling the SPI until the internal WIP flag is RESET. The flag is SET when a write operation is running. More... | |
uint8_t | EepromStatus (void) |
Read the status register. More... | |
uint8_t | EepromSetSrwd (void) |
Set the ERSR status bit. More... | |
uint8_t | EepromResetSrwd (void) |
Reset the ERSR status bit. More... | |
void | EepromWriteEnable (void) |
Set the internal WEL flag to allow write operation. More... | |
void | EepromRead (uint16_t nAddress, uint8_t cNbBytes, uint8_t *pcBuffer) |
Read a page of the EEPROM. A page size is 32 bytes. The pages are 256. Page 0 address: 0x0000 Page 1 address: 0x0020 ... Page 255 address: 0x1FE0. More... | |
void | EepromWrite (uint16_t nAddress, uint8_t cNbBytes, uint8_t *pcBuffer) |
Write a page of the EEPROM. A page size is 32 bytes. The pages are 256. Page 0 address: 0x0000 Page 1 address: 0x0020 ... Page 255 address: 0x1FE0 It is allowed to write only a page for each operation. If the bytes exceed the single page location, the other bytes are written at the beginning. More... | |
uint8_t | SdkEvalGetHasEeprom (void) |
This function is to query if EEPROM is present or not. More... | |
void | SdkEvalSetHasEeprom (uint8_t eeprom) |
This function is to set if EEPROM is present or not. More... | |
void EepromCsPinInitialization | ( | void | ) |
void EepromCsXnucleoPinInitialization | ( | void | ) |
None |
None |
Definition at line 201 of file SDK_EVAL_EEPROM.c.
Referenced by EepromIdentification().
void EepromRead | ( | uint16_t | nAddress, |
uint8_t | cNbBytes, | ||
uint8_t * | pcBuffer | ||
) |
uint8_t EepromResetSrwd | ( | void | ) |
uint8_t EepromSetSrwd | ( | void | ) |
void EepromSpiInitialization | ( | void | ) |
None |
None |
Definition at line 76 of file SDK_EVAL_EEPROM.c.
Referenced by EepromIdentification().
uint8_t EepromStatus | ( | void | ) |
None |
Status |
Definition at line 278 of file SDK_EVAL_EEPROM.c.
Referenced by EepromIdentification().
void EepromWaitEndWriteOperation | ( | void | ) |
void EepromWrite | ( | uint16_t | nAddress, |
uint8_t | cNbBytes, | ||
uint8_t * | pcBuffer | ||
) |
void EepromWriteEnable | ( | void | ) |
uint8_t SdkEvalGetHasEeprom | ( | void | ) |
void SdkEvalSetHasEeprom | ( | uint8_t | eeprom | ) |
StatusBytes SdkEvalSpiCommandStrobes | ( | uint8_t | cCommandCode | ) |
cCommandCode | command code to be sent |
Device | status |
Definition at line 363 of file SDK_EVAL_Spi_Driver.c.
References COMMAND_HEADER, hal_spim_is_busy(), and hal_spim_tx_rx().
void SdkEvalSpiDeinit | ( | void | ) |
None |
None |
Definition at line 141 of file SDK_EVAL_Spi_Driver.c.
References hal_spim_deinit().
void SdkEvalSpiInit | ( | void | ) |
baudrate_prescaler | baudrate prescaler to be used Must be one of the SPI_BaudRate_Prescaler . |
NoneInitializes | the SPI. |
None |
None |
Definition at line 231 of file SDK_EVAL_Spi_Driver.c.
References hal_spim_init_t::csBar_pin.
StatusBytes SdkEvalSpiReadFifo | ( | uint8_t | cNbBytes, |
uint8_t * | pcBuffer | ||
) |
cNbBytes | number of bytes to read from RX FIFO |
pcBuffer | pointer to data read from RX FIFO |
Device | status |
Definition at line 410 of file SDK_EVAL_Spi_Driver.c.
References hal_spim_is_busy(), hal_spim_tx_rx(), LINEAR_FIFO_ADDRESS, and READ_HEADER.
StatusBytes SdkEvalSpiReadRegisters | ( | uint8_t | cRegAddress, |
uint8_t | cNbBytes, | ||
uint8_t * | pcBuffer | ||
) |
cRegAddress | base register's address to be read |
cNbBytes | number of registers and bytes to be read |
pcBuffer | pointer to the buffer of registers' values read |
Device | status |
Definition at line 341 of file SDK_EVAL_Spi_Driver.c.
References hal_spim_is_busy(), hal_spim_tx_rx(), and READ_HEADER.
StatusBytes SdkEvalSpiWriteFifo | ( | uint8_t | cNbBytes, |
uint8_t * | pcBuffer | ||
) |
cNbBytes | number of bytes to be written into TX FIFO |
pcBuffer | pointer to data to write |
Device | status |
Definition at line 385 of file SDK_EVAL_Spi_Driver.c.
References hal_spim_is_busy(), hal_spim_tx_rx(), LINEAR_FIFO_ADDRESS, and WRITE_HEADER.
StatusBytes SdkEvalSpiWriteRegisters | ( | uint8_t | cRegAddress, |
uint8_t | cNbBytes, | ||
uint8_t * | pcBuffer | ||
) |
cRegAddress | base register's address to be write |
cNbBytes | number of registers and bytes to be write |
pcBuffer | pointer to the buffer of values have to be written into registers |
Device | status |
Definition at line 314 of file SDK_EVAL_Spi_Driver.c.
References hal_spim_is_busy(), hal_spim_tx_rx(), and WRITE_HEADER.