nrf5: Fallback to HW UART when not Bluetooth LE UART has been enabled.

This commit is contained in:
Glenn Ruben Bakke 2017-02-04 16:15:49 +01:00
parent e9e98e777d
commit b6d54cbcaf

View File

@ -48,7 +48,7 @@ void mp_hal_set_interrupt_char(int c) {
}
#if (BLUETOOTH_SD != 132)
#if (MICROPY_PY_BLE_NUS == 0)
int mp_hal_stdin_rx_chr(void) {
for (;;) {
if (MP_STATE_PORT(pyb_stdio_uart) != NULL && uart_rx_any(MP_STATE_PORT(pyb_stdio_uart))) {
@ -64,7 +64,7 @@ void mp_hal_stdout_tx_str(const char *str) {
mp_hal_stdout_tx_strn(str, strlen(str));
}
#if (BLUETOOTH_SD != 132)
#if (MICROPY_PY_BLE_NUS == 0)
void mp_hal_stdout_tx_strn(const char *str, mp_uint_t len) {
if (MP_STATE_PORT(pyb_stdio_uart) != NULL) {
uart_tx_strn(MP_STATE_PORT(pyb_stdio_uart), str, len);