diff options
author | Perry Hung <iperry@alum.mit.edu> | 2010-03-22 23:52:08 -0400 |
---|---|---|
committer | Perry Hung <iperry@alum.mit.edu> | 2010-03-22 23:52:08 -0400 |
commit | 48be688f451e81d2a81c76a85dadf18093e672ab (patch) | |
tree | fb3321a04f2820926f91971cf1536d2cb8e63e7d /src/wiring/wiring_digital.c | |
parent | 96ce013f875c918a70644ad23a03f0450a7f6848 (diff) | |
download | librambutan-48be688f451e81d2a81c76a85dadf18093e672ab.tar.gz librambutan-48be688f451e81d2a81c76a85dadf18093e672ab.zip |
Added open-drain output and analog-input modes
Diffstat (limited to 'src/wiring/wiring_digital.c')
-rw-r--r-- | src/wiring/wiring_digital.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/wiring/wiring_digital.c b/src/wiring/wiring_digital.c index 71be17b..b1be9a5 100644 --- a/src/wiring/wiring_digital.c +++ b/src/wiring/wiring_digital.c @@ -97,10 +97,15 @@ void pinMode(uint8_t pin, WiringPinMode mode) { case OUTPUT: outputMode = GPIO_MODE_OUTPUT_PP; break; + case OUTPUT_OPEN_DRAIN: + outputMode = GPIO_MODE_OUTPUT_OD; + break; case INPUT: case INPUT_FLOATING: outputMode = GPIO_MODE_INPUT_FLOATING; break; + case INPUT_ANALOG: + outputMode = GPIO_MODE_INPUT_ANALOG; case INPUT_PULLUP: outputMode = GPIO_MODE_INPUT_PU; break; |