Skip to content

Commit

Permalink
Fix serial port selection for ATSAM chips
Browse files Browse the repository at this point in the history
  • Loading branch information
vickash committed Sep 6, 2024
1 parent 906a557 commit c3b908f
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/lib/DenkoDefines.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,10 @@
// Uses SerialUSB (left port), which is native USB, on Arduino Due & Zero, or Serial otherwise.
// On many boards, eg. Arduino Leonardo, RP2040, ESP32-S3, Serial is native USB regardless.
#if defined(__SAM3X8E__) || defined(__SAMD21G18A__)
// Prefer native USB, "SerialUSB" (left port on Due and Zero) once available.
#if defined(SerialUSB)
#define DENKO_SERIAL_IF SerialUSB
#define DENKO_USB_CDC
#define DENKO_SERIAL_IF SERIAL_PORT_USBVIRTUAL
#define DENKO_USB_CDC
// "Serial" is UART (right port) on Due and Zero, but may be native USB on boards with one port.
#else
#define DENKO_SERIAL_IF Serial
#endif
// #define DENKO_SERIAL_IF Serial
#else
#define DENKO_SERIAL_IF Serial
#endif
Expand Down

0 comments on commit c3b908f

Please sign in to comment.