Skip to content

Commit 648bf8d

Browse files
mstasiaknordicrlubos
authored andcommitted
[nrf fromlist] drivers: pinctrl: nrf: use HAL defines
Replaced MDK symbols with defines from HAL. Upstream PR #: 96855 Signed-off-by: Michał Stasiak <[email protected]>
1 parent bb32e70 commit 648bf8d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/pinctrl/pinctrl_nrf.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ BUILD_ASSERT(((NRF_PULL_NONE == NRF_GPIO_PIN_NOPULL) &&
1515
(NRF_PULL_UP == NRF_GPIO_PIN_PULLUP)),
1616
"nRF pinctrl pull settings do not match HAL values");
1717

18-
#if defined(GPIO_PIN_CNF_DRIVE_E0E1) || defined(GPIO_PIN_CNF_DRIVE0_E0)
18+
#if NRF_GPIO_HAS_DRIVE_EXTRA
1919
#define NRF_DRIVE_COUNT (NRF_DRIVE_E0E1 + 1)
2020
#else
2121
#define NRF_DRIVE_COUNT (NRF_DRIVE_H0D1 + 1)
@@ -29,7 +29,7 @@ static const nrf_gpio_pin_drive_t drive_modes[NRF_DRIVE_COUNT] = {
2929
[NRF_DRIVE_D0H1] = NRF_GPIO_PIN_D0H1,
3030
[NRF_DRIVE_S0D1] = NRF_GPIO_PIN_S0D1,
3131
[NRF_DRIVE_H0D1] = NRF_GPIO_PIN_H0D1,
32-
#if defined(GPIO_PIN_CNF_DRIVE_E0E1) || defined(GPIO_PIN_CNF_DRIVE0_E0)
32+
#if NRF_GPIO_HAS_DRIVE_EXTRA
3333
[NRF_DRIVE_E0E1] = NRF_GPIO_PIN_E0E1,
3434
#endif
3535
};
@@ -498,7 +498,7 @@ int pinctrl_configure_pins(const pinctrl_soc_pin_t *pins, uint8_t pin_cnt,
498498
#endif /* defined(NRF_PSEL_TDM) */
499499
#if defined(NRF_GRTC_CLKOUT_FAST)
500500
case NRF_FUN_GRTC_CLKOUT_FAST:
501-
#if NRF_GPIO_HAS_SEL && defined(GPIO_PIN_CNF_CTRLSEL_GRTC)
501+
#if NRF_GPIO_HAS_SEL && NRF_GPIO_HAS_CTRLSEL_GRTC
502502
nrf_gpio_pin_control_select(psel, NRF_GPIO_PIN_SEL_GRTC);
503503
#endif
504504
dir = NRF_GPIO_PIN_DIR_OUTPUT;
@@ -507,7 +507,7 @@ int pinctrl_configure_pins(const pinctrl_soc_pin_t *pins, uint8_t pin_cnt,
507507
#endif /* defined(NRF_GRTC_CLKOUT_FAST) */
508508
#if defined(NRF_GRTC_CLKOUT_SLOW)
509509
case NRF_FUN_GRTC_CLKOUT_32K:
510-
#if NRF_GPIO_HAS_SEL && defined(GPIO_PIN_CNF_CTRLSEL_GRTC)
510+
#if NRF_GPIO_HAS_SEL && NRF_GPIO_HAS_CTRLSEL_GRTC
511511
nrf_gpio_pin_control_select(psel, NRF_GPIO_PIN_SEL_GRTC);
512512
#endif
513513
dir = NRF_GPIO_PIN_DIR_OUTPUT;

0 commit comments

Comments
 (0)