SAMV71 Xplained Ultra Software Package 1.5

MSDDriver.h File Reference

#include <stdint.h>
#include <MSDLun.h>
#include <MSD.h>
#include <MSDDStateMachine.h>
#include <MSDFunction.h>

Go to the source code of this file.

Data Structures

struct  _MSDConfigurationDescriptors
struct  _MSDConfigurationDescriptorsOTG

Functions

struct _MSDConfigurationDescriptors __attribute__ ((__packed__)) SBCTestUnitReady
 SBCTestUnitReady Data structure for the TEST UNIT READY command.
void MSDDriver_Initialize (const USBDDriverDescriptors *pDescriptors, MSDLun *luns, uint8_t numLuns)
void MSDDriver_RequestHandler (const USBGenericRequest *request)
void MSDDriver_ConfigurationChangeHandler (uint8_t cfgnum)

Variables

USBConfigurationDescriptor configuration
USBInterfaceDescriptor interface
USBEndpointDescriptor bulkOut
USBEndpointDescriptor bulkIn
USBOtgDescriptor otgDescriptor

Detailed Description

Purpose

Mass storage device driver implementation.

Usage

  1. Enable and setup USB related pins (see pio & board.h).
  2. Configure the memory interfaces used for Mass Storage LUNs (see memories, MSDLun.h).
  3. Instance the USB device configure descriptor as MSDConfigurationDescriptors or MSDConfigurationDescriptorsOTG defined. Interface number should be 0.
  4. Configure the USB MSD driver using MSDDriver_Initialize.
  5. Invoke MSDDriver_StateMachine in main loop to handle all Mass Storage operations.

Definition in file MSDDriver.h.


Variable Documentation

USBEndpointDescriptor bulkIn

Bulk-in endpoint descriptor.

Definition at line 101 of file MSDDriver.h.

USBEndpointDescriptor bulkOut

Bulk-out endpoint descriptor.

Definition at line 99 of file MSDDriver.h.

USBConfigurationDescriptor configuration

Standard configuration descriptor.

Definition at line 95 of file MSDDriver.h.

USBInterfaceDescriptor interface

Mass storage interface descriptor.

Definition at line 97 of file MSDDriver.h.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines