diff options
author | Ryan <[email protected]> | 2024-05-03 15:21:29 +1000 |
---|---|---|
committer | GitHub <[email protected]> | 2024-05-03 15:21:29 +1000 |
commit | d09a06a1b354760fd0e64a453abade972900e885 (patch) | |
tree | 88d94640f4507ac8d7f570607423825bec3c6f89 /keyboards/miiiw/common | |
parent | 5426a7a129acf2ff5c8b435014747f1238e17965 (diff) | |
download | qmk_firmware-d09a06a1b354760fd0e64a453abade972900e885.tar.gz qmk_firmware-d09a06a1b354760fd0e64a453abade972900e885.zip |
Update GPIO API usage in keyboard code (#23361)
Diffstat (limited to 'keyboards/miiiw/common')
-rw-r--r-- | keyboards/miiiw/common/shift_register.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/keyboards/miiiw/common/shift_register.c b/keyboards/miiiw/common/shift_register.c index 2c9259180e..5f82fc6442 100644 --- a/keyboards/miiiw/common/shift_register.c +++ b/keyboards/miiiw/common/shift_register.c @@ -23,30 +23,30 @@ static uint8_t shift_values[SHR_SERIES_NUM] = {0}; void shift_init(void) { #ifdef SHR_OE_PIN - setPinOutput(SHR_OE_PIN); - writePinHigh(SHR_OE_PIN); + gpio_set_pin_output(SHR_OE_PIN); + gpio_write_pin_high(SHR_OE_PIN); #endif - setPinOutput(SHR_DATA_PIN); - setPinOutput(SHR_LATCH_PIN); - setPinOutput(SHR_CLOCK_PIN); + gpio_set_pin_output(SHR_DATA_PIN); + gpio_set_pin_output(SHR_LATCH_PIN); + gpio_set_pin_output(SHR_CLOCK_PIN); } void shift_enable(void) { #ifdef SHR_OE_PIN - writePinLow(SHR_OE_PIN); + gpio_write_pin_low(SHR_OE_PIN); #endif - writePinLow(SHR_DATA_PIN); - writePinLow(SHR_LATCH_PIN); - writePinLow(SHR_CLOCK_PIN); + gpio_write_pin_low(SHR_DATA_PIN); + gpio_write_pin_low(SHR_LATCH_PIN); + gpio_write_pin_low(SHR_CLOCK_PIN); } void shift_disable(void) { #ifdef SHR_OE_PIN - writePinHigh(SHR_OE_PIN); + gpio_write_pin_high(SHR_OE_PIN); #endif - writePinLow(SHR_DATA_PIN); - writePinLow(SHR_LATCH_PIN); - writePinLow(SHR_CLOCK_PIN); + gpio_write_pin_low(SHR_DATA_PIN); + gpio_write_pin_low(SHR_LATCH_PIN); + gpio_write_pin_low(SHR_CLOCK_PIN); } void shift_writePin(pin_t pin, int level) { @@ -78,13 +78,13 @@ void shift_writeAll(int level) { static void shift_out(void) { uint8_t n = SHR_SERIES_NUM; - writePinLow(SHR_LATCH_PIN); + gpio_write_pin_low(SHR_LATCH_PIN); while(n--){ for (uint8_t i = 0; i < 8; i++) { - writePinLow(SHR_CLOCK_PIN); - writePin(SHR_DATA_PIN, shift_values[n] & (0x80 >> i)); - writePinHigh(SHR_CLOCK_PIN); + gpio_write_pin_low(SHR_CLOCK_PIN); + gpio_write_pin(SHR_DATA_PIN, shift_values[n] & (0x80 >> i)); + gpio_write_pin_high(SHR_CLOCK_PIN); } } - writePinHigh(SHR_LATCH_PIN); + gpio_write_pin_high(SHR_LATCH_PIN); } |