123456789101112131415161718192021222324252627282930 |
- #ifndef __DEV_KEY_H
- #define __DEV_KEY_H
- #include "hal_gpio.h"
- #include "multi_button.h"
- typedef union
- {
- struct
- {
- uint8_t key_up_state_flag : 1;
- uint8_t key0_state_flag : 1;
- uint8_t key1_state_flag : 1;
- uint8_t key2_state_flag : 1;
- } bits;
- uint8_t key_all_state;
- } dev_key_state_t;
- typedef struct
- {
- dev_key_state_t dev_key_state;
- uint8_t i;
- } dev_key_t;
- extern dev_key_t dev_key;
- void dev_key_button_init(void);
- void dev_key_button_task(void);
- #endif // __DEV_KEY_H
|