mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-10-29 17:54:14 +08:00
Remove led behavior & LED comments
Should work without gpio_input_setup
This commit is contained in:
1 parent
974052877d
commit
c31b67572b
4 files changed
+13
-27
No files matched your search
@@ -1234,25 +1234,27 @@ __code const struct machine machine = {
|
|||||||
.max_port = 8,
|
.max_port = 8,
|
||||||
.n_sfp = 0,
|
.n_sfp = 0,
|
||||||
.n_10g = 2,
|
.n_10g = 2,
|
||||||
.sys_led_mode = SYS_LED_SLOW,
|
|
||||||
.log_to_phys_port = {0, 0, 0, 5, 1, 2, 3, 4, 6},
|
.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},
|
.phys_to_log_port = {4, 5, 6, 7, 3, 8, 0, 0, 0},
|
||||||
.is_sfp = {0, 0, 0, 0, 0, 0, 0, 0, 0},
|
.is_sfp = {0, 0, 0, 0, 0, 0, 0, 0, 0},
|
||||||
.reset_pin = GPIO54_ACL_BIT2_EN,
|
.reset_pin = GPIO54_ACL_BIT2_EN,
|
||||||
.high_leds = { .mux = LED_28_SYS | LED_29, .enable = LED_28_SYS | LED_29 },
|
.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 },
|
.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 = {
|
.led_sets = {
|
||||||
{
|
{
|
||||||
LEDS_2G5 | LEDS_1G | LEDS_100M | LEDS_10M | LEDS_LINK | LEDS_ACT,
|
LEDS_2G5 | LEDS_1G | LEDS_100M | LEDS_10M | LEDS_LINK | LEDS_ACT, // Yellow
|
||||||
LEDS_2G5 | LEDS_LINK,
|
LEDS_2G5 | LEDS_LINK, // Green
|
||||||
LEDS_1G | LEDS_100M | LEDS_10M | LEDS_LINK,
|
LEDS_1G | LEDS_100M | LEDS_10M | LEDS_LINK, // Orange
|
||||||
0,
|
0, // Unused
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
LEDS_10G | LEDS_5G | LEDS_2G5 | LEDS_1G | LEDS_100M | LEDS_10M | LEDS_LINK | LEDS_ACT,
|
LEDS_10G | LEDS_5G | LEDS_2G5 | LEDS_1G | LEDS_100M | LEDS_10M | LEDS_LINK | LEDS_ACT, // Yellow
|
||||||
LEDS_10G | LEDS_LINK,
|
LEDS_10G | LEDS_LINK, // Green
|
||||||
LEDS_5G | LEDS_2G5 | LEDS_LINK,
|
LEDS_5G | LEDS_2G5 | LEDS_LINK, // Orange
|
||||||
0,
|
0, // Unused
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
.led_mux_custom = 1,
|
.led_mux_custom = 1,
|
||||||
|
|||||||
@@ -78,7 +78,6 @@ struct sfp_port
|
|||||||
typedef struct machine {
|
typedef struct machine {
|
||||||
char machine_name[30];
|
char machine_name[30];
|
||||||
uint8_t isRTL8373;
|
uint8_t isRTL8373;
|
||||||
uint8_t sys_led_mode;
|
|
||||||
// Lowest logical port number
|
// Lowest logical port number
|
||||||
uint8_t min_port;
|
uint8_t min_port;
|
||||||
// Highest logical port number
|
// Highest logical port number
|
||||||
|
|||||||
@@ -117,13 +117,6 @@ void machine_custom_init(void) __banked
|
|||||||
REG_SET(RTL837X_REG_LED_GLB_IO_EN, 0x7624155b);
|
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
|
#else
|
||||||
void machine_custom_init(void) __banked { }
|
void machine_custom_init(void) __banked { }
|
||||||
#endif
|
#endif
|
||||||
+2
-10
@@ -1141,11 +1141,7 @@ void handle_button(void)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
print_string("Short button press detected; no action.\n");
|
print_string("Short button press detected; no action.\n");
|
||||||
if (machine.sys_led_mode) {
|
set_sys_led_state(SYS_LED_ON);
|
||||||
set_sys_led_state(machine.sys_led_mode);
|
|
||||||
} else {
|
|
||||||
set_sys_led_state(SYS_LED_ON);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -1751,11 +1747,7 @@ void main(void)
|
|||||||
print_cmd_prompt();
|
print_cmd_prompt();
|
||||||
idle_ready = 1;
|
idle_ready = 1;
|
||||||
|
|
||||||
if (machine.sys_led_mode) {
|
set_sys_led_state(SYS_LED_ON);
|
||||||
set_sys_led_state(machine.sys_led_mode);
|
|
||||||
} else {
|
|
||||||
set_sys_led_state(SYS_LED_ON);
|
|
||||||
}
|
|
||||||
|
|
||||||
cmd_editor_init();
|
cmd_editor_init();
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user