Definition in file input.h.
Go to the source code of this file.
Defines | |
| #define | BTN_COUNT 0x09 |
| The count of buttons. | |
| #define | ENC_ENDSTOP_MASK 0x01 |
| Flag for configuring the state machine (SM) of the rotary encoder button. | |
| #define | ENC_TURBO_MASK 0x02 |
| Flag for configuring the state machine (SM) of the rotary encoder button. | |
| #define | ENC_NOCHANGE_MASK 0x04 |
| Flag for configuring the state machine (SM) of the rotary encoder button. | |
| #define | BTN_LONG_PUSH_TIME (100u) |
| This value is used to measure the first push time (unit is the cycle call time of the InputMain routine) of a button after a reset of the appropriate state machine and the first push. | |
| #define | BTN_DOUBLE_PUSH_TIME (60u) |
| A button state machine waits between to single pushes until this time is elapsed (unit is the cycle call time of the InputMain routine). | |
Enumerations | |
| enum | eButtonID { PWR_BTN = 0, SEL_BTN, ACC_BTN, FL_BTN, F1_BTN, F2_BTN, F3_BTN, F4_BTN, ENC_BTN, ALL_BTN } |
| IDs for accessing the buttons. More... | |
Functions | |
| void | InputInit (void) |
| Initializes the input module. | |
| void | InputMain (void) |
| The input state machines are feeded, handled and checked. | |
| void | InputButtonReset (eButtonID eBtn) |
| The state machine of the given button will be reseted or all if ALL_BTN is the parameter. | |
| void | InputResetPowerButton (void) |
| The power button state machine is something special and can be reset by this function. | |
| void | InputResetButtonPush (eButtonID eBtn) |
| This function can be used to reset single push events in the state machine. | |
| BOOL | bInputButtonPushedOnce (eButtonID eBtn) |
| The application can ask the input module for a given button if there was a single push since the last call of InputButtonReset. | |
| BOOL | bInputButtonPushedTwice (eButtonID eBtn) |
| The application can ask the input module for a given button if there was a double push since the last call of InputButtonReset or InputInit. | |
| BOOL | bInputButtonPushedLong (eButtonID eBtn) |
| The application can ask the input module for a given button if there was a long push since the last call of InputButtonReset or InputInit. | |
| BOOL | bInputButtonPushed (eButtonID eBtn) |
| This function combines the functions bInputButtonPushedLong, bInputButtonPushedOnce and bInputButtonPushedTwice. | |
| SHORT | s16InputEncoderGetValue (void) |
| This function returns the actual value of rotary encoder state machine. | |
| void | InputEncoderInit (SHORT s16Val, SHORT s16Min, SHORT s16Max, BYTE u8Flags) |
| This function initializes the rotary encoder. | |
| BOOL | bInputEncoderValueChanged (void) |
| This function returns TRUE if the value of rotary encoder state machine has changed after the last call of s16InputEncoderGetValue. | |
| void | InputEncoderSetValue (short s16NewVal, BOOL bRemember) |
| The function sets the internal encoder value to the given value. | |
| void | InputForceChangedEncoderValue (void) |
| After calling this function the function bInputEncoderValueChanged delivers a TRUE when calling after this function call. | |
| BOOL | InputEncoderGetDirection (void) |
| This function delivers the current or last rotary direction of the encoder button. | |
| BYTE | u8InputButtonQuickPushed (void) |
| The function delivers the ID of any pushed quick button (F1-F4). | |
| BOOL | bInputButtonPressed (eButtonID eBtn) |
| The function checks whether the requested button is currently pressed or released. | |
| BOOL | IsEncoderTurning (void) |
| The function checks whether the input encoder is turning. | |
| void | InputInterruptHandler (void) |
| This function handles the periodic requested interrupts. | |
1.5.5