diff --git a/stm-firmware/syscalls.c b/stm-firmware/syscalls.c index a016d6f..84ee039 100644 --- a/stm-firmware/syscalls.c +++ b/stm-firmware/syscalls.c @@ -89,6 +89,12 @@ int _write(int fd, const void *buf, int count) { if (fd == 1) uart_send_array_with_dma(&shell_uart, (char *)buf, count); + else if (fd == 2) { + uart_send_string_with_dma(&shell_uart, "\e[31m"); + uart_send_array_with_dma(&shell_uart, (char *)buf, count); + uart_send_string_with_dma(&shell_uart, "\e[m"); + } + return count; }