cc2538: gpio: Add macros to get interrupt status

Introduce new useful GPIO macros to:
 - get the raw interrupt status of a port,
 - get the masked interrupt status of a port,
 - get the power-up interrupt status of a port.

These macros are cleaner and less error-prone than raw register access
code copied all over the place.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
This commit is contained in:
Benoît Thébaudeau 2015-04-08 22:49:50 +02:00
parent 41d9078ed4
commit 1e67ab3941
2 changed files with 34 additions and 1 deletions

View file

@ -93,7 +93,7 @@ gpio_port_isr(uint8_t port)
base = GPIO_PORT_TO_BASE(port);
notify(REG(base + GPIO_MIS), port);
notify(GPIO_GET_MASKED_INT_STATUS(base), port);
GPIO_CLEAR_INTERRUPT(base, 0xFF);
GPIO_CLEAR_POWER_UP_INTERRUPT(port, 0xFF);