Prusa MINI Firmware overview
UHS_BULK_CommandBlockWrapper Struct Reference

#include <UHS_BULK_STORAGE.h>

Inheritance diagram for UHS_BULK_CommandBlockWrapper:
Collaboration diagram for UHS_BULK_CommandBlockWrapper:

Public Member Functions

 UHS_BULK_CommandBlockWrapper ()
 
 UHS_BULK_CommandBlockWrapper (uint32_t tag, uint32_t xflen, uint8_t flgs, uint8_t lu, uint8_t cmdlen, uint8_t cmd)
 
 UHS_BULK_CommandBlockWrapper (uint32_t tag, uint32_t xflen, SCSI_CDB6_t *cdb, uint8_t dir)
 
 UHS_BULK_CommandBlockWrapper (uint32_t tag, uint32_t xflen, SCSI_CDB10_t *cdb, uint8_t dir)
 
- Public Member Functions inherited from UHS_BULK_CommandBlockWrapperBase
 UHS_BULK_CommandBlockWrapperBase ()
 
 UHS_BULK_CommandBlockWrapperBase (uint32_t tag, uint32_t xflen, uint8_t flgs)
 

Public Attributes

struct {
   uint8_t   bmCBWLUN: 4
 
   uint8_t   bmReserved1: 4
 
}; 
 
struct {
   uint8_t   bmCBWCBLength: 4
 
   uint8_t   bmReserved2: 4
 
}; 
 
uint8_t CBWCB [16]
 
- Public Attributes inherited from UHS_BULK_CommandBlockWrapperBase
volatile uint32_t dCBWSignature
 
volatile uint32_t dCBWTag
 
volatile uint32_t dCBWDataTransferLength
 
volatile uint8_t bmCBWFlags
 

Constructor & Destructor Documentation

◆ UHS_BULK_CommandBlockWrapper() [1/4]

UHS_BULK_CommandBlockWrapper::UHS_BULK_CommandBlockWrapper ( )
126  :
128  for(int i = 0; i < 16; i++) CBWCB[i] = 0;
129  }

◆ UHS_BULK_CommandBlockWrapper() [2/4]

UHS_BULK_CommandBlockWrapper::UHS_BULK_CommandBlockWrapper ( uint32_t  tag,
uint32_t  xflen,
uint8_t  flgs,
uint8_t  lu,
uint8_t  cmdlen,
uint8_t  cmd 
)
133  :
134  UHS_BULK_CommandBlockWrapperBase(tag, xflen, flgs),
135  bmCBWLUN(lu), bmReserved1(0), bmCBWCBLength(cmdlen), bmReserved2(0) {
136  for(int i = 0; i < 16; i++) CBWCB[i] = 0;
137  SCSI_CDB_BASE_t *x = reinterpret_cast<SCSI_CDB_BASE_t *>(CBWCB);
138  x->LUN = cmd;
139  }

◆ UHS_BULK_CommandBlockWrapper() [3/4]

UHS_BULK_CommandBlockWrapper::UHS_BULK_CommandBlockWrapper ( uint32_t  tag,
uint32_t  xflen,
SCSI_CDB6_t cdb,
uint8_t  dir 
)
143  :
144  UHS_BULK_CommandBlockWrapperBase(tag, xflen, dir),
145  bmCBWLUN(cdb->LUN), bmReserved1(0), bmCBWCBLength(6), bmReserved2(0) {
146  memcpy(&CBWCB, cdb, 6);
147  }

◆ UHS_BULK_CommandBlockWrapper() [4/4]

UHS_BULK_CommandBlockWrapper::UHS_BULK_CommandBlockWrapper ( uint32_t  tag,
uint32_t  xflen,
SCSI_CDB10_t cdb,
uint8_t  dir 
)
150  :
151  UHS_BULK_CommandBlockWrapperBase(tag, xflen, dir),
152  bmCBWLUN(cdb->LUN), bmReserved1(0), bmCBWCBLength(10), bmReserved2(0) {
153  memcpy(&CBWCB, cdb, 10);
154  }

Member Data Documentation

◆ bmCBWLUN

uint8_t UHS_BULK_CommandBlockWrapper::bmCBWLUN

◆ bmReserved1

uint8_t UHS_BULK_CommandBlockWrapper::bmReserved1

◆ @47

struct { ... }

◆ bmCBWCBLength

uint8_t UHS_BULK_CommandBlockWrapper::bmCBWCBLength

◆ bmReserved2

uint8_t UHS_BULK_CommandBlockWrapper::bmReserved2

◆ @49

struct { ... }

◆ CBWCB

uint8_t UHS_BULK_CommandBlockWrapper::CBWCB[16]
UHS_BULK_CommandBlockWrapperBase::UHS_BULK_CommandBlockWrapperBase
UHS_BULK_CommandBlockWrapperBase()
Definition: UHS_BULK_STORAGE.h:101
SCSI_CDB_BASE
Definition: UHS_SCSI.h:124
UHS_BULK_CommandBlockWrapper::CBWCB
uint8_t CBWCB[16]
Definition: UHS_BULK_STORAGE.h:121
i
uint8_t i
Definition: screen_test_graph.c:72
SCSI_CDB6::LUN
unsigned LUN
Definition: UHS_SCSI.h:139
UHS_BULK_CommandBlockWrapper::bmCBWCBLength
uint8_t bmCBWCBLength
Definition: UHS_BULK_STORAGE.h:117
SCSI_CDB_BASE::LUN
unsigned LUN
Definition: UHS_SCSI.h:128
UHS_BULK_CommandBlockWrapper::bmCBWLUN
uint8_t bmCBWLUN
Definition: UHS_BULK_STORAGE.h:112
UHS_BULK_CommandBlockWrapper::bmReserved2
uint8_t bmReserved2
Definition: UHS_BULK_STORAGE.h:118
SCSI_CDB10::LUN
unsigned LUN
Definition: UHS_SCSI.h:165
UHS_BULK_CommandBlockWrapper::bmReserved1
uint8_t bmReserved1
Definition: UHS_BULK_STORAGE.h:113