-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.h
75 lines (63 loc) · 1.85 KB
/
main.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/*
** Filename: USBSlaveBoms.h
**
** Automatically created by Application Wizard 1.4.2
**
** Part of solution USBSlaveBoms in project USBSlaveBoms
**
** Based on USBSlaveHIDKbd example by FTDI
**
** Modifications by Philip A. Polstra, Sr.
**
** Part of the USB Writeblocker Solution as presented at Blackhat Europe 2012
**
** Comments:
**
** Important: Sections between markers "FTDI:S*" and "FTDI:E*" will be overwritten by
** the Application Wizard
*/
#ifndef _USBSlaveBoms_H_
#define _USBSlaveBoms_H_
#include "vos.h"
/* FTDI:SHF Header Files */
#include "USB.h"
#include "USBSlave.h"
#include "USBHost.h"
#include "BomsDefs.h"
/* FTDI:EHF */
/* FTDI:SDC Driver Constants */
#define VOS_NUMBER_DEVICES 5
/* FTDI:EDC */
// for additional driver
#define VOS_DEV_USBHOST_2 0
#define VOS_DEV_USBHOSTBOMS 1
#define VOS_DEV_USBSLAVE_1 2
#define VOS_DEV_USBSLAVEBOMS 3
#define VOS_DEV_GPIO_PORT_E 4
/* FTDI:SXH Externs */
/* FTDI:EXH */
// define standard SCSI requests to be handled
#define BOMS_FORMAT_UNIT 0x04 //definitely block!
#define BOMS_INQUIRY 0x12
#define BOMS_MODE_SELECT_6 0x15
#define BOMS_MODE_SELECT_10 0x55
#define BOMS_MODE_SENSE_6 0x1a
#define BOMS_MODE_SENSE_10 0x5a
#define BOMS_PREVENT_ALLOW_REMOVAL 0x1e
#define BOMS_READ_6 0x08
#define BOMS_READ_10 0x28
#define BOMS_READ_12 0xa8
#define BOMS_READ_CAPACITY 0x25
#define BOMS_READ_FORMAT_CAPACITIES 0x23
#define BOMS_READ_TOC_PMA_ATIP 0x43
#define BOMS_REPORT_LUNS 0xa0
#define BOMS_REQUEST_SENSE 0x03
#define BOMS_SEND_DIAGNOSTIC 0x1d
#define BOMS_START_STOP_UNIT 0x1b
#define BOMS_SYCHRONIZE_CACHE 0x35
#define BOMS_TEST_UNIT_READY 0x00
#define BOMS_VERIFY 0x2f
#define BOMS_WRITE_6 0x0a //block
#define BOMS_WRITE_10 0x2a //block
#define BOMS_WRITE_12 0xaa //block
#endif /* _USBSlaveBoms_H_ */