@@ -127,7 +127,7 @@ void UART::on_rx() {
127
127
void UART::end () {
128
128
#if defined(SERIAL_CDC)
129
129
if (is_usb) {
130
- return SerialUSB .end ();
130
+ return _SerialUSB .end ();
131
131
}
132
132
#endif
133
133
if (_serial->obj != NULL ) {
@@ -139,7 +139,7 @@ void UART::end() {
139
139
int UART::available () {
140
140
#if defined(SERIAL_CDC)
141
141
if (is_usb) {
142
- return SerialUSB .available ();
142
+ return _SerialUSB .available ();
143
143
}
144
144
#endif
145
145
return rx_buffer.available ();
@@ -148,7 +148,7 @@ int UART::available() {
148
148
int UART::peek () {
149
149
#if defined(SERIAL_CDC)
150
150
if (is_usb) {
151
- return SerialUSB .peek ();
151
+ return _SerialUSB .peek ();
152
152
}
153
153
#endif
154
154
return rx_buffer.peek ();
@@ -157,7 +157,7 @@ int UART::peek() {
157
157
int UART::read () {
158
158
#if defined(SERIAL_CDC)
159
159
if (is_usb) {
160
- return SerialUSB .read ();
160
+ return _SerialUSB .read ();
161
161
}
162
162
#endif
163
163
return rx_buffer.read_char ();
@@ -170,7 +170,7 @@ void UART::flush() {
170
170
size_t UART::write (uint8_t c) {
171
171
#if defined(SERIAL_CDC)
172
172
if (is_usb) {
173
- return SerialUSB .write (c);
173
+ return _SerialUSB .write (c);
174
174
}
175
175
#endif
176
176
while (!_serial->obj ->writeable ()) {}
@@ -181,7 +181,7 @@ size_t UART::write(uint8_t c) {
181
181
size_t UART::write (const uint8_t * c, size_t len) {
182
182
#if defined(SERIAL_CDC)
183
183
if (is_usb) {
184
- return SerialUSB .write (c, len);
184
+ return _SerialUSB .write (c, len);
185
185
}
186
186
#endif
187
187
while (!_serial->obj ->writeable ()) {}
@@ -197,7 +197,7 @@ void UART::block_tx(int _a) {
197
197
UART::operator bool () {
198
198
#if defined(SERIAL_CDC)
199
199
if (is_usb) {
200
- return SerialUSB ;
200
+ return _SerialUSB ;
201
201
}
202
202
#endif
203
203
return _serial != NULL && _serial->obj != NULL ;
@@ -206,37 +206,37 @@ UART::operator bool() {
206
206
#if defined(SERIAL_CDC)
207
207
uint32_t UART::baud () {
208
208
if (is_usb) {
209
- return SerialUSB .baud ();
209
+ return _SerialUSB .baud ();
210
210
}
211
211
return 0 ;
212
212
}
213
213
uint8_t UART::stopbits () {
214
214
if (is_usb) {
215
- return SerialUSB .stopbits ();
215
+ return _SerialUSB .stopbits ();
216
216
}
217
217
return 0 ;
218
218
}
219
219
uint8_t UART::paritytype () {
220
220
if (is_usb) {
221
- return SerialUSB .paritytype ();
221
+ return _SerialUSB .paritytype ();
222
222
}
223
223
return 0 ;
224
224
}
225
225
uint8_t UART::numbits () {
226
226
if (is_usb) {
227
- return SerialUSB .numbits ();
227
+ return _SerialUSB .numbits ();
228
228
}
229
229
return 0 ;
230
230
}
231
231
bool UART::dtr () {
232
232
if (is_usb) {
233
- return SerialUSB .dtr ();
233
+ return _SerialUSB .dtr ();
234
234
}
235
235
return false ;
236
236
}
237
237
bool UART::rts () {
238
238
if (is_usb) {
239
- return SerialUSB .rts ();
239
+ return _SerialUSB .rts ();
240
240
}
241
241
return false ;
242
242
}
0 commit comments