Remove led behavior & LED comments

Should work without gpio_input_setup
This commit is contained in:
SkullyDev committed 2026-09-19 13:03:42 +03:00
1 parent 974052877d
commit c31b67572b
4 files changed
+13 -27

No files matched your search

+11 -9
View File
@@ -1234,25 +1234,27 @@ __code const struct machine machine = {
.max_port = 8,
.n_sfp = 0,
.n_10g = 2,
.sys_led_mode = SYS_LED_SLOW,
.log_to_phys_port = {0, 0, 0, 5, 1, 2, 3, 4, 6},
.phys_to_log_port = {4, 5, 6, 7, 3, 8, 0, 0, 0},
.is_sfp = {0, 0, 0, 0, 0, 0, 0, 0, 0},
.reset_pin = GPIO54_ACL_BIT2_EN,
.high_leds = { .mux = LED_28_SYS | LED_29, .enable = LED_28_SYS | LED_29 },
.port_led_set = { 0, 0, 0, 1, 0, 0, 0, 0, 1 },
/* Ports 1-4: Green: 2.5GBit, Orange: 10/100/1000MBit
* Ports 5-6: Green: 10GBit, Orange: 5/2.5GBit, None: 10/100/1000MBit
*/
.led_sets = {
{
LEDS_2G5 | LEDS_1G | LEDS_100M | LEDS_10M | LEDS_LINK | LEDS_ACT,
LEDS_2G5 | LEDS_LINK,
LEDS_1G | LEDS_100M | LEDS_10M | LEDS_LINK,
0,
LEDS_2G5 | LEDS_1G | LEDS_100M | LEDS_10M | LEDS_LINK | LEDS_ACT, // Yellow
LEDS_2G5 | LEDS_LINK, // Green
LEDS_1G | LEDS_100M | LEDS_10M | LEDS_LINK, // Orange
0, // Unused
},
{
LEDS_10G | LEDS_5G | LEDS_2G5 | LEDS_1G | LEDS_100M | LEDS_10M | LEDS_LINK | LEDS_ACT,
LEDS_10G | LEDS_LINK,
LEDS_5G | LEDS_2G5 | LEDS_LINK,
0,
LEDS_10G | LEDS_5G | LEDS_2G5 | LEDS_1G | LEDS_100M | LEDS_10M | LEDS_LINK | LEDS_ACT, // Yellow
LEDS_10G | LEDS_LINK, // Green
LEDS_5G | LEDS_2G5 | LEDS_LINK, // Orange
0, // Unused
},
},
.led_mux_custom = 1,
-1
View File
@@ -78,7 +78,6 @@ struct sfp_port
typedef struct machine {
char machine_name[30];
uint8_t isRTL8373;
uint8_t sys_led_mode;
// Lowest logical port number
uint8_t min_port;
// Highest logical port number
-7
View File
@@ -117,13 +117,6 @@ void machine_custom_init(void) __banked
REG_SET(RTL837X_REG_LED_GLB_IO_EN, 0x7624155b);
}
#elif defined MACHINE_HASIVO_S600W_4GT_2XGT_SE
void machine_custom_init(void) __banked
{
// For this device, the reset button triggers this input
gpio_input_setup(GPIO54_ACL_BIT2_EN);
}
#else
void machine_custom_init(void) __banked { }
#endif
+2 -10
View File
@@ -1141,11 +1141,7 @@ void handle_button(void)
else
{
print_string("Short button press detected; no action.\n");
if (machine.sys_led_mode) {
set_sys_led_state(machine.sys_led_mode);
} else {
set_sys_led_state(SYS_LED_ON);
}
set_sys_led_state(SYS_LED_ON);
}
}
else
@@ -1751,11 +1747,7 @@ void main(void)
print_cmd_prompt();
idle_ready = 1;
if (machine.sys_led_mode) {
set_sys_led_state(machine.sys_led_mode);
} else {
set_sys_led_state(SYS_LED_ON);
}
set_sys_led_state(SYS_LED_ON);
cmd_editor_init();