summaryrefslogtreecommitdiff
path: root/2.3-1/src/c/hardware
diff options
context:
space:
mode:
authorBrijeshcr2017-07-06 15:24:41 +0530
committerGitHub2017-07-06 15:24:41 +0530
commita7eeecce4c7c39ea52a2d434815c574a2c42730d (patch)
tree9968264546fd54f9eaa6ad80ee7db47e366f8601 /2.3-1/src/c/hardware
parent3308ea7a973e2c1e1c8bea99ac7cc783ce8e8b06 (diff)
parent115efeb443a7e6da44f628537811b69a01553ab2 (diff)
downloadScilab2C-a7eeecce4c7c39ea52a2d434815c574a2c42730d.tar.gz
Scilab2C-a7eeecce4c7c39ea52a2d434815c574a2c42730d.tar.bz2
Scilab2C-a7eeecce4c7c39ea52a2d434815c574a2c42730d.zip
Merge pull request #3 from sandeepgupta007/master
LinearAlgebra Function Added
Diffstat (limited to '2.3-1/src/c/hardware')
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/I2C/u16RPI_I2CReadReg16s.c19
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/I2C/u16RPI_I2CReadReg8s.c19
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/I2C/u16RPI_I2CReads.c19
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/I2C/u16RPI_I2CSetups.c19
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/I2C/u16RPI_I2CWriteReg16s.c19
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/I2C/u16RPI_I2CWriteReg8s.c19
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/I2C/u16RPI_I2CWrites.c19
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/ISR/i16RPIPinISRs.c (renamed from 2.3-1/src/c/hardware/rasberrypi/Digital/u8RPI_digitalReads.c)18
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/Interrupt/u8RPI_waitForInterrupts.c44
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/Misc/RPI_boardRev.c19
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/Misc/u16RPI_sn3218Setups.c19
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/Misc/u8RPI_padDrives.c17
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/Serial/u8RPI_serialPrintfs.c17
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/Serial/u8RPI_serialPutchars.c17
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/Serial/u8RPI_serialPutss.c17
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/Setup/gRPI_pinNumberinga.c28
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/Setup/u8RPI_getAlts.c19
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/Setup/u8RPI_pinModeAlts.c17
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/Setup/u8RPI_pinModes.c31
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/Setup/u8RPI_pullControls.c25
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/Shift/u16RPI_sr595Setups.c20
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/Shift/u8RPI_shiftIns.c19
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/Shift/u8RPI_shiftOuts.c17
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/gertBoard/RPI_gertboardSPISetup.c19
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/gertBoard/u16RPI_gertboardAnalogReads.c19
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/gertBoard/u16RPI_gertboardAnalogSetups.c19
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/gertBoard/u16RPI_gertboardAnalogWrites.c17
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/gpio/u8RPIDigitalIns.c (renamed from 2.3-1/src/c/hardware/rasberrypi/Digital/RPI_digitalReadByte.c)17
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/gpio/u8RPIDigitalOuts.c (renamed from 2.3-1/src/c/hardware/rasberrypi/Digital/u8RPI_digitalWrites.c)18
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/gpio/u8RPIDigitalSetups.c39
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralDigital.h13
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralGertboard.h32
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralI2C.h37
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralLCD.h39
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralLCD128x64.h43
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralMcp.h36
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralPWM.h16
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralPiGlow.h31
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralPinISR.h (renamed from 2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralPinMap.h)14
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralSerial.h36
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralSetup.h35
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralShift.h31
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralSoft.h37
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralThreading.h (renamed from 2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralInterrupt.h)15
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralTiming.h10
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralDigital.h13
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralGertboard.h32
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralI2C.h35
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralInterrupt.h30
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralLCD.h40
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralLCD128x64.h58
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralMcp.h33
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralMisc.h31
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPWM.h19
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPcf.h30
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPiGlow.h32
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPinISR.h (renamed from 2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralPcf.h)17
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPinMap.h30
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralSerial.h39
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralSetup.h47
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralShift.h31
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralSoft.h34
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralThreading.h (renamed from 2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralMisc.h)20
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralTiming.h14
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdCharDefs.c18
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdClears.c17
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdCursorBlinks.c17
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdCursors.c17
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdDisplays.c17
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdHomes.c17
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdInits.c19
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdPositions.c17
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdPrintfs.c17
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdPutchars.c17
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdPutss.c17
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdSendCommands.c17
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/lcd128x64/RPI_lcd128x64Orientation.c17
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/lcd128x64/RPI_lcd128x64circle.c17
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/lcd128x64/RPI_lcd128x64clear.c17
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/lcd128x64/RPI_lcd128x64ellipse.c17
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/lcd128x64/RPI_lcd128x64line.c17
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/lcd128x64/RPI_lcd128x64lineTo.c17
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/lcd128x64/RPI_lcd128x64point.c17
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/lcd128x64/RPI_lcd128x64putchar.c17
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/lcd128x64/RPI_lcd128x64puts.c17
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/lcd128x64/RPI_lcd128x64rectangle.c17
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/lcd128x64/RPI_lcd128x64setOrigin.c17
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/lcd128x64/RPI_lcd128x64setup.c19
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/mcp/u16RPI_mcp23008Setups.c19
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/mcp/u16RPI_mcp23016Setups.c19
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/mcp/u16RPI_mcp23017Setups.c19
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/mcp/u16RPI_mcp23s08Setups.c19
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/mcp/u16RPI_mcp23s17Setups.c19
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/pcf/u16RPI_pcf8574Setups.c19
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/pcf/u16RPI_pcf8591Setups.c19
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/piGlow/u8RPI_piGlow1s.c17
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/piGlow/u8RPI_piGlowLegs.c17
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/piGlow/u8RPI_piGlowRings.c17
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/piGlow/u8RPI_piGlowSetups.c17
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/pinMap/u8RPI_physToGpios.c19
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/pinMap/u8RPI_wpiToGpios.c19
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/pwm/u8RPIHardPWMSetClocks.c (renamed from 2.3-1/src/c/hardware/rasberrypi/pwm/u16RPI_pwmClocks.c)18
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/pwm/u8RPIHardPWMSetModes.c (renamed from 2.3-1/src/c/hardware/rasberrypi/pwm/gRPI_pwmModea.c)25
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/pwm/u8RPIHardPWMSetRanges.c (renamed from 2.3-1/src/c/hardware/rasberrypi/pwm/u32RPI_pwmRanges.c)19
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/pwm/u8RPIHardPWMWrites.c (renamed from 2.3-1/src/c/hardware/rasberrypi/Digital/u8RPI_digitalWriteBytes.c)19
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/pwm/u8RPI_pwmToneWrites.c17
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/serial/dRPISerialSendDataa.c27
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/serial/dRPISerialSendDatas.c35
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/serial/gRPISerialSendDatas.c27
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/serial/i16RPISerialDataAvails.c25
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/serial/i16RPISerialGetChars.c27
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/serial/i16RPISerialSendDataa.c27
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/serial/i16RPISerialSendDatas.c24
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/serial/i8RPISerialSendDataa.c26
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/serial/i8RPISerialSendDatas.c (renamed from 2.3-1/src/c/hardware/rasberrypi/Serial/u8RPI_serialFlushs.c)13
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/serial/sRPISerialSendDataa.c27
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/serial/sRPISerialSendDatas.c34
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/serial/u16RPISerialSendDataa.c28
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/serial/u16RPISerialSendDatas.c23
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/serial/u16RPISerialSetups.c25
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/serial/u8RPISerialCloses.c (renamed from 2.3-1/src/c/hardware/rasberrypi/Serial/u8RPI_serialGetchars.c)12
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/serial/u8RPISerialFlushs.c (renamed from 2.3-1/src/c/hardware/rasberrypi/Serial/u8RPI_serialCloses.c)12
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/serial/u8RPISerialSendChars.c (renamed from 2.3-1/src/c/hardware/rasberrypi/Serial/gRPI_serialOpena.c)14
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/serial/u8RPISerialSendDataa.c27
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/serial/u8RPISerialSendDatas.c (renamed from 2.3-1/src/c/hardware/rasberrypi/Serial/u8RPI_serialDataAvails.c)15
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/soft/u8RPI_softPwmCreates.c19
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/soft/u8RPI_softPwmStops.c17
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/soft/u8RPI_softPwmWrites.c17
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/soft/u8RPI_softToneCreates.c19
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/soft/u8RPI_softToneStops.c17
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/soft/u8RPI_softToneWrites.c17
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/threading/u16RPIThreadCreates.c (renamed from 2.3-1/src/c/hardware/rasberrypi/pwm/u8RPI_pwmWrites.c)17
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/timing/u16RPIDelayMicros.c (renamed from 2.3-1/src/c/hardware/rasberrypi/Timing/u32RPI_delayMicros.c)11
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/timing/u16RPIDelayMillis.c (renamed from 2.3-1/src/c/hardware/rasberrypi/Timing/u32RPI_delays.c)14
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/timing/u32RPIGetMicros.c (renamed from 2.3-1/src/c/hardware/rasberrypi/Timing/RPI_micros.c)16
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/timing/u32RPIGetMillis.c (renamed from 2.3-1/src/c/hardware/rasberrypi/Timing/RPI_millis.c)16
136 files changed, 706 insertions, 2307 deletions
diff --git a/2.3-1/src/c/hardware/rasberrypi/I2C/u16RPI_I2CReadReg16s.c b/2.3-1/src/c/hardware/rasberrypi/I2C/u16RPI_I2CReadReg16s.c
deleted file mode 100644
index 5d04f4b0..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/I2C/u16RPI_I2CReadReg16s.c
+++ /dev/null
@@ -1,19 +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: 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/2.3-1/src/c/hardware/rasberrypi/I2C/u16RPI_I2CReadReg8s.c b/2.3-1/src/c/hardware/rasberrypi/I2C/u16RPI_I2CReadReg8s.c
deleted file mode 100644
index 2f4f1f74..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/I2C/u16RPI_I2CReadReg8s.c
+++ /dev/null
@@ -1,19 +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: 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/2.3-1/src/c/hardware/rasberrypi/I2C/u16RPI_I2CReads.c b/2.3-1/src/c/hardware/rasberrypi/I2C/u16RPI_I2CReads.c
deleted file mode 100644
index 49c36737..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/I2C/u16RPI_I2CReads.c
+++ /dev/null
@@ -1,19 +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: 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/2.3-1/src/c/hardware/rasberrypi/I2C/u16RPI_I2CSetups.c b/2.3-1/src/c/hardware/rasberrypi/I2C/u16RPI_I2CSetups.c
deleted file mode 100644
index f533a1f2..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/I2C/u16RPI_I2CSetups.c
+++ /dev/null
@@ -1,19 +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: 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/2.3-1/src/c/hardware/rasberrypi/I2C/u16RPI_I2CWriteReg16s.c b/2.3-1/src/c/hardware/rasberrypi/I2C/u16RPI_I2CWriteReg16s.c
deleted file mode 100644
index b30c106f..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/I2C/u16RPI_I2CWriteReg16s.c
+++ /dev/null
@@ -1,19 +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: 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/2.3-1/src/c/hardware/rasberrypi/I2C/u16RPI_I2CWriteReg8s.c b/2.3-1/src/c/hardware/rasberrypi/I2C/u16RPI_I2CWriteReg8s.c
deleted file mode 100644
index d2ebf3d9..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/I2C/u16RPI_I2CWriteReg8s.c
+++ /dev/null
@@ -1,19 +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: 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/2.3-1/src/c/hardware/rasberrypi/I2C/u16RPI_I2CWrites.c b/2.3-1/src/c/hardware/rasberrypi/I2C/u16RPI_I2CWrites.c
deleted file mode 100644
index 133ed659..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/I2C/u16RPI_I2CWrites.c
+++ /dev/null
@@ -1,19 +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: 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);
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/Digital/u8RPI_digitalReads.c b/2.3-1/src/c/hardware/rasberrypi/ISR/i16RPIPinISRs.c
index 05594066..6e398a17 100644
--- a/2.3-1/src/c/hardware/rasberrypi/Digital/u8RPI_digitalReads.c
+++ b/2.3-1/src/c/hardware/rasberrypi/ISR/i16RPIPinISRs.c
@@ -5,17 +5,21 @@
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, Jorawar Singh
+ Author: Siddhesh Wani
Organization: FOSSEE, IIT Bombay
Email: toolbox@scilab.in
*/
+/* Function to declare interrupt on pins and corresponding ISRs */
+
+#include "types.h"
+#include "RPIPeripheralPinISR.h"
#include "RPIPeripheralDigital.h"
-/* Function to read the state of a gpio pin */
+int16 i16RPIPinISRs(uint8 pin, uint8 edgetype, void (*ISRFunction)(void))
+{
+ int status;
+ status = wiringPiISR((int)phy_pin[pin-1], (int) edgetype, ISRFunction);
+ return status;
+}
-uint8 u8RPI_digitalReads(uint8 pin){
- uint8 state=0;
- state=digitalRead(pin);
- return (state);
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/Interrupt/u8RPI_waitForInterrupts.c b/2.3-1/src/c/hardware/rasberrypi/Interrupt/u8RPI_waitForInterrupts.c
deleted file mode 100644
index ab15b8de..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/Interrupt/u8RPI_waitForInterrupts.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/* Copyright (C) 2017 - 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 "RPIPeripheralInterrupt.h"
-#include "RPI_wfi.h"
-#include <sys/time.h>
-#include <math.h>
-#include <stdlib.h>
-
-int8 u8RPI_waitForInterrupts(uint8 pin,int16 time){
- __RPI_wfi=0;
- if (wiringPiISR(pin,3,&RPI_wfi)<0){
- return -1;
- }
- if (time==-1){
- while (__RPI_wfi==0){;}
- return 1;
- }
- else{
- struct timeval time1,time2;
- int nDigits;
- double t1,t2;
- gettimeofday(&time1, NULL);
- nDigits=floor(log10(abs(time1.tv_usec)))+1;
- t1=time1.tv_sec+time1.tv_usec/nDigits;
- t2=t1;
- while (__RPI_wfi==0 && t2-t1<time){
- gettimeofday(&time2,NULL);
- nDigits=floor(log10(abs(time2.tv_usec)))+1;
- t2=time2.tv_sec+time2.tv_usec/nDigits;
- }
- if (__RPI_wfi==0){return 0;}
- else{return 1;}
- }
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/Misc/RPI_boardRev.c b/2.3-1/src/c/hardware/rasberrypi/Misc/RPI_boardRev.c
deleted file mode 100644
index c8ecf705..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/Misc/RPI_boardRev.c
+++ /dev/null
@@ -1,19 +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: Jorawar Singh, Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#include "RPIPeripheralMisc.h"
-
-uint8 RPI_boardRev(){
- uint8 out;
- out=piBoardRev();
- return out;
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/Misc/u16RPI_sn3218Setups.c b/2.3-1/src/c/hardware/rasberrypi/Misc/u16RPI_sn3218Setups.c
deleted file mode 100644
index ab229907..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/Misc/u16RPI_sn3218Setups.c
+++ /dev/null
@@ -1,19 +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: Jorawar Singh, Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#include "RPIPeripheralMisc.h"
-
-int8 u16RPI_sn3218Setups(uint16 pinBase){
- int8 out;
- out=sn3218Setup(pinBase);
- return (out);
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/Misc/u8RPI_padDrives.c b/2.3-1/src/c/hardware/rasberrypi/Misc/u8RPI_padDrives.c
deleted file mode 100644
index ce13e08a..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/Misc/u8RPI_padDrives.c
+++ /dev/null
@@ -1,17 +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: Jorawar Singh, Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#include "RPIPeripheralMisc.h"
-
-void u8RPI_padDrives(uint8 group,uint8 strength){
- setPadDrive(group,strength);
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/Serial/u8RPI_serialPrintfs.c b/2.3-1/src/c/hardware/rasberrypi/Serial/u8RPI_serialPrintfs.c
deleted file mode 100644
index d1672003..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/Serial/u8RPI_serialPrintfs.c
+++ /dev/null
@@ -1,17 +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: 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/2.3-1/src/c/hardware/rasberrypi/Serial/u8RPI_serialPutchars.c b/2.3-1/src/c/hardware/rasberrypi/Serial/u8RPI_serialPutchars.c
deleted file mode 100644
index 3309317e..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/Serial/u8RPI_serialPutchars.c
+++ /dev/null
@@ -1,17 +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: 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/2.3-1/src/c/hardware/rasberrypi/Serial/u8RPI_serialPutss.c b/2.3-1/src/c/hardware/rasberrypi/Serial/u8RPI_serialPutss.c
deleted file mode 100644
index 581e15ac..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/Serial/u8RPI_serialPutss.c
+++ /dev/null
@@ -1,17 +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: 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);
-}
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
deleted file mode 100644
index 4170f4c1..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/Setup/gRPI_pinNumberinga.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: 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
deleted file mode 100644
index 0a5c4764..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/Setup/u8RPI_getAlts.c
+++ /dev/null
@@ -1,19 +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: 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
deleted file mode 100644
index 153b88ee..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/Setup/u8RPI_pinModeAlts.c
+++ /dev/null
@@ -1,17 +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: 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
deleted file mode 100644
index 76601f8d..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/Setup/u8RPI_pinModes.c
+++ /dev/null
@@ -1,31 +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: 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
deleted file mode 100644
index 4e95aac5..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/Setup/u8RPI_pullControls.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: 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);
- }
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/Shift/u16RPI_sr595Setups.c b/2.3-1/src/c/hardware/rasberrypi/Shift/u16RPI_sr595Setups.c
deleted file mode 100644
index 3f0a6493..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/Shift/u16RPI_sr595Setups.c
+++ /dev/null
@@ -1,20 +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: Jorawar Singh, Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#include "RPIPeripheralShift.h"
-
-int8 u16RPI_sr595Setups(uint16 pinBase,uint8 nPins,uint8 dP,uint8 cP,uint8 lP)
-{
- int8 out;
- out=sr595Setup(pinBase,nPins,dP,cP,lP);
- return (out);
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/Shift/u8RPI_shiftIns.c b/2.3-1/src/c/hardware/rasberrypi/Shift/u8RPI_shiftIns.c
deleted file mode 100644
index 6a264b6a..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/Shift/u8RPI_shiftIns.c
+++ /dev/null
@@ -1,19 +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: Jorawar Singh, Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#include "RPIPeripheralShift.h"
-
-uint8 u8RPI_shiftIns(uint8 dpin,uint8 cpin,uint8 order){
- uint8 out;
- out=shiftIn(dpin,cpin,order);
- return out;
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/Shift/u8RPI_shiftOuts.c b/2.3-1/src/c/hardware/rasberrypi/Shift/u8RPI_shiftOuts.c
deleted file mode 100644
index 5d24c2b9..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/Shift/u8RPI_shiftOuts.c
+++ /dev/null
@@ -1,17 +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: Jorawar Singh, Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#include "RPIPeripheralShift.h"
-
-void u8RPI_shiftOuts(uint8 dpin,uint8 cpin,uint8 order,uint8 val){
- shiftOut(dpin,cpin,order,val);
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/gertBoard/RPI_gertboardSPISetup.c b/2.3-1/src/c/hardware/rasberrypi/gertBoard/RPI_gertboardSPISetup.c
deleted file mode 100644
index 5724ebb4..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/gertBoard/RPI_gertboardSPISetup.c
+++ /dev/null
@@ -1,19 +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: Jorawar Singh, Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#include "RPIPeripheralGertboard.h"
-
-int8 RPI_gertboardSPISetup(){
- int8 out;
- out=gertboardSPISetup();
- return (out);
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/gertBoard/u16RPI_gertboardAnalogReads.c b/2.3-1/src/c/hardware/rasberrypi/gertBoard/u16RPI_gertboardAnalogReads.c
deleted file mode 100644
index 433bed29..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/gertBoard/u16RPI_gertboardAnalogReads.c
+++ /dev/null
@@ -1,19 +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: Jorawar Singh, Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#include "RPIPeripheralGertboard.h"
-
-uint16 u16RPI_gertboardAnalogReads(uint16 pin){
- uint16 out;
- out=gertboardAnalogRead(pin);
- return (out);
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/gertBoard/u16RPI_gertboardAnalogSetups.c b/2.3-1/src/c/hardware/rasberrypi/gertBoard/u16RPI_gertboardAnalogSetups.c
deleted file mode 100644
index a19aa6d0..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/gertBoard/u16RPI_gertboardAnalogSetups.c
+++ /dev/null
@@ -1,19 +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: Jorawar Singh, Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#include "RPIPeripheralGertboard.h"
-
-int8 u16RPI_gertboardAnalogSetups(uint16 pinBase){
- int8 out;
- out=gertboardAnalogSetup(pinBase);
- return (out);
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/gertBoard/u16RPI_gertboardAnalogWrites.c b/2.3-1/src/c/hardware/rasberrypi/gertBoard/u16RPI_gertboardAnalogWrites.c
deleted file mode 100644
index 2c8aa338..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/gertBoard/u16RPI_gertboardAnalogWrites.c
+++ /dev/null
@@ -1,17 +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: Jorawar Singh, Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#include "RPIPeripheralGertboard.h"
-
-void u16RPI_gertboardAnalogWrites(uint16 pin,uint16 value){
- gertboardAnalogWrite(pin,value);
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/Digital/RPI_digitalReadByte.c b/2.3-1/src/c/hardware/rasberrypi/gpio/u8RPIDigitalIns.c
index 70fb6858..7b84350f 100644
--- a/2.3-1/src/c/hardware/rasberrypi/Digital/RPI_digitalReadByte.c
+++ b/2.3-1/src/c/hardware/rasberrypi/gpio/u8RPIDigitalIns.c
@@ -5,17 +5,20 @@
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
+ Author: Siddhesh Wani
Organization: FOSSEE, IIT Bombay
Email: toolbox@scilab.in
*/
-#include "RPIPeripheralDigital.h"
+/* Function to read the state of the gpio pin */
-/* Function to read the state of the first eight gpio pins */
+#include "types.h"
+#include "RPIPeripheralDigital.h"
-uint8 RPI_digitalReadByte(){
- uint8 state=0;
- state=digitalReadByte();
- return (state);
+/*pin is reduced by one as array index starts from 0 and pin no starts from 1*/
+uint8 u8RPIDigitalIns(uint8 pin)
+{
+ uint8 state = 0;
+ state = digitalRead(phy_pin[pin-1]);
+ return (state);
}
diff --git a/2.3-1/src/c/hardware/rasberrypi/Digital/u8RPI_digitalWrites.c b/2.3-1/src/c/hardware/rasberrypi/gpio/u8RPIDigitalOuts.c
index 02dce554..f828f77e 100644
--- a/2.3-1/src/c/hardware/rasberrypi/Digital/u8RPI_digitalWrites.c
+++ b/2.3-1/src/c/hardware/rasberrypi/gpio/u8RPIDigitalOuts.c
@@ -5,18 +5,22 @@
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, Jorawar Singh
+ Author: Siddhesh Wani
Organization: FOSSEE, IIT Bombay
Email: toolbox@scilab.in
*/
+
+/* Function to change the output state of the gpio pin */
-#include "RPIPeripheralDigital.h"
-/* Function to change the output state of the gpio pin */
+#include "types.h"
+#include "RPIPeripheralDigital.h"
-void u8RPI_digitalWrites(uint8 pin, uint8 state){
+/*pin is reduced by one as array index starts from 0 and pin no starts from 1*/
+void u8RPIDigitalOuts(uint8 pin, uint8 state)
+{
if (state == 0) /*low output*/
- digitalWrite(pin,0);
- else if (state == 1) /*high output*/
- digitalWrite(pin,1);
+ digitalWrite(phy_pin[pin-1], LOW);
+ if (state == 1) /*high output*/
+ digitalWrite(phy_pin[pin-1], HIGH);
}
diff --git a/2.3-1/src/c/hardware/rasberrypi/gpio/u8RPIDigitalSetups.c b/2.3-1/src/c/hardware/rasberrypi/gpio/u8RPIDigitalSetups.c
new file mode 100644
index 00000000..f5fefe08
--- /dev/null
+++ b/2.3-1/src/c/hardware/rasberrypi/gpio/u8RPIDigitalSetups.c
@@ -0,0 +1,39 @@
+/* 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 digital pins
+ direction = 1 -> output
+ direction = 0 -> input
+*/
+
+#include "types.h"
+#include "RPIPeripheralDigital.h"
+
+
+/*This array maps pin numbers on RPi board, with pin numbers corrsponding
+to WiringPi library*/
+int phy_pin[] = {17, 17, 8, 17, 9, 17, 7, 15, 17, 16, /*Pin 1 to 10*/
+ 0, 1, 2, 17, 3, 4, 17, 5, 12, 17, /*Pin 11 to 20*/
+ 13, 6, 14, 10, 17, 11, 30, 31, 21, 17, /*Pin 21 to 30*/
+ 22, 26, 23, 17, 24, 27, 25, 28, 17, 29 }; /*Pin 31 to 40*/
+
+/*pin is reduced by one as arrayiindex starts from 0 and pin no starts from 1*/
+void u8RPIDigitalSetups(uint8 pin, uint8 direction)
+{
+ if(direction == 1) /*Pin to be used as output*/
+ pinMode(phy_pin[pin-1], OUTPUT);
+ else if(direction == 2)
+ pinMode(phy_pin[pin-1], PWM_OUTPUT);
+ else
+ pinMode(phy_pin[pin-1], INPUT);
+
+}
diff --git a/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralDigital.h b/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralDigital.h
index 22d470a2..2f40ffb2 100644
--- a/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralDigital.h
+++ b/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralDigital.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2017 - IIT Bombay - FOSSEE
+/* 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
@@ -19,12 +19,15 @@
extern "C" {
#endif
+
#include "types.h"
+#include "wiringPi.h"
+
+extern int phy_pin[];
-uint8 u8RPI_digitalReads(uint8 pin);
-uint8 RPI_digitalReadByte();
-void u8RPI_digitalWrites(uint8 pin, uint8 state);
-void u8RPI_digitalWriteBytes(uint8 value);
+void u8RPIDigitalSetups(uint8 pin, uint8 direction);
+void u8RPIDigitalOuts(uint8 pin, uint8 state);
+uint8 u8RPIDigitalIns(uint8 pin);
#ifdef __cplusplus
} /* extern "C" */
diff --git a/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralGertboard.h b/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralGertboard.h
deleted file mode 100644
index 3594d0a1..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralGertboard.h
+++ /dev/null
@@ -1,32 +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, Jorawar Singh
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#ifndef __RPIPERIPHERALGERTBOARD_H__
-#define __RPIPERIPHERALGERTBOARD_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "types.h"
-#include "gertboard.h"
-
-int8 RPI_gertboardSPISetup();
-uint16 u16RPI_gertboardAnalogReads(uint16 pin);
-int8 u16RPI_gertboardAnalogSetups(uint16 pinBase);
-void u16RPI_gertboardAnalogWrites(uint16 pin,uint16 value);
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*__RPIPERIPHERALGERTBOARD_H__*/
diff --git a/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralI2C.h b/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralI2C.h
deleted file mode 100644
index 6c8dfe14..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralI2C.h
+++ /dev/null
@@ -1,37 +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, Jorawar Singh
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-/* This file declares functions and constants related to rasberrypi*/
-
-#ifndef __RPIPERIPHERALI2C_H__
-#define __RPIPERIPHERALI2C_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "types.h"
-#include "wiringPiI2C.h"
-
-int8 u16RPI_I2CSetups(uint8 arrd);
-int8 u16RPI_I2CReads(uint16 fd);
-int8 u16RPI_I2CReadReg8s(uint16 fd,uint16 reg);
-int8 u16RPI_I2CReadReg16s(uint16 fd,uint16 reg);
-int8 u16RPI_I2CWrites(uint16 fd,uint16 data);
-int8 u16RPI_I2CWriteReg8s(uint16 fd,uint16 reg,uint16 data);
-int8 u16RPI_I2CWriteReg16s(uint16 fd,uint16 reg,uint16 data);
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*__RPIPERIPHERALI2C_H__*/
diff --git a/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralLCD.h b/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralLCD.h
deleted file mode 100644
index 654a31a3..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralLCD.h
+++ /dev/null
@@ -1,39 +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: Jorawar Singh, Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
- */
-#ifndef __RPIPERIPHERALLCD_H__
-#define __RPIPERIPHERALLCD_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "types.h"
-#include "lcd.h"
-
-void u8RPI_lcdCharDefs(uint8 fd,uint8 index,uint8 d0,uint8 d1,uint8 d2,uint8 d3, uint8 d4,uint8 d5,uint8 d6,uint8 d7);
-void u8RPI_lcdClears(uint8 fd);
-void u8RPI_lcdCursorBlinks(uint8 fd,uint8 state);
-void u8RPI_lcdCursors(uint8 fd,uint8 state);
-void u8RPI_lcdDisplays(uint8 fd,uint8 state);
-void u8RPI_lcdHomes(uint8 fd);
-int8 u8RPI_lcdInits(uint8 rows,uint8 cols,uint8 bits,uint8 rs,uint8 strb,uint8 d0,uint8 d1,uint8 d2,uint8 d3,uint8 d4,uint8 d5,uint8 d6,uint8 d7);
-void u8RPI_lcdPositions(uint8 fd,uint8 row,uint8 col);
-void u8RPI_lcdPutchars(uint8 fd,uint8 character);
-void u8RPI_lcdSendCommands(uint8 fd,uint8 cmd);
-void u8RPI_lcdPutss(uint8 fd,char* msg,int size);
-void u8RPI_lcdPrintfs(uint8 fd,char* data,int size);
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*__RPIPERIPHERALLCD_H__*/
diff --git a/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralLCD128x64.h b/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralLCD128x64.h
deleted file mode 100644
index d541c9fd..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralLCD128x64.h
+++ /dev/null
@@ -1,43 +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: Jorawar Singh, Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
- */
-#ifndef __RPIPERIPHERALLCD128x64_H__
-#define __RPIPERIPHERALLCD128x64_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "types.h"
-#include "lcd128x64.h"
-
-int8 RPI_lcd128x64setup(void);
-void u8RPI_lcd128x64clears(uint8 colour);
-void u8RPI_lcd128x64Orientations(uint8 orientation);
-void u8RPI_lcd128x64setOrigins(uint8 x, uint8 y);
-void u8RPI_lcd128x64points(uint8 x, uint8 y, uint8 colour);
-void u8RPI_lcd128x64lineTos(uint8 x, uint8 y, uint8 colour);
-void u8RPI_lcd128x64lines(uint8 x0, uint8 y0, uint8 x1, uint8 y1, uint8 colour);
-void u8RPI_lcd128x64circles(uint8 x, uint8 y, uint8 r, uint8 colour, uint8 filled);
-void u8RPI_lcd128x64putchars(uint8 x, uint8 y, uint8 c, uint8 bgCol, uint8 fgCol);
-void u8RPI_lcd128x64putss(uint8 x, uint8 y, char *str,int size, uint8 bgCol, uint8 fgCol);
-void u8RPI_lcd128x64rectangles(uint8 x1, uint8 y1, uint8 x2, uint8 y2, uint8 colour, uint8 filled);
-void u8RPI_lcd128x64ellipses(uint8 cx, uint8 cy, uint8 xRadius, uint8 yRadius, uint8 colour, uint8 filled);
-
-//void u8RPI_lcd128x64orientCoordinatess(uint8 *x, uint8 *y);
-//void u8RPI_lcd128x64getScreenSizes(uint8 *x, uint8 *y);
-//void RPI_lcd128x64update(void);
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*__RPIPERIPHERALLCD128x64_H__*/
diff --git a/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralMcp.h b/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralMcp.h
deleted file mode 100644
index 5304f14b..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralMcp.h
+++ /dev/null
@@ -1,36 +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, Jorawar Singh
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
- */
-#ifndef __RPIPERIPHERALMCP_H__
-#define __RPIPERIPHERALMCP_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "types.h"
-#include "mcp23016.h"
-#include "mcp23017.h"
-#include "mcp23008.h"
-#include "mcp23s17.h"
-#include "mcp23s08.h"
-
-uint8 u16RPI_mcp23008Setups(uint16 pinBase,uint8 addr);
-uint8 u16RPI_mcp23016Setups(uint16 pinBase,uint8 addr);
-uint8 u16RPI_mcp23017Setups(uint16 pinBase,uint8 addr);
-uint8 u16RPI_mcp23s08Setups(uint16 pinBase,uint8 spiport,uint8 devId);
-uint8 u16RPI_mcp23s17Setups(uint16 pinBase,uint8 spiport,uint8 devId);
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*__RPIPERIPHERALMCP_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
index f1d3024e..d463d9c9 100644
--- a/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralPWM.h
+++ b/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralPWM.h
@@ -5,24 +5,24 @@
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, Jorawar Singh
+ 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
-#include "types.h"
-
-void u8RPI_pwmWrites(uint8 pin,uint16 value);
-void u32RPI_pwmRanges(uint32 value);
-void gRPI_pwmModea(char* mode,int size);
-void u16RPI_pwmClocks(uint16 divisor);
-void u8RPI_pwmToneWrites(uint8 pin,uint16 value);
+void u8RPIHardPWMWrites(uint8 pin, uint16 value);
+void u8RPIHardPWMSetRanges(uint16 value);
+void u8RPIHardPWMSetModes(uint8 mode);
+void u8RPIHardPWMSetClocks(uint16 clk_divisor);
#ifdef __cplusplus
} /* extern "C" */
diff --git a/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralPiGlow.h b/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralPiGlow.h
deleted file mode 100644
index d2dcd13c..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralPiGlow.h
+++ /dev/null
@@ -1,31 +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, Jorawar Singh
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
- */
-#ifndef __RPIPERIPHERALPIGLOW_H__
-#define __RPIPERIPHERALPIGLOW_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "types.h"
-#include "piGlow.h"
-
-void u8RPI_piGlowSetups(uint8 clear);
-void u8RPI_piGlow1s(uint8 leg,uint8 ring,uint8 intensity);
-void u8RPI_piGlowLegs(uint8 leg,uint8 intensity);
-void u8RPI_piGlowRings(uint8 ring,uint8 intensity);
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*__RPIPERIPHERALPIGLOW_H__*/
diff --git a/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralPinMap.h b/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralPinISR.h
index 39c2379d..fc5a8d04 100644
--- a/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralPinMap.h
+++ b/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralPinISR.h
@@ -5,24 +5,22 @@
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, Jorawar Singh
+ Author: Siddhesh Wani
Organization: FOSSEE, IIT Bombay
Email: toolbox@scilab.in
*/
-#ifndef __RPIPERIPHERALPINMAP_H__
-#define __RPIPERIPHERALPINMAP_H__
+#ifndef __RPIPERIPHERALPINISR_H__
+#define __RPIPERIPHERALPINISR_H__
+
#ifdef __cplusplus
extern "C" {
#endif
-#include "types.h"
-
-int8 u8RPI_physToGpios(uint8 pin);
-int8 u8RPI_wpiToGpios(uint8 pin);
+int16 i16RPIPinISRs(uint8 pin, uint8 edgetype, void (*ISRFunction)(void));
#ifdef __cplusplus
} /* extern "C" */
#endif
-#endif /*__RPIPERIPHERALPINMAP_H__*/
+#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
index 67284bd0..14df95b4 100644
--- a/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralSerial.h
+++ b/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralSerial.h
@@ -5,28 +5,42 @@
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, Jorawar Singh
+ 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
-#include "types.h"
-#include "wiringSerial.h"
+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);
-int8 gRPI_serialOpena(char* device,int size,uint32 baud);
-void u8RPI_serialCloses(uint8 fd);
-uint8 u8RPI_serialDataAvails(uint8 fd);
-void u8RPI_serialFlushs(uint8 fd);
-void u8RPI_serialGetchars(uint8 fd,char* out);
-void u8RPI_serialPrintfs(uint8 fd,char* msg,int size);
-void u8RPI_serialPutchars(uint8 fd,uint8 character);
-void u8RPI_serialPutss(uint8 fd,char* character,int size);
+void u8RPISerialFlushs(int fd);
#ifdef __cplusplus
} /* extern "C" */
diff --git a/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralSetup.h b/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralSetup.h
deleted file mode 100644
index 373f0648..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralSetup.h
+++ /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, Jorawar Singh
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-/* This file declares functions and constants related to Setup*/
-
-#ifndef __RPIPERIPHERALSETUP_H__
-#define __RPIPERIPHERALSETUP_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "types.h"
-#include "wiringPi.h"
-
-int8 gRPI_pinNumberinga(char* seq,int size);
-uint8 u8RPI_getAlts(uint8 pin);
-void u8RPI_pinModeAlts(uint8 pin,uint8 mode);
-void u8RPI_pinModes(uint8 pin,char* mode,int size);
-void u8RPI_pullControls(uint8 pin,char* mode,int size);
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*__RPIPERIPHERALSETUP_H__*/
diff --git a/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralShift.h b/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralShift.h
deleted file mode 100644
index 4c58bb77..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralShift.h
+++ /dev/null
@@ -1,31 +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, Jorawar Singh
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
- */
-#ifndef __RPIPERIPHERALSHIFT_H__
-#define __RPIPERIPHERALSHIFT_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "types.h"
-#include "wiringShift.h"
-#include "sr595.h"
-
-uint8 u8RPI_shiftIns(uint8 dpin,uint8 cpin,uint8 order);
-void u8RPI_shiftOuts(uint8 dpin,uint8 cpin,uint8 order,uint8 val);
-int8 u16RPI_sr595Setups(uint16 pinBase,uint8 nPins,uint8 dP,uint8 cP,uint8 lP);
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*__RPIPERIPHERALSHIFT_H__*/
diff --git a/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralSoft.h b/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralSoft.h
deleted file mode 100644
index 9494506e..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralSoft.h
+++ /dev/null
@@ -1,37 +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, Jorawar Singh
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-/* This file declares functions and constants related to Setup*/
-
-#ifndef __RPIPERIPHERALSOFT_H__
-#define __RPIPERIPHERALSOFT_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "types.h"
-#include "softPwm.h"
-#include "softTone.h"
-
-uint8 u8RPI_softPwmCreates(uint8 pin,uint16 ival,uint16 range);
-void u8RPI_softPwmStops(uint8 pin);
-void u8RPI_softPwmWrites(uint8 pin,uint16 value);
-uint8 u8RPI_softToneCreates(uint8 pin);
-void u8RPI_softToneStops(uint8 pin);
-void u8RPI_softToneWrites(uint8 pin,uint32 value);
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*__RPIPERIPHERALSOFT_H__*/
diff --git a/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralInterrupt.h b/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralThreading.h
index d9fc30f3..a7b2adb4 100644
--- a/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralInterrupt.h
+++ b/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralThreading.h
@@ -5,23 +5,24 @@
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, Jorawar Singh
+ Author: Siddhesh Wani
Organization: FOSSEE, IIT Bombay
Email: toolbox@scilab.in
*/
-#ifndef __RPIPERIPHERALINTERRUPT_H__
-#define __RPIPERIPHERALINTERRUPT_H__
+#ifndef __RPIPERIPHERALTHREADING_H__
+#define __RPIPERIPHERALTHREADING_H__
+
+#include "types.h"
+#include "wiringPi.h"
#ifdef __cplusplus
extern "C" {
#endif
-#include "types.h"
-
-int8 u8RPI_waitForInterrupts(uint8 pin,int16 time);
+uint16 RPIThreadCreate(void *(*threadFunction)(void*));
#ifdef __cplusplus
} /* extern "C" */
#endif
-#endif /*__RPIPERIPHERALINTERRUPT_H__*/
+#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
index e75a5394..854073f3 100644
--- a/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralTiming.h
+++ b/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralTiming.h
@@ -5,7 +5,7 @@
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, Jorawar Singh
+ Author: Siddhesh Wani
Organization: FOSSEE, IIT Bombay
Email: toolbox@scilab.in
*/
@@ -22,10 +22,10 @@ extern "C" {
#include "types.h"
#include "wiringPi.h"
-void u32RPI_delays(uint32 time);
-void u32RPI_delayMicros(uint32 time);
-uint32 RPI_millis();
-uint32 RPI_micros();
+void u16RPIDelayMillis(uint16 time);
+void u16RPIDelayMicros(uint16 time);
+uint32 u32RPIGetMillis();
+uint32 u32RPIGetMicros();
#ifdef __cplusplus
} /* extern "C" */
diff --git a/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralDigital.h b/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralDigital.h
index 096fed08..40a8e1a4 100644
--- a/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralDigital.h
+++ b/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralDigital.h
@@ -5,7 +5,7 @@
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, Jorawar Singh
+ Author: Siddhesh Wani
Organization: FOSSEE, IIT Bombay
Email: toolbox@scilab.in
*/
@@ -20,17 +20,14 @@
extern "C" {
#endif
-#define u80RPI_digitalReadu80(pin) u8RPI_digitalReads(pin);
-#define d0RPI_digitalReadd0(pin) u8RPI_digitalReads(pin);
+#define RPI_DigitalSetup(in1,in2) u8RPIDigitalSetups((uint8) in1, (uint8) in2);
-#define RPI_digitalReadByteu80() RPI_digitalReadByte();
-#define u80u80RPI_digitalWrite(pin,state) u8RPI_digitalWrites(pin,state);
-#define d0d0RPI_digitalWrite(pin,state) u8RPI_digitalWrites(pin,state);
+#define RPI_DigitalIn(in1) u8RPIDigitalIns((uint8) in1);
-#define u80RPI_digitalWriteByte(value) u8RPI_digitalWriteBytes(value);
+#define RPI_DigitalOut(in1,in2) u8RPIDigitalOuts((uint8) in1, (uint8) in2);
#ifdef __cplusplus
} /* extern "C" */
#endif
-#endif /* !__INT_RPIPERIPHERALGPIO_H__ */
+#endif /* !__RPIPERIPHERALGPIO_H__ */
diff --git a/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralGertboard.h b/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralGertboard.h
deleted file mode 100644
index cea8bb6e..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralGertboard.h
+++ /dev/null
@@ -1,32 +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, Jorawar Singh
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#ifndef __INT_RPIPERIPHERALGERTBOARD_H__
-#define __INT_RPIPERIPHERALGERTBOARD_H__
-
-#include "types.h"
-#include "RPIPeripheralGertboard.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define RPI_gertboardSPISetupi80() RPI_gertboardSPISetup();
-#define u160RPI_gertboardAnalogSetupi80(pinBase) u16RPI_gertboardAnalogSetups(pinBase);
-#define u160RPI_gertboardAnalogReadu160(pin) u160RPI_gertboardAnalogReads(pin);
-#define u160u160RPI_gertboardAnalogWrite(pin,value) u160RPI_gertboardAnalogWrites(pin,value);
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /* !__INT_RPIPERIPHERALGERTBOARD_H__ */
diff --git a/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralI2C.h b/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralI2C.h
deleted file mode 100644
index f18fd57c..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralI2C.h
+++ /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: Jorawar Singh, Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#ifndef __INT_RPIPERIPHERALI2C_H__
-#define __INT_RPIPERIPHERALI2C_H__
-
-#include "types.h"
-#include "RPIPeripheralI2C.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define u160RPI_I2CSetupi80(arrd) u16RPI_I2CSetups(arrd);
-#define u160RPI_I2CReadi80(fd) u16RPI_I2CReads(fd);
-#define u160u160RPI_I2CReadReg8i80(fd,reg) u16RPI_I2CReadReg8s(fd,reg);
-#define u160u160RPI_I2CReadReg16i80(fd,reg) u16RPI_I2CReadReg16s(fd,reg);
-#define u160u160RPI_I2CWritei80(fd,data) u16RPI_I2CWrites(fd,data);
-#define u160u160u160RPI_I2CWriteReg8i80(fd,reg,data) u16RPI_I2CWriteReg8s(fd,reg,data);
-#define u160u160u160RPI_I2CWriteReg16i80(fd,reg,data) u16RPI_I2CWriteReg16s(fd,reg,data);
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /* !__INT_RPIPERIPHERALI2C_H__ */
diff --git a/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralInterrupt.h b/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralInterrupt.h
deleted file mode 100644
index 572d028d..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralInterrupt.h
+++ /dev/null
@@ -1,30 +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: Jorawar Singh, Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#ifndef __INT_RPIPERIPHERALINTERRUPT_H__
-#define __INT_RPIPERIPHERALINTERRUPT_H__
-
-#include "types.h"
-#include "RPIPeripheralInterrupt.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define u80i160RPI_waitForInterrupti80(pin,time) u8RPI_waitForInterrupts(pin,time);
-#define d0d0RPI_waitForInterrupti80(pin,time) u8RPI_waitForInterrupts(pin,time);
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /* !__INT_RPIPERIPHERALINTERRUPT_H__ */
diff --git a/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralLCD.h b/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralLCD.h
deleted file mode 100644
index e4f3ca29..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralLCD.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/* Copyright (C) 2017 - 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
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#ifndef __INT_RPIPERIPHERALLCD_H__
-#define __INT_RPIPERIPHERALLCD_H__
-
-#include "types.h"
-#include "RPIPeripheralLCD.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define u80u80u80u80u80u80u80u80u80u80RPI_lcdCharDef(fd,index,d0,d1,d2,d3,d4,d5,d6,d7) u8RPI_lcdCharDefs(fd,index,d0,d1,d2,d3,d4,d5,d6,d7);
-#define u80RPI_lcdClear(fd) u8RPI_lcdClears(fd);
-#define u80u80RPI_lcdCursorBlink(fd,state) u8RPI_lcdCursorBlinks(fd,state);
-#define u80u80RPI_lcdCursor(fd,state) u8RPI_lcdCursors(fd,state);
-#define u80u80RPI_lcdDisplay(fd,state) u8RPI_lcdDisplays(fd,state);
-#define u80RPI_lcdHome(fd) u8RPI_lcdHomes(fd);
-#define u80u80u80u80u80u80u80u80u80u80u80u80u80RPI_lcdIniti80(rows,cols,bits,rs,strb,d0,d1,d2,d3,d4,d5,d6,d7) u8RPI_lcdInits(rows,cols,bits,rs,strb,d0,d1,d2,d3,d4,d5,d6,d7);
-#define u80u80u80RPI_lcdPosition(fd,row,col) u8RPI_lcdPositions(fd,row,col);
-#define u80u80RPI_lcdPutchar(fd,char) u8RPI_lcdPutchars(fd,char);
-#define u80u80RPI_lcdSendCommand(fd,cmd) u8RPI_lcdSendCommands(fd,cmd);
-#define u80g2RPI_lcdPuts(fd,msg,size) u8RPI_lcdPutss(fd,msg,size[1]);;
-#define u80g2RPI_lcdPrintf(fd,data,size) u8RPI_lcdPrintfs(fd,data,size[1]);
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /* !__INT_RPIPERIPHERALLCD_H__ */
diff --git a/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralLCD128x64.h b/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralLCD128x64.h
deleted file mode 100644
index 46b63286..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralLCD128x64.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* Copyright (C) 2017 - 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
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#ifndef __INT_RPIPERIPHERALLCD128x64_H__
-#define __INT_RPIPERIPHERALLCD128x64_H__
-
-#include "types.h"
-#include "RPIPeripheralLCD128x64.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define RPI_lcd128x64setupi80() RPI_lcd128x64setup();
-
-#define u80RPI_lcd128x64clear(colour) u8RPI_lcd128x64clears(colour);
-#define d0RPI_lcd128x64clear(colour) u8RPI_lcd128x64clears(colour);
-
-#define u80RPI_lcd128x64Orientation(orientation) u8RPI_lcd128x64Orientations(orientation);
-#define d0RPI_lcd128x64Orientation(orientation) u8RPI_lcd128x64Orientations(orientation);
-
-#define u80u80RPI_lcd128x64setOrigin(x,y) u8RPI_lcd128x64setOrigins(x,y);
-#define d0d0RPI_lcd128x64setOrigin(x,y) u8RPI_lcd128x64setOrigins(x,y);
-
-#define u80u80u80RPI_lcd128x64point(x,y,colour) u8RPI_lcd128x64points(x,y,colour);
-#define d0d0d0RPI_lcd128x64point(x,y,colour) u8RPI_lcd128x64points(x,y,colour);
-#define u80u80u80RPI_lcd128x64lineTo(x,y,colour) u8RPI_lcd128x64lineTos(x,y,colour);
-#define d0d0d0RPI_lcd128x64lineTo(x,y,colour) u8RPI_lcd128x64lineTos(x,y,colour);
-
-#define u80u80u80u80u80RPI_lcd128x64line(x0,y0,x1,y1,colour) u8RPI_lcd128x64lines(x0,y0,x1,y1,colour);
-#define d0d0d0d0d0RPI_lcd128x64line(x0,y0,x1,y1,colour) u8RPI_lcd128x64lines(x0,y0,x1,y1,colour);
-#define u80u80u80u80u80RPI_lcd128x64circle(x,y,r,colour,filled) u8RPI_lcd128x64circles(x,y,r,colour,filled);
-#define d0d0d0d0d0RPI_lcd128x64circle(x,y,r,colour,filled) u8RPI_lcd128x64circles(x,y,r,colour,filled);
-#define u80u80u80u80u80RPI_lcd128x64putchar(x,y,c,bgCol,fgCol) u8RPI_lcd128x64putchars(x,y,c,bgCol,fgCol);
-#define d0d0d0d0u80RPI_lcd128x64putchar(x,y,c,bgCol,fgCol) u8RPI_lcd128x64putchars(x,y,c,bgCol,fgCol);
-
-#define u80u80g2u80u80RPI_lcd128x64puts(x,y,str,size,bgCol,fgCol) u8RPI_lcd128x64putss(x,y,str,size[1],bgCol,fgCol);
-#define d0d0g2d0d0RPI_lcd128x64puts(x,y,str,size,bgCol,fgCol) u8RPI_lcd128x64putss(x,y,str,size[1],bgCol,fgCol);
-
-#define u80u80u80u80u80u80RPI_lcd128x64rectangle(x1,y1,x2,y2,colour,filled) u8RPI_lcd128x64rectangles(x1,y1,x2,y2,colour,filled);
-#define d0d0d0d0d0d0RPI_lcd128x64rectangle(x1,y1,x2,y2,colour,filled) u8RPI_lcd128x64rectangles(x1,y1,x2,y2,colour,filled);
-#define u80u80u80u80u80u80RPI_lcd128x64ellipse(cx,cy,xRadius,yRadius,colour,filled) u8RPI_lcd128x64ellipses(cx,cy,xRadius,yRadius,colour,filled);
-#define d0d0d0d0d0d0RPI_lcd128x64ellipse(cx,cy,xRadius,yRadius,colour,filled) u8RPI_lcd128x64ellipses(cx,cy,xRadius,yRadius,colour,filled);
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /* !__INT_RPIPERIPHERALLCD128x64_H__ */
diff --git a/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralMcp.h b/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralMcp.h
deleted file mode 100644
index c044cf7f..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralMcp.h
+++ /dev/null
@@ -1,33 +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: Jorawar Singh, Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#ifndef __INT_RPIPERIPHERALMCP_H__
-#define __INT_RPIPERIPHERALMCP_H__
-
-#include "types.h"
-#include "RPIPeripheralMcp.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define u160u80RPI_mcp23008Setupu80(pinBase,addr) u16RPI_mcp23008Setups(pinBase,addr);
-#define u160u80RPI_mcp23016Setupu80(pinBase,addr) u16RPI_mcp23016Setups(pinBase,addr);
-#define u160u80RPI_mcp23017Setupu80(pinBase,addr) u16RPI_mcp23017Setups(pinBase,addr);
-#define u160u80u80RPI_mcp23s08Setupu80(pinBase,spiport,devId) u16RPI_mcp23s08Setups(pinBase,spiport,devId);
-#define u160u80u80RPI_mcp23s17Setupu80(pinBase,spiport,devId) u16RPI_mcp23s17Setups(pinBase,spiport,devId);
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /* !__INT_RPIPERIPHERALMCP_H__ */
diff --git a/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralMisc.h b/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralMisc.h
deleted file mode 100644
index b836d683..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralMisc.h
+++ /dev/null
@@ -1,31 +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: Jorawar Singh, Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#ifndef __INT_RPIPERIPHERALMISC_H__
-#define __INT_RPIPERIPHERALMISC_H__
-
-#include "types.h"
-#include "RPIPeripheralMisc.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define RPI_boardRevu80() RPI_boardRev();
-#define u80u80RPI_padDrive(group,strength) u8RPI_padDrives(group,strength);
-#define u160RPI_sn3218Setupi80(pinBase) u16RPI_sn3218Setups(pinBase);
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /* !__INT_RPIPERIPHERALMISC_H__ */
diff --git a/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPWM.h b/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPWM.h
index 49c58c04..8c8f4c62 100644
--- a/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPWM.h
+++ b/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPWM.h
@@ -1,33 +1,30 @@
-/* Copyright (C) 2016 - IIT Bombay - FOSSEE
+ /* 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
+ Author: Siddhesh Wani
Organization: FOSSEE, IIT Bombay
Email: toolbox@scilab.in
-*/
-
+ */
#ifndef __INT_RPIPERIPHERALPWM_H__
#define __INT_RPIPERIPHERALPWM_H__
#include "types.h"
-#include "RPIPeripheralPWM.h"
#ifdef __cplusplus
extern "C" {
#endif
-#define u80u160RPI_pwmWrite(pin,value) u8RPI_pwmWrites(pin,value);
-#define u320RPI_pwmRange(value) u32RPI_pwmRanges(value);
-#define g2RPI_pwmMode(mode) gRPI_pwmModea(mode);
-#define u160RPI_pwmClock(divisor) u16RPI_pwmClocks(divisor);
-#define u80u160RPI_pwmToneWrite(pin,value) u8RPI_pwmToneWrites(pin,value);
+#define RPI_HardPWMWrite(pin,value) u8RPIHardPWMWrites((uint8)pin,(uint16)value)
+#define RPI_HardPWMSetRange(value) u8RPIHardPWMSetRanges((uint16)value)
+#define RPI_HardPWMSetMode(mode) u8RPIHardPWMSetModes((uint8)mode)
+#define RPI_HardPWMSetClock(clk_divisor) u8RPIHardPWMSetClocks((uint16)clk_divisor)
#ifdef __cplusplus
} /* extern "C" */
#endif
-#endif /* !__INT_RPIPERIPHERALPWM_H__ */
+#endif /*__INT_RPIPERIPHERALPWM_H__*/
diff --git a/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPcf.h b/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPcf.h
deleted file mode 100644
index e3d2009d..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPcf.h
+++ /dev/null
@@ -1,30 +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: Jorawar Singh, Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#ifndef __INT_RPIPERIPHERALPCF_H__
-#define __INT_RPIPERIPHERALPCF_H__
-
-#include "types.h"
-#include "RPIPeripheralPcf.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define u160u80RPI_pcf8574Setupu80(pinBase,addr) u16RPI_pcf8574Setups(pinBase,addr);
-#define u160u80RPI_pcf8591Setupu80(pinBase,addr) u16RPI_pcf8591Setups(pinBase,addr);
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /* !__INT_RPIPERIPHERALPCF_H__ */
diff --git a/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPiGlow.h b/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPiGlow.h
deleted file mode 100644
index 08056f94..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPiGlow.h
+++ /dev/null
@@ -1,32 +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: Jorawar Singh, Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#ifndef __INT_RPIPERIPHERALPIGLOW_H__
-#define __INT_RPIPERIPHERALPIGLOW_H__
-
-#include "types.h"
-#include "RPIPeripheralPiGlow.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define u80RPI_piGlowSetup(clear) u8RPI_piGlowSetups(clear);
-#define u80u80u80RPI_piGlow1(leg,ring,intensity) u8RPI_piGlow1s(leg,ring,intensity);
-#define u80u80RPI_piGlowLeg(leg,intensity) u8RPI_piGlowLegs(leg,intensity);
-#define u80u80RPI_piGlowRing(ring,intensity) u8RPI_piGlowRings(ring,intensity);
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /* !__INT_RPIPERIPHERALPIGLOW_H__ */
diff --git a/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralPcf.h b/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPinISR.h
index 55459332..b2c1ed16 100644
--- a/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralPcf.h
+++ b/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPinISR.h
@@ -5,26 +5,21 @@
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, Jorawar Singh
+ Author: Siddhesh Wani
Organization: FOSSEE, IIT Bombay
Email: toolbox@scilab.in
*/
-#ifndef __RPIPERIPHERALPCF_H__
-#define __RPIPERIPHERALPCF_H__
+#ifndef __INT_RPIPERIPHERALPINISR_H__
+#define __INT_RPIPERIPHERALPINISR_H__
#ifdef __cplusplus
extern "C" {
#endif
-#include "types.h"
-#include "pcf8574.h"
-#include "pcf8591.h"
+#define RPI_PinISR(pin,edge,funname) i16RPIPinISRs((uint8)pin,(uint8)edge,funname)
-uint8 u16RPI_pcf8574Setups(uint16 pinBase,uint8 addr);
-uint8 u16RPI_pcf8591Setups(uint16 pinBase,uint8 addr);
-
-#ifdef __cplusplus
+#ifdef __cplusplus
} /* extern "C" */
#endif
-#endif /*__RPIPERIPHERALPCF_H__*/
+#endif /*__INT_RPIPERIPHERALPINISR_H__*/
diff --git a/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPinMap.h b/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPinMap.h
deleted file mode 100644
index 39c5c011..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPinMap.h
+++ /dev/null
@@ -1,30 +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: Jorawar Singh, Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#ifndef __INT_RPIPERIPHERALPINMAP_H__
-#define __INT_RPIPERIPHERALPINMAP_H__
-
-#include "types.h"
-#include "RPIPeripheralPinMap.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define u80RPI_physToGpioi80(pin) u8RPI_physToGpios(pin);
-#define u80RPI_wpiToGpioi80(pin) u8RPI_wpiToGpios(pin);
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /* !__INT_RPIPERIPHERALPINMAP_H__ */
diff --git a/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralSerial.h b/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralSerial.h
index e0832f97..5d53b98b 100644
--- a/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralSerial.h
+++ b/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralSerial.h
@@ -1,36 +1,47 @@
-/* Copyright (C) 2016 - IIT Bombay - FOSSEE
+ /* 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
+ Author: Siddhesh Wani
Organization: FOSSEE, IIT Bombay
Email: toolbox@scilab.in
-*/
-
+ */
#ifndef __INT_RPIPERIPHERALSERIAL_H__
#define __INT_RPIPERIPHERALSERIAL_H__
#include "types.h"
-#include "RPIPeripheralSerial.h"
#ifdef __cplusplus
extern "C" {
#endif
-#define g2u320RPI_serialOpeni80(device,size,baud) gRPI_serialOpena(device,size[1],baud);
-#define u80RPI_serialClose(fd) u8RPI_serialCloses(fd);
-#define u80RPI_serialDataAvailu80(fd) u8RPI_serialDataAvails(fd);
-#define u80RPI_serialFlush(fd) u8RPI_serialFlushs(fd);
-#define u80RPI_serialGetcharg2(fd,out) u8RPI_serialGetchars(fd,out);
-#define u80g2RPI_serialPrintf(fd,msg,size) u8RPI_serialPrintfs(fd,msg,size[1]);
-#define u80u80RPI_serialPutchar(fd,character) u8RPI_serialPutchars(fd,character);
-#define u80g2RPI_serialPutsg2(fd,character,size) u8RPI_serialPutss(fd,character,size[1]);
+#define RPI_SerialSetup(port,size,baudrate) u16RPISerialSetups(port,baudrate)
+#define RPI_SerialClose(fd) u8RPISerialCloses(fd)
+
+#define u80u80RPI_SerialSendData(fd,data) u8RPISerialSendDatas(fd,data)
+#define u80i80RPI_SerialSendData(fd,data) i8RPISerialSendDatas(fd,data)
+#define u80u160RPI_SerialSendData(fd,data) u16RPISerialSendDatas(fd,data)
+#define u80i160RPI_SerialSendData(fd,data) i16RPISerialSendDatas(fd,data)
+#define u80s0RPI_SerialSendData(fd,data) sRPISerialSendDatas(fd,data)
+#define u80d0RPI_SerialSendData(fd,data) dRPISerialSendDatas(fd,data)
+
+#define u80u82RPI_SerialSendData(fd,data,size) u8RPISerialSendDataa(fd,data,size[0]*size[1]);
+#define u80i82RPI_SerialSendData(fd,data,size) i8RPISerialSendDataa(fd,data,size[0]*size[1]);
+#define u80u162RPI_SerialSendData(fd,data,size) u16RPISerialSendDataa(fd,data,size[0]*size[1]);
+#define u80i162RPI_SerialSendData(fd,data,size) i16RPISerialSendDataa(fd,data,size[0]*size[1]);
+#define u80s2RPI_SerialSendData(fd,data,size) sRPISerialSendDataa(fd,data,size[0]*size[1]);
+#define u80d2RPI_SerialSendData(fd,data,size) dRPISerialSendDataa(fd,data,size[0]*size[1]);
+#define u80g2RPI_SerialSendData(fd,data,size) gRPISerialSendDatas(fd,data,size[0]*size[1]);
+
+#define RPI_SerialDataAvail(fd) i16RPISerialDataAvails(fd)
+#define RPI_SerialGetChar(fd) i16RPISerialGetChars(fd)
+#define RPI_SerialFlush(fd) u8RPISerialFlushs(fd)
#ifdef __cplusplus
} /* extern "C" */
#endif
-#endif /* !__INT_RPIPERIPHERALSERIAL_H__ */
+#endif /*__INT_RPIPERIPHERALSERIAL_H__*/
diff --git a/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralSetup.h b/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralSetup.h
deleted file mode 100644
index bd82702d..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralSetup.h
+++ /dev/null
@@ -1,47 +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: Jorawar Singh, Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#ifndef __INT_RPIPERIPHERALSETUP_H__
-#define __INT_RPIPERIPHERALSETUP_H__
-
-#include "RPIPeripheralSetup.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-//pinNumbering
-#define g2RPI_pinNumberingi80(seq,size) gRPI_pinNumberinga(seq,size[1]);
-//getAlt
-#define u80RPI_getAltu80(pin) u8RPI_getAlts(pin);
-#define u160RPI_getAltu80(pin) u8RPI_getAlts(pin);
-#define u320RPI_getAltu80(pin) u8RPI_getAlts(pin);
-#define d0RPI_getAltu80(pin) u8RPI_getAlts(pin);
-//pinModeAlt
-#define u80u80RPI_pinModeAlt(pin,mode) u8RPI_pinModeAlts(pin,mode);
-#define u160u160RPI_pinModeAlt(pin,mode) u8RPI_pinModeAlts(pin,mode);
-#define u320u320RPI_pinModeAlt(pin,mode) u8RPI_pinModeAlts(pin,mode);
-#define d0d0RPI_pinModeAlt(pin,mode) u8RPI_pinModeAlts(pin,mode);
-//pinMode
-#define u80g2RPI_pinMode(pin,mode,size) u8RPI_pinModes(pin,mode,size[1]);
-#define u160g2RPI_pinMode(pin,mode,size) u8RPI_pinModes(pin,mode,size[1]);
-#define u320g2RPI_pinMode(pin,mode,size) u8RPI_pinModes(pin,mode,size[1]);
-#define d0g2RPI_pinMode(pin,mode,size) u8RPI_pinModes(pin,mode,size[1]);
-//pullControl
-#define u80g2RPI_pullControl(pin,mode,size) u8RPI_pullControls(pin,mode,size[1]);
-#define d0g2RPI_pullControl(pin,mode,size) u8RPI_pullControls(pin,mode,size[1]);
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /* !__INT_RPIPERIPHERALSETUP_H__ */
diff --git a/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralShift.h b/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralShift.h
deleted file mode 100644
index 6b142bd5..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralShift.h
+++ /dev/null
@@ -1,31 +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: Jorawar Singh, Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#ifndef __INT_RPIPERIPHERALSHIFT_H__
-#define __INT_RPIPERIPHERALSHIFT_H__
-
-#include "types.h"
-#include "RPIPeripheralShift.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define u80u80u80RPI_shiftInu80(dpin,cpin,order) u8RPI_shiftIns(dpin,cpin,order);
-#define u80u80u80u80RPI_shiftOut(dpin,cpin,order,val) u8RPI_shiftOuts(dpin,cpin,order,val);
-#define u160u80u80u80u80RPI_sr595Setupi80(pinBase,nPins,dP,cP,lP) u16RPI_sr595Setups(pinBase,nPins,dP,cP,lP);
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /* !__INT_RPIPERIPHERALSHIFT_H__ */
diff --git a/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralSoft.h b/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralSoft.h
deleted file mode 100644
index 80372b26..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralSoft.h
+++ /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: Jorawar Singh, Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#ifndef __INT_RPIPERIPHERALSOFT_H__
-#define __INT_RPIPERIPHERALSOFT_H__
-
-#include "types.h"
-#include "RPIPeripheralSoft.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define u80u160u160RPI_softPwmCreateu80(pin,ival,range) u8RPI_softPwmCreates(pin,ival,range);
-#define u80RPI_softPwmStop(pin) u8RPI_softPwmStops(pin);
-#define u80u160RPI_softPwmWrite(pin,value) u8RPI_softPwmWrites(pin,value);
-#define u80RPI_softToneCreateu80(pin) u8RPI_softToneCreates(pin);
-#define u80RPI_softToneStop(pin) u8RPI_softToneStops(pin);
-#define u80u320RPI_softToneWrite(pin,value) u8RPI_softToneWrites(pin,value);
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /* !__INT_RPIPERIPHERALSOFT_H__ */
diff --git a/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralMisc.h b/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralThreading.h
index 0ef5acc1..68ed6e0e 100644
--- a/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralMisc.h
+++ b/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralThreading.h
@@ -1,31 +1,25 @@
-/* Copyright (C) 2016 - IIT Bombay - FOSSEE
+ /* 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, Jorawar Singh
+ Author: Siddhesh Wani
Organization: FOSSEE, IIT Bombay
Email: toolbox@scilab.in
-*/
-
-#ifndef __RPIPERIPHERALMISC_H__
-#define __RPIPERIPHERALMISC_H__
+ */
+#ifndef __INT_RPIPERIPHERALTHREADING_H__
+#define __INT_RPIPERIPHERALTHREADING_H__
#ifdef __cplusplus
extern "C" {
#endif
-#include "types.h"
-#include "sn3218.h"
-
-uint8 RPI_boardRev();
-void u8RPI_padDrives(uint8 group,uint8 strength);
-int8 u16RPI_sn3218Setups(uint16 pinBase);
+#define RPI_ThreadCreate(fn) RPIThreadCreate(fn);
#ifdef __cplusplus
} /* extern "C" */
#endif
-#endif /*__RPIPERIPHERALMISC_H__*/
+#endif /*__INT_RPIPERIPHERALTHREADING_H__*/
diff --git a/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralTiming.h b/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralTiming.h
index d2fae234..1a704655 100644
--- a/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralTiming.h
+++ b/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralTiming.h
@@ -5,11 +5,12 @@
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
+ Author: Siddhesh Wani
Organization: FOSSEE, IIT Bombay
Email: toolbox@scilab.in
*/
+
#ifndef __INT_RPIPERIPHERALTIMING_H__
#define __INT_RPIPERIPHERALTIMING_H__
@@ -20,15 +21,14 @@
extern "C" {
#endif
-#define u320RPI_delay(time) u32RPI_delays(time);
-#define d0RPI_delay(time) u32RPI_delays(time);
+#define RPI_DelayMicro(in1) u16RPIDelayMicros((uint16) in1)
+#define RPI_DelayMilli(in1) u16RPIDelayMillis((uint16) in1)
+#define RPI_GetMicro() u32RPIGetMicros()
+#define RPI_GetMillis() u32RPIGetMillis()
-#define u320RPI_delayMicro(time) u32RPI_delayMicros(time);
-#define RPI_millisu320() RPI_millis();
-#define RPI_microsu320() RPI_micros();
#ifdef __cplusplus
} /* extern "C" */
#endif
-#endif /* !__INT_RPIPERIPHERALTIMING_H__ */
+#endif /* !__RPIPERIPHERALTIMING_H__ */
diff --git a/2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdCharDefs.c b/2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdCharDefs.c
deleted file mode 100644
index b85d82fd..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdCharDefs.c
+++ /dev/null
@@ -1,18 +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: Jorawar Singh, Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#include "RPIPeripheralLCD.h"
-
-void u8RPI_lcdCharDefs(uint8 fd,uint8 index,uint8 d0,uint8 d1,uint8 d2,uint8 d3, uint8 d4,uint8 d5,uint8 d6,uint8 d7){
- uint8 data[8]={d0,d1,d2,d3,d4,d5,d6,d7};
- lcdCharDef(fd,index,data);
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdClears.c b/2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdClears.c
deleted file mode 100644
index 659cdf07..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdClears.c
+++ /dev/null
@@ -1,17 +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: Jorawar Singh, Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#include "RPIPeripheralLCD.h"
-
-void u8RPI_lcdClears(uint8 fd){
- lcdClear(fd);
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdCursorBlinks.c b/2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdCursorBlinks.c
deleted file mode 100644
index bf0c48e3..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdCursorBlinks.c
+++ /dev/null
@@ -1,17 +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: Jorawar Singh, Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#include "RPIPeripheralLCD.h"
-
-void u8RPI_lcdCursorBlinks(uint8 fd,uint8 state){
- lcdCursorBlink(fd,state);
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdCursors.c b/2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdCursors.c
deleted file mode 100644
index 8bb02715..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdCursors.c
+++ /dev/null
@@ -1,17 +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: Jorawar Singh, Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#include "RPIPeripheralLCD.h"
-
-void u8RPI_lcdCursors(uint8 fd,uint8 state){
- lcdCursor(fd,state);
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdDisplays.c b/2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdDisplays.c
deleted file mode 100644
index 7425ebe9..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdDisplays.c
+++ /dev/null
@@ -1,17 +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: Jorawar Singh, Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#include "RPIPeripheralLCD.h"
-
-void u8RPI_lcdDisplays(uint8 fd,uint8 state){
- lcdDisplay(fd,state);
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdHomes.c b/2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdHomes.c
deleted file mode 100644
index 98762de4..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdHomes.c
+++ /dev/null
@@ -1,17 +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: Jorawar Singh, Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#include "RPIPeripheralLCD.h"
-
-void u8RPI_lcdHomes(uint8 fd){
- lcdHome(fd);
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdInits.c b/2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdInits.c
deleted file mode 100644
index b69f311c..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdInits.c
+++ /dev/null
@@ -1,19 +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: Jorawar Singh, Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#include "RPIPeripheralLCD.h"
-
-int8 u8RPI_lcdInits(uint8 rows,uint8 cols,uint8 bits,uint8 rs,uint8 strb,uint8 d0,uint8 d1,uint8 d2,uint8 d3,uint8 d4,uint8 d5,uint8 d6,uint8 d7){
- uint8 fd;
- fd=lcdInit(rows,cols,bits,rs,strb,d0,d1,d2,d3,d4,d5,d6,d7);
- return (fd);
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdPositions.c b/2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdPositions.c
deleted file mode 100644
index 3188a972..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdPositions.c
+++ /dev/null
@@ -1,17 +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: Jorawar Singh, Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#include "RPIPeripheralLCD.h"
-
-void u8RPI_lcdPositions(uint8 fd,uint8 row,uint8 col){
- lcdPosition(fd,row,col);
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdPrintfs.c b/2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdPrintfs.c
deleted file mode 100644
index 58d01fa8..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdPrintfs.c
+++ /dev/null
@@ -1,17 +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: Jorawar Singh, Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#include "RPIPeripheralLCD.h"
-
-void u8RPI_lcdPrintfs(uint8 fd,char* data,int size){
- lcdPrintf(fd,data);
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdPutchars.c b/2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdPutchars.c
deleted file mode 100644
index c50a177b..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdPutchars.c
+++ /dev/null
@@ -1,17 +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: Jorawar Singh, Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#include "RPIPeripheralLCD.h"
-
-void u8RPI_lcdPutchars(uint8 fd,uint8 character){
- lcdPutchar(fd,character);
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdPutss.c b/2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdPutss.c
deleted file mode 100644
index a7f492ba..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdPutss.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/* Copyright (C) 2017 - 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 "RPIPeripheralLCD.h"
-
-void u8RPI_lcdPutss(uint8 fd,char* msg,int size){
- lcdPuts(fd,msg);
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdSendCommands.c b/2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdSendCommands.c
deleted file mode 100644
index 7097d696..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdSendCommands.c
+++ /dev/null
@@ -1,17 +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: Jorawar Singh, Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#include "RPIPeripheralLCD.h"
-
-void u8RPI_lcdSendCommands(uint8 fd,uint8 cmd){
- lcdSendCommand(fd,cmd);
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/lcd128x64/RPI_lcd128x64Orientation.c b/2.3-1/src/c/hardware/rasberrypi/lcd128x64/RPI_lcd128x64Orientation.c
deleted file mode 100644
index 52391029..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/lcd128x64/RPI_lcd128x64Orientation.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/* Copyright (C) 2017 - 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
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#include "RPIPeripheralLCD128x64.h"
-
-void u8RPI_lcd128x64Orientations(uint8 orientation){
- lcd128x64setOrientation(orientation);
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/lcd128x64/RPI_lcd128x64circle.c b/2.3-1/src/c/hardware/rasberrypi/lcd128x64/RPI_lcd128x64circle.c
deleted file mode 100644
index 9019d8f4..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/lcd128x64/RPI_lcd128x64circle.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/* Copyright (C) 2017 - 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
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#include "RPIPeripheralLCD128x64.h"
-
-void u8RPI_lcd128x64circles(uint8 x,uint8 y,uint8 r,uint8 colour,uint8 filled){
- lcd128x64circle(x,y,r,colour,filled);
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/lcd128x64/RPI_lcd128x64clear.c b/2.3-1/src/c/hardware/rasberrypi/lcd128x64/RPI_lcd128x64clear.c
deleted file mode 100644
index a83cef25..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/lcd128x64/RPI_lcd128x64clear.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/* Copyright (C) 2017 - 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
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#include "RPIPeripheralLCD128x64.h"
-
-void u8RPI_lcd128x64clears(uint8 colour){
- lcd128x64clear(colour);
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/lcd128x64/RPI_lcd128x64ellipse.c b/2.3-1/src/c/hardware/rasberrypi/lcd128x64/RPI_lcd128x64ellipse.c
deleted file mode 100644
index d2e2f542..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/lcd128x64/RPI_lcd128x64ellipse.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/* Copyright (C) 2017 - 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
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#include "RPIPeripheralLCD128x64.h"
-
-void u8RPI_lcd128x64ellipses(uint8 cx, uint8 cy, uint8 xRadius, uint8 yRadius, uint8 colour, uint8 filled){
- lcd128x64ellipse(cx,cy,xRadius,yRadius,colour,filled);
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/lcd128x64/RPI_lcd128x64line.c b/2.3-1/src/c/hardware/rasberrypi/lcd128x64/RPI_lcd128x64line.c
deleted file mode 100644
index f5850808..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/lcd128x64/RPI_lcd128x64line.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/* Copyright (C) 2017 - 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
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#include "RPIPeripheralLCD128x64.h"
-
-void u8RPI_lcd128x64lines(uint8 x0, uint8 y0, uint8 x1, uint8 y1, uint8 colour){
- lcd128x64line(x0,y0,x1,y1,colour);
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/lcd128x64/RPI_lcd128x64lineTo.c b/2.3-1/src/c/hardware/rasberrypi/lcd128x64/RPI_lcd128x64lineTo.c
deleted file mode 100644
index 3f791f64..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/lcd128x64/RPI_lcd128x64lineTo.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/* Copyright (C) 2017 - 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
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#include "RPIPeripheralLCD128x64.h"
-
-void u8RPI_lcd128x64lineTos(uint8 x, uint8 y, uint8 colour){
- lcd128x64lineTo(x,y,colour);
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/lcd128x64/RPI_lcd128x64point.c b/2.3-1/src/c/hardware/rasberrypi/lcd128x64/RPI_lcd128x64point.c
deleted file mode 100644
index a23cdddc..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/lcd128x64/RPI_lcd128x64point.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/* Copyright (C) 2017 - 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
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#include "RPIPeripheralLCD128x64.h"
-
-void u8RPI_lcd128x64points(uint8 x,uint8 y,uint8 colour){
- lcd128x64point(x,y,colour);
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/lcd128x64/RPI_lcd128x64putchar.c b/2.3-1/src/c/hardware/rasberrypi/lcd128x64/RPI_lcd128x64putchar.c
deleted file mode 100644
index 2dadb448..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/lcd128x64/RPI_lcd128x64putchar.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/* Copyright (C) 2017 - 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
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#include "RPIPeripheralLCD128x64.h"
-
-void u8RPI_lcd128x64putchars(uint8 x, uint8 y, uint8 c, uint8 bgCol, uint8 fgCol){
- lcd128x64putchar(x,y,c,bgCol,fgCol);
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/lcd128x64/RPI_lcd128x64puts.c b/2.3-1/src/c/hardware/rasberrypi/lcd128x64/RPI_lcd128x64puts.c
deleted file mode 100644
index 15c54da3..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/lcd128x64/RPI_lcd128x64puts.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/* Copyright (C) 2017 - 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
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#include "RPIPeripheralLCD128x64.h"
-
-void u8RPI_lcd128x64putss(uint8 x, uint8 y, char* str,int size, uint8 bgCol, uint8 fgCol){
- lcd128x64puts(x,y,str,bgCol,fgCol);
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/lcd128x64/RPI_lcd128x64rectangle.c b/2.3-1/src/c/hardware/rasberrypi/lcd128x64/RPI_lcd128x64rectangle.c
deleted file mode 100644
index 78239d9f..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/lcd128x64/RPI_lcd128x64rectangle.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/* Copyright (C) 2017 - 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
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#include "RPIPeripheralLCD128x64.h"
-
-void u8RPI_lcd128x64rectangles(uint8 x1,uint8 y1,uint8 x2,uint8 y2,uint8 colour,uint8 filled){
- lcd128x64rectangle(x1,y1,x2,y2,colour,filled);
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/lcd128x64/RPI_lcd128x64setOrigin.c b/2.3-1/src/c/hardware/rasberrypi/lcd128x64/RPI_lcd128x64setOrigin.c
deleted file mode 100644
index c4b19391..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/lcd128x64/RPI_lcd128x64setOrigin.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/* Copyright (C) 2017 - 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
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#include "RPIPeripheralLCD128x64.h"
-
-void u8RPI_lcd128x64setOrigins(uint8 x,uint8 y){
- lcd128x64setOrigin(x,y);
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/lcd128x64/RPI_lcd128x64setup.c b/2.3-1/src/c/hardware/rasberrypi/lcd128x64/RPI_lcd128x64setup.c
deleted file mode 100644
index 8f6e6b6f..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/lcd128x64/RPI_lcd128x64setup.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright (C) 2017 - 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
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#include "RPIPeripheralLCD128x64.h"
-
-int8 RPI_lcd128x64setup(){
- int8 out;
- out=lcd128x64setup();
- return (out);
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/mcp/u16RPI_mcp23008Setups.c b/2.3-1/src/c/hardware/rasberrypi/mcp/u16RPI_mcp23008Setups.c
deleted file mode 100644
index c7d73268..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/mcp/u16RPI_mcp23008Setups.c
+++ /dev/null
@@ -1,19 +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: Jorawar Singh, Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#include "RPIPeripheralMcp.h"
-
-uint8 u16RPI_mcp23008Setups(uint16 pinBase,uint8 addr){
- uint8 out;
- out=mcp23008Setup(pinBase,addr);
- return (out);
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/mcp/u16RPI_mcp23016Setups.c b/2.3-1/src/c/hardware/rasberrypi/mcp/u16RPI_mcp23016Setups.c
deleted file mode 100644
index 2e35e5c2..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/mcp/u16RPI_mcp23016Setups.c
+++ /dev/null
@@ -1,19 +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: Jorawar Singh, Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#include "RPIPeripheralMcp.h"
-
-uint8 u16RPI_mcp23016Setups(uint16 pinBase,uint8 addr){
- uint8 out;
- out=mcp23016Setup(pinBase,addr);
- return (out);
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/mcp/u16RPI_mcp23017Setups.c b/2.3-1/src/c/hardware/rasberrypi/mcp/u16RPI_mcp23017Setups.c
deleted file mode 100644
index 35ed5477..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/mcp/u16RPI_mcp23017Setups.c
+++ /dev/null
@@ -1,19 +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: Jorawar Singh, Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#include "RPIPeripheralMcp.h"
-
-uint8 u16RPI_mcp23017Setups(uint16 pinBase,uint8 addr){
- uint8 out;
- out=mcp23017Setup(pinBase,addr);
- return (out);
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/mcp/u16RPI_mcp23s08Setups.c b/2.3-1/src/c/hardware/rasberrypi/mcp/u16RPI_mcp23s08Setups.c
deleted file mode 100644
index e1bdab60..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/mcp/u16RPI_mcp23s08Setups.c
+++ /dev/null
@@ -1,19 +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: Jorawar Singh, Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#include "RPIPeripheralMcp.h"
-
-uint8 u16RPI_mcp23s08Setups(uint16 pinBase,uint8 spiport,uint8 devId){
- uint8 out;
- out=mcp23s08Setup(pinBase,spiport,devId);
- return (out);
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/mcp/u16RPI_mcp23s17Setups.c b/2.3-1/src/c/hardware/rasberrypi/mcp/u16RPI_mcp23s17Setups.c
deleted file mode 100644
index 5ba30d23..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/mcp/u16RPI_mcp23s17Setups.c
+++ /dev/null
@@ -1,19 +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: Jorawar Singh, Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#include "RPIPeripheralMcp.h"
-
-uint8 u16RPI_mcp23s17Setups(uint16 pinBase,uint8 spiport,uint8 devId){
- uint8 out;
- out=mcp23s17Setup(pinBase,spiport,devId);
- return (out);
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/pcf/u16RPI_pcf8574Setups.c b/2.3-1/src/c/hardware/rasberrypi/pcf/u16RPI_pcf8574Setups.c
deleted file mode 100644
index f7e38df0..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/pcf/u16RPI_pcf8574Setups.c
+++ /dev/null
@@ -1,19 +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: Jorawar Singh, Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#include "RPIPeripheralPcf.h"
-
-uint8 u16RPI_pcf8574Setups(uint16 pinBase,uint8 addr){
- uint8 out;
- out=pcf8574Setup(pinBase,addr);
- return (out);
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/pcf/u16RPI_pcf8591Setups.c b/2.3-1/src/c/hardware/rasberrypi/pcf/u16RPI_pcf8591Setups.c
deleted file mode 100644
index de26a926..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/pcf/u16RPI_pcf8591Setups.c
+++ /dev/null
@@ -1,19 +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: Jorawar Singh, Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#include "RPIPeripheralPcf.h"
-
-uint8 u16RPI_pcf8591Setups(uint16 pinBase,uint8 addr){
- uint8 out;
- out=pcf8591Setup(pinBase,addr);
- return (out);
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/piGlow/u8RPI_piGlow1s.c b/2.3-1/src/c/hardware/rasberrypi/piGlow/u8RPI_piGlow1s.c
deleted file mode 100644
index 792cda1c..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/piGlow/u8RPI_piGlow1s.c
+++ /dev/null
@@ -1,17 +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: Jorawar Singh, Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#include "RPIPeripheralPiGlow.h"
-
-void u8RPI_piGlow1s(uint8 leg,uint8 ring,uint8 intensity){
- piGlow1(leg,ring,intensity);
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/piGlow/u8RPI_piGlowLegs.c b/2.3-1/src/c/hardware/rasberrypi/piGlow/u8RPI_piGlowLegs.c
deleted file mode 100644
index f4ef5b50..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/piGlow/u8RPI_piGlowLegs.c
+++ /dev/null
@@ -1,17 +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: Jorawar Singh, Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#include "RPIPeripheralPiGlow.h"
-
-void u8RPI_piGlowLegs(uint8 leg,uint8 intensity){
- piGlowLeg(leg,intensity);
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/piGlow/u8RPI_piGlowRings.c b/2.3-1/src/c/hardware/rasberrypi/piGlow/u8RPI_piGlowRings.c
deleted file mode 100644
index 985696df..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/piGlow/u8RPI_piGlowRings.c
+++ /dev/null
@@ -1,17 +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: Jorawar Singh, Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#include "RPIPeripheralPiGlow.h"
-
-void u8RPI_piGlowRings(uint8 ring,uint8 intensity){
- piGlowRing(ring,intensity);
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/piGlow/u8RPI_piGlowSetups.c b/2.3-1/src/c/hardware/rasberrypi/piGlow/u8RPI_piGlowSetups.c
deleted file mode 100644
index 2037a9b5..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/piGlow/u8RPI_piGlowSetups.c
+++ /dev/null
@@ -1,17 +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: Jorawar Singh, Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#include "RPIPeripheralPiGlow.h"
-
-void u8RPI_piGlowSetups(uint8 clear){
- piGlowSetup(clear);
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/pinMap/u8RPI_physToGpios.c b/2.3-1/src/c/hardware/rasberrypi/pinMap/u8RPI_physToGpios.c
deleted file mode 100644
index 09a57132..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/pinMap/u8RPI_physToGpios.c
+++ /dev/null
@@ -1,19 +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: Jorawar Singh, Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#include "RPIPeripheralPinMap.h"
-
-int8 u8RPI_physToGpios(uint8 pin){
- int8 out;
- out=physPinToGpio(pin);
- return (pin);
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/pinMap/u8RPI_wpiToGpios.c b/2.3-1/src/c/hardware/rasberrypi/pinMap/u8RPI_wpiToGpios.c
deleted file mode 100644
index 5f65f34c..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/pinMap/u8RPI_wpiToGpios.c
+++ /dev/null
@@ -1,19 +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: Jorawar Singh, Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#include "RPIPeripheralPinMap.h"
-
-int8 u8RPI_wpiToGpios(uint8 pin){
- int8 out;
- out=wpiPinToGpio(pin);
- return (out);
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/pwm/u16RPI_pwmClocks.c b/2.3-1/src/c/hardware/rasberrypi/pwm/u8RPIHardPWMSetClocks.c
index 85e1fb2b..d06b135c 100644
--- a/2.3-1/src/c/hardware/rasberrypi/pwm/u16RPI_pwmClocks.c
+++ b/2.3-1/src/c/hardware/rasberrypi/pwm/u8RPIHardPWMSetClocks.c
@@ -5,19 +5,23 @@
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, Jorawar Singh
+ Author: Siddhesh Wani
Organization: FOSSEE, IIT Bombay
Email: toolbox@scilab.in
*/
-#include "RPIPeripheralPWM.h"
-
/*Function to set clock for pwm channel. Default clock is 19.2 MHz. 'clk_divisor'
along with range decides frequency for PWM
PWM frequency = 19.2 MHz / clk_divisor/ range
- Range for clk_divisor = 1-2048
-*/
+ Range for clk_divisor = 1-2048
+ */
+
+#include "types.h"
+#include "RPIPeripheralPWM.h"
-void u16RPI_pwmClocks(uint16 divisor){
- pwmSetClock(divisor);
+void u8RPIHardPWMSetClocks(uint16 clk_divisor)
+{
+ pwmSetClock(clk_divisor);
+
+
}
diff --git a/2.3-1/src/c/hardware/rasberrypi/pwm/gRPI_pwmModea.c b/2.3-1/src/c/hardware/rasberrypi/pwm/u8RPIHardPWMSetModes.c
index da67a15c..0cca7a70 100644
--- a/2.3-1/src/c/hardware/rasberrypi/pwm/gRPI_pwmModea.c
+++ b/2.3-1/src/c/hardware/rasberrypi/pwm/u8RPIHardPWMSetModes.c
@@ -5,21 +5,24 @@
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, Jorawar Singh
+ Author: Siddhesh Wani
Organization: FOSSEE, IIT Bombay
Email: toolbox@scilab.in
*/
-#include "RPIPeripheralPWM.h"
-
/*Function to set mode for PWM channel. Two modes are available
- "bal" --> balanced mode
- "ms" --> mark/space mode
+ 0 --> balanced mode
+ 1 --> mark/space mode
*/
-
-void gRPI_pwmModea(char* mode,int size){
- if (mode[0] == 'm') /*mark/space mode*/
- pwmSetMode(0);
- else if (mode[0] == 'b')
- pwmSetMode(1);
+
+#include "types.h"
+#include "RPIPeripheralPWM.h"
+
+void u8RPIHardPWMSetModes(uint8 mode)
+{
+ if (mode == 1) /*mark/space mode*/
+ pwmSetMode(PWM_MODE_MS);
+ else
+ pwmSetMode(PWM_MODE_BAL);
+
}
diff --git a/2.3-1/src/c/hardware/rasberrypi/pwm/u32RPI_pwmRanges.c b/2.3-1/src/c/hardware/rasberrypi/pwm/u8RPIHardPWMSetRanges.c
index 1fb22963..b2489f59 100644
--- a/2.3-1/src/c/hardware/rasberrypi/pwm/u32RPI_pwmRanges.c
+++ b/2.3-1/src/c/hardware/rasberrypi/pwm/u8RPIHardPWMSetRanges.c
@@ -5,18 +5,21 @@
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, Jorawar Singh
+ Author: Siddhesh Wani
Organization: FOSSEE, IIT Bombay
Email: toolbox@scilab.in
*/
-#include "RPIPeripheralPWM.h"
-
-/*Function to assign pwm duty to specified pin. PWM duty is decided by 'value'
+/*Function to assigne pwm duty to specified pin. PWM duty is decided by 'value'
and 'range' specified using corresponding function.
PWM duty = value/range
*/
-
-void u32RPI_pwmRanges(uint32 value){
- pwmSetRange(value);
-}
+
+#include "types.h"
+#include "RPIPeripheralPWM.h"
+
+void u8RPIHardPWMSetRanges(uint16 value)
+{
+ pwmSetRange(value);
+
+}
diff --git a/2.3-1/src/c/hardware/rasberrypi/Digital/u8RPI_digitalWriteBytes.c b/2.3-1/src/c/hardware/rasberrypi/pwm/u8RPIHardPWMWrites.c
index 6d0e4cdd..ae02bf0d 100644
--- a/2.3-1/src/c/hardware/rasberrypi/Digital/u8RPI_digitalWriteBytes.c
+++ b/2.3-1/src/c/hardware/rasberrypi/pwm/u8RPIHardPWMWrites.c
@@ -5,15 +5,22 @@
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
+ Author: Siddhesh Wani
Organization: FOSSEE, IIT Bombay
Email: toolbox@scilab.in
*/
+/*Function to set range for pwm channel. PWM duty is decided by 'range'
+ and 'value' specified using corresponding function.
+ PWM duty = value/range
+ */
+
+#include "types.h"
+#include "RPIPeripheralPWM.h"
#include "RPIPeripheralDigital.h"
-/* Function to change the output state of the first eight gpio pins */
-
-void u8RPI_digitalWriteBytes(uint8 value){
- digitalWriteByte(value);
-}
+void u8RPIHardPWMWrites(uint8 pin, uint16 value)
+{
+ pwmWrite((int)phy_pin[pin-1], value);
+
+}
diff --git a/2.3-1/src/c/hardware/rasberrypi/pwm/u8RPI_pwmToneWrites.c b/2.3-1/src/c/hardware/rasberrypi/pwm/u8RPI_pwmToneWrites.c
deleted file mode 100644
index fe1b8cd2..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/pwm/u8RPI_pwmToneWrites.c
+++ /dev/null
@@ -1,17 +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, Jorawar Singh
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#include "RPIPeripheralPWM.h"
-
-void u8RPI_pwmToneWrites(uint8 pin, uint16 value){
- pwmToneWrite(pin, value);
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/serial/dRPISerialSendDataa.c b/2.3-1/src/c/hardware/rasberrypi/serial/dRPISerialSendDataa.c
new file mode 100644
index 00000000..f9902550
--- /dev/null
+++ b/2.3-1/src/c/hardware/rasberrypi/serial/dRPISerialSendDataa.c
@@ -0,0 +1,27 @@
+/* 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/2.3-1/src/c/hardware/rasberrypi/serial/dRPISerialSendDatas.c b/2.3-1/src/c/hardware/rasberrypi/serial/dRPISerialSendDatas.c
new file mode 100644
index 00000000..39112fc2
--- /dev/null
+++ b/2.3-1/src/c/hardware/rasberrypi/serial/dRPISerialSendDatas.c
@@ -0,0 +1,35 @@
+/* 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/2.3-1/src/c/hardware/rasberrypi/serial/gRPISerialSendDatas.c b/2.3-1/src/c/hardware/rasberrypi/serial/gRPISerialSendDatas.c
new file mode 100644
index 00000000..f4ec8a85
--- /dev/null
+++ b/2.3-1/src/c/hardware/rasberrypi/serial/gRPISerialSendDatas.c
@@ -0,0 +1,27 @@
+/* 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/2.3-1/src/c/hardware/rasberrypi/serial/i16RPISerialDataAvails.c b/2.3-1/src/c/hardware/rasberrypi/serial/i16RPISerialDataAvails.c
new file mode 100644
index 00000000..b56a8196
--- /dev/null
+++ b/2.3-1/src/c/hardware/rasberrypi/serial/i16RPISerialDataAvails.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: 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/2.3-1/src/c/hardware/rasberrypi/serial/i16RPISerialGetChars.c b/2.3-1/src/c/hardware/rasberrypi/serial/i16RPISerialGetChars.c
new file mode 100644
index 00000000..18ca2a7a
--- /dev/null
+++ b/2.3-1/src/c/hardware/rasberrypi/serial/i16RPISerialGetChars.c
@@ -0,0 +1,27 @@
+/* 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/2.3-1/src/c/hardware/rasberrypi/serial/i16RPISerialSendDataa.c b/2.3-1/src/c/hardware/rasberrypi/serial/i16RPISerialSendDataa.c
new file mode 100644
index 00000000..24180f41
--- /dev/null
+++ b/2.3-1/src/c/hardware/rasberrypi/serial/i16RPISerialSendDataa.c
@@ -0,0 +1,27 @@
+/* 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/2.3-1/src/c/hardware/rasberrypi/serial/i16RPISerialSendDatas.c b/2.3-1/src/c/hardware/rasberrypi/serial/i16RPISerialSendDatas.c
new file mode 100644
index 00000000..fe6fe6f4
--- /dev/null
+++ b/2.3-1/src/c/hardware/rasberrypi/serial/i16RPISerialSendDatas.c
@@ -0,0 +1,24 @@
+/* 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/2.3-1/src/c/hardware/rasberrypi/serial/i8RPISerialSendDataa.c b/2.3-1/src/c/hardware/rasberrypi/serial/i8RPISerialSendDataa.c
new file mode 100644
index 00000000..c4dd199c
--- /dev/null
+++ b/2.3-1/src/c/hardware/rasberrypi/serial/i8RPISerialSendDataa.c
@@ -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
+*/
+
+/* 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/2.3-1/src/c/hardware/rasberrypi/Serial/u8RPI_serialFlushs.c b/2.3-1/src/c/hardware/rasberrypi/serial/i8RPISerialSendDatas.c
index 4d150637..e637871f 100644
--- a/2.3-1/src/c/hardware/rasberrypi/Serial/u8RPI_serialFlushs.c
+++ b/2.3-1/src/c/hardware/rasberrypi/serial/i8RPISerialSendDatas.c
@@ -5,13 +5,18 @@
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
+ 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 u8RPI_serialFlushs(uint8 fd){
- serialFlush(fd);
-}
+void i8RPISerialSendDatas(int fd, int8 data)
+{
+ serialPutchar(fd, (uint8) data);
+
+}
diff --git a/2.3-1/src/c/hardware/rasberrypi/serial/sRPISerialSendDataa.c b/2.3-1/src/c/hardware/rasberrypi/serial/sRPISerialSendDataa.c
new file mode 100644
index 00000000..14c0bc70
--- /dev/null
+++ b/2.3-1/src/c/hardware/rasberrypi/serial/sRPISerialSendDataa.c
@@ -0,0 +1,27 @@
+/* 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/2.3-1/src/c/hardware/rasberrypi/serial/sRPISerialSendDatas.c b/2.3-1/src/c/hardware/rasberrypi/serial/sRPISerialSendDatas.c
new file mode 100644
index 00000000..ff78dd1f
--- /dev/null
+++ b/2.3-1/src/c/hardware/rasberrypi/serial/sRPISerialSendDatas.c
@@ -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
+*/
+
+/* 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/2.3-1/src/c/hardware/rasberrypi/serial/u16RPISerialSendDataa.c b/2.3-1/src/c/hardware/rasberrypi/serial/u16RPISerialSendDataa.c
new file mode 100644
index 00000000..b444047b
--- /dev/null
+++ b/2.3-1/src/c/hardware/rasberrypi/serial/u16RPISerialSendDataa.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: 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/2.3-1/src/c/hardware/rasberrypi/serial/u16RPISerialSendDatas.c b/2.3-1/src/c/hardware/rasberrypi/serial/u16RPISerialSendDatas.c
new file mode 100644
index 00000000..b4a90c29
--- /dev/null
+++ b/2.3-1/src/c/hardware/rasberrypi/serial/u16RPISerialSendDatas.c
@@ -0,0 +1,23 @@
+/* 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/2.3-1/src/c/hardware/rasberrypi/serial/u16RPISerialSetups.c b/2.3-1/src/c/hardware/rasberrypi/serial/u16RPISerialSetups.c
new file mode 100644
index 00000000..cde4cba2
--- /dev/null
+++ b/2.3-1/src/c/hardware/rasberrypi/serial/u16RPISerialSetups.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: 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/2.3-1/src/c/hardware/rasberrypi/Serial/u8RPI_serialGetchars.c b/2.3-1/src/c/hardware/rasberrypi/serial/u8RPISerialCloses.c
index c1dabfd1..5162d15e 100644
--- a/2.3-1/src/c/hardware/rasberrypi/Serial/u8RPI_serialGetchars.c
+++ b/2.3-1/src/c/hardware/rasberrypi/serial/u8RPISerialCloses.c
@@ -5,13 +5,17 @@
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
+ Author: Siddhesh Wani
Organization: FOSSEE, IIT Bombay
Email: toolbox@scilab.in
*/
+/* Function to close serial port opened. */
+
+#include "types.h"
#include "RPIPeripheralSerial.h"
-void u8RPI_serialGetchars(uint8 fd,char* out){
- out=serialGetchar(fd);
-}
+void u8RPISerialCloses(int fd)
+{
+ serialClose (fd);
+}
diff --git a/2.3-1/src/c/hardware/rasberrypi/Serial/u8RPI_serialCloses.c b/2.3-1/src/c/hardware/rasberrypi/serial/u8RPISerialFlushs.c
index d20aa541..c80a92c5 100644
--- a/2.3-1/src/c/hardware/rasberrypi/Serial/u8RPI_serialCloses.c
+++ b/2.3-1/src/c/hardware/rasberrypi/serial/u8RPISerialFlushs.c
@@ -5,13 +5,17 @@
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
+ 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 u8RPI_serialCloses(uint8 fd){
- serialClose(fd);
-}
+void u8RPISerialFlushs(int fd)
+{
+ serialFlush(fd);
+}
diff --git a/2.3-1/src/c/hardware/rasberrypi/Serial/gRPI_serialOpena.c b/2.3-1/src/c/hardware/rasberrypi/serial/u8RPISerialSendChars.c
index 31543afe..e3813514 100644
--- a/2.3-1/src/c/hardware/rasberrypi/Serial/gRPI_serialOpena.c
+++ b/2.3-1/src/c/hardware/rasberrypi/serial/u8RPISerialSendChars.c
@@ -5,15 +5,17 @@
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
+ 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"
-int8 gRPI_serialOpena(char* device,int size,uint32 baud){
- int8 fd;
- fd = serialOpen(device,baud);
- return fd;
-}
+void u8RPISerialSendChars(int fd, uint8 data)
+{
+ serialPutchar(fd, data);
+}
diff --git a/2.3-1/src/c/hardware/rasberrypi/serial/u8RPISerialSendDataa.c b/2.3-1/src/c/hardware/rasberrypi/serial/u8RPISerialSendDataa.c
new file mode 100644
index 00000000..9d097141
--- /dev/null
+++ b/2.3-1/src/c/hardware/rasberrypi/serial/u8RPISerialSendDataa.c
@@ -0,0 +1,27 @@
+/* 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/2.3-1/src/c/hardware/rasberrypi/Serial/u8RPI_serialDataAvails.c b/2.3-1/src/c/hardware/rasberrypi/serial/u8RPISerialSendDatas.c
index cf256070..9edb439f 100644
--- a/2.3-1/src/c/hardware/rasberrypi/Serial/u8RPI_serialDataAvails.c
+++ b/2.3-1/src/c/hardware/rasberrypi/serial/u8RPISerialSendDatas.c
@@ -5,15 +5,18 @@
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
+ 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"
-uint8 u8RPI_serialDataAvails(uint8 fd){
- uint8 out;
- out=serialDataAvail(fd);
- return(out);
-}
+void u8RPISerialSendDatas(int fd, uint8 data)
+{
+ serialPutchar(fd, data);
+
+}
diff --git a/2.3-1/src/c/hardware/rasberrypi/soft/u8RPI_softPwmCreates.c b/2.3-1/src/c/hardware/rasberrypi/soft/u8RPI_softPwmCreates.c
deleted file mode 100644
index d6977798..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/soft/u8RPI_softPwmCreates.c
+++ /dev/null
@@ -1,19 +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: Jorawar Singh, Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#include "RPIPeripheralSoft.h"
-
-uint8 u8RPI_softPwmCreates(uint8 pin,uint16 ival,uint16 range){
- uint8 out;
- out=softPwmCreate(pin,ival,range);
- return (out);
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/soft/u8RPI_softPwmStops.c b/2.3-1/src/c/hardware/rasberrypi/soft/u8RPI_softPwmStops.c
deleted file mode 100644
index 761fdc23..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/soft/u8RPI_softPwmStops.c
+++ /dev/null
@@ -1,17 +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: Jorawar Singh, Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#include "RPIPeripheralSoft.h"
-
-void u8RPI_softPwmStops(uint8 pin){
- softPwmStop(pin);
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/soft/u8RPI_softPwmWrites.c b/2.3-1/src/c/hardware/rasberrypi/soft/u8RPI_softPwmWrites.c
deleted file mode 100644
index 2b76d148..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/soft/u8RPI_softPwmWrites.c
+++ /dev/null
@@ -1,17 +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: Jorawar Singh, Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#include "RPIPeripheralSoft.h"
-
-void u8RPI_softPwmWrites(uint8 pin,uint16 value){
- softPwmWrite(pin,value);
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/soft/u8RPI_softToneCreates.c b/2.3-1/src/c/hardware/rasberrypi/soft/u8RPI_softToneCreates.c
deleted file mode 100644
index dfcbb1fb..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/soft/u8RPI_softToneCreates.c
+++ /dev/null
@@ -1,19 +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: Jorawar Singh, Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#include "RPIPeripheralSoft.h"
-
-uint8 u8RPI_softToneCreates(uint8 pin){
- uint8 out;
- out=softToneCreate(pin);
- return (out);
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/soft/u8RPI_softToneStops.c b/2.3-1/src/c/hardware/rasberrypi/soft/u8RPI_softToneStops.c
deleted file mode 100644
index 664fbda4..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/soft/u8RPI_softToneStops.c
+++ /dev/null
@@ -1,17 +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: Jorawar Singh, Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#include "RPIPeripheralSoft.h"
-
-void u8RPI_softToneStops(uint8 pin){
- softToneStop(pin);
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/soft/u8RPI_softToneWrites.c b/2.3-1/src/c/hardware/rasberrypi/soft/u8RPI_softToneWrites.c
deleted file mode 100644
index be04b476..00000000
--- a/2.3-1/src/c/hardware/rasberrypi/soft/u8RPI_softToneWrites.c
+++ /dev/null
@@ -1,17 +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: Jorawar Singh, Siddhesh Wani
- Organization: FOSSEE, IIT Bombay
- Email: toolbox@scilab.in
-*/
-
-#include "RPIPeripheralSoft.h"
-
-void u8RPI_softToneWrites(uint8 pin,uint32 value){
- softToneWrite(pin,value);
-}
diff --git a/2.3-1/src/c/hardware/rasberrypi/pwm/u8RPI_pwmWrites.c b/2.3-1/src/c/hardware/rasberrypi/threading/u16RPIThreadCreates.c
index be94e73e..c05c959c 100644
--- a/2.3-1/src/c/hardware/rasberrypi/pwm/u8RPI_pwmWrites.c
+++ b/2.3-1/src/c/hardware/rasberrypi/threading/u16RPIThreadCreates.c
@@ -5,15 +5,20 @@
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, Jorawar Singh
+ Author: Siddhesh Wani
Organization: FOSSEE, IIT Bombay
Email: toolbox@scilab.in
*/
-#include "RPIPeripheralPWM.h"
+/* Function to create thread for given function */
+
+#include "types.h"
+#include "RPIPeripheralThreading.h"
-/*Function to write the given value to the pwm pin*/
-
-void u8RPI_pwmWrites(uint8 pin, uint16 value){
- pwmWrite(pin, value);
+uint16 RPIThreadCreate(void *(*threadFunction)(void*))
+{
+ int status;
+ status = piThreadCreate (threadFunction);
+ return status;
}
+
diff --git a/2.3-1/src/c/hardware/rasberrypi/Timing/u32RPI_delayMicros.c b/2.3-1/src/c/hardware/rasberrypi/timing/u16RPIDelayMicros.c
index 1ffdda7e..9aeeab7d 100644
--- a/2.3-1/src/c/hardware/rasberrypi/Timing/u32RPI_delayMicros.c
+++ b/2.3-1/src/c/hardware/rasberrypi/timing/u16RPIDelayMicros.c
@@ -5,15 +5,18 @@
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, Jorawar Singh
+ Author: Siddhesh Wani
Organization: FOSSEE, IIT Bombay
Email: toolbox@scilab.in
*/
-#include "RPIPeripheralTiming.h"
-
/* Function to insert some delay in code execution. */
+
+#include "types.h"
+#include "RPIPeripheralTiming.h"
-void u32RPI_delayMicros(uint32 time){
+void u16RPIDelayMicros(uint16 time)
+{
delayMicroseconds(time);
}
+
diff --git a/2.3-1/src/c/hardware/rasberrypi/Timing/u32RPI_delays.c b/2.3-1/src/c/hardware/rasberrypi/timing/u16RPIDelayMillis.c
index 7802d6bf..26790861 100644
--- a/2.3-1/src/c/hardware/rasberrypi/Timing/u32RPI_delays.c
+++ b/2.3-1/src/c/hardware/rasberrypi/timing/u16RPIDelayMillis.c
@@ -5,15 +5,21 @@
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, Jorawar Singh
+ Author: Siddhesh Wani
Organization: FOSSEE, IIT Bombay
Email: toolbox@scilab.in
*/
-#include "RPIPeripheralTiming.h"
-
/* Function to insert some delay in code execution. */
-void u32RPI_delays(uint32 time){
+
+
+#include "types.h"
+#include "RPIPeripheralTiming.h"
+
+void u16RPIDelayMillis(uint16 time)
+{
delay(time);
+
}
+
diff --git a/2.3-1/src/c/hardware/rasberrypi/Timing/RPI_micros.c b/2.3-1/src/c/hardware/rasberrypi/timing/u32RPIGetMicros.c
index a7a84503..eb086a9f 100644
--- a/2.3-1/src/c/hardware/rasberrypi/Timing/RPI_micros.c
+++ b/2.3-1/src/c/hardware/rasberrypi/timing/u32RPIGetMicros.c
@@ -5,17 +5,17 @@
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, Jorawar Singh
+ Author: Siddhesh Wani
Organization: FOSSEE, IIT Bombay
Email: toolbox@scilab.in
*/
-#include "RPIPeripheralTiming.h"
-
/* Function to get time in microsecond since first setup function called */
-uint32 RPI_micros(){
- uint32 out;
- out=micros();
- return (out);
-}
+#include "types.h"
+#include "RPIPeripheralTiming.h"
+
+uint32 u32RPIGetMicros()
+{
+ return(micros());
+} \ No newline at end of file
diff --git a/2.3-1/src/c/hardware/rasberrypi/Timing/RPI_millis.c b/2.3-1/src/c/hardware/rasberrypi/timing/u32RPIGetMillis.c
index b383f2a9..c1189753 100644
--- a/2.3-1/src/c/hardware/rasberrypi/Timing/RPI_millis.c
+++ b/2.3-1/src/c/hardware/rasberrypi/timing/u32RPIGetMillis.c
@@ -5,17 +5,17 @@
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, Jorawar Singh
+ Author: Siddhesh Wani
Organization: FOSSEE, IIT Bombay
Email: toolbox@scilab.in
*/
-#include "RPIPeripheralTiming.h"
-
/* Function to get time in millisecond since first setup function called */
-uint32 RPI_millis(){
- uint32 out;
- out=millis();
- return (out);
-}
+#include "types.h"
+#include "RPIPeripheralTiming.h"
+
+uint32 u32RPIGetMillis()
+{
+ return(millis());
+} \ No newline at end of file