📄 sys_global.h
字号:
/******************************************************************************
*
* The information contained herein is the exclusive property of
* Sunplus Technology Co. And shall not be distributed, reproduced,
* or disclosed in whole in part without prior written permission.
*
* (C) COPYRIGHT 2005 SUNPLUS TECHNOLOGY CO.
* ALL RIGHTS RESERVED
*
* The entire notice above must be reproduced on all authorized copies.
*
*****************************************************************************/
/******************************************************************************
* Filename: Sys_Global.h
* Author: Robin.xjliu (eMail: xjliu@sunplus.com)
* Tel: 00885-028-87848688-5884
* Date: 2005-11-03
* Description: system global define
* Reference:
* Version history:
*-----------------------------------------------------------------------------
* Version YYYY-MM-DD-INDEX Modified By Description
* 1.0.0 2005-11-03 xjliu Create
*
*****************************************************************************/
#ifndef _SYS_GLOBAL_H
#define _SYS_GLOBAL_H
//#include "Sys_Config.h"
#include "Sys_Define.h"
//#include "Sys_List.h"
//#include "..\SysLib_Basic\include\Sys_Load.h"
#include "SPCE3200_Register.h"
//#include "Sys_Timer.h"
//#include "Temp.h"
#include "Tve_Control.h"
#include "Sys_MemMap.h"
//Some function use frequently
#undef max
#undef min
#undef abs
#define max(a,b) (((a) > (b)) ? (a) : (b))
#define min(a,b) (((a) < (b)) ? (a) : (b))
#define abs(a) ((a) >= 0 ? (a) : (-a))
#define ASZ(x) (sizeof(x)/sizeof(x[0]))
/**
* SetBit - Set a bit in variable
* @n: bit number to set.
* @val: variable to set.
*/
#define SetBit(n, val) (val) |= (1<<n)
/**
* ClearBit - Clears a bit in variable
* @n: bit number to clear.
* @val: variable to clear.
*/
#define ClearBit(n, val) (val) &= ~(1<<n)
/**
* ChangeBit - Toggle a bit in memory
* @n: Bit to change
* @val: variable to change.
*/
#define ChangeBit(n, val) (val) ^= (1<<n)
/**
* TestBit - Determine whether a bit is set
* @n: bit number to test
* @val: value to test.
*/
#define TestBit(n, val) ((val)&(1<<(n)))
/**
* numof - Get the member number of a array
* @array: array to get the member number.
*/
#define numof(array) (sizeof(array)/sizeof((array)[0]))
#endif //_SYS_GLOBAL_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -