From 815306982a4ea8eaaa2106fadcd1472aa2a9dcd5 Mon Sep 17 00:00:00 2001 From: Jorawar Singh Date: Fri, 30 Jun 2017 11:28:58 +0530 Subject: Help files, modified Raspberry Pi code conversion --- .../rasberrypi/Digital/RPI_digitalReadByte.c | 21 ++ .../rasberrypi/Digital/u8RPI_digitalReads.c | 21 ++ .../rasberrypi/Digital/u8RPI_digitalWriteBytes.c | 19 ++ .../rasberrypi/Digital/u8RPI_digitalWrites.c | 22 ++ .../hardware/rasberrypi/I2C/u16RPI_I2CReadReg16s.c | 19 ++ .../hardware/rasberrypi/I2C/u16RPI_I2CReadReg8s.c | 19 ++ .../c/hardware/rasberrypi/I2C/u16RPI_I2CReads.c | 19 ++ .../c/hardware/rasberrypi/I2C/u16RPI_I2CSetups.c | 19 ++ .../rasberrypi/I2C/u16RPI_I2CWriteReg16s.c | 19 ++ .../hardware/rasberrypi/I2C/u16RPI_I2CWriteReg8s.c | 19 ++ .../c/hardware/rasberrypi/I2C/u16RPI_I2CWrites.c | 19 ++ .../src/c/hardware/rasberrypi/ISR/i16RPIPinISRs.c | 25 -- .../rasberrypi/Interrupt/u8RPI_waitForInterrupts.c | 19 ++ .../src/c/hardware/rasberrypi/Misc/RPI_boardRev.c | 19 ++ .../hardware/rasberrypi/Misc/u16RPI_sn3218Setups.c | 19 ++ .../c/hardware/rasberrypi/Misc/u8RPI_padDrives.c | 17 ++ .../NotYetDone/INIT_FillSCI2LivCDirs.backup | 316 +++++++++++++++++++++ .../rasberrypi/NotYetDone/NotToDo/RPI_adress.c | 13 + .../rasberrypi/NotYetDone/NotToDo/RPI_analogRead.c | 13 + .../NotYetDone/NotToDo/RPI_analogWrite.c | 13 + .../rasberrypi/NotYetDone/NotToDo/RPI_commande.c | 13 + .../rasberrypi/NotYetDone/NotToDo/RPI_i2cdetect.c | 13 + .../rasberrypi/NotYetDone/NotToDo/RPI_send.c | 13 + .../NotYetDone/NotToDo/backup/ISR/i16RPIPinISRs.c | 25 ++ .../NotToDo/backup/gpio/RPI_DigitalRead.c | 24 ++ .../NotToDo/backup/gpio/RPI_DigitalWrite.c | 26 ++ .../NotYetDone/NotToDo/backup/gpio/RPI_pinMode.c | 40 +++ .../NotYetDone/NotToDo/backup/pwm/RPI_pwmClock.c | 27 ++ .../NotYetDone/NotToDo/backup/pwm/RPI_pwmMode.c | 28 ++ .../NotYetDone/NotToDo/backup/pwm/RPI_pwmRange.c | 25 ++ .../NotYetDone/NotToDo/backup/pwm/RPI_pwmWrite.c | 26 ++ .../NotToDo/backup/serial/dRPISerialSendDataa.c | 27 ++ .../NotToDo/backup/serial/dRPISerialSendDatas.c | 35 +++ .../NotToDo/backup/serial/gRPISerialSendDatas.c | 27 ++ .../NotToDo/backup/serial/i16RPISerialDataAvails.c | 25 ++ .../NotToDo/backup/serial/i16RPISerialGetChars.c | 27 ++ .../NotToDo/backup/serial/i16RPISerialSendDataa.c | 27 ++ .../NotToDo/backup/serial/i16RPISerialSendDatas.c | 24 ++ .../NotToDo/backup/serial/i8RPISerialSendDataa.c | 26 ++ .../NotToDo/backup/serial/i8RPISerialSendDatas.c | 22 ++ .../NotToDo/backup/serial/sRPISerialSendDataa.c | 27 ++ .../NotToDo/backup/serial/sRPISerialSendDatas.c | 34 +++ .../NotToDo/backup/serial/u16RPISerialSendDataa.c | 28 ++ .../NotToDo/backup/serial/u16RPISerialSendDatas.c | 23 ++ .../NotToDo/backup/serial/u16RPISerialSetups.c | 25 ++ .../NotToDo/backup/serial/u8RPISerialCloses.c | 21 ++ .../NotToDo/backup/serial/u8RPISerialFlushs.c | 21 ++ .../NotToDo/backup/serial/u8RPISerialSendChars.c | 21 ++ .../NotToDo/backup/serial/u8RPISerialSendDataa.c | 27 ++ .../NotToDo/backup/serial/u8RPISerialSendDatas.c | 22 ++ .../NotToDo/backup/threading/u16RPIThreadCreates.c | 24 ++ .../NotYetDone/NotToDo/backup/timing/RPI_delay.c | 25 ++ .../NotToDo/backup/timing/RPI_delayMicro.c | 22 ++ .../NotYetDone/NotToDo/backup/timing/RPI_micros.c | 21 ++ .../NotYetDone/NotToDo/backup/timing/RPI_millis.c | 21 ++ .../hardware/rasberrypi/NotYetDone/NotToDo/raspi.c | 13 + .../rasberrypi/NotYetDone/NotToDo/raspi_close.c | 13 + .../rasberrypi/NotYetDone/SPI/RPI_SPIDataRW.c | 13 + .../rasberrypi/NotYetDone/SPI/RPI_SPISetup.c | 13 + .../lcd128x64/RPI_lcd128x64Orientation.c | 13 + .../NotYetDone/lcd128x64/RPI_lcd128x64circle.c | 13 + .../NotYetDone/lcd128x64/RPI_lcd128x64clear.c | 13 + .../NotYetDone/lcd128x64/RPI_lcd128x64ellipse.c | 13 + .../NotYetDone/lcd128x64/RPI_lcd128x64line.c | 13 + .../NotYetDone/lcd128x64/RPI_lcd128x64lineTo.c | 13 + .../NotYetDone/lcd128x64/RPI_lcd128x64point.c | 13 + .../NotYetDone/lcd128x64/RPI_lcd128x64putchar.c | 13 + .../NotYetDone/lcd128x64/RPI_lcd128x64puts.c | 13 + .../NotYetDone/lcd128x64/RPI_lcd128x64rectangle.c | 13 + .../NotYetDone/lcd128x64/RPI_lcd128x64setOrigin.c | 13 + .../NotYetDone/lcd128x64/RPI_lcd128x64setup.c | 13 + .../NotYetDone/multiThreading/u8RPI_locks.c | 13 + .../NotYetDone/multiThreading/u8RPI_prioritys.c | 13 + .../NotYetDone/multiThreading/u8RPI_unlocks.c | 13 + .../hardware/rasberrypi/Serial/gRPI_serialOpena.c | 19 ++ .../rasberrypi/Serial/u8RPI_serialCloses.c | 17 ++ .../rasberrypi/Serial/u8RPI_serialDataAvails.c | 19 ++ .../rasberrypi/Serial/u8RPI_serialFlushs.c | 17 ++ .../rasberrypi/Serial/u8RPI_serialGetchars.c | 17 ++ .../rasberrypi/Serial/u8RPI_serialPrintfs.c | 17 ++ .../rasberrypi/Serial/u8RPI_serialPutchars.c | 17 ++ .../hardware/rasberrypi/Serial/u8RPI_serialPutss.c | 17 ++ .../hardware/rasberrypi/Setup/gRPI_pinNumberinga.c | 28 ++ .../c/hardware/rasberrypi/Setup/u8RPI_getAlts.c | 19 ++ .../hardware/rasberrypi/Setup/u8RPI_pinModeAlts.c | 17 ++ .../c/hardware/rasberrypi/Setup/u8RPI_pinModes.c | 31 ++ .../hardware/rasberrypi/Setup/u8RPI_pullControls.c | 25 ++ .../hardware/rasberrypi/Shift/u16RPI_sr595Setups.c | 20 ++ .../c/hardware/rasberrypi/Shift/u8RPI_shiftIns.c | 19 ++ .../c/hardware/rasberrypi/Shift/u8RPI_shiftOuts.c | 17 ++ .../src/c/hardware/rasberrypi/Timing/RPI_micros.c | 21 ++ .../src/c/hardware/rasberrypi/Timing/RPI_millis.c | 21 ++ .../rasberrypi/Timing/u32RPI_delayMicros.c | 19 ++ .../c/hardware/rasberrypi/Timing/u32RPI_delays.c | 19 ++ .../rasberrypi/gertBoard/RPI_gertboardSPISetup.c | 19 ++ .../gertBoard/u16RPI_gertboardAnalogReads.c | 19 ++ .../gertBoard/u16RPI_gertboardAnalogSetups.c | 19 ++ .../gertBoard/u16RPI_gertboardAnalogWrites.c | 17 ++ .../c/hardware/rasberrypi/gpio/u8RPIDigitalIns.c | 24 -- .../c/hardware/rasberrypi/gpio/u8RPIDigitalOuts.c | 26 -- .../hardware/rasberrypi/gpio/u8RPIDigitalSetups.c | 39 --- .../rasberrypi/includes/RPIPeripheralDigital.h | 11 +- .../rasberrypi/includes/RPIPeripheralGertboard.h | 32 +++ .../rasberrypi/includes/RPIPeripheralI2C.h | 37 +++ .../rasberrypi/includes/RPIPeripheralInterrupt.h | 27 ++ .../rasberrypi/includes/RPIPeripheralLCD.h | 39 +++ .../rasberrypi/includes/RPIPeripheralMcp.h | 36 +++ .../rasberrypi/includes/RPIPeripheralMisc.h | 31 ++ .../rasberrypi/includes/RPIPeripheralPWM.h | 16 +- .../rasberrypi/includes/RPIPeripheralPcf.h | 30 ++ .../rasberrypi/includes/RPIPeripheralPiGlow.h | 31 ++ .../rasberrypi/includes/RPIPeripheralPinISR.h | 26 -- .../rasberrypi/includes/RPIPeripheralPinMap.h | 28 ++ .../rasberrypi/includes/RPIPeripheralSerial.h | 36 +-- .../rasberrypi/includes/RPIPeripheralSetup.h | 35 +++ .../rasberrypi/includes/RPIPeripheralShift.h | 31 ++ .../rasberrypi/includes/RPIPeripheralSoft.h | 37 +++ .../rasberrypi/includes/RPIPeripheralThreading.h | 28 -- .../rasberrypi/includes/RPIPeripheralTiming.h | 10 +- .../interfaces/int_RPIPeripheralDigital.h | 13 +- .../interfaces/int_RPIPeripheralGertboard.h | 32 +++ .../rasberrypi/interfaces/int_RPIPeripheralI2C.h | 35 +++ .../interfaces/int_RPIPeripheralInterrupt.h | 29 ++ .../rasberrypi/interfaces/int_RPIPeripheralLCD.h | 40 +++ .../rasberrypi/interfaces/int_RPIPeripheralMcp.h | 33 +++ .../rasberrypi/interfaces/int_RPIPeripheralMisc.h | 31 ++ .../rasberrypi/interfaces/int_RPIPeripheralPWM.h | 19 +- .../rasberrypi/interfaces/int_RPIPeripheralPcf.h | 30 ++ .../interfaces/int_RPIPeripheralPiGlow.h | 32 +++ .../interfaces/int_RPIPeripheralPinISR.h | 25 -- .../interfaces/int_RPIPeripheralPinMap.h | 30 ++ .../interfaces/int_RPIPeripheralSerial.h | 39 +-- .../rasberrypi/interfaces/int_RPIPeripheralSetup.h | 32 +++ .../rasberrypi/interfaces/int_RPIPeripheralShift.h | 31 ++ .../rasberrypi/interfaces/int_RPIPeripheralSoft.h | 34 +++ .../interfaces/int_RPIPeripheralThreading.h | 25 -- .../interfaces/int_RPIPeripheralTiming.h | 14 +- .../c/hardware/rasberrypi/lcd/u8RPI_lcdCharDefs.c | 18 ++ .../c/hardware/rasberrypi/lcd/u8RPI_lcdClears.c | 17 ++ .../rasberrypi/lcd/u8RPI_lcdCursorBlinks.c | 17 ++ .../c/hardware/rasberrypi/lcd/u8RPI_lcdCursors.c | 17 ++ .../c/hardware/rasberrypi/lcd/u8RPI_lcdDisplays.c | 17 ++ .../src/c/hardware/rasberrypi/lcd/u8RPI_lcdHomes.c | 17 ++ .../src/c/hardware/rasberrypi/lcd/u8RPI_lcdInits.c | 19 ++ .../c/hardware/rasberrypi/lcd/u8RPI_lcdPositions.c | 17 ++ .../c/hardware/rasberrypi/lcd/u8RPI_lcdPrintfs.c | 17 ++ .../c/hardware/rasberrypi/lcd/u8RPI_lcdPutchars.c | 17 ++ .../src/c/hardware/rasberrypi/lcd/u8RPI_lcdPutss.c | 17 ++ .../rasberrypi/lcd/u8RPI_lcdSendCommands.c | 17 ++ .../rasberrypi/mcp/u16RPI_mcp23008Setups.c | 19 ++ .../rasberrypi/mcp/u16RPI_mcp23016Setups.c | 19 ++ .../rasberrypi/mcp/u16RPI_mcp23017Setups.c | 19 ++ .../rasberrypi/mcp/u16RPI_mcp23s08Setups.c | 19 ++ .../rasberrypi/mcp/u16RPI_mcp23s17Setups.c | 19 ++ .../hardware/rasberrypi/pcf/u16RPI_pcf8574Setups.c | 19 ++ .../hardware/rasberrypi/pcf/u16RPI_pcf8591Setups.c | 19 ++ .../c/hardware/rasberrypi/piGlow/u8RPI_piGlow1s.c | 17 ++ .../hardware/rasberrypi/piGlow/u8RPI_piGlowLegs.c | 17 ++ .../hardware/rasberrypi/piGlow/u8RPI_piGlowRings.c | 17 ++ .../rasberrypi/piGlow/u8RPI_piGlowSetups.c | 17 ++ .../hardware/rasberrypi/pinMap/u8RPI_physToGpios.c | 19 ++ .../hardware/rasberrypi/pinMap/u8RPI_wpiToGpios.c | 19 ++ .../src/c/hardware/rasberrypi/pwm/gRPI_pwmModea.c | 25 ++ .../c/hardware/rasberrypi/pwm/u16RPI_pwmClocks.c | 23 ++ .../c/hardware/rasberrypi/pwm/u32RPI_pwmRanges.c | 22 ++ .../rasberrypi/pwm/u8RPIHardPWMSetClocks.c | 27 -- .../hardware/rasberrypi/pwm/u8RPIHardPWMSetModes.c | 28 -- .../rasberrypi/pwm/u8RPIHardPWMSetRanges.c | 25 -- .../c/hardware/rasberrypi/pwm/u8RPIHardPWMWrites.c | 26 -- .../hardware/rasberrypi/pwm/u8RPI_pwmToneWrites.c | 17 ++ .../c/hardware/rasberrypi/pwm/u8RPI_pwmWrites.c | 19 ++ .../rasberrypi/serial/dRPISerialSendDataa.c | 27 -- .../rasberrypi/serial/dRPISerialSendDatas.c | 35 --- .../rasberrypi/serial/gRPISerialSendDatas.c | 27 -- .../rasberrypi/serial/i16RPISerialDataAvails.c | 25 -- .../rasberrypi/serial/i16RPISerialGetChars.c | 27 -- .../rasberrypi/serial/i16RPISerialSendDataa.c | 27 -- .../rasberrypi/serial/i16RPISerialSendDatas.c | 24 -- .../rasberrypi/serial/i8RPISerialSendDataa.c | 26 -- .../rasberrypi/serial/i8RPISerialSendDatas.c | 22 -- .../rasberrypi/serial/sRPISerialSendDataa.c | 27 -- .../rasberrypi/serial/sRPISerialSendDatas.c | 34 --- .../rasberrypi/serial/u16RPISerialSendDataa.c | 28 -- .../rasberrypi/serial/u16RPISerialSendDatas.c | 23 -- .../rasberrypi/serial/u16RPISerialSetups.c | 25 -- .../hardware/rasberrypi/serial/u8RPISerialCloses.c | 21 -- .../hardware/rasberrypi/serial/u8RPISerialFlushs.c | 21 -- .../rasberrypi/serial/u8RPISerialSendChars.c | 21 -- .../rasberrypi/serial/u8RPISerialSendDataa.c | 27 -- .../rasberrypi/serial/u8RPISerialSendDatas.c | 22 -- .../rasberrypi/soft/u8RPI_softPwmCreates.c | 19 ++ .../hardware/rasberrypi/soft/u8RPI_softPwmStops.c | 17 ++ .../hardware/rasberrypi/soft/u8RPI_softPwmWrites.c | 17 ++ .../rasberrypi/soft/u8RPI_softToneCreates.c | 19 ++ .../hardware/rasberrypi/soft/u8RPI_softToneStops.c | 17 ++ .../rasberrypi/soft/u8RPI_softToneWrites.c | 17 ++ .../rasberrypi/threading/u16RPIThreadCreates.c | 24 -- .../hardware/rasberrypi/timing/u16RPIDelayMicros.c | 22 -- .../hardware/rasberrypi/timing/u16RPIDelayMillis.c | 25 -- .../c/hardware/rasberrypi/timing/u32RPIGetMicros.c | 21 -- .../c/hardware/rasberrypi/timing/u32RPIGetMillis.c | 21 -- 201 files changed, 3731 insertions(+), 1018 deletions(-) create mode 100644 2.3-1/src/c/hardware/rasberrypi/Digital/RPI_digitalReadByte.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/Digital/u8RPI_digitalReads.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/Digital/u8RPI_digitalWriteBytes.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/Digital/u8RPI_digitalWrites.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/I2C/u16RPI_I2CReadReg16s.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/I2C/u16RPI_I2CReadReg8s.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/I2C/u16RPI_I2CReads.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/I2C/u16RPI_I2CSetups.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/I2C/u16RPI_I2CWriteReg16s.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/I2C/u16RPI_I2CWriteReg8s.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/I2C/u16RPI_I2CWrites.c delete mode 100644 2.3-1/src/c/hardware/rasberrypi/ISR/i16RPIPinISRs.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/Interrupt/u8RPI_waitForInterrupts.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/Misc/RPI_boardRev.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/Misc/u16RPI_sn3218Setups.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/Misc/u8RPI_padDrives.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/INIT_FillSCI2LivCDirs.backup create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/RPI_adress.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/RPI_analogRead.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/RPI_analogWrite.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/RPI_commande.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/RPI_i2cdetect.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/RPI_send.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/ISR/i16RPIPinISRs.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/gpio/RPI_DigitalRead.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/gpio/RPI_DigitalWrite.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/gpio/RPI_pinMode.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/pwm/RPI_pwmClock.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/pwm/RPI_pwmMode.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/pwm/RPI_pwmRange.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/pwm/RPI_pwmWrite.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/dRPISerialSendDataa.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/dRPISerialSendDatas.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/gRPISerialSendDatas.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/i16RPISerialDataAvails.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/i16RPISerialGetChars.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/i16RPISerialSendDataa.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/i16RPISerialSendDatas.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/i8RPISerialSendDataa.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/i8RPISerialSendDatas.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/sRPISerialSendDataa.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/sRPISerialSendDatas.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/u16RPISerialSendDataa.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/u16RPISerialSendDatas.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/u16RPISerialSetups.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/u8RPISerialCloses.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/u8RPISerialFlushs.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/u8RPISerialSendChars.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/u8RPISerialSendDataa.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/u8RPISerialSendDatas.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/threading/u16RPIThreadCreates.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/timing/RPI_delay.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/timing/RPI_delayMicro.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/timing/RPI_micros.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/timing/RPI_millis.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/raspi.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/raspi_close.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/SPI/RPI_SPIDataRW.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/SPI/RPI_SPISetup.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64Orientation.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64circle.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64clear.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64ellipse.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64line.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64lineTo.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64point.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64putchar.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64puts.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64rectangle.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64setOrigin.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64setup.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/multiThreading/u8RPI_locks.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/multiThreading/u8RPI_prioritys.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/NotYetDone/multiThreading/u8RPI_unlocks.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/Serial/gRPI_serialOpena.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/Serial/u8RPI_serialCloses.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/Serial/u8RPI_serialDataAvails.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/Serial/u8RPI_serialFlushs.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/Serial/u8RPI_serialGetchars.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/Serial/u8RPI_serialPrintfs.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/Serial/u8RPI_serialPutchars.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/Serial/u8RPI_serialPutss.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/Setup/gRPI_pinNumberinga.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/Setup/u8RPI_getAlts.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/Setup/u8RPI_pinModeAlts.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/Setup/u8RPI_pinModes.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/Setup/u8RPI_pullControls.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/Shift/u16RPI_sr595Setups.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/Shift/u8RPI_shiftIns.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/Shift/u8RPI_shiftOuts.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/Timing/RPI_micros.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/Timing/RPI_millis.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/Timing/u32RPI_delayMicros.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/Timing/u32RPI_delays.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/gertBoard/RPI_gertboardSPISetup.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/gertBoard/u16RPI_gertboardAnalogReads.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/gertBoard/u16RPI_gertboardAnalogSetups.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/gertBoard/u16RPI_gertboardAnalogWrites.c delete mode 100644 2.3-1/src/c/hardware/rasberrypi/gpio/u8RPIDigitalIns.c delete mode 100644 2.3-1/src/c/hardware/rasberrypi/gpio/u8RPIDigitalOuts.c delete mode 100644 2.3-1/src/c/hardware/rasberrypi/gpio/u8RPIDigitalSetups.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralGertboard.h create mode 100644 2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralI2C.h create mode 100644 2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralInterrupt.h create mode 100644 2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralLCD.h create mode 100644 2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralMcp.h create mode 100644 2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralMisc.h create mode 100644 2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralPcf.h create mode 100644 2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralPiGlow.h delete mode 100644 2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralPinISR.h create mode 100644 2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralPinMap.h create mode 100644 2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralSetup.h create mode 100644 2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralShift.h create mode 100644 2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralSoft.h delete mode 100644 2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralThreading.h create mode 100644 2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralGertboard.h create mode 100644 2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralI2C.h create mode 100644 2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralInterrupt.h create mode 100644 2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralLCD.h create mode 100644 2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralMcp.h create mode 100644 2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralMisc.h create mode 100644 2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPcf.h create mode 100644 2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPiGlow.h delete mode 100644 2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPinISR.h create mode 100644 2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPinMap.h create mode 100644 2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralSetup.h create mode 100644 2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralShift.h create mode 100644 2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralSoft.h delete mode 100644 2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralThreading.h create mode 100644 2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdCharDefs.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdClears.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdCursorBlinks.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdCursors.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdDisplays.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdHomes.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdInits.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdPositions.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdPrintfs.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdPutchars.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdPutss.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdSendCommands.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/mcp/u16RPI_mcp23008Setups.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/mcp/u16RPI_mcp23016Setups.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/mcp/u16RPI_mcp23017Setups.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/mcp/u16RPI_mcp23s08Setups.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/mcp/u16RPI_mcp23s17Setups.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/pcf/u16RPI_pcf8574Setups.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/pcf/u16RPI_pcf8591Setups.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/piGlow/u8RPI_piGlow1s.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/piGlow/u8RPI_piGlowLegs.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/piGlow/u8RPI_piGlowRings.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/piGlow/u8RPI_piGlowSetups.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/pinMap/u8RPI_physToGpios.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/pinMap/u8RPI_wpiToGpios.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/pwm/gRPI_pwmModea.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/pwm/u16RPI_pwmClocks.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/pwm/u32RPI_pwmRanges.c delete mode 100644 2.3-1/src/c/hardware/rasberrypi/pwm/u8RPIHardPWMSetClocks.c delete mode 100644 2.3-1/src/c/hardware/rasberrypi/pwm/u8RPIHardPWMSetModes.c delete mode 100644 2.3-1/src/c/hardware/rasberrypi/pwm/u8RPIHardPWMSetRanges.c delete mode 100644 2.3-1/src/c/hardware/rasberrypi/pwm/u8RPIHardPWMWrites.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/pwm/u8RPI_pwmToneWrites.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/pwm/u8RPI_pwmWrites.c delete mode 100644 2.3-1/src/c/hardware/rasberrypi/serial/dRPISerialSendDataa.c delete mode 100644 2.3-1/src/c/hardware/rasberrypi/serial/dRPISerialSendDatas.c delete mode 100644 2.3-1/src/c/hardware/rasberrypi/serial/gRPISerialSendDatas.c delete mode 100644 2.3-1/src/c/hardware/rasberrypi/serial/i16RPISerialDataAvails.c delete mode 100644 2.3-1/src/c/hardware/rasberrypi/serial/i16RPISerialGetChars.c delete mode 100644 2.3-1/src/c/hardware/rasberrypi/serial/i16RPISerialSendDataa.c delete mode 100644 2.3-1/src/c/hardware/rasberrypi/serial/i16RPISerialSendDatas.c delete mode 100644 2.3-1/src/c/hardware/rasberrypi/serial/i8RPISerialSendDataa.c delete mode 100644 2.3-1/src/c/hardware/rasberrypi/serial/i8RPISerialSendDatas.c delete mode 100644 2.3-1/src/c/hardware/rasberrypi/serial/sRPISerialSendDataa.c delete mode 100644 2.3-1/src/c/hardware/rasberrypi/serial/sRPISerialSendDatas.c delete mode 100644 2.3-1/src/c/hardware/rasberrypi/serial/u16RPISerialSendDataa.c delete mode 100644 2.3-1/src/c/hardware/rasberrypi/serial/u16RPISerialSendDatas.c delete mode 100644 2.3-1/src/c/hardware/rasberrypi/serial/u16RPISerialSetups.c delete mode 100644 2.3-1/src/c/hardware/rasberrypi/serial/u8RPISerialCloses.c delete mode 100644 2.3-1/src/c/hardware/rasberrypi/serial/u8RPISerialFlushs.c delete mode 100644 2.3-1/src/c/hardware/rasberrypi/serial/u8RPISerialSendChars.c delete mode 100644 2.3-1/src/c/hardware/rasberrypi/serial/u8RPISerialSendDataa.c delete mode 100644 2.3-1/src/c/hardware/rasberrypi/serial/u8RPISerialSendDatas.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/soft/u8RPI_softPwmCreates.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/soft/u8RPI_softPwmStops.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/soft/u8RPI_softPwmWrites.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/soft/u8RPI_softToneCreates.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/soft/u8RPI_softToneStops.c create mode 100644 2.3-1/src/c/hardware/rasberrypi/soft/u8RPI_softToneWrites.c delete mode 100644 2.3-1/src/c/hardware/rasberrypi/threading/u16RPIThreadCreates.c delete mode 100644 2.3-1/src/c/hardware/rasberrypi/timing/u16RPIDelayMicros.c delete mode 100644 2.3-1/src/c/hardware/rasberrypi/timing/u16RPIDelayMillis.c delete mode 100644 2.3-1/src/c/hardware/rasberrypi/timing/u32RPIGetMicros.c delete mode 100644 2.3-1/src/c/hardware/rasberrypi/timing/u32RPIGetMillis.c (limited to '2.3-1/src/c/hardware/rasberrypi') diff --git a/2.3-1/src/c/hardware/rasberrypi/Digital/RPI_digitalReadByte.c b/2.3-1/src/c/hardware/rasberrypi/Digital/RPI_digitalReadByte.c new file mode 100644 index 00000000..70fb6858 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/Digital/RPI_digitalReadByte.c @@ -0,0 +1,21 @@ +/* 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 "RPIPeripheralDigital.h" + +/* Function to read the state of the first eight gpio pins */ + +uint8 RPI_digitalReadByte(){ + uint8 state=0; + state=digitalReadByte(); + return (state); +} diff --git a/2.3-1/src/c/hardware/rasberrypi/Digital/u8RPI_digitalReads.c b/2.3-1/src/c/hardware/rasberrypi/Digital/u8RPI_digitalReads.c new file mode 100644 index 00000000..05594066 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/Digital/u8RPI_digitalReads.c @@ -0,0 +1,21 @@ +/* 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 "RPIPeripheralDigital.h" + +/* Function to read the state of a gpio pin */ + +uint8 u8RPI_digitalReads(uint8 pin){ + uint8 state=0; + state=digitalRead(pin); + return (state); +} diff --git a/2.3-1/src/c/hardware/rasberrypi/Digital/u8RPI_digitalWriteBytes.c b/2.3-1/src/c/hardware/rasberrypi/Digital/u8RPI_digitalWriteBytes.c new file mode 100644 index 00000000..6d0e4cdd --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/Digital/u8RPI_digitalWriteBytes.c @@ -0,0 +1,19 @@ +/* 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 + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "RPIPeripheralDigital.h" + +/* Function to change the output state of the first eight gpio pins */ + +void u8RPI_digitalWriteBytes(uint8 value){ + digitalWriteByte(value); +} diff --git a/2.3-1/src/c/hardware/rasberrypi/Digital/u8RPI_digitalWrites.c b/2.3-1/src/c/hardware/rasberrypi/Digital/u8RPI_digitalWrites.c new file mode 100644 index 00000000..02dce554 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/Digital/u8RPI_digitalWrites.c @@ -0,0 +1,22 @@ +/* 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 "RPIPeripheralDigital.h" + +/* Function to change the output state of the gpio pin */ + +void u8RPI_digitalWrites(uint8 pin, uint8 state){ + if (state == 0) /*low output*/ + digitalWrite(pin,0); + else if (state == 1) /*high output*/ + digitalWrite(pin,1); +} 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 new file mode 100644 index 00000000..5d04f4b0 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/I2C/u16RPI_I2CReadReg16s.c @@ -0,0 +1,19 @@ +/* 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 new file mode 100644 index 00000000..2f4f1f74 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/I2C/u16RPI_I2CReadReg8s.c @@ -0,0 +1,19 @@ +/* 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 new file mode 100644 index 00000000..49c36737 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/I2C/u16RPI_I2CReads.c @@ -0,0 +1,19 @@ +/* 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 new file mode 100644 index 00000000..f533a1f2 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/I2C/u16RPI_I2CSetups.c @@ -0,0 +1,19 @@ +/* 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 new file mode 100644 index 00000000..b30c106f --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/I2C/u16RPI_I2CWriteReg16s.c @@ -0,0 +1,19 @@ +/* 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 new file mode 100644 index 00000000..d2ebf3d9 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/I2C/u16RPI_I2CWriteReg8s.c @@ -0,0 +1,19 @@ +/* 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 new file mode 100644 index 00000000..133ed659 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/I2C/u16RPI_I2CWrites.c @@ -0,0 +1,19 @@ +/* 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/ISR/i16RPIPinISRs.c b/2.3-1/src/c/hardware/rasberrypi/ISR/i16RPIPinISRs.c deleted file mode 100644 index 6e398a17..00000000 --- a/2.3-1/src/c/hardware/rasberrypi/ISR/i16RPIPinISRs.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: 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" - -int16 i16RPIPinISRs(uint8 pin, uint8 edgetype, void (*ISRFunction)(void)) -{ - int status; - status = wiringPiISR((int)phy_pin[pin-1], (int) edgetype, ISRFunction); - return status; -} - 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 new file mode 100644 index 00000000..32a4a1f7 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/Interrupt/u8RPI_waitForInterrupts.c @@ -0,0 +1,19 @@ +/* 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 "RPIPeripheralInterrupt.h" + +int8 u8RPI_waitForInterrupts(uint8 pin,int16 time){ + int8 out; + out=waitForInterrupt(pin,time); + return (out); +} 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 new file mode 100644 index 00000000..c8ecf705 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/Misc/RPI_boardRev.c @@ -0,0 +1,19 @@ +/* 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 new file mode 100644 index 00000000..ab229907 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/Misc/u16RPI_sn3218Setups.c @@ -0,0 +1,19 @@ +/* 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 new file mode 100644 index 00000000..ce13e08a --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/Misc/u8RPI_padDrives.c @@ -0,0 +1,17 @@ +/* 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/NotYetDone/INIT_FillSCI2LivCDirs.backup b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/INIT_FillSCI2LivCDirs.backup new file mode 100644 index 00000000..c1db6097 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/INIT_FillSCI2LivCDirs.backup @@ -0,0 +1,316 @@ + +//------------------------------------ +//---- Class RPI_DigitalSetup -------- +//------------------------------------ +ClassName = 'RPI_DigitalSetup'; + +// --- Class Annotation. --- +PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y'); +ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls); +PrintStringInfo('NIN= 2',ClassFileName,'file','y'); +PrintStringInfo('NOUT= 0 ',ClassFileName,'file','y'); +PrintStringInfo('OUT(1).TP= ''u8''',ClassFileName,'file','y'); +PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y'); +PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y'); + +// --- Function List Class. --- +ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls); +PrintStringInfo(''+ArgSeparator+'',ClassFileName,'file','y'); + +// --- Annotation Function And Function List Function. --- +FunctionName = 'RPI_DigitalSetup'; +PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y'); +INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun); +INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun); + +FunctionName = 'RPI_DigitalOut'; +PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y'); +INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun); +INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun); + +FunctionName = 'RPI_HardPWMWrite'; +PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y'); +INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun); +INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun); + +//------------------------------------ +//---- Class RPI_DigitalIn ----------- +//------------------------------------ +ClassName = 'RPI_DigitalIn'; + +// --- Class Annotation. --- +PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y'); +ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls); +PrintStringInfo('NIN= 1',ClassFileName,'file','y'); +PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y'); +PrintStringInfo('OUT(1).TP= ''u8''',ClassFileName,'file','y'); +PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y'); +PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y'); + +// --- Function List Class. --- +ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls); + +PrintStringInfo(''+ArgSeparator+'',ClassFileName,'file','y'); + +// --- Annotation Function And Function List Function. --- +FunctionName = 'RPI_DigitalIn'; +PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y'); +INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun); +INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun); + +//------------------------------------ +//---- Class RPI_delay ---------- +//------------------------------------ +ClassName = 'RPI_delay'; + +//--- Class Annotation. --- +PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y'); +ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls); +PrintStringInfo('NIN= 1',ClassFileName,'file','y'); +PrintStringInfo('NOUT= 0 ',ClassFileName,'file','y'); +PrintStringInfo('OUT(1).TP= ''u8''',ClassFileName,'file','y'); +PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y'); +PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y'); + +//--- Function List Class. --- +ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls); + +PrintStringInfo(''+ArgSeparator+'',ClassFileName,'file','y'); + +// --- Annotation Function And Function List Function. --- +FunctionName = 'RPI_delay'; +PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y'); +INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun); +INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun); + +FunctionName = 'RPI_delayMicro'; +PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y'); +INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun); +INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun); + +FunctionName = 'RPI_SerialClose'; +PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y'); +INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun); +INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun); + +FunctionName = 'RPI_SerialFlush'; +PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y'); +INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun); +INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun); + +FunctionName = 'RPI_HardPWMSetRange'; +PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y'); +INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun); +INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun); + +FunctionName = 'RPI_HardPWMSetClock'; +PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y'); +INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun); +INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun); + +FunctionName = 'RPI_HardPWMSetMode'; +PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y'); +INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun); +INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun); + +//------------------------------------ +//---- Class RPI_milli ---------- +//------------------------------------ +ClassName = 'RPI_milli'; + +// --- Class Annotation. --- +PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y'); +ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls); +PrintStringInfo('NIN= 0',ClassFileName,'file','y'); +PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y'); +PrintStringInfo('OUT(1).TP= ''u32''',ClassFileName,'file','y'); +PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y'); +PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y'); + +// --- Function List Class. --- +ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls); + +PrintStringInfo(''+ArgSeparator+'',ClassFileName,'file','y'); + +// --- Annotation Function And Function List Function. --- +FunctionName = 'RPI_millis'; +PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y'); +INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun); +INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun); + +FunctionName = 'RPI_micros'; +PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y'); +INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun); +INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun); + +//------------------------------------ +//---- Class RPI_SetupSerial ---------- +//------------------------------------ +ClassName = 'RPI_SetupSerial'; + +// --- Class Annotation. --- +PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y'); +ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls); +PrintStringInfo('NIN= 2',ClassFileName,'file','y'); +PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y'); +PrintStringInfo('OUT(1).TP= ''u16''',ClassFileName,'file','y'); +PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y'); +PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y'); + +// --- Function List Class. --- +ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls); + +PrintStringInfo(''+ArgSeparator+'',ClassFileName,'file','y'); + +// --- Annotation Function And Function List Function. --- +FunctionName = 'RPI_SerialSetup'; +PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y'); +INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun); +INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun); + +//------------------------------------ +//---- Class RPI_SetupClose ---------- +//------------------------------------ +//ClassName = 'RPI_SetupClose'; + +// --- Class Annotation. --- +//PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y'); +//ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls); +//PrintStringInfo('NIN= 1',ClassFileName,'file','y'); +//PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y'); +//PrintStringInfo('OUT(1).TP= ''u8''',ClassFileName,'file','y'); +//PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y'); +//PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y'); + +// --- Function List Class. --- +//ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls); + +//PrintStringInfo(''+ArgSeparator+'',ClassFileName,'file','y'); + +// --- Annotation Function And Function List Function. --- +//FunctionName = 'RPI_SerialClose'; +//PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y'); +//INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun); +//INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun); +//FunctionName = 'RPI_SerialFlush'; +//PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y'); +//INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun); +//INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun); + +//------------------------------------ +//---- Class RPI_SerialSendData ---------- +//------------------------------------ +ClassName = 'RPI_SerialSendData'; + +// --- Class Annotation. --- +PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y'); +ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls); +PrintStringInfo('NIN= 2',ClassFileName,'file','y'); +PrintStringInfo('NOUT= 0 ',ClassFileName,'file','y'); +PrintStringInfo('OUT(1).TP= ''u8''',ClassFileName,'file','y'); +PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y'); +PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y'); + +// --- Function List Class. --- +ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls); + +PrintStringInfo('u80u80'+ArgSeparator+'u80',ClassFileName,'file','y'); +PrintStringInfo('u80i80'+ArgSeparator+'u80',ClassFileName,'file','y'); +PrintStringInfo('u80u160'+ArgSeparator+'u80',ClassFileName,'file','y'); +PrintStringInfo('u80i160'+ArgSeparator+'u80',ClassFileName,'file','y'); +PrintStringInfo('u80s0'+ArgSeparator+'u80',ClassFileName,'file','y'); +PrintStringInfo('u80d0'+ArgSeparator+'u80',ClassFileName,'file','y'); + +PrintStringInfo('u80u82'+ArgSeparator+'u80',ClassFileName,'file','y'); +PrintStringInfo('u80i82'+ArgSeparator+'u80',ClassFileName,'file','y'); +PrintStringInfo('u80u162'+ArgSeparator+'u80',ClassFileName,'file','y'); +PrintStringInfo('u80i162'+ArgSeparator+'u80',ClassFileName,'file','y'); +PrintStringInfo('u80s2'+ArgSeparator+'u80',ClassFileName,'file','y'); +PrintStringInfo('u80d2'+ArgSeparator+'u80',ClassFileName,'file','y'); +PrintStringInfo('u80g2'+ArgSeparator+'u80',ClassFileName,'file','y'); + +// --- Annotation Function And Function List Function. --- +FunctionName = 'RPI_SerialSendData'; +PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y'); +INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun); +INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun); + +//------------------------------------ +//---- Class RPI_SerialDataAvail ---------- +//------------------------------------ +ClassName = 'RPI_SerialDataAvail'; + +// --- Class Annotation. --- +PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y'); +ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls); +PrintStringInfo('NIN= 1',ClassFileName,'file','y'); +PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y'); +PrintStringInfo('OUT(1).TP= ''i16''',ClassFileName,'file','y'); +PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y'); +PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y'); + +// --- Function List Class. --- +ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls); + +PrintStringInfo(''+ArgSeparator+'',ClassFileName,'file','y'); + +// --- Annotation Function And Function List Function. --- +FunctionName = 'RPI_SerialDataAvail'; +PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y'); +INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun); +INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun); +FunctionName = 'RPI_SerialGetChar'; +PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y'); +INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun); +INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun); + + +//------------------------------------ +//---- Class RPI_ThreadCreate ---------- +//------------------------------------ +ClassName = 'RPI_ThreadCreate'; + +// --- Class Annotation. --- +PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y'); +ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls); +PrintStringInfo('NIN= 1',ClassFileName,'file','y'); +PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y'); +PrintStringInfo('OUT(1).TP= ''u16''',ClassFileName,'file','y'); +PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y'); +PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y'); + +// --- Function List Class. --- +ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls); + +PrintStringInfo(''+ArgSeparator+'',ClassFileName,'file','y'); + +// --- Annotation Function And Function List Function. --- +FunctionName = 'RPI_ThreadCreate'; +PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y'); +INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun); +INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun); + +//------------------------------------ +//---- Class RPI_PinISR -------------- +//------------------------------------ +ClassName = 'RPI_PinISR'; + +// --- Class Annotation. --- +PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y'); +ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls); +PrintStringInfo('NIN= 3',ClassFileName,'file','y'); +PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y'); +PrintStringInfo('OUT(1).TP= ''i16''',ClassFileName,'file','y'); +PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y'); +PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y'); + +// --- Function List Class. --- +ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls); + +PrintStringInfo(''+ArgSeparator+'',ClassFileName,'file','y'); + +// --- Annotation Function And Function List Function. --- +FunctionName = 'RPI_PinISR'; +PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y'); +INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun); +INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun); diff --git a/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/RPI_adress.c b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/RPI_adress.c new file mode 100644 index 00000000..3e94b925 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/RPI_adress.c @@ -0,0 +1,13 @@ +/* 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 + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "types.h" \ No newline at end of file diff --git a/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/RPI_analogRead.c b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/RPI_analogRead.c new file mode 100644 index 00000000..3e94b925 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/RPI_analogRead.c @@ -0,0 +1,13 @@ +/* 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 + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "types.h" \ No newline at end of file diff --git a/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/RPI_analogWrite.c b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/RPI_analogWrite.c new file mode 100644 index 00000000..3e94b925 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/RPI_analogWrite.c @@ -0,0 +1,13 @@ +/* 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 + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "types.h" \ No newline at end of file diff --git a/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/RPI_commande.c b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/RPI_commande.c new file mode 100644 index 00000000..3e94b925 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/RPI_commande.c @@ -0,0 +1,13 @@ +/* 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 + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "types.h" \ No newline at end of file diff --git a/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/RPI_i2cdetect.c b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/RPI_i2cdetect.c new file mode 100644 index 00000000..3e94b925 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/RPI_i2cdetect.c @@ -0,0 +1,13 @@ +/* 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 + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "types.h" \ No newline at end of file diff --git a/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/RPI_send.c b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/RPI_send.c new file mode 100644 index 00000000..3e94b925 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/RPI_send.c @@ -0,0 +1,13 @@ +/* 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 + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "types.h" \ No newline at end of file diff --git a/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/ISR/i16RPIPinISRs.c b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/ISR/i16RPIPinISRs.c new file mode 100644 index 00000000..6e398a17 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/ISR/i16RPIPinISRs.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 declare interrupt on pins and corresponding ISRs */ + +#include "types.h" +#include "RPIPeripheralPinISR.h" +#include "RPIPeripheralDigital.h" + +int16 i16RPIPinISRs(uint8 pin, uint8 edgetype, void (*ISRFunction)(void)) +{ + int status; + status = wiringPiISR((int)phy_pin[pin-1], (int) edgetype, ISRFunction); + return status; +} + diff --git a/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/gpio/RPI_DigitalRead.c b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/gpio/RPI_DigitalRead.c new file mode 100644 index 00000000..4ab496ea --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/gpio/RPI_DigitalRead.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, Jorawar Singh + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +/* Function to read the state of the gpio pin */ + +#include "types.h" +#include "RPIPeripheralDigital.h" + +/*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/NotYetDone/NotToDo/backup/gpio/RPI_DigitalWrite.c b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/gpio/RPI_DigitalWrite.c new file mode 100644 index 00000000..259bb3b6 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/gpio/RPI_DigitalWrite.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, Jorawar Singh + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +/* Function to change the output state of the gpio pin */ + + +#include "types.h" +#include "RPIPeripheralDigital.h" + +/*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(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/NotYetDone/NotToDo/backup/gpio/RPI_pinMode.c b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/gpio/RPI_pinMode.c new file mode 100644 index 00000000..8646e8f1 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/gpio/RPI_pinMode.c @@ -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: Siddhesh Wani, Jorawar Singh + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +/* Function to setup digital pins + direction = 2 -> PWM_output (BCM pin 18 only) + 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/NotYetDone/NotToDo/backup/pwm/RPI_pwmClock.c b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/pwm/RPI_pwmClock.c new file mode 100644 index 00000000..0ad575b7 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/pwm/RPI_pwmClock.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, Jorawar Singh + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +/*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 + */ + +#include "types.h" +#include "RPIPeripheralPWM.h" + +void u8RPIHardPWMSetClocks(uint16 clk_divisor) +{ + pwmSetClock(clk_divisor); + + +} diff --git a/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/pwm/RPI_pwmMode.c b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/pwm/RPI_pwmMode.c new file mode 100644 index 00000000..7679a1ab --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/pwm/RPI_pwmMode.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, Jorawar Singh + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +/*Function to set mode for PWM channel. Two modes are available + 0 --> balanced mode + 1 --> mark/space mode + */ + +#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/NotYetDone/NotToDo/backup/pwm/RPI_pwmRange.c b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/pwm/RPI_pwmRange.c new file mode 100644 index 00000000..07936b38 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/pwm/RPI_pwmRange.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, Jorawar Singh + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +/*Function to assigne pwm duty to specified pin. PWM duty is decided by 'value' + and 'range' specified using corresponding function. + PWM duty = value/range + */ + +#include "types.h" +#include "RPIPeripheralPWM.h" + +void u8RPIHardPWMSetRanges(uint16 value) +{ + pwmSetRange(value); + +} diff --git a/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/pwm/RPI_pwmWrite.c b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/pwm/RPI_pwmWrite.c new file mode 100644 index 00000000..a16a1d86 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/pwm/RPI_pwmWrite.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, Jorawar Singh + 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" + +void u8RPIHardPWMWrites(uint8 pin, uint16 value) +{ + pwmWrite((int)phy_pin[pin-1], value); + +} diff --git a/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/dRPISerialSendDataa.c b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/dRPISerialSendDataa.c new file mode 100644 index 00000000..f9902550 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/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/NotYetDone/NotToDo/backup/serial/dRPISerialSendDatas.c b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/dRPISerialSendDatas.c new file mode 100644 index 00000000..39112fc2 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/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>8)); + +} diff --git a/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/i8RPISerialSendDataa.c b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/i8RPISerialSendDataa.c new file mode 100644 index 00000000..c4dd199c --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/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/NotYetDone/NotToDo/backup/serial/i8RPISerialSendDatas.c b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/i8RPISerialSendDatas.c new file mode 100644 index 00000000..e637871f --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/i8RPISerialSendDatas.c @@ -0,0 +1,22 @@ +/* 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 on specified serial port. */ + +#include "types.h" +#include "RPIPeripheralSerial.h" + +void i8RPISerialSendDatas(int fd, int8 data) +{ + serialPutchar(fd, (uint8) data); + +} diff --git a/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/sRPISerialSendDataa.c b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/sRPISerialSendDataa.c new file mode 100644 index 00000000..14c0bc70 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/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/NotYetDone/NotToDo/backup/serial/sRPISerialSendDatas.c b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/sRPISerialSendDatas.c new file mode 100644 index 00000000..ff78dd1f --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/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>8)); +} diff --git a/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/u16RPISerialSetups.c b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/u16RPISerialSetups.c new file mode 100644 index 00000000..cde4cba2 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/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/NotYetDone/NotToDo/backup/serial/u8RPISerialCloses.c b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/u8RPISerialCloses.c new file mode 100644 index 00000000..5162d15e --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/u8RPISerialCloses.c @@ -0,0 +1,21 @@ +/* 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 close serial port opened. */ + +#include "types.h" +#include "RPIPeripheralSerial.h" + +void u8RPISerialCloses(int fd) +{ + serialClose (fd); +} diff --git a/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/u8RPISerialFlushs.c b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/u8RPISerialFlushs.c new file mode 100644 index 00000000..c80a92c5 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/u8RPISerialFlushs.c @@ -0,0 +1,21 @@ +/* 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 discards data serial buffer (received as well as waiting to be sent */ + +#include "types.h" +#include "RPIPeripheralSerial.h" + +void u8RPISerialFlushs(int fd) +{ + serialFlush(fd); +} diff --git a/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/u8RPISerialSendChars.c b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/u8RPISerialSendChars.c new file mode 100644 index 00000000..e3813514 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/u8RPISerialSendChars.c @@ -0,0 +1,21 @@ +/* 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 8-bit char on specified serial port. */ + +#include "types.h" +#include "RPIPeripheralSerial.h" + +void u8RPISerialSendChars(int fd, uint8 data) +{ + serialPutchar(fd, data); +} diff --git a/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/u8RPISerialSendDataa.c b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/u8RPISerialSendDataa.c new file mode 100644 index 00000000..9d097141 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/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/NotYetDone/NotToDo/backup/serial/u8RPISerialSendDatas.c b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/u8RPISerialSendDatas.c new file mode 100644 index 00000000..9edb439f --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/u8RPISerialSendDatas.c @@ -0,0 +1,22 @@ +/* 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 on specified serial port. */ + +#include "types.h" +#include "RPIPeripheralSerial.h" + +void u8RPISerialSendDatas(int fd, uint8 data) +{ + serialPutchar(fd, data); + +} diff --git a/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/threading/u16RPIThreadCreates.c b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/threading/u16RPIThreadCreates.c new file mode 100644 index 00000000..c05c959c --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/threading/u16RPIThreadCreates.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 create thread for given function */ + +#include "types.h" +#include "RPIPeripheralThreading.h" + +uint16 RPIThreadCreate(void *(*threadFunction)(void*)) +{ + int status; + status = piThreadCreate (threadFunction); + return status; +} + diff --git a/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/timing/RPI_delay.c b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/timing/RPI_delay.c new file mode 100644 index 00000000..8374c2b2 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/timing/RPI_delay.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, Jorawar Singh + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +/* Function to insert some delay in code execution. */ + + + +#include "types.h" +#include "RPIPeripheralTiming.h" + +void u16RPI_delay(uint16 time) +{ + delay(time); + +} + diff --git a/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/timing/RPI_delayMicro.c b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/timing/RPI_delayMicro.c new file mode 100644 index 00000000..df2a7a79 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/timing/RPI_delayMicro.c @@ -0,0 +1,22 @@ +/* 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 +*/ + +/* Function to insert some delay in code execution. */ + +#include "types.h" +#include "RPIPeripheralTiming.h" + +void u16RPI_delayMicro(uint16 time) +{ + delayMicroseconds(time); +} + diff --git a/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/timing/RPI_micros.c b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/timing/RPI_micros.c new file mode 100644 index 00000000..8d06742d --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/timing/RPI_micros.c @@ -0,0 +1,21 @@ +/* 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 +*/ + +/* Function to get time in microsecond since first setup function called */ + +#include "types.h" +#include "RPIPeripheralTiming.h" + +uint32 u32RPI_micros() +{ + return(micros()); +} diff --git a/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/timing/RPI_millis.c b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/timing/RPI_millis.c new file mode 100644 index 00000000..92b6e1b8 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/timing/RPI_millis.c @@ -0,0 +1,21 @@ +/* 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 +*/ + +/* Function to get time in millisecond since first setup function called */ + +#include "types.h" +#include "RPIPeripheralTiming.h" + +uint32 u32RPI_millis() +{ + return(millis()); +} diff --git a/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/raspi.c b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/raspi.c new file mode 100644 index 00000000..3e94b925 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/raspi.c @@ -0,0 +1,13 @@ +/* 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 + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "types.h" \ No newline at end of file diff --git a/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/raspi_close.c b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/raspi_close.c new file mode 100644 index 00000000..3e94b925 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/NotToDo/raspi_close.c @@ -0,0 +1,13 @@ +/* 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 + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "types.h" \ No newline at end of file diff --git a/2.3-1/src/c/hardware/rasberrypi/NotYetDone/SPI/RPI_SPIDataRW.c b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/SPI/RPI_SPIDataRW.c new file mode 100644 index 00000000..3e94b925 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/SPI/RPI_SPIDataRW.c @@ -0,0 +1,13 @@ +/* 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 + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "types.h" \ No newline at end of file diff --git a/2.3-1/src/c/hardware/rasberrypi/NotYetDone/SPI/RPI_SPISetup.c b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/SPI/RPI_SPISetup.c new file mode 100644 index 00000000..3e94b925 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/SPI/RPI_SPISetup.c @@ -0,0 +1,13 @@ +/* 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 + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "types.h" \ No newline at end of file diff --git a/2.3-1/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64Orientation.c b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64Orientation.c new file mode 100644 index 00000000..3e94b925 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64Orientation.c @@ -0,0 +1,13 @@ +/* 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 + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "types.h" \ No newline at end of file diff --git a/2.3-1/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64circle.c b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64circle.c new file mode 100644 index 00000000..3e94b925 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64circle.c @@ -0,0 +1,13 @@ +/* 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 + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "types.h" \ No newline at end of file diff --git a/2.3-1/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64clear.c b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64clear.c new file mode 100644 index 00000000..3e94b925 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64clear.c @@ -0,0 +1,13 @@ +/* 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 + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "types.h" \ No newline at end of file diff --git a/2.3-1/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64ellipse.c b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64ellipse.c new file mode 100644 index 00000000..3e94b925 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64ellipse.c @@ -0,0 +1,13 @@ +/* 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 + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "types.h" \ No newline at end of file diff --git a/2.3-1/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64line.c b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64line.c new file mode 100644 index 00000000..3e94b925 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64line.c @@ -0,0 +1,13 @@ +/* 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 + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "types.h" \ No newline at end of file diff --git a/2.3-1/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64lineTo.c b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64lineTo.c new file mode 100644 index 00000000..3e94b925 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64lineTo.c @@ -0,0 +1,13 @@ +/* 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 + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "types.h" \ No newline at end of file diff --git a/2.3-1/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64point.c b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64point.c new file mode 100644 index 00000000..3e94b925 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64point.c @@ -0,0 +1,13 @@ +/* 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 + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "types.h" \ No newline at end of file diff --git a/2.3-1/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64putchar.c b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64putchar.c new file mode 100644 index 00000000..3e94b925 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64putchar.c @@ -0,0 +1,13 @@ +/* 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 + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "types.h" \ No newline at end of file diff --git a/2.3-1/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64puts.c b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64puts.c new file mode 100644 index 00000000..3e94b925 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64puts.c @@ -0,0 +1,13 @@ +/* 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 + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "types.h" \ No newline at end of file diff --git a/2.3-1/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64rectangle.c b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64rectangle.c new file mode 100644 index 00000000..3e94b925 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64rectangle.c @@ -0,0 +1,13 @@ +/* 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 + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "types.h" \ No newline at end of file diff --git a/2.3-1/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64setOrigin.c b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64setOrigin.c new file mode 100644 index 00000000..3e94b925 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64setOrigin.c @@ -0,0 +1,13 @@ +/* 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 + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "types.h" \ No newline at end of file diff --git a/2.3-1/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64setup.c b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64setup.c new file mode 100644 index 00000000..3e94b925 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64setup.c @@ -0,0 +1,13 @@ +/* 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 + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "types.h" \ No newline at end of file diff --git a/2.3-1/src/c/hardware/rasberrypi/NotYetDone/multiThreading/u8RPI_locks.c b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/multiThreading/u8RPI_locks.c new file mode 100644 index 00000000..3e94b925 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/multiThreading/u8RPI_locks.c @@ -0,0 +1,13 @@ +/* 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 + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "types.h" \ No newline at end of file diff --git a/2.3-1/src/c/hardware/rasberrypi/NotYetDone/multiThreading/u8RPI_prioritys.c b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/multiThreading/u8RPI_prioritys.c new file mode 100644 index 00000000..3e94b925 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/multiThreading/u8RPI_prioritys.c @@ -0,0 +1,13 @@ +/* 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 + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "types.h" \ No newline at end of file diff --git a/2.3-1/src/c/hardware/rasberrypi/NotYetDone/multiThreading/u8RPI_unlocks.c b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/multiThreading/u8RPI_unlocks.c new file mode 100644 index 00000000..3e94b925 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/NotYetDone/multiThreading/u8RPI_unlocks.c @@ -0,0 +1,13 @@ +/* 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 + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "types.h" \ No newline at end of file diff --git a/2.3-1/src/c/hardware/rasberrypi/Serial/gRPI_serialOpena.c b/2.3-1/src/c/hardware/rasberrypi/Serial/gRPI_serialOpena.c new file mode 100644 index 00000000..31543afe --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/Serial/gRPI_serialOpena.c @@ -0,0 +1,19 @@ +/* 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" + +int8 gRPI_serialOpena(char* device,int size,uint32 baud){ + int8 fd; + fd = serialOpen(device,baud); + return fd; +} diff --git a/2.3-1/src/c/hardware/rasberrypi/Serial/u8RPI_serialCloses.c b/2.3-1/src/c/hardware/rasberrypi/Serial/u8RPI_serialCloses.c new file mode 100644 index 00000000..d20aa541 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/Serial/u8RPI_serialCloses.c @@ -0,0 +1,17 @@ +/* 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_serialCloses(uint8 fd){ + serialClose(fd); +} diff --git a/2.3-1/src/c/hardware/rasberrypi/Serial/u8RPI_serialDataAvails.c b/2.3-1/src/c/hardware/rasberrypi/Serial/u8RPI_serialDataAvails.c new file mode 100644 index 00000000..cf256070 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/Serial/u8RPI_serialDataAvails.c @@ -0,0 +1,19 @@ +/* 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" + +uint8 u8RPI_serialDataAvails(uint8 fd){ + uint8 out; + out=serialDataAvail(fd); + return(out); +} diff --git a/2.3-1/src/c/hardware/rasberrypi/Serial/u8RPI_serialFlushs.c b/2.3-1/src/c/hardware/rasberrypi/Serial/u8RPI_serialFlushs.c new file mode 100644 index 00000000..4d150637 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/Serial/u8RPI_serialFlushs.c @@ -0,0 +1,17 @@ +/* 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_serialFlushs(uint8 fd){ + serialFlush(fd); +} diff --git a/2.3-1/src/c/hardware/rasberrypi/Serial/u8RPI_serialGetchars.c b/2.3-1/src/c/hardware/rasberrypi/Serial/u8RPI_serialGetchars.c new file mode 100644 index 00000000..c1dabfd1 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/Serial/u8RPI_serialGetchars.c @@ -0,0 +1,17 @@ +/* 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_serialGetchars(uint8 fd,char* out){ + out=serialGetchar(fd); +} 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 new file mode 100644 index 00000000..d1672003 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/Serial/u8RPI_serialPrintfs.c @@ -0,0 +1,17 @@ +/* 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 new file mode 100644 index 00000000..3309317e --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/Serial/u8RPI_serialPutchars.c @@ -0,0 +1,17 @@ +/* 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 new file mode 100644 index 00000000..581e15ac --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/Serial/u8RPI_serialPutss.c @@ -0,0 +1,17 @@ +/* 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 new file mode 100644 index 00000000..4170f4c1 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/Setup/gRPI_pinNumberinga.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: 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 new file mode 100644 index 00000000..0a5c4764 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/Setup/u8RPI_getAlts.c @@ -0,0 +1,19 @@ +/* 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 new file mode 100644 index 00000000..153b88ee --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/Setup/u8RPI_pinModeAlts.c @@ -0,0 +1,17 @@ +/* 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 new file mode 100644 index 00000000..76601f8d --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/Setup/u8RPI_pinModes.c @@ -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 +*/ + +#include +#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 new file mode 100644 index 00000000..4e95aac5 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/Setup/u8RPI_pullControls.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: 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 new file mode 100644 index 00000000..3f0a6493 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/Shift/u16RPI_sr595Setups.c @@ -0,0 +1,20 @@ +/* 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 new file mode 100644 index 00000000..6a264b6a --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/Shift/u8RPI_shiftIns.c @@ -0,0 +1,19 @@ +/* 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 new file mode 100644 index 00000000..5d24c2b9 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/Shift/u8RPI_shiftOuts.c @@ -0,0 +1,17 @@ +/* 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/Timing/RPI_micros.c b/2.3-1/src/c/hardware/rasberrypi/Timing/RPI_micros.c new file mode 100644 index 00000000..a7a84503 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/Timing/RPI_micros.c @@ -0,0 +1,21 @@ +/* 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 "RPIPeripheralTiming.h" + +/* Function to get time in microsecond since first setup function called */ + +uint32 RPI_micros(){ + uint32 out; + out=micros(); + return (out); +} diff --git a/2.3-1/src/c/hardware/rasberrypi/Timing/RPI_millis.c b/2.3-1/src/c/hardware/rasberrypi/Timing/RPI_millis.c new file mode 100644 index 00000000..b383f2a9 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/Timing/RPI_millis.c @@ -0,0 +1,21 @@ +/* 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 "RPIPeripheralTiming.h" + +/* Function to get time in millisecond since first setup function called */ + +uint32 RPI_millis(){ + uint32 out; + out=millis(); + return (out); +} diff --git a/2.3-1/src/c/hardware/rasberrypi/Timing/u32RPI_delayMicros.c b/2.3-1/src/c/hardware/rasberrypi/Timing/u32RPI_delayMicros.c new file mode 100644 index 00000000..1ffdda7e --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/Timing/u32RPI_delayMicros.c @@ -0,0 +1,19 @@ +/* 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 "RPIPeripheralTiming.h" + +/* Function to insert some delay in code execution. */ + +void u32RPI_delayMicros(uint32 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/u32RPI_delays.c new file mode 100644 index 00000000..7802d6bf --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/Timing/u32RPI_delays.c @@ -0,0 +1,19 @@ +/* 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 "RPIPeripheralTiming.h" + +/* Function to insert some delay in code execution. */ + +void u32RPI_delays(uint32 time){ + delay(time); +} 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 new file mode 100644 index 00000000..5724ebb4 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/gertBoard/RPI_gertboardSPISetup.c @@ -0,0 +1,19 @@ +/* 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 new file mode 100644 index 00000000..433bed29 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/gertBoard/u16RPI_gertboardAnalogReads.c @@ -0,0 +1,19 @@ +/* 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 new file mode 100644 index 00000000..a19aa6d0 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/gertBoard/u16RPI_gertboardAnalogSetups.c @@ -0,0 +1,19 @@ +/* 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 new file mode 100644 index 00000000..2c8aa338 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/gertBoard/u16RPI_gertboardAnalogWrites.c @@ -0,0 +1,17 @@ +/* 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/gpio/u8RPIDigitalIns.c b/2.3-1/src/c/hardware/rasberrypi/gpio/u8RPIDigitalIns.c deleted file mode 100644 index 7b84350f..00000000 --- a/2.3-1/src/c/hardware/rasberrypi/gpio/u8RPIDigitalIns.c +++ /dev/null @@ -1,24 +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 - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in -*/ - -/* Function to read the state of the gpio pin */ - -#include "types.h" -#include "RPIPeripheralDigital.h" - -/*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/gpio/u8RPIDigitalOuts.c b/2.3-1/src/c/hardware/rasberrypi/gpio/u8RPIDigitalOuts.c deleted file mode 100644 index f828f77e..00000000 --- a/2.3-1/src/c/hardware/rasberrypi/gpio/u8RPIDigitalOuts.c +++ /dev/null @@ -1,26 +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 - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in -*/ - -/* Function to change the output state of the gpio pin */ - - -#include "types.h" -#include "RPIPeripheralDigital.h" - -/*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(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 deleted file mode 100644 index f5fefe08..00000000 --- a/2.3-1/src/c/hardware/rasberrypi/gpio/u8RPIDigitalSetups.c +++ /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: 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 2f40ffb2..842fd73b 100644 --- a/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralDigital.h +++ b/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralDigital.h @@ -19,15 +19,14 @@ extern "C" { #endif - #include "types.h" -#include "wiringPi.h" -extern int phy_pin[]; +extern int phy_pin[]; //Not needed??? -void u8RPIDigitalSetups(uint8 pin, uint8 direction); -void u8RPIDigitalOuts(uint8 pin, uint8 state); -uint8 u8RPIDigitalIns(uint8 pin); +uint8 u8RPI_digitalReads(uint8 pin); +uint8 RPI_digitalReadByte(); +void u8RPI_digitalWrites(uint8 pin, uint8 state); +void u8RPI_digitalWriteBytes(uint8 value); #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 new file mode 100644 index 00000000..3594d0a1 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/includes/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 __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 new file mode 100644 index 00000000..6c8dfe14 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralI2C.h @@ -0,0 +1,37 @@ +/* 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/RPIPeripheralInterrupt.h b/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralInterrupt.h new file mode 100644 index 00000000..d9fc30f3 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralInterrupt.h @@ -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, Jorawar Singh + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in + */ +#ifndef __RPIPERIPHERALINTERRUPT_H__ +#define __RPIPERIPHERALINTERRUPT_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +#include "types.h" + +int8 u8RPI_waitForInterrupts(uint8 pin,int16 time); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /*__RPIPERIPHERALINTERRUPT_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 new file mode 100644 index 00000000..654a31a3 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralLCD.h @@ -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: 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/RPIPeripheralMcp.h b/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralMcp.h new file mode 100644 index 00000000..5304f14b --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralMcp.h @@ -0,0 +1,36 @@ + /* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Siddhesh Wani, 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/RPIPeripheralMisc.h b/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralMisc.h new file mode 100644 index 00000000..0ef5acc1 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/includes/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: Siddhesh Wani, Jorawar Singh + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#ifndef __RPIPERIPHERALMISC_H__ +#define __RPIPERIPHERALMISC_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); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /*__RPIPERIPHERALMISC_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 d463d9c9..f1d3024e 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 + Author: Siddhesh Wani, Jorawar Singh Organization: FOSSEE, IIT Bombay Email: toolbox@scilab.in */ #ifndef __RPIPERIPHERALPWM_H__ #define __RPIPERIPHERALPWM_H__ -#include "types.h" -#include "wiringPi.h" - #ifdef __cplusplus extern "C" { #endif -void u8RPIHardPWMWrites(uint8 pin, uint16 value); -void u8RPIHardPWMSetRanges(uint16 value); -void u8RPIHardPWMSetModes(uint8 mode); -void u8RPIHardPWMSetClocks(uint16 clk_divisor); +#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); #ifdef __cplusplus } /* extern "C" */ diff --git a/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralPcf.h b/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralPcf.h new file mode 100644 index 00000000..55459332 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/includes/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: Siddhesh Wani, Jorawar Singh + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in + */ +#ifndef __RPIPERIPHERALPCF_H__ +#define __RPIPERIPHERALPCF_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +#include "types.h" +#include "pcf8574.h" +#include "pcf8591.h" + +uint8 u16RPI_pcf8574Setups(uint16 pinBase,uint8 addr); +uint8 u16RPI_pcf8591Setups(uint16 pinBase,uint8 addr); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /*__RPIPERIPHERALPCF_H__*/ diff --git a/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralPiGlow.h b/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralPiGlow.h new file mode 100644 index 00000000..d2dcd13c --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralPiGlow.h @@ -0,0 +1,31 @@ + /* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Siddhesh Wani, 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/RPIPeripheralPinISR.h b/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralPinISR.h deleted file mode 100644 index fc5a8d04..00000000 --- a/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralPinISR.h +++ /dev/null @@ -1,26 +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 - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ -#ifndef __RPIPERIPHERALPINISR_H__ -#define __RPIPERIPHERALPINISR_H__ - - -#ifdef __cplusplus -extern "C" { -#endif - -int16 i16RPIPinISRs(uint8 pin, uint8 edgetype, void (*ISRFunction)(void)); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /*__RPIPERIPHERALPINISR_H__*/ diff --git a/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralPinMap.h b/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralPinMap.h new file mode 100644 index 00000000..39c2379d --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralPinMap.h @@ -0,0 +1,28 @@ + /* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Siddhesh Wani, Jorawar Singh + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in + */ +#ifndef __RPIPERIPHERALPINMAP_H__ +#define __RPIPERIPHERALPINMAP_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +#include "types.h" + +int8 u8RPI_physToGpios(uint8 pin); +int8 u8RPI_wpiToGpios(uint8 pin); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /*__RPIPERIPHERALPINMAP_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 14df95b4..67284bd0 100644 --- a/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralSerial.h +++ b/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralSerial.h @@ -5,42 +5,28 @@ 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 */ #ifndef __RPIPERIPHERALSERIAL_H__ #define __RPIPERIPHERALSERIAL_H__ -#include "types.h" -#include "wiringSerial.h" - #ifdef __cplusplus extern "C" { #endif -int u8RPISerialSetups(char* port, int baudrate); -void u8RPISerialCloses(int fd); - -void u8RPISerialSendChars(int fd, uint8 data); -void u8RPISerialSendDatas(int fd, uint8 data); -void i8RPISerialSendDatas(int fd, int8 data); -void u16RPISerialSendDatas(int fd, uint16 data); -void i16RPISerialSendDatas(int fd, int16 data); -void sRPISerialSendDatas(int fd, float data); -void dRPISerialSendDatas(int fd, double data); -void u8RPISerialSendDataa(int fd, uint8* data, int size); -void i8RPISerialSendDataa(int fd, int8* data, int size); -void u16RPISerialSendDataa(int fd, uint16* data, int size); -void i16RPISerialSendDataa(int fd, int16* data, int size); -void sRPISerialSendDataa(int fd, float* data, int size); -void dRPISerialSendDataa(int fd, double* data, int size); -void gRPISerialSendDatas(int fd, uint8* data, int size); - -int16 i16RPISerialDataAvails(int fd); -int16 i16RPISerialGetChars(int fd); +#include "types.h" +#include "wiringSerial.h" -void u8RPISerialFlushs(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); #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 new file mode 100644 index 00000000..373f0648 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralSetup.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: 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 new file mode 100644 index 00000000..4c58bb77 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/includes/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: 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 new file mode 100644 index 00000000..9494506e --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralSoft.h @@ -0,0 +1,37 @@ +/* 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/RPIPeripheralThreading.h b/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralThreading.h deleted file mode 100644 index a7b2adb4..00000000 --- a/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralThreading.h +++ /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: Siddhesh Wani - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ -#ifndef __RPIPERIPHERALTHREADING_H__ -#define __RPIPERIPHERALTHREADING_H__ - -#include "types.h" -#include "wiringPi.h" - -#ifdef __cplusplus -extern "C" { -#endif - -uint16 RPIThreadCreate(void *(*threadFunction)(void*)); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /*__RPIPERIPHERALTHREADING_H__*/ diff --git a/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralTiming.h b/2.3-1/src/c/hardware/rasberrypi/includes/RPIPeripheralTiming.h index 854073f3..e75a5394 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 + Author: Siddhesh Wani, Jorawar Singh Organization: FOSSEE, IIT Bombay Email: toolbox@scilab.in */ @@ -22,10 +22,10 @@ extern "C" { #include "types.h" #include "wiringPi.h" -void u16RPIDelayMillis(uint16 time); -void u16RPIDelayMicros(uint16 time); -uint32 u32RPIGetMillis(); -uint32 u32RPIGetMicros(); +void u32RPI_delays(uint32 time); +void u32RPI_delayMicros(uint32 time); +uint32 RPI_millis(); +uint32 RPI_micros(); #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 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_RPIPeripheralInterrupt.h b/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralInterrupt.h new file mode 100644 index 00000000..cb55572a --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralInterrupt.h @@ -0,0 +1,29 @@ +/* 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); + +#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 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_RPIPeripheralPinISR.h b/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPinISR.h deleted file mode 100644 index b2c1ed16..00000000 --- a/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPinISR.h +++ /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: Siddhesh Wani - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ -#ifndef __INT_RPIPERIPHERALPINISR_H__ -#define __INT_RPIPERIPHERALPINISR_H__ - -#ifdef __cplusplus -extern "C" { -#endif - -#define RPI_PinISR(pin,edge,funname) i16RPIPinISRs((uint8)pin,(uint8)edge,funname) - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#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 new file mode 100644 index 00000000..39c5c011 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPinMap.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_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 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_RPIPeripheralThreading.h b/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralThreading.h deleted file mode 100644 index 68ed6e0e..00000000 --- a/2.3-1/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralThreading.h +++ /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: Siddhesh Wani - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ -#ifndef __INT_RPIPERIPHERALTHREADING_H__ -#define __INT_RPIPERIPHERALTHREADING_H__ - -#ifdef __cplusplus -extern "C" { -#endif - -#define RPI_ThreadCreate(fn) RPIThreadCreate(fn); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#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 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__ */ 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 new file mode 100644 index 00000000..b85d82fd --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdCharDefs.c @@ -0,0 +1,18 @@ +/* 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 new file mode 100644 index 00000000..659cdf07 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdClears.c @@ -0,0 +1,17 @@ +/* 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 new file mode 100644 index 00000000..bf0c48e3 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdCursorBlinks.c @@ -0,0 +1,17 @@ +/* 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 new file mode 100644 index 00000000..8bb02715 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdCursors.c @@ -0,0 +1,17 @@ +/* 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 new file mode 100644 index 00000000..7425ebe9 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdDisplays.c @@ -0,0 +1,17 @@ +/* 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 new file mode 100644 index 00000000..98762de4 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdHomes.c @@ -0,0 +1,17 @@ +/* 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 new file mode 100644 index 00000000..b69f311c --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdInits.c @@ -0,0 +1,19 @@ +/* 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 new file mode 100644 index 00000000..3188a972 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdPositions.c @@ -0,0 +1,17 @@ +/* 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 new file mode 100644 index 00000000..58d01fa8 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdPrintfs.c @@ -0,0 +1,17 @@ +/* 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 new file mode 100644 index 00000000..c50a177b --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdPutchars.c @@ -0,0 +1,17 @@ +/* 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 new file mode 100644 index 00000000..a7f492ba --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdPutss.c @@ -0,0 +1,17 @@ +/* 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 new file mode 100644 index 00000000..7097d696 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/lcd/u8RPI_lcdSendCommands.c @@ -0,0 +1,17 @@ +/* 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/mcp/u16RPI_mcp23008Setups.c b/2.3-1/src/c/hardware/rasberrypi/mcp/u16RPI_mcp23008Setups.c new file mode 100644 index 00000000..c7d73268 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/mcp/u16RPI_mcp23008Setups.c @@ -0,0 +1,19 @@ +/* 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 new file mode 100644 index 00000000..2e35e5c2 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/mcp/u16RPI_mcp23016Setups.c @@ -0,0 +1,19 @@ +/* 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 new file mode 100644 index 00000000..35ed5477 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/mcp/u16RPI_mcp23017Setups.c @@ -0,0 +1,19 @@ +/* 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 new file mode 100644 index 00000000..e1bdab60 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/mcp/u16RPI_mcp23s08Setups.c @@ -0,0 +1,19 @@ +/* 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 new file mode 100644 index 00000000..5ba30d23 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/mcp/u16RPI_mcp23s17Setups.c @@ -0,0 +1,19 @@ +/* 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 new file mode 100644 index 00000000..f7e38df0 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/pcf/u16RPI_pcf8574Setups.c @@ -0,0 +1,19 @@ +/* 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 new file mode 100644 index 00000000..de26a926 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/pcf/u16RPI_pcf8591Setups.c @@ -0,0 +1,19 @@ +/* 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 new file mode 100644 index 00000000..792cda1c --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/piGlow/u8RPI_piGlow1s.c @@ -0,0 +1,17 @@ +/* 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 new file mode 100644 index 00000000..f4ef5b50 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/piGlow/u8RPI_piGlowLegs.c @@ -0,0 +1,17 @@ +/* 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 new file mode 100644 index 00000000..985696df --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/piGlow/u8RPI_piGlowRings.c @@ -0,0 +1,17 @@ +/* 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 new file mode 100644 index 00000000..2037a9b5 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/piGlow/u8RPI_piGlowSetups.c @@ -0,0 +1,17 @@ +/* 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 new file mode 100644 index 00000000..09a57132 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/pinMap/u8RPI_physToGpios.c @@ -0,0 +1,19 @@ +/* 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 new file mode 100644 index 00000000..5f65f34c --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/pinMap/u8RPI_wpiToGpios.c @@ -0,0 +1,19 @@ +/* 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/gRPI_pwmModea.c b/2.3-1/src/c/hardware/rasberrypi/pwm/gRPI_pwmModea.c new file mode 100644 index 00000000..da67a15c --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/pwm/gRPI_pwmModea.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, Jorawar Singh + 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 + */ + +void gRPI_pwmModea(char* mode,int size){ + if (mode[0] == 'm') /*mark/space mode*/ + pwmSetMode(0); + else if (mode[0] == 'b') + pwmSetMode(1); +} diff --git a/2.3-1/src/c/hardware/rasberrypi/pwm/u16RPI_pwmClocks.c b/2.3-1/src/c/hardware/rasberrypi/pwm/u16RPI_pwmClocks.c new file mode 100644 index 00000000..85e1fb2b --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/pwm/u16RPI_pwmClocks.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, Jorawar Singh + 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 +*/ + +void u16RPI_pwmClocks(uint16 divisor){ + pwmSetClock(divisor); +} diff --git a/2.3-1/src/c/hardware/rasberrypi/pwm/u32RPI_pwmRanges.c b/2.3-1/src/c/hardware/rasberrypi/pwm/u32RPI_pwmRanges.c new file mode 100644 index 00000000..1fb22963 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/pwm/u32RPI_pwmRanges.c @@ -0,0 +1,22 @@ +/* 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" + +/*Function to assign 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); +} diff --git a/2.3-1/src/c/hardware/rasberrypi/pwm/u8RPIHardPWMSetClocks.c b/2.3-1/src/c/hardware/rasberrypi/pwm/u8RPIHardPWMSetClocks.c deleted file mode 100644 index d06b135c..00000000 --- a/2.3-1/src/c/hardware/rasberrypi/pwm/u8RPIHardPWMSetClocks.c +++ /dev/null @@ -1,27 +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 - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in -*/ - -/*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 - */ - -#include "types.h" -#include "RPIPeripheralPWM.h" - -void u8RPIHardPWMSetClocks(uint16 clk_divisor) -{ - pwmSetClock(clk_divisor); - - -} diff --git a/2.3-1/src/c/hardware/rasberrypi/pwm/u8RPIHardPWMSetModes.c b/2.3-1/src/c/hardware/rasberrypi/pwm/u8RPIHardPWMSetModes.c deleted file mode 100644 index 0cca7a70..00000000 --- a/2.3-1/src/c/hardware/rasberrypi/pwm/u8RPIHardPWMSetModes.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: Siddhesh Wani - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in -*/ - -/*Function to set mode for PWM channel. Two modes are available - 0 --> balanced mode - 1 --> mark/space mode - */ - -#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/u8RPIHardPWMSetRanges.c b/2.3-1/src/c/hardware/rasberrypi/pwm/u8RPIHardPWMSetRanges.c deleted file mode 100644 index b2489f59..00000000 --- a/2.3-1/src/c/hardware/rasberrypi/pwm/u8RPIHardPWMSetRanges.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: Siddhesh Wani - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in -*/ - -/*Function to assigne pwm duty to specified pin. PWM duty is decided by 'value' - and 'range' specified using corresponding function. - PWM duty = value/range - */ - -#include "types.h" -#include "RPIPeripheralPWM.h" - -void u8RPIHardPWMSetRanges(uint16 value) -{ - pwmSetRange(value); - -} diff --git a/2.3-1/src/c/hardware/rasberrypi/pwm/u8RPIHardPWMWrites.c b/2.3-1/src/c/hardware/rasberrypi/pwm/u8RPIHardPWMWrites.c deleted file mode 100644 index ae02bf0d..00000000 --- a/2.3-1/src/c/hardware/rasberrypi/pwm/u8RPIHardPWMWrites.c +++ /dev/null @@ -1,26 +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 - 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" - -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 new file mode 100644 index 00000000..fe1b8cd2 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/pwm/u8RPI_pwmToneWrites.c @@ -0,0 +1,17 @@ +/* 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/pwm/u8RPI_pwmWrites.c b/2.3-1/src/c/hardware/rasberrypi/pwm/u8RPI_pwmWrites.c new file mode 100644 index 00000000..be94e73e --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/pwm/u8RPI_pwmWrites.c @@ -0,0 +1,19 @@ +/* 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" + +/*Function to write the given value to the pwm pin*/ + +void u8RPI_pwmWrites(uint8 pin, uint16 value){ + pwmWrite(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 deleted file mode 100644 index f9902550..00000000 --- a/2.3-1/src/c/hardware/rasberrypi/serial/dRPISerialSendDataa.c +++ /dev/null @@ -1,27 +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 - 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 deleted file mode 100644 index 39112fc2..00000000 --- a/2.3-1/src/c/hardware/rasberrypi/serial/dRPISerialSendDatas.c +++ /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 - 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>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 deleted file mode 100644 index c4dd199c..00000000 --- a/2.3-1/src/c/hardware/rasberrypi/serial/i8RPISerialSendDataa.c +++ /dev/null @@ -1,26 +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 - 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/i8RPISerialSendDatas.c b/2.3-1/src/c/hardware/rasberrypi/serial/i8RPISerialSendDatas.c deleted file mode 100644 index e637871f..00000000 --- a/2.3-1/src/c/hardware/rasberrypi/serial/i8RPISerialSendDatas.c +++ /dev/null @@ -1,22 +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 - 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 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 deleted file mode 100644 index 14c0bc70..00000000 --- a/2.3-1/src/c/hardware/rasberrypi/serial/sRPISerialSendDataa.c +++ /dev/null @@ -1,27 +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 - 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 deleted file mode 100644 index ff78dd1f..00000000 --- a/2.3-1/src/c/hardware/rasberrypi/serial/sRPISerialSendDatas.c +++ /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: 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>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 deleted file mode 100644 index cde4cba2..00000000 --- a/2.3-1/src/c/hardware/rasberrypi/serial/u16RPISerialSetups.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: 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/u8RPISerialCloses.c b/2.3-1/src/c/hardware/rasberrypi/serial/u8RPISerialCloses.c deleted file mode 100644 index 5162d15e..00000000 --- a/2.3-1/src/c/hardware/rasberrypi/serial/u8RPISerialCloses.c +++ /dev/null @@ -1,21 +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 - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in -*/ - -/* Function to close serial port opened. */ - -#include "types.h" -#include "RPIPeripheralSerial.h" - -void u8RPISerialCloses(int fd) -{ - serialClose (fd); -} diff --git a/2.3-1/src/c/hardware/rasberrypi/serial/u8RPISerialFlushs.c b/2.3-1/src/c/hardware/rasberrypi/serial/u8RPISerialFlushs.c deleted file mode 100644 index c80a92c5..00000000 --- a/2.3-1/src/c/hardware/rasberrypi/serial/u8RPISerialFlushs.c +++ /dev/null @@ -1,21 +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 - 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 u8RPISerialFlushs(int fd) -{ - serialFlush(fd); -} diff --git a/2.3-1/src/c/hardware/rasberrypi/serial/u8RPISerialSendChars.c b/2.3-1/src/c/hardware/rasberrypi/serial/u8RPISerialSendChars.c deleted file mode 100644 index e3813514..00000000 --- a/2.3-1/src/c/hardware/rasberrypi/serial/u8RPISerialSendChars.c +++ /dev/null @@ -1,21 +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 - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in -*/ - -/* Function to send 8-bit char on specified serial port. */ - -#include "types.h" -#include "RPIPeripheralSerial.h" - -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 deleted file mode 100644 index 9d097141..00000000 --- a/2.3-1/src/c/hardware/rasberrypi/serial/u8RPISerialSendDataa.c +++ /dev/null @@ -1,27 +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 - 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/u8RPISerialSendDatas.c b/2.3-1/src/c/hardware/rasberrypi/serial/u8RPISerialSendDatas.c deleted file mode 100644 index 9edb439f..00000000 --- a/2.3-1/src/c/hardware/rasberrypi/serial/u8RPISerialSendDatas.c +++ /dev/null @@ -1,22 +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 - 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" - -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 new file mode 100644 index 00000000..d6977798 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/soft/u8RPI_softPwmCreates.c @@ -0,0 +1,19 @@ +/* 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 new file mode 100644 index 00000000..761fdc23 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/soft/u8RPI_softPwmStops.c @@ -0,0 +1,17 @@ +/* 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 new file mode 100644 index 00000000..2b76d148 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/soft/u8RPI_softPwmWrites.c @@ -0,0 +1,17 @@ +/* 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 new file mode 100644 index 00000000..dfcbb1fb --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/soft/u8RPI_softToneCreates.c @@ -0,0 +1,19 @@ +/* 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 new file mode 100644 index 00000000..664fbda4 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/soft/u8RPI_softToneStops.c @@ -0,0 +1,17 @@ +/* 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 new file mode 100644 index 00000000..be04b476 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/soft/u8RPI_softToneWrites.c @@ -0,0 +1,17 @@ +/* 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/threading/u16RPIThreadCreates.c b/2.3-1/src/c/hardware/rasberrypi/threading/u16RPIThreadCreates.c deleted file mode 100644 index c05c959c..00000000 --- a/2.3-1/src/c/hardware/rasberrypi/threading/u16RPIThreadCreates.c +++ /dev/null @@ -1,24 +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 - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in -*/ - -/* Function to create thread for given function */ - -#include "types.h" -#include "RPIPeripheralThreading.h" - -uint16 RPIThreadCreate(void *(*threadFunction)(void*)) -{ - int status; - status = piThreadCreate (threadFunction); - return status; -} - diff --git a/2.3-1/src/c/hardware/rasberrypi/timing/u16RPIDelayMicros.c b/2.3-1/src/c/hardware/rasberrypi/timing/u16RPIDelayMicros.c deleted file mode 100644 index 9aeeab7d..00000000 --- a/2.3-1/src/c/hardware/rasberrypi/timing/u16RPIDelayMicros.c +++ /dev/null @@ -1,22 +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 - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in -*/ - -/* Function to insert some delay in code execution. */ - -#include "types.h" -#include "RPIPeripheralTiming.h" - -void u16RPIDelayMicros(uint16 time) -{ - delayMicroseconds(time); -} - diff --git a/2.3-1/src/c/hardware/rasberrypi/timing/u16RPIDelayMillis.c b/2.3-1/src/c/hardware/rasberrypi/timing/u16RPIDelayMillis.c deleted file mode 100644 index 26790861..00000000 --- a/2.3-1/src/c/hardware/rasberrypi/timing/u16RPIDelayMillis.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: Siddhesh Wani - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in -*/ - -/* Function to insert some delay in code execution. */ - - - -#include "types.h" -#include "RPIPeripheralTiming.h" - -void u16RPIDelayMillis(uint16 time) -{ - delay(time); - -} - diff --git a/2.3-1/src/c/hardware/rasberrypi/timing/u32RPIGetMicros.c b/2.3-1/src/c/hardware/rasberrypi/timing/u32RPIGetMicros.c deleted file mode 100644 index eb086a9f..00000000 --- a/2.3-1/src/c/hardware/rasberrypi/timing/u32RPIGetMicros.c +++ /dev/null @@ -1,21 +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 - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in -*/ - -/* Function to get time in microsecond since first setup function called */ - -#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/u32RPIGetMillis.c b/2.3-1/src/c/hardware/rasberrypi/timing/u32RPIGetMillis.c deleted file mode 100644 index c1189753..00000000 --- a/2.3-1/src/c/hardware/rasberrypi/timing/u32RPIGetMillis.c +++ /dev/null @@ -1,21 +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 - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in -*/ - -/* Function to get time in millisecond since first setup function called */ - -#include "types.h" -#include "RPIPeripheralTiming.h" - -uint32 u32RPIGetMillis() -{ - return(millis()); -} \ No newline at end of file -- cgit