RTEMS 6.1-rc4
Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Enumerations | Functions
stm32h7xx_hal_irda.h File Reference

Header file of IRDA HAL module. More...

#include "stm32h7xx_hal_def.h"
#include "stm32h7xx_hal_irda_ex.h"

Go to the source code of this file.

Data Structures

struct  IRDA_InitTypeDef
 IRDA Init Structure definition. More...
 
struct  IRDA_HandleTypeDef
 IRDA handle Structure definition. More...
 

Macros

#define HAL_IRDA_STATE_RESET   0x00000000U
 
#define HAL_IRDA_STATE_READY   0x00000020U
 
#define HAL_IRDA_STATE_BUSY   0x00000024U
 
#define HAL_IRDA_STATE_BUSY_TX   0x00000021U
 
#define HAL_IRDA_STATE_BUSY_RX   0x00000022U
 
#define HAL_IRDA_STATE_BUSY_TX_RX   0x00000023U
 
#define HAL_IRDA_STATE_TIMEOUT   0x000000A0U
 
#define HAL_IRDA_STATE_ERROR   0x000000E0U
 
#define HAL_IRDA_ERROR_NONE   (0x00000000U)
 
#define HAL_IRDA_ERROR_PE   (0x00000001U)
 
#define HAL_IRDA_ERROR_NE   (0x00000002U)
 
#define HAL_IRDA_ERROR_FE   (0x00000004U)
 
#define HAL_IRDA_ERROR_ORE   (0x00000008U)
 
#define HAL_IRDA_ERROR_DMA   (0x00000010U)
 
#define HAL_IRDA_ERROR_BUSY   (0x00000020U)
 
#define IRDA_PARITY_NONE   0x00000000U
 
#define IRDA_PARITY_EVEN   USART_CR1_PCE
 
#define IRDA_PARITY_ODD   (USART_CR1_PCE | USART_CR1_PS)
 
#define IRDA_MODE_RX   USART_CR1_RE
 
#define IRDA_MODE_TX   USART_CR1_TE
 
#define IRDA_MODE_TX_RX   (USART_CR1_TE |USART_CR1_RE)
 
#define IRDA_POWERMODE_NORMAL   0x00000000U
 
#define IRDA_POWERMODE_LOWPOWER   USART_CR3_IRLP
 
#define IRDA_PRESCALER_DIV1   0x00000000U
 
#define IRDA_PRESCALER_DIV2   0x00000001U
 
#define IRDA_PRESCALER_DIV4   0x00000002U
 
#define IRDA_PRESCALER_DIV6   0x00000003U
 
#define IRDA_PRESCALER_DIV8   0x00000004U
 
#define IRDA_PRESCALER_DIV10   0x00000005U
 
#define IRDA_PRESCALER_DIV12   0x00000006U
 
#define IRDA_PRESCALER_DIV16   0x00000007U
 
#define IRDA_PRESCALER_DIV32   0x00000008U
 
#define IRDA_PRESCALER_DIV64   0x00000009U
 
#define IRDA_PRESCALER_DIV128   0x0000000AU
 
#define IRDA_PRESCALER_DIV256   0x0000000BU
 
#define IRDA_STATE_DISABLE   0x00000000U
 
#define IRDA_STATE_ENABLE   USART_CR1_UE
 
#define IRDA_MODE_DISABLE   0x00000000U
 
#define IRDA_MODE_ENABLE   USART_CR3_IREN
 
#define IRDA_ONE_BIT_SAMPLE_DISABLE   0x00000000U
 
#define IRDA_ONE_BIT_SAMPLE_ENABLE   USART_CR3_ONEBIT
 
#define IRDA_DMA_TX_DISABLE   0x00000000U
 
#define IRDA_DMA_TX_ENABLE   USART_CR3_DMAT
 
#define IRDA_DMA_RX_DISABLE   0x00000000U
 
#define IRDA_DMA_RX_ENABLE   USART_CR3_DMAR
 
#define IRDA_AUTOBAUD_REQUEST   USART_RQR_ABRRQ
 
#define IRDA_RXDATA_FLUSH_REQUEST   USART_RQR_RXFRQ
 
#define IRDA_TXDATA_FLUSH_REQUEST   USART_RQR_TXFRQ
 
