Line 22... |
Line 22... |
|
|
#ifndef[ZTEX_CONF_H]
|
#ifndef[ZTEX_CONF_H]
|
#define[ZTEX_CONF_H]
|
#define[ZTEX_CONF_H]
|
|
|
/*
|
/*
|
Don't expant macros in comments
|
Don't expand macros in comments
|
*/
|
*/
|
#define[//][
|
#define[//][
|
][#noexpand[!dnapxeon!]//$0!dnapxeon!
|
][#noexpand[!dnapxeon!]//$0!dnapxeon!
|
]
|
]
|
#define[/*][*/][#noexpand[!dnapxeon!]/*$0*/!dnapxeon!]
|
#define[/*][*/][#noexpand[!dnapxeon!]/*$0*/!dnapxeon!]
|
Line 36... |
Line 36... |
from the ZTEX descriptor). The Vendor ID must be purchased from the USB-IF
|
from the ZTEX descriptor). The Vendor ID must be purchased from the USB-IF
|
(http://www.usb.org).
|
(http://www.usb.org).
|
|
|
The default vendor ID is the ZTEX vendor ID 0x221A, default product ID is
|
The default vendor ID is the ZTEX vendor ID 0x221A, default product ID is
|
0x100 which is assigned to ZTEX modules. These ID's can be shared by many
|
0x100 which is assigned to ZTEX modules. These ID's can be shared by many
|
differend products which are identified by the product ID of the ZTEX
|
different products which are identified by the product ID of the ZTEX
|
descriptor. According to the USB-IF rules these ID's must not be used by
|
descriptor. According to the USB-IF rules these ID's must not be used by
|
hardware which is not manufactured by ZTEX. (Of course, this ID's can be
|
hardware which is not manufactured by ZTEX. (Of course, this ID's can be
|
used during the development process or for internal purposes.)
|
used during the development process or for internal purposes.)
|
|
|
Please read the http://www.ztex.de/firmware-kit/usb_ids.e.html for more
|
Please read the http://www.ztex.de/firmware-kit/usb_ids.e.html for more
|
informations about this topic.
|
informations about this topic.
|
|
|
Usage:
|
Usage:
|
SET_VPID(<Vendor ID>,<Pioduct ID>);
|
SET_VPID(<Vendor ID>,<Product ID>);
|
*/
|
*/
|
#define[SET_VPID(][,$1);][#define[USB_VENDOR_ID][$0]
|
#define[SET_VPID(][,$1);][#define[USB_VENDOR_ID][$0]
|
#define[USB_PRODUCT_ID][$1]]
|
#define[USB_PRODUCT_ID][$1]]
|
SET_VPID(0x221a,0x100);
|
SET_VPID(0x221a,0x100);
|
|
|
/*
|
/*
|
This macro is called before FPGA Firmware is reset, e.g. to save some
|
This macro is called before FPGA Firmware is reset, e.g. to save some
|
settings. After this macro is called the I/O ports are set to default
|
settings. After this macro is called the I/O ports are set to default
|
states in order to avoid damage during / after the FPGA configuration.
|
states in order to avoid damage during / after the FPGA configuration.
|
To append someting to this macro use the follwing definition:
|
To append something to this macro use the following definition:
|
#define[PRE_FPGA_RESET][PRE_FPGA_RESET
|
#define[PRE_FPGA_RESET][PRE_FPGA_RESET
|
...]
|
...]
|
*/
|
*/
|
#define[PRE_FPGA_RESET][]
|
#define[PRE_FPGA_RESET][]
|
|
|
|
|
/*
|
/*
|
This macro is called after FPGA Firmware has been configured. This is
|
This macro is called after FPGA Firmware has been configured. This is
|
usually used to configure the I/O ports.
|
usually used to configure the I/O ports.
|
To append someting to this macro use the follwing definition:
|
To append something to this macro use the following definition:
|
#define[POST_FW_LOAD][POST_FW_LOAD
|
#define[POST_FW_LOAD][POST_FW_LOAD
|
...]
|
...]
|
*/
|
*/
|
#define[POST_FPGA_CONFIG][]
|
#define[POST_FPGA_CONFIG][]
|
|
|
Line 132... |
Line 132... |
|
|
/*
|
/*
|
Endoint 1,2,4,5,8 configuration:
|
Endoint 1,2,4,5,8 configuration:
|
|
|
EP_CONFIG(<EP number>,<interface>,<type>,<direction>,<size>,<buffers>)
|
EP_CONFIG(<EP number>,<interface>,<type>,<direction>,<size>,<buffers>)
|
<EP number> = 1IN | 1OUT | 2 | 4 | 6 | 8 Endpoint numer
|
<EP number> = 1IN | 1OUT | 2 | 4 | 6 | 8 Endpoint number
|
<INTERFACE> = 0 | 1 | 2 | 3 To which interface this endpoint belongs
|
<INTERFACE> = 0 | 1 | 2 | 3 To which interface this endpoint belongs
|
<type> = BULK | ISO | INT
|
<type> = BULK | ISO | INT
|
<dir> = IN | OUT
|
<dir> = IN | OUT
|
<size> = 512 | 1024
|
<size> = 512 | 1024
|
<buffers> = 1 | 2 | 3 | 4
|
<buffers> = 1 | 2 | 3 | 4
|
Example: EP_CONFIG(2,0,ISO,OUT,1024,4);
|
Example: EP_CONFIG(2,0,ISO,OUT,1024,4);
|
Importand note: No spaces next to the commas
|
Important note: No spaces next to the commas
|
|
|
|
|
Endoint 1 configuration:
|
Endpoint 1 configuration:
|
|
|
These Endpoints are defined by default as bulk endpoints and are assigned to interface 0.
|
These Endpoints are defined by default as bulk endpoints and are assigned to interface 0.
|
Endpoint size is always 64 bytes, but reported Endpoint size will be 512 bytes for USB 2.0 compliance.
|
Endpoint size is always 64 bytes, but reported Endpoint size will be 512 bytes for USB 2.0 compliance.
|
|
|
These Endpoints can be redefined using EP_CONFIG or using:
|
These Endpoints can be redefined using EP_CONFIG or using:
|
Line 224... |
Line 224... |
/*
|
/*
|
ISO and INT Transactions per microframe:
|
ISO and INT Transactions per microframe:
|
|
|
Default value is 1 for all endpoints.
|
Default value is 1 for all endpoints.
|
|
|
EP_PPMF(<EP number>,<tansactions per microframe>)
|
EP_PPMF(<EP number>,<transactions per microframe>)
|
<EP number> = 1IN | 1OUT | 2 | 4 | 6 | 8 Endpoint
|
<EP number> = 1IN | 1OUT | 2 | 4 | 6 | 8 Endpoint
|
<tansactions per microframe> = 1 | 2 | 3 Transactions per microframe
|
<transactions per microframe> = 1 | 2 | 3 Transactions per microframe
|
|
|
Example: EP_PPMF(2,3);
|
Example: EP_PPMF(2,3);
|
Importand note: No spaces next to the commas
|
Important note: No spaces next to the commas
|
*/
|
*/
|
#define[EP_PPMF(][,$1);][
|
#define[EP_PPMF(][,$1);][
|
#ifeq[$0][1IN]
|
#ifeq[$0][1IN]
|
#elifeq[$0][1OUT]
|
#elifeq[$0][1OUT]
|
#elifeq[$0][2]
|
#elifeq[$0][2]
|
Line 264... |
Line 264... |
EP_POLL(<EP number>,<polling interval>)
|
EP_POLL(<EP number>,<polling interval>)
|
<EP number> = 1IN | 1OUT | 2 | 4 | 6 | 8 Endpoint
|
<EP number> = 1IN | 1OUT | 2 | 4 | 6 | 8 Endpoint
|
<polling interval> = 1 | 2 | 3 Polling interval
|
<polling interval> = 1 | 2 | 3 Polling interval
|
|
|
Example: EP_POLL(2,1);
|
Example: EP_POLL(2,1);
|
Importand note: No spaces next to the commas
|
Important note: No spaces next to the commas
|
*/
|
*/
|
#define[EP_POLL(][,$1);][
|
#define[EP_POLL(][,$1);][
|
#ifeq[$0][1IN]
|
#ifeq[$0][1IN]
|
#elifeq[$0][1OUT]
|
#elifeq[$0][1OUT]
|
#elifeq[$0][2]
|
#elifeq[$0][2]
|
Line 388... |
Line 388... |
#define[PRODUCT_IS][UM-1_0]
|
#define[PRODUCT_IS][UM-1_0]
|
#define[PRODUCT_STRING]["USB Module 1.0"]]
|
#define[PRODUCT_STRING]["USB Module 1.0"]]
|
|
|
|
|
/*
|
/*
|
This macro defines the Manufacturer string. Limited to 31 charcters.
|
Identify as ZTEX USB XMEGA Module 1.0
|
|
Usage: IDENTITY_UM_1_0(<PRODUCT_ID_0>.<PRODUCT_ID_1><PRODUCT_ID_2>.<PRODUCT_ID_3>,<FW_VERSION>);
|
|
*/
|
|
#define[IDENTITY_UXM_1_0(][.$1.$2.$3,$4);][#define[PRODUCT_ID_0][$0]
|
|
#define[PRODUCT_ID_1][$1]
|
|
#define[PRODUCT_ID_2][$2]
|
|
#define[PRODUCT_ID_3][$3]
|
|
#define[FWVER][$4]
|
|
#define[PRODUCT_IS][UXM-1_0]
|
|
#define[PRODUCT_STRING]["USB XMEGA Module 1.0"]]
|
|
|
|
|
|
/*
|
|
This macro defines the Manufacturer string. Limited to 31 characters.
|
*/
|
*/
|
#define[MANUFACTURER_STRING]["ZTEX"]
|
#define[MANUFACTURER_STRING]["ZTEX"]
|
|
|
|
|
/*
|
/*
|
This macro defines the Product string. Limited to 31 charcters.
|
This macro defines the Product string. Limited to 31 characters.
|
*/
|
*/
|
#define[PRODUCT_STRING]["USB-FPGA Module"]
|
#define[PRODUCT_STRING]["USB-FPGA Module"]
|
|
|
|
|
/*
|
/*
|
This macro defines the Configuration string. Limited to 31 charcters.
|
This macro defines the Configuration string. Limited to 31 characters.
|
*/
|
*/
|
#define[CONFIGURATION_STRING]["(unknown)"]
|
#define[CONFIGURATION_STRING]["(unknown)"]
|
|
|
|
|
/*
|
/*
|
This macro enables defines the Configuration string. Limited to 31 charcters.
|
This macro enables defines the Configuration string. Limited to 31 characters.
|
*/
|
*/
|
#define[CONFIGURATION_STRING]["(unknown)"]
|
#define[CONFIGURATION_STRING]["(unknown)"]
|
|
|
|
|
/*
|
/*
|
This macro disables EEPROM interface and certain I2C functions (enabled by default)
|
This macro disables EEPROM interface and certain I2C functions (enabled by default)
|
Usage: DISABLE_EEPROM;
|
Usage: DISABLE_EEPROM;
|
*/
|
*/
|
#define[DISBALE_EEPROM;][#define[EEPROM_DISBALED][1]]
|
#define[DISABLE_EEPROM;][#define[EEPROM_DISABLED][1]]
|
|
|
|
|
/*
|
/*
|
This macro enables the Flash interface, if available
|
This macro enables the Flash interface, if available
|
Usage: ENABLE_FLASH;
|
Usage: ENABLE_FLASH;
|
Line 430... |
Line 443... |
This macro enables the FPGA configuration using a bitstream from the Flash memory
|
This macro enables the FPGA configuration using a bitstream from the Flash memory
|
Usage: ENABLE_FLASH_BITSTREAM;
|
Usage: ENABLE_FLASH_BITSTREAM;
|
*/
|
*/
|
#define[ENABLE_FLASH_BITSTREAM;][#define[FLASH_BITSTREAM_ENABLED][1]]
|
#define[ENABLE_FLASH_BITSTREAM;][#define[FLASH_BITSTREAM_ENABLED][1]]
|
|
|
|
/*
|
|
This enables the debug helper. The debug helper consists in a stack of messages which can be read out from host software.
|
|
See ../examples/all/debug/Readme.
|
|
Usage: ENABLE_DEBUG(<stack size>,<message_size>);
|
|
<stack size> number of messages in stack
|
|
<message size> message size in bytes
|
|
*/
|
|
#define[ENABLE_DEBUG(][,$1);][#define[DEBUG_ENABLED][1]
|
|
#define[DEBUG_STACK_SIZE][$0]
|
|
#define[DEBUG_MSG_SIZE][$1]]
|
|
|
|
/*
|
|
This macro disables XMEGA support, if available
|
|
Usage: ENABLE_FLASH;
|
|
*/
|
|
#define[XMEGA_DISABLED;][#define[XMEGA_DISABLED][1]]
|
|
|
#endif
|
#endif
|
|
|
No newline at end of file
|
No newline at end of file
|