/****************************************************************************/
/* 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 LPC23xx D/A converter module		*/
/*	~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~		*/
/*																			*/
/*	2010 Mar	ZK		Original											*/
/*	2010 May	ZK		Modified to match NXP's names						*/
/*																			*/
/****************************************************************************/

#ifndef _LPC23XX_DAC
#define _LPC23XX_DAC

struct lpc23xx_dac {

	unsigned dacr;						// D/A conversion register
};

#define	DAC_DACR_VALUE		  0x0ffc0	// Value mask
#define	DAC_DACR_VALUE_SFT	  6			// Value right shift amount
#define	DAC_DACR_VALUE_SET(v) ((v)<<6)	// Setting the value
#define	DAC_DACR_BIAS		  0x10000	// Bias current .7mA(0) or .35mA(1)

static volatile struct lpc23xx_dac * const lpc_dac = (void *) 0xe006c000;

#endif

