Private
Public Access
2
0

x86/edison: Speed up mraa_gpio_dir

Reasonable speed up in the mraa_gpio_dir on the Edison Arduino board

Signed-off-by: Kurt Eckhardt <kurte@rockisland.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
Kurt Eckhardt
2014-12-18 16:03:46 +00:00
committed by Brendan Le Foll
parent 21d88d15eb
commit 455ab6f063
2 changed files with 27 additions and 11 deletions

View File

@@ -117,6 +117,7 @@ mraa_gpio_init_raw(int pin)
dev->pin = pin;
dev->phy_pin = -1;
// then check to make sure the pin is exported.
char directory[MAX_SIZE];
snprintf(directory, MAX_SIZE, SYSFS_CLASS_GPIO "/gpio%d/", dev->pin);
struct stat dir;