OpenCores
URL https://opencores.org/ocsvn/usb_fpga_2_13/usb_fpga_2_13/trunk

Subversion Repositories usb_fpga_2_13

[/] [usb_fpga_2_13/] [trunk/] [include/] [ztex-conf.h] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 ZTEX
/*!
2
   ZTEX Firmware Kit for EZ-USB FX2 Microcontrollers
3
   Copyright (C) 2009-2014 ZTEX GmbH.
4
   http://www.ztex.de
5
 
6
   This program is free software; you can redistribute it and/or modify
7
   it under the terms of the GNU General Public License version 3 as
8
   published by the Free Software Foundation.
9
 
10
   This program is distributed in the hope that it will be useful, but
11
   WITHOUT ANY WARRANTY; without even the implied warranty of
12
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
   General Public License for more details.
14
 
15
   You should have received a copy of the GNU General Public License
16
   along with this program; if not, see http://www.gnu.org/licenses/.
17
!*/
18
 
19
/*
20
   Configuration macros
21
*/
22
 
23
#ifndef[ZTEX_CONF_H]
24
#define[ZTEX_CONF_H]
25
 
26
/*
27
   Don't expand macros in comments
28
*/
29
#disablelineinfo
30
#define[//][
31
][#noexpand[!dnapxeon!]//$0!dnapxeon!
32
]
33
#disablelineinfo
34
#define[/*][*/][#noexpand[!dnapxeon!]/*$0*/!dnapxeon!]
35
 
36
/*
37
   This macro defines the USB Vendor ID and USB Product ID  (not the product ID
38
   from the ZTEX descriptor). The Vendor ID must be purchased from the USB-IF
39
   (http://www.usb.org).
40
 
41
   The default vendor ID is the ZTEX vendor ID 0x221A, default product ID is
42
   0x100 which is assigned to ZTEX modules. These ID's can be shared by many
43
   different products which are identified by the product ID of the ZTEX
44
   descriptor. According to the USB-IF rules these ID's must not be used by
45
   hardware which is not manufactured by ZTEX. (Of course, this ID's can be
46
   used during the development process or for internal purposes.)
47
 
48
   Please read the http://www.ztex.de/firmware-kit/usb_ids.e.html for more
49
   informations about this topic.
50
 
51
   Usage:
52
        SET_VPID(<Vendor ID>,<Product ID>);
53
*/
54
#define[SET_VPID(][,$1);][#define[USB_VENDOR_ID][$0]
55
#define[USB_PRODUCT_ID][$1]]
56
SET_VPID(0x221a,0x100);
57
 
58
/*
59
   This macro is called before FPGA Firmware is reset, e.g. to save some
60
   settings. After this macro is called the I/O ports are set to default
61
   states in order to avoid damage during / after the FPGA configuration.
62
   To append something to this macro use the following definition:
63
#define[PRE_FPGA_RESET][PRE_FPGA_RESET
64
...]
65
*/
66
#define[PRE_FPGA_RESET][]
67
 
68
 
69
/*
70
   This macro is called after FPGA Firmware has been configured. This is
71
   usually used to configure the I/O ports.
72
   To append something to this macro use the following definition:
73
#define[POST_FW_LOAD][POST_FW_LOAD
74
...]
75
*/
76
#define[POST_FPGA_CONFIG][]
77
 
78
/*
79
   On multi FPGA boards this macro is called betwen deselection and
80
   selection of a FPGA. This can be used to store / resore I/O contents.
81
   To append something to this macro use the following definition:
82
#define[PRE_FPGA_SELECT][PRE_FPGA_SELECT
83
...]
84
*/
85
#define[PRE_FPGA_SELECT][]
86
 
87
 
88
/*
89
  Add a vedor request for endpoint 0,
90
 
91
   Usage:
92
     ADD_EP0_VENDOR_REQUEST((<request number>,,<code executed after setup package received>,,<code executed after data package received>''));
93
   Example:
94
     ADD_EP0_VENDOR_REQUEST((0x33,,initHSFPGAConfiguration();,,));;
95
...]
96
*/
97
#define[EP0_VENDOR_REQUESTS_SU;][]
98
#define[EP0_VENDOR_REQUESTS_DAT;][]
99
#define[ADD_EP0_VENDOR_REQUEST((][,,$1,,$2));;][#define[EP0_VENDOR_REQUESTS_SU;][EP0_VENDOR_REQUESTS_SU;
100
case $0:
101
    $1
