Refactor the startup flow, cleanup old progress logs, cleanup globals

This commit is contained in:
Lorow
2025-09-03 00:15:25 +02:00
parent 0c9e254aba
commit 68998ad727
6 changed files with 188 additions and 255 deletions

View File

@@ -132,15 +132,15 @@ void SerialManager::shutdown()
{
// Stop heartbeats; timer will be deleted by main if needed.
// Uninstall the USB Serial JTAG driver to free the internal USB for TinyUSB.
// esp_err_t err = usb_serial_jtag_driver_uninstall();
// if (err == ESP_OK)
// {
// ESP_LOGI("[SERIAL]", "usb_serial_jtag driver uninstalled");
// }
// else if (err != ESP_ERR_INVALID_STATE)
// {
// ESP_LOGW("[SERIAL]", "usb_serial_jtag_driver_uninstall returned %s", esp_err_to_name(err));
// }
esp_err_t err = usb_serial_jtag_driver_uninstall();
if (err == ESP_OK)
{
ESP_LOGI("[SERIAL]", "usb_serial_jtag driver uninstalled");
}
else if (err != ESP_ERR_INVALID_STATE)
{
ESP_LOGW("[SERIAL]", "usb_serial_jtag_driver_uninstall returned %s", esp_err_to_name(err));
}
}
// we can cancel this task once we're in cdc

View File

@@ -18,8 +18,8 @@
#include "esp_vfs_dev.h"
#include "esp_mac.h"
void tud_cdc_rx_cb(uint8_t itf);
void tud_cdc_line_state_cb(uint8_t itf, bool dtr, bool rts);
extern "C" void tud_cdc_rx_cb(uint8_t itf);
extern "C" void tud_cdc_line_state_cb(uint8_t itf, bool dtr, bool rts);
extern QueueHandle_t cdcMessageQueue;
@@ -49,5 +49,5 @@ private:
};
void HandleSerialManagerTask(void *pvParameters);
void HandleCDCSerialManagerTask(void *pvParameters)
void HandleCDCSerialManagerTask(void *pvParameters);
#endif