⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sd_dskcomm_init.c

📁 本软件是TI公司免费提供的网络开发包 现在好象很难找到,有黑心的公司把它改一改,就卖价5000元,对网络开发和网络驱动开发有参考价值
💻 C
字号:
/*
 *  Copyright 2006 by Texas Instruments Incorporated.
 *  All rights reserved. Property of Texas Instruments Incorporated.
 *  Restricted rights to use, duplicate or disclose this code are
 *  granted through contract.
 *
 *  @(#) TCP/IP_Network_Developers_Kit 1.91.00.08 08-22-2006 (ndk-a08)
 */
//--------------------------------------------------------------------------
// IP Stack Client Demo
//--------------------------------------------------------------------------
// sd_dskcomm_init.c
//
// Private initialization function for the Spectrum Digital DSK Comm Adapter
//
// This function can be plugged into the user init function of the DSP/BIOS
// .CDB file to initialize the Spectrum Digital "DSK Communucations Adapter"
// so that is works with the standard SMSC Etherent driver as shipped in
// the NDK.
//
//--------------------------------------------------------------------------

#include <csl.h>

#define CE3 (*(unsigned int *)0x1800014)
#define CPLD_REG1 (*(unsigned int *)0xb0000004)
#define CPLD_REG2 (*(unsigned int *)0xb0000008)

//
// dskcomm_init()
//
// Use the UserInit function of the CDB file to call this private init
// function. It will initialize the SD DSK Comm board to be compatible
// with the NDK SMSC Ethernet driver.
//
void sd_dskcomm_init()
{
    volatile int i;

        CSL_init();

    // Setup CE3 (to access CPLD regs)
    CE3 = 0x22a28a22;

    // SMSC in reset
    CPLD_REG1 = 0x87;

    for(i=0;i<100000;i++);

    // SMSC out of reset
    CPLD_REG1 = 0x86;

    // Use EXTINT4 and invert it
    CPLD_REG2 = 0x11;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -