SRD Standelone programmation box: decoder16Seg.h File Reference

| SRD Standelone programmation box 2.0 (16/11/15 10:00:00) Documentation of the SRD standelone programmation box

- Main Page
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Enumerations Enumerator Macros Pages
Data Structures | Functions
decoder16Seg.h File Reference

Headerfile for 16 segment decoder driver. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Data Structures

struct | t16SegDisplay
| Structure used to control all segments in a 16 segments display. More...

## Macros

#define | DECODER16SEG_A_SHIFT (0)
| Define mask and shift of segments on the 16 segments display. More...
#define | DECODER16SEG_A_MASK (1<<DECODER16SEG_A_SHIFT)
| Define mask and shift of segments on the 16 segments display. More...
#define | DECODER16SEG_B_SHIFT (1)
| Define mask and shift of segments on the 16 segments display. More...
#define | DECODER16SEG_B_MASK (1<<DECODER16SEG_B_SHIFT)
| Define mask and shift of segments on the 16 segments display. More...
#define | DECODER16SEG_C_SHIFT (2)
| Define mask and shift of segments on the 16 segments display. More...
#define | DECODER16SEG_C_MASK (1<<DECODER16SEG_C_SHIFT)
| Define mask and shift of segments on the 16 segments display. More...
#define | DECODER16SEG_D_SHIFT (3)
| Define mask and shift of segments on the 16 segments display. More...
#define | DECODER16SEG_D_MASK (1<<DECODER16SEG_D_SHIFT)
| Define mask and shift of segments on the 16 segments display. More...
#define | DECODER16SEG_E_SHIFT (4)
| Define mask and shift of segments on the 16 segments display. More...
#define | DECODER16SEG_E_MASK (1<<DECODER16SEG_E_SHIFT)
| Define mask and shift of segments on the 16 segments display. More...
#define | DECODER16SEG_F_SHIFT (5)
| Define mask and shift of segments on the 16 segments display. More...
#define | DECODER16SEG_F_MASK (1<<DECODER16SEG_F_SHIFT)
| Define mask and shift of segments on the 16 segments display. More...
#define | DECODER16SEG_G_SHIFT (6)
| Define mask and shift of segments on the 16 segments display. More...
#define | DECODER16SEG_G_MASK (1<<DECODER16SEG_G_SHIFT)
| Define mask and shift of segments on the 16 segments display. More...
#define | DECODER16SEG_H_SHIFT (7)
| Define mask and shift of segments on the 16 segments display. More...
#define | DECODER16SEG_H_MASK (1<<DECODER16SEG_H_SHIFT)
| Define mask and shift of segments on the 16 segments display. More...
#define | DECODER16SEG_K_SHIFT (8)
| Define mask and shift of segments on the 16 segments display. More...
#define | DECODER16SEG_K_MASK (1<<DECODER16SEG_K_SHIFT)
| Define mask and shift of segments on the 16 segments display. More...
#define | DECODER16SEG_M_SHIFT (9)
| Define mask and shift of segments on the 16 segments display. More...
#define | DECODER16SEG_M_MASK (1<<DECODER16SEG_M_SHIFT)
| Define mask and shift of segments on the 16 segments display. More...
#define | DECODER16SEG_N_SHIFT (10)
| Define mask and shift of segments on the 16 segments display. More...
#define | DECODER16SEG_N_MASK (1<<DECODER16SEG_N_SHIFT)
| Define mask and shift of segments on the 16 segments display. More...
#define | DECODER16SEG_P_SHIFT (11)
| Define mask and shift of segments on the 16 segments display. More...
#define | DECODER16SEG_P_MASK (1<<DECODER16SEG_P_SHIFT)
| Define mask and shift of segments on the 16 segments display. More...
#define | DECODER16SEG_U_SHIFT (12)
| Define mask and shift of segments on the 16 segments display. More...
#define | DECODER16SEG_U_MASK (1<<DECODER16SEG_U_SHIFT)
| Define mask and shift of segments on the 16 segments display. More...
#define | DECODER16SEG_T_SHIFT (13)
| Define mask and shift of segments on the 16 segments display. More...
#define | DECODER16SEG_T_MASK (1<<DECODER16SEG_T_SHIFT)
| Define mask and shift of segments on the 16 segments display. More...
#define | DECODER16SEG_S_SHIFT (14)
| Define mask and shift of segments on the 16 segments display. More...
#define | DECODER16SEG_S_MASK (1<<DECODER16SEG_S_SHIFT)
| Define mask and shift of segments on the 16 segments display. More...
#define | DECODER16SEG_R_SHIFT (15)
| Define mask and shift of segments on the 16 segments display. More...
#define | DECODER16SEG_R_MASK (1<<DECODER16SEG_R_SHIFT)
| Define mask and shift of segments on the 16 segments display. More...