102
    break;
103
]
104
#define[EP0_VENDOR_REQUESTS_DAT;][EP0_VENDOR_REQUESTS_DAT;
105
case $0:
106
    $2
107
    break;
108
]]
109
 
110
 
111
/*
112
   Add a vedor command for endpoint 0,
113
 
114
   Usage:
115
     ADD_EP0_VENDOR_COMMAND((<request number>,,<code executed after setup package received>,,<code executed after data package received>''));
116
   Example:
117
     ADD_EP0_VENDOR_COMMAND((0x33,,initHSFPGAConfiguration();,,));;
118
...]
119
*/
120
#define[EP0_VENDOR_COMMANDS_SU;][]
121
#define[EP0_VENDOR_COMMANDS_DAT;][]
122
#define[ADD_EP0_VENDOR_COMMAND((][,,$1,,$2));;][#define[EP0_VENDOR_COMMANDS_SU;][EP0_VENDOR_COMMANDS_SU;
123
case $0:
124
    $1
125
    break;
126
]
127
#define[EP0_VENDOR_COMMANDS_DAT;][EP0_VENDOR_COMMANDS_DAT;
128
case $0:
129
    $2
130
    break;
131
]]
132
 
133
/*
134
  This macro generates a EP0 stall and aborts the current loop. Stalls are usually used to indicate errors.
135
*/
136
#define[EP0_STALL;][{
137
    EP0CS |= 0x01;      // set stall
138
    ep0_payload_remaining = 0;
139
    break;
140
}]
141
 
142
 
143
/*
144
   Endoint 1,2,4,5,8 configuration:
145
 
146
   EP_CONFIG(<EP number>,<interface>,<type>,<direction>,<size>,<buffers>)
147
        <EP number> = 1IN | 1OUT | 2 | 4 | 6 | 8        Endpoint number
148
        <INTERFACE> = 0 | 1 | 2 | 3                     To which interface this endpoint belongs
149
        <type>      = BULK  | ISO | INT
150
        <dir>       = IN | OUT
151
        <size>      = 512 | 1024
152
        <buffers>   = 1 | 2 | 3 | 4
153
   Example: EP_CONFIG(2,0,ISO,OUT,1024,4);
154
   Important note: No spaces next to the commas
155
 
156
 
157
   Endpoint 1 configuration:
158
 
159
   These Endpoints are defined by default as bulk endpoints and are assigned to interface 0.
160
   Endpoint size is always 64 bytes, but reported Endpoint size will be 512 bytes for USB 2.0 compliance.
161
 
162
   These Endpoints can be redefined using EP_CONFIG or using:
163
 
164
   EP1IN_CONFIG(<interface>);
165
           <INTERFACE> = 0 | 1 | 2 | 3          Interface to which EP1IN belongs; default: 0
166
   EP1OUT_CONFIG(<interface>);
167
           <INTERFACE> = 0 | 1 | 2 | 3          Interface to which EP1OUT belongs; default: 0
168
   EP1_CONFIG(<interface>);
169
           <INTERFACE> = 0 | 1 | 2 | 3          Interface to which EP1IN and EP1OUT belongs; default: 0
170
 
171
   The following (maximum) configurations are possible:
172
   EP2          EP4     EP6     EP8
173
   2x512        2x512   2x512   2x512
174
   2x512        2x512   4x512
175
   2x512        2x512   2x1024
176
   4x512                2x512   2x512
177
   4x512                4x512
178
   4x512                2x1024
179
   2x1024               2x512   2x512
180
   2x1024               4x512
181
   2x1024               2x1024
182
   3x512                3x512   2x512
183
   3x1024                       2x512
184
   4x1024
185
*/
186
#define[EP_CONFIG(][,$1,$2,$3,$4,$5);][
187
#ifeq[$0][1IN]
188
#elifeq[$0][1OUT]
189
#elifeq[$0][2]
190
#elifeq[$0][4]
191
#elifeq[$0][6]
192
#elifneq[$0][8]
193
#error[EP_CONFIG: Invalid 1st parameter: `$0'. Expected `2', `4', `6' or '8']
194
#endif
195
#ifeq[$1][0]
196
#elifeq[$1][1]
197
#elifeq[$1][2]
198
#elifneq[$1][3]
199
#error[EP_CONFIG: Invalid 2nd parameter: `$1'. Expected `0', `1', `2' or '3']
200
#endif
201
#ifeq[$2][BULK]
202
#elifeq[$2][ISO]
203
#elifneq[$2][INT]
204
#error[EP_CONFIG: Invalid 3nd parameter: `$2'. Expected `BULK', `ISO' or 'INT']
205
#endif
206
#ifeq[$3][IN]
207
#elifneq[$3][OUT]
208
#error[EP_CONFIG: Invalid 4th parameter: `$3'. Expected `IN' or 'OUT']
209
#endif
210
#ifeq[$4][512]
211
#elifneq[$4][1024]
212
#error[EP_CONFIG: Invalid 5th parameter: `$4'. Expected `512' or '1024']
213
#endif
214
#ifeq[$5][1]
215
#elifeq[$5][2]
216
#elifeq[$5][3]
217
#elifneq[$5][4]
218
#error[EP_CONFIG: Invalid 6th parameter: `$5'. Expected `1', `2', `3' or `4']
219
#endif
220
#define[EP$0_INTERFACE][$1]
221
#define[EP$0_TYPE][$2]
222
#define[EP$0_DIR][$3]
223
#define[EP$0_SIZE][$4]
224
#define[EP$0_BUFFERS][$5]]
225
 
