Friedrich-Alexander-Universität UnivisSuche FAU-Logo
Techn. Fakultät Willkommen am Department Informatik FAU-Logo
Logo I4
Lehrstuhl für Informatik 4
GSPiC
 
  Übungen
  Dokumentation
  HowTos
  Evaluation
  Prüfungsinformationen
  protected area Intern
Übungen
  Anmeldung
  Folien
  Aufgaben
Department Informatik  >  Informatik 4  >  Lehre  >  WS 2010/11  >  GSPiC  >  Übung  >  Doku  >  libspicboard: button.h File Reference

SPiCboard library (libspicboard, revision 3032) API documentation

Found a bug or something ambiguous? Mail us to get it fixed!

button.h File Reference

The button module enables event-driven and polling access to the buttons of the SPiCboard. More...

#include <stdint.h>

Go to the source code of this file.

Typedefs

typedef void(* buttoncallback_t )(BUTTON, BUTTONEVENT)
 Type for button event callback functions.

Enumerations

enum  BUTTON { BUTTON0 = 4, BUTTON1 = 8 }
 Identifiers for all available buttons. More...
enum  BUTTONEVENT { BTNPRESSED = 1, BTNRELEASED = 2 }
 Events for buttons. More...

Functions

int8_t sb_button_registerListener (BUTTON btn, BUTTONEVENT eve, buttoncallback_t callback)
 Register a callback function for a button event.
int8_t sb_button_unregisterListener (BUTTON btn, BUTTONEVENT eve, buttoncallback_t callback)
 Unregister a callback function for a button event.
BUTTONEVENT sb_button_getState (BUTTON btn)
 Query the current state of a button.


Detailed Description

The button module enables event-driven and polling access to the buttons of the SPiCboard.

Version:
$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.

  Impressum   Datenschutz Stand: 2010-07-02 13:45   MS