|
STM32L4xx_HAL_Driver
1.14.0
|
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. More... | |
| 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. More... | |
| HAL_StatusTypeDef | HAL_IRDA_Transmit_IT (IRDA_HandleTypeDef *hirda, uint8_t *pData, uint16_t Size) |
| Send an amount of data in interrupt mode. More... | |
| HAL_StatusTypeDef | HAL_IRDA_Receive_IT (IRDA_HandleTypeDef *hirda, uint8_t *pData, uint16_t Size) |
| Receive an amount of data in interrupt mode. More... | |
| HAL_StatusTypeDef | HAL_IRDA_Transmit_DMA (IRDA_HandleTypeDef *hirda, uint8_t *pData, uint16_t Size) |
| Send an amount of data in DMA mode. More... | |
| HAL_StatusTypeDef | HAL_IRDA_Receive_DMA (IRDA_HandleTypeDef *hirda, uint8_t *pData, uint16_t Size) |
| Receive an amount of data in DMA mode. More... | |
| HAL_StatusTypeDef | HAL_IRDA_DMAPause (IRDA_HandleTypeDef *hirda) |
| Pause the DMA Transfer. More... | |
| HAL_StatusTypeDef | HAL_IRDA_DMAResume (IRDA_HandleTypeDef *hirda) |
| Resume the DMA Transfer. More... | |
| HAL_StatusTypeDef | HAL_IRDA_DMAStop (IRDA_HandleTypeDef *hirda) |
| Stop the DMA Transfer. More... | |
| HAL_StatusTypeDef | HAL_IRDA_Abort (IRDA_HandleTypeDef *hirda) |
| Abort ongoing transfers (blocking mode). More... | |
| HAL_StatusTypeDef | HAL_IRDA_AbortTransmit (IRDA_HandleTypeDef *hirda) |
| Abort ongoing Transmit transfer (blocking mode). More... | |
| HAL_StatusTypeDef | HAL_IRDA_AbortReceive (IRDA_HandleTypeDef *hirda) |
| Abort ongoing Receive transfer (blocking mode). More... | |
| HAL_StatusTypeDef | HAL_IRDA_Abort_IT (IRDA_HandleTypeDef *hirda) |
| Abort ongoing transfers (Interrupt mode). More... | |
| HAL_StatusTypeDef | HAL_IRDA_AbortTransmit_IT (IRDA_HandleTypeDef *hirda) |
| Abort ongoing Transmit transfer (Interrupt mode). More... | |
| HAL_StatusTypeDef | HAL_IRDA_AbortReceive_IT (IRDA_HandleTypeDef *hirda) |
| Abort ongoing Receive transfer (Interrupt mode). More... | |
| void | HAL_IRDA_IRQHandler (IRDA_HandleTypeDef *hirda) |
| Handle IRDA interrupt request. More... | |
| void | HAL_IRDA_TxCpltCallback (IRDA_HandleTypeDef *hirda) |
| Tx Transfer completed callback. More... | |
| void | HAL_IRDA_RxCpltCallback (IRDA_HandleTypeDef *hirda) |
| Rx Transfer completed callback. More... | |
| void | HAL_IRDA_TxHalfCpltCallback (IRDA_HandleTypeDef *hirda) |
| Tx Half Transfer completed callback. More... | |
| void | HAL_IRDA_RxHalfCpltCallback (IRDA_HandleTypeDef *hirda) |
| Rx Half Transfer complete callback. More... | |
| void | HAL_IRDA_ErrorCallback (IRDA_HandleTypeDef *hirda) |
| IRDA error callback. More... | |
| void | HAL_IRDA_AbortCpltCallback (IRDA_HandleTypeDef *hirda) |
| IRDA Abort Complete callback. More... | |
| void | HAL_IRDA_AbortTransmitCpltCallback (IRDA_HandleTypeDef *hirda) |
| IRDA Abort Complete callback. More... | |
| void | HAL_IRDA_AbortReceiveCpltCallback (IRDA_HandleTypeDef *hirda) |
| IRDA Abort Receive Complete callback. More... | |
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.
(++) Non-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()
(#) Non-Blocking mode transfers could be aborted using Abort API's :
(+) HAL_IRDA_Abort()
(+) HAL_IRDA_AbortTransmit()
(+) HAL_IRDA_AbortReceive()
(+) HAL_IRDA_Abort_IT()
(+) HAL_IRDA_AbortTransmit_IT()
(+) HAL_IRDA_AbortReceive_IT()
(#) For Abort services based on interrupts (HAL_IRDA_Abortxxx_IT), a set of Abort Complete Callbacks are provided:
(+) HAL_IRDA_AbortCpltCallback()
(+) HAL_IRDA_AbortTransmitCpltCallback()
(+) HAL_IRDA_AbortReceiveCpltCallback()
(#) In Non-Blocking mode transfers, possible errors are split into 2 categories.
Errors are handled as follows :
(+) Error is considered as Recoverable and non blocking : Transfer could go till end, but error severity is
to be evaluated by user : this concerns Frame Error, Parity Error or Noise Error in Interrupt mode reception .
Received character is then retrieved and stored in Rx buffer, Error code is set to allow user to identify error type,
and HAL_IRDA_ErrorCallback() user callback is executed. Transfer is kept ongoing on IRDA side.
If user wants to abort it, Abort services should be called by user.
(+) Error is considered as Blocking : Transfer could not be completed properly and is aborted.
This concerns Overrun Error In Interrupt mode reception and all errors in DMA mode.
Error code is set to allow user to identify error type, and HAL_IRDA_ErrorCallback() user callback is executed. | HAL_StatusTypeDef HAL_IRDA_Abort | ( | IRDA_HandleTypeDef * | hirda | ) |
Abort ongoing transfers (blocking mode).
| hirda | Pointer to a IRDA_HandleTypeDef structure that contains the configuration information for the specified UART module. |
| HAL | status |
Definition at line 1378 of file stm32l4xx_hal_irda.c.
| HAL_StatusTypeDef HAL_IRDA_Abort_IT | ( | IRDA_HandleTypeDef * | hirda | ) |
Abort ongoing transfers (Interrupt mode).
| hirda | Pointer to a IRDA_HandleTypeDef structure that contains the configuration information for the specified UART module. |
| HAL | status |
Definition at line 1586 of file stm32l4xx_hal_irda.c.
| __weak void HAL_IRDA_AbortCpltCallback | ( | IRDA_HandleTypeDef * | hirda | ) |
IRDA Abort Complete callback.
| hirda | Pointer to a IRDA_HandleTypeDef structure that contains the configuration information for the specified IRDA module. |
| None |
Definition at line 2144 of file stm32l4xx_hal_irda.c.
| HAL_StatusTypeDef HAL_IRDA_AbortReceive | ( | IRDA_HandleTypeDef * | hirda | ) |
Abort ongoing Receive transfer (blocking mode).
| hirda | Pointer to a IRDA_HandleTypeDef structure that contains the configuration information for the specified UART module. |
| HAL | status |
Definition at line 1524 of file stm32l4xx_hal_irda.c.
| HAL_StatusTypeDef HAL_IRDA_AbortReceive_IT | ( | IRDA_HandleTypeDef * | hirda | ) |
Abort ongoing Receive transfer (Interrupt mode).
| hirda | Pointer to a IRDA_HandleTypeDef structure that contains the configuration information for the specified UART module. |
| HAL | status |
Definition at line 1804 of file stm32l4xx_hal_irda.c.
| __weak void HAL_IRDA_AbortReceiveCpltCallback | ( | IRDA_HandleTypeDef * | hirda | ) |
IRDA Abort Receive Complete callback.
| hirda | Pointer to a IRDA_HandleTypeDef structure that contains the configuration information for the specified IRDA module. |
| None |
Definition at line 2176 of file stm32l4xx_hal_irda.c.
| HAL_StatusTypeDef HAL_IRDA_AbortTransmit | ( | IRDA_HandleTypeDef * | hirda | ) |
Abort ongoing Transmit transfer (blocking mode).
| hirda | Pointer to a IRDA_HandleTypeDef structure that contains the configuration information for the specified UART module. |
| HAL | status |
Definition at line 1468 of file stm32l4xx_hal_irda.c.
| HAL_StatusTypeDef HAL_IRDA_AbortTransmit_IT | ( | IRDA_HandleTypeDef * | hirda | ) |
Abort ongoing Transmit transfer (Interrupt mode).
| hirda | Pointer to a IRDA_HandleTypeDef structure that contains the configuration information for the specified UART module. |
| HAL | status |
Definition at line 1722 of file stm32l4xx_hal_irda.c.
| __weak void HAL_IRDA_AbortTransmitCpltCallback | ( | IRDA_HandleTypeDef * | hirda | ) |
IRDA Abort Complete callback.
| hirda | Pointer to a IRDA_HandleTypeDef structure that contains the configuration information for the specified IRDA module. |
| None |
Definition at line 2160 of file stm32l4xx_hal_irda.c.
| HAL_StatusTypeDef HAL_IRDA_DMAPause | ( | IRDA_HandleTypeDef * | hirda | ) |
Pause the DMA Transfer.
| hirda | Pointer to a IRDA_HandleTypeDef structure that contains the configuration information for the specified IRDA module. |
| HAL | status |
Definition at line 1228 of file stm32l4xx_hal_irda.c.
| HAL_StatusTypeDef HAL_IRDA_DMAResume | ( | IRDA_HandleTypeDef * | hirda | ) |
Resume the DMA Transfer.
| hirda | Pointer to a IRDA_HandleTypeDef structure that contains the configuration information for the specified UART module. |
| HAL | status |
Definition at line 1266 of file stm32l4xx_hal_irda.c.
| HAL_StatusTypeDef HAL_IRDA_DMAStop | ( | IRDA_HandleTypeDef * | hirda | ) |
Stop the DMA Transfer.
| hirda | Pointer to a IRDA_HandleTypeDef structure that contains the configuration information for the specified UART module. |
| HAL | status |
Definition at line 1301 of file stm32l4xx_hal_irda.c.
| __weak void HAL_IRDA_ErrorCallback | ( | IRDA_HandleTypeDef * | hirda | ) |
IRDA error callback.
| hirda | Pointer to a IRDA_HandleTypeDef structure that contains the configuration information for the specified IRDA module. |
| None |
Definition at line 2128 of file stm32l4xx_hal_irda.c.
| void HAL_IRDA_IRQHandler | ( | IRDA_HandleTypeDef * | hirda | ) |
Handle IRDA interrupt request.
| hirda | Pointer to a IRDA_HandleTypeDef structure that contains the configuration information for the specified IRDA module. |
| None |
Definition at line 1884 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.
| 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. |
| HAL | status |
Definition at line 889 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.
| 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. |
| HAL | status |
Definition at line 1152 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.
| 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. |
| HAL | status |
Definition at line 1022 of file stm32l4xx_hal_irda.c.
| __weak void HAL_IRDA_RxCpltCallback | ( | IRDA_HandleTypeDef * | hirda | ) |
Rx Transfer completed callback.
| hirda | Pointer to a IRDA_HandleTypeDef structure that contains the configuration information for the specified IRDA module. |
| None |
Definition at line 2096 of file stm32l4xx_hal_irda.c.
| __weak void HAL_IRDA_RxHalfCpltCallback | ( | IRDA_HandleTypeDef * | hirda | ) |
Rx Half Transfer complete callback.
| hirda | Pointer to a IRDA_HandleTypeDef structure that contains the configuration information for the specified IRDA module. |
| None |
Definition at line 2112 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.
| 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. |
| HAL | status |
Definition at line 803 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.
| 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. |
| HAL | status |
Definition at line 1075 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.
| 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. |
| HAL | status |
Definition at line 976 of file stm32l4xx_hal_irda.c.
| __weak void HAL_IRDA_TxCpltCallback | ( | IRDA_HandleTypeDef * | hirda | ) |
Tx Transfer completed callback.
| hirda | Pointer to a IRDA_HandleTypeDef structure that contains the configuration information for the specified IRDA module. |
| None |
Definition at line 2064 of file stm32l4xx_hal_irda.c.
| __weak void HAL_IRDA_TxHalfCpltCallback | ( | IRDA_HandleTypeDef * | hirda | ) |
Tx Half Transfer completed callback.
| hirda | Pointer to a IRDA_HandleTypeDef structure that contains the configuration information for the specified USART module. |
| None |
Definition at line 2080 of file stm32l4xx_hal_irda.c.