Files
morse_code_trainer/f103c8t6_keil/MDK-ARM/MYDEIVERS/encode.h
T
kevin 8a3d91d0c2 按钮中断触发
Signed-off-by: kevin <kevin@lmve.net>
2022-05-02 00:46:41 +08:00

28 lines
373 B
C

#ifndef ENCODER_H_
#define ENCODER_H_
#include "main.h"
typedef struct button
{
uint8_t flag;
uint16_t code;
uint8_t lock;
uint32_t time;
uint16_t times;
GPIO_TypeDef *GPIOx;
uint16_t GPIO_Pin;
} button;
typedef struct
{
int code;
uint8_t move_flag:1;
} encoder;
void GEI_BUTTON_CODE(button *bt);
int GET_ENCODE(encoder *e);
#endif /* ENCODER_H_ */