From a9e628ac6fdd5ef1d775bc9e90c2475ef914b911 Mon Sep 17 00:00:00 2001 From: Marti Bolivar Date: Fri, 21 Oct 2011 17:55:48 -0400 Subject: 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 --- wirish/usb_serial.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'wirish') 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) { -- cgit v1.2.3