LPCOpen Platform  v1.03
LPCOpen Platform for NXP LPC Microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
fsusb_cfg.h File Reference
#include <string.h>
#include "ffconf.h"
#include "diskio.h"
#include "board.h"
#include "MassStorageHost.h"

Go to the source code of this file.

Macro Definition Documentation

#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 Documentation

Definition at line 46 of file fsusb_cfg.h.

Function Documentation

int FSUSB_DiskAcquire ( DISK_HANDLE_T hDisk)

Enumerate and get the disk connected.

Parameters
hDisk: Handle to the USB Disk data structure
Returns
1 on success, 0 on failure

Definition at line 331 of file MassStorageHost.c.

uint32_t FSUSB_DiskGetSectorCnt ( DISK_HANDLE_T hDisk)

Get the number of sectors in the disk.

Parameters
hDisk: Handle to USB disk
Returns
Number of sectors in the 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.

Parameters
hDisk: Handle to the USB Disk
Returns
Number of bytes in a single sector of the disk

Definition at line 367 of file MassStorageHost.c.

DISK_HANDLE_T* FSUSB_DiskInit ( void  )

Initialize the disk data structure.

Returns
Pointer to the disk data strucuture

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.

Parameters
hDisk: Handle to USB Disk
Returns
1 on success and 0 on failure

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.

Parameters
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
Returns
1 on success and 0 on failure

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.

Parameters
hDisk: Pointer to Disk Handle
tout: Time to wait, in milliseconds
Returns
0 when operation failed 1 when successfully completed

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.

Parameters
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
Returns
1 on success and 0 on failure

Definition at line 384 of file MassStorageHost.c.

void rtc_initialize ( void  )

RTC initialization function

Definition at line 19 of file rtc.c.