From d49f20b7ba044cddb64be2cc8b0e45bd86c93ee2 Mon Sep 17 00:00:00 2001 From: Brendan Le Foll Date: Mon, 20 Oct 2014 10:01:53 +0100 Subject: [PATCH] i2c: mraa_i2c_frequency now returns correct returns Signed-off-by: Brendan Le Foll --- api/mraa/i2c.h | 2 +- src/i2c/i2c.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/mraa/i2c.h b/api/mraa/i2c.h index 5de3319..34c7395 100644 --- a/api/mraa/i2c.h +++ b/api/mraa/i2c.h @@ -69,7 +69,7 @@ mraa_i2c_context mraa_i2c_init(int bus); mraa_i2c_context mraa_i2c_init_raw(unsigned int bus); /** - * Sets the frequency of the i2c context + * Sets the frequency of the i2c context. Most platforms do not support this. * * @param dev The i2c context * @param hz The bus frequency in hertz diff --git a/src/i2c/i2c.c b/src/i2c/i2c.c index a4aa9e0..54c2cf7 100644 --- a/src/i2c/i2c.c +++ b/src/i2c/i2c.c @@ -81,7 +81,7 @@ mraa_i2c_frequency(mraa_i2c_context dev, int hz) { dev->hz = hz; - return MRAA_SUCCESS; + return MRAA_ERROR_FEATURE_NOT_SUPPORTED; } int