#include <mios32.h>
#include <string.h>
#include "usbdebug.h"
#include "usbapi.h"
#include "msc_bot.h"
#include "msc_scsi.h"
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) |
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.
#define CBW_SIGNATURE 0x43425355 |
magic word in CBW
#define CSW_SIGNATURE 0x53425355 |
magic word in CSW
#define STATUS_FAILED 0x01 |
failed transfer
#define STATUS_PASSED 0x00 |
successful transfer
#define STATUS_PHASE_ERR 0x02 |
conflict between host and device
enum EBotState |
Handles the BOT bulk IN endpoint
[in] | bEP | Endpoint number |
[in] | bEPStatus | Endpoint status (indicates NAK, STALL, etc) |
Handles the BOT bulk OUT endpoint
[in] | bEP | Endpoint number |
[in] | bEPStatus | Endpoint status (indicates NAK, STALL, etc) |
void MSCBotReset | ( | void | ) |
Resets the BOT state machine