Add USB_STATUS_CODE_SIZE and use it to kill the magic numbers of usb_command_read_config()

This commit is contained in:
László Monda
2017-11-06 00:44:32 +01:00
parent 003f313947
commit 9910fe536f
2 changed files with 4 additions and 2 deletions

View File

@@ -8,6 +8,8 @@
// Macros:
#define USB_STATUS_CODE_SIZE 1
#define GET_USB_BUFFER_UINT8(offset) (*(uint8_t*)(GenericHidInBuffer+(offset)))
#define GET_USB_BUFFER_UINT16(offset) (*(uint16_t*)(GenericHidInBuffer+(offset)))
#define GET_USB_BUFFER_UINT32(offset) (*(uint32_t*)(GenericHidInBuffer+(offset)))