i2c: generalising api
authorThomas Ingleby <thomas.c.ingleby@intel.com>
Fri, 2 May 2014 13:24:08 +0000 (14:24 +0100)
committerThomas Ingleby <thomas.c.ingleby@intel.com>
Fri, 2 May 2014 13:24:08 +0000 (14:24 +0100)
* Added raw init function (maa_i2c_init_raw) for not using pinmap

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
api/i2c.h

index 843c047..fb1e391 100644 (file)
--- a/api/i2c.h
+++ b/api/i2c.h
@@ -52,8 +52,19 @@ typedef struct {
     /*@}*/
 } maa_i2c_context;
 
+/** Initialise i2c context, using board defintions
+ *
+ * @return maa_i2c_context i2c context ready for other calls.
+ */
 maa_i2c_context* maa_i2c_init();
 
+/** Initialise i2c context, passing in spi bus to use.
+ *
+ * @param bus The i2c bus to use i.e. /dev/i2c-2 would be "2"
+ * @return maa_i2c_context i2c context ready for other calls.
+ */
+maa_i2c_context* maa_i2c_init_raw(unsigned int bus);
+
 /** Sets the frequency of the i2c context
  *
  *  @param dev the i2c context