summaryrefslogtreecommitdiff
path: root/2.3-1/macros/Hardware
diff options
context:
space:
mode:
authorsiddhu89902016-06-27 19:16:41 +0530
committersiddhu89902016-06-27 19:16:41 +0530
commitd7d53dc95a7cb9878a4e49bdd06e626e981b0eb2 (patch)
tree9f918cd4dfba745362e0cf3341c1eb65ac239dd3 /2.3-1/macros/Hardware
parent7e9419d65013fa1109dd67deaabf77aa34011a35 (diff)
downloadScilab2C-d7d53dc95a7cb9878a4e49bdd06e626e981b0eb2.tar.gz
Scilab2C-d7d53dc95a7cb9878a4e49bdd06e626e981b0eb2.tar.bz2
Scilab2C-d7d53dc95a7cb9878a4e49bdd06e626e981b0eb2.zip
test commit
Diffstat (limited to '2.3-1/macros/Hardware')
-rw-r--r--2.3-1/macros/Hardware/RasberryPi/GetRPISupportFunctions.binbin1604 -> 1604 bytes
-rw-r--r--2.3-1/macros/Hardware/RasberryPi/GetRPISupportFunctions.sci4
-rw-r--r--2.3-1/macros/Hardware/RasberryPi/RPI_DelayMicro.bin (renamed from 2.3-1/macros/Hardware/RasberryPi/RPIDelayMicro.bin)bin3280 -> 3280 bytes
-rw-r--r--2.3-1/macros/Hardware/RasberryPi/RPI_DelayMicro.sci (renamed from 2.3-1/macros/Hardware/RasberryPi/RPIDelayMicro.sci)0
-rw-r--r--2.3-1/macros/Hardware/RasberryPi/RPI_DelayMilli.bin (renamed from 2.3-1/macros/Hardware/RasberryPi/RPIDelay.bin)bin3528 -> 3528 bytes
-rw-r--r--2.3-1/macros/Hardware/RasberryPi/RPI_DelayMilli.sci (renamed from 2.3-1/macros/Hardware/RasberryPi/RPIDelay.sci)0
-rw-r--r--2.3-1/macros/Hardware/RasberryPi/RPI_DigitalIn.binbin3400 -> 4952 bytes
-rw-r--r--2.3-1/macros/Hardware/RasberryPi/RPI_DigitalIn.sci13
-rw-r--r--2.3-1/macros/Hardware/RasberryPi/RPI_DigitalSetup.binbin3452 -> 4884 bytes
-rw-r--r--2.3-1/macros/Hardware/RasberryPi/RPI_DigitalSetup.sci15
-rw-r--r--2.3-1/macros/Hardware/RasberryPi/libbin816 -> 816 bytes
-rw-r--r--2.3-1/macros/Hardware/RasberryPi/names4
12 files changed, 24 insertions, 12 deletions
diff --git a/2.3-1/macros/Hardware/RasberryPi/GetRPISupportFunctions.bin b/2.3-1/macros/Hardware/RasberryPi/GetRPISupportFunctions.bin
index 5bea6458..545334ac 100644
--- a/2.3-1/macros/Hardware/RasberryPi/GetRPISupportFunctions.bin
+++ b/2.3-1/macros/Hardware/RasberryPi/GetRPISupportFunctions.bin
Binary files differ
diff --git a/2.3-1/macros/Hardware/RasberryPi/GetRPISupportFunctions.sci b/2.3-1/macros/Hardware/RasberryPi/GetRPISupportFunctions.sci
index 24c2f556..61bb6c0d 100644
--- a/2.3-1/macros/Hardware/RasberryPi/GetRPISupportFunctions.sci
+++ b/2.3-1/macros/Hardware/RasberryPi/GetRPISupportFunctions.sci
@@ -1,4 +1,4 @@
-function AVRSupportFunctions = GetRPISupportFunctions()
+function RPiSupportFunctions = GetRPISupportFunctions()
// -----------------------------------------------------------------
// Get list of RPI peripherals supported
//
@@ -11,7 +11,7 @@ function AVRSupportFunctions = GetRPISupportFunctions()
// Author: Siddhesh Wani
// -----------------------------------------------------------------
-AVRSupportFunctions = [
+RPiSupportFunctions = [
"RPI_DigitalIn"
"RPI_DigitalOut"
"RPI_DigitalSetup"
diff --git a/2.3-1/macros/Hardware/RasberryPi/RPIDelayMicro.bin b/2.3-1/macros/Hardware/RasberryPi/RPI_DelayMicro.bin
index a4d32cb6..a4d32cb6 100644
--- a/2.3-1/macros/Hardware/RasberryPi/RPIDelayMicro.bin
+++ b/2.3-1/macros/Hardware/RasberryPi/RPI_DelayMicro.bin
Binary files differ
diff --git a/2.3-1/macros/Hardware/RasberryPi/RPIDelayMicro.sci b/2.3-1/macros/Hardware/RasberryPi/RPI_DelayMicro.sci
index 730755b7..730755b7 100644
--- a/2.3-1/macros/Hardware/RasberryPi/RPIDelayMicro.sci
+++ b/2.3-1/macros/Hardware/RasberryPi/RPI_DelayMicro.sci
diff --git a/2.3-1/macros/Hardware/RasberryPi/RPIDelay.bin b/2.3-1/macros/Hardware/RasberryPi/RPI_DelayMilli.bin
index bb8279ec..bb8279ec 100644
--- a/2.3-1/macros/Hardware/RasberryPi/RPIDelay.bin
+++ b/2.3-1/macros/Hardware/RasberryPi/RPI_DelayMilli.bin
Binary files differ
diff --git a/2.3-1/macros/Hardware/RasberryPi/RPIDelay.sci b/2.3-1/macros/Hardware/RasberryPi/RPI_DelayMilli.sci
index c5080dd8..c5080dd8 100644
--- a/2.3-1/macros/Hardware/RasberryPi/RPIDelay.sci
+++ b/2.3-1/macros/Hardware/RasberryPi/RPI_DelayMilli.sci
diff --git a/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalIn.bin b/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalIn.bin
index a3269a0a..ec8fd0d7 100644
--- a/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalIn.bin
+++ b/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalIn.bin
Binary files differ
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
diff --git a/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalSetup.bin b/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalSetup.bin
index 46836cd9..1de4e224 100644
--- a/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalSetup.bin
+++ b/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalSetup.bin
Binary files differ
diff --git a/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalSetup.sci b/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalSetup.sci
index 5ce48f0b..aede0b7a 100644
--- a/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalSetup.sci
+++ b/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalSetup.sci
@@ -11,7 +11,7 @@ function RPI_DigitalSetup(pin, direction)
// 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
+// RPI_DigitalSetup(3,0) //Sets pin 3 of header P1 as input
//
// See also
// RPI_DigitalIn RPI_DigitalOut
@@ -19,9 +19,14 @@ function RPI_DigitalSetup(pin, direction)
//
// Authors
// Siddhesh Wani
-//
-
-// This is curretly dummy function. It provides no functionality but is required
-// for providing support for generating C code for RPi.
+// -----------------------------------------------------------------
+//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
+//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
endfunction
diff --git a/2.3-1/macros/Hardware/RasberryPi/lib b/2.3-1/macros/Hardware/RasberryPi/lib
index 5884511a..10317441 100644
--- a/2.3-1/macros/Hardware/RasberryPi/lib
+++ b/2.3-1/macros/Hardware/RasberryPi/lib
Binary files differ
diff --git a/2.3-1/macros/Hardware/RasberryPi/names b/2.3-1/macros/Hardware/RasberryPi/names
index 87fe2cd1..138ac2a5 100644
--- a/2.3-1/macros/Hardware/RasberryPi/names
+++ b/2.3-1/macros/Hardware/RasberryPi/names
@@ -1,7 +1,7 @@
GetRPISupportFunctions
IsRPISupportFunction
-RPIDelay
-RPIDelayMicro
+RPI_DelayMicro
+RPI_DelayMilli
RPI_DigitalIn
RPI_DigitalOut
RPI_DigitalSetup