diff --git a/driver/src/hw3/gpio_mtx.c b/driver/src/hw3/gpio_mtx.c index 59482c6..ccf68c0 100644 --- a/driver/src/hw3/gpio_mtx.c +++ b/driver/src/hw3/gpio_mtx.c @@ -97,7 +97,8 @@ void IRAM_ATTR gpio_pin_wpd(uint32_t pin, uint32_t val) PIN_RF_WRITE_REG(offset, tmp); } -void gpio_pin_iinv(uint32_t pin, uint32_t val) +// val 为1时启用输入反转 +void gpio_pin_iinv(uint32_t pin , uint32_t val) { uint32_t tmp; uint32_t offset; @@ -108,6 +109,7 @@ void gpio_pin_iinv(uint32_t pin, uint32_t val) PIN_RF_WRITE_REG(offset, tmp); } +// val 为1时启用输出反转 void gpio_pin_oinv(uint32_t pin, uint32_t val) { uint32_t tmp; @@ -119,7 +121,6 @@ void gpio_pin_oinv(uint32_t pin, uint32_t val) PIN_RF_WRITE_REG(offset, tmp); } -static_printf_def(0x10001b9e) void gpio_pin_select(uint32_t pin , uint32_t func) { @@ -131,7 +132,6 @@ void gpio_pin_select(uint32_t pin , uint32_t func) tmp = PIN_RF_READ_REG(offset); REG_FIELD_SET(GPIO_FUNC_SEL, tmp, func); PIN_RF_WRITE_REG(offset , tmp); - sbl_printf("gpio pin=%d , fun=%d\n" , pin , func); } uint8_t gpio_pin_get_select(uint32_t pin)