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:
parent
ec43b6c829
commit
b2a6b61a2f
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user