Private
Public Access
2
0

intel_galileo_rev_g: remove platform code from core

* Using hook functionality swap_complex is now done in the pre direction
* set area.

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
This commit is contained in:
Thomas Ingleby
2014-07-14 17:46:18 +01:00
parent 3d5512c15e
commit ce1fe370c4
3 changed files with 25 additions and 45 deletions

View File

@@ -402,11 +402,9 @@ mraa_gpio_dir(mraa_gpio_context dev, gpio_dir_t dir)
char bu[MAX_SIZE];
int length;
int out_switch = 0;
switch(dir) {
case MRAA_GPIO_OUT:
length = snprintf(bu, sizeof(bu), "out");
out_switch = 1;
break;
case MRAA_GPIO_IN:
length = snprintf(bu, sizeof(bu), "in");
@@ -416,12 +414,6 @@ mraa_gpio_dir(mraa_gpio_context dev, gpio_dir_t dir)
return MRAA_ERROR_FEATURE_NOT_IMPLEMENTED;
}
if (dev->phy_pin >= 0) {
mraa_result_t swap_res = mraa_swap_complex_gpio(dev->phy_pin, out_switch);
if (swap_res != MRAA_SUCCESS)
return swap_res;
}
if (write(direction, bu, length*sizeof(char)) == -1) {
close(direction);
return MRAA_ERROR_INVALID_RESOURCE;