55 lines
794 B
C
55 lines
794 B
C
|
|
#ifndef __HWCTRL_H__
|
|
#define __HWCTRL_H__
|
|
#include "r_cg_macrodriver.h"
|
|
|
|
#include "PINdef.h"
|
|
|
|
|
|
#define KEY_PRESSED 1
|
|
#define KEY_NOPRESSED 0
|
|
|
|
|
|
|
|
typedef enum
|
|
{
|
|
FNR_Invalid,
|
|
FNR_1,
|
|
FNR_2,
|
|
FNR_3,
|
|
FNR_N,
|
|
FNR_R,
|
|
FNR_P,
|
|
FNR_NUM,
|
|
}FNR_Type;
|
|
|
|
typedef enum
|
|
{
|
|
IND_P,
|
|
IND_F,
|
|
IND_N,
|
|
IND_R,
|
|
IND_ALL_LIGHT,
|
|
IND_NUM,
|
|
}IND_Type;
|
|
|
|
#define P_LIGHT_NONE 0
|
|
#define P_LIGHT_RED 1
|
|
#define P_LIGHT_YELLOE 2
|
|
|
|
uint8_t GetKeyState(uint8_t keyno);
|
|
void KeyScan(void);
|
|
uint8_t GetIOState(uint8_t keyno);
|
|
|
|
void ad_handle(void);
|
|
uint16_t getAdval(ADCH_type ch);
|
|
void ClearKeyState(void);
|
|
uint8_t getKeyReleaseFlag(uint8_t id);
|
|
uint8_t getKeyPressFlag(uint8_t id);
|
|
void getInputStatus(unsigned char* data);
|
|
void IND_Ctrl(IND_Type ind,uint8_t state);
|
|
|
|
|
|
|
|
#endif
|