Skip to content

Commit

Permalink
Direct printf to the UART (debug) port.
Browse files Browse the repository at this point in the history
  • Loading branch information
art103 committed Sep 1, 2017
1 parent 414fe29 commit d240188
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions grbl/newlib_stubs.c
Expand Up @@ -57,8 +57,10 @@ int _write(int file, char *ptr, int len) {

switch (file) {
case STDOUT_FILENO: /*stdout*/
for (n=0; n<len; ++n)
serial_write(ptr[n]);
for (n=0; n<len; ++n) {
//serial_write(ptr[n]);
UARTCharPut(UART0_BASE, ptr[n]);
}
break;

case STDERR_FILENO:
Expand Down

0 comments on commit d240188

Please sign in to comment.