?? eeprom.h
字號:
/* **********************************************************************
Copyright (c) 2002-2006 Beyond Innovation Technology Co., Ltd
All rights are reserved. Reproduction in whole or in parts is
prohibited without the prior written consent of the copyright owner.
----------------------------------------------------------------------
Module: EEPROM.H
Purpose: Interface of EEPROM.
Version: 0.01 07:25PM 2005/05/13
Compiler: Keil 8051 C Compiler v8.01
Reference:
----------------------------------------------------------------------
Modification:
R0.01 07:24PM 2005/05/13 Jeffrey Chang
Reason:
1. Original.
Solution:
********************************************************************** */
#ifndef _EEPROM_H_
#define _EEPROM_H_
/* ------------------------------------
Header Files
------------------------------------ */
#include "osd.h"
#include "platform.h"
#include "vp.h"
#include "yuv.h"
/* ------------------------------------
Macro Definitions
------------------------------------ */
#undef EXTERN
#ifdef _EEPROM_C_
#define EXTERN
#else
#define EXTERN extern
#endif
/* ::::::::::::::::::::::::::::::::::::
EEPROM Configuration
:::::::::::::::::::::::::::::::::::: */
#if (EEPROM_CFG == EEPROM_PCF85116)
#define EEPROM_BLOCK 256 /* 256 bytes/block x 8 blocks */
#define EEPROM_MAX_BLOCK 8
#define EEPROM_PAGE 32 /* 32 bytes/page x 64 pages */
#define EEPROM_WRITE_CYCLE_TIME 100 // 10 ms
#elif (EEPROM_CFG == EEPROM_24LC04B)
#define EEPROM_BLOCK 256 /* 256 bytes/block x 2 blocks */
#define EEPROM_MAX_BLOCK 2
#define EEPROM_PAGE 16 /* 16 bytes/page x 32 pages */
#define EEPROM_WRITE_CYCLE_TIME 100 // 10 ms
#elif (EEPROM_CFG == EEPROM_AT24C04) // Atmel AT24C04
// 4096 = 2 x 256 x 8 bits
#define EEPROM_BLOCK 256 /* 256 bytes/block x 2 blocks */
#define EEPROM_MAX_BLOCK 2
#define EEPROM_PAGE 16 /* 16 bytes/page x 32 pages */
#define EEPROM_WRITE_CYCLE_TIME 100 // 10 ms
#elif (EEPROM_CFG == EEPROM_AT24C08) // AT24C08
// 8192 = 4 x 256 x 8 bits
#define EEPROM_BLOCK 256 /* Block Size: 256 bytes/block */
#define EEPROM_MAX_BLOCK 4 // Total Blocks: 4 blocks
#define EEPROM_PAGE 16 /* Page Size: 16 bytes/page */
//#define EEPROM_WRITE_CYCLE_TIME 10 // 10 ms
#define EEPROM_WRITE_CYCLE_TIME 20 // 10 ms
#elif (EEPROM_CFG == EEPROM_AT24C16) // AT24C16
// 16384 = 8 x 256 x 8 bits
#define EEPROM_BLOCK 256 /* [12]2-39 Block Size: 256 bytes/block */
#define EEPROM_MAX_BLOCK 8 // [12]2-39 Total Blocks: 8 blocks
#define EEPROM_PAGE 16 /* [12]2-43 Page Size: 16 bytes/page */
#define EEPROM_WRITE_CYCLE_TIME 10 // [12]2-40 Twr: 10 ms
#elif (EEPROM_CFG == EEPROM_AT24C32) // AT24C32
// 32768 = 16 x 256 x 8 bits
#define EEPROM_BLOCK 256 /* [12]2-39 Block Size: 256 bytes/block */
#define EEPROM_MAX_BLOCK 16 // [12]2-39 Total Blocks: 16 blocks
#define EEPROM_PAGE 32 /* [12]2-85 Page Size: 32 bytes/page */
#define EEPROM_WRITE_CYCLE_TIME 20 // [12]2-82 Twr: 10 ms
#elif (EEPROM_CFG == EEPROM_AT24C64) // AT24C64
// 65536 = 32 x 256 x 8 bits
#define EEPROM_BLOCK 256 /* [12]2-39 Block Size: 256 bytes/block */
#define EEPROM_MAX_BLOCK 32 // [12]2-39 Total Blocks: 16 blocks
#define EEPROM_PAGE 32 /* [12]2-85 Page Size: 32 bytes/page */
#define EEPROM_WRITE_CYCLE_TIME 20 // [12]2-82 Twr: 10 ms
#elif (EEPROM_CFG == EEPROM_AM24LC02) // AM24LC02
// 2048 = 256 x 8 bits
#define EEPROM_BLOCK 256 /* [12]2-39 Block Size: 256 bytes/block */
#define EEPROM_MAX_BLOCK 1 // [12]2-39 Total Blocks: 1 blocks
#define EEPROM_PAGE 8 /* [12]2-85 Page Size: 8 bytes/page */
#define EEPROM_WRITE_CYCLE_TIME 20 // [14]3 Twr: 10 ms
#elif (EEPROM_CFG == EEPROM_IS24C02) // [16]
// 2048 = 256 x 8 bits
#define EEPROM_BLOCK 256 /* [16]1 Block Size: 256 bytes/block */
#define EEPROM_MAX_BLOCK 1 // [16]1 Total Blocks: 1 blocks
#define EEPROM_PAGE 8 /* [16]5 Page Size: 8 bytes/page */
#define EEPROM_WRITE_CYCLE_TIME 20 // [16]12 Twr: 10 ms
#elif (EEPROM_CFG == EEPROM_IS24C04) // [16]
// 4096 = 512 x 8 bits
#define EEPROM_BLOCK 256 /* [16]1 Block Size: 256 bytes/block */
#define EEPROM_MAX_BLOCK 2 // [16]1 Total Blocks: 2 blocks
#define EEPROM_PAGE 16 /* [16]5 Page Size: 16 bytes/page */
#define EEPROM_WRITE_CYCLE_TIME 20 // [16]12 Twr: 10 ms
#elif (EEPROM_CFG == EEPROM_TU24C02) // [8]
// 2048 bits = 256 x 8 bits = 32 pages
#define EEPROM_BLOCK 256 // [8]1 Block Size: 256 bytes/block
#define EEPROM_MAX_BLOCK 1 // [8]1 Total Blocks: 1 blocks
#define EEPROM_PAGE 8 // [8]5 Page Size: 8 bytes/page
#define EEPROM_WRITE_CYCLE_TIME 20 // [8]12 Twr: 10 ms
#else
#error EEPROM.H - Invalid EEPROM_CFG !
#endif // EEPROM_CFG
/* ::::::::::::::::::::::::::::::::::::
tEGD: EEPROM General Descriptor Default Values
:::::::::::::::::::::::::::::::::::: */
#define EGD_PROJECT_CODE PROJECT_CODE // Project Code for EEPROM update
#define EGD_COLOR_STD_MODE YUV_CS_AUTO // Color Standard Detection Mode
/* ::::::::::::::::::::::::::::::::::::
[1]18 Audio Volume
:::::::::::::::::::::::::::::::::::: */
#define EGD_AUDIO_VOLUME 25 // PWM2 Duty for Audio Volume control !
/* ::::::::::::::::::::::::::::::::::::
[1]23 VP Background and Test Pattern
:::::::::::::::::::::::::::::::::::: */
// Normal Pattern
#define PATTERN_NORMAL_R 0x3F // [1]23 Color R Intensity 0x00..0x3F
#define PATTERN_NORMAL_G 0x00 // [1]23 Color G Intensity 0x00..0x3F
#define PATTERN_NORMAL_B 0x00 // [1]23 Color B Intensity 0x00..0x3F
// No Signal Pattern
#define PATTERN_NOSIGNAL_R 0x00 // [1]23 Color R Intensity 0x00..0x3F
#define PATTERN_NOSIGNAL_G 0x00 // [1]23 Color G Intensity 0x00..0x3F
#define PATTERN_NOSIGNAL_B 0x3F // [1]23 Color B Intensity 0x00..0x3F
/* ::::::::::::::::::::::::::::::::::::
IR Channel
:::::::::::::::::::::::::::::::::::: */
#define IR_CHANNEL_A 0
#define IR_CHANNEL_B 1
#define IR_CHANNEL_OFF 2
#define IR_CHANNEL_NO 3
/* ::::::::::::::::::::::::::::::::::::
AV System
:::::::::::::::::::::::::::::::::::: */
#define AV_AUTO 0
#define AV_NTSC 1
#define AV_PAL 2
#define AV_NO 3
/* ::::::::::::::::::::::::::::::::::::
Screen
:::::::::::::::::::::::::::::::::::: */
#define SCREEN_OFF 0
#define SCREEN_ON 1
#define SCREEN_AUTO 2
#define SCREEN_NO 3
/* ::::::::::::::::::::::::::::::::::::
[1]56 PWM Function
:::::::::::::::::::::::::::::::::::: */
// PWM1 as Backlight control
#define EGD_CB_PWM1_REF 0x64 // [1]58 PWM1's Reference Clock
#define EGD_CC_PWM1_FREQ 0x64 // [1]58 PWM1's PWM Frequency
#define EGD_CD_PWM1_ATTR1 0x00 // [1]58 PWM1's PWM Attribute
#define EGD_CECF_PWM1_DUTY 0x0032 // [1]58 PWM1's PWM Duty
#define EGD_D0_PWM1_ATTR2 0x00 // [1]58 PWM2's Reference Clock
// PWM2 as Audio Volume control
#define EGD_D1_PWM2_REF 0x64 // [1]58 PWM2's Reference Clock
#define EGD_D2_PWM2_FREQ 0x64 // [1]58 PWM2's PWM Frequency
#define EGD_D3_PWM2_DELAY 0x50 // [1]58 PWM2's PWM Delay
#define EGD_D4_PWM2_ATTR1 0x00 // [1]58 PWM2's PWM Attribute 1
#define EGD_D5D6_PWM2_DUTY 0x0032 // [1]59 PWM2's PWM Duty
#define EGD_D7_PWM2_ATTR2 0x21 // [1]59 PWM2's PWM Attribute 2
/* ::::::::::::::::::::::::::::::::::::
[1]58 IR Decoder Function
:::::::::::::::::::::::::::::::::::: */
#define EGD_D8_IR_UDCC_L 0x00 // [1]58 User Defined Customer Code
#define EGD_D9_IR_UDCC_H 0x00 // [1]58 User Defined Customer /Code
#define EGD_DA_IR_DATA_L 0x00 // [1]58 IR Data
#define EGD_DB_IR_CODE_L 0x00 // [1]58 IR Code
#define EGD_DC_IR_DATA_H 0x00 // [1]58 IR /Data
#define EGD_DD_IR_CODE_H 0x00 // [1]58 IR /Code
#define EGD_DE_IR_ATTR 0x00 // [1]58 IR Attribute
/* ::::::::::::::::::::::::::::::::::::
[1]55 External OSD Interface
:::::::::::::::::::::::::::::::::::: */
#define EGD_FE_EXTOSD_ATTR 0x00
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -