Skip to content

Commit 4224cac

Browse files
committed
rename USBDevice to TinyUSBDevice to avoid name conflict
USBDevice is alias for compatible when USE_TINYUSB is defined
1 parent c9c66d6 commit 4224cac

File tree

22 files changed

+45
-39
lines changed

22 files changed

+45
-39
lines changed

examples/Composite/hid_generic_inout_ramdisk/hid_generic_inout_ramdisk.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ void setup()
6868
usb_hid.begin();
6969

7070
Serial.begin(115200);
71-
Serial.println("Waiting for USBDevice mount");
71+
Serial.println("Waiting for TinyUSBDevice mount");
7272
// wait until device mounted
73-
while( !USBDevice.mounted() ) delay(1);
73+
while( !TinyUSBDevice.mounted() ) delay(1);
7474

7575
Serial.println("Adafruit TinyUSB HID Generic In Out example");
7676
}

examples/Composite/mouse_external_flash/mouse_external_flash.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ void loop()
114114
uint32_t const btn = (digitalRead(pin) == activeState);
115115

116116
// Remote wakeup
117-
if ( USBDevice.suspended() && btn )
117+
if ( TinyUSBDevice.suspended() && btn )
118118
{
119119
// Wake up host if we are in suspend mode
120120
// and REMOTE_WAKEUP feature is enabled by host

examples/Composite/mouse_ramdisk/mouse_ramdisk.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ void setup()
6666
usb_hid.begin();
6767

6868
Serial.begin(115200);
69-
while( !USBDevice.mounted() ) delay(1); // wait for native usb
69+
while( !TinyUSBDevice.mounted() ) delay(1); // wait for native usb
7070

7171
Serial.println("Adafruit TinyUSB Mouse + Mass Storage (ramdisk) example");
7272
}
@@ -80,7 +80,7 @@ void loop()
8080
uint32_t const btn = (digitalRead(pin) == activeState);
8181

8282
// Remote wakeup
83-
if ( USBDevice.suspended() && btn )
83+
if ( TinyUSBDevice.suspended() && btn )
8484
{
8585
// Wake up host if we are in suspend mode
8686
// and REMOTE_WAKEUP feature is enabled by host

examples/HID/hid_composite/hid_composite.ino

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ void setup()
6666
Serial.println("Adafruit TinyUSB HID Composite example");
6767

6868
// wait until device mounted
69-
while( !USBDevice.mounted() ) delay(1);
69+
while( !TinyUSBDevice.mounted() ) delay(1);
7070
}
7171

7272
void loop()
@@ -78,11 +78,11 @@ void loop()
7878
bool btn_pressed = (digitalRead(pin) == activeState);
7979

8080
// Remote wakeup
81-
if ( USBDevice.suspended() && btn_pressed )
81+
if ( TinyUSBDevice.suspended() && btn_pressed )
8282
{
8383
// Wake up host if we are in suspend mode
8484
// and REMOTE_WAKEUP feature is enabled by host
85-
USBDevice.remoteWakeup();
85+
TinyUSBDevice.remoteWakeup();
8686
}
8787

8888
/*------------- Mouse -------------*/

examples/HID/hid_composite_joy_featherwing/hid_composite_joy_featherwing.ino

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ void setup()
7777
last_x = ss.analogRead(3);
7878

7979
// wait until device mounted
80-
while( !USBDevice.mounted() ) delay(1);
80+
while( !TinyUSBDevice.mounted() ) delay(1);
8181
}
8282

8383
void loop()
@@ -145,10 +145,10 @@ void loop()
145145

146146
/*------------- Remote Wakeup -------------*/
147147
// Remote wakeup if PC is suspended and we has user interaction with joy feather wing
148-
if ( has_action && USBDevice.suspended() )
148+
if ( has_action && TinyUSBDevice.suspended() )
149149
{
150150
// Wake up only works if REMOTE_WAKEUP feature is enable by host
151151
// Usually this is the case with Mouse/Keyboard device
152-
USBDevice.remoteWakeup();
152+
TinyUSBDevice.remoteWakeup();
153153
}
154154
}

examples/HID/hid_gamepad/hid_gamepad.ino

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,19 +44,19 @@ void setup()
4444
usb_hid.begin();
4545

4646
// wait until device mounted
47-
while( !USBDevice.mounted() ) delay(1);
47+
while( !TinyUSBDevice.mounted() ) delay(1);
4848

4949
Serial.println("Adafruit TinyUSB HID Gamepad example");
5050
}
5151

5252
void loop()
5353
{
5454
// // Remote wakeup
55-
// if ( USBDevice.suspended() && btn )
55+
// if ( TinyUSBDevice.suspended() && btn )
5656
// {
5757
// // Wake up host if we are in suspend mode
5858
// // and REMOTE_WAKEUP feature is enabled by host
59-
// USBDevice.remoteWakeup();
59+
// TinyUSBDevice.remoteWakeup();
6060
// }
6161

6262
if ( !usb_hid.ready() ) return;

examples/HID/hid_generic_inout/hid_generic_inout.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ void setup()
5252
Serial.begin(115200);
5353

5454
// wait until device mounted
55-
while( !USBDevice.mounted() ) delay(1);
55+
while( !TinyUSBDevice.mounted() ) delay(1);
5656

5757
Serial.println("Adafruit TinyUSB HID Generic In Out example");
5858
}

examples/HID/hid_keyboard/hid_keyboard.ino

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ void setup()
5858
}
5959

6060
// wait until device mounted
61-
while( !USBDevice.mounted() ) delay(1);
61+
while( !TinyUSBDevice.mounted() ) delay(1);
6262
}
6363

6464

@@ -68,11 +68,11 @@ void loop()
6868
delay(2);
6969

7070
// // Remote wakeup
71-
// if ( USBDevice.suspended() && btn )
71+
// if ( TinyUSBDevice.suspended() && btn )
7272
// {
7373
// // Wake up host if we are in suspend mode
7474
// // and REMOTE_WAKEUP feature is enabled by host
75-
// USBDevice.remoteWakeup();
75+
// TinyUSBDevice.remoteWakeup();
7676
// }
7777

7878
if ( !usb_hid.ready() ) return;

examples/HID/hid_mouse/hid_mouse.ino

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ void setup()
5555
Serial.begin(115200);
5656

5757
// wait until device mounted
58-
while( !USBDevice.mounted() ) delay(1);
58+
while( !TinyUSBDevice.mounted() ) delay(1);
5959

6060
Serial.println("Adafruit TinyUSB HID Mouse example");
6161
}
@@ -72,11 +72,11 @@ void loop()
7272
if (!btn_pressed) return;
7373

7474
// Remote wakeup
75-
if ( USBDevice.suspended() )
75+
if ( TinyUSBDevice.suspended() )
7676
{
7777
// Wake up host if we are in suspend mode
7878
// and REMOTE_WAKEUP feature is enabled by host
79-
USBDevice.remoteWakeup();
79+
TinyUSBDevice.remoteWakeup();
8080
}
8181

8282
if ( usb_hid.ready() )

examples/MIDI/midi_pizza_box_dj/midi_pizza_box_dj.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ void setup() {
9494
for(uint8_t i=0; i<FRAMES; i++) lvl[i] = 256;
9595

9696
// Wait until device is enumerated properly before sending MIDI message
97-
while( !USBDevice.mounted() ) delay(1);
97+
while( !TinyUSBDevice.mounted() ) delay(1);
9898
}
9999

100100
///////////////////////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)