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

Subversion Repositories usb_fpga_1_11

[/] [usb_fpga_1_11/] [trunk/] [include/] [ztex.h] - Diff between revs 8 and 9

Show entire file | Details | Blame | View Log

Rev 8 Rev 9
Line 1... Line 1...
/*!
/*!
   ZTEX Firmware Kit for EZ-USB FX2 Microcontrollers
   ZTEX Firmware Kit for EZ-USB FX2 Microcontrollers
   Copyright (C) 2009-2011 ZTEX GmbH.
   Copyright (C) 2009-2014 ZTEX GmbH.
   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 54... Line 54...
#define[MAC_EEPROM_ENABLED]
#define[MAC_EEPROM_ENABLED]
#endif // PRODUCT_IS=UFM-2_16
#endif // PRODUCT_IS=UFM-2_16
#ifeq[PRODUCT_IS][UFM-2_13]
#ifeq[PRODUCT_IS][UFM-2_13]
#define[MAC_EEPROM_ENABLED]
#define[MAC_EEPROM_ENABLED]
#endif // PRODUCT_IS=UFM-2_13
#endif // PRODUCT_IS=UFM-2_13
 
#ifeq[PRODUCT_IS][UFM-2_01]
 
#define[MAC_EEPROM_ENABLED]
 
#endif // PRODUCT_IS=UFM-2_01
 
#ifeq[PRODUCT_IS][UFM-2_04]
 
#define[MAC_EEPROM_ENABLED]
 
#endif // PRODUCT_IS=UFM-2_04
#endif // EEPROM_MAC_DISABLED
#endif // EEPROM_MAC_DISABLED
 
 
#include[ztex-eeprom.h]
#include[ztex-eeprom.h]
 
 
#endif // EEPROM_DISABLED
#endif // EEPROM_DISABLED
Line 66... Line 72...
/* *********************************************************************
/* *********************************************************************
   ***** Flash memory support ******************************************
   ***** Flash memory support ******************************************
   ********************************************************************* */
   ********************************************************************* */
#ifeq[FLASH_ENABLED][1]
#ifeq[FLASH_ENABLED][1]
 
 
#ifeq[PRODUCT_IS][UFM-1_1]
 
 
#ifeq[FLASH_OVERRIDE][1]
 
#include[ztex-flash1.h]
 
 
 
#elifeq[FLASH_OVERRIDE][2]
 
#include[ztex-flash2.h]
 
 
 
#elifeq[PRODUCT_IS][UFM-1_1]
#define[MMC_PORT][E]
#define[MMC_PORT][E]
#define[MMC_BIT_CS][7]
#define[MMC_BIT_CS][7]
#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]
Line 140... Line 153...
#define[SPI_BIT_CS][5]
#define[SPI_BIT_CS][5]
#define[SPI_BIT_CLK][6]
#define[SPI_BIT_CLK][6]
#define[SPI_BIT_DI][7]
#define[SPI_BIT_DI][7]
#include[ztex-flash2.h]
#include[ztex-flash2.h]
 
 
 
#elifeq[PRODUCT_IS][UFM-2_01]
 
#define[SPI_PORT][A]
 
#define[SPI_OPORT][C]
 
#define[SPI_BIT_DO][0]
 
#define[SPI_BIT_CS][3]
 
#define[SPI_BIT_CLK][0]
 
#define[SPI_BIT_DI][1]
 
#include[ztex-flash2.h]
 
 
 
#elifeq[PRODUCT_IS][UFM-2_04]
 
#define[SPI_PORT][A]
 
#define[SPI_OPORT][C]
 
#define[SPI_BIT_DO][0]
 
#define[SPI_BIT_CS][3]
 
#define[SPI_BIT_CLK][0]
 
#define[SPI_BIT_DI][1]
 
#include[ztex-flash2.h]
 
 
#else
#else
#warning[Flash memory access is not supported by this product]
#warning[Flash memory access is not supported by this product]
#define[FLASH_ENABLED][0]
#define[FLASH_ENABLED][0]
#endif
#endif
#endif
#endif
Line 167... Line 198...
#include[ztex-fpga5.h]
#include[ztex-fpga5.h]
#elifeq[PRODUCT_IS][UFM-2_16]
#elifeq[PRODUCT_IS][UFM-2_16]
#include[ztex-fpga6.h]
#include[ztex-fpga6.h]
#elifeq[PRODUCT_IS][UFM-2_13]
#elifeq[PRODUCT_IS][UFM-2_13]
#include[ztex-fpga6.h]
#include[ztex-fpga6.h]
 
#elifeq[PRODUCT_IS][UFM-2_01]
 
#include[ztex-fpga7.h]
 
#elifeq[PRODUCT_IS][UFM-2_04]
 
#include[ztex-fpga7.h]
#endif
#endif
 
 
 
 
/* *********************************************************************
/* *********************************************************************
   ***** DEBUG helper functions ****************************************
   ***** DEBUG helper functions ****************************************
Line 344... Line 379...
    init_fpga();
    init_fpga();
#elifeq[PRODUCT_IS][UFM-2_16]
#elifeq[PRODUCT_IS][UFM-2_16]
    init_fpga();
    init_fpga();
#elifeq[PRODUCT_IS][UFM-2_13]
#elifeq[PRODUCT_IS][UFM-2_13]
    init_fpga();
    init_fpga();
 
#elifeq[PRODUCT_IS][UFM-2_01]
 
    init_fpga();
 
#elifeq[PRODUCT_IS][UFM-2_04]
 
    init_fpga();
#endif
#endif
 
 
    INIT_CMDS;
    INIT_CMDS;
 
 
    EA = 0;
    EA = 0;
Line 398... Line 437...
    }
    }
#endif    
#endif    
 
 
#ifeq[FLASH_ENABLED][1]
#ifeq[FLASH_ENABLED][1]
    flash_init();
    flash_init();
 
    if ( !flash_enabled ) {
 
        wait(250);
 
        flash_init();
 
    }
#endif
#endif
#ifeq[DEBUG_ENABLED][1]
#ifeq[DEBUG_ENABLED][1]
    debug_init();
    debug_init();
#endif
#endif
#ifeq[XMEGA_ENABLED][1]
#ifeq[XMEGA_ENABLED][1]

powered by: WebSVN 2.1.0

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