aboutsummaryrefslogtreecommitdiff
path: root/wirish/usb_serial.cpp
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2011-10-21 17:55:48 -0400
committerMarti Bolivar <mbolivar@leaflabs.com>2011-10-21 18:13:05 -0400
commit9be44ebd8602d7f13cc4b69fd4b6d695ddbc3865 (patch)
tree62314e93fba27aa33878e604b5d5f739bb7c61ab /wirish/usb_serial.cpp
parentd21d68fd36ba0ab1192f2707fbffdd6c778a4d9a (diff)
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/usb_serial.cpp')
-rw-r--r--wirish/usb_serial.cpp4
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) {