From b43eccd4cffed5bd1017c5821524fb6e49202f78 Mon Sep 17 00:00:00 2001 From: Sandeep Gupta Date: Sun, 18 Jun 2017 23:55:40 +0530 Subject: First commit --- .../c/hardware/avr/includes/AVRPeripheralGPIO.h | 54 ++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 2.3-1/src/c/hardware/avr/includes/AVRPeripheralGPIO.h (limited to '2.3-1/src/c/hardware/avr/includes/AVRPeripheralGPIO.h') diff --git a/2.3-1/src/c/hardware/avr/includes/AVRPeripheralGPIO.h b/2.3-1/src/c/hardware/avr/includes/AVRPeripheralGPIO.h new file mode 100644 index 00000000..9a8d2d65 --- /dev/null +++ b/2.3-1/src/c/hardware/avr/includes/AVRPeripheralGPIO.h @@ -0,0 +1,54 @@ +// 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 +// Organization: FOSSEE, IIT Bombay +// Author: Ashish Kamble +// Email: toolbox@scilab.in + + +#ifndef __AVRPERIPHERALGPIO_H__ +#define __AVRPERIPHERALGPIO_H__ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + + +#include +#include "types.h" + +//Port definitions +#define PORT_A 1 +#define PORT_B 2 +#define PORT_C 3 +#define PORT_D 4 + +//Direction definitions +#define INPUT 0 +#define OUTPUT 1 + +//Pin state definitions +#define LOW 0 +#define HIGH 1 + +//Function prototypes +void u8AVRDigitalSetups(uint8 port,uint8 pin,uint8 direction); + +uint8 u8AVRDigitalIns(uint8 port,uint8 pin); + +void u8AVRDigitalOuts(uint8 port,uint8 pin,uint8 state); + +uint8 u8AVRDigitalPortSetups(uint8 port,uint8 direction); + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__AVRPERIPHERALGPIO_H__ */ -- cgit