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/dRPISerialSendDataa.c27
-rw-r--r--src/c/hardware/rasberrypi/serial/dRPISerialSendDatas.c35
-rw-r--r--src/c/hardware/rasberrypi/serial/gRPISerialSendDatas.c27
-rw-r--r--src/c/hardware/rasberrypi/serial/i16RPISerialDataAvails.c25
-rw-r--r--src/c/hardware/rasberrypi/serial/i16RPISerialGetChars.c27
-rw-r--r--src/c/hardware/rasberrypi/serial/i16RPISerialSendDataa.c27
-rw-r--r--src/c/hardware/rasberrypi/serial/i16RPISerialSendDatas.c24
-rw-r--r--src/c/hardware/rasberrypi/serial/i8RPISerialSendDataa.c26
-rw-r--r--src/c/hardware/rasberrypi/serial/i8RPISerialSendDatas.c22
-rw-r--r--src/c/hardware/rasberrypi/serial/sRPISerialSendDataa.c27
-rw-r--r--src/c/hardware/rasberrypi/serial/sRPISerialSendDatas.c34
-rw-r--r--src/c/hardware/rasberrypi/serial/u16RPISerialSendDataa.c28
-rw-r--r--src/c/hardware/rasberrypi/serial/u16RPISerialSendDatas.c23
-rw-r--r--src/c/hardware/rasberrypi/serial/u16RPISerialSetups.c25
-rw-r--r--src/c/hardware/rasberrypi/serial/u8RPISerialCloses.c21
-rw-r--r--src/c/hardware/rasberrypi/serial/u8RPISerialFlushs.c21
-rw-r--r--src/c/hardware/rasberrypi/serial/u8RPISerialSendChars.c21
-rw-r--r--src/c/hardware/rasberrypi/serial/u8RPISerialSendDataa.c27
-rw-r--r--src/c/hardware/rasberrypi/serial/u8RPISerialSendDatas.c22
19 files changed, 0 insertions, 489 deletions
diff --git a/src/c/hardware/rasberrypi/serial/dRPISerialSendDataa.c b/src/c/hardware/rasberrypi/serial/dRPISerialSendDataa.c
deleted file mode 100644
index f990255..0000000
--- a/src/c/hardware/rasberrypi/serial/dRPISerialSendDataa.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/* 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: Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-/* Function to send double data array/matrix on specified serial port. */
-
-#include "types.h"
-#include "RPIPeripheralSerial.h"
-
-void dRPISerialSendDataa(int fd, double* data, int size)
-{
- int count = 0;
-
- for (count = 0; count < size; count++)
- {
- dRPISerialSendDatas(fd, data[count]);
- }
-
-}
diff --git a/src/c/hardware/rasberrypi/serial/dRPISerialSendDatas.c b/src/c/hardware/rasberrypi/serial/dRPISerialSendDatas.c
deleted file mode 100644
index 39112fc..0000000
--- a/src/c/hardware/rasberrypi/serial/dRPISerialSendDatas.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/* 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: Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-/* Function to send double data on specified serial port. */
-
-#include "types.h"
-#include "RPIPeripheralSerial.h"
-
-void dRPISerialSendDatas(int fd, double data)
-{
- uint8 count;
-
- union double_bytes{
- double double_data;
- unsigned char bytes[sizeof(double)];
- } in_data;
-
- in_data.double_data = data;
-
- for(count=0; count<sizeof(double); count++)
- {
- /*Send lsb first*/
- serialPutchar(fd, (uint8) in_data.bytes[count]);
- }
-
-}
diff --git a/src/c/hardware/rasberrypi/serial/gRPISerialSendDatas.c b/src/c/hardware/rasberrypi/serial/gRPISerialSendDatas.c
deleted file mode 100644
index f4ec8a8..0000000
--- a/src/c/hardware/rasberrypi/serial/gRPISerialSendDatas.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/* 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: Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-/* Function to send string on specified serial port. */
-
-#include "types.h"
-#include "RPIPeripheralSerial.h"
-
-void gRPISerialSendDatas(int fd, uint8* data, int size)
-{
- int count = 0;
-
- while(data[count] != '\0')
- {
- serialPutchar(fd, data[count]);
- }
-
-}
diff --git a/src/c/hardware/rasberrypi/serial/i16RPISerialDataAvails.c b/src/c/hardware/rasberrypi/serial/i16RPISerialDataAvails.c
deleted file mode 100644
index b56a819..0000000
--- a/src/c/hardware/rasberrypi/serial/i16RPISerialDataAvails.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/* 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: Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-/* Function to check for data availability at specified port. Returns no of
- bytes to be read */
-
-#include "types.h"
-#include "RPIPeripheralSerial.h"
-
-int16 i16RPISerialDataAvails(int fd)
-{
- int bytes = 0;
- bytes = serialDataAvail(fd);
-
- return bytes;
-}
diff --git a/src/c/hardware/rasberrypi/serial/i16RPISerialGetChars.c b/src/c/hardware/rasberrypi/serial/i16RPISerialGetChars.c
deleted file mode 100644
index 18ca2a7..0000000
--- a/src/c/hardware/rasberrypi/serial/i16RPISerialGetChars.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/* 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: Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-/* Function to read character from spcified serial port (file descriptor).
- This function will block execution for 10 secs if no character is available,
- and will return -1 in that case*/
-
-#include "types.h"
-#include "RPIPeripheralSerial.h"
-
-int16 i16RPISerialGetChars(int fd)
-{
- int data = 0;
-
- data = serialGetchar(fd);
-
- return data;
-}
diff --git a/src/c/hardware/rasberrypi/serial/i16RPISerialSendDataa.c b/src/c/hardware/rasberrypi/serial/i16RPISerialSendDataa.c
deleted file mode 100644
index 24180f4..0000000
--- a/src/c/hardware/rasberrypi/serial/i16RPISerialSendDataa.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/* 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: Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-/* Function to send signed 16-bit data array/matrix on specified serial port. */
-
-#include "types.h"
-#include "RPIPeripheralSerial.h"
-
-void i16RPISerialSendDataa(int fd, int16* data, int size)
-{
- int count = 0;
-
- for (count = 0; count < size; ++count)
- {
- i16RPISerialSendDatas(fd, data[count]);
- }
-
-}
diff --git a/src/c/hardware/rasberrypi/serial/i16RPISerialSendDatas.c b/src/c/hardware/rasberrypi/serial/i16RPISerialSendDatas.c
deleted file mode 100644
index fe6fe6f..0000000
--- a/src/c/hardware/rasberrypi/serial/i16RPISerialSendDatas.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/* 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: Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-/* Function to send signed 16-bit byte on specified serial port. */
-
-#include "types.h"
-#include "RPIPeripheralSerial.h"
-
-void i16RPISerialSendDatas(int fd, int16 data)
-{
- /*Send lsb first*/
- serialPutchar(fd, (uint8) data);
- serialPutchar(fd, (uint8) (data>>8));
-
-}
diff --git a/src/c/hardware/rasberrypi/serial/i8RPISerialSendDataa.c b/src/c/hardware/rasberrypi/serial/i8RPISerialSendDataa.c
deleted file mode 100644
index c4dd199..0000000
--- a/src/c/hardware/rasberrypi/serial/i8RPISerialSendDataa.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/* 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: Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-/* Function to send signed 8-bit byte array/matrix on specified serial port. */
-
-#include "types.h"
-#include "RPIPeripheralSerial.h"
-
-void i8RPISerialSendDataa(int fd, int8* data, int size)
-{
- int count = 0;
-
- for (count = 0; count < size; ++count)
- {
- i8RPISerialSendDatas(fd, data[count]);
- }
-}
diff --git a/src/c/hardware/rasberrypi/serial/i8RPISerialSendDatas.c b/src/c/hardware/rasberrypi/serial/i8RPISerialSendDatas.c
deleted file mode 100644
index e637871..0000000
--- a/src/c/hardware/rasberrypi/serial/i8RPISerialSendDatas.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/* 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: Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-/* Function to send signed 8-bit byte on specified serial port. */
-
-#include "types.h"
-#include "RPIPeripheralSerial.h"
-
-void i8RPISerialSendDatas(int fd, int8 data)
-{
- serialPutchar(fd, (uint8) data);
-
-}
diff --git a/src/c/hardware/rasberrypi/serial/sRPISerialSendDataa.c b/src/c/hardware/rasberrypi/serial/sRPISerialSendDataa.c
deleted file mode 100644
index 14c0bc7..0000000
--- a/src/c/hardware/rasberrypi/serial/sRPISerialSendDataa.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/* 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: Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-/* Function to send float data array/matrix on specified serial port. */
-
-#include "types.h"
-#include "RPIPeripheralSerial.h"
-
-void sRPISerialSendDataa(int fd, float* data, int size)
-{
- int count = 0;
-
- for (count = 0; count < size; ++count)
- {
- sRPISerialSendDatas(fd, data[count]);
- }
-
-}
diff --git a/src/c/hardware/rasberrypi/serial/sRPISerialSendDatas.c b/src/c/hardware/rasberrypi/serial/sRPISerialSendDatas.c
deleted file mode 100644
index ff78dd1..0000000
--- a/src/c/hardware/rasberrypi/serial/sRPISerialSendDatas.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/* 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: Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-/* Function to send float data on specified serial port. */
-
-#include "types.h"
-#include "RPIPeripheralSerial.h"
-
-void sRPISerialSendDatas(int fd, float data)
-{
- uint8 count;
-
- union float_bytes{
- float float_data;
- unsigned char bytes[sizeof(float)];
- } in_data;
- in_data.float_data = data;
-
- for(count=0; count<sizeof(float); count++)
- {
- /*Send lsb first*/
- serialPutchar(fd, (uint8) in_data.bytes[count]);
- }
-
-}
diff --git a/src/c/hardware/rasberrypi/serial/u16RPISerialSendDataa.c b/src/c/hardware/rasberrypi/serial/u16RPISerialSendDataa.c
deleted file mode 100644
index b444047..0000000
--- a/src/c/hardware/rasberrypi/serial/u16RPISerialSendDataa.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/* 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: Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-/* Function to send unsigned 16-bit data array/matrix on specified serial port. */
-
-#include "types.h"
-#include "RPIPeripheralSerial.h"
-
-void u16RPISerialSendDataa(int fd, uint16* data, int size)
-{
- int count = 0;
-
- for (count = 0; count < size; ++count)
- {
- u16RPISerialSendDatas(fd, data[count]);
- }
-
-
-}
diff --git a/src/c/hardware/rasberrypi/serial/u16RPISerialSendDatas.c b/src/c/hardware/rasberrypi/serial/u16RPISerialSendDatas.c
deleted file mode 100644
index b4a90c2..0000000
--- a/src/c/hardware/rasberrypi/serial/u16RPISerialSendDatas.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/* 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: Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-/* Function to send unsigned 16-bit data on specified serial port. */
-
-#include "types.h"
-#include "RPIPeripheralSerial.h"
-
-void u16RPISerialSendDatas(int fd, uint16 data)
-{
- /*Send lsb first*/
- serialPutchar(fd, (uint8) data);
- serialPutchar(fd, (uint8) (data>>8));
-}
diff --git a/src/c/hardware/rasberrypi/serial/u16RPISerialSetups.c b/src/c/hardware/rasberrypi/serial/u16RPISerialSetups.c
deleted file mode 100644
index cde4cba..0000000
--- a/src/c/hardware/rasberrypi/serial/u16RPISerialSetups.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/* 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: Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-/* Function to setup port with desired baud rate. */
-
-#include "types.h"
-#include "RPIPeripheralSerial.h"
-
-int u16RPISerialSetups(char* port, int baudrate)
-{
- int fd;
-
- fd = serialOpen (port, baudrate);
-
- return fd;
-}
diff --git a/src/c/hardware/rasberrypi/serial/u8RPISerialCloses.c b/src/c/hardware/rasberrypi/serial/u8RPISerialCloses.c
deleted file mode 100644
index 5162d15..0000000
--- a/src/c/hardware/rasberrypi/serial/u8RPISerialCloses.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/* 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: Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-/* Function to close serial port opened. */
-
-#include "types.h"
-#include "RPIPeripheralSerial.h"
-
-void u8RPISerialCloses(int fd)
-{
- serialClose (fd);
-}
diff --git a/src/c/hardware/rasberrypi/serial/u8RPISerialFlushs.c b/src/c/hardware/rasberrypi/serial/u8RPISerialFlushs.c
deleted file mode 100644
index c80a92c..0000000
--- a/src/c/hardware/rasberrypi/serial/u8RPISerialFlushs.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/* 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: Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-/* Function to discards data serial buffer (received as well as waiting to be sent */
-
-#include "types.h"
-#include "RPIPeripheralSerial.h"
-
-void u8RPISerialFlushs(int fd)
-{
- serialFlush(fd);
-}
diff --git a/src/c/hardware/rasberrypi/serial/u8RPISerialSendChars.c b/src/c/hardware/rasberrypi/serial/u8RPISerialSendChars.c
deleted file mode 100644
index e381351..0000000
--- a/src/c/hardware/rasberrypi/serial/u8RPISerialSendChars.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/* 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: Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-/* Function to send 8-bit char on specified serial port. */
-
-#include "types.h"
-#include "RPIPeripheralSerial.h"
-
-void u8RPISerialSendChars(int fd, uint8 data)
-{
- serialPutchar(fd, data);
-}
diff --git a/src/c/hardware/rasberrypi/serial/u8RPISerialSendDataa.c b/src/c/hardware/rasberrypi/serial/u8RPISerialSendDataa.c
deleted file mode 100644
index 9d09714..0000000
--- a/src/c/hardware/rasberrypi/serial/u8RPISerialSendDataa.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/* 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: Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-/* Function to send unsigned 8-bit byte array/matrix on specified serial port. */
-
-#include "types.h"
-#include "RPIPeripheralSerial.h"
-
-void u8RPISerialSendDataa(int fd, uint8* data, int size)
-{
- int count = 0;
-
- for (count = 0; count < size; ++count)
- {
- u8RPISerialSendDatas(fd, data[count]);
- }
-
-}
diff --git a/src/c/hardware/rasberrypi/serial/u8RPISerialSendDatas.c b/src/c/hardware/rasberrypi/serial/u8RPISerialSendDatas.c
deleted file mode 100644
index 9edb439..0000000
--- a/src/c/hardware/rasberrypi/serial/u8RPISerialSendDatas.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/* 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: Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-/* Function to send unsigned 8-bit byte on specified serial port. */
-
-#include "types.h"
-#include "RPIPeripheralSerial.h"
-
-void u8RPISerialSendDatas(int fd, uint8 data)
-{
- serialPutchar(fd, data);
-
-}