Skip to content

Commit

Permalink
Improve printf() support
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulStoffregen committed Jan 14, 2023
1 parent 78f6193 commit 0bdfd22
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions teensy3/Print.cpp
Expand Up @@ -86,6 +86,7 @@ extern "C" {
__attribute__((weak))
int _write(int file, char *ptr, int len)
{
if (file >= 0 && file <= 2) file = (int)&Serial;
((class Print *)file)->write((uint8_t *)ptr, len);
return len;
}
Expand Down
1 change: 1 addition & 0 deletions teensy4/Print.cpp
Expand Up @@ -92,6 +92,7 @@ extern "C" {
__attribute__((weak))
int _write(int file, char *ptr, int len)
{
if (file >= 0 && file <= 2) file = (int)&Serial;
((class Print *)file)->write((uint8_t *)ptr, len);
return len;
}
Expand Down

0 comments on commit 0bdfd22

Please sign in to comment.