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: USBHostMSD/USBHostMSD.h
- Revision:
- 25:7d6d9fc471bf
- Parent:
- 24:5396b6a93262
--- a/USBHostMSD/USBHostMSD.h Mon Jun 13 17:21:07 2016 +0000 +++ b/USBHostMSD/USBHostMSD.h Fri Jun 17 09:00:35 2016 +0000 @@ -24,7 +24,7 @@ #include "USBHost.h" #include "FATFileSystem.h" -/** +/** * A class to communicate a USB flash disk */ class USBHostMSD : public IUSBEnumerator, public FATFileSystem { @@ -34,7 +34,7 @@ * * @param rootdir mount name */ - USBHostMSD(int Interface,const char * rootdir); + USBHostMSD(const char * rootdir,int Interface); /** * Check if a MSD device is connected @@ -95,11 +95,11 @@ CSW csw; int SCSITransfer(uint8_t * cmd, uint8_t cmd_len, int flags, uint8_t * data, uint32_t transfer_len); - int testUnitReady(); + int testUnitReady(int i); int readCapacity(); int inquiry(uint8_t lun, uint8_t page_code); int SCSIRequestSense(); - int dataTransfer(uint8_t * buf, uint32_t block, uint8_t nbBlock, int direction); + int dataTransfer(uint8_t * buf, uint32_t block, uint32_t nbBlock, int direction); int checkResult(uint8_t res, USBEndpoint * ep); int getMaxLun(); @@ -109,7 +109,7 @@ int msd_intf; bool msd_device_found; bool disk_init; - + void init(); };