Soure: https://github.com/arduino/ArduinoCore-avr/blob/master/cores/arduino/main.cpp
#include <Arduino.h> |
// Declared weak in Arduino.h to allow user redefinitions. |
int atexit(void (* /*func*/ )()) { return 0; } |
// Weak empty variant initialization function. |
// May be redefined by variant files. |
void initVariant() __attribute__((weak)); |
void initVariant() { } |
void setupUSB() __attribute__((weak)); |
void setupUSB() { } |
int main(void) |
{ |
init(); |
initVariant(); |
#if defined(USBCON) |
USBDevice.attach(); |
#endif |
setup(); |
for (;;) { |
loop(); |
if (serialEventRun) serialEventRun(); |
} |
return 0; |
Không có nhận xét nào:
Đăng nhận xét