button.h File Reference
The button module enables event-driven and polling access to the buttons of the SPiCboard. More...
Go to the source code of this file.
The button module enables event-driven and polling access to the buttons of the SPiCboard.
- $Rev: 3033 $
The SPiCboard is equipped with two buttons. Button 0 is debounced in hardware, whereas Button 1 needs to be debounced in software by the button module. Debouncing is transparent to the application, that can use both buttons through the provided interface without the need to care about debouncing.
The debouncing code makes use of the timer module. When no listeners are registered for Button 1, the debouncing code is disabled and all alarms registered at the timer should be canceled.
The button module uses dynamic memory management to maintain the listener queues.