IO operation functions

Data transfers functions. More...

Functions

hal_status_t hal_dspi_command_transmit (dspi_handle_t *p_dspi, dspi_command_t *p_cmd, uint8_t *p_data, uint32_t timeout)
 Transmit an amount of data with the specified instruction in blocking mode. More...
 
hal_status_t hal_dspi_command (dspi_handle_t *p_dspi, dspi_command_t *p_cmd, uint32_t timeout)
 Transmit only instruction in blocking mode. More...
 
hal_status_t hal_dspi_transmit (dspi_handle_t *p_qspi, uint8_t *p_data, uint32_t length, uint32_t timeout)
 Transmit an amount of data in blocking mode. More...
 
hal_status_t hal_dspi_command_transmit_it (dspi_handle_t *p_dspi, dspi_command_t *p_cmd, uint8_t *p_data)
 Transmit an amount of data with the specified instruction in non-blocking mode with Interrupt. More...
 
hal_status_t hal_dspi_command_it (dspi_handle_t *p_dspi, dspi_command_t *p_cmd)
 Transmit instruction in non-blocking mode with Interrupt. More...
 
hal_status_t hal_dspi_transmit_it (dspi_handle_t *p_dspi, uint8_t *p_data, uint32_t length)
 Transmit an amount of data in non-blocking mode with Interrupt. More...
 
hal_status_t hal_dspi_command_transmit_dma (dspi_handle_t *p_dspi, dspi_command_t *p_cmd, uint8_t *p_data)
 Transmit an amount of data with the specified instruction in non-blocking mode with DMA . More...
 
hal_status_t hal_dspi_command_transmit_dma_sg_llp (dspi_handle_t *p_dspi, dspi_command_t *p_cmd, uint8_t *p_data, dma_sg_llp_config_t *sg_llp_config)
 Transmit an amount of data with the specified instruction in non-blocking mode with DMA SG or LLP. More...
 
hal_status_t hal_dspi_command_dma (dspi_handle_t *p_dspi, dspi_command_t *p_cmd)
 Transmit instruction in non-blocking mode with DMA. More...
 
hal_status_t hal_dspi_transmit_dma (dspi_handle_t *p_dspi, uint8_t *p_data, uint32_t length)
 Transmit an amount of data in non-blocking mode with DMA. More...
 
hal_status_t hal_dspi_transmit_dma_sg_llp (dspi_handle_t *p_dspi, uint8_t *p_data, uint32_t length, dma_sg_llp_config_t *sg_llp_config)
 Transmit an amount of data in non-blocking mode with DMA SG or LLP. More...
 
hal_status_t hal_dspi_abort (dspi_handle_t *p_dspi)
 Abort the current transmission. More...
 
hal_status_t hal_dspi_abort_it (dspi_handle_t *p_dspi)
 Abort the current transmission (non-blocking function) More...
 

Detailed Description

