Simple USBHost library for STM32F746NG Discovery board. Only either the Fastspeed or the Highspeed port can be used( not both together)
Dependents: DISCO-F746NG_USB_Host
Fork of KL46Z-USBHost by
Diff: USBHost/USBHALHost.h
- Revision:
- 8:6463cd1964c0
- Parent:
- 5:10bfc10afcc8
- Child:
- 10:40c7f6788902
diff -r 9a20482c9a7a -r 6463cd1964c0 USBHost/USBHALHost.h --- a/USBHost/USBHALHost.h Tue Jan 28 06:50:12 2014 +0000 +++ b/USBHost/USBHALHost.h Fri Jan 31 13:45:07 2014 +0000 @@ -49,10 +49,9 @@ protected: USBHALHost(); void init(); - virtual bool enumeration() = 0; - bool lowSpeed; - void setAddr(int addr); - void setEndpoint(bool use_retry = false); + virtual bool addDevice(int port, int hub, bool lowSpeed) = 0; + void setAddr(int addr, bool lowSpeed = false); + void setEndpoint(); void token_transfer_init(); int token_setup(USBEndpoint* ep, SETUP_PACKET* setup, uint16_t wLength = 0); int token_in(USBEndpoint* ep, uint8_t* data = NULL, int size = 0, int retryLimit = 10); @@ -64,7 +63,8 @@ void UsbIrqhandler(); __IO bool attach_done; __IO bool token_done; - void wait_attach(); + bool wait_attach(); + bool root_lowSpeed; ODD_EVEN tx_ptr; ODD_EVEN rx_ptr; static USBHALHost * instHost;