#if HAL_UART
#ifndef HAL_UART_DMA
#if HAL_DMA
#if (defined ZAPP_P2) || (defined ZTOOL_P2)
#define HAL_UART_DMA 2
#else
#define HAL_UART_DMA 1
#endif
#else
#define HAL_UART_DMA 0
#endif
#endif
#ifndef HAL_UART_ISR
#if HAL_UART_DMA // Default preference for DMA over ISR.
#define HAL_UART_ISR 0
#elif (defined ZAPP_P2) || (defined ZTOOL_P2)
#define HAL_UART_ISR 2
#else
#define HAL_UART_ISR 1
#endif
#endif
是否只需要在这里做出相应的设置即可。
user5032796:
回复 Viki Shi:
恩, 感谢!