From a8661e599cfdaea0999e658782c746ddecfa78f3 Mon Sep 17 00:00:00 2001 From: Thomas Ingleby Date: Fri, 2 May 2014 14:24:08 +0100 Subject: [PATCH] i2c: generalising api * Added raw init function (maa_i2c_init_raw) for not using pinmap Signed-off-by: Thomas Ingleby --- api/i2c.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/api/i2c.h b/api/i2c.h index 843c047..fb1e391 100644 --- 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