From 9520a531de0bd7269ed9566c1636611e748af83d Mon Sep 17 00:00:00 2001 From: Zach Eveland Date: Tue, 1 May 2012 11:18:15 -0400 Subject: [PATCH] renamed Leonardo USB_ class to USBDevice_ to be unambiguous. renamed "USB" object to "USBDevice" to prevent conflict with USB Host library (thanks Massimo) --- hardware/arduino/cores/arduino/USBAPI.h | 6 +++--- hardware/arduino/cores/arduino/USBCore.cpp | 12 ++++++------ hardware/arduino/cores/arduino/main.cpp | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) mode change 100755 => 100644 hardware/arduino/cores/arduino/main.cpp diff --git a/hardware/arduino/cores/arduino/USBAPI.h b/hardware/arduino/cores/arduino/USBAPI.h index f66cb16d2..1c2184533 100644 --- a/hardware/arduino/cores/arduino/USBAPI.h +++ b/hardware/arduino/cores/arduino/USBAPI.h @@ -9,17 +9,17 @@ //================================================================================ // USB -class USB_ +class USBDevice_ { public: - USB_(); + USBDevice_(); bool configured(); void attach(); void detach(); // Serial port goes down too... void poll(); }; -extern USB_ USB; +extern USBDevice_ USBDevice; //================================================================================ //================================================================================ diff --git a/hardware/arduino/cores/arduino/USBCore.cpp b/hardware/arduino/cores/arduino/USBCore.cpp index 9e89fd654..6766be61a 100644 --- a/hardware/arduino/cores/arduino/USBCore.cpp +++ b/hardware/arduino/cores/arduino/USBCore.cpp @@ -627,13 +627,13 @@ u8 USBConnected() //======================================================================= //======================================================================= -USB_ USB; +USBDevice_ USBDevice; -USB_::USB_() +USBDevice_::USBDevice_() { } -void USB_::attach() +void USBDevice_::attach() { _usbConfiguration = 0; UHWCON = 0x01; // power internal reg @@ -654,18 +654,18 @@ void USB_::attach() TX_RX_LED_INIT; } -void USB_::detach() +void USBDevice_::detach() { } // Check for interrupts // TODO: VBUS detection -bool USB_::configured() +bool USBDevice_::configured() { return _usbConfiguration; } -void USB_::poll() +void USBDevice_::poll() { } diff --git a/hardware/arduino/cores/arduino/main.cpp b/hardware/arduino/cores/arduino/main.cpp old mode 100755 new mode 100644 index 34450f46d..3d4e079d2 --- a/hardware/arduino/cores/arduino/main.cpp +++ b/hardware/arduino/cores/arduino/main.cpp @@ -5,7 +5,7 @@ int main(void) init(); #if defined(USBCON) - USB.attach(); + USBDevice.attach(); #endif setup();