Staging: vt665x: Clean up include files, Part 2
[linux-2.6/linux-2.6-openrd.git] / drivers / staging / vt6655 / tbit.h
blob1850282ce443cd0d14244e951701c0d1e01ead79
1 /*
2 * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
3 * All rights reserved.
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 * File: tbit.h
22 * Purpose: Bit routines
24 * Author: Tevin Chen
26 * Date: May 21, 1996
30 #ifndef __TBIT_H__
31 #define __TBIT_H__
33 #include "ttype.h"
35 /*--------------------- Export Definitions -------------------------*/
37 /*--------------------- Export Types ------------------------------*/
39 /*--------------------- Export Macros ------------------------------*/
41 // test single bit on
42 #define BITbIsBitOn(tData, tTestBit) \
43 (((tData) & (tTestBit)) != 0)
45 // test single bit off
46 #define BITbIsBitOff(tData, tTestBit) \
47 (((tData) & (tTestBit)) == 0)
50 #define BITbIsAllBitsOn(tData, tTestBit) \
51 (((tData) & (tTestBit)) == (tTestBit))
53 #define BITbIsAllBitsOff(tData, tTestBit) \
54 (((tData) & (tTestBit)) == 0)
56 #define BITbIsAnyBitsOn(tData, tTestBit) \
57 (((tData) & (tTestBit)) != 0)
59 #define BITbIsAnyBitsOff(tData, tTestBit) \
60 (((tData) & (tTestBit)) != (tTestBit))
62 /*--------------------- Export Classes ----------------------------*/
64 /*--------------------- Export Variables --------------------------*/
66 /*--------------------- Export Functions --------------------------*/
70 #endif // __TBIT_H__