Fixed to make SWGT024 V2.0 work

This commit is contained in:
René van Dorst
2025-12-13 22:22:40 +01:00
committed by logicog
parent 28f832a24d
commit 11d2c843e5
2 changed files with 10 additions and 9 deletions
+9 -8
View File
@@ -60,14 +60,15 @@ __code const struct machine machine = {
.log_to_phys_port = {0, 0, 0, 6, 1, 2, 3, 4, 5}, .log_to_phys_port = {0, 0, 0, 6, 1, 2, 3, 4, 5},
.phys_to_log_port = {4, 6, 5, 7, 3, 8, 0, 0, 0}, .phys_to_log_port = {4, 6, 5, 7, 3, 8, 0, 0, 0},
.is_sfp= {0, 0, 0, 2, 0, 0, 0, 0, 1}, .is_sfp= {0, 0, 0, 2, 0, 0, 0, 0, 1},
.sfp_port[0].pin_detect = 1, .sfp_port[0].pin_detect = 30,
.sfp_port[0].pin_los = 58, .sfp_port[0].pin_los = 37,
.sfp_port[0].sds = 1, .sfp_port[0].sds = 0,
.sfp_port[0].i2c = 1, .sfp_port[0].i2c = 0,
.sfp_port[1].pin_detect = 45, .sfp_port[1].pin_detect = 50,
.sfp_port[1].pin_los = 21, .sfp_port[1].pin_los = 51,
.sfp_port[1].sds = 0, .sfp_port[1].sds = 1,
.sfp_port[1].i2c = 0, .sfp_port[1].i2c = 1,
.reset_pin = 36,
}; };
#elif defined DEFAULT_8C_1SFP #elif defined DEFAULT_8C_1SFP
__code const struct machine machine = { __code const struct machine machine = {
+1 -1
View File
@@ -916,7 +916,7 @@ void sfp_print_info(uint8_t sfp)
bool gpio_pin_test(uint8_t pin) bool gpio_pin_test(uint8_t pin)
{ {
reg_read_m(RTL837X_REG_GPIO_00_31_INPUT + (pin > 31 ? 4 : 0)); reg_read_m(RTL837X_REG_GPIO_00_31_INPUT + (pin > 31 ? 4 : 0));
return sfr_data[(pin >> 3) & 3] & (1 << (7 - (pin & 7))); return sfr_data[3-((pin >> 3) & 3)] & (1 << (pin & 7));
} }