The current implementation is such that if two or more events are
generated in quick succession, only one is handled. This would
have happened as follows.
At the beginning of the ISR, the contents of INTPEND are read.
Then, the ISR unconditionally clears all events that are set.
When two (or more) events are generated in rapid succession,
it may happen that by the time we enter the ISR, INTPEND is set
only for one event, but while we process the ISR, EVENTS_TRIGGERED
will be set for more than just that one event (more events are
generated).
By unconditionally clearing all events, we can potentially lose
all events that are generated during ISR processing.
This patch changes the ISR so that it only clears those events
that have a corresponding bit set in INTPEND at the time it is read.
Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>