diff options
author | Michael Brown | 2006-06-12 21:29:50 +0200 |
---|---|---|
committer | Michael Brown | 2006-06-12 21:29:50 +0200 |
commit | 51a36f1cfbb45609c5e50b2257f4030b956316ae (patch) | |
tree | 03a9103239678c94b1e91adf297b545d484c92f0 /src/drivers/bitbash/bitbash.c | |
parent | Updated debug message to reflect change in data structure. (diff) | |
download | ipxe-51a36f1cfbb45609c5e50b2257f4030b956316ae.tar.gz ipxe-51a36f1cfbb45609c5e50b2257f4030b956316ae.tar.xz ipxe-51a36f1cfbb45609c5e50b2257f4030b956316ae.zip |
Change read_bit() to return 0 or -1UL, rather than 0 or 1.
Diffstat (limited to 'src/drivers/bitbash/bitbash.c')
-rw-r--r-- | src/drivers/bitbash/bitbash.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/drivers/bitbash/bitbash.c b/src/drivers/bitbash/bitbash.c index 270c1b92..92abe1a7 100644 --- a/src/drivers/bitbash/bitbash.c +++ b/src/drivers/bitbash/bitbash.c @@ -48,8 +48,10 @@ void write_bit ( struct bit_basher *basher, unsigned int bit_id, * @v bit_id Bit number * @ret data Value read * - * @c data will always be either 0 or 1. + * @c data will always be either 0 or -1UL. The idea is that the + * caller can simply binary-AND the returned value with whatever mask + * it needs to apply. */ int read_bit ( struct bit_basher *basher, unsigned int bit_id ) { - return ( basher->read ( basher, bit_id ) ? 1 : 0 ); + return ( basher->read ( basher, bit_id ) ? -1UL : 0 ); } |