aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/include/usbh/dev/ftdi.h
diff options
context:
space:
mode:
authorDiego Ismirlian <dismirlian (at) google's mail.com>2017-06-05 10:18:45 -0300
committerDiego Ismirlian <dismirlian (at) google's mail.com>2017-06-05 10:18:45 -0300
commit5ecaf7722b5f1f9d0c41213fc5c129b451302f99 (patch)
tree4a4e2b746d6db725e3aacf8ff87e1a3a88e3dd4e /os/hal/include/usbh/dev/ftdi.h
parenteec17ec12e23b7f647d37a8d70df4df34632f8c1 (diff)
downloadChibiOS-Contrib-5ecaf7722b5f1f9d0c41213fc5c129b451302f99.tar.gz
ChibiOS-Contrib-5ecaf7722b5f1f9d0c41213fc5c129b451302f99.tar.bz2
ChibiOS-Contrib-5ecaf7722b5f1f9d0c41213fc5c129b451302f99.zip
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
Diffstat (limited to 'os/hal/include/usbh/dev/ftdi.h')
-rw-r--r--os/hal/include/usbh/dev/ftdi.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/os/hal/include/usbh/dev/ftdi.h b/os/hal/include/usbh/dev/ftdi.h
index ad6b4cd..27a6f12 100644
--- a/os/hal/include/usbh/dev/ftdi.h
+++ b/os/hal/include/usbh/dev/ftdi.h
@@ -96,7 +96,7 @@ struct USBHFTDIPortDriver {
usbh_urb_t iq_urb;
threads_queue_t iq_waiting;
uint32_t iq_counter;
- USBH_DEFINE_BUFFER(uint8_t, iq_buff[64]);
+ USBH_DECLARE_STRUCT_MEMBER(uint8_t iq_buff[64]);
uint8_t *iq_ptr;
@@ -104,7 +104,7 @@ struct USBHFTDIPortDriver {
usbh_urb_t oq_urb;
threads_queue_t oq_waiting;
uint32_t oq_counter;
- USBH_DEFINE_BUFFER(uint8_t, oq_buff[64]);
+ USBH_DECLARE_STRUCT_MEMBER(uint8_t oq_buff[64]);
uint8_t *oq_ptr;
virtual_timer_t vt;
@@ -113,7 +113,7 @@ struct USBHFTDIPortDriver {
USBHFTDIPortDriver *next;
};
-typedef struct USBHFTDIDriver {
+struct USBHFTDIDriver {
/* inherited from abstract class driver */
_usbh_base_classdriver_data
@@ -121,11 +121,12 @@ typedef struct USBHFTDIDriver {
USBHFTDIPortDriver *ports;
mutex_t mtx;
-} USBHFTDIDriver;
+};
/*===========================================================================*/
/* Driver macros. */
/*===========================================================================*/
+#define usbhftdipGetState(ftdipp) ((ftdipp)->state)
/*===========================================================================*/
@@ -144,6 +145,9 @@ extern "C" {
void usbhftdipObjectInit(USBHFTDIPortDriver *ftdipp);
void usbhftdipStart(USBHFTDIPortDriver *ftdipp, const USBHFTDIPortConfig *config);
void usbhftdipStop(USBHFTDIPortDriver *ftdipp);
+
+ /* global initializer */
+ void usbhftdiInit(void);
#ifdef __cplusplus
}
#endif