Line 1... |
Line 1... |
/*!
|
/*!
|
ZTEX Firmware Kit for EZ-USB Microcontrollers
|
ZTEX Firmware Kit for EZ-USB Microcontrollers
|
Copyright (C) 2008-2009 ZTEX e.K.
|
Copyright (C) 2009-2010 ZTEX e.K.
|
http://www.ztex.de
|
http://www.ztex.de
|
|
|
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
it under the terms of the GNU General Public License version 3 as
|
it under the terms of the GNU General Public License version 3 as
|
published by the Free Software Foundation.
|
published by the Free Software Foundation.
|
Line 21... |
Line 21... |
*/
|
*/
|
|
|
#ifndef[ZTEX_H]
|
#ifndef[ZTEX_H]
|
#define[ZTEX_H]
|
#define[ZTEX_H]
|
|
|
|
#define[INIT_CMDS;][]
|
|
|
/* *********************************************************************
|
/* *********************************************************************
|
***** include the basic functions ***********************************
|
***** include the basic functions ***********************************
|
********************************************************************* */
|
********************************************************************* */
|
#include[ztex-utils.h]
|
#include[ztex-utils.h]
|
|
|
Line 63... |
Line 65... |
#define[MMC_BIT_DI][6]
|
#define[MMC_BIT_DI][6]
|
#define[MMC_BIT_DO][4]
|
#define[MMC_BIT_DO][4]
|
#define[MMC_BIT_CLK][5]
|
#define[MMC_BIT_CLK][5]
|
#include[ztex-flash1.h]
|
#include[ztex-flash1.h]
|
|
|
#elifeq[PRODUCT_IS][UM-1_10]
|
#elifeq[PRODUCT_IS][UFM-1_10]
|
|
#define[MMC_PORT][A]
|
|
#define[MMC__PORT_DO][D]
|
|
#define[MMC_BIT_DO][0]
|
|
#define[MMC_BIT_CS][5]
|
|
#define[MMC_BIT_DI][6]
|
|
#define[MMC_BIT_CLK][7]
|
|
#include[ztex-flash1.h]
|
|
|
|
#elifeq[PRODUCT_IS][UFM-1_11]
|
#define[MMC_PORT][C]
|
#define[MMC_PORT][C]
|
#define[MMC_BIT_CS][4]
|
#define[MMC__PORT_DO][D]
|
#define[MMC_BIT_DI][5]
|
#define[MMC_BIT_DO][0]
|
#define[MMC_BIT_DO][7]
|
#define[MMC_BIT_CS][5]
|
|
#define[MMC_BIT_DI][7]
|
#define[MMC_BIT_CLK][6]
|
#define[MMC_BIT_CLK][6]
|
#include[ztex-flash1.h]
|
#include[ztex-flash1.h]
|
|
|
#else
|
#else
|
#warning[FLASH option is not supported by this product]
|
#warning[FLASH option is not supported by this product]
|
Line 81... |
Line 93... |
|
|
/* *********************************************************************
|
/* *********************************************************************
|
***** FPGA configuration support ************************************
|
***** FPGA configuration support ************************************
|
********************************************************************* */
|
********************************************************************* */
|
#ifeq[PRODUCT_IS][UFM-1_0]
|
#ifeq[PRODUCT_IS][UFM-1_0]
|
#include[ztex-fpga.h]
|
#include[ztex-fpga1.h]
|
#elifeq[PRODUCT_IS][UFM-1_1]
|
#elifeq[PRODUCT_IS][UFM-1_1]
|
#include[ztex-fpga.h]
|
#include[ztex-fpga1.h]
|
#elifeq[PRODUCT_IS][UFM-1_2]
|
#elifeq[PRODUCT_IS][UFM-1_2]
|
#include[ztex-fpga.h]
|
#include[ztex-fpga1.h]
|
|
#elifeq[PRODUCT_IS][UFM-1_10]
|
|
#include[ztex-fpga2.h]
|
|
#elifeq[PRODUCT_IS][UFM-1_11]
|
|
#include[ztex-fpga3.h]
|
#endif
|
#endif
|
|
|
/* *********************************************************************
|
/* *********************************************************************
|
***** define the descriptors and the interrupt routines *************
|
***** define the descriptors and the interrupt routines *************
|
********************************************************************* */
|
********************************************************************* */
|
Line 153... |
Line 169... |
IOA1 = 1;
|
IOA1 = 1;
|
OEA |= bmBIT1;
|
OEA |= bmBIT1;
|
#elifeq[PRODUCT_IS][UFM-1_2]
|
#elifeq[PRODUCT_IS][UFM-1_2]
|
IOA1 = 1;
|
IOA1 = 1;
|
OEA |= bmBIT1;
|
OEA |= bmBIT1;
|
|
#elifeq[PRODUCT_IS][UFM-1_10]
|
|
IOA1 = 1;
|
|
OEA |= bmBIT1;
|
|
#elifeq[PRODUCT_IS][UFM-1_11]
|
|
IOA1 = 1;
|
|
OEA |= bmBIT1;
|
#endif
|
#endif
|
|
|
|
INIT_CMDS;
|
|
|
EA = 0;
|
EA = 0;
|
EUSB = 0;
|
EUSB = 0;
|
|
|
ENABLE_AVUSB;
|
ENABLE_AVUSB;
|
|
|