XilinxProcessorIPLib/drivers/mipicsiss/examples/xmipi_vck_example/xmipi_vck190_example.c
u32 SetupDSI(void)
{
	XDsiTxSs_Config *DsiTxSsCfgPtr = NULL;
	u32 Status;
	u32 PixelFmt;

	DsiTxSsCfgPtr = XDsiTxSs_LookupConfig(XDSITXSS_DEVICE_ID);

	if (!DsiTxSsCfgPtr) {
		xil_printf("DSI Tx SS Device Id not found\r\n");
		return XST_FAILURE;
	}

	Status = XDsiTxSs_CfgInitialize(&DsiTxSs, DsiTxSsCfgPtr,
			DsiTxSsCfgPtr->BaseAddr);
	if (Status != XST_SUCCESS) {
		xil_printf("DSI Tx Ss Cfg Init failed status = %d \
				\r\n",Status);
		return Status;
	}

	PixelFmt = XDsiTxSs_GetPixelFormat(&DsiTxSs);

	if (PixelFmt != 0x3E) {
		xil_printf("DSI Pixel format is not correct ");
		switch (PixelFmt) {
			case 0x0E:
				xil_printf("Packed RGB565");
				break;
			case 0x1E:
				xil_printf("Packed RGB666");
				break;
			case 0x2E:
				xil_printf("Loosely packed RGB666");
				break;
			case 0x3E:
				xil_printf("Packed RGB888");
				break;
			case 0x0B:
				xil_printf("Compressed Pixel Stream");
				break;
			default:
				xil_printf("Invalid data type");
		}
		xil_printf("\r\n");
		xil_printf("Expected is 0x3E for RGB888\r\n");
		return XST_FAILURE;
	}

	return Status;
}
/*****************************************************************************/
/**
 * This function initializes MIPI DSI SS and gets config parameters.
 *
 * @return	None.
 *
 * @note	None.
 *
 *****************************************************************************/
This function initializes MIPI DSI SS and gets config parameters.
@return      None.

@note        None.
This function initializes MIPI DSI SS and gets config parameters . @return None . @note None .
u32 SetupDSI(void)
{
	XDsiTxSs_Config *DsiTxSsCfgPtr = NULL;
	u32 Status;
	u32 PixelFmt;
	DsiTxSsCfgPtr = XDsiTxSs_LookupConfig(XDSITXSS_DEVICE_ID);
	if (!DsiTxSsCfgPtr) {
		xil_printf("DSI Tx SS Device Id not found\r\n");
		return XST_FAILURE;
	}
	Status = XDsiTxSs_CfgInitialize(&DsiTxSs, DsiTxSsCfgPtr,
			DsiTxSsCfgPtr->BaseAddr);
	if (Status != XST_SUCCESS) {
		xil_printf("DSI Tx Ss Cfg Init failed status = %d \
				\r\n",Status);
		return Status;
	}
	PixelFmt = XDsiTxSs_GetPixelFormat(&DsiTxSs);
	if (PixelFmt != 0x3E) {
		xil_printf("DSI Pixel format is not correct ");
		switch (PixelFmt) {
			case 0x0E:
				xil_printf("Packed RGB565");
				break;
			case 0x1E:
				xil_printf("Packed RGB666");
				break;
			case 0x2E:
				xil_printf("Loosely packed RGB666");
				break;
			case 0x3E:
				xil_printf("Packed RGB888");
				break;
			case 0x0B:
				xil_printf("Compressed Pixel Stream");
				break;
			default:
				xil_printf("Invalid data type");
		}
		xil_printf("\r\n");
		xil_printf("Expected is 0x3E for RGB888\r\n");
		return XST_FAILURE;
	}
	return Status;
}
u32 SetupDSI ( void ) { XDsiTxSs_Config * DsiTxSsCfgPtr = NULL ; u32 Status ; u32 PixelFmt ; DsiTxSsCfgPtr = XDsiTxSs_LookupConfig ( XDSITXSS_DEVICE_ID ) ; if ( ! DsiTxSsCfgPtr ) { xil_printf ( " \r \n " ) ; return XST_FAILURE ; } Status = XDsiTxSs_CfgInitialize ( & DsiTxSs , DsiTxSsCfgPtr , DsiTxSsCfgPtr -> BaseAddr ) ; if ( Status != XST_SUCCESS ) { xil_printf ( " \
 \r \n " , Status ) ; return Status ; } PixelFmt = XDsiTxSs_GetPixelFormat ( & DsiTxSs ) ; if ( PixelFmt != 0x3E ) { xil_printf ( " " ) ; switch ( PixelFmt ) { case 0x0E : xil_printf ( " " ) ; break ; case 0x1E : xil_printf ( " " ) ; break ; case 0x2E : xil_printf ( " " ) ; break ; case 0x3E : xil_printf ( " " ) ; break ; case 0x0B : xil_printf ( " " ) ; break ; default : xil_printf ( " " ) ; } xil_printf ( " \r \n " ) ; xil_printf ( " \r \n " ) ; return XST_FAILURE ; } return Status ; }
This function initializes MIPI DSI SS and gets config parameters.
This function initializes MIPI DSI SS and gets config parameters .