STM32H735xx HAL User Manual
Functions
IO operation functions
SPDIFRX Exported Functions

Data transfers functions. More...

Functions

HAL_StatusTypeDef HAL_SPDIFRX_ReceiveDataFlow (SPDIFRX_HandleTypeDef *hspdif, uint32_t *pData, uint16_t Size, uint32_t Timeout)
 Receives an amount of data (Data Flow) in blocking mode.
HAL_StatusTypeDef HAL_SPDIFRX_ReceiveCtrlFlow (SPDIFRX_HandleTypeDef *hspdif, uint32_t *pData, uint16_t Size, uint32_t Timeout)
 Receives an amount of data (Control Flow) in blocking mode.
HAL_StatusTypeDef HAL_SPDIFRX_ReceiveDataFlow_IT (SPDIFRX_HandleTypeDef *hspdif, uint32_t *pData, uint16_t Size)
 Receive an amount of data (Data Flow) in non-blocking mode with Interrupt.
HAL_StatusTypeDef HAL_SPDIFRX_ReceiveCtrlFlow_IT (SPDIFRX_HandleTypeDef *hspdif, uint32_t *pData, uint16_t Size)
 Receive an amount of data (Control Flow) with Interrupt.
HAL_StatusTypeDef HAL_SPDIFRX_ReceiveDataFlow_DMA (SPDIFRX_HandleTypeDef *hspdif, uint32_t *pData, uint16_t Size)
 Receive an amount of data (Data Flow) mode with DMA.
HAL_StatusTypeDef HAL_SPDIFRX_ReceiveCtrlFlow_DMA (SPDIFRX_HandleTypeDef *hspdif, uint32_t *pData, uint16_t Size)
 Receive an amount of data (Control Flow) with DMA.
HAL_StatusTypeDef HAL_SPDIFRX_DMAStop (SPDIFRX_HandleTypeDef *hspdif)
 stop the audio stream receive from the Media.
void HAL_SPDIFRX_IRQHandler (SPDIFRX_HandleTypeDef *hspdif)
 This function handles SPDIFRX interrupt request.
__weak void HAL_SPDIFRX_RxHalfCpltCallback (SPDIFRX_HandleTypeDef *hspdif)
 Rx Transfer (Data flow) half completed callbacks.
__weak void HAL_SPDIFRX_RxCpltCallback (SPDIFRX_HandleTypeDef *hspdif)
 Rx Transfer (Data flow) completed callbacks.
__weak void HAL_SPDIFRX_CxHalfCpltCallback (SPDIFRX_HandleTypeDef *hspdif)
 Rx (Control flow) Transfer half completed callbacks.
__weak void HAL_SPDIFRX_CxCpltCallback (SPDIFRX_HandleTypeDef *hspdif)
 Rx Transfer (Control flow) completed callbacks.
__weak void HAL_SPDIFRX_ErrorCallback (SPDIFRX_HandleTypeDef *hspdif)
 SPDIFRX error callbacks.

Detailed Description

