![]() |
LPCOpen Platform
v1.03
LPCOpen Platform for NXP LPC Microcontrollers
|
#include <string.h>#include "ffconf.h"#include "diskio.h"#include "board.h"#include "MassStorageHost.h"Go to the source code of this file.
| #define FSUSB_DiskGetBlockSz | ( | hDisk | ) | (4 * 1024) |
Definition at line 119 of file fsusb_cfg.h.
| #define FSUSB_InitRealTimeClock | ( | ) | rtc_initialize() |
Definition at line 106 of file fsusb_cfg.h.
| typedef USB_ClassInfo_MS_Host_t DISK_HANDLE_T |
Definition at line 46 of file fsusb_cfg.h.
| int FSUSB_DiskAcquire | ( | DISK_HANDLE_T * | hDisk | ) |
Enumerate and get the disk connected.
| hDisk | : Handle to the USB Disk data structure |
Definition at line 331 of file MassStorageHost.c.
| uint32_t FSUSB_DiskGetSectorCnt | ( | DISK_HANDLE_T * | hDisk | ) |
Get the number of sectors in the disk.
| hDisk | : Handle to USB disk |
Definition at line 361 of file MassStorageHost.c.
| uint32_t FSUSB_DiskGetSectorSz | ( | DISK_HANDLE_T * | hDisk | ) |
Get number of bytes in a sector of the disk.
| hDisk | : Handle to the USB Disk |
Definition at line 367 of file MassStorageHost.c.
| DISK_HANDLE_T* FSUSB_DiskInit | ( | void | ) |
Initialize the disk data structure.
Definition at line 315 of file MassStorageHost.c.
| int FSUSB_DiskInsertWait | ( | DISK_HANDLE_T * | hDisk | ) |
Wait for the USB device to be inserted and ready.
| hDisk | : Handle to USB Disk |
Definition at line 321 of file MassStorageHost.c.
| int FSUSB_DiskReadSectors | ( | DISK_HANDLE_T * | hDisk, |
| void * | buff, | ||
| uint32_t | secStart, | ||
| uint32_t | numSec | ||
| ) |
Reads sectors from USB mass storage disk.
| hDisk | : Handle to the USB disk |
| buff | : Pointer to memory where the data read will be stored |
| secStart | : Starting sector from which data be read |
| numSec | : Number of sectors to be read |
Definition at line 373 of file MassStorageHost.c.
| int FSUSB_DiskReadyWait | ( | DISK_HANDLE_T * | hDisk, |
| int | tout | ||
| ) |
Wait for the USB Disk to be ready.
| hDisk | : Pointer to Disk Handle |
| tout | : Time to wait, in milliseconds |
Definition at line 394 of file MassStorageHost.c.
| int FSUSB_DiskWriteSectors | ( | DISK_HANDLE_T * | hDisk, |
| void * | buff, | ||
| uint32_t | secStart, | ||
| uint32_t | numSec | ||
| ) |
Write data to USB device sectors.
| hDisk | : Handle to the USB disk |
| buff | : Pointer to memory where the data to be written, be stored |
| secStart | : Starting sector from which data be written |
| numSec | : Number of sectors to write |
Definition at line 384 of file MassStorageHost.c.