projects
/
contrib
/
mraa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d473641
)
gpio: add mmap enable function to cpp headers
author
Thomas Ingleby
<thomas.c.ingleby@intel.com>
Wed, 25 Jun 2014 10:14:20 +0000
(11:14 +0100)
committer
Thomas Ingleby
<thomas.c.ingleby@intel.com>
Wed, 25 Jun 2014 10:14:20 +0000
(11:14 +0100)
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
api/mraa/gpio.hpp
patch
|
blob
|
history
diff --git
a/api/mraa/gpio.hpp
b/api/mraa/gpio.hpp
index
b40f050
..
110d7c3
100644
(file)
--- a/
api/mraa/gpio.hpp
+++ b/
api/mraa/gpio.hpp
@@
-165,6
+165,15
@@
class Gpio {
mraa_result_t write(int value) {
return mraa_gpio_write(m_gpio, value);
}
+ /**
+ * Enable use of mmap i/o if available.
+ *
+ * @param enable true to use mmap
+ * @return Result of operation
+ */
+ mraa_result_t useMmap(bool enable) {
+ return mraa_gpio_use_mmaped(m_gpio, (mraa_boolean_t) enable);
+ }
private:
mraa_gpio_context m_gpio;
};