Skip to content

Commit

Permalink
Fix compilation for SAMD cores based on ArduinoCore-API (#97)
Browse files Browse the repository at this point in the history
Co-authored-by: Martino Facchin <[email protected]>
  • Loading branch information
tigoe and facchinm authored Oct 4, 2022
1 parent 407600f commit 486b7e8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions library/WebUSB/WebUSB.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@
#include <stdint.h>
#include <Arduino.h>
#ifdef ARDUINO_ARCH_SAMD
#ifdef ARDUINO_API_VERSION
#include "api/PluggableUSB.h"
#else
#include "USB/PluggableUSB.h"
#endif
#else
#include "PluggableUSB.h"
#include <avr/wdt.h>
Expand Down Expand Up @@ -124,7 +128,11 @@ class WebUSB : public PluggableUSBModule, public Stream
bool VendorControlRequest(USBSetup& setup);

#ifdef ARDUINO_ARCH_SAMD
#ifdef ARDUINO_API_VERSION
unsigned int epType[2];
#else
uint32_t epType[2];
#endif
#else
uint8_t epType[2];
#endif
Expand Down

0 comments on commit 486b7e8

Please sign in to comment.