Skip to content

Commit a0266b7

Browse files
committed
add weak setupUSB() hook
override this function to insert additional USB endpoints
1 parent 4529bd5 commit a0266b7

File tree

1 file changed

+4
-0
lines changed
  • hardware/arduino/avr/cores/arduino

1 file changed

+4
-0
lines changed

hardware/arduino/avr/cores/arduino/main.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,17 @@ int atexit(void (* /*func*/ )()) { return 0; }
2727
void initVariant() __attribute__((weak));
2828
void initVariant() { }
2929

30+
void setupUSB() __attribute__((weak));
31+
void setupUSB() { }
32+
3033
int main(void)
3134
{
3235
init();
3336

3437
initVariant();
3538

3639
#if defined(USBCON)
40+
setupUSB();
3741
USBDevice.attach();
3842
#endif
3943

0 commit comments

Comments
 (0)