-
-
Notifications
You must be signed in to change notification settings - Fork 814
Support for RAK ethernet module #1983
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Changes from all commits
70b51bd
aea64e1
ffe0853
3e9ceba
61ba799
88892de
eba2446
3c1a094
0ffe1c2
2a2c7a1
a3354db
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,13 +18,13 @@ static uint32_t _atoi(const char* sp) { | |
| #include <CustomLFS_QSPIFlash.h> | ||
| DataStore store(InternalFS, QSPIFlash, rtc_clock); | ||
| #else | ||
| #if defined(EXTRAFS) | ||
| #include <CustomLFS.h> | ||
| CustomLFS ExtraFS(0xD4000, 0x19000, 128); | ||
| DataStore store(InternalFS, ExtraFS, rtc_clock); | ||
| #else | ||
| DataStore store(InternalFS, rtc_clock); | ||
| #endif | ||
| #if defined(EXTRAFS) | ||
| #include <CustomLFS.h> | ||
| CustomLFS ExtraFS(0xD4000, 0x19000, 128); | ||
| DataStore store(InternalFS, ExtraFS, rtc_clock); | ||
| #else | ||
| DataStore store(InternalFS, rtc_clock); | ||
| #endif | ||
|
Comment on lines
+22
to
+27
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there still an indent issue here?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Everything appears properly intended in the full file view to me, with each #if/elif/else being intended by 2 spaces. |
||
| #endif | ||
| #elif defined(RP2040_PLATFORM) | ||
| #include <LittleFS.h> | ||
|
|
@@ -74,6 +74,9 @@ static uint32_t _atoi(const char* sp) { | |
| #ifdef BLE_PIN_CODE | ||
| #include <helpers/nrf52/SerialBLEInterface.h> | ||
| SerialBLEInterface serial_interface; | ||
| #elif defined(ETHERNET_ENABLED) | ||
| #include <helpers/nrf52/SerialEthernetInterface.h> | ||
| SerialEthernetInterface serial_interface; | ||
| #else | ||
| #include <helpers/ArduinoSerialInterface.h> | ||
| ArduinoSerialInterface serial_interface; | ||
|
|
@@ -107,7 +110,6 @@ void halt() { | |
|
|
||
| void setup() { | ||
| Serial.begin(115200); | ||
|
|
||
| board.begin(); | ||
|
|
||
| #ifdef DISPLAY_CLASS | ||
|
|
@@ -152,10 +154,23 @@ void setup() { | |
|
|
||
| #ifdef BLE_PIN_CODE | ||
| serial_interface.begin(BLE_NAME_PREFIX, the_mesh.getNodePrefs()->node_name, the_mesh.getBLEPin()); | ||
| the_mesh.startInterface(serial_interface); | ||
| #elif defined(ETHERNET_ENABLED) | ||
| Serial.print("Waiting for serial to connect...\n"); | ||
| unsigned long timeout = millis(); | ||
| while (!Serial) { | ||
| if ((millis() - timeout) < 5000) { delay(100); } else { break; } | ||
| } | ||
| Serial.println("Initializing Ethernet adapter..."); | ||
| if (serial_interface.begin()) { | ||
| the_mesh.startInterface(serial_interface); | ||
| } else { | ||
| Serial.println("ETH: Init failed, continuing without Ethernet (mesh only)"); | ||
| } | ||
| #else | ||
| serial_interface.begin(Serial); | ||
| #endif | ||
| the_mesh.startInterface(serial_interface); | ||
| #endif | ||
| #elif defined(RP2040_PLATFORM) | ||
| LittleFS.begin(); | ||
| store.begin(); | ||
|
|
@@ -229,4 +244,8 @@ void loop() { | |
| ui_task.loop(); | ||
| #endif | ||
| rtc_clock.tick(); | ||
|
|
||
| #ifdef ETHERNET_ENABLED | ||
| serial_interface.loop(); | ||
| #endif | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.