Luis Bernal / Mbed 2 deprecated xbeat-hoppel-code

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Button Class Reference

Button Class Reference

Class Button - derived from Class DigitalIn. More...

#include <button.h>

Public Member Functions

 Button (PinName pin, const char *name=NULL)
 Contructor pin button pin name for Pin.
int read (void)
 returns the Button state as integer
 operator int ()
 overwrites the int operator for easy use
void set_debounce_us (int i)
 Sets the Debounce Time i debounce time in microseconds.
void set_samples (int i)
 Sets the Oscillations to count until Button is debounced i Number of Samples.

Detailed Description

Class Button - derived from Class DigitalIn.

Definition at line 51 of file button.h.


Constructor & Destructor Documentation

Button ( PinName  pin,
const char *  name = NULL 
)

Contructor pin button pin name for Pin.

Definition at line 27 of file button.cpp.


Member Function Documentation

operator int (  )

overwrites the int operator for easy use

Definition at line 53 of file button.cpp.

int read ( void   )

returns the Button state as integer

Definition at line 47 of file button.cpp.

void set_debounce_us ( int  i )

Sets the Debounce Time i debounce time in microseconds.

Definition at line 41 of file button.cpp.

void set_samples ( int  i )

Sets the Oscillations to count until Button is debounced i Number of Samples.

Definition at line 35 of file button.cpp.