diff options
author | Ryan <fauxpark@gmail.com> | 2024-02-18 17:08:27 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-18 17:08:27 +1100 |
commit | 2d1aed78a67b3d2b002cc739ef087963b05b76b8 (patch) | |
tree | ea681d02e547332cffa6b7aec6c16ef37ad70ee3 /drivers/gpio | |
parent | 6810aaf0130113e267e20fb506d874cc858f5f67 (diff) |
Update GPIO macro usages in core (#23093)
Diffstat (limited to 'drivers/gpio')
-rw-r--r-- | drivers/gpio/sn74x138.c | 24 | ||||
-rw-r--r-- | drivers/gpio/sn74x154.c | 18 |
2 files changed, 21 insertions, 21 deletions
diff --git a/drivers/gpio/sn74x138.c b/drivers/gpio/sn74x138.c index 222e5db56c..1cf8e54f56 100644 --- a/drivers/gpio/sn74x138.c +++ b/drivers/gpio/sn74x138.c @@ -27,39 +27,39 @@ static const pin_t address_pins[ADDRESS_PIN_COUNT] = SN74X138_ADDRESS_PINS; void sn74x138_init(void) { for (int i = 0; i < ADDRESS_PIN_COUNT; i++) { - setPinOutput(address_pins[i]); - writePinLow(address_pins[i]); + gpio_set_pin_output(address_pins[i]); + gpio_write_pin_low(address_pins[i]); } #if defined(SN74X138_E1_PIN) - setPinOutput(SN74X138_E1_PIN); - writePinHigh(SN74X138_E1_PIN); + gpio_set_pin_output(SN74X138_E1_PIN); + gpio_write_pin_high(SN74X138_E1_PIN); #endif #if defined(SN74X138_E2_PIN) - setPinOutput(SN74X138_E2_PIN); - writePinHigh(SN74X138_E2_PIN); + gpio_set_pin_output(SN74X138_E2_PIN); + gpio_write_pin_high(SN74X138_E2_PIN); #endif #if defined(SN74X138_E3_PIN) - setPinOutput(SN74X138_E3_PIN); - writePinLow(SN74X138_E3_PIN); + gpio_set_pin_output(SN74X138_E3_PIN); + gpio_write_pin_low(SN74X138_E3_PIN); #endif } void sn74x138_set_enabled(bool enabled) { #if defined(SN74X138_E1_PIN) - writePin(SN74X138_E1_PIN, !enabled); + gpio_write_pin(SN74X138_E1_PIN, !enabled); #endif #if defined(SN74X138_E2_PIN) - writePin(SN74X138_E2_PIN, !enabled); + gpio_write_pin(SN74X138_E2_PIN, !enabled); #endif #if defined(SN74X138_E3_PIN) - writePin(SN74X138_E3_PIN, enabled); + gpio_write_pin(SN74X138_E3_PIN, enabled); #endif } void sn74x138_set_addr(uint8_t address) { for (int i = 0; i < ADDRESS_PIN_COUNT; i++) { - writePin(address_pins[i], address & (1 << i)); + gpio_write_pin(address_pins[i], address & (1 << i)); } } diff --git a/drivers/gpio/sn74x154.c b/drivers/gpio/sn74x154.c index 5f21f12b55..6226adf27e 100644 --- a/drivers/gpio/sn74x154.c +++ b/drivers/gpio/sn74x154.c @@ -27,32 +27,32 @@ static const pin_t address_pins[ADDRESS_PIN_COUNT] = SN74X154_ADDRESS_PINS; void sn74x154_init(void) { for (int i = 0; i < ADDRESS_PIN_COUNT; i++) { - setPinOutput(address_pins[i]); - writePinLow(address_pins[i]); + gpio_set_pin_output(address_pins[i]); + gpio_write_pin_low(address_pins[i]); } #if defined(SN74X154_E0_PIN) - setPinOutput(SN74X154_E0_PIN); - writePinHigh(SN74X154_E0_PIN); + gpio_set_pin_output(SN74X154_E0_PIN); + gpio_write_pin_high(SN74X154_E0_PIN); #endif #if defined(SN74X154_E1_PIN) - setPinOutput(SN74X154_E1_PIN); - writePinHigh(SN74X154_E1_PIN); + gpio_set_pin_output(SN74X154_E1_PIN); + gpio_write_pin_high(SN74X154_E1_PIN); #endif } void sn74x154_set_enabled(bool enabled) { #if defined(SN74X154_E0_PIN) - writePin(SN74X154_E0_PIN, !enabled); + gpio_write_pin(SN74X154_E0_PIN, !enabled); #endif #if defined(SN74X154_E1_PIN) - writePin(SN74X154_E1_PIN, !enabled); + gpio_write_pin(SN74X154_E1_PIN, !enabled); #endif } void sn74x154_set_addr(uint8_t address) { for (int i = 0; i < ADDRESS_PIN_COUNT; i++) { - writePin(address_pins[i], address & (1 << i)); + gpio_write_pin(address_pins[i], address & (1 << i)); } } |