📄 lh7a400_lcd_evb_eeprom_driver.h
字号:
/**********************************************************************
* $Workfile: lh7a400_lcd_evb_eeprom_driver.h $
* $Revision: 1.1 $
* $Author: KovitzP $
* $Date: Nov 14 2001 09:01:44 $
*
* Project: LH7A400
*
* Description:
* This file contains a driver for the EEPROM device on the LCD
* board on LH7A400 evaluation board system.
* The EEPROM is a Microchip 93LC46B 64 x 16 EEPROM.
*
* References:
* SHARP_EVB_DISPLAY_BOARD_REV2.pdf
* 93LC46.pdf (Microchip 1K Microwire(R) EEPROM chip spec).
*
* Requires;
* ssp_driver.h -- serial communications driver
*
* Revision History:
* $Log: P:/PVCS6_6/archives/LH7A400 (Aruba)/SSP/lh7a400_lcd_evb_eeprom_driver.h-arc $
*
* Rev 1.1 Nov 14 2001 09:01:44 KovitzP
* Modified include hierarchy
*
* Rev 1.0 Nov 12 2001 13:32:10 KovitzP
* Initial revision.
*
*
* COPYRIGHT (C) 2001 SHARP MICROELECTRONICS OF THE AMERICAS, INC.
* CAMAS, WA
*********************************************************************/
#ifndef LH7A400_LCD_EVB_EEPROM_DRIVER_H
#define LH7A400_LCD_EVB_EEPROM_DRIVER_H
#include "LH7A400_ssp_driver.h"
#include "LH7A400_evb_ssp_frame_driver.h"
/* Bit rate */
#define EE_BPS 500000
/* define maximum address and word size in the EEPROM */
#define EEPROM_ADR_MAX 63
#define EE_WORDSIZE 16
/* EEPROM commands */
/* erase word at adr */
#define EE_ERASE(adr) (0x1C0 | (adr) )
/* erase entire chip */
#define EE_ERAL 0x120
/* erase/write disable */
#define EE_WDS 0x100
/* erase/write enable */
#define EE_WEN 0x130
/* read word at adr */
#define EE_READ(adr) (0x180 | (adr) )
/* write word at adr */
#define EE_WRITE(adr) (0x140 | (adr) )
/* fill entire EEPROM with the same datum */
#define EE_WRAL (0x110)
/* initialize */
void lcd_eeprom_driver_init(void);
/* erase */
INT_32 lcd_eeprom_erase_word(INT_32 adr,
INT_32 timeout_in_milliseconds);
INT_32 lcd_eeprom_erase_all(INT_32 timeout_in_milliseconds);
/* write/erase protection */
void lcd_eeprom_lock(void);
void lcd_eeprom_unlock(void);
/* read */
UNS_16 lcd_eeprom_read(INT_32 adr);
INT_32 lcd_eeprom_block_read(INT_32 adr, UNS_16 * buffer, INT_32 nwords);
/* write */
INT_32 lcd_eeprom_write(INT_32 adr, UNS_16 data,
INT_32 timeout_in_milliseconds);
INT_32 lcd_eeprom_fill(UNS_16 data,
INT_32 timeout_in_milliseconds);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -