Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite5e9d2b

Browse files
committed
@hathach's changes; check cdc connected during string write
1 parent9d43a25 commite5e9d2b

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

‎supervisor/shared/serial.c‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,13 @@ bool serial_bytes_available(void) {
5252
}
5353

5454
voidserial_write_substring(constchar*text,uint32_tlength) {
55-
#ifCIRCUITPY_DISPLAYIO
55+
#ifCIRCUITPY_DISPLAYIO
5656
interrcode;
5757
common_hal_terminalio_terminal_write(&supervisor_terminal, (constuint8_t*)text,length,&errcode);
58-
#endif
59-
if (!tud_cdc_connected()) {
60-
return;
61-
}
58+
#endif
59+
6260
uint32_tcount=0;
63-
while (count<length) {
61+
while (count<length&&tud_cdc_connected()) {
6462
count+=tud_cdc_write(text+count,length-count);
6563
usb_background();
6664
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp