/* This function sets the pixel format that will apply to the 2D Engine.  */
void deSetPixelFormat(unsigned long bpp)
/* This function sets the pixel format that will apply to the 2D Engine.  */
void deSetPixelFormat(unsigned long bpp)
{
	unsigned long de_format;
	de_format = SMTC_read2Dreg(DE_STRETCH_FORMAT);
	switch (bpp) {
	case 8:
		de_format =
		    FIELD_SET(de_format, DE_STRETCH_FORMAT, PIXEL_FORMAT, 8);
		break;
	default:
	case 16:
		de_format =
		    FIELD_SET(de_format, DE_STRETCH_FORMAT, PIXEL_FORMAT, 16);
		break;
	case 32:
		de_format =
		    FIELD_SET(de_format, DE_STRETCH_FORMAT, PIXEL_FORMAT, 32);
		break;
	}
	SMTC_write2Dreg(DE_STRETCH_FORMAT, de_format);
}