/****************************************************************************/
/* Copyright 2010, © Bendor Research Pty. Ltd. All rights reserved.			*/
/* Permission is granted to use this software for any purpose whatsoever	*/
/* as long as this copyright notice is preserved. The code is provided		*/
/* "as is", with no explicit, implicit or implied warranty or guarantee		*/
/* of any kind and Bendor Research Pty. Ltd. can not be held liable for		*/
/* any loss or damages arising out of the use of this software.				*/
/****************************************************************************/
/*																			*/
/*	Include file describing the Philips LPC210x parallel I/O system			*/
/*	~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~			*/
/*																			*/
/*	2011 Jan	ZK		Generated from the LPC23xx version					*/
/*																			*/
/****************************************************************************/

#ifndef _LPC210X_PIO
#define _LPC210X_PIO

/*
*	APB access to ports
*/

struct lpc210x_pio {

	unsigned pin;					// Pin status / state
	unsigned set;					// Set pins to 1
	unsigned dir;					// Pin direction (1:out)
	unsigned clr;					// Clear pins to 0
};

/*
*	AHB access to ports
*/

struct	lpc210x_fio {

	unsigned dir;					// Pin direction (1:out)
	unsigned _[3];
	unsigned mask;					// Pin/set/clr mask
	unsigned pin;					// Pin status and state control
	unsigned set;					// Set pins to 1
	unsigned clr;					// Clear pins to 0
};

/*
*	Parallel port instances
*/

static volatile struct lpc210x_pio * const lpc_pio = (void *) 0xe0028000;
static volatile struct lpc210x_fio * const lpc_fio = (void *) 0x3fffc000;

#endif

