Initialize GPIOs with PIN defines

+ Support in MUX setup (not used thou)
This commit is contained in:
diijkstra
2026-02-01 14:32:54 +01:00
parent 48455a57b2
commit 620edc1ba3
2 changed files with 13 additions and 2 deletions
+8
View File
@@ -60,8 +60,16 @@ static void gpio_mux_setup(uint8_t pin)
reg_bit_set(RTL837X_PIN_MUX_1, 30);
break;
case GPIO37:
case GPIO38:
// Intentionally empty, always GPIO
break;
case GPIO46_I2C_SCL0:
// Bit 7-8 0b00 -> GPIO
reg_read_m(RTL837X_PIN_MUX_1);
sfr_mask_data(0, 0x80, 0x00);
sfr_mask_data(1, 0x01, 0x00);
reg_write_m(RTL837X_PIN_MUX_1);
break;
case GPIO50_I2C_SCL2_UART1_TX:
// Bit 15-16 0b00 -> GPIO
reg_read_m(RTL837X_PIN_MUX_1);