Subversion Repositories group.electronics

Rev

Rev 178 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 178 Rev 181
Line 40... Line 40...
40
        }
40
        }
41
 
41
 
42
        public static void clearBit(ref byte data, int bitNum) {
42
        public static void clearBit(ref byte data, int bitNum) {
43
            data &= (byte)~(1 << bitNum);
43
            data &= (byte)~(1 << bitNum);
44
        }
44
        }
-
 
45
 
-
 
46
        public static bool readBit(UInt16 data, int bitNum) {
-
 
47
            return (data & (1 << bitNum)) != 0;
-
 
48
        }
-
 
49
 
-
 
50
        public static void setBit(ref UInt16 data, int bitNum) {
-
 
51
            data |= (UInt16)(1 << bitNum);
-
 
52
        }
-
 
53
 
-
 
54
        public static void clearBit(ref UInt16 data, int bitNum) {
-
 
55
            data &= (UInt16)~(1 << bitNum);
-
 
56
        }
45
    }
57
    }
46
}
58
}