Linux Kernel
3.7.1
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
drivers
media
pci
cx25821
cx25821-biffuncs.h
Go to the documentation of this file.
1
/*
2
* Driver for the Conexant CX25821 PCIe bridge
3
*
4
* Copyright (C) 2009 Conexant Systems Inc.
5
* Authors <
[email protected]
>, <
[email protected]
>
6
*
7
* This program is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation; either version 2 of the License, or
10
* (at your option) any later version.
11
*
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
*
16
* GNU General Public License for more details.
17
*
18
* You should have received a copy of the GNU General Public License
19
* along with this program; if not, write to the Free Software
20
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21
*/
22
23
#ifndef _BITFUNCS_H
24
#define _BITFUNCS_H
25
26
#define SetBit(Bit) (1 << Bit)
27
28
inline
u8
getBit
(
u32
sample
,
u8
index
)
29
{
30
return
(
u8
) ((sample >>
index
) & 1);
31
}
32
33
inline
u32
clearBitAtPos
(
u32
value
,
u8
bit
)
34
{
35
return
value & ~(1 <<
bit
);
36
}
37
38
inline
u32
setBitAtPos
(
u32
sample
,
u8
bit
)
39
{
40
sample |= (1 <<
bit
);
41
return
sample;
42
43
}
44
45
#endif
Generated on Thu Jan 10 2013 13:47:47 for Linux Kernel by
1.8.2