diff --git a/Src/main.c b/Src/main.c index 213ea04..8ace522 100644 --- a/Src/main.c +++ b/Src/main.c @@ -469,6 +469,20 @@ static void MX_GPIO_Init(void) /* USER CODE BEGIN 4 */ +int __io_putchar(int ch){ + uint8_t c[1]; + c[0] = ch & 0x00FF; + HAL_UART_Transmit(&huart1, &*c, 1, 10); + return ch; +} + +int _write(int file, char *ptr, int len){ + int DataIdx; + for (DataIdx = 0; DataIdx < len; DataIdx++){ + __io_putchar(*ptr++); + } + return len; +} /* USER CODE END 4 */ /**