diff options
author | siddhu8990 | 2016-07-25 15:59:40 +0530 |
---|---|---|
committer | siddhu8990 | 2016-07-25 15:59:40 +0530 |
commit | 21ab4886b202a52189b398bd9d3137e2a567d62a (patch) | |
tree | 90519f93c0a0c0ec22ce296372b811a7af2ed399 /2.3-1/src/c/hardware/rasberrypi/gpio/u8RPIDigitalOuts.c | |
parent | d7d53dc95a7cb9878a4e49bdd06e626e981b0eb2 (diff) | |
download | Scilab2C-21ab4886b202a52189b398bd9d3137e2a567d62a.tar.gz Scilab2C-21ab4886b202a52189b398bd9d3137e2a567d62a.tar.bz2 Scilab2C-21ab4886b202a52189b398bd9d3137e2a567d62a.zip |
WiringPi used for RaspberryPi (Gpio, serial, Threads, ISRs)
Diffstat (limited to '2.3-1/src/c/hardware/rasberrypi/gpio/u8RPIDigitalOuts.c')
-rw-r--r-- | 2.3-1/src/c/hardware/rasberrypi/gpio/u8RPIDigitalOuts.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/2.3-1/src/c/hardware/rasberrypi/gpio/u8RPIDigitalOuts.c b/2.3-1/src/c/hardware/rasberrypi/gpio/u8RPIDigitalOuts.c index 97c6a034..d40263f2 100644 --- a/2.3-1/src/c/hardware/rasberrypi/gpio/u8RPIDigitalOuts.c +++ b/2.3-1/src/c/hardware/rasberrypi/gpio/u8RPIDigitalOuts.c @@ -16,11 +16,11 @@ #include "types.h" #include "RPIPeripheralDigital.h" -/*pin is reduced by one as arrayiindex starts from 0 and pin no starts from 1*/ +/*pin is reduced by one as array index starts from 0 and pin no starts from 1*/ uint8 u8RPIDigitalOuts(uint8 pin, uint8 state) { if (state == 0) //low output - bcm2835_gpio_clr(phy_pin[pin-1]); + digitalWrite(phy_pin[pin-1], LOW); if (state == 1) //high output - bcm2835_gpio_set(phy_pin[pin-1]); + digitalWrite(phy_pin[pin-1], HIGH); } |