18#ifndef __ST_HAL_IRDA_H__
19#define __ST_HAL_IRDA_H__
25#if VSF_HAL_USE_USART == ENABLED && defined(HAL_IRDA_MODULE_ENABLED)
33# define HAL_IRDA_ERROR_NONE 0x00000000U
34# define HAL_IRDA_ERROR_PE 0x00000001U
35# define HAL_IRDA_ERROR_NE 0x00000002U
36# define HAL_IRDA_ERROR_FE 0x00000004U
37# define HAL_IRDA_ERROR_ORE 0x00000008U
38# define HAL_IRDA_ERROR_DMA 0x00000010U
39# if (USE_HAL_IRDA_REGISTER_CALLBACKS == 1)
40# define HAL_IRDA_ERROR_INVALID_CALLBACK ((uint32_t)0x00000020U)
43# define IRDA_WORDLENGTH_8B VSF_USART_8_BIT_LENGTH
44# define IRDA_WORDLENGTH_9B VSF_USART_9_BIT_LENGTH
46# define IRDA_PARITY_NONE VSF_USART_NO_PARITY
47# define IRDA_PARITY_EVEN VSF_USART_EVEN_PARITY
48# define IRDA_PARITY_ODD VSF_USART_ODD_PARITY
50# define IRDA_MODE_RX (VSF_USART_TX_ENABLE | VSF_USART_RX_DISABLE)
51# define IRDA_MODE_TX (VSF_USART_RX_ENABLE | VSF_USART_TX_DISABLE)
52# define IRDA_MODE_TX_RX (VSF_USART_TX_ENABLE | VSF_USART_RX_ENABLE)
54# if defined(VSF_USART_IRDA_POWER_MODE_MASK)
55# if define VSF_USART_IRDA_POWER_MODE_NORMAL
56# define IRDA_POWERMODE_NORMAL VSF_USART_IRDA_POWER_MODE_NORMAL
58# define IRDA_POWERMODE_NORMAL 0
60# if define VSF_USART_IRDA_POWER_MODE_LOW_POWER
61# define IRDA_POWERMODE_LOWPOWER VSF_USART_IRDA_POWER_MODE_LOW_POWER
63# define IRDA_POWERMODE_LOWPOWER 0
67# ifndef IRDA_POWERMODE_NORMAL
68# define IRDA_POWERMODE_NORMAL 0
71# ifndef IRDA_POWERMODE_LOWPOWER
72# define IRDA_POWERMODE_LOWPOWER 0
87} HAL_IRDA_StateTypeDef;
89# if (USE_HAL_IRDA_REGISTER_CALLBACKS == 1)
91 HAL_IRDA_TX_HALFCOMPLETE_CB_ID = __HAL_UART_TX_HALFCOMPLETE_CB_ID,
92 HAL_IRDA_TX_COMPLETE_CB_ID = __HAL_UART_TX_COMPLETE_CB_ID,
93 HAL_IRDA_RX_HALFCOMPLETE_CB_ID = __HAL_UART_RX_HALFCOMPLETE_CB_ID,
94 HAL_IRDA_RX_COMPLETE_CB_ID = __HAL_UART_RX_COMPLETE_CB_ID,
95 HAL_IRDA_ERROR_CB_ID = __HAL_UART_ERROR_CB_ID,
96 HAL_IRDA_ABORT_COMPLETE_CB_ID = __HAL_UART_ABORT_COMPLETE_CB_ID,
97 HAL_IRDA_ABORT_TRANSMIT_COMPLETE_CB_ID =
98 __HAL_UART_ABORT_TRANSMIT_COMPLETE_CB_ID,
99 HAL_IRDA_ABORT_RECEIVE_COMPLETE_CB_ID =
100 __HAL_UART_ABORT_RECEIVE_COMPLETE_CB_ID,
101 HAL_IRDA_MSPINIT_CB_ID = __HAL_UART_MSPINIT_CB_ID,
102 HAL_IRDA_MSPDEINIT_CB_ID = __HAL_UART_MSPDEINIT_CB_ID
103} HAL_IRDA_CallbackIDTypeDef;
109typedef void (*pIRDA_CallbackTypeDef)(IRDA_HandleTypeDef *hirda);
119# if (USE_HAL_IRDA_REGISTER_CALLBACKS == 1)
121 IRDA_HandleTypeDef *hirda, HAL_IRDA_CallbackIDTypeDef CallbackID,
122 pIRDA_CallbackTypeDef pCallback);
124 IRDA_HandleTypeDef *hirda, HAL_IRDA_CallbackIDTypeDef CallbackID);
unsigned short uint16_t
Definition lvgl.h:41
unsigned int uint32_t
Definition lvgl.h:43
unsigned char uint8_t
Definition lvgl.h:40
HAL_StatusTypeDef
Definition sthal_def.h:65
void HAL_IRDA_AbortReceiveCpltCallback(IRDA_HandleTypeDef *hirda)
Definition sthal_irda.c:97
HAL_StatusTypeDef HAL_IRDA_Receive_IT(IRDA_HandleTypeDef *hirda, uint8_t *pData, uint16_t Size)
Definition sthal_irda.c:327
uint32_t HAL_IRDA_GetError(const IRDA_HandleTypeDef *hirda)
Definition sthal_irda.c:410
void HAL_IRDA_MspDeInit(IRDA_HandleTypeDef *hirda)
Definition sthal_irda.c:109
HAL_StatusTypeDef HAL_IRDA_DeInit(IRDA_HandleTypeDef *hirda)
Definition sthal_irda.c:124
HAL_StatusTypeDef HAL_IRDA_Transmit(IRDA_HandleTypeDef *hirda, const uint8_t *pData, uint16_t Size, uint32_t Timeout)
Definition sthal_irda.c:299
HAL_StatusTypeDef HAL_IRDA_DMAStop(IRDA_HandleTypeDef *hirda)
Definition sthal_irda.c:434
HAL_StatusTypeDef HAL_IRDA_Receive(IRDA_HandleTypeDef *hirda, uint8_t *pData, uint16_t Size, uint32_t Timeout)
Definition sthal_irda.c:309
HAL_StatusTypeDef HAL_IRDA_DMAPause(IRDA_HandleTypeDef *hirda)
Definition sthal_irda.c:418
HAL_StatusTypeDef HAL_IRDA_Init(IRDA_HandleTypeDef *hirda)
Definition sthal_irda.c:114
HAL_StatusTypeDef HAL_IRDA_AbortTransmit_IT(IRDA_HandleTypeDef *hirda)
Definition sthal_irda.c:386
void HAL_IRDA_AbortTransmitCpltCallback(IRDA_HandleTypeDef *hirda)
Definition sthal_irda.c:91
void HAL_IRDA_MspInit(IRDA_HandleTypeDef *hirda)
Definition sthal_irda.c:103
void HAL_IRDA_AbortCpltCallback(IRDA_HandleTypeDef *hirda)
Definition sthal_irda.c:85
void HAL_IRDA_IRQHandler(IRDA_HandleTypeDef *hirda)
Definition sthal_irda.c:293
HAL_StatusTypeDef HAL_IRDA_AbortReceive_IT(IRDA_HandleTypeDef *hirda)
Definition sthal_irda.c:394
void HAL_IRDA_ErrorCallback(IRDA_HandleTypeDef *hirda)
Definition sthal_irda.c:79
HAL_StatusTypeDef HAL_IRDA_Transmit_IT(IRDA_HandleTypeDef *hirda, const uint8_t *pData, uint16_t Size)
Definition sthal_irda.c:318
HAL_StatusTypeDef HAL_IRDA_AbortTransmit(IRDA_HandleTypeDef *hirda)
Definition sthal_irda.c:362
void HAL_IRDA_TxCpltCallback(IRDA_HandleTypeDef *hirda)
Definition sthal_irda.c:55
void HAL_IRDA_RxHalfCpltCallback(IRDA_HandleTypeDef *hirda)
Definition sthal_irda.c:73
void HAL_IRDA_TxHalfCpltCallback(IRDA_HandleTypeDef *hirda)
Definition sthal_irda.c:61
HAL_StatusTypeDef HAL_IRDA_Receive_DMA(IRDA_HandleTypeDef *hirda, uint8_t *pData, uint16_t Size)
Definition sthal_irda.c:345
HAL_StatusTypeDef HAL_IRDA_AbortReceive(IRDA_HandleTypeDef *hirda)
Definition sthal_irda.c:370
HAL_StatusTypeDef HAL_IRDA_Transmit_DMA(IRDA_HandleTypeDef *hirda, const uint8_t *pData, uint16_t Size)
Definition sthal_irda.c:336
HAL_IRDA_StateTypeDef HAL_IRDA_GetState(const IRDA_HandleTypeDef *hirda)
Definition sthal_irda.c:402
HAL_StatusTypeDef HAL_IRDA_Abort(IRDA_HandleTypeDef *hirda)
Definition sthal_irda.c:354
HAL_StatusTypeDef HAL_IRDA_DMAResume(IRDA_HandleTypeDef *hirda)
Definition sthal_irda.c:426
HAL_StatusTypeDef HAL_IRDA_Abort_IT(IRDA_HandleTypeDef *hirda)
Definition sthal_irda.c:378
void HAL_IRDA_RxCpltCallback(IRDA_HandleTypeDef *hirda)
Definition sthal_irda.c:67
@ __HAL_UART_STATE_ERROR
Definition sthal_uart_base.h:73
@ __HAL_UART_STATE_READY
Definition sthal_uart_base.h:67
@ __HAL_UART_STATE_BUSY_TX
Definition sthal_uart_base.h:69
@ __HAL_UART_STATE_BUSY_TX_RX
Definition sthal_uart_base.h:71
@ __HAL_UART_STATE_RESET
Definition sthal_uart_base.h:66
@ __HAL_UART_STATE_TIMEOUT
Definition sthal_uart_base.h:72
@ __HAL_UART_STATE_BUSY
Definition sthal_uart_base.h:68
@ __HAL_UART_STATE_BUSY_RX
Definition sthal_uart_base.h:70
Definition sthal_uart_base.h:80
Definition sthal_uart_base.h:39
Definition vsf_template_usart.h:726