PageRenderTime 102ms CodeModel.GetById 60ms app.highlight 2ms RepoModel.GetById 38ms app.codeStats 0ms

/src/backend/ucosii/ftk_backend_ucosii.c

http://ftk.googlecode.com/
C | 34 lines | 27 code | 7 blank | 0 comment | 4 complexity | 626868a1728b51883bf4d27dee7ee13f MD5 | raw file
 1#include "ftk_log.h"
 2#include "ftk_globals.h"
 3#include "ftk_display_ucosii.h"
 4#include "ftk_source_input.h"
 5#include "ftk_wnd_manager.h"
 6
 7static Ret ftk_init_input(void)
 8{
 9	const char* tsdev = NULL;
10	FtkSource* source = NULL;
11	
12	source = ftk_source_input_create((FtkOnEvent)ftk_wnd_manager_queue_event_auto_rotate, ftk_default_wnd_manager());
13
14	if(source != NULL)
15	{
16		ftk_sources_manager_add(ftk_default_sources_manager(), source);
17	}
18
19	return RET_OK;
20}
21
22Ret ftk_backend_init(int argc, char* argv[])
23{
24	ftk_init_input();
25	ftk_set_display(ftk_display_ucosii_create());
26	if(ftk_default_display() == NULL)
27	{
28		ftk_loge("open display failed.\n");
29		exit(0);
30	}
31
32	return RET_OK;
33}
34