Keyboard firmwares for Atmel AVR and Cortex-M
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.

keyboard.h 498B

123456789101112131415161718192021222324252627
  1. #ifndef KEYBOARD_H
  2. #define KEYBOARD_H
  3. #include "stdbool.h"
  4. #define REPORT_KEYS 6
  5. typedef struct{
  6. uint8_t mods;
  7. uint8_t rserved; // not used
  8. uint8_t keys[REPORT_KEYS];
  9. }report_t;
  10. //extern report_t *report;
  11. //extern report_t *report_prev;
  12. report_t *report_get(void);
  13. bool report_has_key(void);
  14. void report_send(void);
  15. void report_add_mod(uint8_t mod);
  16. void report_add_key(uint8_t key);
  17. void report_add_code(uint8_t code);
  18. void report_swap(void);
  19. void report_clear(void);
  20. #endif