72 for(i = 0; i < 8; i++) {
93 ENERGEST_ON(ENERGEST_TYPE_IRQ);
99 notify(int_status | power_up_int_status, port);
104 ENERGEST_OFF(ENERGEST_TYPE_IRQ);
107 #define GPIO_PORT_ISR(lowercase_port, uppercase_port) \
109 gpio_port_##lowercase_port##_isr(void) \
111 gpio_port_isr(GPIO_##uppercase_port##_NUM); \
void gpio_init()
Initialise the GPIO module.
Header file with register manipulation macro definitions.
#define GPIO_CLEAR_POWER_UP_INTERRUPT(PORT, PIN_MASK)
Clear power-up interrupt triggering for pins with PIN_MASK of port PORT.
#define GPIO_CLEAR_INTERRUPT(PORT_BASE, PIN_MASK)
Clear interrupt triggering for pins with PIN_MASK of port with PORT_BASE.
static gpio_callback_t gpio_callbacks[32]
Pointer to a function to be called when a GPIO interrupt is detected.
Header file for the ARM Nested Vectored Interrupt Controller.
static uint8_t int_status(void)
Check whether a data or wake on motion interrupt has occurred.
Header file for the energy estimation mechanism
void(* gpio_callback_t)(uint8_t port, uint8_t pin)
Type definition for callbacks invoked by the GPIO ISRs.
static void gpio_port_isr(uint8_t port)
Interrupt service routine for Port port.
#define NULL
The null pointer.
#define GPIO_GET_POWER_UP_INT_STATUS(PORT)
Get power-up interrupt status of port PORT.
#define GPIO_PORT_TO_BASE(PORT)
Converts a port number to the port base address.
void notify(uint8_t mask, uint8_t port)
Run through all registered GPIO callbacks and invoke those associated with the port and the pins spec...
#define GPIO_GET_MASKED_INT_STATUS(PORT_BASE)
Get masked interrupt status of port with PORT_BASE.
#define lpm_exit()
Perform an 'Exit Deep Sleep' sequence.
void gpio_register_callback(gpio_callback_t f, uint8_t port, uint8_t pin)
Register GPIO callback.