Data transfers functions.

  ==============================================================================
                      ##### IO operation functions #####
 ===============================================================================
 [..]
    This subsection provides a set of functions allowing to manage the DSPI
    data transfers.

    [..] The DSPI only supports master:

    (#) 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 DSPI IRQ when using Interrupt mode or the DMA IRQ when
            using DMA mode.
            The hal_dspi_tx_cplt_callback() user callbacks
            will be executed respectively at the end of the transmit or Receive process.
            The hal_dspi_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.

Function Documentation

◆ hal_dspi_abort()

hal_status_t hal_dspi_abort ( dspi_handle_t p_dspi)

Abort the current transmission.

Parameters
[in]p_dspiPointer to a DSPI handle which contains the configuration information for the specified DSPI module.
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.

◆ hal_dspi_abort_it()

hal_status_t hal_dspi_abort_it ( dspi_handle_t p_dspi)

Abort the current transmission (non-blocking function)

Parameters
[in]p_dspiPointer to a DSPI handle which contains the configuration information for the specified DSPI module.
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.

◆ hal_dspi_command()

hal_status_t hal_dspi_command ( dspi_handle_t p_dspi,
dspi_command_t p_cmd,
uint32_t  timeout 
)

Transmit only instruction in blocking mode.

Note
This function is used only in Indirect Write Mode.
Parameters
[in]p_dspiPointer to a DSPI handle which contains the configuration information for the specified DSPI module.
[in]p_cmdPointer to a dspi_command_t structure that contains the instruction and address for data transfer.
[in]timeoutTimeout duration
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.

◆ hal_dspi_command_dma()

hal_status_t hal_dspi_command_dma ( dspi_handle_t p_dspi,
dspi_command_t p_cmd 
)

Transmit instruction in non-blocking mode with DMA.

Note
This function is used only in Indirect Write Mode.
Parameters
[in]p_dspiPointer to a DSPI handle which contains the configuration information for the specified DSPI module.
[in]p_cmdPointer to a dspi_command_t structure that contains the instruction and address for data transfer.
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.

◆ hal_dspi_command_it()

hal_status_t hal_dspi_command_it ( dspi_handle_t p_dspi,
dspi_command_t p_cmd 
)

Transmit instruction in non-blocking mode with Interrupt.

Note
This function is used only in Indirect Write Mode.
Parameters
[in]p_dspiPointer to a DSPI handle which contains the configuration information for the specified DSPI module.
[in]p_cmdPointer to a dspi_command_t structure that contains the instruction and address for data transfer.
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.

◆ hal_dspi_command_transmit()

hal_status_t hal_dspi_command_transmit ( dspi_handle_t p_dspi,
dspi_command_t p_cmd,
uint8_t *  p_data,
uint32_t  timeout 
)

Transmit an amount of data with the specified instruction in blocking mode.

Note
This function is used only in Indirect Write Mode.
Parameters
[in]p_dspiPointer to a DSPI handle which contains the configuration information for the specified DSPI module.
[in]p_cmdPointer to a dspi_command_t structure that contains the instruction and address for data transfer.
[in]p_dataPointer to data buffer
[in]timeoutTimeout duration
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.

◆ hal_dspi_command_transmit_dma()

hal_status_t hal_dspi_command_transmit_dma ( dspi_handle_t p_dspi,
dspi_command_t p_cmd,
uint8_t *  p_data 
)

Transmit an amount of data with the specified instruction in non-blocking mode with DMA .

Note
This function is used only in Indirect Write Mode.
Parameters
[in]p_dspiPointer to a DSPI handle which contains the configuration information for the specified DSPI module.
[in]p_cmdPointer to a dspi_command_t structure that contains the instruction and address for data transfer.
[in]p_dataPointer to data buffer
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.

◆ hal_dspi_command_transmit_dma_sg_llp()

hal_status_t hal_dspi_command_transmit_dma_sg_llp ( dspi_handle_t p_dspi,
dspi_command_t p_cmd,
uint8_t *  p_data,
dma_sg_llp_config_t sg_llp_config 
)

Transmit an amount of data with the specified instruction in non-blocking mode with DMA SG or LLP.

Note
This function is used only in Indirect Write Mode.
Parameters
[in]p_dspiPointer to a DSPI handle which contains the configuration information for the specified DSPI module.
[in]p_cmdPointer to a dspi_command_t structure that contains the instruction and address for data transfer.
[in]p_dataPointer to data buffer
[in]sg_llp_configThe config of source and destination's SG and LLP.
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.

◆ hal_dspi_command_transmit_it()

hal_status_t hal_dspi_command_transmit_it ( dspi_handle_t p_dspi,
dspi_command_t p_cmd,
uint8_t *  p_data 
)

Transmit an amount of data with the specified instruction in non-blocking mode with Interrupt.

Note
This function is used only in Indirect Write Mode.
Parameters
[in]p_dspiPointer to a DSPI handle which contains the configuration information for the specified DSPI module.
[in]p_cmdPointer to a dspi_command_t structure that contains the instruction and address for data transfer.
[in]p_dataPointer to data buffer
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.

◆ hal_dspi_transmit()

hal_status_t hal_dspi_transmit ( dspi_handle_t p_qspi,
uint8_t *  p_data,
uint32_t  length,
uint32_t  timeout 
)

Transmit an amount of data in blocking mode.

Note
This function is used only in Indirect Write Mode.
Parameters
[in]p_qspiPointer to a DSPI handle which contains the configuration information for the specified DSPI module.
[in]p_dataPointer to data buffer
[in]lengthAmount of data to be sent in bytes
[in]timeoutTimeout duration
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.

◆ hal_dspi_transmit_dma()

hal_status_t hal_dspi_transmit_dma ( dspi_handle_t p_dspi,
uint8_t *  p_data,
uint32_t  length 
)

Transmit an amount of data in non-blocking mode with DMA.

Note
This function is used only in Indirect Write Mode.
Parameters
[in]p_dspiPointer to a DSPI handle which contains the configuration information for the specified DSPI module.
[in]p_dataPointer to data buffer
[in]lengthAmount of data to be sent in bytes, ranging between 0 and 4095.
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.

◆ hal_dspi_transmit_dma_sg_llp()

hal_status_t hal_dspi_transmit_dma_sg_llp ( dspi_handle_t p_dspi,
uint8_t *  p_data,
uint32_t  length,
dma_sg_llp_config_t sg_llp_config 
)

Transmit an amount of data in non-blocking mode with DMA SG or LLP.

Note
This function is used only in Indirect Write Mode.
Parameters
[in]p_dspiPointer to a DSPI handle which contains the configuration information for the specified DSPI module.
[in]p_dataPointer to data buffer
[in]lengthAmount of data to be sent in bytes, ranging between 0 and 4095.
[in]sg_llp_configThe config of source and destination's SG and LLP.
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.

◆ hal_dspi_transmit_it()

hal_status_t hal_dspi_transmit_it ( dspi_handle_t p_dspi,
uint8_t *  p_data,
uint32_t  length 
)

Transmit an amount of data in non-blocking mode with Interrupt.

Note
This function is used only in Indirect Write Mode.
Parameters
[in]p_dspiPointer to a DSPI handle which contains the configuration information for the specified DSPI module.
[in]p_dataPointer to data buffer
[in]lengthAmount of data to be sent in bytes
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.