Reroute stderr to uart and color it red
This commit is contained in:
parent
83978e8188
commit
d85381e30e
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user