mmap: added mmap io to gpio
* added function to gpio to use mmap * changed board definition format around mmap io (fast-gpio) * Intel Galileo Rev D updated to follow changed definitions * Example performing mmap io to pin 2 added. Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
This commit is contained in:
@@ -62,6 +62,15 @@ maa_intel_galileo_rev_d()
|
||||
b->pins[2].gpio.mux_total = 1;
|
||||
b->pins[2].gpio.mux[0].pin = 31;
|
||||
b->pins[2].gpio.mux[0].value = 1;
|
||||
b->pins[2].mmap.gpio.pinmap = 14;
|
||||
strncpy(b->pins[2].mmap.mem_dev, "/dev/uio0", 12);
|
||||
b->pins[2].mmap.gpio.mux_total = 2;
|
||||
b->pins[2].mmap.gpio.mux[0].pin = 31;
|
||||
b->pins[2].mmap.gpio.mux[0].value = 0;
|
||||
b->pins[2].mmap.gpio.mux[1].pin = 14;
|
||||
b->pins[2].mmap.gpio.mux[1].value = 0;
|
||||
b->pins[2].mmap.mem_sz = 0x1000;
|
||||
b->pins[2].mmap.bit_pos = 6;
|
||||
|
||||
strncpy(b->pins[3].name, "IO3", 8);
|
||||
b->pins[3].capabilites = (maa_pincapabilities_t) {1,1,1,1,0,0,0};
|
||||
@@ -69,10 +78,15 @@ maa_intel_galileo_rev_d()
|
||||
b->pins[3].gpio.mux_total = 1;
|
||||
b->pins[3].gpio.mux[0].pin = 30;
|
||||
b->pins[3].gpio.mux[0].value = 1;
|
||||
b->pins[3].fast_gpio.pinmap = 15;
|
||||
b->pins[3].fast_gpio.mux_total = 1;
|
||||
b->pins[3].fast_gpio.mux[0].pin = 30;
|
||||
b->pins[3].fast_gpio.mux[0].value = 0;
|
||||
b->pins[3].mmap.gpio.pinmap = 15;
|
||||
strncpy(b->pins[3].mmap.mem_dev, "/dev/uio0", 12);
|
||||
b->pins[3].mmap.gpio.mux_total = 2;
|
||||
b->pins[3].mmap.gpio.mux[0].pin = 30;
|
||||
b->pins[3].mmap.gpio.mux[0].value = 0;
|
||||
b->pins[3].mmap.gpio.mux[1].pin = 15;
|
||||
b->pins[3].mmap.gpio.mux[1].value = 0;
|
||||
b->pins[3].mmap.mem_sz = 0x1000;
|
||||
b->pins[3].mmap.bit_pos = 7;
|
||||
b->pins[3].pwm.pinmap = 3;
|
||||
b->pins[3].pwm.parent_id = 0;
|
||||
b->pins[3].pwm.mux_total = 1;
|
||||
|
||||
Reference in New Issue
Block a user