//key.h
#ifndef _KEY_H
#define _KEY_H
#include "mcu.h"
typedef struct{
	unsigned char state;
	unsigned char rise_state;//the state that means pin change from light to blocked
	unsigned char fall_state;// !above
}Encoder_t;


extern unsigned char r_switch_state;/*right keys state*/
extern unsigned char encoder_state;/*encoder state*/
extern signed char up_down;/*encoder roll count*/
extern unsigned char send_state;
extern uint8_t roll_count;



void encoder_init(void);
void key_init(void);
void Encoder_process(void);
void button_scan(void);
#endif