/* retarget the C library printf function to the USART */
int fputc(int ch, FILE *f)
{
usart_data_transmit(EVAL_COM1, (uint8_t)ch);
while(RESET == usart_flag_get(EVAL_COM1, USART_FLAG_TBE));
return ch;
}
EVAL_COM1 参数决定了映射到那个口上
/* retarget the C library printf function to the USART */
int fputc(int ch, FILE *f)
{
usart_data_transmit(EVAL_COM1, (uint8_t)ch);
while(RESET == usart_flag_get(EVAL_COM1, USART_FLAG_TBE));
return ch;
}
EVAL_COM1 参数决定了映射到那个口上