Home | History | Annotate | Download | only in examples

Lines Matching refs:cdb

316 	uint8_t *cdb, uint8_t direction, int data_length, uint32_t *ret_tag)
323 if (cdb == NULL) {
332 cdb_len = cdb_length[cdb[0]];
335 cdb[0], cdb_len);
351 memcpy(cbw.CBWCB, cdb, cdb_len);
367 printf(" sent %d CDB bytes\n", cdb_len);
420 uint8_t cdb[16]; // SCSI Command Descriptor Block
429 memset(cdb, 0, sizeof(cdb));
430 cdb[0] = 0x03; // Request Sense
431 cdb[4] = REQUEST_SENSE_LENGTH;
433 send_mass_storage_command(handle, endpoint_out, 0, cdb, LIBUSB_ENDPOINT_IN, REQUEST_SENSE_LENGTH, &expected_tag);
461 uint8_t cdb[16]; // SCSI Command Descriptor Block
482 memset(cdb, 0, sizeof(cdb));
483 cdb[0] = 0x12; // Inquiry
484 cdb[4] = INQUIRY_LENGTH;
486 send_mass_storage_command(handle, endpoint_out, lun, cdb, LIBUSB_ENDPOINT_IN, INQUIRY_LENGTH, &expected_tag);
506 memset(cdb, 0, sizeof(cdb));
507 cdb[0] = 0x25; // Read Capacity
509 send_mass_storage_command(handle, endpoint_out, lun, cdb, LIBUSB_ENDPOINT_IN, READ_CAPACITY_LENGTH, &expected_tag);
529 memset(cdb, 0, sizeof(cdb));
531 cdb[0] = 0x28; // Read(10)
532 cdb[8] = 0x01; // 1 block
534 send_mass_storage_command(handle, endpoint_out, lun, cdb, LIBUSB_ENDPOINT_IN, block_size, &expected_tag);