/*~**********************************************************************
Title........ devices.c
Date......... Mon Jul  5 11:15:02  1999
Author....... J.M.Tarrant
Description.. The system device list, all devices attached to the system
............. have thier drivers loaded in the order they appear in this
............. list.
***********************************************************************~*/
/****	Include Files */

	#include	"hardware.h"
	#include	"peripherals.h"

	#include	"interface.h"
	#include	"devices.p"

/****	Local Definitions */
/****	Global Variables */
/****	Local Variables */
/****	Global Constants */
/****	Device Install List

		This list defines the device drivers which will be installed on startup.
		The first field points to a device,which may be installed dependant on the value
		(TRUE/FALSE) returned by the device selector function (second field).
		Where devices have multiple configuration options the configuration used is
		dependant on the index returned by the configuration selector function
		(third field) A zero in place of a device selector function means always install
		the device. A zero in place of the configuration selector means that the configuration
		list contains only one entry and that configuration is to be used.
		*/

const	INSTALLDEVICE	DeviceList[]=
		{
		{&LampDevice		,0	,0,0},
		{&MXIDevice			,0	,0,0},
		{&OutputDevice		,0	,0,0},
		{&SoundDevice		,0	,0,0},
		{&SerialDevice		,0	,0,0},
//		{&DUART0Device		,0	,0,0},
//		{&DUART1Device		,0	,0,0},
//		{&DUART2Device		,0	,0,0},
		{&I2CPICDevice 		,0	,0,0},
		{&PICDevice 		,0	,0,0},
		{&TimerDevice		,0	,0,0},
//		{&StepperDevice		,0	,0,0},
//		{&CremsonDevice		,0	,0,0},
		{&CalypsoDevice		,0	,0,0},
//		{&CDRomDevice		,0	,0,0},
		{0,0,0}
		};

/****	Constant Device Type Lists
		These lists are used by higher level logical drivers to make a number of physical
		devices of the same type appear as a single device
		E.G. Two DUARTS with separate drivers will look like a single device with four
		ports (Device lists with one entry are just for completeness) */

const	DEVICE*const	InputDevices[]={&MXIDevice,0};
const	DEVICE*const	OutputDevices[]={&OutputDevice,0};
const	DEVICE*const	LampDevices[]={&LampDevice,0};
const	DEVICE*const	SoundDevices[]={&SoundDevice,0};
const	DEVICE*const	SerialDevices[]={&SerialDevice,0};
const	DEVICE*const	SteppersDevices[]={&StepperDevice,0};

/****	Variable Device Type Lists
		These are built at runtime for device types where the devices are autodetected or
		may vary depending on option switch settings */


/****	Device Type Build List
		This list defines which device type lists are to be built at runtime and which
		device type they are associated with */

const	BUILDTYPE		DeviceTypeBuildList[]=
		{
		{0,0}
		};

/****	Local Constants */
/****	Option Lists
		These are used to determine which configuration is used */

/************************************************************************
*****	Functions
*************************************************************************/
/************************************************************************/