From afd126f96aa114ad9185233bfda9125303b790ee Mon Sep 17 00:00:00 2001 From: Martino Facchin Date: Fri, 5 Jun 2015 17:51:44 +0200 Subject: add weak setupUSB() hook override this function to insert additional USB endpoints --- cores/arduino/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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 -- cgit v1.2.3-18-g5258