1 #ifndef _GPXE_BITBASH_H
2 #define _GPXE_BITBASH_H
6 * Bit-bashing interfaces
10 /** A bit-bashing interface */
13 * Set/clear output bit
15 * @v basher Bit-bashing interface
16 * @v bit_id Bit number
17 * @v data Value to write
19 * @c data will be 0 if a logic 0 should be written (i.e. the
20 * bit should be cleared), or -1UL if a logic 1 should be
21 * written (i.e. the bit should be set). This is done so that
22 * the method may simply binary-AND @c data with the
23 * appropriate bit mask.
25 void ( * write ) ( struct bit_basher *basher, unsigned int bit_id,
30 * @v basher Bit-bashing interface
31 * @v bit_id Bit number
32 * @ret zero Input is a logic 0
33 * @ret non-zero Input is a logic 1
35 int ( * read ) ( struct bit_basher *basher, unsigned int bit_id );
38 extern void write_bit ( struct bit_basher *basher, unsigned int bit_id,
40 extern int read_bit ( struct bit_basher *basher, unsigned int bit_id );
42 #endif /* _GPXE_BITBASH_H */