spi: expose defined CS
Add missing information for Gen 2 CS info Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
This commit is contained in:
@@ -365,7 +365,7 @@ mraa_intel_galileo_gen2()
|
||||
b->pins[9].pwm.mux[1].value = 0;
|
||||
|
||||
strncpy(b->pins[10].name, "IO10", 8);
|
||||
b->pins[10].capabilites = (mraa_pincapabilities_t) {1,1,1,1,0,0,0};
|
||||
b->pins[10].capabilites = (mraa_pincapabilities_t) {1,1,1,1,1,0,0};
|
||||
b->pins[10].gpio.pinmap = 10;
|
||||
b->pins[10].gpio.parent_id = 0;
|
||||
b->pins[10].gpio.mux_total = 1;
|
||||
@@ -392,6 +392,10 @@ mraa_intel_galileo_gen2()
|
||||
b->pins[10].mmap.gpio.mux[2].value = 0;
|
||||
b->pins[10].mmap.mem_sz = 0x1000;
|
||||
b->pins[10].mmap.bit_pos = 2;
|
||||
b->pins[10].spi.parent_id = 1;
|
||||
b->pins[10].spi.mux_total = 1;
|
||||
b->pins[10].spi.mux[0].pin = 74;
|
||||
b->pins[10].spi.mux[0].value = 0;
|
||||
|
||||
strncpy(b->pins[11].name, "IO11", 8);
|
||||
b->pins[11].capabilites = (mraa_pincapabilities_t) {1,1,1,0,1,0,0};
|
||||
|
||||
@@ -269,6 +269,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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user