bit_basher_operations Struct Reference

Bit-bashing operations. More...

#include <bitbash.h>


Data Fields

void(* write )(struct bit_basher *basher, unsigned int bit_id, unsigned long data)
 Set/clear output bit.
int(* read )(struct bit_basher *basher, unsigned int bit_id)
 Read input bit.


Detailed Description

Bit-bashing operations.

Definition at line 15 of file bitbash.h.


Field Documentation

void( * bit_basher_operations::write)(struct bit_basher *basher, unsigned int bit_id, unsigned long data)

Set/clear output bit.

Parameters:
basher Bit-bashing interface
bit_id Bit number
data Value to write
data will be 0 if a logic 0 should be written (i.e. the bit should be cleared), or -1UL if a logic 1 should be written (i.e. the bit should be set). This is done so that the method may simply binary-AND data with the appropriate bit mask.

Referenced by init_i2c_bit_basher(), init_spi_bit_basher(), and write_bit().

int( * bit_basher_operations::read)(struct bit_basher *basher, unsigned int bit_id)

Read input bit.

Parameters:
basher Bit-bashing interface
bit_id Bit number
Return values:
zero Input is a logic 0
non-zero Input is a logic 1

Referenced by init_i2c_bit_basher(), init_spi_bit_basher(), and read_bit().


The documentation for this struct was generated from the following file:

Generated on Tue Apr 6 20:02:02 2010 for gPXE by  doxygen 1.5.7.1