#define IRDA_FLAG_REACK   USART_ISR_REACK
 
#define IRDA_FLAG_TEACK   USART_ISR_TEACK
 
#define IRDA_FLAG_BUSY   USART_ISR_BUSY
 
#define IRDA_FLAG_ABRF   USART_ISR_ABRF
 
#define IRDA_FLAG_ABRE   USART_ISR_ABRE
 
#define IRDA_FLAG_TXE   USART_ISR_TXE_TXFNF
 
#define IRDA_FLAG_TC   USART_ISR_TC
 
#define IRDA_FLAG_RXNE   USART_ISR_RXNE_RXFNE
 
#define IRDA_FLAG_ORE   USART_ISR_ORE
 
#define IRDA_FLAG_NE   USART_ISR_NE
 
#define IRDA_FLAG_FE   USART_ISR_FE
 
#define IRDA_FLAG_PE   USART_ISR_PE
 
#define IRDA_IT_PE   0x0028U
 
#define IRDA_IT_TXE   0x0727U
 
#define IRDA_IT_TC   0x0626U
 
#define IRDA_IT_RXNE   0x0525U
 
#define IRDA_IT_IDLE   0x0424U
 
#define IRDA_IT_ERR   0x0060U
 
#define IRDA_IT_ORE   0x0300U
 
#define IRDA_IT_NE   0x0200U
 
#define IRDA_IT_FE   0x0100U
 
#define IRDA_CLEAR_PEF   USART_ICR_PECF
 
#define IRDA_CLEAR_FEF   USART_ICR_FECF
 
#define IRDA_CLEAR_NEF   USART_ICR_NECF
 
#define IRDA_CLEAR_OREF   USART_ICR_ORECF
 
#define IRDA_CLEAR_IDLEF   USART_ICR_IDLECF
 
#define IRDA_CLEAR_TCF   USART_ICR_TCCF
 
#define IRDA_IT_MASK   0x001FU
 
#define IRDA_CR_MASK   0x00E0U
 
#define IRDA_CR_POS   5U
 
#define IRDA_ISR_MASK   0x1F00U
 
#define IRDA_ISR_POS   8U
 
#define __HAL_IRDA_RESET_HANDLE_STATE(__HANDLE__)
 Reset IRDA handle state.
 
#define __HAL_IRDA_FLUSH_DRREGISTER(__HANDLE__)
 Flush the IRDA DR register.
 
#define __HAL_IRDA_CLEAR_FLAG(__HANDLE__, __FLAG__)   ((__HANDLE__)->Instance->ICR = (__FLAG__))
 Clear the specified IRDA pending flag.
 
#define __HAL_IRDA_CLEAR_PEFLAG(__HANDLE__)   __HAL_IRDA_CLEAR_FLAG((__HANDLE__), IRDA_CLEAR_PEF)
 Clear the IRDA PE pending flag.
 
#define __HAL_IRDA_CLEAR_FEFLAG(__HANDLE__)   __HAL_IRDA_CLEAR_FLAG((__HANDLE__), IRDA_CLEAR_FEF)
 Clear the IRDA FE pending flag.
 
#define __HAL_IRDA_CLEAR_NEFLAG(__HANDLE__)   __HAL_IRDA_CLEAR_FLAG((__HANDLE__), IRDA_CLEAR_NEF)
 Clear the IRDA NE pending flag.
 
#define __HAL_IRDA_CLEAR_OREFLAG(__HANDLE__)   __HAL_IRDA_CLEAR_FLAG((__HANDLE__), IRDA_CLEAR_OREF)
 Clear the IRDA ORE pending flag.
 
#define __HAL_IRDA_CLEAR_IDLEFLAG(__HANDLE__)   __HAL_IRDA_CLEAR_FLAG((__HANDLE__), IRDA_CLEAR_IDLEF)
 Clear the IRDA IDLE pending flag.
 
#define __HAL_IRDA_GET_FLAG(__HANDLE__, __FLAG__)   (((__HANDLE__)->Instance->ISR & (__FLAG__)) == (__FLAG__))
 Check whether the specified IRDA flag is set or not.
 
