USART SDK

From ElectroDragon Wiki
Revision as of 22:35, 19 February 2020 by Chao (talk | contribs) (Created page with "== Example for STM32 == uint8_t UART_TxBuf[50]; #define LogLocal(...) do{}while(HAL_UART_Transmit_DMA(&huart1,UART_TxBuf,sprintf((char *)UART_TxBuf,__VA_ARGS__))) Use LogL...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Example for STM32

uint8_t UART_TxBuf[50];
#define LogLocal(...)  do{}while(HAL_UART_Transmit_DMA(&huart1,UART_TxBuf,sprintf((char *)UART_TxBuf,__VA_ARGS__)))

Use

LogLocal("I2c Error\r\n");