Skip to content

Commit 28b7421

Browse files
committed
Merge remote-tracking branch 'adafruit/main' into renode
2 parents 1eb70ae + 126a1a4 commit 28b7421

File tree

89 files changed

+1079
-453
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+1079
-453
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,3 +383,6 @@
383383
[submodule "frozen/Adafruit_CircuitPython_SHT4x"]
384384
path = frozen/Adafruit_CircuitPython_SHT4x
385385
url = https://github.com/adafruit/Adafruit_CircuitPython_SHT4x
386+
[submodule "frozen/Adafruit_CircuitPython_Bitmap_Font"]
387+
path = frozen/Adafruit_CircuitPython_Bitmap_Font
388+
url = https://github.com/adafruit/Adafruit_CircuitPython_Bitmap_Font

lib/tinyusb

Submodule tinyusb updated 377 files

main.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,11 @@
114114
#include "supervisor/shared/status_bar.h"
115115
#endif
116116

117-
#if CIRCUITPY_USB && CIRCUITPY_USB_HID
117+
#if CIRCUITPY_USB_DEVICE && CIRCUITPY_USB_HID
118118
#include "shared-module/usb_hid/__init__.h"
119119
#endif
120120

121-
#if CIRCUITPY_USB
121+
#if CIRCUITPY_USB_DEVICE
122122
#include "supervisor/usb.h"
123123
#endif
124124