#define __HAL_IRDA_ENABLE_IT(__HANDLE__, __INTERRUPT__)
 Enable the specified IRDA interrupt.
 
#define __HAL_IRDA_DISABLE_IT(__HANDLE__, __INTERRUPT__)
 Disable the specified IRDA interrupt.
 
#define __HAL_IRDA_GET_IT(__HANDLE__, __INTERRUPT__)    ((((__HANDLE__)->Instance->ISR& (0x01U << (((__INTERRUPT__) & IRDA_ISR_MASK)>>IRDA_ISR_POS))) != 0U) ? SET : RESET)
 Check whether the specified IRDA interrupt has occurred or not.
 
#define __HAL_IRDA_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__)
 Check whether the specified IRDA interrupt source is enabled or not.
 
#define __HAL_IRDA_CLEAR_IT(__HANDLE__, __IT_CLEAR__)   ((__HANDLE__)->Instance->ICR = (uint32_t)(__IT_CLEAR__))
 Clear the specified IRDA ISR flag, in setting the proper ICR register flag.
 
#define __HAL_IRDA_SEND_REQ(__HANDLE__, __REQ__)   ((__HANDLE__)->Instance->RQR |= (uint16_t)(__REQ__))
 Set a specific IRDA request flag.
 
#define __HAL_IRDA_ONE_BIT_SAMPLE_ENABLE(__HANDLE__)   ((__HANDLE__)->Instance->CR3|= USART_CR3_ONEBIT)
 Enable the IRDA one bit sample method.
 
#define __HAL_IRDA_ONE_BIT_SAMPLE_DISABLE(__HANDLE__)
 Disable the IRDA one bit sample method.
 
#define __HAL_IRDA_ENABLE(__HANDLE__)   ((__HANDLE__)->Instance->CR1 |= USART_CR1_UE)
 Enable UART/USART associated to IRDA Handle.
 
#define __HAL_IRDA_DISABLE(__HANDLE__)   ((__HANDLE__)->Instance->CR1 &= ~USART_CR1_UE)
 Disable UART/USART associated to IRDA Handle.
 
#define IS_IRDA_BAUDRATE(__BAUDRATE__)   ((__BAUDRATE__) < 115201U)
 Ensure that IRDA Baud rate is less or equal to maximum value.
 
#define IS_IRDA_PRESCALER(__PRESCALER__)   ((__PRESCALER__) > 0U)
 Ensure that IRDA prescaler value is strictly larger than 0.
 
#define IS_IRDA_PARITY(__PARITY__)
 Ensure that IRDA frame parity is valid.
 
#define IS_IRDA_TX_RX_MODE(__MODE__)
 Ensure that IRDA communication mode is valid.
 
#define IS_IRDA_POWERMODE(__MODE__)
 Ensure that IRDA power mode is valid.
 
#define IS_IRDA_CLOCKPRESCALER(__CLOCKPRESCALER__)
 Ensure that IRDA clock Prescaler is valid.
 
#define IS_IRDA_STATE(__STATE__)
 Ensure that IRDA state is valid.
 
#define IS_IRDA_MODE(__MODE__)
 Ensure that IRDA associated UART/USART mode is valid.
 
#define IS_IRDA_ONE_BIT_SAMPLE(__ONEBIT__)
 Ensure that IRDA sampling rate is valid.
 
#define IS_IRDA_DMA_TX(__DMATX__)
 Ensure that IRDA DMA TX mode is valid.
 
#define IS_IRDA_DMA_RX(__DMARX__)
 Ensure that IRDA DMA RX mode is valid.
 
#define IS_IRDA_REQUEST_PARAMETER(__PARAM__)
 Ensure that IRDA request is valid.
 

Typedefs

typedef uint32_t HAL_IRDA_StateTypeDef
 HAL IRDA State definition.
 

Enumerations

enum  IRDA_ClockSourceTypeDef {
  IRDA_CLOCKSOURCE_D2PCLK1 = 0x11U , IRDA_CLOCKSOURCE_D2PCLK2 = 0x12U , IRDA_CLOCKSOURCE_PLL2Q = 0x14U , IRDA_CLOCKSOURCE_PLL3Q = 0x18U ,
  IRDA_CLOCKSOURCE_HSI = 0x02U , IRDA_CLOCKSOURCE_CSI = 0x08U , IRDA_CLOCKSOURCE_LSE = 0x10U , IRDA_CLOCKSOURCE_UNDEFINED = 0x20U
}
 IRDA clock sources definition. More...
 

