Add LED configuration in machine profile

This commit is contained in:
logicog
2026-02-01 22:15:12 +01:00
parent ea23dfedc5
commit 5b385385de
2 changed files with 85 additions and 4 deletions
+17 -2
View File
@@ -8,10 +8,10 @@
*/
// #define MACHINE_KP_9000_6XHML_X2
// #define MACHINE_KP_9000_6XH_X
// #define MACHINE_KP_9000_9XH_X_EU
#define MACHINE_KP_9000_9XH_X_EU
// #define MACHINE_SWGT024_V2_0
// #define MACHINE_HORACO_ZX_SG4T2
#define MACHINE_HG0402XG_V1_1
// #define MACHINE_HG0402XG_V1_1
// #define DEFAULT_8C_1SFP
// #define DEFAULT_5C_1SFP
@@ -22,6 +22,18 @@ typedef struct {
uint8_t scl;
} i2c_bus_t;
#define LED_27 1
#define LED_28 2
#define LED_29 4
struct high_leds {
// Defines MUX and LED enabling for pins 27-29
uint8_t mux : 3;
uint8_t enable : 3;
uint8_t reserved : 2;
};
struct sfp_port
{
uint8_t pin_detect; // gpio number 0-63, 0xFF = don't have it?
@@ -43,6 +55,9 @@ typedef struct machine {
// sfp_port[0] is the first SFP-port from the left on the device, sfp_port[1] the next if present
struct sfp_port sfp_port[2];
int8_t reset_pin;
struct high_leds high_leds;
uint8_t port_led_set[9];
uint32_t led_sets[4][4];
};
typedef struct machine_runtime