Allow Ethernet Pin Settings via json config

This commit is contained in:
Thomas Basler
2023-01-16 22:26:35 +01:00
parent f60205829a
commit 3d3feb3517
5 changed files with 87 additions and 2 deletions

View File

@@ -3,6 +3,7 @@
#include <Arduino.h>
#include <stdint.h>
#include <ETH.h>
#define PINMAPPING_FILENAME "/pin_mapping.json"
@@ -16,6 +17,13 @@ struct PinMapping_t {
int8_t nrf24_irq;
int8_t nrf24_en;
int8_t nrf24_cs;
int8_t eth_phy_addr;
bool eth_enabled;
int eth_power;
int eth_mdc;
int eth_mdio;
eth_phy_type_t eth_type;
eth_clock_mode_t eth_clk_mode;
};
class PinMappingClass {
@@ -25,6 +33,7 @@ public:
PinMapping_t& get();
bool isValidNrf24Config();
bool isValidEthConfig();
private:
PinMapping_t _pinMapping;