diff options
author | Florian Didron <fd@librem.one> | 2019-11-20 09:41:42 +0900 |
---|---|---|
committer | Florian Didron <fdidron@users.noreply.github.com> | 2019-12-06 08:20:51 +0900 |
commit | 925c43c4c0e9360d2fe0032b3c41c2a84e1a4d8b (patch) | |
tree | 1d2bcbbf5db10d3eddd249c3ac4835d4b6734e64 /tmk_core/common/webusb.h | |
parent | b3c0f3b0eff91172ced5b51fb1232e47dfbd6753 (diff) |
feat: update examples + pairing process
Diffstat (limited to 'tmk_core/common/webusb.h')
-rw-r--r-- | tmk_core/common/webusb.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tmk_core/common/webusb.h b/tmk_core/common/webusb.h index 35d9610fc9..c49a9f48a8 100644 --- a/tmk_core/common/webusb.h +++ b/tmk_core/common/webusb.h @@ -3,6 +3,10 @@ #include <stdint.h> #include <stdbool.h> +#define WEBUSB_STOP_BIT -2 +#define WEBUSB_BLINK_STEPS 512 +#define WEBUSB_BLINK_END WEBUSB_BLINK_STEPS * 60 + void webusb_receive(uint8_t *data, uint8_t length); void webusb_send(uint8_t *data, uint8_t length); void webusb_error(uint8_t); @@ -21,4 +25,13 @@ enum Webusb_Status_Code { WEBUSB_STATUS_UNKNOWN_COMMAND, }; +enum Webusb_Command_Code { + WEBUSB_CMD_PAIR +}; +enum Webusb_Event_Code { + WEBUSB_EVT_PAIRED, + WEBUSB_EVT_KEYDOWN, + WEBUSB_EVT_KEYUP, + WEBUSB_EVT_LAYER +}; |