示例#1
0
//! \brief init mutex and Picture structures
//! \return -2 bei mutex init error
//! \return 42 (no problems)
int init()
{
    picture_init(&g_rgbPicture);
    picture_init(&g_yuvPicture);
    g_rgbPicture.rgb = 1;
    g_yuvPicture.rgb = 0;
    printf("Capture Modul init!\n");

    mutex = mutex_init();
    if(!mutex)
    {
        printf("capture.init Fehler bei mutex_init\n");
        return -2;
    }

    return 42;
}
示例#2
0
void rt_init_thread_entry(void* parameter)
{
	/* initialize spi driver */
	rt_hw_spi_init();
	
	/* Filesystem Initialization */
	mci_hw_init("sd0");
	/* initialize the device file system */
	dfs_init();
	/* initialize the elm chan FatFS file system*/
	elm_init();

	/* mount sd card fat partition 1 as root directory */
	if (dfs_mount("sd0", "/", "elm", 0, 0) == 0)
	{
		rt_kprintf("File System initialized!\n");

		#if (RT_DFS_ELM_USE_LFN != 0) && (defined RT_DFS_ELM_CODE_PAGE_FILE)
        {
                extern void ff_convert_init(void);
                ff_convert_init();
        }
		#endif
	}
	else
	{
		rt_kprintf("File System initialzation failed!\n");
	}
  /* initialize lcd driver */
	rtgui_lcd_init();
	/* initialize GUI system */
	rtgui_system_server_init();
	/* initialize keyboard */
	rt_hw_key_init();
	/* initialize touch and calibration */
	touch_calibration_init();

  /* picture viwer initializtion */
	picture_init();

	finsh_system_init();
}