summaryrefslogtreecommitdiff
path: root/2.3-1/src/c/hardware/rasberrypi/includes
diff options
context:
space:
mode:
authoryash11122017-07-07 21:20:49 +0530
committeryash11122017-07-07 21:20:49 +0530
commit9e5793a7b05b23e6044a6d7a9ddd5db39ba375f0 (patch)
treef50d6e06d8fe6bc1a9053ef10d4b4d857800ab51 /2.3-1/src/c/hardware/rasberrypi/includes
downloadScilab2C-9e5793a7b05b23e6044a6d7a9ddd5db39ba375f0.tar.gz
Scilab2C-9e5793a7b05b23e6044a6d7a9ddd5db39ba375f0.tar.bz2
Scilab2C-9e5793a7b05b23e6044a6d7a9ddd5db39ba375f0.zip
sci2c arduino updated
Diffstat (limited to '2.3-1/src/c/hardware/rasberrypi/includes')
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralDigital.h36
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralPWM.h31
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralPinISR.h26
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralSerial.h49
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralThreading.h28
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralTiming.h34
6 files changed, 204 insertions, 0 deletions
diff --git a/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralDigital.h b/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralDigital.h
new file mode 100644
index 00000000..2f40ffb2
--- /dev/null
+++ b/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralDigital.h
@@ -0,0 +1,36 @@
+/* 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
+*/
+
+/* This file declares functions and constants related to GPIO pins*/
+
+#ifndef __RPIPERIPHERALGPIO_H__
+#define __RPIPERIPHERALGPIO_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#include "types.h"
+#include "wiringPi.h"
+
+extern int phy_pin[];
+
+void u8RPIDigitalSetups(uint8 pin, uint8 direction);
+void u8RPIDigitalOuts(uint8 pin, uint8 state);
+uint8 u8RPIDigitalIns(uint8 pin);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /*__RPIPERIPHERALGPIO_H__*/
diff --git a/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralPWM.h b/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralPWM.h
new file mode 100644
index 00000000..d463d9c9
--- /dev/null
+++ b/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralPWM.h
@@ -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: Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+#ifndef __RPIPERIPHERALPWM_H__
+#define __RPIPERIPHERALPWM_H__
+
+#include "types.h"
+#include "wiringPi.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void u8RPIHardPWMWrites(uint8 pin, uint16 value);
+void u8RPIHardPWMSetRanges(uint16 value);
+void u8RPIHardPWMSetModes(uint8 mode);
+void u8RPIHardPWMSetClocks(uint16 clk_divisor);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /*__RPIPERIPHERALPWM_H__*/
diff --git a/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralPinISR.h b/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralPinISR.h
new file mode 100644
index 00000000..fc5a8d04
--- /dev/null
+++ b/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralPinISR.h
@@ -0,0 +1,26 @@
+ /* 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
+ */
+#ifndef __RPIPERIPHERALPINISR_H__
+#define __RPIPERIPHERALPINISR_H__
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int16 i16RPIPinISRs(uint8 pin, uint8 edgetype, void (*ISRFunction)(void));
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /*__RPIPERIPHERALPINISR_H__*/
diff --git a/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralSerial.h b/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralSerial.h
new file mode 100644
index 00000000..14df95b4
--- /dev/null
+++ b/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralSerial.h
@@ -0,0 +1,49 @@
+ /* 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
+ */
+#ifndef __RPIPERIPHERALSERIAL_H__
+#define __RPIPERIPHERALSERIAL_H__
+
+#include "types.h"
+#include "wiringSerial.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int u8RPISerialSetups(char* port, int baudrate);
+void u8RPISerialCloses(int fd);
+
+void u8RPISerialSendChars(int fd, uint8 data);
+void u8RPISerialSendDatas(int fd, uint8 data);
+void i8RPISerialSendDatas(int fd, int8 data);
+void u16RPISerialSendDatas(int fd, uint16 data);
+void i16RPISerialSendDatas(int fd, int16 data);
+void sRPISerialSendDatas(int fd, float data);
+void dRPISerialSendDatas(int fd, double data);
+void u8RPISerialSendDataa(int fd, uint8* data, int size);
+void i8RPISerialSendDataa(int fd, int8* data, int size);
+void u16RPISerialSendDataa(int fd, uint16* data, int size);
+void i16RPISerialSendDataa(int fd, int16* data, int size);
+void sRPISerialSendDataa(int fd, float* data, int size);
+void dRPISerialSendDataa(int fd, double* data, int size);
+void gRPISerialSendDatas(int fd, uint8* data, int size);
+
+int16 i16RPISerialDataAvails(int fd);
+int16 i16RPISerialGetChars(int fd);
+
+void u8RPISerialFlushs(int fd);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /*__RPIPERIPHERALSERIAL_H__*/
diff --git a/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralThreading.h b/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralThreading.h
new file mode 100644
index 00000000..a7b2adb4
--- /dev/null
+++ b/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralThreading.h
@@ -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: Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+#ifndef __RPIPERIPHERALTHREADING_H__
+#define __RPIPERIPHERALTHREADING_H__
+
+#include "types.h"
+#include "wiringPi.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+uint16 RPIThreadCreate(void *(*threadFunction)(void*));
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /*__RPIPERIPHERALTHREADING_H__*/
diff --git a/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralTiming.h b/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralTiming.h
new file mode 100644
index 00000000..854073f3
--- /dev/null
+++ b/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralTiming.h
@@ -0,0 +1,34 @@
+/* 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
+*/
+
+/* This file declares functions and constants related to rasberrypi*/
+
+#ifndef __RPIPERIPHERALTIMING_H__
+#define __RPIPERIPHERALTIMING_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "types.h"
+#include "wiringPi.h"
+
+void u16RPIDelayMillis(uint16 time);
+void u16RPIDelayMicros(uint16 time);
+uint32 u32RPIGetMillis();
+uint32 u32RPIGetMicros();
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /*__RPIPERIPHERALTIMING_H__*/