michallenc opened a new pull request, #18494:
URL: https://github.com/apache/nuttx/pull/18494
## Summary
GPIO PIN base address calculation had double right shift, thus call to
`SAM_PION_BASE` was always with `port = 0` instead of correct port number. As a
result, function `sam_gpioirq` didn't correctly configure additional interrupt
modes (only rising or falling edge and level interrupts).
The issue occured on SAMv7 and SAM34 platforms (likely copy-pasted from one
to another).
## Impact
Allows to use additional interrupts (falling/rising edge, level) on GPIO
pins.
## Testing
Tested on custom SAMv7 board. I noticed the issue while debugging a custom
button on pin PD24 configured as
```
#define GPIO_PUSHBUTTON (GPIO_INPUT | GPIO_CFG_DEFAULT | \
GPIO_CFG_DEGLITCH | GPIO_INT_FALLING | \
GPIO_PORT_PIOD | GPIO_PIN24) /* PD_24 */
```
The application received the interrupt on both press and release events
before the fix, now it correctly reacts only to falling edge.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]