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.

host.h 558B

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef HOST_H
  2. #define HOST_H
  3. #include <stdint.h>
  4. #define REPORT_KEYS 6
  5. #define MOUSE_BTN1 (1<<0)
  6. #define MOUSE_BTN2 (1<<1)
  7. #define MOUSE_BTN3 (1<<2)
  8. #define MOUSE_BTN4 (1<<3)
  9. #define MOUSE_BTN5 (1<<4)
  10. typedef struct {
  11. uint8_t mods;
  12. uint8_t rserved; // not used
  13. uint8_t keys[REPORT_KEYS];
  14. } report_keyboard_t;
  15. typedef struct {
  16. uint8_t buttons;
  17. int8_t x;
  18. int8_t y;
  19. /*
  20. int8_t v;
  21. int8_t h;
  22. */
  23. } report_mouse_t;
  24. void host_keyboard_send(report_keyboard_t *report);
  25. void host_mouse_send(report_mouse_t *report);
  26. #endif