Prusa MINI Firmware overview
|
#include "Usb.h"
Go to the source code of this file.
Classes | |
struct | Capacity |
struct | BASICCDB |
struct | CDB6 |
struct | CDB10 |
struct | CDB12 |
struct | CDB_LBA32_16 |
struct | CDB_LBA64_16 |
struct | InquiryResponse |
struct | CommandBlockWrapperBase |
struct | CommandBlockWrapper |
struct | CommandStatusWrapper |
struct | RequestSenseResponce |
class | BulkOnly |
Typedefs | |
typedef BASICCDB | BASICCDB_t |
typedef CDB6 | CDB6_t |
typedef CDB10 | CDB10_t |
typedef CDB12 | CDB12_t |
Functions | |
struct Capacity | __attribute__ ((packed)) |
CDB6 (uint8_t _Opcode, uint8_t _LUN, uint32_t LBA, uint8_t _AllocationLength, uint8_t _Control) | |
CDB6 (uint8_t _Opcode, uint8_t _LUN, uint8_t _AllocationLength, uint8_t _Control) | |
CDB10 (uint8_t _Opcode, uint8_t _LUN) | |
CDB10 (uint8_t _Opcode, uint8_t _LUN, uint16_t xflen, uint32_t _LBA) | |
CommandBlockWrapperBase () | |
CommandBlockWrapperBase (uint32_t tag, uint32_t xflen, uint8_t flgs) | |
CommandBlockWrapper () | |
CommandBlockWrapper (uint32_t tag, uint32_t xflen, uint8_t flgs, uint8_t lu, uint8_t cmdlen, uint8_t cmd) | |
CommandBlockWrapper (uint32_t tag, uint32_t xflen, CDB6_t *cdb, uint8_t dir) | |
CommandBlockWrapper (uint32_t tag, uint32_t xflen, CDB10_t *cdb, uint8_t dir) | |
#define MS_WANT_PARSER 0 |
Copyright (C) 2011 Circuits At Home, LTD. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Circuits At Home, LTD Web : http://www.circuitsathome.com e-mail : suppo rt@c ircui tsat home. com
#define bmREQ_MASSOUT USB_SETUP_HOST_TO_DEVICE|USB_SETUP_TYPE_CLASS|USB_SETUP_RECIPIENT_INTERFACE |
#define bmREQ_MASSIN USB_SETUP_DEVICE_TO_HOST|USB_SETUP_TYPE_CLASS|USB_SETUP_RECIPIENT_INTERFACE |
#define MASS_SUBCLASS_SCSI_NOT_REPORTED 0x00 |
#define MASS_SUBCLASS_RBC 0x01 |
#define MASS_SUBCLASS_ATAPI 0x02 |
#define MASS_SUBCLASS_OBSOLETE1 0x03 |
#define MASS_SUBCLASS_UFI 0x04 |
#define MASS_SUBCLASS_OBSOLETE2 0x05 |
#define MASS_SUBCLASS_SCSI 0x06 |
#define MASS_SUBCLASS_LSDFS 0x07 |
#define MASS_SUBCLASS_IEEE1667 0x08 |
#define MASS_PROTO_CBI 0x00 |
#define MASS_PROTO_CBI_NO_INT 0x01 |
#define MASS_PROTO_OBSOLETE 0x02 |
#define MASS_PROTO_BBB 0x50 |
#define MASS_PROTO_UAS 0x62 |
#define MASS_REQ_ADSC 0x00 |
#define MASS_REQ_GET 0xFC |
#define MASS_REQ_PUT 0xFD |
#define MASS_REQ_GET_MAX_LUN 0xFE |
#define MASS_REQ_BOMSR 0xFF |
#define MASS_CBW_SIGNATURE 0x43425355 |
#define MASS_CSW_SIGNATURE 0x53425355 |
#define MASS_CMD_DIR_OUT 0 |
#define MASS_CMD_DIR_IN 0x80 |
#define SCSI_CMD_TEST_UNIT_READY 0x00 |
#define SCSI_CMD_REQUEST_SENSE 0x03 |
#define SCSI_CMD_FORMAT_UNIT 0x04 |
#define SCSI_CMD_READ_6 0x08 |
#define SCSI_CMD_WRITE_6 0x0A |
#define SCSI_CMD_INQUIRY 0x12 |
#define SCSI_CMD_MODE_SELECT_6 0x15 |
#define SCSI_CMD_MODE_SENSE_6 0x1A |
#define SCSI_CMD_START_STOP_UNIT 0x1B |
#define SCSI_CMD_PREVENT_REMOVAL 0x1E |
#define SCSI_CMD_READ_FORMAT_CAPACITIES 0x23 |
#define SCSI_CMD_READ_CAPACITY_10 0x25 |
#define SCSI_CMD_READ_10 0x28 |
#define SCSI_CMD_WRITE_10 0x2A |
#define SCSI_CMD_SEEK_10 0x2B |
#define SCSI_CMD_ERASE_10 0x2C |
#define SCSI_CMD_WRITE_AND_VERIFY_10 0x2E |
#define SCSI_CMD_VERIFY_10 0x2F |
#define SCSI_CMD_SYNCHRONIZE_CACHE 0x35 |
#define SCSI_CMD_WRITE_BUFFER 0x3B |
#define SCSI_CMD_READ_BUFFER 0x3C |
#define SCSI_CMD_READ_SUBCHANNEL 0x42 |
#define SCSI_CMD_READ_TOC 0x43 |
#define SCSI_CMD_READ_HEADER 0x44 |
#define SCSI_CMD_PLAY_AUDIO_10 0x45 |
#define SCSI_CMD_GET_CONFIGURATION 0x46 |
#define SCSI_CMD_PLAY_AUDIO_MSF 0x47 |
#define SCSI_CMD_PLAY_AUDIO_TI 0x48 |
#define SCSI_CMD_PLAY_TRACK_REL_10 0x49 |
#define SCSI_CMD_GET_EVENT_STATUS 0x4A |
#define SCSI_CMD_PAUSE_RESUME 0x4B |
#define SCSI_CMD_READ_DISC_INFORMATION 0x51 |
#define SCSI_CMD_READ_TRACK_INFORMATION 0x52 |
#define SCSI_CMD_RESERVE_TRACK 0x53 |
#define SCSI_CMD_SEND_OPC_INFORMATION 0x54 |
#define SCSI_CMD_MODE_SELECT_10 0x55 |
#define SCSI_CMD_REPAIR_TRACK 0x58 |
#define SCSI_CMD_MODE_SENSE_10 0x5A |
#define SCSI_CMD_CLOSE_TRACK_SESSION 0x5B |
#define SCSI_CMD_READ_BUFFER_CAPACITY 0x5C |
#define SCSI_CMD_SEND_CUE_SHEET 0x5D |
#define SCSI_CMD_REPORT_LUNS 0xA0 |
#define SCSI_CMD_BLANK 0xA1 |
#define SCSI_CMD_SECURITY_PROTOCOL_IN 0xA2 |
#define SCSI_CMD_SEND_KEY 0xA3 |
#define SCSI_CMD_REPORT_KEY 0xA4 |
#define SCSI_CMD_PLAY_AUDIO_12 0xA5 |
#define SCSI_CMD_LOAD_UNLOAD 0xA6 |
#define SCSI_CMD_SET_READ_AHEAD 0xA7 |
#define SCSI_CMD_READ_12 0xA8 |
#define SCSI_CMD_PLAY_TRACK_REL_12 0xA9 |
#define SCSI_CMD_WRITE_12 0xAA |
#define SCSI_CMD_READ_MEDIA_SERIAL_12 0xAB |
#define SCSI_CMD_GET_PERFORMANCE 0xAC |
#define SCSI_CMD_READ_DVD_STRUCTURE 0xAD |
#define SCSI_CMD_SECURITY_PROTOCOL_OUT 0xB5 |
#define SCSI_CMD_SET_STREAMING 0xB6 |
#define SCSI_CMD_READ_MSF 0xB9 |
#define SCSI_CMD_SET_SPEED 0xBB |
#define SCSI_CMD_MECHANISM_STATUS 0xBD |
#define SCSI_CMD_READ_CD 0xBE |
#define SCSI_CMD_SEND_DISC_STRUCTURE 0xBF |
#define SCSI_CMD_CD_PLAYBACK_STATUS 0xC4 /* SONY unique */ |
#define SCSI_CMD_PLAYBACK_CONTROL 0xC9 /* SONY unique */ |
#define SCSI_CMD_READ_CDDA 0xD8 /* Vendor unique */ |
#define SCSI_CMD_READ_CDXA 0xDB /* Vendor unique */ |
#define SCSI_CMD_READ_ALL_SUBCODES 0xDF /* Vendor unique */ |
#define SCSI_S_NOT_READY 0x02 |
#define SCSI_S_MEDIUM_ERROR 0x03 |
#define SCSI_S_ILLEGAL_REQUEST 0x05 |
#define SCSI_S_UNIT_ATTENTION 0x06 |
#define SCSI_ASC_LBA_OUT_OF_RANGE 0x21 |
#define SCSI_ASC_MEDIA_CHANGED 0x28 |
#define SCSI_ASC_MEDIUM_NOT_PRESENT 0x3A |
#define MASS_ERR_SUCCESS 0x00 |
#define MASS_ERR_PHASE_ERROR 0x02 |
#define MASS_ERR_UNIT_NOT_READY 0x03 |
#define MASS_ERR_UNIT_BUSY 0x04 |
#define MASS_ERR_STALL 0x05 |
#define MASS_ERR_CMD_NOT_SUPPORTED 0x06 |
#define MASS_ERR_INVALID_CSW 0x07 |
#define MASS_ERR_NO_MEDIA 0x08 |
#define MASS_ERR_BAD_LBA 0x09 |
#define MASS_ERR_MEDIA_CHANGED 0x0A |
#define MASS_ERR_DEVICE_DISCONNECTED 0x11 |
#define MASS_ERR_UNABLE_TO_RECOVER 0x12 |
#define MASS_ERR_INVALID_LUN 0x13 |
#define MASS_ERR_WRITE_STALL 0x14 |
#define MASS_ERR_READ_NAKS 0x15 |
#define MASS_ERR_WRITE_NAKS 0x16 |
#define MASS_ERR_WRITE_PROTECTED 0x17 |
#define MASS_ERR_NOT_IMPLEMENTED 0xFD |
#define MASS_ERR_GENERAL_SCSI_ERROR 0xFE |
#define MASS_ERR_GENERAL_USB_ERROR 0xFF |
#define MASS_ERR_USER 0xA0 |
#define MASS_TRANS_FLG_CALLBACK 0x01 |
#define MASS_TRANS_FLG_NO_STALL_CHECK 0x02 |
#define MASS_TRANS_FLG_NO_PHASE_CHECK 0x04 |
#define MASS_MAX_ENDPOINTS 3 |
typedef BASICCDB BASICCDB_t |
struct Capacity __attribute__ | ( | (packed) | ) |
__attribute__::CommandBlockWrapperBase | ( | uint32_t | tag, |
uint32_t | xflen, | ||
uint8_t | flgs | ||
) |
__attribute__::CommandBlockWrapper | ( | uint32_t | tag, |
uint32_t | xflen, | ||
uint8_t | flgs, | ||
uint8_t | lu, | ||
uint8_t | cmdlen, | ||
uint8_t | cmd | ||
) |
uint8_t data[8] |
uint8_t Opcode |
unsigned unused |
unsigned LUN |
uint8_t info[12] |
unsigned LBAMSB |
uint8_t LBAHB |
uint8_t LBALB |
uint8_t AllocationLength |
uint8_t Control |
unsigned Service_Action |
uint8_t LBA_L_M_MB |
uint8_t LBA_L_M_LB |
uint8_t LBA_L_L_MB |
uint8_t LBA_L_L_LB |
uint8_t Misc2 |
uint8_t ALC_MB |
uint8_t ALC_LB |
uint8_t Misc |
uint8_t ALC_M_LB |
uint8_t ALC_L_MB |
uint8_t ALC_L_LB |
uint8_t A_M_M_MB |
uint8_t A_M_M_LB |
uint8_t A_M_L_MB |
uint8_t A_M_L_LB |
uint8_t ALC_M_MB |
uint8_t LBA_M_M_MB |
uint8_t LBA_M_M_LB |
uint8_t LBA_M_L_MB |
uint8_t LBA_M_L_LB |
uint8_t DeviceType |
uint8_t PeripheralQualifier |
unsigned Reserved |
unsigned Removable |
uint8_t Version |
unsigned ResponseDataFormat |
unsigned HISUP |
unsigned NormACA |
unsigned TrmTsk |
unsigned AERC |
uint8_t AdditionalLength |
unsigned PROTECT |
unsigned Res |
unsigned ThreePC |
unsigned TPGS |
unsigned ACC |
unsigned SCCS |
unsigned ADDR16 |
unsigned R1 |
unsigned R2 |
unsigned MCHNGR |
unsigned MULTIP |
unsigned VS |
unsigned ENCSERV |
unsigned BQUE |
unsigned SoftReset |
unsigned CmdQue |
unsigned Reserved4 |
unsigned Linked |
unsigned Sync |
unsigned WideBus16Bit |
unsigned WideBus32Bit |
unsigned RelAddr |
uint8_t VendorID[8] |
uint8_t ProductID[16] |
uint8_t RevisionID[4] |
uint32_t dCBWSignature |
uint32_t dCBWTag |
uint32_t dCBWDataTransferLength |
uint8_t bmCBWFlags |
uint8_t bmCBWLUN |
uint8_t bmReserved1 |
struct { ... } |
uint8_t bmCBWCBLength |
uint8_t bmReserved2 |
struct { ... } |
uint8_t CBWCB[16] |
uint32_t dCSWSignature |
uint32_t dCSWTag |
uint32_t dCSWDataResidue |
uint8_t bCSWStatus |
uint8_t bResponseCode |
uint8_t bSegmentNumber |
uint8_t bmSenseKey |
uint8_t bmReserved |
uint8_t bmILI |
uint8_t bmEOM |
uint8_t bmFileMark |
uint8_t Information[4] |
uint8_t bAdditionalLength |
uint8_t CmdSpecificInformation[4] |
uint8_t bAdditionalSenseCode |
uint8_t bAdditionalSenseQualifier |
uint8_t bFieldReplaceableUnitCode |
uint8_t SenseKeySpecific[3] |