226
#define[EP1IN_CONFIG(][);][#define[EP1IN_INTERFACE][$0]]
227
#define[EP1OUT_CONFIG(][);][#define[EP1OUT_INTERFACE][$0]]
228
#define[EP1_CONFIG(][);][#define[EP1IN_INTERFACE][$0]
229
#define[EP1OUT_INTERFACE][$0]]
230
 
231
EP_CONFIG(1IN,0,BULK,IN,512,1);
232
EP_CONFIG(1OUT,0,BULK,OUT,512,1);
233
 
234
/*
235
   ISO and INT Transactions per microframe:
236
 
237
   Default value is 1 for all endpoints.
238
 
239
   EP_PPMF(<EP number>,<transactions per microframe>)
240
        <EP number>                  = 1IN | 1OUT | 2 | 4 | 6 | 8       Endpoint
241
        <transactions per microframe> = 1 | 2 | 3                       Transactions per microframe
242
 
243
   Example: EP_PPMF(2,3);
244
   Important note: No spaces next to the commas
245
*/
246
#define[EP_PPMF(][,$1);][
247
#ifeq[$0][1IN]
248
#elifeq[$0][1OUT]
249
#elifeq[$0][2]
250
#elifeq[$0][4]
251
#elifeq[$0][6]
252
#elifneq[$0][8]
253
#error[EP_CONFIG: Invalid 1st parameter: `$0'. Expected `1IN', `1OUT', `2', `4', `6' or '8']
254
#endif
255
#ifeq[$1][1]
256
#elifeq[$1][2]
257
#elifneq[$1][3]
258
#error[EP_CONFIG: Invalid 2nd parameter: `$1'. Expected `1', `2' or '3']
259
#endif
260
#define[EP$0_PPMF][$1]]
261
 
262
EP_PPMF(1IN,1);
263
EP_PPMF(1OUT,1);
264
EP_PPMF(2,1);
265
EP_PPMF(4,1);
266
EP_PPMF(6,1);
267
EP_PPMF(8,1);
268
 
269
/*
270
   Polling interval in microframes for INT transactions:
271
 
272
   Default value is 1 for all endpoints.
273
 
274
   EP_POLL(<EP number>,<polling interval>)
275
        <EP number>        = 1IN | 1OUT | 2 | 4 | 6 | 8         Endpoint
276
        <polling interval> = 1 | 2 | 3                          Polling interval
277
 
278
   Example: EP_POLL(2,1);
279
   Important note: No spaces next to the commas
280
*/
281
#define[EP_POLL(][,$1);][
282
#ifeq[$0][1IN]
283
#elifeq[$0][1OUT]
284
#elifeq[$0][2]
285
#elifeq[$0][4]
286
#elifeq[$0][6]
287
#elifneq[$0][8]
288
#error[EP_CONFIG: Invalid 1st parameter: `$0'. Expected `1IN', `1OUT', `2', `4', `6' or '8']
289
#endif
290
#define[EP$0_POLL][$1]]
291
 
