X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=api%2Fmraa%2Faio.hpp;h=d061f9a5f6ce698aaf25f460f03747d31f324e8c;hb=cd6701d604e531cbfa6fbf163c507d94d6566df7;hp=27c6a6461cb3a2eca8d82da6eaccb49e4c6e594d;hpb=dbc64fbe8669499b1953c073267dde380fbb8a3f;p=contrib%2Fmraa.git diff --git a/api/mraa/aio.hpp b/api/mraa/aio.hpp index 27c6a64..d061f9a 100644 --- a/api/mraa/aio.hpp +++ b/api/mraa/aio.hpp @@ -66,6 +66,14 @@ class Aio { return mraa_aio_read(m_aio); } /** + * Read a value from the AIO pin and return it as a normalized float. + * + * @returns The current input voltage as a normalized float (0.0f-1.0f) + */ + float readFloat() { + return mraa_aio_read_float(m_aio); + } + /** * Set the bit value which mraa will shift the raw reading * from the ADC to. I.e. 10bits * @param bits the bits the return from read should be i.e 10