main: use dfu init for detach to be linked
This commit is contained in:
parent
9115852f75
commit
4065f4d625
|
@ -9,6 +9,7 @@
|
|||
#include "freertos/task.h"
|
||||
#include "tinyusb.h"
|
||||
#include "tusb_cdc_acm.h"
|
||||
#include "tusb_dfu_rt.h"
|
||||
#include "tusb_console.h"
|
||||
#include "sdkconfig.h"
|
||||
|
||||
|
@ -22,6 +23,7 @@ void app_main(void)
|
|||
ESP_ERROR_CHECK( tinyusb_driver_install(&tusb_cfg) ); // configure USB
|
||||
tinyusb_config_cdcacm_t amc_cfg = { 0 }; // the configuration uses default values
|
||||
ESP_ERROR_CHECK( tusb_cdc_acm_init(&amc_cfg) ); // configure CDC ACM
|
||||
ESP_ERROR_CHECK( tusb_dfu_rf_init() ); // configure DFU runtime (ensures we can use it)
|
||||
esp_tusb_init_console(TINYUSB_CDC_ACM_0); // log to USB
|
||||
ESP_LOGI(TAG, "USB initialized");
|
||||
|
||||
|
|
Loading…
Reference in New Issue