Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: FATFileSystem mbed-rtos
Fork of USBHost by
Diff: USBHostSerial/USBHostSerial.h
- Revision:
- 4:b320d68e98e7
- Parent:
- 3:0f5c32575eb8
- Child:
- 7:e7e63ac7ae5f
--- a/USBHostSerial/USBHostSerial.h Wed Mar 06 17:50:07 2013 +0000
+++ b/USBHostSerial/USBHostSerial.h Tue Mar 12 17:23:37 2013 +0000
@@ -41,6 +41,14 @@
RxIrq,
TxIrq
};
+
+ enum Parity {
+ None = 0,
+ Odd,
+ Even,
+ Mark,
+ Space
+ };
/**
* Check if a virtual serial port is connected
@@ -95,6 +103,9 @@
}
}
}
+
+ void baud(int baudrate);
+ void format(int bits = 8, Parity parity = USBHostSerial::None, int stop_bits = 1);
protected:
@@ -122,6 +133,15 @@
uint8_t buf[64];
+ typedef __packed struct {
+ uint32_t baudrate;
+ uint8_t stop_bits;
+ uint8_t parity;
+ uint8_t data_bits;
+ } LINE_CODING;
+
+ LINE_CODING line_coding;
+
void rxHandler();
void txHandler();
FunctionPointer rx;
@@ -135,4 +155,3 @@
#endif
#endif
-
