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.
Dependents: UsbHostMAX3421E_Hello
Diff: UsbCore.h
- Revision:
- 1:2263e77400e9
- Parent:
- 0:84353c479782
--- a/UsbCore.h Sun Jul 12 20:39:26 2020 +0000 +++ b/UsbCore.h Mon Jul 13 07:03:06 2020 +0000 @@ -174,13 +174,13 @@ virtual void Parse(const uint16_t len, const uint8_t* pbuf, const uint16_t& offset) = 0; }; -class USB : public MAX3421E +class Usb : public MAX3421E { AddressPoolImpl<USB_NUMDEVICES> addrPool; USBDeviceConfig* devConfig[USB_NUMDEVICES]; uint8_t bmHubPre; public: - USB(PinName mosi, PinName miso, PinName sck, PinName ss, PinName intr); + Usb(PinName mosi, PinName miso, PinName sck, PinName ss, PinName intr); int8_t init(); void SetHubPreMask() { bmHubPre |= bmHUBPRE; } void ResetHubPreMask() { bmHubPre &= (~bmHUBPRE); } @@ -258,7 +258,7 @@ #if 0 //defined(USB_METHODS_INLINE) //get device descriptor -inline uint8_t USB::getDevDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t* dataptr) +inline uint8_t Usb::getDevDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t* dataptr) { return ( @@ -278,7 +278,7 @@ } //get configuration descriptor -inline uint8_t USB::getConfDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t conf, uint8_t* dataptr) +inline uint8_t Usb::getConfDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t conf, uint8_t* dataptr) { return ( @@ -298,7 +298,7 @@ } //get string descriptor -inline uint8_t USB::getStrDescr +inline uint8_t Usb::getStrDescr ( uint8_t addr, uint8_t ep, @@ -326,13 +326,13 @@ } //set address -inline uint8_t USB::setAddr(uint8_t oldaddr, uint8_t ep, uint8_t newaddr) +inline uint8_t Usb::setAddr(uint8_t oldaddr, uint8_t ep, uint8_t newaddr) { return(ctrlReq(oldaddr, ep, bmREQ_SET, USB_REQUEST_SET_ADDRESS, newaddr, 0x00, 0x0000, 0x0000, NULL)); } //set configuration -inline uint8_t USB::setConf(uint8_t addr, uint8_t ep, uint8_t conf_value) +inline uint8_t Usb::setConf(uint8_t addr, uint8_t ep, uint8_t conf_value) { return(ctrlReq(addr, ep, bmREQ_SET, USB_REQUEST_SET_CONFIGURATION, conf_value, 0x00, 0x0000, 0x0000, NULL)); }