Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of USBHostWANDongle by
Diff: USBHost/USBHost.h
- Revision:
- 9:c9e9817c398c
- Parent:
- 8:0d1ec493842c
- Child:
- 10:08bce4cd973a
--- a/USBHost/USBHost.h Mon Jul 30 13:51:34 2012 +0000 +++ b/USBHost/USBHost.h Tue Jul 31 10:37:16 2012 +0000 @@ -21,7 +21,7 @@ #include "USBHALHost.h" #include "USBDeviceConnected.h" -#include "Endpoint.h" +#include "USBEndpoint.h" #include "IUSBEnumerator.h" #define MAX_DEVICE_NB 1 @@ -75,53 +75,53 @@ * Bulk read * * @param dev the bulk transfer will be done for this device - * @param ep endpoint which will be used to read a packet + * @param ep USBEndpoint which will be used to read a packet * @param buf pointer on a buffer where will be store the data received * @param len length of the transfer * @param blocking if true, the read is blocking (wait for completion) * * @returns status of the bulk read */ - USB_TYPE bulkRead(USBDeviceConnected * dev, Endpoint * ep, uint8_t * buf, uint32_t len, bool blocking = true) ; + USB_TYPE bulkRead(USBDeviceConnected * dev, USBEndpoint * ep, uint8_t * buf, uint32_t len, bool blocking = true) ; /* * Bulk write * * @param dev the bulk transfer will be done for this device - * @param ep endpoint which will be used to write a packet + * @param ep USBEndpoint which will be used to write a packet * @param buf pointer on a buffer which will be written * @param len length of the transfer * @param blocking if true, the write is blocking (wait for completion) * * @returns status of the bulk write */ - USB_TYPE bulkWrite(USBDeviceConnected * dev, Endpoint * ep, uint8_t * buf, uint32_t len, bool blocking = true) ; + USB_TYPE bulkWrite(USBDeviceConnected * dev, USBEndpoint * ep, uint8_t * buf, uint32_t len, bool blocking = true) ; /* * Interrupt read * * @param dev the bulk transfer will be done for this device - * @param ep endpoint which will be used to write a packet + * @param ep USBEndpoint which will be used to write a packet * @param buf pointer on a buffer which will be written * @param len length of the transfer * @param blocking if true, the read is blocking (wait for completion) * * @returns status of the interrupt read */ - USB_TYPE interruptRead(USBDeviceConnected * dev, Endpoint * ep, uint8_t * buf, uint32_t len, bool blocking = true) ; + USB_TYPE interruptRead(USBDeviceConnected * dev, USBEndpoint * ep, uint8_t * buf, uint32_t len, bool blocking = true) ; /* * Interrupt write * * @param dev the bulk transfer will be done for this device - * @param ep endpoint which will be used to write a packet + * @param ep USBEndpoint which will be used to write a packet * @param buf pointer on a buffer which will be written * @param len length of the transfer * @param blocking if true, the write is blocking (wait for completion) * * @returns status of the interrupt write */ - USB_TYPE interruptWrite(USBDeviceConnected * dev, Endpoint * ep, uint8_t * buf, uint32_t len, bool blocking = true) ; + USB_TYPE interruptWrite(USBDeviceConnected * dev, USBEndpoint * ep, uint8_t * buf, uint32_t len, bool blocking = true) ; /* * Enumerate a device. This method is responsible for: @@ -235,17 +235,17 @@ // endpoints - void unqueueEndpoint(Endpoint * ep) ; - Endpoint endpoints[MAX_ENDPOINT]; - Endpoint* volatile control; + void unqueueEndpoint(USBEndpoint * ep) ; + USBEndpoint endpoints[MAX_ENDPOINT]; + USBEndpoint* volatile control; - Endpoint* volatile headControlEndpoint; - Endpoint* volatile headBulkEndpoint; - Endpoint* volatile headInterruptEndpoint; + USBEndpoint* volatile headControlEndpoint; + USBEndpoint* volatile headBulkEndpoint; + USBEndpoint* volatile headInterruptEndpoint; - Endpoint* volatile tailControlEndpoint; - Endpoint* volatile tailBulkEndpoint; - Endpoint* volatile tailInterruptEndpoint; + USBEndpoint* volatile tailControlEndpoint; + USBEndpoint* volatile tailBulkEndpoint; + USBEndpoint* volatile tailInterruptEndpoint; bool controlEndpointAllocated; @@ -264,29 +264,29 @@ * * @return status of the transfer */ - USB_TYPE addTransfer(Endpoint * ed, uint8_t * buf, uint32_t len) ; + USB_TYPE addTransfer(USBEndpoint * ed, uint8_t * buf, uint32_t len) ; /* - * Link the endpoint to the linked list and attach an endpoint this endpoint to a device + * Link the USBEndpoint to the linked list and attach an USBEndpoint this USBEndpoint to a device * * @param dev pointer on a USBDeviceConnected object - * @param ep pointer on the Endpoint which will be added + * @param ep pointer on the USBEndpoint which will be added * * return true if successful */ - bool addEndpoint(USBDeviceConnected * dev, uint8_t intf_nb, Endpoint * ep) ; + bool addEndpoint(USBDeviceConnected * dev, uint8_t intf_nb, USBEndpoint * ep) ; /* - * Create an endpoint descriptor. Warning: the endpoint is not linked. + * Create an USBEndpoint descriptor. Warning: the USBEndpoint is not linked. * - * @param type endpoint type (CONTROL_ENDPOINT, BULK_ENDPOINT, INTERRUPT_ENDPOINT) - * @param dir endpoint direction (no meaning for CONTROL_ENDPOINT) - * @param size endpoint max packet size - * @param addr endpoint address + * @param type USBEndpoint type (CONTROL_ENDPOINT, BULK_ENDPOINT, INTERRUPT_ENDPOINT) + * @param dir USBEndpoint direction (no meaning for CONTROL_ENDPOINT) + * @param size USBEndpoint max packet size + * @param addr USBEndpoint address * - * @returns pointer on the Endpoint created + * @returns pointer on the USBEndpoint created */ - Endpoint * newEndpoint(ENDPOINT_TYPE type, ENDPOINT_DIRECTION dir, uint32_t size, uint8_t addr) ; + USBEndpoint * newEndpoint(ENDPOINT_TYPE type, ENDPOINT_DIRECTION dir, uint32_t size, uint8_t addr) ; // to store a setup packet