summaryrefslogtreecommitdiff
path: root/ports/nrf
diff options
context:
space:
mode:
authorDan Halbert <halbert@halwitz.org>2021-02-12 19:01:14 -0500
committerDan Halbert <halbert@halwitz.org>2021-02-12 19:01:14 -0500
commitd54b5861a30b1b1a352e1c22fc67e729ec95390d (patch)
tree1bd4349929b88ff41d38014eb0d111237a73db8f /ports/nrf
parentf0564b49862eaef0b9752b62d80ef00e3e12a3ee (diff)
wip
Diffstat (limited to 'ports/nrf')
-rw-r--r--ports/nrf/bluetooth/ble_uart.c4
-rwxr-xr-xports/nrf/common-hal/supervisor/Runtime.c14
-rw-r--r--ports/nrf/supervisor/serial.c10
3 files changed, 7 insertions, 21 deletions
diff --git a/ports/nrf/bluetooth/ble_uart.c b/ports/nrf/bluetooth/ble_uart.c
index 1e7a319bd..1b87b82d1 100644
--- a/ports/nrf/bluetooth/ble_uart.c
+++ b/ports/nrf/bluetooth/ble_uart.c
@@ -40,7 +40,7 @@
#include "shared-bindings/_bleio/Service.h"
#include "shared-bindings/_bleio/UUID.h"
-#if CIRCUITPY_SERIAL_BLE
+#if CIRCUITPY_REPL_BLE
static const char default_name[] = "CP-REPL"; // max 8 chars or uuid won't fit in adv data
static const char NUS_UUID[] = "6e400001-b5a3-f393-e0a9-e50e24dcca9e";
@@ -190,4 +190,4 @@ void mp_hal_stdout_tx_strn(const char *str, size_t len) {
}
}
-#endif // CIRCUITPY_SERIAL_BLE
+#endif // CIRCUITPY_REPL_BLE
diff --git a/ports/nrf/common-hal/supervisor/Runtime.c b/ports/nrf/common-hal/supervisor/Runtime.c
index a8f50f70e..def609cda 100755
--- a/ports/nrf/common-hal/supervisor/Runtime.c
+++ b/ports/nrf/common-hal/supervisor/Runtime.c
@@ -35,17 +35,3 @@ bool common_hal_supervisor_runtime_get_serial_connected(void) {
bool common_hal_get_supervisor_runtime_serial_bytes_available(void) {
return (bool) serial_bytes_available();
}
-
-#if CIRCUITPY_USB_SERIAL2
-mp_obj_t common_hal_supervisor_runtime_get_serial2(void) {
- return (bool) serial_connected();
-}
-
-bool common_hal_supervisor_runtime_get_serial2_connected(void) {
- return (bool) serial_connected();
-}
-
-bool common_hal_get_supervisor_runtime_serial2_bytes_available(void) {
- return (bool) serial_bytes_available();
-}
-#endif
diff --git a/ports/nrf/supervisor/serial.c b/ports/nrf/supervisor/serial.c
index b19e9267c..2c2c0116f 100644
--- a/ports/nrf/supervisor/serial.c
+++ b/ports/nrf/supervisor/serial.c
@@ -28,15 +28,15 @@
#include "supervisor/serial.h"
-#if CIRCUITPY_SERIAL_BLE
+#if CIRCUITPY_REPL_BLE
#include "ble_uart.h"
-#elif CIRCUITPY_SERIAL_UART
+#elif CIRCUITPY_REPL_UART
#include <string.h>
#include "nrf_gpio.h"
#include "nrfx_uarte.h"
#endif
-#if CIRCUITPY_SERIAL_BLE
+#if CIRCUITPY_REPL_BLE
void serial_init(void) {
ble_uart_init();
@@ -58,7 +58,7 @@ void serial_write(const char *text) {
ble_uart_stdout_tx_str(text);
}
-#elif CIRCUITPY_SERIAL_UART
+#elif CIRCUITPY_REPL_UART
uint8_t serial_received_char;
nrfx_uarte_t serial_instance = NRFX_UARTE_INSTANCE(0);
@@ -124,4 +124,4 @@ void serial_write_substring(const char *text, uint32_t len) {
}
}
-#endif // CIRCUITPY_SERIAL_UART
+#endif // CIRCUITPY_REPL_UART