2017-03-08 12:43:24 +00:00
|
|
|
#include "py/mphal.h"
|
|
|
|
|
2017-03-24 15:38:46 +00:00
|
|
|
// void USBD_CDC_TxAlways(const uint8_t *buf, uint32_t len);
|
|
|
|
// int USBD_CDC_Rx(uint8_t *buf, uint32_t len, uint32_t timeout);
|
2017-03-08 12:43:24 +00:00
|
|
|
|
|
|
|
int mp_hal_stdin_rx_chr(void) {
|
|
|
|
for (;;) {
|
2017-03-24 15:38:46 +00:00
|
|
|
// byte c;
|
|
|
|
// if (USBD_CDC_Rx(&c, 1, 0) != 0) {
|
|
|
|
// return c;
|
|
|
|
// }
|
2017-03-08 12:43:24 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void mp_hal_stdout_tx_strn(const char *str, size_t len) {
|
2017-03-24 15:38:46 +00:00
|
|
|
// USBD_CDC_TxAlways((const uint8_t*)str, len);
|
2017-03-08 12:43:24 +00:00
|
|
|
}
|