FSM/FSM_OOP/usr/keyFSM.h

35 lines
414 B
C

#ifndef __KEY_FSM_H_
#define __KEY_FSM_H_
typedef enum _keyIn{
Up,
pDown,
}KeyIn;
typedef enum _keyOutSignal{
Idle,
Down,
Hold,
Down_2times,
Down_3times,
}KeyOutSignal;
typedef struct _keyFSMData
{
int countDelay;
int countMultiDown;
KeyIn in;
KeyOutSignal out;
int isLastHolding;
}KeyFSMData;
typedef struct _KeyFSM KeyFSM;
KeyFSM *createKeyFSM();
#endif