SAMV71 Xplained Ultra Software Package 1.3

MSDDStateMachine.h File Reference

#include "MSD.h"
#include "MSDLun.h"
#include <USBDDriver.h>
#include <USBLib_Trace.h>

Go to the source code of this file.

Data Structures

struct  MSDTransfer
struct  MSDCommandState
struct  MSDDriver

Defines

#define MSDD_STATE_READ_CBW   (1 << 0)
 Driver is expecting a command block wrapper.
#define MSDD_STATE_WAIT_CBW   (1 << 1)
 Driver is waiting for the transfer to finish.
#define MSDD_STATE_PROCESS_CBW   (1 << 2)
 Driver is processing the received command.
#define MSDD_STATE_WAIT_HALT   (1 << 3)
 Driver is halted because pipe halt or wait reset.
#define MSDD_STATE_SEND_CSW   (1 << 4)
 Driver is starting the transmission of a command status wrapper.
#define MSDD_STATE_WAIT_CSW   (1 << 5)
 Driver is waiting for the CSW transmission to finish.
#define MSDD_STATE_WAIT_RESET   (1 << 6)
 Driver is waiting for the MassStorageReset.
#define MSDD_STATUS_SUCCESS   0x00
 Method was successful.
#define MSDD_STATUS_ERROR   0x01
 There was an error when trying to perform a method.
#define MSDD_STATUS_INCOMPLETE   0x02
 No error was encountered but the application should call the method again to continue the operation.
#define MSDD_STATUS_PARAMETER   0x03
 A wrong parameter has been passed to the method.
#define MSDD_STATUS_RW   0x04
 An error when reading/writing disk (protected or not present).
#define MSDD_CASE_PHASE_ERROR   (1 << 0)
 Indicates that the CSW should report a phase error.
#define MSDD_CASE_STALL_IN   (1 << 1)
 The driver should halt the Bulk IN pipe after the transfer.
#define MSDD_CASE_STALL_OUT   (1 << 2)
 The driver should halt the Bulk OUT pipe after the transfer.
#define MSDD_DEVICE_TO_HOST   0
#define MSDD_HOST_TO_DEVICE   1
#define MSDD_NO_TRANSFER   2

Functions

void MSDD_StateMachine (MSDDriver *pMsdDriver)

Detailed Description

Purpose

Definitions, structs, functions required by a Mass Storage device driver state machine..

Usage

-----------------------------------------------------------------------------

Definition in file MSDDStateMachine.h.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines