1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-25 07:48:10 +00:00

core/embed: Set VCP write timeout to 0.

This commit is contained in:
Andrew Kozlik 2020-07-15 16:49:54 +02:00 committed by Andrew Kozlik
parent 698b632acb
commit 4005f4832f

View File

@ -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;
} }
} }