| LPCOpen Platform v1.03 LPCOpen Platform for NXP LPC Microcontrollers

- Main Page
- Modules
- Data Structures
- Files
- Related Pages

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
MassStorage_ucosiii.c File Reference
`#include "lpc43xx_dualcore_config.h"`
`#include "MassStorage.h"`
`#include "os.h"`
`#include "cpu.h"`
`#include "os_cfg_app.h"`

Go to the source code of this file.

## Macros
#define | USBMSDEV_STACK_SZ (1024)
#define | USBMSDEV_STACK_SZ_FULL 90u
#define | USBMSDEV_STACK_SZ_LIMIT (USBMSDEV_STACK_SZ * (100u - USBMSDEV_STACK_SZ_FULL)) / 100u

## Functions
static void | usb_msdev_func (void)
static void | usb_msdev_task (void *arg)
void | USBDEV_Init (void)
| USB Device example initialization.
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 for the user processing of a received SCSI command. This callback will fire each time the host sends a SCSI command which requires processing by the user application. Inside this callback the user is responsible for the processing of the received SCSI command from the host. The SCSI command is available in the CommandBlock structure inside the Mass Storage class state structure passed as a parameter to the callback function.
void | EVENT_USB_Device_TransferComplete (int logicalEP, int xfer_in)
| Mass Storage class device stack transfer complete callback.
void | usb_device_tasks (void)
| Dual Core USB device task.

## Variables
static OS_TCB | mem_tcb
static CPU_STK | mem_stack [USBMSDEV_STACK_SZ]
static USB_ClassInfo_MS_Device_t | Disk_MS_Interface

## Macro Definition Documentation

#define USBMSDEV_STACK_SZ (1024)

Definition at line 46 of file MassStorage_ucosiii.c.

#define USBMSDEV_STACK_SZ_FULL 90u

Definition at line 47 of file MassStorage_ucosiii.c.

#define USBMSDEV_STACK_SZ_LIMIT (USBMSDEV_STACK_SZ * (100u - USBMSDEV_STACK_SZ_FULL)) / 100u

Definition at line 48 of file MassStorage_ucosiii.c.

## Function Documentation

void EVENT_USB_Device_TransferComplete | ( | int | logicalEP,
|  | int | xfer_in
| ) |  |

Mass Storage class device stack transfer complete callback.

Parameters

  logicalEP | : Logical Endpoint number causing the event
  xfer_in | : 1 if event is IN, 0 when event is OUT

Returns
  None Mass Storage class driver callback function for the reception or completion of any transfers.

Parameters

  [in] | logicalEP | Logical Endpoint number causing the event
  [in] | xfer_in | 1 if event is IN, 0 when event is OUT

Returns
  None

Definition at line 157 of file MassStorage_ucosiii.c.

static void usb_msdev_func | ( | void |  | ) |
| static

Main program entry point. This routine contains the overall program flow, including initial setup of all components and the main program loop.

Definition at line 76 of file MassStorage_ucosiii.c.

static void usb_msdev_task | ( | void * | arg | ) |
| static

Definition at line 85 of file MassStorage_ucosiii.c.

## Variable Documentation

USB_ClassInfo_MS_Device_t Disk_MS_Interface
| static

Initial value:
= {
.Config = {
.InterfaceNumber = 0,
.DataINEndpointNumber = MASS_STORAGE_IN_EPNUM,
.DataINEndpointSize = MASS_STORAGE_IO_EPSIZE,
.DataINEndpointDoubleBank = false,
.DataOUTEndpointNumber = MASS_STORAGE_OUT_EPNUM,
.DataOUTEndpointSize = MASS_STORAGE_IO_EPSIZE,
.DataOUTEndpointDoubleBank = false,
.TotalLUNs = TOTAL_LUNS,
},
}

nxpUSBlib Mass Storage Class driver interface configuration and state information. This structure is passed to all Mass Storage Class driver functions, so that multiple instances of the same class within a device can be differentiated from one another.

Definition at line 57 of file MassStorage_ucosiii.c.

CPU_STK mem_stack[USBMSDEV_STACK_SZ]
| static

Definition at line 51 of file MassStorage_ucosiii.c.

OS_TCB mem_tcb
| static

Definition at line 50 of file MassStorage_ucosiii.c.