TUKS MCU Introductory course / TUKS-COURSE-THERMOMETER

Fork of TUKS-COURSE-TIMER by TUKS MCU Introductory course

Embed: (wiki syntax)

« Back to documentation index

IO operation functions

IO operation functions
[IRDA Exported Functions]

IRDA Transmit and Receive functions. More...

Functions

HAL_StatusTypeDef HAL_IRDA_Transmit (IRDA_HandleTypeDef *hirda, uint8_t *pData, uint16_t Size, uint32_t Timeout)
 Send an amount of data in blocking mode.
HAL_StatusTypeDef HAL_IRDA_Receive (IRDA_HandleTypeDef *hirda, uint8_t *pData, uint16_t Size, uint32_t Timeout)
 Receive an amount of data in blocking mode.
HAL_StatusTypeDef HAL_IRDA_Transmit_IT (IRDA_HandleTypeDef *hirda, uint8_t *pData, uint16_t Size)
 Send an amount of data in interrupt mode.
HAL_StatusTypeDef HAL_IRDA_Receive_IT (IRDA_HandleTypeDef *hirda, uint8_t *pData, uint16_t Size)
 Receive an amount of data in interrupt mode.
HAL_StatusTypeDef HAL_IRDA_Transmit_DMA (IRDA_HandleTypeDef *hirda, uint8_t *pData, uint16_t Size)
 Send an amount of data in DMA mode.
HAL_StatusTypeDef HAL_IRDA_Receive_DMA (IRDA_HandleTypeDef *hirda, uint8_t *pData, uint16_t Size)
 Receive an amount of data in DMA mode.
HAL_StatusTypeDef HAL_IRDA_DMAPause (IRDA_HandleTypeDef *hirda)
 Pause the DMA Transfer.
HAL_StatusTypeDef HAL_IRDA_DMAResume (IRDA_HandleTypeDef *hirda)
 Resume the DMA Transfer.
HAL_StatusTypeDef HAL_IRDA_DMAStop (IRDA_HandleTypeDef *hirda)
 Stop the DMA Transfer.
void HAL_IRDA_IRQHandler (IRDA_HandleTypeDef *hirda)
 Handle IRDA interrupt request.
__weak void HAL_IRDA_TxCpltCallback (IRDA_HandleTypeDef *hirda)
 Tx Transfer completed callback.
__weak void HAL_IRDA_TxHalfCpltCallback (IRDA_HandleTypeDef *hirda)
 Tx Half Transfer completed callback.
__weak void HAL_IRDA_RxCpltCallback (IRDA_HandleTypeDef *hirda)
 Rx Transfer completed callback.
__weak void HAL_IRDA_RxHalfCpltCallback (IRDA_HandleTypeDef *hirda)
 Rx Half Transfer complete callback.
__weak void HAL_IRDA_ErrorCallback (IRDA_HandleTypeDef *hirda)
 IRDA error callback.

Detailed Description

IRDA Transmit and Receive functions.

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

  [..]
    IrDA is a half duplex communication protocol. If the Transmitter is busy, any data
    on the IrDA receive line will be ignored by the IrDA decoder and if the Receiver
    is busy, data on the TX from the USART to IrDA will not be encoded by IrDA.
    While receiving data, transmission should be avoided as the data to be transmitted
    could be corrupted.

    (#) 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 API's return the HAL status.
             The end of the data processing will be indicated through the
             dedicated IRDA IRQ when using Interrupt mode or the DMA IRQ when
             using DMA mode.
             The HAL_IRDA_TxCpltCallback(), HAL_IRDA_RxCpltCallback() user callbacks
             will be executed respectively at the end of the Transmit or Receive process
             The HAL_IRDA_ErrorCallback() user callback will be executed when a communication error is detected

    (#) Blocking mode APIs are :
        (++) HAL_IRDA_Transmit()
        (++) HAL_IRDA_Receive()

    (#) Non Blocking mode APIs with Interrupt are :
        (++) HAL_IRDA_Transmit_IT()
        (++) HAL_IRDA_Receive_IT()
        (++) HAL_IRDA_IRQHandler()

    (#) Non Blocking mode functions with DMA are :
        (++) HAL_IRDA_Transmit_DMA()
        (++) HAL_IRDA_Receive_DMA()
        (++) HAL_IRDA_DMAPause()
        (++) HAL_IRDA_DMAResume()
        (++) HAL_IRDA_DMAStop()

    (#) A set of Transfer Complete Callbacks are provided in Non Blocking mode:
        (++) HAL_IRDA_TxHalfCpltCallback()
        (++) HAL_IRDA_TxCpltCallback()
        (++) HAL_IRDA_RxHalfCpltCallback()
        (++) HAL_IRDA_RxCpltCallback()
        (++) HAL_IRDA_ErrorCallback()


Function Documentation

HAL_StatusTypeDef HAL_IRDA_DMAPause ( IRDA_HandleTypeDef *  hirda )

Pause the DMA Transfer.

Parameters:
hirda,:Pointer to a IRDA_HandleTypeDef structure that contains the configuration information for the specified IRDA module.
Return values:
HALstatus

Definition at line 798 of file stm32l4xx_hal_irda.c.

HAL_StatusTypeDef HAL_IRDA_DMAResume ( IRDA_HandleTypeDef *  hirda )

Resume the DMA Transfer.

Parameters:
hirda,:Pointer to a IRDA_HandleTypeDef structure that contains the configuration information for the specified UART module.
Return values:
HALstatus

Definition at line 826 of file stm32l4xx_hal_irda.c.

HAL_StatusTypeDef HAL_IRDA_DMAStop ( IRDA_HandleTypeDef *  hirda )

Stop the DMA Transfer.

Parameters:
hirda,:Pointer to a IRDA_HandleTypeDef structure that contains the configuration information for the specified UART module.
Return values:
HALstatus

Definition at line 856 of file stm32l4xx_hal_irda.c.

__weak void HAL_IRDA_ErrorCallback ( IRDA_HandleTypeDef *  hirda )

IRDA error callback.

Parameters:
hirda,:Pointer to a IRDA_HandleTypeDef structure that contains the configuration information for the specified IRDA module.
Return values:
None

Definition at line 1032 of file stm32l4xx_hal_irda.c.

void HAL_IRDA_IRQHandler ( IRDA_HandleTypeDef *  hirda )

Handle IRDA interrupt request.

Parameters:
hirda,:Pointer to a IRDA_HandleTypeDef structure that contains the configuration information for the specified IRDA module.
Return values:
None

Definition at line 893 of file stm32l4xx_hal_irda.c.

HAL_StatusTypeDef HAL_IRDA_Receive ( IRDA_HandleTypeDef *  hirda,
uint8_t *  pData,
uint16_t  Size,
uint32_t  Timeout 
)

Receive an amount of data in blocking mode.

Parameters:
hirda,:Pointer to a IRDA_HandleTypeDef structure that contains the configuration information for the specified IRDA module.
pData,:Pointer to data buffer.
Size,:Amount of data to be received.
Timeout,:Specify timeout value.
Return values:
HALstatus

Definition at line 506 of file stm32l4xx_hal_irda.c.

HAL_StatusTypeDef HAL_IRDA_Receive_DMA ( IRDA_HandleTypeDef *  hirda,
uint8_t *  pData,
uint16_t  Size 
)

Receive an amount of data in DMA mode.

Parameters:
hirda,:Pointer to a IRDA_HandleTypeDef structure that contains the configuration information for the specified IRDA module.
pData,:Pointer to data buffer.
Size,:Amount of data to be received.
Note:
When the IRDA parity is enabled (PCE = 1) the received data contains the parity bit (MSB position).
Return values:
HALstatus

Definition at line 741 of file stm32l4xx_hal_irda.c.

HAL_StatusTypeDef HAL_IRDA_Receive_IT ( IRDA_HandleTypeDef *  hirda,
uint8_t *  pData,
uint16_t  Size 
)

Receive an amount of data in interrupt mode.

Parameters:
hirda,:Pointer to a IRDA_HandleTypeDef structure that contains the configuration information for the specified IRDA module.
pData,:Pointer to data buffer.
Size,:Amount of data to be received.
Return values:
HALstatus

Definition at line 624 of file stm32l4xx_hal_irda.c.

__weak void HAL_IRDA_RxCpltCallback ( IRDA_HandleTypeDef *  hirda )

Rx Transfer completed callback.

Parameters:
hirda,:Pointer to a IRDA_HandleTypeDef structure that contains the configuration information for the specified IRDA module.
Return values:
None

Definition at line 1000 of file stm32l4xx_hal_irda.c.

__weak void HAL_IRDA_RxHalfCpltCallback ( IRDA_HandleTypeDef *  hirda )

Rx Half Transfer complete callback.

Parameters:
hirda,:Pointer to a IRDA_HandleTypeDef structure that contains the configuration information for the specified IRDA module.
Return values:
None

Definition at line 1016 of file stm32l4xx_hal_irda.c.

HAL_StatusTypeDef HAL_IRDA_Transmit ( IRDA_HandleTypeDef *  hirda,
uint8_t *  pData,
uint16_t  Size,
uint32_t  Timeout 
)

Send an amount of data in blocking mode.

Parameters:
hirda,:Pointer to a IRDA_HandleTypeDef structure that contains the configuration information for the specified IRDA module.
pData,:Pointer to data buffer.
Size,:Amount of data to be sent.
Timeout,:Specify timeout value.
Return values:
HALstatus

Definition at line 433 of file stm32l4xx_hal_irda.c.

HAL_StatusTypeDef HAL_IRDA_Transmit_DMA ( IRDA_HandleTypeDef *  hirda,
uint8_t *  pData,
uint16_t  Size 
)

Send an amount of data in DMA mode.

Parameters:
hirda,:Pointer to a IRDA_HandleTypeDef structure that contains the configuration information for the specified IRDA module.
pData,:pointer to data buffer.
Size,:amount of data to be sent.
Return values:
HALstatus

Definition at line 677 of file stm32l4xx_hal_irda.c.

HAL_StatusTypeDef HAL_IRDA_Transmit_IT ( IRDA_HandleTypeDef *  hirda,
uint8_t *  pData,
uint16_t  Size 
)

Send an amount of data in interrupt mode.

Parameters:
hirda,:Pointer to a IRDA_HandleTypeDef structure that contains the configuration information for the specified IRDA module.
pData,:Pointer to data buffer.
Size,:Amount of data to be sent.
Return values:
HALstatus

Definition at line 581 of file stm32l4xx_hal_irda.c.

__weak void HAL_IRDA_TxCpltCallback ( IRDA_HandleTypeDef *  hirda )

Tx Transfer completed callback.

Parameters:
hirda,:Pointer to a IRDA_HandleTypeDef structure that contains the configuration information for the specified IRDA module.
Return values:
None

Definition at line 968 of file stm32l4xx_hal_irda.c.

__weak void HAL_IRDA_TxHalfCpltCallback ( IRDA_HandleTypeDef *  hirda )

Tx Half Transfer completed callback.

Parameters:
hirda,:Pointer to a IRDA_HandleTypeDef structure that contains the configuration information for the specified USART module.
Return values:
None

Definition at line 984 of file stm32l4xx_hal_irda.c.