1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-11-29 10:24:12 +01:00

add weak setupUSB() hook

override this function to insert additional USB endpoints
This commit is contained in:
Martino Facchin 2015-06-05 17:51:44 +02:00 committed by Cristian Maglie
parent ec43b6c829
commit b2a6b61a2f

View File

@ -27,6 +27,9 @@ int atexit(void (* /*func*/ )()) { return 0; }
void initVariant() __attribute__((weak)); void initVariant() __attribute__((weak));
void initVariant() { } void initVariant() { }
void setupUSB() __attribute__((weak));
void setupUSB() { }
int main(void) int main(void)
{ {
init(); init();
@ -34,6 +37,7 @@ int main(void)
initVariant(); initVariant();
#if defined(USBCON) #if defined(USBCON)
setupUSB();
USBDevice.attach(); USBDevice.attach();
#endif #endif