diff options
author | Martino Facchin <m.facchin@arduino.cc> | 2015-06-05 17:51:44 +0200 |
---|---|---|
committer | Cristian Maglie <c.maglie@arduino.cc> | 2015-07-16 13:12:14 +0200 |
commit | afd126f96aa114ad9185233bfda9125303b790ee (patch) | |
tree | 56d6c9a96f07da90a30b9f683fdb45f204b440cd /cores/arduino/main.cpp | |
parent | 15edf1c6c8de089fb37e9a7e560d922fe62822c5 (diff) |
add weak setupUSB() hook
override this function to insert additional USB endpoints
Diffstat (limited to 'cores/arduino/main.cpp')
-rw-r--r-- | cores/arduino/main.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cores/arduino/main.cpp b/cores/arduino/main.cpp index 72074de..f4346ec 100644 --- a/cores/arduino/main.cpp +++ b/cores/arduino/main.cpp @@ -27,6 +27,9 @@ int atexit(void (* /*func*/ )()) { return 0; } void initVariant() __attribute__((weak)); void initVariant() { } +void setupUSB() __attribute__((weak)); +void setupUSB() { } + int main(void) { init(); @@ -34,6 +37,7 @@ int main(void) initVariant(); #if defined(USBCON) + setupUSB(); USBDevice.attach(); #endif |