5 * Created on October 1, 2011, 11:29 PM
15 #include "stlink-common.h"
20 #define SG_TIMEOUT_SEC 1 // actually 1 is about 2 sec
21 // Each CDB can be a total of 6, 10, 12, or 16 bytes, later version
22 // of the SCSI standard also allow for variable-length CDBs (min. CDB is 6).
23 // the stlink needs max. 10 bytes.
31 // Query data flow direction.
35 // The SCSI Request Sense command is used to obtain sense data
36 // (error information) from a target device.
37 // http://en.wikipedia.org/wiki/SCSI_Request_Sense_Command
38 #define SENSE_BUF_LEN 32
42 #if defined(CONFIG_USE_LIBUSB)
47 unsigned char cdb_cmd_blk[CDB_SL];
49 int q_data_dir; // Q_DATA_IN, Q_DATA_OUT
50 // the start of the query data in the device memory space
53 // Sense (error information) data
54 unsigned char sense_buf[SENSE_BUF_LEN];
66 struct stlink_libsg {};
74 #endif /* STLINK_SG_H */