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() __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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user