Exemple #1
0
ft_void_t Ft_App_Flush_DL_Buffer(Ft_Gpu_Hal_Context_t *phost)
{
#ifdef  BUFFER_OPTIMIZATION    
   if (Ft_DlBuffer_Index> 0)
     Ft_Gpu_Hal_WrMem(phost,RAM_DL,Ft_DlBuffer,Ft_DlBuffer_Index);
#endif     
   Ft_DlBuffer_Index = 0;
   
}
int32 main(int32 argc,char *argv[]){
	Ft_Gpu_HalInit_t halinit;

	halinit.TotalChannelNum = 1;

	printf("3.05.2014\n");

#ifdef USEDLL
	if(NULL==installMPSSE()){
		printf("libmpsse.dll not loaded\n");
		exit(1);
	}
	printf("libmpsse.dll installed OK\n");
#endif

	Init_libMPSSE();		//OK

	Ft_Gpu_Hal_Init(&halinit);

	host.hal_config.channel_no=0;
	host.hal_config.spi_clockrate_khz=12000; //in KHz
	Ft_Gpu_Hal_Open(&host);
	phost=&host;

	printf("po Ft_Gpu_Hal_Open: %x\n", host.hal_handle);

	SAMAPP_BootupConfig();

	printf("reg_touch_rz =0x%x ", Ft_Gpu_Hal_Rd16(phost, REG_TOUCH_RZ));
	printf("reg_touch_rzthresh =0x%x ", Ft_Gpu_Hal_Rd32(phost, REG_TOUCH_RZTHRESH));
	printf("reg_touch_tag_xy=0x%x",Ft_Gpu_Hal_Rd32(phost, REG_TOUCH_TAG_XY));
	printf("reg_touch_tag=0x%x",Ft_Gpu_Hal_Rd32(phost, REG_TOUCH_TAG));

	Ft_Gpu_Hal_WrMem(phost,RAM_DL,(uint8 *)FT_DLCODE_BOOTUP,sizeof(FT_DLCODE_BOOTUP));
	Ft_Gpu_Hal_Wr8(phost,REG_DLSWAP,DLSWAP_FRAME);

	Ft_Gpu_Hal_Sleep(1000);

	SAMAPP_API_Screen("Lurch car system");
	mainControler();

	/* Close all the opened handles */
	Ft_Gpu_Hal_Close(phost);
	Ft_Gpu_Hal_DeInit();
	return 0;
}