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/usb2422.c | |
| parent | 6810aaf0130113e267e20fb506d874cc858f5f67 (diff) | |
Update GPIO macro usages in core (#23093)
Diffstat (limited to 'drivers/usb2422.c')
| -rw-r--r-- | drivers/usb2422.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/usb2422.c b/drivers/usb2422.c index 1d33b5acf8..de0e399f87 100644 --- a/drivers/usb2422.c +++ b/drivers/usb2422.c | |||
| @@ -346,10 +346,10 @@ static void USB2422_write_block(void) { | |||
| 346 | 346 | ||
| 347 | void USB2422_init(void) { | 347 | void USB2422_init(void) { |
| 348 | #ifdef USB2422_RESET_PIN | 348 | #ifdef USB2422_RESET_PIN |
| 349 | setPinOutput(USB2422_RESET_PIN); | 349 | gpio_set_pin_output(USB2422_RESET_PIN); |
| 350 | #endif | 350 | #endif |
| 351 | #ifdef USB2422_ACTIVE_PIN | 351 | #ifdef USB2422_ACTIVE_PIN |
| 352 | setPinInput(USB2422_ACTIVE_PIN); | 352 | gpio_set_pin_input(USB2422_ACTIVE_PIN); |
| 353 | #endif | 353 | #endif |
| 354 | 354 | ||
| 355 | i2c_init(); // IC2 clk must be high at USB2422 reset release time to signal SMB configuration | 355 | i2c_init(); // IC2 clk must be high at USB2422 reset release time to signal SMB configuration |
| @@ -387,15 +387,15 @@ void USB2422_configure(void) { | |||
| 387 | 387 | ||
| 388 | void USB2422_reset(void) { | 388 | void USB2422_reset(void) { |
| 389 | #ifdef USB2422_RESET_PIN | 389 | #ifdef USB2422_RESET_PIN |
| 390 | writePinLow(USB2422_RESET_PIN); | 390 | gpio_write_pin_low(USB2422_RESET_PIN); |
| 391 | wait_us(2); | 391 | wait_us(2); |
| 392 | writePinHigh(USB2422_RESET_PIN); | 392 | gpio_write_pin_high(USB2422_RESET_PIN); |
| 393 | #endif | 393 | #endif |
| 394 | } | 394 | } |
| 395 | 395 | ||
| 396 | bool USB2422_active(void) { | 396 | bool USB2422_active(void) { |
| 397 | #ifdef USB2422_ACTIVE_PIN | 397 | #ifdef USB2422_ACTIVE_PIN |
| 398 | return readPin(USB2422_ACTIVE_PIN); | 398 | return gpio_read_pin(USB2422_ACTIVE_PIN); |
| 399 | #else | 399 | #else |
| 400 | return 1; | 400 | return 1; |
| 401 | #endif | 401 | #endif |
