diff options
Diffstat (limited to 'firmware/src/os/usb_handler.h')
-rw-r--r-- | firmware/src/os/usb_handler.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/firmware/src/os/usb_handler.h b/firmware/src/os/usb_handler.h index 3efcc1f..9d5ad48 100644 --- a/firmware/src/os/usb_handler.h +++ b/firmware/src/os/usb_handler.h @@ -6,6 +6,16 @@ #define MAX_PAYLOAD_LEN (64 - sizeof(struct openpcd_hdr)) +#define USB_RET_RESPOND (1 << 8) +#define USB_RET_ERR (2 << 8) +#define USB_ERR(x) (USB_RET_RESPOND|USB_RET_ERR|(x & 0xff)) + +enum usbapi_err { + USB_ERR_NONE, + USB_ERR_CMD_UNKNOWN, + USB_ERR_CMD_NOT_IMPL, +}; + typedef int usb_cmd_fn(struct req_ctx *rctx); extern int usb_hdlr_register(usb_cmd_fn *hdlr, u_int8_t class); |