ruuvi.drivers.c  ${PROJECT_VERSION}
Drivers for external sensors and peripherals on embedded systems.
ruuvi_nrf5_sdk15_gpio.h
Go to the documentation of this file.
1 #ifndef RUUVI_NRF5_SDK15_GPIO_H
2 #define RUUVI_NRF5_SDK15_GPIO_H
3 #include "ruuvi_interface_gpio.h"
24 static inline uint8_t ruuvi_to_nrf_pin_map (const ri_gpio_id_t pin)
25 {
26  return (pin >> 8U) + (pin & 0x1FU);
27 }
28 
29 static inline ri_gpio_id_t nrf_to_ruuvi_pin (const uint8_t pin)
30 {
31  return ( (pin & 0xE0U) << 3U) + (pin & 0x1FU);
32 }
33 
35 #endif
uint16_t ri_gpio_id_t
port<<8 + pin