Private
Public Access
2
0

gpio: add mraa_gpio_read_dir

Add support for reading the direction of a GPIO
and expose it through mraa_gpio_read_dir.

Signed-off-by: Constantin Musca <constantin.musca@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
Constantin Musca
2016-02-05 13:36:56 +02:00
committed by Brendan Le Foll
parent 084883c210
commit cc4fe26c09
2 changed files with 41 additions and 0 deletions

View File

@@ -154,6 +154,15 @@ mraa_result_t mraa_gpio_mode(mraa_gpio_context dev, mraa_gpio_mode_t mode);
*/
mraa_result_t mraa_gpio_dir(mraa_gpio_context dev, mraa_gpio_dir_t dir);
/**
* Read Gpio direction
*
* @param dev The Gpio context
* @param dir The address where to store the Gpio direction
* @return Result of operation
*/
mraa_result_t mraa_gpio_read_dir(mraa_gpio_context dev, mraa_gpio_dir_t *dir);
/**
* Close the Gpio context
* - Will free the memory for the context and unexport the Gpio