debug uart
This commit is contained in:
+2
-2
@@ -188,14 +188,14 @@ int main (void)
|
||||
|
||||
int fputc(int ch, FILE *f)
|
||||
{
|
||||
HAL_UART_Transmit(&huart1, (uint8_t *)&ch, 1, 0xffff);
|
||||
HAL_UART_Transmit(&huart2, (uint8_t *)&ch, 1, 0xffff);
|
||||
return ch;
|
||||
}
|
||||
|
||||
int fgetc(FILE * f)
|
||||
{
|
||||
uint8_t ch = 0;
|
||||
HAL_UART_Receive(&huart1,&ch, 1, 0xffff);
|
||||
HAL_UART_Receive(&huart2,&ch, 1, 0xffff);
|
||||
return ch;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user