Skip to content

Commit 5d1b495

Browse files
committed
Enable io.IOBase so we can construct a RequestsStreamWrapper in Python code
1 parent 46a4393 commit 5d1b495

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

py/circuitpy_mpconfig.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ extern void common_hal_mcu_enable_interrupts(void);
142142
#define MICROPY_PY_GC (1)
143143
// Supplanted by shared-bindings/math
144144
#define MICROPY_PY_IO (CIRCUITPY_IO)
145+
#define MICROPY_PY_IO_IOBASE (CIRCUITPY_IO_IOBASE)
145146
// In extmod
146147
#define MICROPY_PY_JSON (CIRCUITPY_JSON)
147148
#define MICROPY_PY_MATH (0)

py/circuitpy_mpconfig.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,10 @@ CFLAGS += -DCIRCUITPY_IMAGECAPTURE=$(CIRCUITPY_IMAGECAPTURE)
302302
CIRCUITPY_IO ?= $(CIRCUITPY_JSON)
303303
CFLAGS += -DCIRCUITPY_IO=$(CIRCUITPY_IO)
304304

305+
# io.IOBase - enhances JPEG support
306+
CIRCUITPY_IO_IOBASE ?= $(call enable-if-all,$(CIRCUITPY_IO) $(CIRCUITPY_JPEGIO))
307+
CFLAGS += -DCIRCUITPY_IO_IOBASE=$(CIRCUITPY_IO_IOBASE)
308+
305309
CIRCUITPY_IPADDRESS ?= $(CIRCUITPY_WIFI)
306310
CFLAGS += -DCIRCUITPY_IPADDRESS=$(CIRCUITPY_IPADDRESS)
307311

0 commit comments

Comments
 (0)