292
EP_POLL(1IN,1);
293
EP_POLL(1OUT,1);
294
EP_POLL(2,1);
295
EP_POLL(4,1);
296
EP_POLL(6,1);
297
EP_POLL(8,1);
298
 
299
 
300
 
301
/*
302
   Settings which depends PRODUCT_ID, e.g extra capabilities.
303
   Overwrite this macros as desired.
304
*/
305
#define[MODULE_RESERVED_00][0]
306
#define[MODULE_RESERVED_01][0]
307
#define[MODULE_RESERVED_02][0]
308
#define[MODULE_RESERVED_03][0]
309
#define[MODULE_RESERVED_04][0]
310
#define[MODULE_RESERVED_05][0]
311
#define[MODULE_RESERVED_06][0]
312
#define[MODULE_RESERVED_07][0]
313
#define[MODULE_RESERVED_08][0]
314
#define[MODULE_RESERVED_09][0]
315
#define[MODULE_RESERVED_10][0]
316
#define[MODULE_RESERVED_11][0]
317
 
318
#define[FWVER][0]
319
 
320
#define[PRODUCT_ID_0][0]
321
#define[PRODUCT_ID_1][0]
322
#define[PRODUCT_ID_2][0]
323
#define[PRODUCT_ID_3][0]
324
 
325
 
326
/*
327
   Identify as ZTEX USB FPGA Module 1.0
328
   Usage: IDENTITY_UFM_1_0(<PRODUCT_ID_0>.<PRODUCT_ID_1><PRODUCT_ID_2>.<PRODUCT_ID_3>,<FW_VERSION>);
329
*/
330
#define[IDENTITY_UFM_1_0(][.$1.$2.$3,$4);][#define[PRODUCT_ID_0][$0]
331
#define[PRODUCT_ID_1][$1]
332
#define[PRODUCT_ID_2][$2]
333
#define[PRODUCT_ID_3][$3]
334
#define[FWVER][$4]
335
#define[PRODUCT_IS][UFM-1_0]
336
#define[PRODUCT_STRING]["USB-FPGA Module 1.0"]]
337
 
338
 
339
/*
340
   Identify as ZTEX USB FPGA Module 1.1
341
   Usage: IDENTITY_UFM_1_1(<PRODUCT_ID_0>.<PRODUCT_ID_1><PRODUCT_ID_2>.<PRODUCT_ID_3>,<FW_VERSION>);
342
*/
343
#define[IDENTITY_UFM_1_1(][.$1.$2.$3,$4);][#define[PRODUCT_ID_0][$0]
344
#define[PRODUCT_ID_1][$1]
345
#define[PRODUCT_ID_2][$2]
346
#define[PRODUCT_ID_3][$3]
347
#define[FWVER][$4]
348
#define[PRODUCT_IS][UFM-1_1]
349
#define[PRODUCT_STRING]["USB-FPGA Module 1.1"]]
350
 
351
 
352
/*
353
   Identify as ZTEX USB FPGA Module 1.2
354
   Usage: IDENTITY_UFM_1_2(<PRODUCT_ID_0>.<PRODUCT_ID_1><PRODUCT_ID_2>.<PRODUCT_ID_3>,<FW_VERSION>);
355
*/
356
#define[IDENTITY_UFM_1_2(][.$1.$2.$3,$4);][#define[PRODUCT_ID_0][$0]
357
#define[PRODUCT_ID_1][$1]
358
#define[PRODUCT_ID_2][$2]
359
#define[PRODUCT_ID_3][$3]
360
#define[FWVER][$4]
361
#define[PRODUCT_IS][UFM-1_2]
362
#define[PRODUCT_STRING]["USB-FPGA Module 1.2"]]
363
 
