summaryrefslogtreecommitdiff
path: root/src/c/hardware/rasberrypi/Serial
diff options
context:
space:
mode:
Diffstat (limited to 'src/c/hardware/rasberrypi/Serial')
-rw-r--r--src/c/hardware/rasberrypi/Serial/gRPI_serialOpena.c19
-rw-r--r--src/c/hardware/rasberrypi/Serial/u8RPI_serialCloses.c17
-rw-r--r--src/c/hardware/rasberrypi/Serial/u8RPI_serialDataAvails.c19
-rw-r--r--src/c/hardware/rasberrypi/Serial/u8RPI_serialFlushs.c17
-rw-r--r--src/c/hardware/rasberrypi/Serial/u8RPI_serialGetchars.c17
-rw-r--r--src/c/hardware/rasberrypi/Serial/u8RPI_serialPrintfs.c17
-rw-r--r--src/c/hardware/rasberrypi/Serial/u8RPI_serialPutchars.c17
-rw-r--r--src/c/hardware/rasberrypi/Serial/u8RPI_serialPutss.c17
8 files changed, 140 insertions, 0 deletions
diff --git a/src/c/hardware/rasberrypi/Serial/gRPI_serialOpena.c b/src/c/hardware/rasberrypi/Serial/gRPI_serialOpena.c
new file mode 100644
index 0000000..31543af
--- /dev/null
+++ b/src/c/hardware/rasberrypi/Serial/gRPI_serialOpena.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 "RPIPeripheralSerial.h"
+
+int8 gRPI_serialOpena(char* device,int size,uint32 baud){
+ int8 fd;
+ fd = serialOpen(device,baud);
+ return fd;
+}
diff --git a/src/c/hardware/rasberrypi/Serial/u8RPI_serialCloses.c b/src/c/hardware/rasberrypi/Serial/u8RPI_serialCloses.c
new file mode 100644
index 0000000..d20aa54
--- /dev/null
+++ b/src/c/hardware/rasberrypi/Serial/u8RPI_serialCloses.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 "RPIPeripheralSerial.h"
+
+void u8RPI_serialCloses(uint8 fd){
+ serialClose(fd);
+}
diff --git a/src/c/hardware/rasberrypi/Serial/u8RPI_serialDataAvails.c b/src/c/hardware/rasberrypi/Serial/u8RPI_serialDataAvails.c
new file mode 100644
index 0000000..cf25607
--- /dev/null
+++ b/src/c/hardware/rasberrypi/Serial/u8RPI_serialDataAvails.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 "RPIPeripheralSerial.h"
+
+uint8 u8RPI_serialDataAvails(uint8 fd){
+ uint8 out;
+ out=serialDataAvail(fd);
+ return(out);
+}
diff --git a/src/c/hardware/rasberrypi/Serial/u8RPI_serialFlushs.c b/src/c/hardware/rasberrypi/Serial/u8RPI_serialFlushs.c
new file mode 100644
index 0000000..4d15063
--- /dev/null
+++ b/src/c/hardware/rasberrypi/Serial/u8RPI_serialFlushs.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 "RPIPeripheralSerial.h"
+
+void u8RPI_serialFlushs(uint8 fd){
+ serialFlush(fd);
+}
diff --git a/src/c/hardware/rasberrypi/Serial/u8RPI_serialGetchars.c b/src/c/hardware/rasberrypi/Serial/u8RPI_serialGetchars.c
new file mode 100644
index 0000000..c1dabfd
--- /dev/null
+++ b/src/c/hardware/rasberrypi/Serial/u8RPI_serialGetchars.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 "RPIPeripheralSerial.h"
+
+void u8RPI_serialGetchars(uint8 fd,char* out){
+ out=serialGetchar(fd);
+}
diff --git a/src/c/hardware/rasberrypi/Serial/u8RPI_serialPrintfs.c b/src/c/hardware/rasberrypi/Serial/u8RPI_serialPrintfs.c
new file mode 100644
index 0000000..d167200
--- /dev/null
+++ b/src/c/hardware/rasberrypi/Serial/u8RPI_serialPrintfs.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 "RPIPeripheralSerial.h"
+
+void u8RPI_serialPrintfs(uint8 fd,char* msg,int size){
+ serialPrintf(fd,msg);
+}
diff --git a/src/c/hardware/rasberrypi/Serial/u8RPI_serialPutchars.c b/src/c/hardware/rasberrypi/Serial/u8RPI_serialPutchars.c
new file mode 100644
index 0000000..3309317
--- /dev/null
+++ b/src/c/hardware/rasberrypi/Serial/u8RPI_serialPutchars.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 "RPIPeripheralSerial.h"
+
+void u8RPI_serialPutchars(uint8 fd,uint8 character){
+ serialPutchar(fd,character);
+}
diff --git a/src/c/hardware/rasberrypi/Serial/u8RPI_serialPutss.c b/src/c/hardware/rasberrypi/Serial/u8RPI_serialPutss.c
new file mode 100644
index 0000000..581e15a
--- /dev/null
+++ b/src/c/hardware/rasberrypi/Serial/u8RPI_serialPutss.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 "RPIPeripheralSerial.h"
+
+void u8RPI_serialPutss(uint8 fd,char* character,int size){
+ serialPuts(fd,character);
+}