Zerocat Chipflasher  v0.4.3 (board-edition-1)
Flash free firmware to BIOS chips, kick the Manageability Engine.
key-enable-bits.h
Go to the documentation of this file.
1 /******************************************************************/
32 #ifndef __KEY_ENABLE_BITS_H__
33 #define __KEY_ENABLE_BITS_H__
34 
35 //Key Enable IDs
36 #define KEYID_q 0
37 #define KEYID_d 1
38 #define KEYID_t 2
39 #define KEYID_p 3
40 
41 #define KEYID_s 4
42 #define KEYID_S 5
43 #define KEYID_k 6
44 #define KEYID_K 7
45 
46 #define KEYID_b 8
47 #define KEYID_B 9
48 #define KEYID_c 10
49 #define KEYID_C 11
50 
51 #define KEYID_I 12
52 #define KEYID_f 13
53 #define KEYID_G 14
54 #define KEYID_r 15
55 
56 #define KEYID_W 16
57 #define KEYID_m 17
58 #define KEYID_X 18
59 
60 #define ID_NONE 31 //special ID for "no key"
61 
62 // Key Enable Register Bits
63 #define KEYBIT_q (1 << KEYID_q)
64 #define KEYBIT_d (1 << KEYID_d)
65 #define KEYBIT_t (1 << KEYID_t)
66 #define KEYBIT_p (1 << KEYID_p)
67 
68 #define KEYBIT_s (1 << KEYID_s)
69 #define KEYBIT_S (1 << KEYID_S)
70 #define KEYBIT_k (1 << KEYID_k)
71 #define KEYBIT_K (1 << KEYID_K)
72 
73 #define KEYBIT_b (1 << KEYID_b)
74 #define KEYBIT_B (1 << KEYID_B)
75 #define KEYBIT_c (1 << KEYID_c)
76 #define KEYBIT_C (1 << KEYID_C)
77 
78 #define KEYBIT_I (1 << KEYID_I)
79 #define KEYBIT_f (1 << KEYID_f)
80 #define KEYBIT_G (1 << KEYID_G)
81 #define KEYBIT_r (1 << KEYID_r)
82 
83 #define KEYBIT_W (1 << KEYID_W)
84 #define KEYBIT_m (1 << KEYID_m)
85 
86 #define KEYBIT_X (1 << KEYID_X)
87 
88 //default keyreg value
89 #define KEYREG_DEFAULT KEYBIT_q | KEYBIT_d | KEYBIT_f | KEYBIT_t;
90 
91 unsigned int keyreg = 0;
92 
93 /*
94  * NOTE Keep the initial string format layout (i.e. "[x] some-text-here"),
95  * because string position 1 and 3 (i.e. 'x' and ' ') are scanned for
96  * key input comparison. Do not use <space> as a key symbol on position
97  * three.
98  */
99 char *keymsg[] = {
100  "[q] (SPI off)/cancel/quit",//0
101  "[d] detect chip", //1
102  "[t] toggle format", //2
103  "[p] read page ", //3
104 
105  "[s] 4k block read", //4
106  "[S] 4k block erase", //5
107  "[k] 32k block read", //6
108  "[K] 32k block erase", //7
109 
110  "[b] 64k block read", //8
111  "[B] 64k block erase", //9
112  "[c] read chip ", //10
113  "[C] erase chip", //11
114 
115  "[I] flash file", //12
116  "[f] force chip", //13
117  "[G] global sector protect",//14
118  "[r] show status register", //15
119 
120  "[W] set status register", //16
121  "[m] read random", //17
122  "[X] global sector unprotect" //18
123 };
124 
125 #endif
126 /* __KEY_ENABLE_BITS_H__ */
keymsg
char * keymsg[]
Definition: key-enable-bits.h:99
keyreg
unsigned int keyreg
Definition: key-enable-bits.h:91