You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
485 B

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. #pragma once
  2. #include <stdbool.h>
  3. #include <stdint.h>
  4. typedef struct
  5. {
  6. bool key_before_state;
  7. bool key_now_state;
  8. uint32_t key_press_down_keep_time;
  9. } T_key_structer_t;
  10. typedef bool (*key_camera_cb)(void);
  11. typedef void (*key_event_cb)(void);
  12. void T_key_init(T_key_structer_t *T_key_structer);
  13. void T_key_registered_cb(key_event_cb short_press_event_cb, key_event_cb long_press_event_cb);
  14. void T_key_on_event(void);
  15. void T_key_schedule(void);
  16. bool T_key_get_level(void);