stm32中使用printf。
main.c
#include "stdio.h" //使用的USART1int fputc(int ch, FILE *f){USART1->DR=(uint8_t)ch;while((USART1->SR&0X40)==0);return ch;} //实际中怎么用while(){printf("hello n");}
stm32中使用printf。
main.c
#include "stdio.h" //使用的USART1int fputc(int ch, FILE *f){USART1->DR=(uint8_t)ch;while((USART1->SR&0X40)==0);return ch;} //实际中怎么用while(){printf("hello n");}
举报