|
@@ -48,8 +48,10 @@ void write_bit ( struct bit_basher *basher, unsigned int bit_id,
|
48
|
48
|
* @v bit_id Bit number
|
49
|
49
|
* @ret data Value read
|
50
|
50
|
*
|
51
|
|
- * @c data will always be either 0 or 1.
|
|
51
|
+ * @c data will always be either 0 or -1UL. The idea is that the
|
|
52
|
+ * caller can simply binary-AND the returned value with whatever mask
|
|
53
|
+ * it needs to apply.
|
52
|
54
|
*/
|
53
|
55
|
int read_bit ( struct bit_basher *basher, unsigned int bit_id ) {
|
54
|
|
- return ( basher->read ( basher, bit_id ) ? 1 : 0 );
|
|
56
|
+ return ( basher->read ( basher, bit_id ) ? -1UL : 0 );
|
55
|
57
|
}
|