Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit eaf7756

Browse filesBrowse files
authored
Merge pull request #713 from skulblakka/fix/staticUsbLineInfo
USB CDC: Line Info Per Instance
2 parents 84c09b3 + d0ae34d commit eaf7756
Copy full SHA for eaf7756

File tree

Expand file treeCollapse file tree

3 files changed

+16
-16
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+16
-16
lines changed

‎cores/arduino/USB/CDC.cpp

Copy file name to clipboardExpand all lines: cores/arduino/USB/CDC.cpp
-16Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -42,22 +42,6 @@ extern USBDevice_SAMD21G18x usbd;
4242

4343
extern USBDeviceClass USBDevice;
4444

45-
typedef struct {
46-
uint32_t dwDTERate;
47-
uint8_t bCharFormat;
48-
uint8_t bParityType;
49-
uint8_t bDataBits;
50-
uint8_t lineState;
51-
} LineInfo;
52-
53-
static volatile LineInfo _usbLineInfo = {
54-
115200, // dWDTERate
55-
0x00, // bCharFormat
56-
0x00, // bParityType
57-
0x08, // bDataBits
58-
0x00 // lineState
59-
};
60-
6145
static volatile int32_t breakValue = -1;
6246

6347
// CDC

‎cores/arduino/USB/CDC.h

Copy file name to clipboardExpand all lines: cores/arduino/USB/CDC.h
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,14 @@ typedef struct
7373
EndpointDescriptor out;
7474
} CDCDescriptor;
7575

76+
typedef struct {
77+
uint32_t dwDTERate;
78+
uint8_t bCharFormat;
79+
uint8_t bParityType;
80+
uint8_t bDataBits;
81+
uint8_t lineState;
82+
} LineInfo;
83+
7684

7785
#endif
7886
#endif

‎cores/arduino/USB/USBAPI.h

Copy file name to clipboardExpand all lines: cores/arduino/USB/USBAPI.h
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,14 @@ friend USBDeviceClass;
176176
bool stalled;
177177
unsigned int epType[3];
178178

179+
volatile LineInfo _usbLineInfo = {
180+
115200, // dWDTERate
181+
0x00, // bCharFormat
182+
0x00, // bParityType
183+
0x08, // bDataBits
184+
0x00 // lineState
185+
};
186+
179187
};
180188
extern Serial_ SerialUSB;
181189

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.