From 5df6d1cb2868abdc8df66755f76c997ee36c0b49 Mon Sep 17 00:00:00 2001 From: siddhu8990 Date: Mon, 1 Feb 2016 11:05:35 +0530 Subject: Support for RPi gpios added --- .../interfaces/int_RPIPeripheralDigital.h | 27 ++++++++++++++++++++++ .../rasberrypi/interfaces/int_RPIPeripheralUtil.h | 23 ++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralDigital.h create mode 100644 src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralUtil.h (limited to 'src/c/hardware/rasberrypi/interfaces') diff --git a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralDigital.h b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralDigital.h new file mode 100644 index 00000000..022bed56 --- /dev/null +++ b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralDigital.h @@ -0,0 +1,27 @@ +//This file defines constants corresponding to gpios. +// +// Authors +// Siddhesh Wani +// + +#ifndef __INT_RPIPERIPHERALGPIO_H__ +#define __INT_RPIPERIPHERALGPIO_H__ + +#include "types.h" +#include "RPIPeripheralDigital.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define RPI_DigitalSetup(in1,in2) u8RPIDigitalSetups((uint8) in1, (uint8) in2); + +#define RPI_DigitalIn(in1,in2) u8RPIDigitalIns((uint8) in1); + +#define RPI_DigitalOut(in1,in2) u8RPIDigitalOuts((uint8) in1, (uint8) in2); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__RPIPERIPHERALGPIO_H__ */ diff --git a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralUtil.h b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralUtil.h new file mode 100644 index 00000000..92020f9a --- /dev/null +++ b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralUtil.h @@ -0,0 +1,23 @@ +// +// Authors +// Siddhesh Wani +// + +#ifndef __INT_RPIPERIPHERALUTIL_H__ +#define __INT_RPIPERIPHERALUTIL_H__ + +#include "types.h" +#include "RPIPeripheralUtil.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define RPI_DelayMicro(in1) u16RPIDelayMicros((uint16) in1); +#define RPI_DelayMilli(in1) u16RPIDelayMillis((uint16) in1); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__RPIPERIPHERALUTIL_H__ */ -- cgit