Skip to content

Commit a327069

Browse files
committed
fix(driver): remove unecessary if conditions in the read function
This changes affect usb_serial_jtag_vfs and cdcacm_vfs read functions. This commit removes the exit condition on reception of \n character.
1 parent 11ad7e0 commit a327069

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

components/esp_driver_usb_serial_jtag/src/usb_serial_jtag_vfs.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -257,9 +257,6 @@ static ssize_t usb_serial_jtag_read(int fd, void* data, size_t size)
257257
}
258258
data_c[received] = (char) c;
259259
++received;
260-
if (c == '\n') {
261-
break;
262-
}
263260
}
264261
_lock_release_recursive(&s_ctx.read_lock);
265262
if (received > 0) {

components/esp_vfs_console/vfs_cdcacm.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -225,9 +225,6 @@ static ssize_t cdcacm_read(int fd, void *data, size_t size)
225225
break;
226226
}
227227
data_c[received++] = (char) c;
228-
if (c == '\n') {
229-
break;
230-
}
231228
}
232229
}
233230
_lock_release_recursive(&s_read_lock);

0 commit comments

Comments
 (0)