From 5ecaf7722b5f1f9d0c41213fc5c129b451302f99 Mon Sep 17 00:00:00 2001 From: Diego Ismirlian Date: Mon, 5 Jun 2017 10:18:45 -0300 Subject: USB Host fixes - Cleaned up alignment macros for GCC & IAR - Corrected EP halt and Clear halt behaviours - Initialization of class drivers by USB Host main driver - Minor cosmetic fixes - Updated USB_HOST testhal app --- os/hal/include/usbh/defs.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'os/hal/include/usbh/defs.h') diff --git a/os/hal/include/usbh/defs.h b/os/hal/include/usbh/defs.h index c3d8a9a..58b1de2 100644 --- a/os/hal/include/usbh/defs.h +++ b/os/hal/include/usbh/defs.h @@ -25,12 +25,12 @@ #include "osal.h" #ifdef __IAR_SYSTEMS_ICC__ -#define PACKED_STRUCT typedef PACKED_VAR struct +#define PACKED_STRUCT PACKED_VAR struct #else -#define PACKED_STRUCT typedef struct PACKED_VAR +#define PACKED_STRUCT struct PACKED_VAR #endif -PACKED_STRUCT { +typedef PACKED_STRUCT { uint8_t bLength; uint8_t bDescriptorType; uint16_t bcdUSB; @@ -49,7 +49,7 @@ PACKED_STRUCT { #define USBH_DT_DEVICE 0x01 #define USBH_DT_DEVICE_SIZE 18 -PACKED_STRUCT { +typedef PACKED_STRUCT { uint8_t bLength; uint8_t bDescriptorType; uint16_t wTotalLength; @@ -62,7 +62,7 @@ PACKED_STRUCT { #define USBH_DT_CONFIG 0x02 #define USBH_DT_CONFIG_SIZE 9 -PACKED_STRUCT { +typedef PACKED_STRUCT { uint8_t bLength; uint8_t bDescriptorType; uint16_t wData[1]; @@ -70,7 +70,7 @@ PACKED_STRUCT { #define USBH_DT_STRING 0x03 #define USBH_DT_STRING_SIZE 2 -PACKED_STRUCT { +typedef PACKED_STRUCT { uint8_t bLength; uint8_t bDescriptorType; uint8_t bInterfaceNumber; @@ -84,7 +84,7 @@ PACKED_STRUCT { #define USBH_DT_INTERFACE 0x04 #define USBH_DT_INTERFACE_SIZE 9 -PACKED_STRUCT { +typedef PACKED_STRUCT { uint8_t bLength; uint8_t bDescriptorType; uint8_t bEndpointAddress; @@ -95,7 +95,7 @@ PACKED_STRUCT { #define USBH_DT_ENDPOINT 0x05 #define USBH_DT_ENDPOINT_SIZE 7 -PACKED_STRUCT { +typedef PACKED_STRUCT { uint8_t bLength; uint8_t bDescriptorType; uint8_t bFirstInterface; @@ -108,7 +108,7 @@ PACKED_STRUCT { #define USBH_DT_INTERFACE_ASSOCIATION 0x0b #define USBH_DT_INTERFACE_ASSOCIATION_SIZE 8 -PACKED_STRUCT { +typedef PACKED_STRUCT { uint8_t bDescLength; uint8_t bDescriptorType; uint8_t bNbrPorts; @@ -120,7 +120,7 @@ PACKED_STRUCT { #define USBH_DT_HUB 0x29 #define USBH_DT_HUB_SIZE (7 + 4) -PACKED_STRUCT { +typedef PACKED_STRUCT { uint8_t bmRequestType; uint8_t bRequest; uint16_t wValue; -- cgit v1.2.3