diff options
author | siddhu8990 | 2016-06-27 19:16:41 +0530 |
---|---|---|
committer | siddhu8990 | 2016-06-27 19:16:41 +0530 |
commit | d7d53dc95a7cb9878a4e49bdd06e626e981b0eb2 (patch) | |
tree | 9f918cd4dfba745362e0cf3341c1eb65ac239dd3 /2.3-1/macros/Hardware/RasberryPi/RPI_DigitalIn.sci | |
parent | 7e9419d65013fa1109dd67deaabf77aa34011a35 (diff) | |
download | Scilab2C-d7d53dc95a7cb9878a4e49bdd06e626e981b0eb2.tar.gz Scilab2C-d7d53dc95a7cb9878a4e49bdd06e626e981b0eb2.tar.bz2 Scilab2C-d7d53dc95a7cb9878a4e49bdd06e626e981b0eb2.zip |
test commit
Diffstat (limited to '2.3-1/macros/Hardware/RasberryPi/RPI_DigitalIn.sci')
-rw-r--r-- | 2.3-1/macros/Hardware/RasberryPi/RPI_DigitalIn.sci | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalIn.sci b/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalIn.sci index 3ea3bf12..8775e4cd 100644 --- a/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalIn.sci +++ b/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalIn.sci @@ -20,8 +20,15 @@ function state = RPI_DigitalIn(pin) // Authors // Siddhesh Wani // +// ----------------------------------------------------------------- +//Pins of header P1 which can be used as GPIO +supported_pins = [3,5,7,8,10,11,12,13,15,16,18,19,21,22,23,24,26] + +PinIsGPIO = members(pin, supported_pins); //Check if input pin supports GPIO -// This is curretly dummy function. It provides no functionality but is required -// for providing support for generating C code for RPi. - +//If given pin does not support GPIO functionality, raise the error +if(PinIsGPIO == 0) + error(9999, 'SCI2CERROR: Given pin number doesnot support GPIO functionality.'); +end +state = 1; endfunction |