364
/*
365
   Identify as ZTEX USB FPGA Module 1.10
366
   Usage: IDENTITY_UFM_1_10(<PRODUCT_ID_0>.<PRODUCT_ID_1><PRODUCT_ID_2>.<PRODUCT_ID_3>,<FW_VERSION>);
367
*/
368
#define[IDENTITY_UFM_1_10(][.$1.$2.$3,$4);][#define[PRODUCT_ID_0][$0]
369
#define[PRODUCT_ID_1][$1]
370
#define[PRODUCT_ID_2][$2]
371
#define[PRODUCT_ID_3][$3]
372
#define[FWVER][$4]
373
#define[PRODUCT_IS][UFM-1_10]
374
#define[PRODUCT_STRING]["USB-FPGA Module 1.10"]]
375
 
376
/*
377
   Identify as ZTEX USB FPGA Module 1.11
378
   Usage: IDENTITY_UFM_1_11(<PRODUCT_ID_0>.<PRODUCT_ID_1><PRODUCT_ID_2>.<PRODUCT_ID_3>,<FW_VERSION>);
379
*/
380
#define[IDENTITY_UFM_1_11(][.$1.$2.$3,$4);][#define[PRODUCT_ID_0][$0]
381
#define[PRODUCT_ID_1][$1]
382
#define[PRODUCT_ID_2][$2]
383
#define[PRODUCT_ID_3][$3]
384
#define[FWVER][$4]
385
#define[PRODUCT_IS][UFM-1_11]
386
#define[PRODUCT_STRING]["USB-FPGA Module 1.11"]]
387
 
388
/*
389
   Identify as ZTEX USB FPGA Module 1.15
390
   Usage: IDENTITY_UFM_1_15(<PRODUCT_ID_0>.<PRODUCT_ID_1><PRODUCT_ID_2>.<PRODUCT_ID_3>,<FW_VERSION>);
391
*/
392
#define[IDENTITY_UFM_1_15(][.$1.$2.$3,$4);][#define[PRODUCT_ID_0][$0]
393
#define[PRODUCT_ID_1][$1]
394
#define[PRODUCT_ID_2][$2]
395
#define[PRODUCT_ID_3][$3]
396
#define[FWVER][$4]
397
#define[PRODUCT_IS][UFM-1_15]
398
#define[PRODUCT_STRING]["USB-FPGA Module 1.15"]
399
#define[NUMBER_OF_FPGAS][1]]
400
 
401
/*
402
   Identify as ZTEX USB FPGA Module 1.15y
403
   Usage: IDENTITY_UFM_1_15Y(<PRODUCT_ID_0>.<PRODUCT_ID_1><PRODUCT_ID_2>.<PRODUCT_ID_3>,<FW_VERSION>);
404
*/
405
#define[IDENTITY_UFM_1_15Y(][.$1.$2.$3,$4);][#define[PRODUCT_ID_0][$0]
406
#define[PRODUCT_ID_1][$1]
407
#define[PRODUCT_ID_2][$2]
408
#define[PRODUCT_ID_3][$3]
409
#define[FWVER][$4]
410
#define[PRODUCT_IS][UFM-1_15Y]
411
#define[PRODUCT_STRING]["USB-FPGA Module 1.15y"]
412
#define[NUMBER_OF_FPGAS][4]]
413
 
414
/*
415
   Identify as ZTEX USB FPGA Module 2.16
416
   Usage: IDENTITY_UFM_2_16(<PRODUCT_ID_0>.<PRODUCT_ID_1><PRODUCT_ID_2>.<PRODUCT_ID_3>,<FW_VERSION>);
417
*/
418
#define[IDENTITY_UFM_2_16(][.$1.$2.$3,$4);][#define[PRODUCT_ID_0][$0]
419
#define[PRODUCT_ID_1][$1]
420
#define[PRODUCT_ID_2][$2]
421
#define[PRODUCT_ID_3][$3]
422
#define[FWVER][$4]
423
#define[PRODUCT_IS][UFM-2_16]
424
#define[PRODUCT_STRING]["USB-FPGA Module 2.16"]
425
#define[NUMBER_OF_FPGAS][1]]
426
 
427
/*
428
   Identify as ZTEX USB FPGA Module 2.13
429
   Usage: IDENTITY_UFM_2_13(<PRODUCT_ID_0>.<PRODUCT_ID_1><PRODUCT_ID_2>.<PRODUCT_ID_3>,<FW_VERSION>);
430
*/
431
#define[IDENTITY_UFM_2_13(][.$1.$2.$3,$4);][#define[PRODUCT_ID_0][$0]
432
#define[PRODUCT_ID_1][$1]
433
#define[PRODUCT_ID_2][$2]
434
#define[PRODUCT_ID_3][$3]
435
#define[FWVER][$4]
436
#define[PRODUCT_IS][UFM-2_13]
437
#define[PRODUCT_STRING]["USB-FPGA Module 2.13"]
438
#define[NUMBER_OF_FPGAS][1]]
439
 
440
/*
441
   Identify as ZTEX USB FPGA Module 2.01
442
   Usage: IDENTITY_UFM_2_13(<PRODUCT_ID_0>.<PRODUCT_ID_1><PRODUCT_ID_2>.<PRODUCT_ID_3>,<FW_VERSION>);
443
*/
444
#define[IDENTITY_UFM_2_01(][.$1.$2.$3,$4);][#define[PRODUCT_ID_0][$0]
445
#define[PRODUCT_ID_1][$1]
446
#define[PRODUCT_ID_2][$2]
447
#define[PRODUCT_ID_3][$3]
448
#define[FWVER][$4]
449
#define[PRODUCT_IS][UFM-2_01]
450
#define[PRODUCT_STRING]["USB-FPGA Module 2.01"]
451
#define[NUMBER_OF_FPGAS][1]]
452
 
453
/*
454
   Identify as ZTEX USB FPGA Module 2.04
455
   Usage: IDENTITY_UFM_2_13(<PRODUCT_ID_0>.<PRODUCT_ID_1><PRODUCT_ID_2>.<PRODUCT_ID_3>,<FW_VERSION>);
456
*/
457
#define[IDENTITY_UFM_2_04(][.$1.$2.$3,$4);][#define[PRODUCT_ID_0][$0]
458
#define[PRODUCT_ID_1][$1]
459
#define[PRODUCT_ID_2][$2]
460
#define[PRODUCT_ID_3][$3]
461
#define[FWVER][$4]
462
#define[PRODUCT_IS][UFM-2_04]
463
#define[PRODUCT_STRING]["USB-FPGA Module 2.04"]
464
#define[NUMBER_OF_FPGAS][1]]
465
 
466
/*
467
   Identify as ZTEX USB Module 1.0
468
   Usage: IDENTITY_UM_1_0(<PRODUCT_ID_0>.<PRODUCT_ID_1><PRODUCT_ID_2>.<PRODUCT_ID_3>,<FW_VERSION>);
469
*/
470
#define[IDENTITY_UM_1_0(][.$1.$2.$3,$4);][#define[PRODUCT_ID_0][$0]
471
#define[PRODUCT_ID_1][$1]
472
#define[PRODUCT_ID_2][$2]
473
#define[PRODUCT_ID_3][$3]
474
#define[FWVER][$4]
475
#define[PRODUCT_IS][UM-1_0]
476
#define[PRODUCT_STRING]["USB Module 1.0"]]
477
 
478
 
479
/*
480
   Identify as ZTEX USB XMEGA Module 1.0
481
   Usage: IDENTITY_UM_1_0(<PRODUCT_ID_0>.<PRODUCT_ID_1><PRODUCT_ID_2>.<PRODUCT_ID_3>,<FW_VERSION>);
482
*/
483
#define[IDENTITY_UXM_1_0(][.$1.$2.$3,$4);][#define[PRODUCT_ID_0][$0]
484
#define[PRODUCT_ID_1][$1]
485
#define[PRODUCT_ID_2][$2]
486
#define[PRODUCT_ID_3][$3]
487
#define[FWVER][$4]
488
#define[PRODUCT_IS][UXM-1_0]
489
#define[PRODUCT_STRING]["USB XMEGA Module 1.0"]]
490
 
491
 
492
/*
493
   This macro defines the Manufacturer string. Limited to 31 characters.
494
*/
495
#define[MANUFACTURER_STRING]["ZTEX"]
496
 
497
 
498
/*
499
   This macro defines the Product string. Limited to 31 characters.
500
*/
501
#define[PRODUCT_STRING]["USB-FPGA Module"]
502
 
503
/*
504
   This macro enables defines the Configuration string. Limited to 31 characters.
505
*/
506
#define[CONFIGURATION_STRING]["default"]
507
 
508
 
509
/*
510
   This macro disables EEPROM interface, I2C helper functions and all other I2C devices (enabled by default)
511
   Usage: DISABLE_EEPROM;
512
*/
513
#define[DISABLE_EEPROM;][#define[EEPROM_DISABLED][1]]
514
 
515
 
516
/*
517
   This macro enables the Flash interface, if available
518
   Usage: ENABLE_FLASH;
519
*/
520
#define[ENABLE_FLASH;][#define[FLASH_ENABLED][1]]
521
 
522
/*
523
   This macro enables the FPGA configuration using a bitstream from the Flash memory
524
   Usage: ENABLE_FLASH_BITSTREAM;
525
*/
526
#define[ENABLE_FLASH_BITSTREAM;][#define[FLASH_BITSTREAM_ENABLED][1]]
527
 
528
/*
529
   Define this macro to use 4k sectors instead of 64k sectors of SPI Flash, if possible
530
   This is usually much slower and only recommended if you do not use the Flash for storing the Bitstream.
531
   Usage: USE_4KSECTORS;
532
*/
533
#define[USE_4KSECTORS;][#define[USE_4KSECTORS_ENABLED][1]]
534
 
535
/*
536
   This enables the debug helper. The debug helper consists in a stack of messages which can be read out from host software.
537
   See ../examples/all/debug/Readme.
538
   Usage: ENABLE_DEBUG(<stack size>,<message_size>);
539
        <stack size>    number of messages in stack
540
        <message size>  message size in bytes
541
*/
542
#define[ENABLE_DEBUG(][,$1);][#define[DEBUG_ENABLED][1]
543
#define[DEBUG_STACK_SIZE][$0]
544
#define[DEBUG_MSG_SIZE][$1]]
545
 
546
/*
547
   This macro disables XMEGA support, if available
548
   Usage: XMEGA_DISABLE;
549
*/
550
#define[XMEGA_DISABLE;][#define[XMEGA_DISABLED][1]]
551
 
552
/*
553
   Enables support for ZTEX Experimantal Board 1.10
554
   Usage: EXTENSION_EXP_1_10;
555
*/
556
#define[EXTENSION_EXP_1_10;][#define[EXP_1_10_ENABLED][1]]
557
 
558
/*
559
   Enables high speed FPGA configuration for ZTEX USB-FPGA Module 1.15 and 1.15y
560
   Usage: ENABLE_HS_FPGA_CONF(<ENDPOINT>);
561
        <endpoint>      endpoint which shall be used (any bulk output can be used)
562
*/
563
#define[ENABLE_HS_FPGA_CONF(][);][
564
#ifeq[$0][2]
565
#elifeq[$0][4]
566
#elifeq[$0][6]
567
#elifneq[$0][8]
568
#error[ENABLE_HS_FPGA_CONF: Invalid Endpoint. Valid values are: `2', `4', `6', `8'.]
569
#endif
570
#define[HS_FPGA_CONF_EP][$0]]
571
 
572
/*
573
   This macro disables MAC EEPROM support, if available
574
   Usage: MAC_EEPROM_DISABLE;
575
*/
576
#define[DISABLE_MAC_EEPROM;][#define[EEPROM_MAC_DISABLED][1]]
577
 
578
/*
579
   Enables detection of USB-FPGA Modules 1.15x. This avoids some warnings and makes the variable is_ufm_1_15x available.
580
   Usage: ENABLE_UFM_1_15X_DETECTION;
581
*/
582
#define[ENABLE_UFM_1_15X_DETECTION;][#define[UFM_1_15X_DETECTION_ENABLED][1]]
583
 
584
/*
585
   This macro disables temperature sensor support
586
   Usage: TEMP_SENSOR_DISABLE;
587
*/
588
#define[TEMP_SENSOR_DISABLE;][#define[TEMP_SENSOR_DISABLED][1]]
589
 
590
#endif // ZTEX_CONF_H

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.