summaryrefslogtreecommitdiff
path: root/src/c/hardware/rasberrypi/I2C
diff options
context:
space:
mode:
authorJorawar Singh2017-06-30 11:28:58 +0530
committerJorawar Singh2017-06-30 11:28:58 +0530
commitaef4e8398f2b1848b0e4cdd9580dbbe93e4006f9 (patch)
treebe1db2f0453859eca8b4ae6e18c90baae68cc2bc /src/c/hardware/rasberrypi/I2C
parentb33afdb2311fbe8aad4c5c614c6098585fe2d279 (diff)
downloadScilab2C_fossee_old-aef4e8398f2b1848b0e4cdd9580dbbe93e4006f9.tar.gz
Scilab2C_fossee_old-aef4e8398f2b1848b0e4cdd9580dbbe93e4006f9.tar.bz2
Scilab2C_fossee_old-aef4e8398f2b1848b0e4cdd9580dbbe93e4006f9.zip
Help files, modified Raspberry Pi code conversion
Diffstat (limited to 'src/c/hardware/rasberrypi/I2C')
-rw-r--r--src/c/hardware/rasberrypi/I2C/u16RPI_I2CReadReg16s.c19
-rw-r--r--src/c/hardware/rasberrypi/I2C/u16RPI_I2CReadReg8s.c19
-rw-r--r--src/c/hardware/rasberrypi/I2C/u16RPI_I2CReads.c19
-rw-r--r--src/c/hardware/rasberrypi/I2C/u16RPI_I2CSetups.c19
-rw-r--r--src/c/hardware/rasberrypi/I2C/u16RPI_I2CWriteReg16s.c19
-rw-r--r--src/c/hardware/rasberrypi/I2C/u16RPI_I2CWriteReg8s.c19
-rw-r--r--src/c/hardware/rasberrypi/I2C/u16RPI_I2CWrites.c19
7 files changed, 133 insertions, 0 deletions
diff --git a/src/c/hardware/rasberrypi/I2C/u16RPI_I2CReadReg16s.c b/src/c/hardware/rasberrypi/I2C/u16RPI_I2CReadReg16s.c
new file mode 100644
index 0000000..5d04f4b
--- /dev/null
+++ b/src/c/hardware/rasberrypi/I2C/u16RPI_I2CReadReg16s.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 "RPIPeripheralI2C.h"
+
+int8 u16RPI_I2CReadReg16s(uint16 fd,uint16 reg){
+ int8 out;
+ out=wiringPiI2CReadReg16(fd,reg);
+ return (out);
+}
diff --git a/src/c/hardware/rasberrypi/I2C/u16RPI_I2CReadReg8s.c b/src/c/hardware/rasberrypi/I2C/u16RPI_I2CReadReg8s.c
new file mode 100644
index 0000000..2f4f1f7
--- /dev/null
+++ b/src/c/hardware/rasberrypi/I2C/u16RPI_I2CReadReg8s.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 "RPIPeripheralI2C.h"
+
+int8 u16RPI_I2CReadReg8s(uint16 fd,uint16 reg){
+ int8 out;
+ out=wiringPiI2CReadReg8(fd,reg);
+ return (out);
+}
diff --git a/src/c/hardware/rasberrypi/I2C/u16RPI_I2CReads.c b/src/c/hardware/rasberrypi/I2C/u16RPI_I2CReads.c
new file mode 100644
index 0000000..49c3673
--- /dev/null
+++ b/src/c/hardware/rasberrypi/I2C/u16RPI_I2CReads.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 "RPIPeripheralI2C.h"
+
+int8 u16RPI_I2CReads(uint16 fd){
+ int8 out;
+ out=wiringPiI2CRead(fd);
+ return (out);
+}
diff --git a/src/c/hardware/rasberrypi/I2C/u16RPI_I2CSetups.c b/src/c/hardware/rasberrypi/I2C/u16RPI_I2CSetups.c
new file mode 100644
index 0000000..f533a1f
--- /dev/null
+++ b/src/c/hardware/rasberrypi/I2C/u16RPI_I2CSetups.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 "RPIPeripheralI2C.h"
+
+int8 u16RPI_I2CSetups(uint8 arrd){
+ int8 out;
+ out=wiringPiI2CSetup(arrd);
+ return (out);
+}
diff --git a/src/c/hardware/rasberrypi/I2C/u16RPI_I2CWriteReg16s.c b/src/c/hardware/rasberrypi/I2C/u16RPI_I2CWriteReg16s.c
new file mode 100644
index 0000000..b30c106
--- /dev/null
+++ b/src/c/hardware/rasberrypi/I2C/u16RPI_I2CWriteReg16s.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 "RPIPeripheralI2C.h"
+
+int8 u16RPI_I2CWriteReg16s(uint16 fd,uint16 data,uint16 reg){
+ int8 out;
+ out=wiringPiI2CWriteReg16(fd,data,reg);
+ return (out);
+}
diff --git a/src/c/hardware/rasberrypi/I2C/u16RPI_I2CWriteReg8s.c b/src/c/hardware/rasberrypi/I2C/u16RPI_I2CWriteReg8s.c
new file mode 100644
index 0000000..d2ebf3d
--- /dev/null
+++ b/src/c/hardware/rasberrypi/I2C/u16RPI_I2CWriteReg8s.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 "RPIPeripheralI2C.h"
+
+int8 u16RPI_I2CWriteReg8s(uint16 fd,uint16 data,uint16 reg){
+ int8 out;
+ out=wiringPiI2CWriteReg8(fd,data,reg);
+ return (out);
+}
diff --git a/src/c/hardware/rasberrypi/I2C/u16RPI_I2CWrites.c b/src/c/hardware/rasberrypi/I2C/u16RPI_I2CWrites.c
new file mode 100644
index 0000000..133ed65
--- /dev/null
+++ b/src/c/hardware/rasberrypi/I2C/u16RPI_I2CWrites.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 "RPIPeripheralI2C.h"
+
+int8 u16RPI_I2CWrites(uint16 fd,uint16 data){
+ int8 out;
+ wiringPiI2CWrite(fd,data);
+ return (out);
+}