diff options
author | siddhu8990 | 2016-06-06 09:18:33 +0530 |
---|---|---|
committer | siddhu8990 | 2016-06-06 09:18:33 +0530 |
commit | c75fb67154fb5679d6ede9a52d5f5ae15600f9f9 (patch) | |
tree | c2c950617ab555a0fa74a4f7e0c592ec80bcf3bd /src/c/hardware/rasberrypi/gpio/u8RPIDigitalIns.c | |
parent | 212c54043e454e41ca4b23a5b965d4dbd4b683fe (diff) | |
download | Scilab2C_fossee_old-c75fb67154fb5679d6ede9a52d5f5ae15600f9f9.tar.gz Scilab2C_fossee_old-c75fb67154fb5679d6ede9a52d5f5ae15600f9f9.tar.bz2 Scilab2C_fossee_old-c75fb67154fb5679d6ede9a52d5f5ae15600f9f9.zip |
File handling functions added
Diffstat (limited to 'src/c/hardware/rasberrypi/gpio/u8RPIDigitalIns.c')
-rw-r--r-- | src/c/hardware/rasberrypi/gpio/u8RPIDigitalIns.c | 48 |
1 files changed, 28 insertions, 20 deletions
diff --git a/src/c/hardware/rasberrypi/gpio/u8RPIDigitalIns.c b/src/c/hardware/rasberrypi/gpio/u8RPIDigitalIns.c index 6f06558..8ce0b3c 100644 --- a/src/c/hardware/rasberrypi/gpio/u8RPIDigitalIns.c +++ b/src/c/hardware/rasberrypi/gpio/u8RPIDigitalIns.c @@ -1,23 +1,31 @@ -// Function to read the state of the gpio pin -// -// Calling Sequence -// u8RPI_DigitalIn(pin) -// -// Parameters -// pin : pin of RPi to be read -// -// Returns -// state: Current state of the specified gpio pin -// -// Description -// There are few pins available on RPi as Gpio or digital i/o. These pins can be used as digital output or input. Using this function, current state (low/high) of any gpio pin can be read. 'pin' name must be provided from list provided. Please refer '' for complete list of pins. 'state' can be 0 or 1 depending upon state of the pin (Low/High). RPI_DigitalSetup with appropriate arguments must be called before using this function. -// Examples -// u8RPI_DigitalIn(RPI_GPIO_P1_03,1) //Returns the state of pin 3 of header P1 -// -// -// Authors -// Siddhesh Wani -// +/* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Siddhesh Wani + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +/* Function to read the state of the gpio pin + + Calling Sequence + u8RPI_DigitalIn(pin) + + Parameters + pin : pin of RPi to be read + + Returns + state: Current state of the specified gpio pin + + Description + There are few pins available on RPi as Gpio or digital i/o. These pins can be used as digital output or input. Using this function, current state (low/high) of any gpio pin can be read. 'pin' name must be provided from list provided. Please refer '' for complete list of pins. 'state' can be 0 or 1 depending upon state of the pin (Low/High). RPI_DigitalSetup with appropriate arguments must be called before using this function. + Examples + u8RPI_DigitalIn(RPI_GPIO_P1_03,1) //Returns the state of pin 3 of header P1 +*/ #include "types.h" #include "RPIPeripheralDigital.h" |