__IO HAL_IRDA_StateTypeDef RxState
__IO uint32_t ErrorCode
Field Documentation
USART_TypeDef* IRDA_HandleTypeDef::Instance
IRDA_InitTypeDef IRDA_HandleTypeDef::Init
uint8_t* IRDA_HandleTypeDef::pTxBuffPtr
uint16_t IRDA_HandleTypeDef::TxXferSize
__IO uint16_t IRDA_HandleTypeDef::TxXferCount
uint8_t* IRDA_HandleTypeDef::pRxBuffPtr
uint16_t IRDA_HandleTypeDef::RxXferSize
__IO uint16_t IRDA_HandleTypeDef::RxXferCount
DMA_HandleTypeDef* IRDA_HandleTypeDef::hdmatx
DMA_HandleTypeDef* IRDA_HandleTypeDef::hdmarx
HAL_LockTypeDef IRDA_HandleTypeDef::Lock
__IO HAL_IRDA_StateTypeDef IRDA_HandleTypeDef::gState
__IO HAL_IRDA_StateTypeDef IRDA_HandleTypeDef::RxState
__IO uint32_t IRDA_HandleTypeDef::ErrorCode
26.2 IRDA Firmware driver API description
26.2.1 How to use this driver
The IRDA HAL driver can be used as follows:
1. Declare a IRDA_HandleTypeDef handle structure.
2. Initialize the IRDA low level resources by implementing the HAL_IRDA_MspInit() API:
a. Enable the USARTx interface clock.
b. IRDA pins configuration:
Enable the clock for the IRDA GPIOs.
Configure these IRDA pins as alternate function pull-up.
c. NVIC configuration if you need to use interrupt process
(HAL_IRDA_Transmit_IT() and HAL_IRDA_Receive_IT() APIs):
Configure the USARTx interrupt priority.
Enable the NVIC USART IRQ handle.
d. DMA Configuration if you need to use DMA process
(HAL_IRDA_Transmit_DMA() and HAL_IRDA_Receive_DMA() APIs):
Declare a DMA handle structure for the Tx/Rx stream.
Enable the DMAx interface clock.
Configure the declared DMA handle structure with the required Tx/Rx
parameters.
Configure the DMA Tx/Rx Stream.
Associate the initialized DMA handle to the IRDA DMA Tx/Rx handle.
Configure the priority and enable the NVIC for the transfer complete interrupt
on the DMA Tx/Rx Stream.
3. Program the Baud Rate, Word Length, Parity, IrDA Mode, Prescaler and
Mode(Receiver/Transmitter) in the hirda Init structure.
4. Initialize the IRDA registers by calling the HAL_IRDA_Init() API:
This API configures also the low level Hardware GPIO, CLOCK, CORTEX...etc)
by calling the customized HAL_IRDA_MspInit() API. The specific IRDA interrupts
(Transmission complete interrupt, RXNE interrupt and Error Interrupts) will be
managed using the macros __HAL_IRDA_ENABLE_IT() and
__HAL_IRDA_DISABLE_IT() inside the transmit and receive process.
5. Three operation modes are available within this driver :