Skip to content

Commit ede331f

Browse files
committed
zephyrSerial: fix the putchar errors
Replacing the printf with print_char helps and also keeps the code cleaner and better to reuse existing implementations Signed-off-by: Dhruva Gole <[email protected]>
1 parent 4082ffa commit ede331f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cores/arduino/zephyrSerial.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ size_t arduino::ZephyrSerial::print_char(char ch, bool lf){
1212
}
1313

1414
size_t arduino::ZephyrSerial::print_str(const char* ptr, bool lf) {
15-
printf(lf ? "%s\n" : "%s", ptr);
15+
printk(lf ? "%s\n" : "%s", ptr);
1616
return lf ? strlen(ptr)+1 : strlen(ptr);
1717
}
1818

@@ -33,7 +33,7 @@ size_t arduino::ZephyrSerial::println(const char* ptr){
3333
}
3434

3535
size_t arduino::ZephyrSerial::println(void){
36-
printf("\n");
36+
printk("\n");
3737
return 0;
3838
}
3939

0 commit comments

Comments
 (0)