Skip to content

Commit

Permalink
Merge pull request #1466 from ARMmbed/docs-fixes
Browse files Browse the repository at this point in the history
further fix for missing CONSOLE_TX/RX in porting guide
  • Loading branch information
ChrisGooch-Arm authored Jul 19, 2021
2 parents 790a118 + 1cf4866 commit e8f9ac8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/api/platform/FileHandle.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@ namespace mbed

Then any program using `printf` on that target sends its output over the SWO, rather than serial.

Because targets can redirect the console in this way, portable applications should not use constructs such as `Serial(USBTX, USBRX)`, assuming that this will access the console. Instead they should use `stdin`/`stdout`/`stderr` or `STDIN_FILENO`/`STDOUT_FILENO`/`STDERR_FILENO`.
Because targets can redirect the console in this way, portable applications should not use constructs such as `Serial(CONSOLE_TX, CONSOLE_RX)`, assuming that this will access the console. Instead they should use `stdin`/`stdout`/`stderr` or `STDIN_FILENO`/`STDOUT_FILENO`/`STDERR_FILENO`.

```
// Don't do:
Serial serial(USBTX, USBRX);
Serial serial(CONSOLE_TX, CONSOLE_RX);
serial.printf("Hello!\r\n");
// Do do:
Expand Down

0 comments on commit e8f9ac8

Please sign in to comment.