Digital Scale  1.0
Digital Scale
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Enumerations | Variables
Switch Actions

Enumerations

enum  SWITCH_ACTION_t {
  SWITCH_NONE, SWITCH_SHORT, SWITCH_MED, SWITCH_LONG,
  SWITCH_DOUBLE
}
 

Variables

volatile SWITCH_ACTION_t switchAction
 Is set by interrupt if the switch has been pressed. Must be reset by the surrounding loop. More...
 

Detailed Description

This typedef declares the possible switch actions. We have only one pushbutton switch so we can distinct between short presses (less than two seconds), medium presses (between 2 and 10 seconds) and really long presses of more than 10s, which is used to enter calibration mode.

Enumeration Type Documentation

Enumerator
SWITCH_NONE 

Switch is not pressed.

SWITCH_SHORT 

Switch has been pressed for less than 2 Seconds.

SWITCH_MED 

Switch has been pressed for more than 2 Seconds.

SWITCH_LONG 

Switch has been pressed for more than 10 Seconds.

SWITCH_DOUBLE 

Doubleclick; switch has been pressed short two times within 500ms.

Variable Documentation

volatile SWITCH_ACTION_t switchAction

Is set by interrupt if the switch has been pressed. Must be reset by the surrounding loop.