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

Subversion Repositories usb_fpga_2_14

[/] [usb_fpga_2_14/] [trunk/] [default/] [usb-fpga-2.01/] [default.c] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 ZTEX
/*%
2
   Default firmware and loader for ZTEX USB-FPGA Modules 2.01
3
   Copyright (C) 2009-2017 ZTEX GmbH.
4
   http://www.ztex.de
5
 
6
   Licensed under the Apache License, Version 2.0 (the "License");
7
   you may not use this file except in compliance with the License.
8
   You may obtain a copy of the License at
9
 
10
       http://www.apache.org/licenses/LICENSE-2.0
11
 
12
   Unless required by applicable law or agreed to in writing, software
13
   distributed under the License is distributed on an "AS IS" BASIS,
14
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
   See the License for the specific language governing permissions and
16
   limitations under the License.
17
%*/
18
 
19
#include[ztex-conf.h]   // Loads the configuration macros, see ztex-conf.h for the available macros
20
#include[ztex-utils.h]  // include basic functions and variables
21
 
22
// select ZTEX USB FPGA Module 2.01 as target  (required for FPGA configuration)
23
IDENTITY_UFM_2_01(10.18.0.0,0);
24
 
25
// this product string is also used for identification by the host software
26
#define[PRODUCT_STRING]["USB-FPGA Module 2.01 default FW"]
27
 
28
#define[D_RESET][IOA7]
29
 
30
#define[GPIO_CLK][IOC1]
31
#define[GPIO_DIR][IOC2]                         // 1: µC reads
32
#define[GPIO_DAT][IOC3]
33
#define[GPIO_RE][{OEC = OEC & ~bmBIT3;}]        // seen from µC
34
#define[GPIO_WE][{OEC = OEC | bmBIT3;}]         // seen from µC
35
 
36
#define[LSI_MISO][IOC4]
37
#define[LSI_MOSI][IOC5]
38
#define[LSI_CLK][IOC6]
39
#define[LSI_STOP][IOC7]
40
 
41
#define[OEA_MASK][bmBIT7] 
42
#define[OEA_UMASK][0]
43
 
44
#define[OEC_MASK][(bmBIT1 | bmBIT2 | bmBIT5 | bmBIT6 | bmBIT7)] 
45
#define[OEC_UMASK][(bmBIT4)] 
46
 
47
#define[OEE_MASK][0] 
48
#define[OEE_UMASK][0] 
49
 
50
#include[ztex-default.h]                        // template for default firmware

powered by: WebSVN 2.1.0

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