knet_i2c.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


int knet_i2c_init (knet_bus_t *bus, int argc, char *argv[])

Function Documentation

int knet_i2c_init ( knet_bus_t bus,
int  argc,
char *  argv[] 

This function initializes the IC bus.

bus KNet Bus Handle
argc number of elements in argv
argv string used as initialization parameters
An error code:
  • <0 on error - error code
  • >=0 on success - number of devices found on the bus

Definition at line 80 of file knet_i2c.c.

References knet_bus_s::bus_info, knet_bus_s::close, device, knet_bus_s::exit, i2c_close(), i2c_open(), i2c_scan(), KB_ALLOC, kb_error(), KB_ERROR_OPENBUS, KB_ERROR_SCANBUS, kb_free, knet_i2c_exit(), knet_i2c_open(), knet_i2c_read(), knet_i2c_scan_callback(), knet_i2c_transfer(), knet_i2c_write(), knet_bus_s::open, knet_bus_s::read, knet_bus_s::transfer, and knet_bus_s::write.

Referenced by knet_init().

Here is the call graph for this function:

Generated on Wed Dec 15 11:49:29 2010 for KoreBot Library by  doxygen 1.5.5