PageRenderTime 17ms CodeModel.GetById 15ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/src/os/rt-thread/ftk_rtthread.h

http://ftk.googlecode.com/
C++ Header | 71 lines | 31 code | 11 blank | 29 comment | 0 complexity | a285ed9fb87f0e752a85d1470bab21db MD5 | raw file
 1/*
 2 * File: ftk_rtthread.c
 3 * Author:  Jiao JinXing <jiaojinxing1987@gmail.com>
 4 * Brief:   RT-Thread specific functions.
 5 *
 6 * Copyright (c) 2009 - 2010  Jiao JinXing <jiaojinxing1987@gmail.com>
 7 *
 8 * Licensed under the Academic Free License version 2.1
 9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
23 */
24
25/*
26 * History:
27 * ================================================================
28 * 2010-10-2 Jiao JinXing <jiaojinxing1987@gmail.com> created
29 *
30 */
31
32#ifndef __FTK_RTTHREAD_H__
33#define __FTK_RTTHREAD_H__
34
35#include <rtthread.h>
36#include <sys/time.h>
37#include <sys/types.h>
38#include <sys/dirent.h>
39#include <dfs_posix.h>
40#include "ftk_select_rtthread.h"
41
42#define FTK_ROOT_DIR                    "/ftk"
43#define DATA_DIR                        FTK_ROOT_DIR
44#define LOCAL_DATA_DIR                  FTK_ROOT_DIR
45#define FTK_DATA_ROOT                   FTK_ROOT_DIR"/data"
46#define TESTDATA_DIR                    FTK_ROOT_DIR"/testdata"
47#define APP_DATA_DIR                    FTK_ROOT_DIR"/apps"
48#define APP_LOCAL_DATA_DIR              FTK_ROOT_DIR"/apps"
49
50#define FTK_FONT                        "gb2312.fnt"
51
52#define ftk_strncpy                     strncpy
53#define ftk_snprintf                    rt_snprintf
54#define ftk_vsnprintf                   vsnprintf
55#define ftk_getcwd                      getcwd
56#define ftk_sscanf                      sscanf
57
58#define FTK_PATH_DELIM                  '/'
59
60#define USE_FTK_MAIN
61#define FTK_HAS_DLOPEN
62
63#define usleep(us)			            rt_thread_sleep(us*1000/RT_TICK_PER_SECOND)
64#define select 							ftk_rtthread_select
65#define printf							rt_kprintf
66
67#define HAS_BMP
68#define HAS_PNG
69#define HAS_JPEG
70
71#endif // __FTK_RTTHREAD_H__