## Functions

t16SegDisplay | Decode16segDigitASCII (char digit)
| Function used to decode a char and display it on a 16 segments digit. More...

## Detailed Description

Headerfile for 16 segment decoder driver.

Author
  Thibaut LALUQUE 3D-Ouest

Date
  26/09/2014

Version
  1.0

All Right Reserved.

Definition in file decoder16Seg.h.

## Macro Definition Documentation

#define DECODER16SEG_A_MASK (1<<DECODER16SEG_A_SHIFT)

Define mask and shift of segments on the 16 segments display.

Definition at line 49 of file decoder16Seg.h.

#define DECODER16SEG_A_SHIFT (0)

Define mask and shift of segments on the 16 segments display.

Definition at line 48 of file decoder16Seg.h.

#define DECODER16SEG_B_MASK (1<<DECODER16SEG_B_SHIFT)

Define mask and shift of segments on the 16 segments display.

Definition at line 52 of file decoder16Seg.h.

#define DECODER16SEG_B_SHIFT (1)

Define mask and shift of segments on the 16 segments display.

Definition at line 51 of file decoder16Seg.h.

#define DECODER16SEG_C_MASK (1<<DECODER16SEG_C_SHIFT)

Define mask and shift of segments on the 16 segments display.

Definition at line 55 of file decoder16Seg.h.

#define DECODER16SEG_C_SHIFT (2)

Define mask and shift of segments on the 16 segments display.

Definition at line 54 of file decoder16Seg.h.

#define DECODER16SEG_D_MASK (1<<DECODER16SEG_D_SHIFT)

Define mask and shift of segments on the 16 segments display.

Definition at line 58 of file decoder16Seg.h.

#define DECODER16SEG_D_SHIFT (3)

Define mask and shift of segments on the 16 segments display.

Definition at line 57 of file decoder16Seg.h.

#define DECODER16SEG_E_MASK (1<<DECODER16SEG_E_SHIFT)

Define mask and shift of segments on the 16 segments display.

Definition at line 61 of file decoder16Seg.h.

#define DECODER16SEG_E_SHIFT (4)

Define mask and shift of segments on the 16 segments display.

Definition at line 60 of file decoder16Seg.h.

#define DECODER16SEG_F_MASK (1<<DECODER16SEG_F_SHIFT)

Define mask and shift of segments on the 16 segments display.

Definition at line 64 of file decoder16Seg.h.

#define DECODER16SEG_F_SHIFT (5)

Define mask and shift of segments on the 16 segments display.

Definition at line 63 of file decoder16Seg.h.

#define DECODER16SEG_G_MASK (1<<DECODER16SEG_G_SHIFT)

Define mask and shift of segments on the 16 segments display.

Definition at line 67 of file decoder16Seg.h.

#define DECODER16SEG_G_SHIFT (6)

Define mask and shift of segments on the 16 segments display.

Definition at line 66 of file decoder16Seg.h.

#define DECODER16SEG_H_MASK (1<<DECODER16SEG_H_SHIFT)

Define mask and shift of segments on the 16 segments display.

Definition at line 70 of file decoder16Seg.h.

#define DECODER16SEG_H_SHIFT (7)

Define mask and shift of segments on the 16 segments display.

