Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

i2c Class Reference

class for controlling i2c bus More...

#include <i2c.h>

List of all members.

Public Member Functions

 i2c (i2cio *io)
 ~i2c ()
bool write (int addr, const unsigned char *buf, int nbytes)
 true iff successful
int read (int addr, unsigned char *buf, int max_bytes)
 number of bytes read or -1 if error

Private Member Functions

void start ()
void stop ()
void write_bit (bool bit)
bool write_byte (char byte)
void set_sda (bool bit)
void set_scl (bool bit)
bool get_sda ()

Private Attributes

i2ciod_io


Detailed Description

class for controlling i2c bus


Constructor & Destructor Documentation

i2c::i2c i2cio io  ) 
 

i2c does not control lifetime of a_io

i2c::~i2c  )  [inline]
 


Member Function Documentation

bool i2c::get_sda  )  [inline, private]
 

int i2c::read int  addr,
unsigned char *  buf,
int  max_bytes
 

number of bytes read or -1 if error

void i2c::set_scl bool  bit  )  [inline, private]
 

void i2c::set_sda bool  bit  )  [inline, private]
 

void i2c::start  )  [private]
 

void i2c::stop  )  [private]
 

bool i2c::write int  addr,
const unsigned char *  buf,
int  nbytes
 

true iff successful

void i2c::write_bit bool  bit  )  [private]
 

bool i2c::write_byte char  byte  )  [private]
 


Member Data Documentation

i2cio* i2c::d_io [private]
 


The documentation for this class was generated from the following files:
Generated on Tue Mar 15 23:55:37 2005 for GNU Radio by  doxygen 1.4.0