Patched version of nrf51822 FOTA compatible driver, with GPTIO disabled, as it clashed with the mbed definitions...

Fork of nRF51822 by Nordic Semiconductor

Embed: (wiki syntax)

« Back to documentation index

GPIOTE abstraction

GPIOTE abstraction

GPIOTE abstraction for configuration of channels. More...

Enumerations

enum  nrf_gpiote_polarity_t { NRF_GPIOTE_POLARITY_LOTOHI = GPIOTE_CONFIG_POLARITY_LoToHi, NRF_GPIOTE_POLARITY_HITOLO = GPIOTE_CONFIG_POLARITY_HiToLo, NRF_GPIOTE_POLARITY_TOGGLE = GPIOTE_CONFIG_POLARITY_Toggle }
 

Polarity for GPIOTE channel enumerator.

More...
enum  nrf_gpiote_outinit_t { NRF_GPIOTE_INITIAL_VALUE_LOW = GPIOTE_CONFIG_OUTINIT_Low, NRF_GPIOTE_INITIAL_VALUE_HIGH = GPIOTE_CONFIG_OUTINIT_High }
 

Initial output value for GPIOTE channel enumerator.

More...

Functions

static __INLINE void nrf_gpiote_task_config (uint32_t channel_number, uint32_t pin_number, nrf_gpiote_polarity_t polarity, nrf_gpiote_outinit_t initial_value)
 Function for configuring GPIOTE channel as output, setting the properly desired output level.
static __INLINE void nrf_gpiote_event_config (uint32_t channel_number, uint32_t pin_number, nrf_gpiote_polarity_t polarity)
 Function for configuring GPIOTE channel as input, automatically clearing an event that appears in some cases under configuration.
static __INLINE void nrf_gpiote_unconfig (uint32_t channel_number)
 Function for unconfiguring GPIOTE channel.

Detailed Description

GPIOTE abstraction for configuration of channels.


Enumeration Type Documentation

Initial output value for GPIOTE channel enumerator.

Enumerator:
NRF_GPIOTE_INITIAL_VALUE_LOW 

Low to high.

NRF_GPIOTE_INITIAL_VALUE_HIGH 

High to low.

Definition at line 41 of file nrf_gpiote.h.

Polarity for GPIOTE channel enumerator.

Enumerator:
NRF_GPIOTE_POLARITY_LOTOHI 

Low to high.

NRF_GPIOTE_POLARITY_HITOLO 

High to low.

NRF_GPIOTE_POLARITY_TOGGLE 

Toggle.

Definition at line 29 of file nrf_gpiote.h.


Function Documentation

static __INLINE void nrf_gpiote_event_config ( uint32_t  channel_number,
uint32_t  pin_number,
nrf_gpiote_polarity_t  polarity 
) [static]

Function for configuring GPIOTE channel as input, automatically clearing an event that appears in some cases under configuration.

Note that when configuring the channel as input an event might be triggered. Care of disabling interrupts for that channel is left to the user.

Parameters:
channel_numberspecifies the GPIOTE channel [0:3] to configure as an input channel.
pin_numberspecifies the pin number [0:30] to use in the GPIOTE channel.
polarityspecifies the desired polarity in the output GPIOTE channel.

Definition at line 117 of file nrf_gpiote.h.

static __INLINE void nrf_gpiote_task_config ( uint32_t  channel_number,
uint32_t  pin_number,
nrf_gpiote_polarity_t  polarity,
nrf_gpiote_outinit_t  initial_value 
) [static]

Function for configuring GPIOTE channel as output, setting the properly desired output level.

Parameters:
channel_numberspecifies the GPIOTE channel [0:3] to configure as an output channel.
pin_numberspecifies the pin number [0:30] to use in the GPIOTE channel.
polarityspecifies the desired polarity in the output GPIOTE channel.
initial_valuespecifies the initial value of the GPIOTE channel input after the channel configuration.

Definition at line 57 of file nrf_gpiote.h.

static __INLINE void nrf_gpiote_unconfig ( uint32_t  channel_number ) [static]

Function for unconfiguring GPIOTE channel.

Note that when unconfiguring the channel, the pin is configured as GPIO PIN_CNF configuration.

Parameters:
channel_numberspecifies the GPIOTE channel [0:3] to unconfigure.

Definition at line 142 of file nrf_gpiote.h.