/**
* config the uart1 as stdio port
*/
#ifdef __GNUC__
/* With GCC, small printf (option LD Linker->Libraries->Small printf
set to 'Yes') calls __io_putchar() */
#define PUTCHAR_PROTOTYPE int __io_putchar(int ch)
#else
#define PUTCHAR_PROTOTYPE int fputc(int ch, FILE *f)
#endif /* __GNUC__ */
PUTCHAR_PROTOTYPE
{
while( LL_USART_IsActiveFlag_TXE(USART1) == RESET);
LL_USART_TransmitData8(USART1,(uint8_t)ch);
return ch;
}
STM32 LL库 printf输出重定向
最新推荐文章于 2024-01-08 11:21:37 发布