Private
Public Access
2
0

gpio: mraa_gpio_dir allow output to set val

There is an issue that when you take an IO pin that has an external PU
resistor and switch it from INPUT to OUTPUT the state of the pin will go
down before you can set it back high.

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
2015-01-05 15:03:17 -08:00
committed by Brendan Le Foll
parent 66eb476620
commit 20d229168b
3 changed files with 13 additions and 3 deletions

View File

@@ -70,7 +70,9 @@ typedef enum {
*/
typedef enum {
MRAA_GPIO_OUT = 0, /**< Output. A Mode can also be set */
MRAA_GPIO_IN = 1 /**< Input */
MRAA_GPIO_IN = 1, /**< Input */
MRAA_GPIO_OUT_HIGH = 2, /**< Output. Init High */
MRAA_GPIO_OUT_LOW = 3 /**< Output. Init Low */
} gpio_dir_t;
/**

View File

@@ -45,8 +45,10 @@ typedef enum {
* Gpio Direction options
*/
typedef enum {
DIR_OUT = 0, /**< Output. A Mode can also be set */
DIR_IN = 1 /**< Input */
DIR_OUT = 0, /**< Output. A Mode can also be set */
DIR_IN = 1, /**< Input */
DIR_OUT_HIGH = 2, /**< Output. Init High */
DIR_OUT_LOW = 3 /**< Output. Init Low */
} Dir;
/**