Skip to content

Commit c567b43

Browse files
committed
add CIRCUITPY_USB_IDENTIFICATION to turn off on smallest builds
1 parent adf15fa commit c567b43

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

ports/atmel-samd/mpconfigport.mk

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,11 @@ CIRCUITPY_ULAB = 0
5151
CIRCUITPY_VECTORIO = 0
5252
CIRCUITPY_ZLIB = 0
5353

54-
# TODO: In CircuitPython 8.0, turn this back on, after `busio.OneWire` is removed.
55-
# We'd like a smoother transition, but we can't afford the space to have both
56-
# `busio.OneWire` and `onewireio.OneWire` present on these tiny builds.
54+
# Turn off a few more things that don't fit in 192kB
5755

5856
ifeq ($(INTERNAL_FLASH_FILESYSTEM),1)
5957
CIRCUITPY_ONEWIREIO ?= 0
58+
CIRCUITPY_USB_IDENTIFICATION ?= 0
6059
endif
6160

6261
MICROPY_PY_ASYNC_AWAIT = 0

py/circuitpy_mpconfig.mk

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,9 @@ CFLAGS += -DCIRCUITPY_USB_HID_ENABLED_DEFAULT=$(CIRCUITPY_USB_HID_ENABLED_DEFAUL
447447
CIRCUITPY_USB_HOST ?= 0
448448
CFLAGS += -DCIRCUITPY_USB_HOST=$(CIRCUITPY_USB_HOST)
449449

450+
CIRCUITPY_USB_IDENTIFICATION ?= $(CIRCUITPY_USB)
451+
CFLAGS += -DCIRCUITPY_USB_IDENTIFICATION=$(CIRCUITPY_USB_IDENTIFICATION)
452+
450453
# MIDI is available by default, but is not turned on if there are fewer than 8 endpoints.
451454
CIRCUITPY_USB_MIDI ?= $(CIRCUITPY_USB)
452455
CFLAGS += -DCIRCUITPY_USB_MIDI=$(CIRCUITPY_USB_MIDI)

shared-bindings/supervisor/__init__.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
#include "supervisor/shared/translate/translate.h"
4040
#include "supervisor/shared/workflow.h"
4141

42-
#if CIRCUITPY_USB
42+
#if CIRCUITPY_USB_IDENTIFICATION
4343
#include "supervisor/usb.h"
4444
#endif
4545

@@ -315,7 +315,7 @@ MP_DEFINE_CONST_FUN_OBJ_2(supervisor_reset_terminal_obj, supervisor_reset_termin
315315
//| ...
316316
//|
317317
STATIC mp_obj_t supervisor_set_usb_identification(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
318-
#if CIRCUITPY_USB
318+
#if CIRCUITPY_USB_IDENTIFICATION
319319
static const mp_arg_t allowed_args[] = {
320320
{ MP_QSTR_manufacturer, MP_ARG_OBJ, {.u_rom_obj = mp_const_none} },
321321
{ MP_QSTR_product, MP_ARG_OBJ, {.u_rom_obj = mp_const_none} },

0 commit comments

Comments
 (0)