Skip to content

Commit

Permalink
everything builds, untested on T-DECK yet, ready for release otherwise
Browse files Browse the repository at this point in the history
  • Loading branch information
bwhitman committed Oct 12, 2024
1 parent 74ee975 commit 28b1bd1
Show file tree
Hide file tree
Showing 12 changed files with 25 additions and 16 deletions.
1 change: 1 addition & 0 deletions tulip/esp32s3/boards/MATOUCH7/mpconfigboard.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
1 change: 0 additions & 1 deletion tulip/esp32s3/boards/MATOUCH7/mpconfigboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
1 change: 0 additions & 1 deletion tulip/esp32s3/boards/N16R8/mpconfigboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
1 change: 0 additions & 1 deletion tulip/esp32s3/boards/N32R8/mpconfigboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
3 changes: 3 additions & 0 deletions tulip/esp32s3/boards/TDECK/mpconfigboard.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

11 changes: 6 additions & 5 deletions tulip/esp32s3/boards/TDECK/mpconfigboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,17 @@
// 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)

#define MICROPY_HW_ENABLE_SDCARD (0)
#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)
#define MICROPY_ESP32_USE_BOOTLOADER_RTC (0)
#define MICROPY_BOARD_ENTER_BOOTLOADER(nargs,args) void
1 change: 0 additions & 1 deletion tulip/esp32s3/boards/TULIP4_R11/mpconfigboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@
#define MICROPY_HW_ESP_USB_SERIAL_JTAG (0)
#define MICROPY_ENABLE_SCHEDULER (1)

//#define MICROPY_SCHEDULER_DEPTH (128)
3 changes: 2 additions & 1 deletion tulip/esp32s3/boards/TULIP4_R11_DEBUG/mpconfigboard.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion tulip/esp32s3/boards/TULIP4_R11_DEBUG/mpconfigboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion tulip/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions tulip/shared/display.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
14 changes: 10 additions & 4 deletions tulip/shared/midi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 28b1bd1

Please sign in to comment.