Data transfers functions.

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

    (#) There is two mode of transfer:
        (++) Blocking mode : The communication is performed in the polling mode.
             The 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 functions return the status of the transfer start-up.
             The end of the data processing will be indicated through the
             dedicated SPDIFRX IRQ when using Interrupt mode or the DMA IRQ when
             using DMA mode.

    (#) Blocking mode functions are :
        (++) HAL_SPDIFRX_ReceiveDataFlow()
        (++) HAL_SPDIFRX_ReceiveCtrlFlow()
                (+@) Do not use blocking mode to receive both control and data flow at the same time.

    (#) No-Blocking mode functions with Interrupt are :
        (++) HAL_SPDIFRX_ReceiveCtrlFlow_IT()
        (++) HAL_SPDIFRX_ReceiveDataFlow_IT()

    (#) No-Blocking mode functions with DMA are :
        (++) HAL_SPDIFRX_ReceiveCtrlFlow_DMA()
        (++) HAL_SPDIFRX_ReceiveDataFlow_DMA()

    (#) A set of Transfer Complete Callbacks are provided in No_Blocking mode:
        (++) HAL_SPDIFRX_RxCpltCallback()
        (++) HAL_SPDIFRX_CxCpltCallback()


Function Documentation

Rx Transfer (Control flow) completed callbacks.

Parameters:
hspdifSPDIFRX handle
Return values:
None

Definition at line 1347 of file stm32h7xx_hal_spdifrx.c.

Referenced by HAL_SPDIFRX_Init(), HAL_SPDIFRX_UnRegisterCallback(), SPDIFRX_DMACxCplt(), and SPDIFRX_ReceiveControlFlow_IT().

Rx (Control flow) Transfer half completed callbacks.

Parameters:
hspdifSPDIFRX handle
Return values:
None

Definition at line 1332 of file stm32h7xx_hal_spdifrx.c.

Referenced by HAL_SPDIFRX_Init(), HAL_SPDIFRX_UnRegisterCallback(), and SPDIFRX_DMACxHalfCplt().

HAL_StatusTypeDef HAL_SPDIFRX_DMAStop ( SPDIFRX_HandleTypeDef hspdif)

stop the audio stream receive from the Media.

Parameters:
hspdifSPDIFRX handle
Return values:
None

Definition at line 1224 of file stm32h7xx_hal_spdifrx.c.

References __HAL_DMA_DISABLE, __HAL_SPDIFRX_IDLE, HAL_SPDIFRX_STATE_READY, __SPDIFRX_HandleTypeDef::hdmaCsRx, __SPDIFRX_HandleTypeDef::hdmaDrRx, __SPDIFRX_HandleTypeDef::Instance, and __SPDIFRX_HandleTypeDef::State.

SPDIFRX error callbacks.

Parameters:
hspdifSPDIFRX handle
Return values:
None

Definition at line 1362 of file stm32h7xx_hal_spdifrx.c.

Referenced by HAL_SPDIFRX_Init(), HAL_SPDIFRX_IRQHandler(), HAL_SPDIFRX_UnRegisterCallback(), and SPDIFRX_DMAError().

HAL_StatusTypeDef HAL_SPDIFRX_ReceiveCtrlFlow ( SPDIFRX_HandleTypeDef hspdif,
uint32_t *  pData,
uint16_t  Size,
uint32_t  Timeout 
)

Receives an amount of data (Control Flow) in blocking mode.

Parameters:
hspdifpointer to a SPDIFRX_HandleTypeDef structure that contains the configuration information for SPDIFRX module.
pDataPointer to data buffer
SizeAmount of data to be received
TimeoutTimeout duration
Return values:
HALstatus

Definition at line 783 of file stm32h7xx_hal_spdifrx.c.

References __HAL_SPDIFRX_RCV, __HAL_SPDIFRX_SYNC, HAL_GetTick(), HAL_SPDIFRX_STATE_BUSY, HAL_SPDIFRX_STATE_READY, __SPDIFRX_HandleTypeDef::Instance, SPDIFRX_FLAG_CSRNE, SPDIFRX_FLAG_SYNCD, SPDIFRX_WaitOnFlagUntilTimeout(), and __SPDIFRX_HandleTypeDef::State.

HAL_StatusTypeDef HAL_SPDIFRX_ReceiveCtrlFlow_DMA ( SPDIFRX_HandleTypeDef hspdif,
uint32_t *  pData,
uint16_t  Size 
)
HAL_StatusTypeDef HAL_SPDIFRX_ReceiveCtrlFlow_IT ( SPDIFRX_HandleTypeDef hspdif,
uint32_t *  pData,
uint16_t  Size 
)
HAL_StatusTypeDef HAL_SPDIFRX_ReceiveDataFlow ( SPDIFRX_HandleTypeDef hspdif,
uint32_t *  pData,
uint16_t  Size,
uint32_t  Timeout 
)

Receives an amount of data (Data Flow) in blocking mode.

Parameters:
hspdifpointer to SPDIFRX_HandleTypeDef structure that contains the configuration information for SPDIFRX module.
pDataPointer to data buffer
SizeAmount of data to be received
TimeoutTimeout duration
Return values:
HALstatus

Definition at line 710 of file stm32h7xx_hal_spdifrx.c.

References __HAL_SPDIFRX_RCV, __HAL_SPDIFRX_SYNC, HAL_GetTick(), HAL_SPDIFRX_STATE_BUSY, HAL_SPDIFRX_STATE_READY, __SPDIFRX_HandleTypeDef::Instance, SPDIFRX_FLAG_RXNE, SPDIFRX_FLAG_SYNCD, SPDIFRX_WaitOnFlagUntilTimeout(), and __SPDIFRX_HandleTypeDef::State.

HAL_StatusTypeDef HAL_SPDIFRX_ReceiveDataFlow_DMA ( SPDIFRX_HandleTypeDef hspdif,
uint32_t *  pData,
uint16_t  Size 
)
HAL_StatusTypeDef HAL_SPDIFRX_ReceiveDataFlow_IT ( SPDIFRX_HandleTypeDef hspdif,
uint32_t *  pData,
uint16_t  Size 
)

Rx Transfer (Data flow) completed callbacks.

Parameters:
hspdifSPDIFRX handle
Return values:
None

Definition at line 1317 of file stm32h7xx_hal_spdifrx.c.

Referenced by HAL_SPDIFRX_Init(), HAL_SPDIFRX_UnRegisterCallback(), SPDIFRX_DMARxCplt(), and SPDIFRX_ReceiveDataFlow_IT().

Rx Transfer (Data flow) half completed callbacks.

Parameters:
hspdifSPDIFRX handle
Return values:
None

Definition at line 1302 of file stm32h7xx_hal_spdifrx.c.

Referenced by HAL_SPDIFRX_Init(), HAL_SPDIFRX_UnRegisterCallback(), and SPDIFRX_DMARxHalfCplt().