diff --git a/tulip/esp32s3/boards/MATOUCH7/mpconfigboard.cmake b/tulip/esp32s3/boards/MATOUCH7/mpconfigboard.cmake index bccccc33..bccb7309 100644 --- a/tulip/esp32s3/boards/MATOUCH7/mpconfigboard.cmake +++ b/tulip/esp32s3/boards/MATOUCH7/mpconfigboard.cmake @@ -16,5 +16,6 @@ set(SDKCONFIG_DEFAULTS list(APPEND MICROPY_SOURCE_BOARD gt911_touchscreen.c esp32s3_display.c + esp_lcd_touch_gt911.c usb_host.c ) \ No newline at end of file diff --git a/tulip/esp32s3/boards/MATOUCH7/mpconfigboard.h b/tulip/esp32s3/boards/MATOUCH7/mpconfigboard.h index 6dc9c974..aad97b58 100644 --- a/tulip/esp32s3/boards/MATOUCH7/mpconfigboard.h +++ b/tulip/esp32s3/boards/MATOUCH7/mpconfigboard.h @@ -19,4 +19,3 @@ #define MICROPY_HW_ENABLE_USBDEV (1) #define MICROPY_HW_ESP_USB_SERIAL_JTAG (0) #define MICROPY_ENABLE_SCHEDULER (1) -#define MICROPY_SCHEDULER_DEPTH (128) \ No newline at end of file diff --git a/tulip/esp32s3/boards/N16R8/mpconfigboard.h b/tulip/esp32s3/boards/N16R8/mpconfigboard.h index 6dc9c974..aad97b58 100644 --- a/tulip/esp32s3/boards/N16R8/mpconfigboard.h +++ b/tulip/esp32s3/boards/N16R8/mpconfigboard.h @@ -19,4 +19,3 @@ #define MICROPY_HW_ENABLE_USBDEV (1) #define MICROPY_HW_ESP_USB_SERIAL_JTAG (0) #define MICROPY_ENABLE_SCHEDULER (1) -#define MICROPY_SCHEDULER_DEPTH (128) \ No newline at end of file diff --git a/tulip/esp32s3/boards/N32R8/mpconfigboard.h b/tulip/esp32s3/boards/N32R8/mpconfigboard.h index 6dc9c974..aad97b58 100644 --- a/tulip/esp32s3/boards/N32R8/mpconfigboard.h +++ b/tulip/esp32s3/boards/N32R8/mpconfigboard.h @@ -19,4 +19,3 @@ #define MICROPY_HW_ENABLE_USBDEV (1) #define MICROPY_HW_ESP_USB_SERIAL_JTAG (0) #define MICROPY_ENABLE_SCHEDULER (1) -#define MICROPY_SCHEDULER_DEPTH (128) \ No newline at end of file diff --git a/tulip/esp32s3/boards/TDECK/mpconfigboard.cmake b/tulip/esp32s3/boards/TDECK/mpconfigboard.cmake index 4c480d84..e4fcda43 100644 --- a/tulip/esp32s3/boards/TDECK/mpconfigboard.cmake +++ b/tulip/esp32s3/boards/TDECK/mpconfigboard.cmake @@ -16,5 +16,8 @@ set(SDKCONFIG_DEFAULTS list(APPEND MICROPY_SOURCE_BOARD tdeck_display.c tdeck_keyboard.c + esp_lcd_touch_gt911.c gt911_touchscreen.c + ../../micropython/ports/esp32/usb_serial_jtag.c ) + diff --git a/tulip/esp32s3/boards/TDECK/mpconfigboard.h b/tulip/esp32s3/boards/TDECK/mpconfigboard.h index 6dc9c974..3c57a193 100644 --- a/tulip/esp32s3/boards/TDECK/mpconfigboard.h +++ b/tulip/esp32s3/boards/TDECK/mpconfigboard.h @@ -7,7 +7,7 @@ // Enable UART REPL for modules that have an external USB-UART and don't use native USB. #define MICROPY_HW_ENABLE_UART_REPL (1) - +#define USB_SERIAL_JTAG_PACKET_SZ_BYTES 64 #define MICROPY_HW_I2C0_SCL (I2C_SCL) #define MICROPY_HW_I2C0_SDA (I2C_SDA) @@ -15,8 +15,9 @@ #define MICROPY_PY_MACHINE_I2S (0) #define MICROPY_PY_BLUETOOTH (0) #define MICROPY_BLUETOOTH_NIMBLE (0) -#define MICROPY_HW_USB_CDC (1) -#define MICROPY_HW_ENABLE_USBDEV (1) -#define MICROPY_HW_ESP_USB_SERIAL_JTAG (0) +#define MICROPY_HW_USB_CDC (0) +#define MICROPY_HW_ENABLE_USBDEV (0) +#define MICROPY_HW_ESP_USB_SERIAL_JTAG (1) #define MICROPY_ENABLE_SCHEDULER (1) -#define MICROPY_SCHEDULER_DEPTH (128) \ No newline at end of file +#define MICROPY_ESP32_USE_BOOTLOADER_RTC (0) +#define MICROPY_BOARD_ENTER_BOOTLOADER(nargs,args) void \ No newline at end of file diff --git a/tulip/esp32s3/boards/TULIP4_R11/mpconfigboard.h b/tulip/esp32s3/boards/TULIP4_R11/mpconfigboard.h index e78750ae..3b42f195 100644 --- a/tulip/esp32s3/boards/TULIP4_R11/mpconfigboard.h +++ b/tulip/esp32s3/boards/TULIP4_R11/mpconfigboard.h @@ -20,4 +20,3 @@ #define MICROPY_HW_ESP_USB_SERIAL_JTAG (0) #define MICROPY_ENABLE_SCHEDULER (1) -//#define MICROPY_SCHEDULER_DEPTH (128) \ No newline at end of file diff --git a/tulip/esp32s3/boards/TULIP4_R11_DEBUG/mpconfigboard.cmake b/tulip/esp32s3/boards/TULIP4_R11_DEBUG/mpconfigboard.cmake index 11ac829c..ae5739c0 100644 --- a/tulip/esp32s3/boards/TULIP4_R11_DEBUG/mpconfigboard.cmake +++ b/tulip/esp32s3/boards/TULIP4_R11_DEBUG/mpconfigboard.cmake @@ -13,7 +13,8 @@ set(SDKCONFIG_DEFAULTS boards/TULIP4_R11_DEBUG/sdkconfig.board ) -list(APPEND MICROPY_SOURCE_PORT +list(APPEND MICROPY_SOURCE_BOARD + esp_lcd_touch_gt911.c gt911_touchscreen.c esp32s3_display.c usb_host.c diff --git a/tulip/esp32s3/boards/TULIP4_R11_DEBUG/mpconfigboard.h b/tulip/esp32s3/boards/TULIP4_R11_DEBUG/mpconfigboard.h index 6dc9c974..aad97b58 100644 --- a/tulip/esp32s3/boards/TULIP4_R11_DEBUG/mpconfigboard.h +++ b/tulip/esp32s3/boards/TULIP4_R11_DEBUG/mpconfigboard.h @@ -19,4 +19,3 @@ #define MICROPY_HW_ENABLE_USBDEV (1) #define MICROPY_HW_ESP_USB_SERIAL_JTAG (0) #define MICROPY_ENABLE_SCHEDULER (1) -#define MICROPY_SCHEDULER_DEPTH (128) \ No newline at end of file diff --git a/tulip/release.sh b/tulip/release.sh index 1ee1dd17..8b2b26e6 100755 --- a/tulip/release.sh +++ b/tulip/release.sh @@ -29,7 +29,7 @@ cp shared/py/voices.py fs/ex/my_voices.py cd esp32s3 -source ~/esp/esp-idf-v5.2/export.sh +source ~/esp/esp-idf/export.sh # If sys, just create/upload the last sys and exit if [ "$TYPE" == "sys" ]; then python tulip_fs_create.py diff --git a/tulip/shared/display.c b/tulip/shared/display.c index ffe26080..e9dea382 100644 --- a/tulip/shared/display.c +++ b/tulip/shared/display.c @@ -162,11 +162,13 @@ bool display_frame_done_generic() { bg_lines[i] = (uint32_t*)&bg[(H_RES+OFFSCREEN_X_PX)*BYTES_PER_PIXEL*y_offsets[i] + x_offsets[i]*BYTES_PER_PIXEL]; } #ifdef ESP_PLATFORM + #ifndef TDECK if(mouse_pointer_status) { sprite_x_px[0] = mouse_x_pos; sprite_y_px[0] = mouse_y_pos; } #endif + #endif tulip_frame_isr(); vsync_count++; return true; diff --git a/tulip/shared/midi.c b/tulip/shared/midi.c index ef03dd91..e506b945 100644 --- a/tulip/shared/midi.c +++ b/tulip/shared/midi.c @@ -134,15 +134,21 @@ void midi_local(uint8_t * bytes, uint16_t len) { #ifdef ESP_PLATFORM QueueHandle_t uart_queue; +#ifndef TDECK extern void send_usb_midi_out(uint8_t * data, uint16_t len); extern bool midi_has_out; +#endif void midi_out(uint8_t * bytes, uint16_t len) { - if(midi_has_out) { // usb midi - send_usb_midi_out(bytes,len); - } else { // uart midi + #ifndef TDECK + if(midi_has_out) { // usb midi + send_usb_midi_out(bytes,len); + } else { // uart midi + uart_write_bytes(UART_NUM_1, bytes, len); + } + #else uart_write_bytes(UART_NUM_1, bytes, len); - } + #endif } void run_midi() {