1 /* 2 * Copyright (c) 2006-2025, RT-Thread Development Team 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 * 6 * Change Logs: 7 * Date Author Notes 8 * 2025-07-16 CYFS first version 9 */ 10 11 #ifndef __DRV_USART_V2_H__ 12 #define __DRV_USART_V2_H__ 13 14 #include <rtthread.h> 15 #include <rtdevice.h> 16 #include <rthw.h> 17 18 #define __HAL_LINKDMA(__HANDLE__, __PPP_DMA_FIELD__, __DMA_HANDLE__) \ 19 do{ \ 20 (__HANDLE__)->__PPP_DMA_FIELD__ = &(__DMA_HANDLE__); \ 21 (__DMA_HANDLE__).Parent = (__HANDLE__); \ 22 } while(0U) 23 #define UART_RX_DMA_IT_IDLE_FLAG 0x00 24 #define UART_RX_DMA_IT_HT_FLAG 0x01 25 #define UART_RX_DMA_IT_TC_FLAG 0x02 26 27 #endif /* __DRV_USART_V2_H__ */ 28 29