Allow initVariant()

parent 118afd0f
......@@ -24,11 +24,18 @@
extern void setup();
extern void loop();
// Weak empty variant initialization. May be redefined by variant files.
void initVariant() __attribute__((weak));
void initVariant() { }
extern "C" int main() {
#if F_CPU != 125000000
set_sys_clock_khz(F_CPU / 1000, true);
#endif
initVariant();
#ifndef DISABLE_USB_SERIAL
// Enable serial port for reset/upload always
Serial.begin();
......@@ -37,6 +44,7 @@ extern "C" int main() {
#if defined DEBUG_RP2040_PORT
DEBUG_RP2040_PORT.begin();
#endif
setup();
while (1) {
loop();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment