1 |
2 |
ZTEX |
/*%
|
2 |
|
|
ZTEX Firmware Kit for EZ-USB FX3 Microcontrollers
|
3 |
|
|
Copyright (C) 2009-2017 ZTEX GmbH.
|
4 |
|
|
http://www.ztex.de
|
5 |
|
|
|
6 |
|
|
This Source Code Form is subject to the terms of the Mozilla Public
|
7 |
|
|
License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
8 |
|
|
You can obtain one at http://mozilla.org/MPL/2.0/.
|
9 |
|
|
|
10 |
|
|
Alternatively, the contents of this file may be used under the terms
|
11 |
|
|
of the GNU General Public License Version 3, as described below:
|
12 |
|
|
|
13 |
|
|
This program is free software; you can redistribute it and/or modify
|
14 |
|
|
it under the terms of the GNU General Public License version 3 as
|
15 |
|
|
published by the Free Software Foundation.
|
16 |
|
|
|
17 |
|
|
This program is distributed in the hope that it will be useful, but
|
18 |
|
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
19 |
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
20 |
|
|
General Public License for more details.
|
21 |
|
|
|
22 |
|
|
You should have received a copy of the GNU General Public License
|
23 |
|
|
along with this program; if not, see http://www.gnu.org/licenses/.
|
24 |
|
|
%*/
|
25 |
|
|
/*
|
26 |
|
|
This file contains settings which can be overwritten in user code.
|
27 |
|
|
*/
|
28 |
|
|
|
29 |
|
|
#ifndef _ZTEX_CONF_H_
|
30 |
|
|
#define _ZTEX_CONF_H_
|
31 |
|
|
|
32 |
|
|
#define ZTEX_USB_VENDOR_ID (0x221a)
|
33 |
|
|
#define ZTEX_USB_PRODUCT_ID (0x100)
|
34 |
|
|
|
35 |
|
|
// please see ../fx2/ztex-descriptors.h
|
36 |
|
|
#define ZTEX_PRODUCT_ID_0 (0)
|
37 |
|
|
#define ZTEX_PRODUCT_ID_1 (0)
|
38 |
|
|
#define ZTEX_PRODUCT_ID_2 (0)
|
39 |
|
|
#define ZTEX_PRODUCT_ID_3 (0)
|
40 |
|
|
|
41 |
|
|
#define ZTEX_FWVER (0)
|
42 |
|
|
|
43 |
|
|
#define ZTEX_MODULE_RESERVED_00 (0)
|
44 |
|
|
#define ZTEX_MODULE_RESERVED_01 (0)
|
45 |
|
|
#define ZTEX_MODULE_RESERVED_02 (0)
|
46 |
|
|
#define ZTEX_MODULE_RESERVED_03 (0)
|
47 |
|
|
#define ZTEX_MODULE_RESERVED_04 (0)
|
48 |
|
|
#define ZTEX_MODULE_RESERVED_05 (0)
|
49 |
|
|
#define ZTEX_MODULE_RESERVED_06 (0)
|
50 |
|
|
#define ZTEX_MODULE_RESERVED_07 (0)
|
51 |
|
|
#define ZTEX_MODULE_RESERVED_08 (0)
|
52 |
|
|
#define ZTEX_MODULE_RESERVED_09 (0)
|
53 |
|
|
#define ZTEX_MODULE_RESERVED_10 (0)
|
54 |
|
|
|
55 |
|
|
/*
|
56 |
|
|
This macro defines the Manufacturer string. Limited to 31 characters.
|
57 |
|
|
*/
|
58 |
|
|
#define ZTEX_MANUFACTURER_STRING "ZTEX"
|
59 |
|
|
|
60 |
|
|
/*
|
61 |
|
|
This macro defines the Product string. Limited to 31 characters.
|
62 |
|
|
*/
|
63 |
|
|
#define ZTEX_PRODUCT_STRING "FX3 Firmware"
|
64 |
|
|
|
65 |
|
|
#define EP_BULK(num,dir,burst,settings) EP(num,dir,BULK,1024,burst,0,settings)
|
66 |
|
|
#define EP_ISO(num,dir,burst,settings) EP(num,dir,ISO,1024,burst,1,settings)
|
67 |
|
|
|
68 |
|
|
/*
|
69 |
|
|
This macro defines the endpoint setup and should overwritten by user.
|
70 |
|
|
*/
|
71 |
|
|
#define EP_SETUP
|
72 |
|
|
|
73 |
|
|
/*
|
74 |
|
|
GPIO enable bitmaps for simple/complex GPIO's 0..31 and 32..63 .
|
75 |
|
|
These bitmaps are reserved for firmware usage and should not be overwritten by user
|
76 |
|
|
*/
|
77 |
|
|
#define ZTEX_GPIO_SIMPLE_BITMAP0 0
|
78 |
|
|
#define ZTEX_GPIO_SIMPLE_BITMAP1 0
|
79 |
|
|
#define ZTEX_GPIO_COMPLEX_BITMAP0 0
|
80 |
|
|
#define ZTEX_GPIO_COMPLEX_BITMAP1 0
|
81 |
|
|
|
82 |
|
|
/*
|
83 |
|
|
GPIO enable bitmaps for simple/complex GPIO's 0..31 and 32..63 .
|
84 |
|
|
These bitmaps are or'ed with ZTEX_GPIO_* bitmaps and should be used by user
|
85 |
|
|
*/
|
86 |
|
|
#define GPIO_SIMPLE_BITMAP0 0
|
87 |
|
|
#define GPIO_SIMPLE_BITMAP1 0
|
88 |
|
|
#define GPIO_COMPLEX_BITMAP0 0
|
89 |
|
|
#define GPIO_COMPLEX_BITMAP1 0
|
90 |
|
|
|
91 |
|
|
#define GPIO_INT_HANDLER 0
|
92 |
|
|
|
93 |
|
|
#define ZTEX_EP_CLEANUP_HANDLER ztex_ep_cleanup_default_handler
|
94 |
|
|
|
95 |
|
|
// called when USB connection is started
|
96 |
|
|
#define ZTEX_USB_START {}
|
97 |
|
|
|
98 |
|
|
// called when USB connection is stopped
|
99 |
|
|
#define ZTEX_USB_STOP {}
|
100 |
|
|
|
101 |
|
|
// stack size of application thread
|
102 |
|
|
#define ZTEX_APP_THREAD_STACK_SIZE 0x1000
|
103 |
|
|
|
104 |
|
|
// priority of application thread, should be 7..15
|
105 |
|
|
#define ZTEX_APP_THREAD_PRIO 8
|
106 |
|
|
|
107 |
|
|
// application main loop
|
108 |
|
|
#define ZTEX_APP_THREAD_RUN {}
|
109 |
|
|
|
110 |
|
|
/*
|
111 |
|
|
functions that are enabled by default
|
112 |
|
|
undef them in order to disable features
|
113 |
|
|
*/
|
114 |
|
|
#define ENABLE_I2C // enables I2C IO block
|
115 |
|
|
#define ENABLE_SPI // enables SPI IO block
|
116 |
|
|
#define ENABLE_SPI_FLASH // enables SPI FLASH
|
117 |
|
|
|
118 |
|
|
/*
|
119 |
|
|
functions that are enabled if board supports them
|
120 |
|
|
(usually should not be enabled by user)
|
121 |
|
|
*/
|
122 |
|
|
//#define ENABLE_SPORT0 // enables SPORT0 IO block
|
123 |
|
|
|
124 |
|
|
/*
|
125 |
|
|
functions that can be enabled by user
|
126 |
|
|
*/
|
127 |
|
|
//#define ENABLE_SD_FLASH // enables SD FLASH as secondary flash device
|
128 |
|
|
|
129 |
|
|
/*
|
130 |
|
|
disables FPGA configuration from flash (if supported)
|
131 |
|
|
*/
|
132 |
|
|
//#define DISABLE_FLASH_CONFIG // disables FPGA configuration from flash (if supported)
|
133 |
|
|
|
134 |
|
|
|
135 |
|
|
#endif // _ZTEX_CONF_H_
|