Data transfers functions. More...
Functions | |
hal_status_t | hal_qspi_command_transmit (qspi_handle_t *p_qspi, qspi_command_t *p_cmd, uint8_t *p_data, uint32_t timeout) |
Transmit an amount of data with the specified instruction and address in blocking mode. More... | |
hal_status_t | hal_qspi_command_receive (qspi_handle_t *p_qspi, qspi_command_t *p_cmd, uint8_t *p_data, uint32_t timeout) |
Receive an amount of data with the specified instruction, address and dummy cycles in blocking mode. More... | |
hal_status_t | hal_qspi_command (qspi_handle_t *p_qspi, qspi_command_t *p_cmd, uint32_t timeout) |
Transmit only instruction in blocking mode. More... | |
hal_status_t | hal_qspi_transmit (qspi_handle_t *p_qspi, uint8_t *p_data, uint32_t length, uint32_t timeout) |
Transmit an amount of data in blocking mode with standard SPI. More... | |
hal_status_t | hal_qspi_receive (qspi_handle_t *p_qspi, uint8_t *p_data, uint32_t length, uint32_t timeout) |
Receive an amount of data in blocking mode with standard SPI. More... | |
hal_status_t | hal_qspi_command_transmit_it (qspi_handle_t *p_qspi, qspi_command_t *p_cmd, uint8_t *p_data) |
Transmit an amount of data with the specified instruction and address in non-blocking mode with Interrupt. More... | |
hal_status_t | hal_qspi_command_receive_it (qspi_handle_t *p_qspi, qspi_command_t *p_cmd, uint8_t *p_data) |
Receive an amount of data with the specified instruction, address and dummy cycles in non-blocking mode with Interrupt. More... | |
hal_status_t | hal_qspi_command_it (qspi_handle_t *p_qspi, qspi_command_t *p_cmd) |
Transmit instruction in non-blocking mode with Interrupt. More... | |
hal_status_t | hal_qspi_transmit_it (qspi_handle_t *p_qspi, uint8_t *p_data, uint32_t length) |
Transmit an amount of data in non-blocking mode at standard SPI with Interrupt. More... | |
hal_status_t | hal_qspi_receive_it (qspi_handle_t *p_qspi, uint8_t *p_data, uint32_t length) |
Receive an amount of data in non-blocking mode at standard SPI with Interrupt. More... | |
hal_status_t | hal_qspi_command_transmit_dma (qspi_handle_t *p_qspi, qspi_command_t *p_cmd, uint8_t *p_data) |
Transmit an amount of data with the specified instruction and address in non-blocking mode with DMA . More... | |
hal_status_t | hal_qspi_command_receive_dma (qspi_handle_t *p_qspi, qspi_command_t *p_cmd, uint8_t *p_data) |
Receive an amount of data with the specified instruction, address and dummy cycles in non-blocking mode with DMA . More... | |
hal_status_t | hal_qspi_command_dma (qspi_handle_t *p_qspi, qspi_command_t *p_cmd) |
Transmit instruction in non-blocking mode with DMA. More... | |
hal_status_t | hal_qspi_transmit_dma (qspi_handle_t *p_qspi, uint8_t *p_data, uint32_t length) |
Transmit an amount of data in non-blocking mode at standard SPI with DMA. More... | |
hal_status_t | hal_qspi_receive_dma (qspi_handle_t *p_qspi, uint8_t *p_data, uint32_t length) |
Receive an amount of data in non-blocking mode at standard SPI with DMA. More... | |
hal_status_t | hal_qspi_abort (qspi_handle_t *p_qspi) |
Abort the current transmission. More... | |
hal_status_t | hal_qspi_abort_it (qspi_handle_t *p_qspi) |
Abort the current transmission (non-blocking function) More... | |
Data transfers functions.
============================================================================== ##### IO operation functions ##### =============================================================================== [..] This subsection provides a set of functions allowing to manage the QSPI data transfers. [..] The QSPI 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 QSPI IRQ when using Interrupt mode or the DMA IRQ when using DMA mode. The hal_qspi_tx_cplt_callback(), hal_qspi_rx_cplt_callback() and hal_qspi_txrx_cplt_callback() user callbacks will be executed respectively at the end of the transmit or Receive process. The hal_qspi_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 Lines (full duplex) modes.
hal_status_t hal_qspi_abort | ( | qspi_handle_t * | p_qspi | ) |
Abort the current transmission.
[in] | p_qspi | Pointer to a QSPI handle which contains the configuration information for the specified QSPI module. |
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_qspi_abort_it | ( | qspi_handle_t * | p_qspi | ) |
Abort the current transmission (non-blocking function)
[in] | p_qspi | Pointer to a QSPI handle which contains the configuration information for the specified QSPI module. |
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_qspi_command | ( | qspi_handle_t * | p_qspi, |
qspi_command_t * | p_cmd, | ||
uint32_t | timeout | ||
) |
Transmit only instruction in blocking mode.
[in] | p_qspi | Pointer to a QSPI handle which contains the configuration information for the specified QSPI module. |
[in] | p_cmd | Pointer to a qspi_command_t structure that contains the instruction and address for data transfer. |
[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_qspi_command_dma | ( | qspi_handle_t * | p_qspi, |
qspi_command_t * | p_cmd | ||
) |
Transmit instruction in non-blocking mode with DMA.
[in] | p_qspi | Pointer to a QSPI handle which contains the configuration information for the specified QSPI module. |
[in] | p_cmd | Pointer to a qspi_command_t structure that contains the instruction and address for data transfer. |
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_qspi_command_it | ( | qspi_handle_t * | p_qspi, |
qspi_command_t * | p_cmd | ||
) |
Transmit instruction in non-blocking mode with Interrupt.
[in] | p_qspi | Pointer to a QSPI handle which contains the configuration information for the specified QSPI module. |
[in] | p_cmd | Pointer to a qspi_command_t structure that contains the instruction and address for data transfer. |
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_qspi_command_receive | ( | qspi_handle_t * | p_qspi, |
qspi_command_t * | p_cmd, | ||
uint8_t * | p_data, | ||
uint32_t | timeout | ||
) |
Receive an amount of data with the specified instruction, address and dummy cycles in blocking mode.
[in] | p_qspi | Pointer to a QSPI handle which contains the configuration information for the specified QSPI module. |
[in] | p_cmd | Pointer to a qspi_command_t structure that contains the instruction and address for data transfer. |
[out] | p_data | Pointer to data buffer |
[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_qspi_command_receive_dma | ( | qspi_handle_t * | p_qspi, |
qspi_command_t * | p_cmd, | ||
uint8_t * | p_data | ||
) |
Receive an amount of data with the specified instruction, address and dummy cycles in non-blocking mode with DMA .
[in] | p_qspi | Pointer to a QSPI handle which contains the configuration information for the specified QSPI module. |
[in] | p_cmd | Pointer to a qspi_command_t structure that contains the instruction and address for data transfer. |
[out] | p_data | Pointer to data buffer |
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_qspi_command_receive_it | ( | qspi_handle_t * | p_qspi, |
qspi_command_t * | p_cmd, | ||
uint8_t * | p_data | ||
) |
Receive an amount of data with the specified instruction, address and dummy cycles in non-blocking mode with Interrupt.
[in] | p_qspi | Pointer to a QSPI handle which contains the configuration information for the specified QSPI module. |
[in] | p_cmd | Pointer to a qspi_command_t structure that contains the instruction and address for data transfer. |
[out] | p_data | Pointer to data buffer |
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_qspi_command_transmit | ( | qspi_handle_t * | p_qspi, |
qspi_command_t * | p_cmd, | ||
uint8_t * | p_data, | ||
uint32_t | timeout | ||
) |
Transmit an amount of data with the specified instruction and address in blocking mode.
[in] | p_qspi | Pointer to a QSPI handle which contains the configuration information for the specified QSPI module. |
[in] | p_cmd | Pointer to a qspi_command_t structure that contains the instruction and address for data transfer. |
[in] | p_data | Pointer to data buffer |
[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_qspi_command_transmit_dma | ( | qspi_handle_t * | p_qspi, |
qspi_command_t * | p_cmd, | ||
uint8_t * | p_data | ||
) |
Transmit an amount of data with the specified instruction and address in non-blocking mode with DMA .
[in] | p_qspi | Pointer to a QSPI handle which contains the configuration information for the specified QSPI module. |
[in] | p_cmd | Pointer to a qspi_command_t structure that contains the instruction and address for data transfer. |
[in] | p_data | Pointer to data buffer |
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_qspi_command_transmit_it | ( | qspi_handle_t * | p_qspi, |
qspi_command_t * | p_cmd, | ||
uint8_t * | p_data | ||
) |
Transmit an amount of data with the specified instruction and address in non-blocking mode with Interrupt.
[in] | p_qspi | Pointer to a QSPI handle which contains the configuration information for the specified QSPI module. |
[in] | p_cmd | Pointer to a qspi_command_t structure that contains the instruction and address for data transfer. |
[in] | p_data | Pointer to data buffer |
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_qspi_receive | ( | qspi_handle_t * | p_qspi, |
uint8_t * | p_data, | ||
uint32_t | length, | ||
uint32_t | timeout | ||
) |
Receive an amount of data in blocking mode with standard SPI.
[in] | p_qspi | Pointer to a QSPI handle which contains the configuration information for the specified QSPI 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_qspi_receive_dma | ( | qspi_handle_t * | p_qspi, |
uint8_t * | p_data, | ||
uint32_t | length | ||
) |
Receive an amount of data in non-blocking mode at standard SPI with DMA.
[in] | p_qspi | Pointer to a QSPI handle which contains the configuration information for the specified QSPI module. |
[out] | 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_qspi_receive_it | ( | qspi_handle_t * | p_qspi, |
uint8_t * | p_data, | ||
uint32_t | length | ||
) |
Receive an amount of data in non-blocking mode at standard SPI with Interrupt.
[in] | p_qspi | Pointer to a QSPI handle which contains the configuration information for the specified QSPI module. |
[out] | 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_qspi_transmit | ( | qspi_handle_t * | p_qspi, |
uint8_t * | p_data, | ||
uint32_t | length, | ||
uint32_t | timeout | ||
) |
Transmit an amount of data in blocking mode with standard SPI.
[in] | p_qspi | Pointer to a QSPI handle which contains the configuration information for the specified QSPI 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_qspi_transmit_dma | ( | qspi_handle_t * | p_qspi, |
uint8_t * | p_data, | ||
uint32_t | length | ||
) |
Transmit an amount of data in non-blocking mode at standard SPI with DMA.
[in] | p_qspi | Pointer to a QSPI handle which contains the configuration information for the specified QSPI 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_qspi_transmit_it | ( | qspi_handle_t * | p_qspi, |
uint8_t * | p_data, | ||
uint32_t | length | ||
) |
Transmit an amount of data in non-blocking mode at standard SPI with Interrupt.
[in] | p_qspi | Pointer to a QSPI handle which contains the configuration information for the specified QSPI 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. |