diff options
Diffstat (limited to 'os/hal/include/usbh/internal.h')
| -rw-r--r-- | os/hal/include/usbh/internal.h | 52 | 
1 files changed, 23 insertions, 29 deletions
| diff --git a/os/hal/include/usbh/internal.h b/os/hal/include/usbh/internal.h index baa477f..70d2f7a 100644 --- a/os/hal/include/usbh/internal.h +++ b/os/hal/include/usbh/internal.h @@ -1,6 +1,6 @@  /*
 -    ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
 -              Copyright (C) 2015 Diego Ismirlian, TISA, (dismirlian (at) google's mail)
 +    ChibiOS - Copyright (C) 2006..2017 Giovanni Di Sirio
 +              Copyright (C) 2015..2017 Diego Ismirlian, (dismirlian (at) google's mail)
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
 @@ -29,9 +29,15 @@  #if HAL_USBH_USE_FTDI
  extern const usbh_classdriverinfo_t usbhftdiClassDriverInfo;
  #endif
 +#if HAL_USBH_USE_AOA
 +extern const usbh_classdriverinfo_t usbhaoaClassDriverInfo;
 +#endif
  #if HAL_USBH_USE_MSD
  extern const usbh_classdriverinfo_t usbhmsdClassDriverInfo;
  #endif
 +#if HAL_USBH_USE_HID
 +extern const usbh_classdriverinfo_t usbhhidClassDriverInfo;
 +#endif
  #if HAL_USBH_USE_UVC
  extern const usbh_classdriverinfo_t usbhuvcClassDriverInfo;
  #endif
 @@ -49,29 +55,17 @@ bool _usbh_urb_abortI(usbh_urb_t *urb, usbh_urbstatus_t status);  void _usbh_urb_abort_and_waitS(usbh_urb_t *urb, usbh_urbstatus_t status);
 -#define USBH_CLASSIN(type, req, value, index)	\
 -	(USBH_REQTYPE_IN | type | USBH_REQTYPE_CLASS), \
 -	req, \
 -	value, \
 -	index
 +#define USBH_REQTYPE_CLASSIN(type)	\
 +	(USBH_REQTYPE_DIR_IN | type | USBH_REQTYPE_TYPE_CLASS)
 -#define USBH_CLASSOUT(type, req, value, index)	\
 -	(USBH_REQTYPE_OUT | type | USBH_REQTYPE_CLASS), \
 -	req, \
 -	value, \
 -	index
 +#define USBH_REQTYPE_CLASSOUT(type)	\
 +	(USBH_REQTYPE_DIR_OUT | type | USBH_REQTYPE_TYPE_CLASS)
 -#define USBH_STANDARDIN(type, req, value, index)	\
 -	(USBH_REQTYPE_IN | type | USBH_REQTYPE_STANDARD), \
 -	req, \
 -	value, \
 -	index
 +#define USBH_REQTYPE_STANDARDIN(type)	\
 +	(USBH_REQTYPE_DIR_IN | type | USBH_REQTYPE_TYPE_STANDARD)
 -#define USBH_STANDARDOUT(type, req, value, index)	\
 -	(USBH_REQTYPE_OUT | type | USBH_REQTYPE_STANDARD), \
 -	req, \
 -	value, \
 -	index
 +#define USBH_REQTYPE_STANDARDOUT(type)	\
 +	(USBH_REQTYPE_DIR_OUT | type | USBH_REQTYPE_TYPE_STANDARD)
  #define USBH_PID_DATA0            0
 @@ -82,19 +76,19 @@ void _usbh_urb_abort_and_waitS(usbh_urb_t *urb, usbh_urbstatus_t status);  /* GetBusState and SetHubDescriptor are optional, omitted */
 -#define ClearHubFeature   (((USBH_REQTYPE_OUT | USBH_REQTYPE_CLASS | USBH_REQTYPE_DEVICE) << 8) \
 +#define ClearHubFeature   (((USBH_REQTYPE_DIR_OUT | USBH_REQTYPE_TYPE_CLASS | USBH_REQTYPE_RECIP_DEVICE) << 8) \
  							| USBH_REQ_CLEAR_FEATURE)
 -#define SetHubFeature     (((USBH_REQTYPE_OUT | USBH_REQTYPE_CLASS | USBH_REQTYPE_DEVICE) << 8) \
 +#define SetHubFeature     (((USBH_REQTYPE_DIR_OUT | USBH_REQTYPE_TYPE_CLASS | USBH_REQTYPE_RECIP_DEVICE) << 8) \
  							| USBH_REQ_SET_FEATURE)
 -#define ClearPortFeature   (((USBH_REQTYPE_OUT | USBH_REQTYPE_CLASS | USBH_REQTYPE_OTHER) << 8) \
 +#define ClearPortFeature   (((USBH_REQTYPE_DIR_OUT | USBH_REQTYPE_TYPE_CLASS | USBH_REQTYPE_RECIP_OTHER) << 8) \
  							| USBH_REQ_CLEAR_FEATURE)
 -#define SetPortFeature     (((USBH_REQTYPE_OUT | USBH_REQTYPE_CLASS | USBH_REQTYPE_OTHER) << 8) \
 +#define SetPortFeature     (((USBH_REQTYPE_DIR_OUT | USBH_REQTYPE_TYPE_CLASS | USBH_REQTYPE_RECIP_OTHER) << 8) \
  							| USBH_REQ_SET_FEATURE)
 -#define GetHubDescriptor  (((USBH_REQTYPE_IN | USBH_REQTYPE_CLASS | USBH_REQTYPE_DEVICE) << 8) \
 +#define GetHubDescriptor  (((USBH_REQTYPE_DIR_IN | USBH_REQTYPE_TYPE_CLASS | USBH_REQTYPE_RECIP_DEVICE) << 8) \
  							| USBH_REQ_GET_DESCRIPTOR)
 -#define GetHubStatus      (((USBH_REQTYPE_IN | USBH_REQTYPE_CLASS | USBH_REQTYPE_DEVICE) << 8) \
 +#define GetHubStatus      (((USBH_REQTYPE_DIR_IN | USBH_REQTYPE_TYPE_CLASS | USBH_REQTYPE_RECIP_DEVICE) << 8) \
  							| USBH_REQ_GET_STATUS)
 -#define GetPortStatus     (((USBH_REQTYPE_IN | USBH_REQTYPE_CLASS | USBH_REQTYPE_OTHER) << 8) \
 +#define GetPortStatus     (((USBH_REQTYPE_DIR_IN | USBH_REQTYPE_TYPE_CLASS | USBH_REQTYPE_RECIP_OTHER) << 8) \
  							| USBH_REQ_GET_STATUS)
 | 
