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

📄 filter.c

📁 t102 驱动AU 7 屏的OSD原代码,我找了好久才找到的,有一定的参考价值.
💻 C
字号:
//---------------------------------------------------------------------------
// Terawins Inc. Company Confidential Strictly Private
//
// $Archive: Filter.c $
// $Revision: 1.01 $
// $Author: JoannW $
// $Date: 2002/06/27 $
//
// --------------------------------------------------------------------------
// >>>>>>>>>>>>>>>>>>>>>>>>> COPYRIGHT NOTICE <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
// --------------------------------------------------------------------------
// Copyright 2002 (c) Terawins Inc.
// --------------------------------------------------------------------------

#include <reg51.h>
#include "common.h"
#include "Struct.h"
#include "TW10xReg.h"
#include "Filter.h"
#include "TwoWire.h"

#if (defined T100A)|(defined T101)
#include ".\source\T100\FiltDatT100A.c"
#endif
#ifdef T101A
#include ".\source\T100\FiltDatT101A.c"
#endif
#if (defined T102)|(defined T106)|(defined T112)|(defined T116)
#include ".\source\T100\FiltDatT102.c"
#endif 



void LoadFilter(uCHAR cFilterID)
{
	uCHAR i;
	uCHAR c;
	uCHAR code *p=ScaleCoefData[cFilterID];
//	turn off 2-wire bus address auto increase
   //I2CWriteByte(TW101,TW_INTERFACE,I2CReadByte(TW101,TW_INTERFACE)&~AUTO_INC );
 	//I2CWriteByte(TW101,SCALING_CTRL,0x01); //Reset write pointer to 0x00

#ifdef T100
    I2CWriteByte(TW101,SCALING_CTRL,0x91|DCLKI_IS_FASTER);
#else
	I2CWriteByte(TW101,SCALING_CTRL,0x91);  //or 00 not sure
#endif

	for(i=0; i<SCALECOEFSIZE; i++)
	{
		c=*p++;
		I2CWriteByte(TW101,COEF_DATA_PORT,c);
	}
//	turn on 2-wire bus address auto increase
   I2CWriteByte(TW101,TW_INTERFACE,I2CReadByte(TW101,TW_INTERFACE)|AUTO_INC);

}


⌨️ 快捷键说明

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