📄 cs8900_enet_eeprom_driver.h
字号:
/**********************************************************************
* $Workfile: CS8900_enet_eeprom_driver.h $
* $Revision: 1.1 $
* $Author: MaysR $
* $Date: Aug 29 2002 08:55:46 $
*
* Project:
*
* Description: CS8900A ethernet controller EEPROM update functions.
*
* References: CS8900 datasheet
*
* Revision History:
* $Log: //smaicnt2/pvcs/VM/CHIPS/archives/LH7A400/Ethernet/Drivers/CS8900_enet_eeprom_driver.h-arc $
*
* Rev 1.1 Aug 29 2002 08:55:46 MaysR
* Corrected parameter types for set IRQ and set DMA functions.
*
* Rev 1.0 Aug 27 2002 11:41:04 MaysR
* Initial revision.
*
*
*
* COPYRIGHT (C) 2001 SHARP MICROELECTRONICS OF THE AMERICAS, INC.
* CAMAS, WA
*
*********************************************************************/
#ifndef CS8900_ENET_EEPROM_DRIVER_H
#define CS8900_ENET_EEPROM_DRIVER_H
#include "SMA_Types.h"
// EEPROM command bits used with EEPROM command word
#define EEPROM_READ 0x0200
#define EEPROM_WRITE 0x0100
#define EEPROM_ERASE 0x0300
#define EEPROM_EW_ENABLE 0x0030
#define EEPROM_EW_DISABLE 0x0000
#define EEPROM_ERASE_ALL 0x0020
#define EEPROM_WRITE_ALL 0x0010
// set the EEPROM type to C46
#define ENET_EEP_HDR 0xA120
/**********************************************************************
* Functions
*********************************************************************/
// Waits for the EEPROM access to complete
void enet_wait_for_eeprom (void);
// compute the 2's complement checksum of the EEPROM data structure
void enet_e2_calc_cksum(void);
// set the MAC address in the EEPROM data structure
void enet_8900e2_set_mac(UNS_8 *mac_addr);
// set the I/O address in the EEPROM data structure
void enet_8900e2_set_io(UNS_16 io_base_addr);
// set the IRQ number in the EEPROM data structure
void enet_8900e2_set_irq(enet_int_t irq_value);
// set the DMA channel number in the EEPROM data structure
void enet_8900e2_set_dma(enet_dma_t dma_num);
// Erases the 8900A EEPROM
void enet_8900e2_erase_all(void);
// Enable Erase/Write of the 8900A EEPROM
void enet_8900e2_ew_enable(void);
// Disable (lock) Erase/Write of the 8900A EEPROM
void enet_8900e2_ew_disable(void);
// Write the EEPROM data structure to the 8900A EEPROM
void enet_8900e2_update (void);
#endif // CS8900_ENET_EEPROM_DRIVER_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -