LPCOpen Platform
LPCOpen Platform for NXP LPC Microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
LPCUSBlib Mass Storage Device Dual core example with FreeRTOS

Macros

#define LEDMASK_USB_NOTREADY   LEDS_LED1
 
#define LEDMASK_USB_ENUMERATING   (LEDS_LED2 | LEDS_LED3)
 
#define LEDMASK_USB_READY   (LEDS_LED2 | LEDS_LED4)
 
#define LEDMASK_USB_ERROR   (LEDS_LED1 | LEDS_LED3)
 
#define LEDMASK_USB_BUSY   LEDS_LED2
 
#define TOTAL_LUNS   1
 
#define LUN_MEDIA_BLOCKS   (VIRTUAL_MEMORY_BLOCKS / TOTAL_LUNS)
 
#define DISK_READ_ONLY   false
 

Functions

void SetupHardware (void)
 Hardware setup event callback function.
 
void EVENT_USB_Device_Connect (void)
 USB Device connect event callback.
 
void EVENT_USB_Device_Disconnect (void)
 USB Device disconnect event callback.
 
void EVENT_USB_Device_ConfigurationChanged (void)
 USB Device configuration change event callback.
 
void EVENT_USB_Device_ControlRequest (void)
 USB Device control request receive event callback.
 
bool CALLBACK_MS_Device_SCSICommandReceived (USB_ClassInfo_MS_Device_t *const MSInterfaceInfo)
 Mass Storage class driver callback function.
 

Detailed Description

The Mass Storage Device dual core example FreeRTOS version demonstrates the Mass Storage Device example using LPCUSBlib library with FreeRTOS. The LPC43XX will be enumerated as as Mass Storage Device when connected to the Host PC. The example can be configured to run on M4/M0 core. Please note that this example also uses the code from "LPCUSBlib Mass Storage Device Dual core example" stand-alone version. Hence please refer to stand-alone documentation also.

Macro Definition Documentation

#define DISK_READ_ONLY   false

Indicates if the disk is write protected or not.

Definition at line 83 of file MassStorage_freertos.h.

#define LEDMASK_USB_BUSY   LEDS_LED2

LED mask for the library LED driver, to indicate that the USB interface is busy.

Definition at line 74 of file MassStorage_freertos.h.

#define LEDMASK_USB_ENUMERATING   (LEDS_LED2 | LEDS_LED3)

LED mask for the library LED driver, to indicate that the USB interface is enumerating.

Definition at line 65 of file MassStorage_freertos.h.

#define LEDMASK_USB_ERROR   (LEDS_LED1 | LEDS_LED3)

LED mask for the library LED driver, to indicate that an error has occurred in the USB interface.

Definition at line 71 of file MassStorage_freertos.h.

#define LEDMASK_USB_NOTREADY   LEDS_LED1

LED mask for the library LED driver, to indicate that the USB interface is not ready.

Definition at line 62 of file MassStorage_freertos.h.

#define LEDMASK_USB_READY   (LEDS_LED2 | LEDS_LED4)

LED mask for the library LED driver, to indicate that the USB interface is ready.

Definition at line 68 of file MassStorage_freertos.h.

#define LUN_MEDIA_BLOCKS   (VIRTUAL_MEMORY_BLOCKS / TOTAL_LUNS)

Blocks in each LUN, calculated from the total capacity divided by the total number of Logical Units in the device.

Definition at line 80 of file MassStorage_freertos.h.

#define TOTAL_LUNS   1

Total number of logical drives within the device - must be non-zero.

Definition at line 77 of file MassStorage_freertos.h.

Function Documentation

bool CALLBACK_MS_Device_SCSICommandReceived ( USB_ClassInfo_MS_Device_t *const  MSInterfaceInfo)

Mass Storage class driver callback function.

Parameters
MSInterfaceInfo: Pointer to the Mass Storage class interface configuration structure
Returns
true : On success false : On failure Mass Storage class driver callback function for the reception of SCSI commands from the host, which must be processed.

Mass Storage class driver callback function the reception of SCSI commands from the host, which must be processed.

Definition at line 106 of file MassStorage.c.

void EVENT_USB_Device_ConfigurationChanged ( void  )

USB Device configuration change event callback.

Returns
None This is the USB Device configuration change event call back function

Event handler for the library USB Configuration Changed event.

Definition at line 92 of file MassStorage.c.

void EVENT_USB_Device_Connect ( void  )

USB Device connect event callback.

Returns
None This is the USB Device connect event call back function

Event handler for the library USB Connection event.

Definition at line 84 of file MassStorage.c.

void EVENT_USB_Device_ControlRequest ( void  )

USB Device control request receive event callback.

Returns
None This is the USB Device control request receive event call back function

Event handler for the library USB Control Request reception event.

Definition at line 100 of file MassStorage.c.

void EVENT_USB_Device_Disconnect ( void  )

USB Device disconnect event callback.

Returns
None This is the USB Device disconnect event call back function

Event handler for the library USB Disconnection event.

Definition at line 88 of file MassStorage.c.

void SetupHardware ( void  )

Hardware setup event callback function.

Returns
None This is the USB HW set up event call back function

Configures the board hardware and chip peripherals for the demo's functionality.

Under development, not working yet.

Under development, not working yet.

Under development, not working yet.

Under development, not working yet.

Under development, not working yet.

Definition at line 97 of file AudioInput.c.