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

📄 dual_eeprom.c

📁 realtek LCD monitor, TV开发源代码
💻 C
字号:
//**********************************************************************************************************
//  The  Software  is  proprietary,  confidential,  and  valuable to Realtek Semiconductor
//  Corporation  ("Realtek").  All  rights, including but not limited  to  copyrights,
//  patents,  trademarks, trade secrets, mask work rights, and other similar rights and interests,
//  are reserved to Realtek. Without  prior  written  consent  from  Realtek,  copying, reproduction,
//  modification,  distribution,  or  otherwise  is strictly prohibited. The Software  shall  be
//  kept  strictly  in  confidence,  and  shall  not be  disclosed to or otherwise accessed by
//  any third party. @ <2003> - <2008>   The Software is provided "AS IS" without any warranty of any kind,
//  express, implied, statutory or otherwise.
//**********************************************************************************************************
//----------------------------------------------------------------------------------------------------
// ID Code      : Eeprom.c No.0000
// Update Note  :
//----------------------------------------------------------------------------------------------------

#define __EEPROM__

#include "Common\Header\Include.h"


//#if(_OSD_TYPE == _DUAL_OSD)

#define _CHECKSUM_1                     (0x21+_PROJECT)
#define _CHECKSUM_2                     (0x21+_PROJECT)


#if(_MEMORY_LOCATION == _EEPROM)

//----------------------------------------------------------------------------------------------------
bit CEepromWrite(WORD usAddr, WORD usLength, BYTE *pWriteArray)
{
    bit Result;
#if(_TOUCH_SENSOR == _ON)
    CLR_I2C_TOUCH_KEY();
#endif
    bEEPROM_WRITE_PROTECT = _LOW;
    Delay5us();
    Delay5us();
    Result=CI2cWrite(_EEPROM_ADDRESS + (BYTE)((usAddr & 0xff00) >> 7), (BYTE)(usAddr & 0x00ff), usLength, pWriteArray);
    CTimerDelayXms(10);
    bEEPROM_WRITE_PROTECT = _HIGH;
    return(Result);
}
//----------------------------------------------------------------------------------------------------
bit CEepromRead(WORD usAddr, WORD usLength, BYTE *pReadArray)
{
#if(_TOUCH_SENSOR == _ON)
    CLR_I2C_TOUCH_KEY();
#endif // End of #if(_KEYPAD_TYPE == _KEYPAD_TOUCH)
    return CI2cRead(_EEPROM_ADDRESS + (BYTE)((usAddr & 0xff00) >> 7), (BYTE)(usAddr & 0x00ff), usLength, pReadArray);
}

void CEepromInitial(void)
{
    BYTE i;

#if(0)//パ F.W  糶

⌨️ 快捷键说明

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