diff options
author | Brijeshcr | 2017-07-06 15:48:47 +0530 |
---|---|---|
committer | GitHub | 2017-07-06 15:48:47 +0530 |
commit | c600ebcb67961fe6007ba41fd5ad987da3af7f6e (patch) | |
tree | 26fc9679644561759e8a2c4080059d30b70a3105 /2.3-1/src/c/hardware/rasberrypi/Setup | |
parent | a7eeecce4c7c39ea52a2d434815c574a2c42730d (diff) | |
download | Scilab2C-c600ebcb67961fe6007ba41fd5ad987da3af7f6e.tar.gz Scilab2C-c600ebcb67961fe6007ba41fd5ad987da3af7f6e.tar.bz2 Scilab2C-c600ebcb67961fe6007ba41fd5ad987da3af7f6e.zip |
Revert "LinearAlgebra Function Added"
Diffstat (limited to '2.3-1/src/c/hardware/rasberrypi/Setup')
5 files changed, 120 insertions, 0 deletions
diff --git a/2.3-1/src/c/hardware/rasberrypi/Setup/gRPI_pinNumberinga.c b/2.3-1/src/c/hardware/rasberrypi/Setup/gRPI_pinNumberinga.c new file mode 100644 index 00000000..4170f4c1 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/Setup/gRPI_pinNumberinga.c @@ -0,0 +1,28 @@ +/* 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: Jorawar Singh, Siddhesh Wani + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "RPIPeripheralSetup.h" +#include "stdio.h" + +int8 gRPI_pinNumberinga(char* seq,int size){ + uint8 out; + if (seq[0]=='w'){ + out=wiringPiSetup(); + } + else if (seq[0]=='G'){ + out=wiringPiSetupGpio(); + } + else if (seq[0]=='P'){ + out=wiringPiSetupPhys(); + } + return (out); +} diff --git a/2.3-1/src/c/hardware/rasberrypi/Setup/u8RPI_getAlts.c b/2.3-1/src/c/hardware/rasberrypi/Setup/u8RPI_getAlts.c new file mode 100644 index 00000000..0a5c4764 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/Setup/u8RPI_getAlts.c @@ -0,0 +1,19 @@ +/* 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: Jorawar Singh, Siddhesh Wani + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "RPIPeripheralSetup.h" + +uint8 u8RPI_getAlts(uint8 pin){ + uint8 out; + out=getAlt(pin); + return (out); +} diff --git a/2.3-1/src/c/hardware/rasberrypi/Setup/u8RPI_pinModeAlts.c b/2.3-1/src/c/hardware/rasberrypi/Setup/u8RPI_pinModeAlts.c new file mode 100644 index 00000000..153b88ee --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/Setup/u8RPI_pinModeAlts.c @@ -0,0 +1,17 @@ +/* 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: Jorawar Singh, Siddhesh Wani + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "RPIPeripheralSetup.h" + +void u8RPI_pinModeAlts(uint8 pin,uint8 mode){ + pinModeAlt(pin,mode); +} diff --git a/2.3-1/src/c/hardware/rasberrypi/Setup/u8RPI_pinModes.c b/2.3-1/src/c/hardware/rasberrypi/Setup/u8RPI_pinModes.c new file mode 100644 index 00000000..76601f8d --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/Setup/u8RPI_pinModes.c @@ -0,0 +1,31 @@ +/* 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: Jorawar Singh, Siddhesh Wani + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include <stdio.h> +#include "types.h" +#include "RPIPeripheralSetup.h" + +void u8RPI_pinModes(uint8 pin,char* mode,int size){ + if (mode[0]=='i'){ + pinMode(pin,INPUT); + } + else if (mode[0]=='o'){ + pinMode(pin,OUTPUT); + } + else if (mode[0]=='p'){ + pinMode(pin,PWM_OUTPUT); + } + else if (mode[0]=='c'){ + pinMode(pin,GPIO_CLOCK); + } + +} diff --git a/2.3-1/src/c/hardware/rasberrypi/Setup/u8RPI_pullControls.c b/2.3-1/src/c/hardware/rasberrypi/Setup/u8RPI_pullControls.c new file mode 100644 index 00000000..4e95aac5 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/Setup/u8RPI_pullControls.c @@ -0,0 +1,25 @@ +/* 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: Jorawar Singh, Siddhesh Wani + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "RPIPeripheralSetup.h" + +void u8RPI_pullControls(uint8 pin,char* mode,int size){ + if (mode[0]=='d'){ + pullUpDnControl(pin,1); + } + else if (mode[0]=='u'){ + pullUpDnControl(pin,2); + } + else if (mode[0]=='o'){ + pullUpDnControl(pin,0); + } +} |