diff options
author | Marti Bolivar <mbolivar@leaflabs.com> | 2011-10-21 17:55:48 -0400 |
---|---|---|
committer | Marti Bolivar <mbolivar@leaflabs.com> | 2011-10-21 18:13:05 -0400 |
commit | a9e628ac6fdd5ef1d775bc9e90c2475ef914b911 (patch) | |
tree | 62314e93fba27aa33878e604b5d5f739bb7c61ab /wirish | |
parent | 1e51e683e3321256c07c146bdd0e3d246be31c34 (diff) | |
download | librambutan-a9e628ac6fdd5ef1d775bc9e90c2475ef914b911.tar.gz librambutan-a9e628ac6fdd5ef1d775bc9e90c2475ef914b911.zip |
USB: API cleanups.
Modify usb.h functions (changing their names in some cases) to also
take a usblib_dev* argument, to fit in better with the rest of
libmaple.
Store an rcc_clk_id in struct usblib_dev for the same reason.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
Diffstat (limited to 'wirish')
-rw-r--r-- | wirish/usb_serial.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/wirish/usb_serial.cpp b/wirish/usb_serial.cpp index ccca4b4..b66b992 100644 --- a/wirish/usb_serial.cpp +++ b/wirish/usb_serial.cpp @@ -57,7 +57,7 @@ void USBSerial::write(const char *str) { } void USBSerial::write(const void *buf, uint32 len) { - if (!(usbIsConnected() && usbIsConfigured()) || !buf) { + if (!this->isConnected() || !buf) { return; } @@ -103,7 +103,7 @@ uint8 USBSerial::pending(void) { } uint8 USBSerial::isConnected(void) { - return usbIsConnected() && usbIsConfigured(); + return usb_is_connected(USBLIB) && usb_is_configured(USBLIB); } uint8 USBSerial::getDTR(void) { |