Definition at line 69 of file decoder16Seg.h.

#define DECODER16SEG_K_MASK (1<<DECODER16SEG_K_SHIFT)

Define mask and shift of segments on the 16 segments display.

Definition at line 73 of file decoder16Seg.h.

#define DECODER16SEG_K_SHIFT (8)

Define mask and shift of segments on the 16 segments display.

Definition at line 72 of file decoder16Seg.h.

#define DECODER16SEG_M_MASK (1<<DECODER16SEG_M_SHIFT)

Define mask and shift of segments on the 16 segments display.

Definition at line 76 of file decoder16Seg.h.

#define DECODER16SEG_M_SHIFT (9)

Define mask and shift of segments on the 16 segments display.

Definition at line 75 of file decoder16Seg.h.

#define DECODER16SEG_N_MASK (1<<DECODER16SEG_N_SHIFT)

Define mask and shift of segments on the 16 segments display.

Definition at line 79 of file decoder16Seg.h.

#define DECODER16SEG_N_SHIFT (10)

Define mask and shift of segments on the 16 segments display.

Definition at line 78 of file decoder16Seg.h.

#define DECODER16SEG_P_MASK (1<<DECODER16SEG_P_SHIFT)

Define mask and shift of segments on the 16 segments display.

Definition at line 82 of file decoder16Seg.h.

#define DECODER16SEG_P_SHIFT (11)

Define mask and shift of segments on the 16 segments display.

Definition at line 81 of file decoder16Seg.h.

#define DECODER16SEG_R_MASK (1<<DECODER16SEG_R_SHIFT)

Define mask and shift of segments on the 16 segments display.

Definition at line 94 of file decoder16Seg.h.

#define DECODER16SEG_R_SHIFT (15)

Define mask and shift of segments on the 16 segments display.

Definition at line 93 of file decoder16Seg.h.

#define DECODER16SEG_S_MASK (1<<DECODER16SEG_S_SHIFT)

Define mask and shift of segments on the 16 segments display.

Definition at line 91 of file decoder16Seg.h.

#define DECODER16SEG_S_SHIFT (14)

Define mask and shift of segments on the 16 segments display.

Definition at line 90 of file decoder16Seg.h.

#define DECODER16SEG_T_MASK (1<<DECODER16SEG_T_SHIFT)

Define mask and shift of segments on the 16 segments display.

Definition at line 88 of file decoder16Seg.h.

#define DECODER16SEG_T_SHIFT (13)

Define mask and shift of segments on the 16 segments display.

Definition at line 87 of file decoder16Seg.h.

#define DECODER16SEG_U_MASK (1<<DECODER16SEG_U_SHIFT)

Define mask and shift of segments on the 16 segments display.

Definition at line 85 of file decoder16Seg.h.

#define DECODER16SEG_U_SHIFT (12)

Define mask and shift of segments on the 16 segments display.

Definition at line 84 of file decoder16Seg.h.

## Function Documentation

t16SegDisplay Decode16segDigitASCII | ( | char | digit | ) |

Function used to decode a char and display it on a 16 segments digit.

Parameters

  [in] | digit | (char) : char to display in ASCII.

Returns
  (t16SegDisplay) : return the control structure of a 16 segments digit.

Definition at line 78 of file decoder16Seg.c.

References t16SegDisplay::allSeg.

Referenced by DisplaySetDataDisplayed().

