mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-26 00:08:10 +00:00
core/embed: Set VCP write timeout to 0.
This commit is contained in:
parent
698b632acb
commit
4005f4832f
@ -33,8 +33,9 @@ int mp_hal_stdin_rx_chr(void) {
|
|||||||
|
|
||||||
void mp_hal_stdout_tx_strn(const char *str, size_t len) {
|
void mp_hal_stdout_tx_strn(const char *str, size_t len) {
|
||||||
if (vcp_iface_num >= 0) {
|
if (vcp_iface_num >= 0) {
|
||||||
int r =
|
// The write timeout is set to 0, because otherwise when the VCP receive
|
||||||
usb_vcp_write_blocking(vcp_iface_num, (const uint8_t *)str, len, 500);
|
// buffer on the host gets full, the timeout will block device operation.
|
||||||
|
int r = usb_vcp_write_blocking(vcp_iface_num, (const uint8_t *)str, len, 0);
|
||||||
(void)r;
|
(void)r;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user