fix(machine): move SWTG024AS-specific SDS0 setup to machine.c

This commit is contained in:
Lynn-Becky
2026-06-28 22:47:33 +08:00
parent 17d41b53b7
commit 0a18c64dcc
2 changed files with 11 additions and 10 deletions
+11
View File
@@ -941,10 +941,21 @@ __code const struct machine machine = {
void machine_custom_init(void)
{
uint16_t pval;
reg_bit_set(RTL837X_REG_LED_GLB_IO_EN, 6);
reg_bit_set(RTL837X_REG_LED_MODE, 17);
reg_bit_clear(RTL837X_REG_LED_MODE, 9);
reg_bit_clear(RTL837X_REG_LED_MODE, 7);
// OEM firmware sets these companion SDS0 polarity bits for the RTL8221B.
sds_read(0, 0, 0);
pval = SFR_DATA_U16;
sds_write_v(0, 0, 0, pval | 0x100);
sds_read(0, 6, 2);
pval = SFR_DATA_U16;
sds_write_v(0, 6, 2, pval | 0x4000);
}
#elif defined MACHINE_ZX310S_4T2XT