78 {
79 t16SegDisplay result;
80
81 switch(digit) {
82
83 case 'a':
84 case 'A':
85 result.allSeg = 0b0001100011001111;
86 break;
87
88 case 'b':
89 case 'B':
90 result.allSeg = 0b0001100011111000;
91 break;
92
93 case 'c' :
94 result.allSeg = 0b0001000001100000;
95 break;
96
97 case 'C' :
98 result.allSeg = 0b0000000011110011;
99 break;
100
101 case 'd':
102 case 'D':
103 result.allSeg = 0b0001100001111100;
104 break;
105
106 case 'e':
107 case 'E':
108 result.allSeg = 0b0001000011110011;
109 break;
110
111 case 'f':
112 case 'F':
113 result.allSeg = 0b0001000011000011;
114 break;
115
116 case 'g':
117 case 'G':
118 result.allSeg = 0b0000100011111011;
119 break;
120
121 case 'h' :
122 result.allSeg = 0b0101000011000000;
123 break;
124
125 case 'H':
126 result.allSeg = 0b0001100011001100;
127 break;
128
129 case 'i':
130 case 'I':
131 result.allSeg = 0b0100001000110011;
132 break;
133
134 case 'j':
135 case 'J':
136 result.allSeg = 0b0100001001100011;
137 break;
138
139 case 'k':
140 case 'K':
141 result.allSeg = 0b1100011000000000;
142 break;
143
144 case 'l':
145 case 'L':
146 result.allSeg = 0b0000000011110000;
147 break;
148
149 case 'm':
150 result.allSeg = 0b0101100001001000;
151 break;
152
153 case 'M':
154 result.allSeg = 0b0000010111001100;
155 break;
156
157 case 'n' :
158 case 'N' :
159 result.allSeg = 0b1000000111001100;
160 break;
161
162 case 'O':
163 case '0':
164 case 'o':
165 result.allSeg = 0b0000000011111111;
166 break;
167
168 case 'p':
169 case 'P':
170 result.allSeg = 0b0001100011000111;
171 break;
172
173 case 'q':
174 case 'Q':
175 result.allSeg = 0b0001100010001111;
176 break;
177
178 case 'r':
179 case 'R':
180 result.allSeg = 0b1001100011000111;
181 break;
182
183 case '5':
184 case 's':
185 case 'S':
186 result.allSeg = 0b0001100010111011;
187 break;
188
189 case 'T':
190 case 't':
191 result.allSeg = 0b0100001000000011;
192 break;
193
194 case 'u':
195 case 'U':
196 result.allSeg = 0b0000000011111100;
197 break;
198
199 case 'v':
200 case 'V':
201 result.allSeg = 0b0010010011000000;
202 break;
203
204 case 'w':
205 case 'W':
206 result.allSeg = 0b1010000011001100;
207 break;
208
209 case 'x':
210 case 'X':
211 result.allSeg = 0b1010010100000000;
212 break;
213
214 case 'y':
215 case 'Y':
216 result.allSeg = 0b0100010100000000;
217 break;
218
219 case 'z':
220 case 'Z' :
221 result.allSeg = 0b1000000100110011;
222 break;
223
224 case '1':
225 result.allSeg = 0b0000000000001100;
226 break;
227
228 case '2' :
229 result.allSeg = 0b0001100001110111;
230 break;
231
232 case '3':
233 result.allSeg = 0b0001100000111111;
234 break;
235
236 case '4' :
237 result.allSeg = 0b0001100010001100;
238 break;
239
240 case '6' :
241 result.allSeg = 0b0001100011111011;
242 break;
243
244 case '7' :
245 result.allSeg = 0b0000000000001111;
246 break;
247
248 case '8' :
249 result.allSeg = 0b0001100011111111;
250 break;
251
252 case '9':
253 result.allSeg = 0b0001100010111111;
254 break;
255
256 case '-' :
257 result.allSeg = 0b0001100000000000;
258 break;
259
260 case '+' :
261 result.allSeg = 0b0101101000000000;
262 break;
263
264 case '/' :
265 result.allSeg = 0b0010010000000000;
266 break;
267
268 case '\\':
269 result.allSeg = 0b1000000100000000;
270 break;
271
272 case '|' :
273 result.allSeg = 0b0100001000000000;
274 break;
275
276 case '?':
277 result.allSeg = 0b0100010010000111;
278 break;
279
280 default :
281 result.allSeg = 0x0000;
282 break;
283 }
284
285 return result;
286 }
t16SegDisplay
Structure used to control all segments in a 16 segments display.
Definition: decoder16Seg.h:112
t16SegDisplay::allSeg
unsigned short allSeg
Definition: decoder16Seg.h:132

Here is the caller graph for this function: