summaryrefslogtreecommitdiff
path: root/2.3-1/src/c/hardware/rasberrypi/gpio
diff options
context:
space:
mode:
authorsiddhu89902016-06-06 09:18:33 +0530
committersiddhu89902016-06-06 09:18:33 +0530
commitf08e63e652a564b3f805b69c05948e497c7b28f6 (patch)
treed8f4bcc4dc02c668ec38745eaf867dd365fd9992 /2.3-1/src/c/hardware/rasberrypi/gpio
parent49003250e69e4e500742614888e47db789bbe451 (diff)
downloadScilab2C-f08e63e652a564b3f805b69c05948e497c7b28f6.tar.gz
Scilab2C-f08e63e652a564b3f805b69c05948e497c7b28f6.tar.bz2
Scilab2C-f08e63e652a564b3f805b69c05948e497c7b28f6.zip
File handling functions added
Diffstat (limited to '2.3-1/src/c/hardware/rasberrypi/gpio')
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/gpio/u8RPIDigitalIns.c48
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/gpio/u8RPIDigitalOuts.c45
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/gpio/u8RPIDigitalSetups.c54
3 files changed, 85 insertions, 62 deletions
diff --git a/2.3-1/src/c/hardware/rasberrypi/gpio/u8RPIDigitalIns.c b/2.3-1/src/c/hardware/rasberrypi/gpio/u8RPIDigitalIns.c
index 6f065586..8ce0b3ce 100644
--- a/2.3-1/src/c/hardware/rasberrypi/gpio/u8RPIDigitalIns.c
+++ b/2.3-1/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"
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 375ca891..d97f4588 100644
--- a/2.3-1/src/c/hardware/rasberrypi/gpio/u8RPIDigitalOuts.c
+++ b/2.3-1/src/c/hardware/rasberrypi/gpio/u8RPIDigitalOuts.c
@@ -1,21 +1,30 @@
-// Function to change the output state of the gpio pin
-//
-// Calling Sequence
-// u8RPI_DigitalOuts(pin,state)
-//
-// Parameters
-// pin : pin of RPi to be used
-// state : desired output state for pin (0 -> LOW, 1 -> HIGH)
-//
-// Description
-// There are few pins available on RPi as Gpio or digital i/o. These pins can be used as digital output or input. 'Pin' name must be provided from list provided. Please refer '' for complete list of pins. 'state' can be 0 or 1 depending upon desired output (Low/High). RPI_DigitalSetup with appropriate arguments must be called before using this function.
-// Examples
-// u8RPI_DigitalOuts(RPI_GPIO_P1_03,1) //Sets pin 3 of header P1 as 'high' output
-//
-//
-// 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 change the output state of the gpio pin
+
+ Calling Sequence
+ u8RPI_DigitalOuts(pin,state)
+
+ Parameters
+ pin : pin of RPi to be used
+ state : desired output state for pin (0 -> LOW, 1 -> HIGH)
+
+ Description
+ There are few pins available on RPi as Gpio or digital i/o. These pins can be used as digital output or input. 'Pin' name must be provided from list provided. Please refer '' for complete list of pins. 'state' can be 0 or 1 depending upon desired output (Low/High). RPI_DigitalSetup with appropriate arguments must be called before using this function.
+ Examples
+ u8RPI_DigitalOuts(RPI_GPIO_P1_03,1) //Sets pin 3 of header P1 as 'high' output
+*/
+
#include "types.h"
#include "RPIPeripheralDigital.h"
diff --git a/2.3-1/src/c/hardware/rasberrypi/gpio/u8RPIDigitalSetups.c b/2.3-1/src/c/hardware/rasberrypi/gpio/u8RPIDigitalSetups.c
index 277c620f..657df3a1 100644
--- a/2.3-1/src/c/hardware/rasberrypi/gpio/u8RPIDigitalSetups.c
+++ b/2.3-1/src/c/hardware/rasberrypi/gpio/u8RPIDigitalSetups.c
@@ -1,27 +1,33 @@
-// Function to setup digital pins.
-//
-// Calling Sequence
-// u8RPI_DigitalSetup(pin,direction)
-//
-// Parameters
-// pin : pin of RPi to be used
-// direction : direction to be set for pin (0 -> INPUT, 1 -> OUTPUT)
-//
-// Description
-// There are few pins available on RPi as Gpio or digital io. These pins can be used as digital output or input. Pin name must be provided from list provided. Please refer '' for complete list of pins. Direction can be 0 or 1 depending upon desired function (Input/output)
-// Examples
-// RPI_DigitalSetup(RPI_GPIO_P1_03,0) //Sets pin 3 of header P1 as input
-//
-// See also
-// RPI_DigitalIn RPI_DigitalOut
-//
-//
-// Authors
-// Siddhesh Wani
-//
-
-// This is curretly dummy function. It provides no functionality but is required
-// for providing support for generating C code for RPi.
+/* 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 setup digital pins.
+
+ Calling Sequence
+ u8RPI_DigitalSetup(pin,direction)
+
+ Parameters
+ pin : pin of RPi to be used
+ direction : direction to be set for pin (0 -> INPUT, 1 -> OUTPUT)
+
+ Description
+ There are few pins available on RPi as Gpio or digital io. These pins can be used as digital output or input. Pin name must be provided from list provided. Please refer '' for complete list of pins. Direction can be 0 or 1 depending upon desired function (Input/output)
+ Examples
+ RPI_DigitalSetup(RPI_GPIO_P1_03,0) //Sets pin 3 of header P1 as input
+
+ See also
+ RPI_DigitalIn RPI_DigitalOut
+*/
+
#include "types.h"
#include "RPIPeripheralDigital.h"