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

   Z-World, 2001
	This sample program is for the BL2100 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
	controller product information. 

	Product ID     Product Description
	---------- 		-------------------
	0x0B00			BL2100 22MHz, Ethernet, Digital I/O, w/Analog
	0x0B01			BL2110 22MHz, Ethernet, Digital I/O, No Analog
	0x0B02			BL2120 22MHz, No Ethernet, Digital I/O, w/Analog
	0x0B03			BL2130 22MHz, No Ethernet, Digital I/O, No Analog
			 
**************************************************************************/

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

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

	ptr[0] = "BL2100...22MHz, Ethernet, Digital I/O, w/Analog";
	ptr[1] = "BL2110...22MHz, Ethernet, Digital I/O, No Analog";
	ptr[2] = "BL2120...22MHz, No Ethernet, Digital I/O, w/Analog";
	ptr[3] = "BL2130...22MHz, No Ethernet, Digital I/O, No Analog";	

	if(_BOARD_TYPE_ < 0x0B00 || _BOARD_TYPE_ > 0x0B03)
	{
		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]);
	}
}


	