diff --git a/cores/arduino/USB/CDC.cpp b/cores/arduino/USB/CDC.cpp index 8d6c6f4b8..7b5bd5643 100644 --- a/cores/arduino/USB/CDC.cpp +++ b/cores/arduino/USB/CDC.cpp @@ -42,22 +42,6 @@ extern USBDevice_SAMD21G18x usbd; extern USBDeviceClass USBDevice; -typedef struct { - uint32_t dwDTERate; - uint8_t bCharFormat; - uint8_t bParityType; - uint8_t bDataBits; - uint8_t lineState; -} LineInfo; - -static volatile LineInfo _usbLineInfo = { - 115200, // dWDTERate - 0x00, // bCharFormat - 0x00, // bParityType - 0x08, // bDataBits - 0x00 // lineState -}; - static volatile int32_t breakValue = -1; // CDC diff --git a/cores/arduino/USB/CDC.h b/cores/arduino/USB/CDC.h index 8e88db5b5..ee5aa07d9 100644 --- a/cores/arduino/USB/CDC.h +++ b/cores/arduino/USB/CDC.h @@ -73,6 +73,14 @@ typedef struct EndpointDescriptor out; } CDCDescriptor; +typedef struct { + uint32_t dwDTERate; + uint8_t bCharFormat; + uint8_t bParityType; + uint8_t bDataBits; + uint8_t lineState; +} LineInfo; + #endif #endif \ No newline at end of file diff --git a/cores/arduino/USB/USBAPI.h b/cores/arduino/USB/USBAPI.h index b06b5e56e..c1cee4ce0 100644 --- a/cores/arduino/USB/USBAPI.h +++ b/cores/arduino/USB/USBAPI.h @@ -176,6 +176,14 @@ friend USBDeviceClass; bool stalled; unsigned int epType[3]; + volatile LineInfo _usbLineInfo = { + 115200, // dWDTERate + 0x00, // bCharFormat + 0x00, // bParityType + 0x08, // bDataBits + 0x00 // lineState + }; + }; extern Serial_ SerialUSB;