diff options
Diffstat (limited to 'src/c/hardware')
17 files changed, 115 insertions, 91 deletions
diff --git a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralDigital.h b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralDigital.h index d571488..6b7ed27 100644 --- a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralDigital.h +++ b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralDigital.h @@ -5,11 +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 -<<<<<<< HEAD Author: Siddhesh Wani, Jorawar Singh -======= - Author: Siddhesh Wani ->>>>>>> 9e5793a7b05b23e6044a6d7a9ddd5db39ba375f0 Organization: FOSSEE, IIT Bombay Email: toolbox@scilab.in */ @@ -24,7 +20,6 @@ extern "C" { #endif -<<<<<<< HEAD #define u80RPI_digitalReadu80(pin) u8RPI_digitalReads(pin); #define d0RPI_digitalReadd0(pin) u8RPI_digitalReads(pin); @@ -33,20 +28,10 @@ extern "C" { #define d0d0RPI_digitalWrite(pin,state) u8RPI_digitalWrites(pin,state); #define u80RPI_digitalWriteByte(value) u8RPI_digitalWriteBytes(value); -======= -#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); ->>>>>>> 9e5793a7b05b23e6044a6d7a9ddd5db39ba375f0 +#define d0RPI_digitalWriteByte(value) u8RPI_digitalWriteBytes(value); #ifdef __cplusplus } /* extern "C" */ #endif -<<<<<<< HEAD #endif /* !__INT_RPIPERIPHERALGPIO_H__ */ -======= -#endif /* !__RPIPERIPHERALGPIO_H__ */ ->>>>>>> 9e5793a7b05b23e6044a6d7a9ddd5db39ba375f0 diff --git a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralGertboard.h b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralGertboard.h index cea8bb6..e258068 100644 --- a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralGertboard.h +++ b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralGertboard.h @@ -21,9 +21,15 @@ extern "C" { #endif #define RPI_gertboardSPISetupi80() RPI_gertboardSPISetup(); + #define u160RPI_gertboardAnalogSetupi80(pinBase) u16RPI_gertboardAnalogSetups(pinBase); +#define d0RPI_gertboardAnalogSetupi80(pinBase) u16RPI_gertboardAnalogSetups(pinBase); + #define u160RPI_gertboardAnalogReadu160(pin) u160RPI_gertboardAnalogReads(pin); +#define d0RPI_gertboardAnalogReadu160(pin) u160RPI_gertboardAnalogReads(pin); + #define u160u160RPI_gertboardAnalogWrite(pin,value) u160RPI_gertboardAnalogWrites(pin,value); +#define d0d0RPI_gertboardAnalogWrite(pin,value) u160RPI_gertboardAnalogWrites(pin,value); #ifdef __cplusplus } /* extern "C" */ diff --git a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralI2C.h b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralI2C.h index f18fd57..b93529e 100644 --- a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralI2C.h +++ b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralI2C.h @@ -21,12 +21,25 @@ extern "C" { #endif #define u160RPI_I2CSetupi80(arrd) u16RPI_I2CSetups(arrd); +#define d0RPI_I2CSetupi80(arrd) u16RPI_I2CSetups(arrd); + #define u160RPI_I2CReadi80(fd) u16RPI_I2CReads(fd); +#define d0RPI_I2CReadi80(fd) u16RPI_I2CReads(fd); + #define u160u160RPI_I2CReadReg8i80(fd,reg) u16RPI_I2CReadReg8s(fd,reg); +#define d0d0RPI_I2CReadReg8i80(fd,reg) u16RPI_I2CReadReg8s(fd,reg); + #define u160u160RPI_I2CReadReg16i80(fd,reg) u16RPI_I2CReadReg16s(fd,reg); +#define d0d0RPI_I2CReadReg16i80(fd,reg) u16RPI_I2CReadReg16s(fd,reg); + #define u160u160RPI_I2CWritei80(fd,data) u16RPI_I2CWrites(fd,data); +#define d0d0RPI_I2CWritei80(fd,data) u16RPI_I2CWrites(fd,data); + #define u160u160u160RPI_I2CWriteReg8i80(fd,reg,data) u16RPI_I2CWriteReg8s(fd,reg,data); +#define d0d0d0RPI_I2CWriteReg8i80(fd,reg,data) u16RPI_I2CWriteReg8s(fd,reg,data); + #define u160u160u160RPI_I2CWriteReg16i80(fd,reg,data) u16RPI_I2CWriteReg16s(fd,reg,data); +#define d0d0d0RPI_I2CWriteReg16i80(fd,reg,data) u16RPI_I2CWriteReg16s(fd,reg,data); #ifdef __cplusplus } /* extern "C" */ diff --git a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralLCD.h b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralLCD.h index e4f3ca2..e6dcb7d 100644 --- a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralLCD.h +++ b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralLCD.h @@ -21,17 +21,40 @@ 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 d0d0d0d0d0d0d0d0d0d0RPI_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 d0RPI_lcdClear(fd) u8RPI_lcdClears(fd); + #define u80u80RPI_lcdCursorBlink(fd,state) u8RPI_lcdCursorBlinks(fd,state); +#define d0d0RPI_lcdCursorBlink(fd,state) u8RPI_lcdCursorBlinks(fd,state); + #define u80u80RPI_lcdCursor(fd,state) u8RPI_lcdCursors(fd,state); +#define d0d0RPI_lcdCursor(fd,state) u8RPI_lcdCursors(fd,state); + #define u80u80RPI_lcdDisplay(fd,state) u8RPI_lcdDisplays(fd,state); +#define d0d0RPI_lcdDisplay(fd,state) u8RPI_lcdDisplays(fd,state); + #define u80RPI_lcdHome(fd) u8RPI_lcdHomes(fd); +#define d0RPI_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 d0d0d0d0d0d0d0d0d0d0d0d0d0RPI_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 d0d0d0RPI_lcdPosition(fd,row,col) u8RPI_lcdPositions(fd,row,col); + #define u80u80RPI_lcdPutchar(fd,char) u8RPI_lcdPutchars(fd,char); +#define d0d0RPI_lcdPutchar(fd,char) u8RPI_lcdPutchars(fd,char); + #define u80u80RPI_lcdSendCommand(fd,cmd) u8RPI_lcdSendCommands(fd,cmd); +#define d0d0RPI_lcdSendCommand(fd,cmd) u8RPI_lcdSendCommands(fd,cmd); + #define u80g2RPI_lcdPuts(fd,msg,size) u8RPI_lcdPutss(fd,msg,size[1]);; +#define d0g2RPI_lcdPuts(fd,msg,size) u8RPI_lcdPutss(fd,msg,size[1]);; + #define u80g2RPI_lcdPrintf(fd,data,size) u8RPI_lcdPrintfs(fd,data,size[1]); +#define d0g2RPI_lcdPrintf(fd,data,size) u8RPI_lcdPrintfs(fd,data,size[1]); #ifdef __cplusplus } /* extern "C" */ diff --git a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralLCD128x64.h b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralLCD128x64.h index 46b6328..77cc433 100644 --- a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralLCD128x64.h +++ b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralLCD128x64.h @@ -38,8 +38,10 @@ extern "C" { #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); @@ -48,6 +50,7 @@ extern "C" { #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); diff --git a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralMcp.h b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralMcp.h index c044cf7..7857b3a 100644 --- a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralMcp.h +++ b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralMcp.h @@ -21,10 +21,19 @@ extern "C" { #endif #define u160u80RPI_mcp23008Setupu80(pinBase,addr) u16RPI_mcp23008Setups(pinBase,addr); +#define d0d0RPI_mcp23008Setupu80(pinBase,addr) u16RPI_mcp23008Setups(pinBase,addr); + #define u160u80RPI_mcp23016Setupu80(pinBase,addr) u16RPI_mcp23016Setups(pinBase,addr); +#define d0d0RPI_mcp23016Setupu80(pinBase,addr) u16RPI_mcp23016Setups(pinBase,addr); + #define u160u80RPI_mcp23017Setupu80(pinBase,addr) u16RPI_mcp23017Setups(pinBase,addr); +#define d0d0RPI_mcp23017Setupu80(pinBase,addr) u16RPI_mcp23017Setups(pinBase,addr); + #define u160u80u80RPI_mcp23s08Setupu80(pinBase,spiport,devId) u16RPI_mcp23s08Setups(pinBase,spiport,devId); +#define d0d0d0RPI_mcp23s08Setupu80(pinBase,spiport,devId) u16RPI_mcp23s08Setups(pinBase,spiport,devId); + #define u160u80u80RPI_mcp23s17Setupu80(pinBase,spiport,devId) u16RPI_mcp23s17Setups(pinBase,spiport,devId); +#define d0d0d0RPI_mcp23s17Setupu80(pinBase,spiport,devId) u16RPI_mcp23s17Setups(pinBase,spiport,devId); #ifdef __cplusplus } /* extern "C" */ diff --git a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralMisc.h b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralMisc.h index b836d68..de065a2 100644 --- a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralMisc.h +++ b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralMisc.h @@ -21,8 +21,12 @@ extern "C" { #endif #define RPI_boardRevu80() RPI_boardRev(); + #define u80u80RPI_padDrive(group,strength) u8RPI_padDrives(group,strength); +#define d0d0RPI_padDrive(group,strength) u8RPI_padDrives(group,strength); + #define u160RPI_sn3218Setupi80(pinBase) u16RPI_sn3218Setups(pinBase); +#define d0RPI_sn3218Setupi80(pinBase) u16RPI_sn3218Setups(pinBase); #ifdef __cplusplus } /* extern "C" */ diff --git a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPWM.h b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPWM.h index edf9aed..fd1a1b0 100644 --- a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPWM.h +++ b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPWM.h @@ -1,58 +1,41 @@ -<<<<<<< HEAD /* Copyright (C) 2016 - IIT Bombay - FOSSEE -======= - /* Copyright (C) 2016 - IIT Bombay - FOSSEE ->>>>>>> 9e5793a7b05b23e6044a6d7a9ddd5db39ba375f0 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 -<<<<<<< HEAD Author: Jorawar Singh, Siddhesh Wani Organization: FOSSEE, IIT Bombay Email: toolbox@scilab.in */ -======= - Author: Siddhesh Wani - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ ->>>>>>> 9e5793a7b05b23e6044a6d7a9ddd5db39ba375f0 #ifndef __INT_RPIPERIPHERALPWM_H__ #define __INT_RPIPERIPHERALPWM_H__ #include "types.h" -<<<<<<< HEAD #include "RPIPeripheralPWM.h" -======= ->>>>>>> 9e5793a7b05b23e6044a6d7a9ddd5db39ba375f0 #ifdef __cplusplus extern "C" { #endif -<<<<<<< HEAD #define u80u160RPI_pwmWrite(pin,value) u8RPI_pwmWrites(pin,value); +#define d0d0RPI_pwmWrite(pin,value) u8RPI_pwmWrites(pin,value); + #define u320RPI_pwmRange(value) u32RPI_pwmRanges(value); +#define d0RPI_pwmRange(value) u32RPI_pwmRanges(value); + #define g2RPI_pwmMode(mode) gRPI_pwmModea(mode); + #define u160RPI_pwmClock(divisor) u16RPI_pwmClocks(divisor); +#define d0RPI_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) ->>>>>>> 9e5793a7b05b23e6044a6d7a9ddd5db39ba375f0 +#define d0d0RPI_pwmToneWrite(pin,value) u8RPI_pwmToneWrites(pin,value); #ifdef __cplusplus } /* extern "C" */ #endif -<<<<<<< HEAD #endif /* !__INT_RPIPERIPHERALPWM_H__ */ -======= -#endif /*__INT_RPIPERIPHERALPWM_H__*/ ->>>>>>> 9e5793a7b05b23e6044a6d7a9ddd5db39ba375f0 diff --git a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPcf.h b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPcf.h index e3d2009..3d0cb27 100644 --- a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPcf.h +++ b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPcf.h @@ -21,7 +21,10 @@ extern "C" { #endif #define u160u80RPI_pcf8574Setupu80(pinBase,addr) u16RPI_pcf8574Setups(pinBase,addr); +#define d0d0RPI_pcf8574Setupu80(pinBase,addr) u16RPI_pcf8574Setups(pinBase,addr); + #define u160u80RPI_pcf8591Setupu80(pinBase,addr) u16RPI_pcf8591Setups(pinBase,addr); +#define d0d0RPI_pcf8591Setupu80(pinBase,addr) u16RPI_pcf8591Setups(pinBase,addr); #ifdef __cplusplus } /* extern "C" */ diff --git a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPiGlow.h b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPiGlow.h index 08056f9..8e268f6 100644 --- a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPiGlow.h +++ b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPiGlow.h @@ -21,9 +21,16 @@ extern "C" { #endif #define u80RPI_piGlowSetup(clear) u8RPI_piGlowSetups(clear); +#define d0RPI_piGlowSetup(clear) u8RPI_piGlowSetups(clear); + #define u80u80u80RPI_piGlow1(leg,ring,intensity) u8RPI_piGlow1s(leg,ring,intensity); +#define d0d0d0RPI_piGlow1(leg,ring,intensity) u8RPI_piGlow1s(leg,ring,intensity); + #define u80u80RPI_piGlowLeg(leg,intensity) u8RPI_piGlowLegs(leg,intensity); +#define d0d0RPI_piGlowLeg(leg,intensity) u8RPI_piGlowLegs(leg,intensity); + #define u80u80RPI_piGlowRing(ring,intensity) u8RPI_piGlowRings(ring,intensity); +#define d0d0RPI_piGlowRing(ring,intensity) u8RPI_piGlowRings(ring,intensity); #ifdef __cplusplus } /* extern "C" */ diff --git a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPinMap.h b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPinMap.h index 39c5c01..8de0dc2 100644 --- a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPinMap.h +++ b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPinMap.h @@ -21,7 +21,10 @@ extern "C" { #endif #define u80RPI_physToGpioi80(pin) u8RPI_physToGpios(pin); +#define d0RPI_physToGpioi80(pin) u8RPI_physToGpios(pin); + #define u80RPI_wpiToGpioi80(pin) u8RPI_wpiToGpios(pin); +#define d0RPI_wpiToGpioi80(pin) u8RPI_wpiToGpios(pin); #ifdef __cplusplus } /* extern "C" */ diff --git a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralSerial.h b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralSerial.h index 5924c90..b308d83 100644 --- a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralSerial.h +++ b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralSerial.h @@ -1,78 +1,51 @@ -<<<<<<< HEAD /* Copyright (C) 2016 - IIT Bombay - FOSSEE -======= - /* Copyright (C) 2016 - IIT Bombay - FOSSEE ->>>>>>> 9e5793a7b05b23e6044a6d7a9ddd5db39ba375f0 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 -<<<<<<< HEAD Author: Jorawar Singh, Siddhesh Wani Organization: FOSSEE, IIT Bombay Email: toolbox@scilab.in */ -======= - Author: Siddhesh Wani - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ ->>>>>>> 9e5793a7b05b23e6044a6d7a9ddd5db39ba375f0 #ifndef __INT_RPIPERIPHERALSERIAL_H__ #define __INT_RPIPERIPHERALSERIAL_H__ #include "types.h" -<<<<<<< HEAD #include "RPIPeripheralSerial.h" -======= ->>>>>>> 9e5793a7b05b23e6044a6d7a9ddd5db39ba375f0 #ifdef __cplusplus extern "C" { #endif -<<<<<<< HEAD #define g2u320RPI_serialOpeni80(device,size,baud) gRPI_serialOpena(device,size[1],baud); +#define g2d0RPI_serialOpeni80(device,size,baud) gRPI_serialOpena(device,size[1],baud); + #define u80RPI_serialClose(fd) u8RPI_serialCloses(fd); +#define d0RPI_serialClose(fd) u8RPI_serialCloses(fd); + #define u80RPI_serialDataAvailu80(fd) u8RPI_serialDataAvails(fd); +#define d0RPI_serialDataAvailu80(fd) u8RPI_serialDataAvails(fd); + #define u80RPI_serialFlush(fd) u8RPI_serialFlushs(fd); +#define d0RPI_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 d0RPI_serialGetcharg2(fd,out) u8RPI_serialGetchars(fd,out); -#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 u80g2RPI_serialPrintf(fd,msg,size) u8RPI_serialPrintfs(fd,msg,size[1]); +#define d0g2RPI_serialPrintf(fd,msg,size) u8RPI_serialPrintfs(fd,msg,size[1]); -#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 u80u80RPI_serialPutchar(fd,character) u8RPI_serialPutchars(fd,character); +#define d0d0RPI_serialPutchar(fd,character) u8RPI_serialPutchars(fd,character); -#define RPI_SerialDataAvail(fd) i16RPISerialDataAvails(fd) -#define RPI_SerialGetChar(fd) i16RPISerialGetChars(fd) -#define RPI_SerialFlush(fd) u8RPISerialFlushs(fd) ->>>>>>> 9e5793a7b05b23e6044a6d7a9ddd5db39ba375f0 +#define u80g2RPI_serialPutsg2(fd,character,size) u8RPI_serialPutss(fd,character,size[1]); +#define d0g2RPI_serialPutsg2(fd,character,size) u8RPI_serialPutss(fd,character,size[1]); #ifdef __cplusplus } /* extern "C" */ #endif -<<<<<<< HEAD #endif /* !__INT_RPIPERIPHERALSERIAL_H__ */ -======= -#endif /*__INT_RPIPERIPHERALSERIAL_H__*/ ->>>>>>> 9e5793a7b05b23e6044a6d7a9ddd5db39ba375f0 diff --git a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralSetup.h b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralSetup.h index bd82702..6bcb163 100644 --- a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralSetup.h +++ b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralSetup.h @@ -23,18 +23,12 @@ extern "C" { #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]); diff --git a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralShift.h b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralShift.h index 6b142bd..7b70ce9 100644 --- a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralShift.h +++ b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralShift.h @@ -21,8 +21,13 @@ extern "C" { #endif #define u80u80u80RPI_shiftInu80(dpin,cpin,order) u8RPI_shiftIns(dpin,cpin,order); +#define d0d0d0RPI_shiftInu80(dpin,cpin,order) u8RPI_shiftIns(dpin,cpin,order); + #define u80u80u80u80RPI_shiftOut(dpin,cpin,order,val) u8RPI_shiftOuts(dpin,cpin,order,val); +#define d0d0d0d0RPI_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); +#define d0d0d0d0d0RPI_sr595Setupi80(pinBase,nPins,dP,cP,lP) u16RPI_sr595Setups(pinBase,nPins,dP,cP,lP); #ifdef __cplusplus } /* extern "C" */ diff --git a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralSoft.h b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralSoft.h index 80372b2..646c524 100644 --- a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralSoft.h +++ b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralSoft.h @@ -21,11 +21,22 @@ extern "C" { #endif #define u80u160u160RPI_softPwmCreateu80(pin,ival,range) u8RPI_softPwmCreates(pin,ival,range); +#define d0d0d0RPI_softPwmCreateu80(pin,ival,range) u8RPI_softPwmCreates(pin,ival,range); + #define u80RPI_softPwmStop(pin) u8RPI_softPwmStops(pin); +#define d0RPI_softPwmStop(pin) u8RPI_softPwmStops(pin); + #define u80u160RPI_softPwmWrite(pin,value) u8RPI_softPwmWrites(pin,value); +#define d0d0RPI_softPwmWrite(pin,value) u8RPI_softPwmWrites(pin,value); + #define u80RPI_softToneCreateu80(pin) u8RPI_softToneCreates(pin); +#define d0RPI_softToneCreateu80(pin) u8RPI_softToneCreates(pin); + #define u80RPI_softToneStop(pin) u8RPI_softToneStops(pin); +#define d0RPI_softToneStop(pin) u8RPI_softToneStops(pin); + #define u80u320RPI_softToneWrite(pin,value) u8RPI_softToneWrites(pin,value); +#define d0d0RPI_softToneWrite(pin,value) u8RPI_softToneWrites(pin,value); #ifdef __cplusplus } /* extern "C" */ diff --git a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralTiming.h b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralTiming.h index 073cc1e..c91fdfb 100644 --- a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralTiming.h +++ b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralTiming.h @@ -33,6 +33,8 @@ extern "C" { #define d0RPI_delay(time) u32RPI_delays(time); #define u320RPI_delayMicro(time) u32RPI_delayMicros(time); +#define d0RPI_delayMicro(time) u32RPI_delayMicros(time); + #define RPI_millisu320() RPI_millis(); #define RPI_microsu320() RPI_micros(); ======= diff --git a/src/c/hardware/rasberrypi/pwm/u8RPI_pwmToneWrites.c b/src/c/hardware/rasberrypi/pwm/u8RPI_pwmToneWrites.c index fe1b8cd..3fe0c82 100644 --- a/src/c/hardware/rasberrypi/pwm/u8RPI_pwmToneWrites.c +++ b/src/c/hardware/rasberrypi/pwm/u8RPI_pwmToneWrites.c @@ -12,6 +12,6 @@ #include "RPIPeripheralPWM.h" -void u8RPI_pwmToneWrites(uint8 pin, uint16 value){ - pwmToneWrite(pin, value); +void u8RPI_pwmToneWrites(uint8 pin,uint16 freq){ + pwmToneWrite(pin,freq); } |