kitl_cfg.h

来自「mx27 f14v2 源代码。包括ADS板上诸多驱动的源码。」· C头文件 代码 · 共 90 行

H
90
字号
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft end-user
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
// If you did not accept the terms of the EULA, you are not authorized to use
// this source code. For a copy of the EULA, please see the LICENSE.RTF on your
// install media.
//
//------------------------------------------------------------------------------
//
// Copyright (C) 2004-2006, Freescale Semiconductor, Inc. All Rights Reserved.
// THIS SOURCE CODE, AND ITS USE AND DISTRIBUTION, IS SUBJECT TO THE TERMS
// AND CONDITIONS OF THE APPLICABLE LICENSE AGREEMENT
//
//------------------------------------------------------------------------------
#ifndef __KITL_CFG_H
#define __KITL_CFG_H

//------------------------------------------------------------------------------
#define OAL_KITL_ETH_CS8900A_INDEX  0
#define OAL_KITL_ETH_FEC_INDEX      1
#define OAL_KITL_SERIAL_INDEX       2

//------------------------------------------------------------------------------
// Prototypes for FEC

BOOL   FECInitDMABuffer(UINT32 address, UINT32 size);
BOOL   FECInit(UINT8 *pAddress, UINT32 offset, UINT16 mac[3]);
UINT16 FECSendFrame(UINT8 *pData, UINT32 length);
UINT16 FECGetFrame(UINT8 *pData, UINT16 *pLength);
VOID   FECEnableInts();
VOID   FECDisableInts();
VOID   FECCurrentPacketFilter(UINT32 filter);
BOOL   FECMulticastList(UINT8 *pAddresses, UINT32 count);

#define OAL_ETHDRV_FEC      { \
    FECInit, FECInitDMABuffer, NULL, FECSendFrame, FECGetFrame, \
    FECEnableInts, FECDisableInts, \
    NULL, NULL, FECCurrentPacketFilter, FECMulticastList \
}

OAL_KITL_ETH_DRIVER g_kitlEthCS8900A = OAL_ETHDRV_CS8900A;
OAL_KITL_ETH_DRIVER g_kitlEthFEC = OAL_ETHDRV_FEC;

BOOL SerialInit(KITL_SERIAL_INFO *pInfo);
VOID SerialDeinit();
UINT16 SerialRecv(UINT8 *pData, UINT16 size);
UINT16 SerialSend(UINT8 *pData, UINT16 size);
VOID SerialSendComplete(UINT16 size);
VOID SerialEnableInts();
VOID SerialDisableInts();

OAL_KITL_SERIAL_DRIVER g_kitlCspSerial =
{
    SerialInit,
    SerialDeinit,
    SerialSend,
    SerialSendComplete,
    SerialRecv,
    SerialEnableInts,
    SerialDisableInts,
    NULL,
    NULL
};

OAL_KITL_DEVICE g_kitlDevices[] = {
    {
        L"CS8900A", Internal, BSP_BASE_REG_PA_CS8900A_IOBASE, 0,
        OAL_KITL_TYPE_ETH, &g_kitlEthCS8900A
    },
    {
        L"FEC", Internal, CSP_BASE_REG_PA_FEC, 0,
        OAL_KITL_TYPE_ETH, &g_kitlEthFEC
    },
    {
        L"CSPSERIAL", Internal, BSP_BASE_REG_PA_SERIALKITL, 0,
        OAL_KITL_TYPE_SERIAL, &g_kitlCspSerial
    },
    {
        NULL, 0, 0, 0, 0, NULL
    }
};

//------------------------------------------------------------------------------

#endif

⌨️ 快捷键说明

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