mirror of
https://github.com/espressif/esp-idf.git
synced 2025-12-05 16:32:34 +00:00
Add cr after a lf is printed (configurable)
Formatting
This commit is contained in:
@@ -134,9 +134,14 @@ int _open_r(struct _reent *r, const char * path, int flags, int mode) {
|
||||
}
|
||||
|
||||
ssize_t _write_r(struct _reent *r, int fd, const void * data, size_t size) {
|
||||
const char* p = (const char*) data;
|
||||
const char* p = (const char*) data;
|
||||
if (fd == STDOUT_FILENO) {
|
||||
while(size--) {
|
||||
#if CONFIG_NEWLIB_STDOUT_ADDCR
|
||||
if (*p=='\n') {
|
||||
uart_tx_one_char('\r');
|
||||
}
|
||||
#endif
|
||||
uart_tx_one_char(*p);
|
||||
++p;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user