/***********************************************************************************
	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
	0x0B04			BL2105 22MHz, Ethernet, Digital I/O, w/Analog (512K Flash & SRAM)
	0x0B05			BL2115 22MHz, Ethernet, Digital I/O, No Analog (512K Flash & SRAM)
			 
************************************************************************************/
#class auto


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

void main()
{
	auto char *ptr[6];
	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";
	ptr[4] = "BL2105...22MHz, Ethernet, Digital I/O, w/Analog\n(512K Flash & SRAM)";
	ptr[5] = "BL2115...22MHz, Ethernet, Digital I/O, No Analog\n(512K Flash & SRAM)";

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


	


