Data transfer functions. More...
Functions | |
hal_status_t | hal_spi_transmit (spi_handle_t *p_spi, uint8_t *p_data, uint32_t length, uint32_t timeout) |
Transmit an amount of data in blocking mode. More... | |
hal_status_t | hal_spi_receive (spi_handle_t *p_spi, uint8_t *p_data, uint32_t length, uint32_t timeout) |
Receive an amount of data in blocking mode. More... | |
hal_status_t | hal_spi_transmit_receive (spi_handle_t *p_spi, uint8_t *p_tx_data, uint8_t *p_rx_data, uint32_t length, uint32_t timeout) |
Transmit and Receive an amount of data in blocking mode. More... | |
hal_status_t | hal_spi_read_eeprom (spi_handle_t *p_spi, uint8_t *p_tx_data, uint8_t *p_rx_data, uint32_t tx_number_data, uint32_t rx_number_data, uint32_t timeout) |
Read an amount of data from EEPROM in blocking mode. More... | |
hal_status_t | hal_spi_transmit_it (spi_handle_t *p_spi, uint8_t *p_data, uint32_t length) |
Transmit an amount of data in non-blocking mode with Interrupt. More... | |
hal_status_t | hal_spi_receive_it (spi_handle_t *p_spi, uint8_t *p_data, uint32_t length) |
Receive an amount of data in non-blocking mode with Interrupt. More... | |
hal_status_t | hal_spi_transmit_receive_it (spi_handle_t *p_spi, uint8_t *p_tx_data, uint8_t *p_rx_data, uint32_t length) |
Transmit and Receive an amount of data in non-blocking mode with Interrupt. More... | |
hal_status_t | hal_spi_read_eeprom_it (spi_handle_t *p_spi, uint8_t *p_tx_data, uint8_t *p_rx_data, uint32_t tx_number_data, uint32_t rx_number_data) |
Read an amount of data from EEPROM in non-blocking mode with Interrupt. More... | |
hal_status_t | hal_spi_transmit_dma (spi_handle_t *p_spi, uint8_t *p_data, uint32_t length) |
Transmit an amount of data in non-blocking mode with DMA. More... | |
hal_status_t | hal_spi_receive_dma (spi_handle_t *p_spi, uint8_t *p_data, uint32_t length) |
Receive an amount of data in non-blocking mode with DMA. More... | |
hal_status_t | hal_spi_transmit_receive_dma (spi_handle_t *p_spi, uint8_t *p_tx_data, uint8_t *p_rx_data, uint32_t length) |
Transmit and Receive an amount of data in non-blocking mode with DMA. More... | |
hal_status_t | hal_spi_read_eeprom_dma (spi_handle_t *p_spi, uint8_t *p_tx_data, uint8_t *p_rx_data, uint32_t tx_number_data, uint32_t rx_number_data) |
Read an amount of data from EEPROM in non-blocking mode with DMA. More... | |
hal_status_t | hal_spi_abort (spi_handle_t *p_spi) |
Abort ongoing transfer (blocking mode). More... | |
hal_status_t | hal_spi_abort_it (spi_handle_t *p_spi) |
Abort ongoing transfer (Interrupt mode). More... | |
hal_status_t | hal_spi_v2_transmit_8bit_toggle (spi_handle_t *p_spi, uint8_t *p_data, uint32_t length, uint32_t timeout) |
Transmit an amount of data in blocking mode with 8bit data width, and CS Signal will be assert/de-assert in every byte. More... | |
hal_status_t | hal_spi_v2_transmit_8bit (spi_handle_t *p_spi, uint8_t inst, uint32_t addr, uint8_t *p_data, uint32_t length, uint32_t timeout) |
Transmit an amount of data in blocking mode with 8bit data width. if set inst to SPI_XFER_INST_NONE or set addr to SPI_XFER_ADDR_NONE, inst & addr won't be used in transfer. More... | |
hal_status_t | hal_spi_v2_receive_8bit (spi_handle_t *p_spi, uint8_t inst, uint32_t addr, uint8_t *p_data, uint32_t length, uint32_t timeout) |
Receive an amount of data in blocking mode with 8bit data width. if set inst to SPI_XFER_INST_NONE or set addr to SPI_XFER_ADDR_NONE, inst & addr won't be used in transfer. More... | |
hal_status_t | hal_spi_v2_transmit_receive_8bit (spi_handle_t *p_spi, uint8_t *tx_data, uint32_t tx_length, uint8_t *rx_data, uint32_t rx_length, uint32_t timeout) |
Transmit Then Receive an amount of data in blocking mode with 8bit data width. This Function works at EEPROM Read Mode, not Full duplex Mode. More... | |
hal_status_t | hal_spi_v2_transmit_32bit (spi_handle_t *p_spi, uint8_t inst, uint32_t addr, uint8_t *p_data, uint32_t length, uint32_t timeout) |
Transmit an amount of data in blocking mode with 32bit data width. if set inst to SPI_XFER_INST_NONE or set addr to SPI_XFER_ADDR_NONE, inst & addr won't be used in transfer. More... | |
hal_status_t | hal_spi_v2_receive_32bit (spi_handle_t *p_spi, uint8_t inst, uint32_t addr, uint8_t *p_data, uint32_t length, uint32_t timeout) |
Receive an amount of data in blocking mode with 32bit data width. if set inst to SPI_XFER_INST_NONE or set addr to SPI_XFER_ADDR_NONE, inst & addr won't be used in transfer. More... | |
hal_status_t | hal_spi_v2_transmit_8bit_dma (spi_handle_t *p_spi, uint8_t inst, uint32_t addr, uint8_t *p_data, uint32_t length) |
Transmit an amount of data in DMA mode with 8bit data width. if set inst to SPI_XFER_INST_NONE or set addr to SPI_XFER_ADDR_NONE, inst & addr won't be used in transfer. More... | |
hal_status_t | hal_spi_v2_receive_8bit_dma (spi_handle_t *p_spi, uint8_t inst, uint32_t addr, uint8_t *p_data, uint32_t length) |
Receive an amount of data in DMA mode with 8bit data width. if set inst to SPI_XFER_INST_NONE or set addr to SPI_XFER_ADDR_NONE, inst & addr won't be used in transfer. More... | |
hal_status_t | hal_spi_v2_transmit_32bit_dma (spi_handle_t *p_spi, uint8_t inst, uint32_t addr, uint8_t *p_tx_data, uint32_t length) |
Transmit an amount of data in DMA mode with 32bit data width. if set inst to SPI_XFER_INST_NONE or set addr to SPI_XFER_ADDR_NONE, inst & addr won't be used in transfer. More... | |
hal_status_t | hal_spi_v2_receive_32bit_dma (spi_handle_t *p_spi, uint8_t inst, uint32_t addr, uint8_t *p_data, uint32_t length) |
Receive an amount of data in DMA mode with 32bit data width. if set inst to SPI_XFER_INST_NONE or set addr to SPI_XFER_ADDR_NONE, inst & addr won't be used in transfer. More... | |
hal_status_t | hal_spi_v2_abort (spi_handle_t *p_spi) |
Abort ongoing transfer (blocking mode). More... | |
hal_status_t | hal_spi_v2_abort_it (spi_handle_t *p_spi) |
Abort ongoing transfer (Interrupt mode). More... | |
Data transfer functions.
============================================================================== ##### IO operation functions ##### =============================================================================== [..] This subsection provides a set of functions allowing to manage the SPI data transfer. [..] The SPI supports master and slave mode: (#) There are two modes of transfer: (++) Blocking mode: The communication is performed in polling mode. The HAL status of all data processing is returned by the same function after finishing transfer. (++) No-Blocking mode: The communication is performed using Interrupts or DMA, These APIs return the HAL status. The end of the data processing will be indicated through the dedicated SPI IRQ when using Interrupt mode or the DMA IRQ when using DMA mode. The hal_spi_tx_cplt_callback(), hal_spi_rx_cplt_callback() and hal_spi_txrx_cplt_callback() user callbacks will be executed respectively at the end of the transmit or Receive process The hal_spi_error_callback() user callback will be executed when a communication error is detected. (#) APIs provided for these 2 transfer modes (Blocking mode or Non blocking mode using either Interrupt or DMA) exist for 1-Line (simplex) and 2-Line (full duplex) modes.
hal_status_t hal_spi_abort | ( | spi_handle_t * | p_spi | ) |
Abort ongoing transfer (blocking mode).
[in] | p_spi | SPI handle. |
HAL_OK | Operation is OK. |
HAL_ERROR | Parameter error or operation not supported. |
HAL_BUSY | Driver is busy. |
HAL_TIMEOUT | Timeout occurred. |
hal_status_t hal_spi_abort_it | ( | spi_handle_t * | p_spi | ) |
Abort ongoing transfer (Interrupt mode).
[in] | p_spi | SPI handle. |
HAL_OK | Operation is OK. |
HAL_ERROR | Parameter error or operation not supported. |
HAL_BUSY | Driver is busy. |
HAL_TIMEOUT | Timeout occurred. |
hal_status_t hal_spi_read_eeprom | ( | spi_handle_t * | p_spi, |
uint8_t * | p_tx_data, | ||
uint8_t * | p_rx_data, | ||
uint32_t | tx_number_data, | ||
uint32_t | rx_number_data, | ||
uint32_t | timeout | ||
) |
Read an amount of data from EEPROM in blocking mode.
[in] | p_spi | Pointer to an SPI handle which contains the configuration information for the specified SPI module. |
[in] | p_tx_data | Pointer to transmission data buffer |
[out] | p_rx_data | Pointer to reception data buffer |
[in] | tx_number_data | Amount of data to be sent in bytes |
[in] | rx_number_data | Amount of data to be received in bytes |
[in] | timeout | Timeout duration |
HAL_OK | Operation is OK. |
HAL_ERROR | Parameter error or operation not supported. |
HAL_BUSY | Driver is busy. |
HAL_TIMEOUT | Timeout occurred. |
hal_status_t hal_spi_read_eeprom_dma | ( | spi_handle_t * | p_spi, |
uint8_t * | p_tx_data, | ||
uint8_t * | p_rx_data, | ||
uint32_t | tx_number_data, | ||
uint32_t | rx_number_data | ||
) |
Read an amount of data from EEPROM in non-blocking mode with DMA.
[in] | p_spi | Pointer to an SPI handle which contains the configuration information for the specified SPI module. |
[in] | p_tx_data | Pointer to transmission data buffer |
[out] | p_rx_data | Pointer to reception data buffer |
[in] | tx_number_data | Amount of data to be sent in bytes |
[in] | rx_number_data | Amount of data to be received in bytes, ranging between 0 and 4095. |
HAL_OK | Operation is OK. |
HAL_ERROR | Parameter error or operation not supported. |
HAL_BUSY | Driver is busy. |
HAL_TIMEOUT | Timeout occurred. |
hal_status_t hal_spi_read_eeprom_it | ( | spi_handle_t * | p_spi, |
uint8_t * | p_tx_data, | ||
uint8_t * | p_rx_data, | ||
uint32_t | tx_number_data, | ||
uint32_t | rx_number_data | ||
) |
Read an amount of data from EEPROM in non-blocking mode with Interrupt.
[in] | p_spi | Pointer to an SPI handle which contains the configuration information for the specified SPI module. |
[in] | p_tx_data | Pointer to transmission data buffer |
[out] | p_rx_data | Pointer to reception data buffer |
[in] | tx_number_data | Amount of data to be sent in bytes |
[in] | rx_number_data | Amount of data to be received in bytes |
HAL_OK | Operation is OK. |
HAL_ERROR | Parameter error or operation not supported. |
HAL_BUSY | Driver is busy. |
HAL_TIMEOUT | Timeout occurred. |
hal_status_t hal_spi_receive | ( | spi_handle_t * | p_spi, |
uint8_t * | p_data, | ||
uint32_t | length, | ||
uint32_t | timeout | ||
) |
Receive an amount of data in blocking mode.
[in] | p_spi | Pointer to an SPI handle which contains the configuration information for the specified SPI module. |
[out] | p_data | Pointer to data buffer |
[in] | length | Amount of data to be received in bytes |
[in] | timeout | Timeout duration |
HAL_OK | Operation is OK. |
HAL_ERROR | Parameter error or operation not supported. |
HAL_BUSY | Driver is busy. |
HAL_TIMEOUT | Timeout occurred. |
hal_status_t hal_spi_receive_dma | ( | spi_handle_t * | p_spi, |
uint8_t * | p_data, | ||
uint32_t | length | ||
) |
Receive an amount of data in non-blocking mode with DMA.
[in] | p_spi | Pointer to an SPI handle which contains the configuration information for the specified SPI module. |
[out] | p_data | Pointer to data buffer |
[in] | length | Amount of data to be sent in bytes, ranging between 0 and 4095. |
HAL_OK | Operation is OK. |
HAL_ERROR | Parameter error or operation not supported. |
HAL_BUSY | Driver is busy. |
HAL_TIMEOUT | Timeout occurred. |
hal_status_t hal_spi_receive_it | ( | spi_handle_t * | p_spi, |
uint8_t * | p_data, | ||
uint32_t | length | ||
) |
Receive an amount of data in non-blocking mode with Interrupt.
[in] | p_spi | Pointer to an SPI handle which contains the configuration information for the specified SPI module. |
[out] | p_data | Pointer to data buffer |
[in] | length | Amount of data to be sent in bytes |
HAL_OK | Operation is OK. |
HAL_ERROR | Parameter error or operation not supported. |
HAL_BUSY | Driver is busy. |
HAL_TIMEOUT | Timeout occurred. |
hal_status_t hal_spi_transmit | ( | spi_handle_t * | p_spi, |
uint8_t * | p_data, | ||
uint32_t | length, | ||
uint32_t | timeout | ||
) |
Transmit an amount of data in blocking mode.
[in] | p_spi | Pointer to an SPI handle which contains the configuration information for the specified SPI module. |
[in] | p_data | Pointer to data buffer |
[in] | length | Amount of data to be sent in bytes |
[in] | timeout | Timeout duration |
HAL_OK | Operation is OK. |
HAL_ERROR | Parameter error or operation not supported. |
HAL_BUSY | Driver is busy. |
HAL_TIMEOUT | Timeout occurred. |
hal_status_t hal_spi_transmit_dma | ( | spi_handle_t * | p_spi, |
uint8_t * | p_data, | ||
uint32_t | length | ||
) |
Transmit an amount of data in non-blocking mode with DMA.
[in] | p_spi | Pointer to an SPI handle which contains the configuration information for the specified SPI module. |
[in] | p_data | Pointer to data buffer |
[in] | length | Amount of data to be sent in bytes, ranging between 0 and 4095. |
HAL_OK | Operation is OK. |
HAL_ERROR | Parameter error or operation not supported. |
HAL_BUSY | Driver is busy. |
HAL_TIMEOUT | Timeout occurred. |
hal_status_t hal_spi_transmit_it | ( | spi_handle_t * | p_spi, |
uint8_t * | p_data, | ||
uint32_t | length | ||
) |
Transmit an amount of data in non-blocking mode with Interrupt.
[in] | p_spi | Pointer to an SPI handle which contains the configuration information for the specified SPI module. |
[in] | p_data | Pointer to data buffer |
[in] | length | Amount of data to be sent in bytes |
HAL_OK | Operation is OK. |
HAL_ERROR | Parameter error or operation not supported. |
HAL_BUSY | Driver is busy. |
HAL_TIMEOUT | Timeout occurred. |
hal_status_t hal_spi_transmit_receive | ( | spi_handle_t * | p_spi, |
uint8_t * | p_tx_data, | ||
uint8_t * | p_rx_data, | ||
uint32_t | length, | ||
uint32_t | timeout | ||
) |
Transmit and Receive an amount of data in blocking mode.
[in] | p_spi | Pointer to an SPI handle which contains the configuration information for the specified SPI module. |
[in] | p_tx_data | Pointer to transmission data buffer |
[out] | p_rx_data | Pointer to reception data buffer |
[in] | length | Amount of data to be sent and received in bytes |
[in] | timeout | Timeout duration |
HAL_OK | Operation is OK. |
HAL_ERROR | Parameter error or operation not supported. |
HAL_BUSY | Driver is busy. |
HAL_TIMEOUT | Timeout occurred. |
hal_status_t hal_spi_transmit_receive_dma | ( | spi_handle_t * | p_spi, |
uint8_t * | p_tx_data, | ||
uint8_t * | p_rx_data, | ||
uint32_t | length | ||
) |
Transmit and Receive an amount of data in non-blocking mode with DMA.
[in] | p_spi | Pointer to an SPI handle which contains the configuration information for the specified SPI module. |
[in] | p_tx_data | Pointer to transmission data buffer |
[out] | p_rx_data | Pointer to reception data buffer |
[in] | length | Amount of data to be sent in bytes, ranging between 0 and 4095. |
HAL_OK | Operation is OK. |
HAL_ERROR | Parameter error or operation not supported. |
HAL_BUSY | Driver is busy. |
HAL_TIMEOUT | Timeout occurred. |
hal_status_t hal_spi_transmit_receive_it | ( | spi_handle_t * | p_spi, |
uint8_t * | p_tx_data, | ||
uint8_t * | p_rx_data, | ||
uint32_t | length | ||
) |
Transmit and Receive an amount of data in non-blocking mode with Interrupt.
[in] | p_spi | Pointer to an SPI handle which contains the configuration information for the specified SPI module. |
[in] | p_tx_data | Pointer to transmission data buffer |
[out] | p_rx_data | Pointer to reception data buffer |
[in] | length | Amount of data to be sent and received in bytes |
HAL_OK | Operation is OK. |
HAL_ERROR | Parameter error or operation not supported. |
HAL_BUSY | Driver is busy. |
HAL_TIMEOUT | Timeout occurred. |
hal_status_t hal_spi_v2_abort | ( | spi_handle_t * | p_spi | ) |
Abort ongoing transfer (blocking mode).
[in] | p_spi | SPI handle. |
HAL_OK | Operation is OK. |
HAL_ERROR | Parameter error or operation not supported. |
HAL_BUSY | Driver is busy. |
HAL_TIMEOUT | Timeout occurred. |
hal_status_t hal_spi_v2_abort_it | ( | spi_handle_t * | p_spi | ) |
Abort ongoing transfer (Interrupt mode).
[in] | p_spi | SPI handle. |
HAL_OK | Operation is OK. |
HAL_ERROR | Parameter error or operation not supported. |
HAL_BUSY | Driver is busy. |
HAL_TIMEOUT | Timeout occurred. |
hal_status_t hal_spi_v2_receive_32bit | ( | spi_handle_t * | p_spi, |
uint8_t | inst, | ||
uint32_t | addr, | ||
uint8_t * | p_data, | ||
uint32_t | length, | ||
uint32_t | timeout | ||
) |
Receive an amount of data in blocking mode with 32bit data width. if set inst to SPI_XFER_INST_NONE or set addr to SPI_XFER_ADDR_NONE, inst & addr won't be used in transfer.
[in] | p_spi | Pointer to an SPI handle which contains the configuration information for the specified SPI module. |
[in] | inst | Instruction used in transfer |
[in] | addr | Address used in transfer |
[in] | p_data | Pointer to data buffer |
[in] | length | Amount of data to be sent in bytes |
[in] | timeout | Timeout duration |
HAL_OK | Operation is OK. |
HAL_ERROR | Parameter error or operation not supported. |
HAL_BUSY | Driver is busy. |
HAL_TIMEOUT | Timeout occurred. |
hal_status_t hal_spi_v2_receive_32bit_dma | ( | spi_handle_t * | p_spi, |
uint8_t | inst, | ||
uint32_t | addr, | ||
uint8_t * | p_data, | ||
uint32_t | length | ||
) |
Receive an amount of data in DMA mode with 32bit data width. if set inst to SPI_XFER_INST_NONE or set addr to SPI_XFER_ADDR_NONE, inst & addr won't be used in transfer.
[in] | p_spi | Pointer to an SPI handle which contains the configuration information for the specified SPI module. |
[in] | inst | Instruction used in transfer |
[in] | addr | Address used in transfer |
[in] | p_data | Pointer to data buffer |
[in] | length | Amount of data to be received in bytes |
HAL_OK | Operation is OK. |
HAL_ERROR | Parameter error or operation not supported. |
HAL_BUSY | Driver is busy. |
HAL_TIMEOUT | Timeout occurred. |
hal_status_t hal_spi_v2_receive_8bit | ( | spi_handle_t * | p_spi, |
uint8_t | inst, | ||
uint32_t | addr, | ||
uint8_t * | p_data, | ||
uint32_t | length, | ||
uint32_t | timeout | ||
) |
Receive an amount of data in blocking mode with 8bit data width. if set inst to SPI_XFER_INST_NONE or set addr to SPI_XFER_ADDR_NONE, inst & addr won't be used in transfer.
[in] | p_spi | Pointer to an SPI handle which contains the configuration information for the specified SPI module. |
[in] | inst | Instruction used in transfer |
[in] | addr | Address used in transfer |
[in] | p_data | Pointer to data buffer |
[in] | length | Amount of data to be received in bytes |
[in] | timeout | Timeout duration |
HAL_OK | Operation is OK. |
HAL_ERROR | Parameter error or operation not supported. |
HAL_BUSY | Driver is busy. |
HAL_TIMEOUT | Timeout occurred. |
hal_status_t hal_spi_v2_receive_8bit_dma | ( | spi_handle_t * | p_spi, |
uint8_t | inst, | ||
uint32_t | addr, | ||
uint8_t * | p_data, | ||
uint32_t | length | ||
) |
Receive an amount of data in DMA mode with 8bit data width. if set inst to SPI_XFER_INST_NONE or set addr to SPI_XFER_ADDR_NONE, inst & addr won't be used in transfer.
[in] | p_spi | Pointer to an SPI handle which contains the configuration information for the specified SPI module. |
[in] | inst | Instruction used in transfer |
[in] | addr | Address used in transfer |
[in] | p_data | Pointer to data buffer |
[in] | length | Amount of data to be received in bytes |
HAL_OK | Operation is OK. |
HAL_ERROR | Parameter error or operation not supported. |
HAL_BUSY | Driver is busy. |
HAL_TIMEOUT | Timeout occurred. |
hal_status_t hal_spi_v2_transmit_32bit | ( | spi_handle_t * | p_spi, |
uint8_t | inst, | ||
uint32_t | addr, | ||
uint8_t * | p_data, | ||
uint32_t | length, | ||
uint32_t | timeout | ||
) |
Transmit an amount of data in blocking mode with 32bit data width. if set inst to SPI_XFER_INST_NONE or set addr to SPI_XFER_ADDR_NONE, inst & addr won't be used in transfer.
[in] | p_spi | Pointer to an SPI handle which contains the configuration information for the specified SPI module. |
[in] | inst | Instruction used in transfer |
[in] | addr | Address used in transfer |
[in] | p_data | Pointer to data buffer |
[in] | length | Amount of data to be sent in bytes |
[in] | timeout | Timeout duration |
HAL_OK | Operation is OK. |
HAL_ERROR | Parameter error or operation not supported. |
HAL_BUSY | Driver is busy. |
HAL_TIMEOUT | Timeout occurred. |
hal_status_t hal_spi_v2_transmit_32bit_dma | ( | spi_handle_t * | p_spi, |
uint8_t | inst, | ||
uint32_t | addr, | ||
uint8_t * | p_tx_data, | ||
uint32_t | length | ||
) |
Transmit an amount of data in DMA mode with 32bit data width. if set inst to SPI_XFER_INST_NONE or set addr to SPI_XFER_ADDR_NONE, inst & addr won't be used in transfer.
[in] | p_spi | Pointer to an SPI handle which contains the configuration information for the specified SPI module. |
[in] | inst | Instruction used in transfer |
[in] | addr | Address used in transfer |
[in] | p_tx_data | Pointer to data buffer |
[in] | length | Amount of data to be sent in bytes |
HAL_OK | Operation is OK. |
HAL_ERROR | Parameter error or operation not supported. |
HAL_BUSY | Driver is busy. |
HAL_TIMEOUT | Timeout occurred. |
hal_status_t hal_spi_v2_transmit_8bit | ( | spi_handle_t * | p_spi, |
uint8_t | inst, | ||
uint32_t | addr, | ||
uint8_t * | p_data, | ||
uint32_t | length, | ||
uint32_t | timeout | ||
) |
Transmit an amount of data in blocking mode with 8bit data width. if set inst to SPI_XFER_INST_NONE or set addr to SPI_XFER_ADDR_NONE, inst & addr won't be used in transfer.
[in] | p_spi | Pointer to an SPI handle which contains the configuration information for the specified SPI module. |
[in] | inst | Instruction used in transfer |
[in] | addr | Address used in transfer |
[in] | p_data | Pointer to data buffer |
[in] | length | Amount of data to be sent in bytes |
[in] | timeout | Timeout duration |
HAL_OK | Operation is OK. |
HAL_ERROR | Parameter error or operation not supported. |
HAL_BUSY | Driver is busy. |
HAL_TIMEOUT | Timeout occurred. |
hal_status_t hal_spi_v2_transmit_8bit_dma | ( | spi_handle_t * | p_spi, |
uint8_t | inst, | ||
uint32_t | addr, | ||
uint8_t * | p_data, | ||
uint32_t | length | ||
) |
Transmit an amount of data in DMA mode with 8bit data width. if set inst to SPI_XFER_INST_NONE or set addr to SPI_XFER_ADDR_NONE, inst & addr won't be used in transfer.
[in] | p_spi | Pointer to an SPI handle which contains the configuration information for the specified SPI module. |
[in] | inst | Instruction used in transfer |
[in] | addr | Address used in transfer |
[in] | p_data | Pointer to data buffer |
[in] | length | Amount of data to be sent in bytes |
HAL_OK | Operation is OK. |
HAL_ERROR | Parameter error or operation not supported. |
HAL_BUSY | Driver is busy. |
HAL_TIMEOUT | Timeout occurred. |
hal_status_t hal_spi_v2_transmit_8bit_toggle | ( | spi_handle_t * | p_spi, |
uint8_t * | p_data, | ||
uint32_t | length, | ||
uint32_t | timeout | ||
) |
Transmit an amount of data in blocking mode with 8bit data width, and CS Signal will be assert/de-assert in every byte.
[in] | p_spi | Pointer to an SPI handle which contains the configuration information for the specified SPI module. |
[in] | p_data | Pointer to data buffer |
[in] | length | Amount of data to be sent in bytes |
[in] | timeout | Timeout duration |
HAL_OK | Operation is OK. |
HAL_ERROR | Parameter error or operation not supported. |
HAL_BUSY | Driver is busy. |
HAL_TIMEOUT | Timeout occurred. |
hal_status_t hal_spi_v2_transmit_receive_8bit | ( | spi_handle_t * | p_spi, |
uint8_t * | tx_data, | ||
uint32_t | tx_length, | ||
uint8_t * | rx_data, | ||
uint32_t | rx_length, | ||
uint32_t | timeout | ||
) |
Transmit Then Receive an amount of data in blocking mode with 8bit data width. This Function works at EEPROM Read Mode, not Full duplex Mode.
[in] | p_spi | Pointer to an SPI handle which contains the configuration information for the specified SPI module. |
[in] | tx_data | Pointer to transmit data buffer |
[in] | tx_length | Amount of data to be transmited in bytes |
[in] | rx_data | Pointer to received data buffer |
[in] | rx_length | Amount of data to be received in bytes |
[in] | timeout | Timeout duration |
HAL_OK | Operation is OK. |
HAL_ERROR | Parameter error or operation not supported. |
HAL_BUSY | Driver is busy. |
HAL_TIMEOUT | Timeout occurred. |