@@ -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,7 +206,7 @@ UART::operator bool() {
206
206
UART::operator mbed::FileHandle*() {
207
207
#if defined(SERIAL_CDC)
208
208
if (is_usb) {
209
- return &SerialUSB ;
209
+ return &_SerialUSB ;
210
210
}
211
211
#endif
212
212
}
@@ -215,37 +215,37 @@ UART::operator mbed::FileHandle*() {
215
215
#if defined(SERIAL_CDC)
216
216
uint32_t UART::baud () {
217
217
if (is_usb) {
218
- return SerialUSB .baud ();
218
+ return _SerialUSB .baud ();
219
219
}
220
220
return 0 ;
221
221
}
222
222
uint8_t UART::stopbits () {
223
223
if (is_usb) {
224
- return SerialUSB .stopbits ();
224
+ return _SerialUSB .stopbits ();
225
225
}
226
226
return 0 ;
227
227
}
228
228
uint8_t UART::paritytype () {
229
229
if (is_usb) {
230
- return SerialUSB .paritytype ();
230
+ return _SerialUSB .paritytype ();
231
231
}
232
232
return 0 ;
233
233
}
234
234
uint8_t UART::numbits () {
235
235
if (is_usb) {
236
- return SerialUSB .numbits ();
236
+ return _SerialUSB .numbits ();
237
237
}
238
238
return 0 ;
239
239
}
240
240
bool UART::dtr () {
241
241
if (is_usb) {
242
- return SerialUSB .dtr ();
242
+ return _SerialUSB .dtr ();
243
243
}
244
244
return false ;
245
245
}
246
246
bool UART::rts () {
247
247
if (is_usb) {
248
- return SerialUSB .rts ();
248
+ return _SerialUSB .rts ();
249
249
}
250
250
return false ;
251
251
}
0 commit comments