/**************************************************************************
	board_id.c

   Z-World, 2001
	This sample program is for the Smart Star series controllers.
	
	This program will detect the controller type that you have (via product
	ID) and will display that information in the STDIO window. Here's the
	controllers product information. 

	Board Setup:
	------------------------
	1. Connect a +24v power source to the backplane PWR connector
	   as follows:

	   PS     	Backplane
	   --			-----------------
	   +24v		+RAW Terminal  
	   GND      GND Terminal


	Product ID     Product Description
	---------- 		-------------------
	0x0502			SR9100...25Mhz Smart Star, no ethernet
	0x0C00			SR9150...22MHz SmartStar CPU, ethernet
	0x0C01			SR9160...22MHz SmartStar CPU, no ethernet
			 
**************************************************************************/

///////////////////////////////////////////////////////////////////////////

main()
{
	auto char *ptr[4];
	auto int i;

	ptr[2] = "SR9100...25Mhz Smart Star, no ethernet";
	ptr[0] = "SR9150...22MHz SmartStar CPU, ethernet";
	ptr[1] = "SR9160...22MHz SmartStar CPU, no ethernet";

	if (_BOARD_TYPE_ != 0x0C00 && _BOARD_TYPE_ != 0x0C01 && _BOARD_TYPE_ != 0x0502)
	{
		printf("\n\n\rInvalid controller BOARD_ID detected!!!");
	}
	else
	{
		i = _BOARD_TYPE_ & 0x000f;
		// display controller information in the STDIO window	
		printf("\n\n\rController is a %s", ptr[i]);
	}
}


	