Skip to content

Commit 003c5e0

Browse files
committed
add USE_TINYUSB guard
1 parent 4fda2f2 commit 003c5e0

File tree

5 files changed

+18
-4
lines changed

5 files changed

+18
-4
lines changed

src/Adafruit_TinyUSB.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
* THE SOFTWARE.
2323
*/
2424

25-
#include "Adafruit_TinyUSB.h"
26-
2725
#ifdef USE_TINYUSB
2826

27+
#include "Adafruit_TinyUSB.h"
28+
2929
//--------------------------------------------------------------------+
3030
// MACRO TYPEDEF CONSTANT ENUM DECLARATION
3131
//--------------------------------------------------------------------+

src/Adafruit_USBD_HID.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
* THE SOFTWARE.
2323
*/
2424

25+
#ifdef USE_TINYUSB
26+
2527
#include "Adafruit_USBD_HID.h"
2628

2729
#define EPOUT 0x00
@@ -225,3 +227,5 @@ bool Adafruit_USBD_HID::mouseButtonPress(uint8_t report_id, uint8_t buttons) {
225227
bool Adafruit_USBD_HID::mouseButtonRelease(uint8_t report_id) {
226228
return tud_hid_mouse_report(report_id, 0, 0, 0, 0, 0);
227229
}
230+
231+
#endif

src/Adafruit_USBD_MIDI.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
* THE SOFTWARE.
2323
*/
2424

25+
#ifdef USE_TINYUSB
26+
2527
#include "Adafruit_USBD_MIDI.h"
2628

2729
#if CFG_TUD_MIDI
@@ -125,4 +127,5 @@ bool Adafruit_USBD_MIDI::readPacket(uint8_t packet[4]) {
125127
return tud_midi_packet_read(packet);
126128
}
127129

128-
#endif
130+
#endif // MIDI
131+
#endif // USE_TINYUSB

src/Adafruit_USBD_MSC.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
* THE SOFTWARE.
2323
*/
2424

25+
#ifdef USE_TINYUSB
26+
2527
#include "Adafruit_USBD_MSC.h"
2628

2729
#define EPOUT 0x00
@@ -216,3 +218,5 @@ void tud_msc_write10_complete_cb(uint8_t lun) {
216218
}
217219

218220
} // extern "C"
221+
222+
#endif // USE_TINYUSB

src/Adafruit_USBD_WebUSB.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
* THE SOFTWARE.
2323
*/
2424

25+
#ifdef USE_TINYUSB
26+
2527
#include "Adafruit_USBD_WebUSB.h"
2628
#include "Arduino.h"
2729

@@ -296,4 +298,5 @@ bool tud_vendor_control_complete_cb(uint8_t rhport,
296298
}
297299
}
298300

299-
#endif
301+
#endif // VENDOR
302+
#endif // USE_TINYUSB

0 commit comments

Comments
 (0)