summaryrefslogtreecommitdiff
path: root/2.3-1/src/c/hardware/rasberrypi/interfaces
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/rasberrypi/interfaces
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/rasberrypi/interfaces')
-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_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/interfaces/int_RPIPeripheralPinMap.h)19
-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/interfaces/int_RPIPeripheralPcf.h)19
-rw-r--r--2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralTiming.h14
17 files changed, 59 insertions, 467 deletions
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_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/interfaces/int_RPIPeripheralPinMap.h b/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPinISR.h
index 39c5c011..b2c1ed16 100644
--- a/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPinMap.h
+++ b/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPinISR.h
@@ -1,30 +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: Jorawar Singh, Siddhesh Wani
+ Author: Siddhesh Wani
Organization: FOSSEE, IIT Bombay
Email: toolbox@scilab.in
-*/
-
-#ifndef __INT_RPIPERIPHERALPINMAP_H__
-#define __INT_RPIPERIPHERALPINMAP_H__
-
-#include "types.h"
-#include "RPIPeripheralPinMap.h"
+ */
+#ifndef __INT_RPIPERIPHERALPINISR_H__
+#define __INT_RPIPERIPHERALPINISR_H__
#ifdef __cplusplus
extern "C" {
#endif
-#define u80RPI_physToGpioi80(pin) u8RPI_physToGpios(pin);
-#define u80RPI_wpiToGpioi80(pin) u8RPI_wpiToGpios(pin);
+#define RPI_PinISR(pin,edge,funname) i16RPIPinISRs((uint8)pin,(uint8)edge,funname)
#ifdef __cplusplus
} /* extern "C" */
#endif
-#endif /* !__INT_RPIPERIPHERALPINMAP_H__ */
+#endif /*__INT_RPIPERIPHERALPINISR_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/interfaces/int_RPIPeripheralPcf.h b/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralThreading.h
index e3d2009d..68ed6e0e 100644
--- a/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPcf.h
+++ b/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralThreading.h
@@ -1,30 +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: Jorawar Singh, Siddhesh Wani
+ Author: Siddhesh Wani
Organization: FOSSEE, IIT Bombay
Email: toolbox@scilab.in
-*/
-
-#ifndef __INT_RPIPERIPHERALPCF_H__
-#define __INT_RPIPERIPHERALPCF_H__
-
-#include "types.h"
-#include "RPIPeripheralPcf.h"
+ */
+#ifndef __INT_RPIPERIPHERALTHREADING_H__
+#define __INT_RPIPERIPHERALTHREADING_H__
#ifdef __cplusplus
extern "C" {
#endif
-#define u160u80RPI_pcf8574Setupu80(pinBase,addr) u16RPI_pcf8574Setups(pinBase,addr);
-#define u160u80RPI_pcf8591Setupu80(pinBase,addr) u16RPI_pcf8591Setups(pinBase,addr);
+#define RPI_ThreadCreate(fn) RPIThreadCreate(fn);
#ifdef __cplusplus
} /* extern "C" */
#endif
-#endif /* !__INT_RPIPERIPHERALPCF_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__ */