mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-08-30 14:52:51 +08:00
PIN module
Added GPIO defines, moved GPIO MUX initialization to new module. Converted if/else to switch in GPIO initialization.
This commit is contained in:
@@ -16,13 +16,11 @@
|
||||
|
||||
// #define DEFAULT_5C_1SFP
|
||||
|
||||
struct i2c_bus {
|
||||
// These are I2C bus identifiers refer to GPIO MUX document
|
||||
// for GPIO pin assignments for given bus numbers
|
||||
uint8_t sda : 3; // SDA pin number 0-4
|
||||
uint8_t scl : 3; // SCL pin number 0-3
|
||||
uint8_t reserved : 2;
|
||||
};
|
||||
typedef struct {
|
||||
// GPIO pins for SDA/SCL
|
||||
uint8_t sda;
|
||||
uint8_t scl;
|
||||
} i2c_bus_t;
|
||||
|
||||
struct sfp_port
|
||||
{
|
||||
@@ -30,7 +28,7 @@ struct sfp_port
|
||||
uint8_t pin_los; // gpio number 0-63, 0xFF = don't have it?
|
||||
uint8_t pin_tx_disable; // gpio number 0-63, 0xFF = not present
|
||||
uint8_t sds;
|
||||
struct i2c_bus i2c_bus;
|
||||
i2c_bus_t i2c;
|
||||
};
|
||||
|
||||
typedef struct machine {
|
||||
|
||||
Reference in New Issue
Block a user