lpcware

Interrupt Handler Counters - what for?

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by tkreyche on Mon Mar 15 14:05:21 MST 2010
Is there some purpose that I'm missing, for the gpio_counter and p0_1_counter in the interrupt handlers? I can't find reference to them elsewhere in the library or sample application code.

thanks, Tom



[B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055][FONT=Arial]void[/FONT]
[/COLOR][/SIZE][/COLOR][/SIZE][/B][LEFT][FONT=Arial][SIZE=2]PIOINT0_IRQHandler([/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]void[/COLOR][/SIZE][/COLOR][/SIZE][/B][/FONT][SIZE=2][FONT=Arial])[/FONT][/SIZE]
[LEFT][SIZE=2][FONT=Arial]{[/FONT][/SIZE]
[SIZE=2][FONT=Arial]uint32_t regVal;[/FONT][/SIZE][/LEFT]

[LEFT][SIZE=2][FONT=Arial]gpio0_counter++;[/FONT][/SIZE]
[SIZE=2][FONT=Arial]regVal = GPIOIntStatus( PORT0, 1 );[/FONT][/SIZE]
[B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055][FONT=Arial]if[/FONT][/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2][FONT=Arial] ( regVal )[/FONT][/SIZE]
[SIZE=2][FONT=Arial]{[/FONT][/SIZE]
[SIZE=2][FONT=Arial]p0_1_counter++;[/FONT][/SIZE]
[SIZE=2][FONT=Arial]GPIOIntClear( PORT0, 1 );[/FONT][/SIZE]
[SIZE=2][FONT=Arial]} [/FONT][/SIZE]
[B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055][FONT=Arial]return[/FONT][/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2][FONT=Arial];[/FONT][/SIZE][/LEFT]
[SIZE=2][FONT=Arial]}[/FONT][/SIZE]

[/LEFT]

Outcomes