Skip to content

Commit

Permalink
USBSerial is quite bad on platformio
Browse files Browse the repository at this point in the history
  • Loading branch information
gin66 committed Oct 14, 2023
1 parent 15f2bbb commit 1d320ee
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions examples/StepperDemo/generic.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#ifndef GENERIC_H
#define GENERIC_H

#include <Arduino.h>

#if defined(ARDUINO_ARCH_AVR)
#define get_char(x) pgm_read_byte(x)
#define MSG_TYPE PGM_P
Expand All @@ -11,8 +13,7 @@
#error "Unsupported derivate"
#endif

#if defined(CONFIG_IDF_TARGET_ESP32C3) && defined(CONFIG_TINYUSB_CDC_ENABLED) && (CONFIG_TINYUSB_CDC_ENABLED == 1)
USBCDC USBSerial;
#if defined(CONFIG_IDF_TARGET_ESP32C3) && (ARDUINO_USB_MODE==1)
#define SerialInterface USBSerial
#else
#define SerialInterface Serial
Expand Down

0 comments on commit 1d320ee

Please sign in to comment.