arachnidlabs/reload-pro — pull request #65 by zardam (2014-10-31 00:38:53+00:00)
Title: Long button press event

A better (I expect) implementation of the long press event:
- only one integer variable is shared between the ISR ad the UI task (long_button_press_tick_count).
- no synchronization is needed, as the long press check can be interrupted at any time without causing any problem. I don't know too much Cortex M0 architecture, but I expect the comparison to be atomic in the UI task. If so, event if the interrupt occurs during the comparison, the long press event will be sent and the next press event will be inhibited.