1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-17 03:48:09 +00:00
trezor-firmware/micropython/firmware/mphalport.c
Jan Pochyla 38b99b306a trezorhal: add cdc vcp tx
TODO: rx support
TODO: buffering
TODO: cleanup
2017-04-06 19:06:05 +02:00

16 lines
303 B
C

#include "py/mphal.h"
#include "usb.h"
#define VCP_IFACE 0x01
#define VCP_WRITE_TIMEOUT 25
int mp_hal_stdin_rx_chr(void) {
for (;;) {
}
}
void mp_hal_stdout_tx_strn(const char *str, size_t len) {
usb_vcp_write_blocking(VCP_IFACE, (const uint8_t *)str, len, VCP_WRITE_TIMEOUT);
}