电视机顶盒c语言表述vip方法

#ifndef UINT8
#define UINT8 unsigned char
#endif
#ifndef UINT32
#define UINT32 unsigned int
#endif
#ifndef TRUE
#define TRUE 1
#endif

#ifndef FALSE
#define FALSE 0
#endif

UINT8 VIP_CheckSpecialRegister(UINT32 ulReg)
{
	UINT8 Check;

	if ((ulReg >> 28) == 0) //vip register
	{
		if (((ulReg & 0xffff) == 0xc084) ||	//gamma
			((ulReg & 0xffff) == 0xc184) ||	//lut
			((ulReg & 0xffff) == 0xd062) ||	//vip coefficient table
			((ulReg & 0xffff) == 0xd064) ||
			((ulReg & 0xffff) == 0xd068) ||
			((ulReg & 0xffff) == 0xd06c) ||
			((ulReg & 0xf000ffff) == 0xd060) ||	//vip coefficient table
			((ulReg & 0xf000ffff) == 0xd064) ||
			((ulReg & 0xf000ffff) == 0xd068) ||
			((ulReg & 0xf000ffff) == 0xd06c) ||
			((ulReg & 0xf000ffff) == 0x20000))
		{
			Check = TRUE;
		}
		else
		{
			Check = FALSE;
		}
	}
	else
	{
		Check = FALSE;
	}

	return Check;
}

int main(void)
{
 
	if (VIP_CheckSpecialRegister(0xd060))
		cout << "hello,world" << endl;
	system("PAUSE");
	return 0;

}

  

上一篇:P4302 [SCOI2003]字符串折叠


下一篇:洛谷P1182 数列分段 Section II