Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reverted interrupt changes for factoring
Browse files Browse the repository at this point in the history
Anon Mall committed Jul 3, 2017
1 parent 00a79f0 commit 59482d3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cpu/cc2538/periph/gpio.c
Original file line number Diff line number Diff line change
@@ -106,7 +106,7 @@ int gpio_init_int(gpio_t pin, gpio_mode_t mode, gpio_flank_t flank,
isr_ctx[port_num(pin)][pin_num(pin)].arg = arg;

/* enable power-up interrupts for this GPIO port: */
SYS_CTRL->IWE |= (1 << port_num(pin));
SYS_CTRL->IWE |= port_num(pin);

/* configure the active flank(s) */
gpio(pin)->IS &= ~pin_mask(pin);
@@ -119,7 +119,7 @@ int gpio_init_int(gpio_t pin, gpio_mode_t mode, gpio_flank_t flank,
case GPIO_RISING:
gpio(pin)->IBE &= ~pin_mask(pin);
gpio(pin)->IEV |= pin_mask(pin);
gpio(pin)->P_EDGE_CTRL &= ~(1 << pp_num(pin));
gpio(pin)->P_EDGE_CTRL &= (1 << pp_num(pin));
break;
case GPIO_BOTH:
gpio(pin)->IBE |= pin_mask(pin);
@@ -183,7 +183,7 @@ static inline void handle_isr(cc2538_gpio_t *gpio, int port_num)
{
uint32_t state = gpio->MIS;
gpio->IC = 0x000000ff;
gpio->IRQ_DETECT_ACK = (0xff << (port_num * GPIO_BITS_PER_PORT));
gpio->IRQ_DETECT_ACK = 0x000000ff;

for (int i = 0; i < GPIO_BITS_PER_PORT; i++) {
if (state & (1 << i)) {

0 comments on commit 59482d3

Please sign in to comment.