core/usb/msc_bot.c File Reference

#include <string.h>
#include "lpcusb\target\type.h"
#include "lpcusb\target\debug.h"
#include "lpcusb\target\usbapi.h"
#include "msc_bot.h"
#include "msc_scsi.h"

Go to the source code of this file.

Data Structures

struct  TCBW
struct  TCSW

Defines

#define CBW_SIGNATURE   0x43425355
#define CSW_SIGNATURE   0x53425355
#define STATUS_PASSED   0x00
#define STATUS_FAILED   0x01
#define STATUS_PHASE_ERR   0x02

Enumerations

enum  EBotState {
  eCBW, eDataOut, eDataIn, eCSW,
  eStalled
}

Functions

void MSCBotReset (void)
void MSCBotBulkOut (U8 bEP, U8 bEPStatus)
void MSCBotBulkIn (U8 bEP, U8 bEPStatus)

Detailed Description

Bulk-only-transfer layer for mass storage.

This layers sits between the generic USB layers and the SCSI layer and performs data transfer according to the BOT protocol.

Definition in file msc_bot.c.


Define Documentation

#define CBW_SIGNATURE   0x43425355

magic word in CBW

Definition at line 74 of file msc_bot.c.

#define CSW_SIGNATURE   0x53425355

magic word in CSW

Definition at line 75 of file msc_bot.c.

#define STATUS_FAILED   0x01

failed transfer

Definition at line 78 of file msc_bot.c.

#define STATUS_PASSED   0x00

successful transfer

Definition at line 77 of file msc_bot.c.

#define STATUS_PHASE_ERR   0x02

conflict between host and device

Definition at line 79 of file msc_bot.c.


Enumeration Type Documentation

enum EBotState

States of BOT state machine

Definition at line 65 of file msc_bot.c.


Function Documentation

void MSCBotBulkIn ( U8  bEP,
U8  bEPStatus 
)

Handles the BOT bulk IN endpoint

Parameters:
[in] bEP Endpoint number
[in] bEPStatus Endpoint status (indicates NAK, STALL, etc)

Definition at line 366 of file msc_bot.c.

void MSCBotBulkOut ( U8  bEP,
U8  bEPStatus 
)

Handles the BOT bulk OUT endpoint

Parameters:
[in] bEP Endpoint number
[in] bEPStatus Endpoint status (indicates NAK, STALL, etc)

Definition at line 265 of file msc_bot.c.

void MSCBotReset ( void   ) 

Resets the BOT state machine

Definition at line 96 of file msc_bot.c.

 All Data Structures Files Functions Variables Typedefs Enumerations Defines

Generated by  doxygen 1.6.2