mirror of
https://github.com/tbnobody/OpenDTU.git
synced 2026-01-03 19:33:47 +01:00
Allow Ethernet Pin Settings via json config
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user