@@ -239,7 +239,7 @@ STATIC void stop_mp(void) {
239239

240240
background_callback_reset();
241241

242-
#if CIRCUITPY_USB
242+
#if CIRCUITPY_TINYUSB
243243
usb_background();
244244
#endif
245245

@@ -469,7 +469,7 @@ STATIC bool __attribute__((noinline)) run_code_py(safe_mode_t safe_mode, bool *s
469469

470470
start_mp(safe_mode);
471471

472-
#if CIRCUITPY_USB
472+
#if CIRCUITPY_USB_DEVICE
473473
usb_setup_with_vm();
474474
#endif
475475

@@ -848,7 +848,7 @@ STATIC void __attribute__ ((noinline)) run_boot_py(safe_mode_t safe_mode) {
848848

849849
start_mp(safe_mode);
850850

851-
#if CIRCUITPY_USB
851+
#if CIRCUITPY_USB_DEVICE
852852
// Set up default USB values after boot.py VM starts but before running boot.py.
853853
usb_set_defaults();
854854
#endif
@@ -933,7 +933,7 @@ STATIC int run_repl(safe_mode_t safe_mode) {
933933

934934
start_mp(safe_mode);
935935

936-
#if CIRCUITPY_USB
936+
#if CIRCUITPY_USB_DEVICE
937937
usb_setup_with_vm();
938938
#endif
939939

@@ -1081,7 +1081,7 @@ int __attribute__((used)) main(void) {
10811081
// By default our internal flash is readonly to local python code and
10821082
// writable over USB. Set it here so that safemode.py or boot.py can change it.
10831083
filesystem_set_internal_concurrent_write_protection(true);
1084-
filesystem_set_internal_writable_by_usb(CIRCUITPY_USB == 1);
1084+
filesystem_set_internal_writable_by_usb(CIRCUITPY_USB_DEVICE == 1);
10851085

10861086
#if CIRCUITPY_SAFEMODE_PY
10871087
// Run safemode.py if we ARE in safe mode.
@@ -1163,7 +1163,7 @@ void gc_collect(void) {
11631163
common_hal_bleio_gc_collect();
11641164
#endif
11651165

1166-
#if CIRCUITPY_USB && CIRCUITPY_USB_HID
1166+
#if CIRCUITPY_USB_DEVICE && CIRCUITPY_USB_HID
11671167
usb_hid_gc_collect();
11681168
#endif
11691169

ports/atmel-samd/common-hal/microcontroller/Pin.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ void reset_all_pins(void) {
5252
uint32_t pin_mask[PORT_COUNT] = PORT_OUT_IMPLEMENTED;
5353

5454
// Do not full reset USB lines.
55-
#if CIRCUITPY_USB
55+
#if CIRCUITPY_USB_DEVICE
5656
pin_mask[0] &= ~(PORT_PA24 | PORT_PA25);
5757
#endif
5858

ports/espressif/Makefile

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -260,22 +260,34 @@ LIBS += -lm
260260
endif
261261

262262
# TinyUSB defines
263-
ifeq ($(CIRCUITPY_USB),1)
264-
ifeq ($(IDF_TARGET),esp32s2)
263+
# Always add these because we might be doing host.
264+
ifeq ($(IDF_TARGET),esp32)
265+
CFLAGS += -DCFG_TUSB_MCU=OPT_MCU_ESP32
266+
else ifeq ($(IDF_TARGET),esp32c3)
267+
CFLAGS += -DCFG_TUSB_MCU=OPT_MCU_ESP32C3
268+
else ifeq ($(IDF_TARGET),esp32c6)
269+
CFLAGS += -DCFG_TUSB_MCU=OPT_MCU_ESP32C6
270+
else ifeq ($(IDF_TARGET),esp32h2)
271+
CFLAGS += -DCFG_TUSB_MCU=OPT_MCU_ESP32H2
272+
else ifeq ($(IDF_TARGET),esp32s2)
265273
CFLAGS += -DCFG_TUSB_MCU=OPT_MCU_ESP32S2
266274
else ifeq ($(IDF_TARGET),esp32s3)
267275
CFLAGS += -DCFG_TUSB_MCU=OPT_MCU_ESP32S3
268276
endif
277+
ifeq ($(CIRCUITPY_TINYUSB),1)
269278
CFLAGS += \
270279
-DCFG_TUSB_OS=OPT_OS_FREERTOS \
280+
-DCFG_TUD_TASK_QUEUE_SZ=32
281+
endif
282+
ifeq ($(CIRCUITPY_USB_DEVICE),1)
283+
CFLAGS += \
271284
-DCFG_TUD_CDC_RX_BUFSIZE=1024 \
272285
-DCFG_TUD_CDC_TX_BUFSIZE=1024 \
273286
-DCFG_TUD_MSC_BUFSIZE=4096 \
274287
-DCFG_TUD_MIDI_RX_BUFSIZE=128 \
275288
-DCFG_TUD_MIDI_TX_BUFSIZE=128 \
276289
-DCFG_TUD_VENDOR_RX_BUFSIZE=128 \
277-
-DCFG_TUD_VENDOR_TX_BUFSIZE=128 \
278-
-DCFG_TUD_TASK_QUEUE_SZ=32
290+
-DCFG_TUD_VENDOR_TX_BUFSIZE=128
279291
endif
280292

281293
######################################
@@ -303,7 +315,7 @@ ifneq ($(CIRCUITPY_TOUCHIO_USE_NATIVE),0)
303315
SRC_C += peripherals/touch.c
304316
endif
305317

306-
ifneq ($(CIRCUITPY_USB),0)
318+
ifneq ($(CIRCUITPY_USB_DEVICE),0)
307319
SRC_C += lib/tinyusb/src/portable/espressif/esp32sx/dcd_esp32sx.c
308320
endif
309321

@@ -390,7 +402,7 @@ TARGET_SDKCONFIG = esp-idf-config/sdkconfig-$(IDF_TARGET).defaults
390402
ifeq ($(CIRCUITPY_ESP_FLASH_SIZE), 2MB)
391403
FLASH_SIZE_SDKCONFIG ?= esp-idf-config/sdkconfig-flash-$(CIRCUITPY_ESP_FLASH_SIZE)-no-ota-no-uf2.defaults
392404
else
393-
UF2_BOOTLOADER ?= $(CIRCUITPY_USB)
405+
UF2_BOOTLOADER ?= $(CIRCUITPY_USB_DEVICE)
394406
ifeq ($(UF2_BOOTLOADER), 1)
395407
FLASH_SIZE_SDKCONFIG ?= esp-idf-config/sdkconfig-flash-$(CIRCUITPY_ESP_FLASH_SIZE).defaults
396408
else
@@ -503,7 +515,7 @@ endif
503515
ifneq ($(CIRCUITPY_PARALLELDISPLAYBUS),0)
504516
ESP_IDF_COMPONENTS_LINK += esp_lcd
505517
endif
506-
ifneq ($(CIRCUITPY_USB),0)
518+
ifneq ($(CIRCUITPY_USB_DEVICE),0)
507519
ESP_IDF_COMPONENTS_LINK += usb
508520
endif
509521

ports/espressif/boards/adafruit_esp32s3_camera/mpconfigboard.mk

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,3 @@ CIRCUITPY_ONEWIREIO = 0
2626
CIRCUITPY_PARALLELDISPLAYBUS = 0
2727
CIRCUITPY_RGBMATRIX = 0
2828
CIRCUITPY_ROTARYIO = 0
29-
30-
OPTIMIZATION_FLAGS = -Os

ports/espressif/boards/adafruit_feather_esp32s3_reverse_tft/mpconfigboard.mk

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,3 @@ CIRCUITPY_ESP_PSRAM_FREQ = 80m
1616

1717
CIRCUITPY_ESPCAMERA = 0
1818
CIRCUITPY_PARALLELDISPLAYBUS = 0
19-
20-
OPTIMIZATION_FLAGS = -Os

ports/espressif/boards/adafruit_feather_esp32s3_tft/mpconfigboard.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ CIRCUITPY_ESP_FLASH_MODE = qio
1010
CIRCUITPY_ESP_FLASH_FREQ = 80m
1111
CIRCUITPY_ESP_FLASH_SIZE = 4MB
1212

13-
OPTIMIZATION_FLAGS = -Os
1413
CIRCUITPY_ESPCAMERA = 0
1514
CIRCUITPY_PARALLELDISPLAYBUS = 0
1615

ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/mpconfigboard.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ CIRCUITPY_ESP_PSRAM_SIZE = 2MB
1313
CIRCUITPY_ESP_PSRAM_MODE = qio
1414
CIRCUITPY_ESP_PSRAM_FREQ = 80m
1515

16-
OPTIMIZATION_FLAGS = -Os
1716
CIRCUITPY_ESPCAMERA = 0
1817
# Not enough pins.
1918
CIRCUITPY_PARALLELDISPLAYBUS = 0

0 commit comments

Comments
 (0)