summaryrefslogtreecommitdiff
path: root/shared-bindings/busio
diff options
context:
space:
mode:
authorScott Shawcroft <scott@adafruit.com>2020-05-11 15:40:27 -0700
committerGitHub <noreply@github.com>2020-05-11 15:40:27 -0700
commit55f78bfb70b20dacce635352b097fc235539168b (patch)
tree0ad684943b8f4c57723812875be27cac4cb5f178 /shared-bindings/busio
parent801d9655e5f69fd3ab8926a04396c7d5e28477e2 (diff)
parentd8491f31768b04322728bc436b2f8e6c5f2bf0d6 (diff)
Merge pull request #2878 from WarriorOfWire/ujson-stream-protocol
ujson: work with mp stream protocol for fast & easy read
Diffstat (limited to 'shared-bindings/busio')
-rw-r--r--shared-bindings/busio/UART.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/shared-bindings/busio/UART.c b/shared-bindings/busio/UART.c
index f231924d5..883b4630f 100644
--- a/shared-bindings/busio/UART.c
+++ b/shared-bindings/busio/UART.c
@@ -39,6 +39,9 @@
#include "py/stream.h"
#include "supervisor/shared/translate.h"
+#define STREAM_DEBUG(...) (void)0
+// #define STREAM_DEBUG(...) mp_printf(&mp_plat_print __VA_OPT__(,) __VA_ARGS__)
+
//| .. currentmodule:: busio
//|
@@ -219,6 +222,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(busio_uart___exit___obj, 4, 4, busio_
// These three methods are used by the shared stream methods.
STATIC mp_uint_t busio_uart_read(mp_obj_t self_in, void *buf_in, mp_uint_t size, int *errcode) {
+ STREAM_DEBUG("busio_uart_read stream %d\n", size);
busio_uart_obj_t *self = MP_OBJ_TO_PTR(self_in);
check_for_deinit(self);
byte *buf = buf_in;