Fix MY_CORE_ONLY: Initialize HW (#1070)
This commit is contained in:
@@ -388,7 +388,6 @@ MY_DEFAULT_RX_LED_PIN in your sketch instead to enable LEDs
|
||||
#include "core/MySensorsCore.cpp"
|
||||
|
||||
// HW mains
|
||||
#if !defined(MY_CORE_ONLY)
|
||||
#if defined(ARDUINO_ARCH_AVR)
|
||||
#include "hal/architecture/AVR/MyMainAVR.cpp"
|
||||
#elif defined(ARDUINO_ARCH_SAMD)
|
||||
@@ -404,7 +403,6 @@ MY_DEFAULT_RX_LED_PIN in your sketch instead to enable LEDs
|
||||
#elif defined(TEENSYDUINO)
|
||||
#include "hal/architecture/Teensy3/MyMainTeensy3.cpp"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -88,6 +88,14 @@ void _infiniteLoop(void)
|
||||
|
||||
void _begin(void)
|
||||
{
|
||||
#if defined(MY_CORE_ONLY)
|
||||
// initialize HW and run setup if present
|
||||
(void)hwInit();
|
||||
if (setup) {
|
||||
setup();
|
||||
}
|
||||
return;
|
||||
#endif
|
||||
// reset wdt
|
||||
hwWatchdogReset();
|
||||
|
||||
|
||||
@@ -439,9 +439,7 @@ void setup()
|
||||
hwRandomNumberInit();
|
||||
#endif
|
||||
|
||||
Serial.begin(MY_BAUD_RATE);
|
||||
while(!Serial); // For USB enabled devices, wait for USB enumeration before continuing
|
||||
hwInit();
|
||||
|
||||
print_greeting();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user