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

📄 eeprom.h

📁 freescale i.mx31 BSP CE5.0全部源码
💻 H
字号:
//------------------------------------------------------------------------------
//
//  Copyright (C) 2004,    Motorola Inc. All Rights Reserved
//
//------------------------------------------------------------------------------
//
//  Copyright (C) 2004, Freescale Semiconductor, Inc. All Rights Reserved
//  THIS SOURCE CODE IS CONFIDENTIAL AND PROPRIETARY AND MAY NOT
//  BE USED OR DISTRIBUTED WITHOUT THE WRITTEN PERMISSION OF
//  FREESCALE SEMICONDUCTOR, INC.
//
//------------------------------------------------------------------------------
//
//  Header:     eeprom.h
//
//  Provides definitions for EEPROM attached to CS8900 on EVB main board.
//
//------------------------------------------------------------------------------
#ifndef    __EEPROM_H
#define    __EEPROM_H

#if    __cplusplus
extern "C" {
#endif

//------------------------------------------------------------------------------
// GENERAL MODULE CONSTANTS
//------------------------------------------------------------------------------
// Supported EEPROMs:
// 1 - Non sequential (eg. Cxx)
// 0 - Sequential (eg. CSxx)
//
// C46, CS46    64 words
// C56, CS56    128 words
// C66, CS66    256 words

#define EEPROM_SIZE_WORDS                   64

// A valid reset configuration in a EEPROM connected to the CS8900
// allows the CS8900 to be configured via the EEPROM. The reset
// configuration can vary based on manufacturing needs. The default
// allows BOOT PROM ADDRESS, BOOT PROM MASK to be configured.
// The reset configuration must start from address 0 of the EEPROM.
// It's format is detailed in the CS8900 specification.
// Note: Since the EEPROM is accessed via the CS8900, the EEPROM data
// access width is restricted to word access only.

// Ethernet driver will configure CS8900 with all necessary parameters.  Provide
// a minimal reset configuration block that satisfies the CS8900 EEPROM interface.
// Format of reset control block is described in CS8900 datasheet.
//
//      0xA002  -   Configuration Block Header:
//                      EEPROM present (0xA << 12)
//                      Sequential EEPROM (0x0 << 8)
//                      2 bytes in block (0x02 << 0)
//
//      0x5E00  -   Checksum value
//                      Checksum byte (0x5E << 8)
//
#define EEPROM_DEFAULT_RESET_CFG            { 0x0002, 0xFE00 }
#define EEPPOM_RESET_CFG_WORDS              2
#define EEPROM_USER_DATA_MAX_WORDS          (EEPROM_SIZE_WORDS - EEPPOM_RESET_CFG_WORDS)
#define EEPROM_USER_DATA_START_WORD         EEPPOM_RESET_CFG_WORDS


//------------------------------------------------------------------------------
// FUNCTION PROTOTYPES
//------------------------------------------------------------------------------
BOOL BSPEEPROMInit(BYTE *pAddress);
BOOL BSPEEPROMWriteUserData(UINT16 offset, UINT16 *pwData, UINT32 numWords);
BOOL BSPEEPROMReadUserData(UINT16 offset, UINT16 *pwData, UINT32 numWords);

#ifdef __cplusplus
}
#endif

#endif // __EEPROM_H

⌨️ 快捷键说明

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