2016-10-07 23:44:50 +02:00
|
|
|
/*
|
|
|
|
|
* Button.h
|
|
|
|
|
*
|
|
|
|
|
* Created on: 13.05.2013
|
|
|
|
|
* Author: skuser
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef BUTTON_H_
|
|
|
|
|
#define BUTTON_H_
|
|
|
|
|
|
|
|
|
|
#include "Common.h"
|
|
|
|
|
|
|
|
|
|
typedef enum {
|
2017-11-07 15:53:23 +01:00
|
|
|
BUTTON_R_PRESS_SHORT = 0,
|
|
|
|
|
BUTTON_R_PRESS_LONG,
|
|
|
|
|
BUTTON_L_PRESS_SHORT,
|
|
|
|
|
BUTTON_L_PRESS_LONG,
|
2016-10-07 23:44:50 +02:00
|
|
|
|
2017-11-07 15:53:23 +01:00
|
|
|
/* Must be last element */
|
|
|
|
|
BUTTON_TYPE_COUNT
|
2016-10-07 23:44:50 +02:00
|
|
|
} ButtonTypeEnum;
|
|
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
|
BUTTON_ACTION_NONE,
|
|
|
|
|
BUTTON_ACTION_UID_RANDOM,
|
|
|
|
|
BUTTON_ACTION_UID_LEFT_INCREMENT,
|
|
|
|
|
BUTTON_ACTION_UID_RIGHT_INCREMENT,
|
|
|
|
|
BUTTON_ACTION_UID_LEFT_DECREMENT,
|
|
|
|
|
BUTTON_ACTION_UID_RIGHT_DECREMENT,
|
|
|
|
|
BUTTON_ACTION_CYCLE_SETTINGS,
|
|
|
|
|
BUTTON_ACTION_STORE_MEM,
|
|
|
|
|
BUTTON_ACTION_RECALL_MEM,
|
2017-11-07 15:53:23 +01:00
|
|
|
BUTTON_ACTION_TOGGLE_FIELD,
|
|
|
|
|
BUTTON_ACTION_STORE_LOG,
|
2018-01-24 18:27:52 +01:00
|
|
|
BUTTON_ACTION_CLONE,
|
2019-11-20 07:04:55 -06:00
|
|
|
BUTTON_ACTION_CLONE_MFU,
|
2016-10-07 23:44:50 +02:00
|
|
|
|
|
|
|
|
/* This has to be last element */
|
|
|
|
|
BUTTON_ACTION_COUNT
|
|
|
|
|
} ButtonActionEnum;
|
|
|
|
|
|
|
|
|
|
void ButtonInit(void);
|
|
|
|
|
void ButtonTick(void);
|
|
|
|
|
|
2019-11-15 10:21:40 +01:00
|
|
|
void ButtonGetActionList(char *List, uint16_t BufferSize);
|
2016-10-07 23:44:50 +02:00
|
|
|
void ButtonSetActionById(ButtonTypeEnum Type, ButtonActionEnum Action);
|
2019-11-15 10:21:40 +01:00
|
|
|
void ButtonGetActionByName(ButtonTypeEnum Type, char *Action, uint16_t BufferSize);
|
|
|
|
|
bool ButtonSetActionByName(ButtonTypeEnum Type, const char *Action);
|
2016-10-07 23:44:50 +02:00
|
|
|
|
|
|
|
|
#endif /* BUTTON_H_ */
|