Skip to content

Commit

Permalink
(not quite ready)
Browse files Browse the repository at this point in the history
Revert "esp32 serial_jtag debugger connection improvements (#1299)"
This reverts commit 38d19ac.
  • Loading branch information
mkellner committed Feb 2, 2024
1 parent 38d19ac commit 9993139
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 14 deletions.
4 changes: 1 addition & 3 deletions build/devices/esp32/xsProj-esp32c3/main/main.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016-2024 Moddable Tech, Inc.
* Copyright (c) 2016-2023 Moddable Tech, Inc.
*
* This file is part of the Moddable SDK Runtime.
*
Expand Down Expand Up @@ -45,7 +45,6 @@
#if USE_USB
#if USE_USB == 2
#include "driver/usb_serial_jtag.h"
#include "hal/usb_serial_jtag_ll.h"
#else
#error esp32c3 doesnt support TinyUSB
#endif
Expand Down Expand Up @@ -121,7 +120,6 @@ static void debug_task(void *pvParameter)

while (true) {
fxReceiveLoop();
usb_serial_jtag_ll_txfifo_flush();
modDelayMilliseconds(5);
}
}
Expand Down
6 changes: 2 additions & 4 deletions build/devices/esp32/xsProj-esp32c6/main/main.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016-2024 Moddable Tech, Inc.
* Copyright (c) 2016-2023 Moddable Tech, Inc.
*
* This file is part of the Moddable SDK Runtime.
*
Expand Down Expand Up @@ -70,7 +70,6 @@
#include "tusb_cdc_acm.h"
#elif (USE_USB == 2)
#include "driver/usb_serial_jtag.h"
#include "hal/usb_serial_jtag_ll.h"
#endif
#else
#include "driver/uart.h"
Expand Down Expand Up @@ -215,7 +214,6 @@ static void debug_task(void *pvParameter)

#elif (USE_USB == 2)
fxReceiveLoop();
usb_serial_jtag_ll_txfifo_flush();
modDelayMilliseconds(5);

#else // !USE_USB
Expand Down Expand Up @@ -422,7 +420,7 @@ void ESP_put(uint8_t *c, int count) {
void ESP_putc(int c) {
char cx = c;
#if (USE_USB == 2)
usb_serial_jtag_write_bytes(&cx, 1, 1);
usb_serial_jtag_write_bytes(&cx, 1, 1);
#else
uart_write_bytes(USE_UART, &cx, 1);
#endif
Expand Down
4 changes: 1 addition & 3 deletions build/devices/esp32/xsProj-esp32h2/main/main.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016-2024 Moddable Tech, Inc.
* Copyright (c) 2016-2023 Moddable Tech, Inc.
*
* This file is part of the Moddable SDK Runtime.
*
Expand Down Expand Up @@ -70,7 +70,6 @@
#include "tusb_cdc_acm.h"
#elif (USE_USB == 2)
#include "driver/usb_serial_jtag.h"
#include "hal/usb_serial_jtag_ll.h"
#endif
#else
#include "driver/uart.h"
Expand Down Expand Up @@ -215,7 +214,6 @@ static void debug_task(void *pvParameter)

#elif (USE_USB == 2)
fxReceiveLoop();
usb_serial_jtag_ll_txfifo_flush();
modDelayMilliseconds(5);

#else // !USE_USB
Expand Down
7 changes: 3 additions & 4 deletions build/devices/esp32/xsProj-esp32s3/main/main.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016-2024 Moddable Tech, Inc.
* Copyright (c) 2016-2023 Moddable Tech, Inc.
*
* This file is part of the Moddable SDK Runtime.
*
Expand Down Expand Up @@ -69,7 +69,6 @@
#include "tusb_cdc_acm.h"
#elif (USE_USB == 2)
#include "driver/usb_serial_jtag.h"
#include "hal/usb_serial_jtag_ll.h"
#endif
#else
#include "driver/uart.h"
Expand Down Expand Up @@ -214,8 +213,8 @@ static void debug_task(void *pvParameter)

#elif (USE_USB == 2)
fxReceiveLoop();
usb_serial_jtag_ll_txfifo_flush();
modDelayMilliseconds(5);

#else // !USE_USB

uart_event_t event;
Expand Down Expand Up @@ -420,7 +419,7 @@ WEAK void ESP_put(uint8_t *c, int count) {
WEAK void ESP_putc(int c) {
char cx = c;
#if (USE_USB == 2)
usb_serial_jtag_write_bytes(&cx, 1, 1);
usb_serial_jtag_write_bytes(&cx, 1, 1);
#else
uart_write_bytes(USE_UART, &cx, 1);
#endif
Expand Down

0 comments on commit 9993139

Please sign in to comment.