diff options
Diffstat (limited to '2.3-1/src/c/hardware/rasberrypi/interfaces')
16 files changed, 390 insertions, 62 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 40a8e1a4..7de051fc 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 + Author: Siddhesh Wani, Jorawar Singh Organization: FOSSEE, IIT Bombay Email: toolbox@scilab.in */ @@ -20,14 +20,13 @@ extern "C" { #endif -#define RPI_DigitalSetup(in1,in2) u8RPIDigitalSetups((uint8) in1, (uint8) in2); - -#define RPI_DigitalIn(in1) u8RPIDigitalIns((uint8) in1); - -#define RPI_DigitalOut(in1,in2) u8RPIDigitalOuts((uint8) in1, (uint8) in2); +#define u80RPI_digitalReadu80(pin) u8RPI_digitalReads(pin); +#define RPI_digitalReadByteu80() RPI_digitalReadByte(); +#define u80u80RPI_digitalWrite(pin,state) u8RPI_digitalWrites(pin,state); +#define u80RPI_digitalWriteByte(value) u8RPI_digitalWriteBytes(value); #ifdef __cplusplus } /* extern "C" */ #endif -#endif /* !__RPIPERIPHERALGPIO_H__ */ +#endif /* !__INT_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 new file mode 100644 index 00000000..cea8bb6e --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralGertboard.h @@ -0,0 +1,32 @@ +/* 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 new file mode 100644 index 00000000..f18fd57c --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralI2C.h @@ -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: 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_RPIPeripheralPinISR.h b/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralInterrupt.h index b2c1ed16..cb55572a 100644 --- a/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPinISR.h +++ b/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralInterrupt.h @@ -1,25 +1,29 @@ - /* 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 + Author: Jorawar Singh, Siddhesh Wani Organization: FOSSEE, IIT Bombay Email: toolbox@scilab.in - */ -#ifndef __INT_RPIPERIPHERALPINISR_H__ -#define __INT_RPIPERIPHERALPINISR_H__ +*/ + +#ifndef __INT_RPIPERIPHERALINTERRUPT_H__ +#define __INT_RPIPERIPHERALINTERRUPT_H__ + +#include "types.h" +#include "RPIPeripheralInterrupt.h" #ifdef __cplusplus extern "C" { #endif -#define RPI_PinISR(pin,edge,funname) i16RPIPinISRs((uint8)pin,(uint8)edge,funname) +#define u80i160RPI_waitForInterrupti80(pin,time) u8RPI_waitForInterrupts(pin,time); #ifdef __cplusplus } /* extern "C" */ #endif -#endif /*__INT_RPIPERIPHERALPINISR_H__*/ +#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 new file mode 100644 index 00000000..da23beec --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralLCD.h @@ -0,0 +1,40 @@ +/* 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_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_lcdPutss(fd,msg,size) u8RPI_lcdPutss(fd,msg,size[1]);; +#define u80g2RPI_lcdPrintfs(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_RPIPeripheralMcp.h b/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralMcp.h new file mode 100644 index 00000000..c044cf7f --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralMcp.h @@ -0,0 +1,33 @@ +/* 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 new file mode 100644 index 00000000..b836d683 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralMisc.h @@ -0,0 +1,31 @@ +/* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: 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 8c8f4c62..49c58c04 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,30 +1,33 @@ - /* 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 + Author: Jorawar Singh, 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 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) +#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); #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 new file mode 100644 index 00000000..e3d2009d --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPcf.h @@ -0,0 +1,30 @@ +/* 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 new file mode 100644 index 00000000..08056f94 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPiGlow.h @@ -0,0 +1,32 @@ +/* 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_RPIPeripheralThreading.h b/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPinMap.h index 68ed6e0e..39c5c011 100644 --- a/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralThreading.h +++ b/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPinMap.h @@ -1,25 +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: Siddhesh Wani + Author: Jorawar Singh, Siddhesh Wani Organization: FOSSEE, IIT Bombay Email: toolbox@scilab.in - */ -#ifndef __INT_RPIPERIPHERALTHREADING_H__ -#define __INT_RPIPERIPHERALTHREADING_H__ +*/ + +#ifndef __INT_RPIPERIPHERALPINMAP_H__ +#define __INT_RPIPERIPHERALPINMAP_H__ + +#include "types.h" +#include "RPIPeripheralPinMap.h" #ifdef __cplusplus extern "C" { #endif -#define RPI_ThreadCreate(fn) RPIThreadCreate(fn); +#define u80RPI_physToGpioi80(pin) u8RPI_physToGpios(pin); +#define u80RPI_wpiToGpioi80(pin) u8RPI_wpiToGpios(pin); #ifdef __cplusplus } /* extern "C" */ #endif -#endif /*__INT_RPIPERIPHERALTHREADING_H__*/ +#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 5d53b98b..e0832f97 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,47 +1,36 @@ - /* 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 + Author: Jorawar Singh, 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 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) +#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]); #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 new file mode 100644 index 00000000..0e1f7b42 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralSetup.h @@ -0,0 +1,32 @@ +/* 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 + +#define g2RPI_pinNumberingi80(seq,size) gRPI_pinNumberinga(seq,size[1]); +#define u80RPI_getAltu80(pin) u8RPI_getAlts(pin); +#define u80u80RPI_pinModeAlt(pin,mode) u8RPI_pinModeAlts(pin,mode); +#define u80g2RPI_pinMode(pin,mode,size) u8RPI_pinModes(pin,mode,size[1]); +#define u80g2RPI_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 new file mode 100644 index 00000000..6b142bd5 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralShift.h @@ -0,0 +1,31 @@ +/* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: 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 new file mode 100644 index 00000000..80372b26 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralSoft.h @@ -0,0 +1,34 @@ +/* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: 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_RPIPeripheralTiming.h b/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralTiming.h index 1a704655..5c4e6184 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,12 +5,11 @@ 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 + Author: Jorawar Singh, Siddhesh Wani Organization: FOSSEE, IIT Bombay Email: toolbox@scilab.in */ - #ifndef __INT_RPIPERIPHERALTIMING_H__ #define __INT_RPIPERIPHERALTIMING_H__ @@ -21,14 +20,13 @@ extern "C" { #endif -#define RPI_DelayMicro(in1) u16RPIDelayMicros((uint16) in1) -#define RPI_DelayMilli(in1) u16RPIDelayMillis((uint16) in1) -#define RPI_GetMicro() u32RPIGetMicros() -#define RPI_GetMillis() u32RPIGetMillis() - +#define u320RPI_delay(time) u32RPI_delays(time); +#define u320RPI_delayMicro(time) u32RPI_delayMicros(time); +#define RPI_millisu320() RPI_millis(); +#define RPI_microsu320() RPI_micros(); #ifdef __cplusplus } /* extern "C" */ #endif -#endif /* !__RPIPERIPHERALTIMING_H__ */ +#endif /* !__INT_RPIPERIPHERALTIMING_H__ */ |