Functions

HAL_StatusTypeDef HAL_IRDA_Init (IRDA_HandleTypeDef *hirda)
 
HAL_StatusTypeDef HAL_IRDA_DeInit (IRDA_HandleTypeDef *hirda)
 
void HAL_IRDA_MspInit (IRDA_HandleTypeDef *hirda)
 
void HAL_IRDA_MspDeInit (IRDA_HandleTypeDef *hirda)
 
HAL_StatusTypeDef HAL_IRDA_Transmit (IRDA_HandleTypeDef *hirda, const uint8_t *pData, uint16_t Size, uint32_t Timeout)
 
HAL_StatusTypeDef HAL_IRDA_Receive (IRDA_HandleTypeDef *hirda, uint8_t *pData, uint16_t Size, uint32_t Timeout)
 
HAL_StatusTypeDef HAL_IRDA_Transmit_IT (IRDA_HandleTypeDef *hirda, const uint8_t *pData, uint16_t Size)
 
HAL_StatusTypeDef HAL_IRDA_Receive_IT (IRDA_HandleTypeDef *hirda, uint8_t *pData, uint16_t Size)
 
HAL_StatusTypeDef HAL_IRDA_Transmit_DMA (IRDA_HandleTypeDef *hirda, const uint8_t *pData, uint16_t Size)
 
HAL_StatusTypeDef HAL_IRDA_Receive_DMA (IRDA_HandleTypeDef *hirda, uint8_t *pData, uint16_t Size)
 
HAL_StatusTypeDef HAL_IRDA_DMAPause (IRDA_HandleTypeDef *hirda)
 
HAL_StatusTypeDef HAL_IRDA_DMAResume (IRDA_HandleTypeDef *hirda)
 
HAL_StatusTypeDef HAL_IRDA_DMAStop (IRDA_HandleTypeDef *hirda)
 
HAL_StatusTypeDef HAL_IRDA_Abort (IRDA_HandleTypeDef *hirda)
 
HAL_StatusTypeDef HAL_IRDA_AbortTransmit (IRDA_HandleTypeDef *hirda)
 
HAL_StatusTypeDef HAL_IRDA_AbortReceive (IRDA_HandleTypeDef *hirda)
 
HAL_StatusTypeDef HAL_IRDA_Abort_IT (IRDA_HandleTypeDef *hirda)
 
HAL_StatusTypeDef HAL_IRDA_AbortTransmit_IT (IRDA_HandleTypeDef *hirda)
 
HAL_StatusTypeDef HAL_IRDA_AbortReceive_IT (IRDA_HandleTypeDef *hirda)
 
void HAL_IRDA_IRQHandler (IRDA_HandleTypeDef *hirda)
 
void HAL_IRDA_TxCpltCallback (IRDA_HandleTypeDef *hirda)
 
void HAL_IRDA_RxCpltCallback (IRDA_HandleTypeDef *hirda)
 
void HAL_IRDA_TxHalfCpltCallback (IRDA_HandleTypeDef *hirda)
 
void HAL_IRDA_RxHalfCpltCallback (IRDA_HandleTypeDef *hirda)
 
void HAL_IRDA_ErrorCallback (IRDA_HandleTypeDef *hirda)
 
void HAL_IRDA_AbortCpltCallback (IRDA_HandleTypeDef *hirda)
 
void HAL_IRDA_AbortTransmitCpltCallback (IRDA_HandleTypeDef *hirda)
 
void HAL_IRDA_AbortReceiveCpltCallback (IRDA_HandleTypeDef *hirda)
 
HAL_IRDA_StateTypeDef HAL_IRDA_GetState (const IRDA_HandleTypeDef *hirda)
 
uint32_t HAL_IRDA_GetError (const IRDA_HandleTypeDef *hirda)
 

Detailed Description

Header file of IRDA HAL module.

Author
MCD Application Team
Attention

Copyright (c) 2017 STMicroelectronics. All rights reserved.

This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.