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:
a3d5af9
)
spi: expose defined CS
author
Thomas Ingleby
<thomas.c.ingleby@intel.com>
Thu, 30 Oct 2014 17:35:35 +0000
(17:35 +0000)
committer
Thomas Ingleby
<thomas.c.ingleby@intel.com>
Mon, 17 Nov 2014 17:40:48 +0000
(17:40 +0000)
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
src/mraa.c
patch
|
blob
|
history
diff --git
a/src/mraa.c
b/src/mraa.c
index
11c21ac
..
d35c9ee
100644
(file)
--- a/
src/mraa.c
+++ b/
src/mraa.c
@@
-274,6
+274,11
@@
mraa_setup_spi(int bus)
if (mraa_setup_mux_mapped(plat->pins[pos].spi) != MRAA_SUCCESS)
return NULL;
+ pos = plat->spi_bus[bus].cs;
+ if (plat->pins[pos].spi.mux_total > 0)
+ if (mraa_setup_mux_mapped(plat->pins[pos].spi) != MRAA_SUCCESS)
+ return NULL;
+
mraa_spi_bus_t *spi = &(plat->spi_bus[bus]);
return spi;
}