Skip to content

Commit ccef0cf

Browse files
mstasiaknordiccfriedt
authored andcommitted
drivers: pinctrl: nrf: use HAL defines
Replaced MDK symbols with defines from HAL. Signed-off-by: Michał Stasiak <[email protected]>
1 parent f5a783c commit ccef0cf

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
};
@@ -494,7 +494,7 @@ int pinctrl_configure_pins(const pinctrl_soc_pin_t *pins, uint8_t pin_cnt,
494494
#endif /* defined(NRF_PSEL_TDM) */
495495
#if defined(NRF_GRTC_CLKOUT_FAST)
496496
case NRF_FUN_GRTC_CLKOUT_FAST:
497-
#if NRF_GPIO_HAS_SEL && defined(GPIO_PIN_CNF_CTRLSEL_GRTC)
497+
#if NRF_GPIO_HAS_SEL && NRF_GPIO_HAS_CTRLSEL_GRTC
498498
nrf_gpio_pin_control_select(psel, NRF_GPIO_PIN_SEL_GRTC);
499499
#endif
500500
dir = NRF_GPIO_PIN_DIR_OUTPUT;
@@ -503,7 +503,7 @@ int pinctrl_configure_pins(const pinctrl_soc_pin_t *pins, uint8_t pin_cnt,
503503
#endif /* defined(NRF_GRTC_CLKOUT_FAST) */
504504
#if defined(NRF_GRTC_CLKOUT_SLOW)
505505
case NRF_FUN_GRTC_CLKOUT_32K:
506-
#if NRF_GPIO_HAS_SEL && defined(GPIO_PIN_CNF_CTRLSEL_GRTC)
506+
#if NRF_GPIO_HAS_SEL && NRF_GPIO_HAS_CTRLSEL_GRTC
507507
nrf_gpio_pin_control_select(psel, NRF_GPIO_PIN_SEL_GRTC);
508508
#endif
509509
dir = NRF_GPIO_PIN_DIR_OUTPUT;

0 commit comments

Comments
 (0)