Merge pull request #713 from skulblakka/fix/staticUsbLineInfo

USB CDC: Line Info Per Instance
This commit is contained in:
Martino Facchin 2023-11-30 09:40:34 +01:00 committed by GitHub
commit eaf7756fb3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 16 deletions

View file

@ -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

View file

@ -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

View file

@ -176,6 +176,14 @@ private:
bool stalled;
unsigned int epType[3];
volatile LineInfo _usbLineInfo = {
115200, // dWDTERate
0x00, // bCharFormat
0x00, // bParityType
0x08, // bDataBits
0x00 // lineState
};
};
extern Serial_ SerialUSB;