1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

Revert "Merge pull request #9699 from miri64/nrf5x_common/fix/gpio-unused-function"

This reverts commit 2d10390b56, reversing
changes made to 2f480efb60.
This commit is contained in:
Silke Hofstra 2018-10-12 17:46:43 +02:00
parent 33aa604dd7
commit 8efeb4a4f1

View File

@ -57,6 +57,18 @@ static inline NRF_GPIO_Type* port(gpio_t pin)
#endif
}
/**
* @brief Get a pin's offset
*/
static inline int pin_num(gpio_t pin)
{
#ifdef CPU_MODEL_NRF52840XXAA
return (pin & PIN_MASK);
#else
return (int)pin;
#endif
}
int gpio_init(gpio_t pin, gpio_mode_t mode)
{
switch (mode) {