/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. * History:
  26. * ================================================================
  27. * 2010-10-2 Jiao JinXing <jiaojinxing1987@gmail.com> created
  28. *
  29. */
  30. #ifndef __FTK_RTTHREAD_H__
  31. #define __FTK_RTTHREAD_H__
  32. #include <rtthread.h>
  33. #include <sys/time.h>
  34. #include <sys/types.h>
  35. #include <sys/dirent.h>
  36. #include <dfs_posix.h>
  37. #include "ftk_select_rtthread.h"
  38. #define FTK_ROOT_DIR "/ftk"
  39. #define DATA_DIR FTK_ROOT_DIR
  40. #define LOCAL_DATA_DIR FTK_ROOT_DIR
  41. #define FTK_DATA_ROOT FTK_ROOT_DIR"/data"
  42. #define TESTDATA_DIR FTK_ROOT_DIR"/testdata"
  43. #define APP_DATA_DIR FTK_ROOT_DIR"/apps"
  44. #define APP_LOCAL_DATA_DIR FTK_ROOT_DIR"/apps"
  45. #define FTK_FONT "gb2312.fnt"
  46. #define ftk_strncpy strncpy
  47. #define ftk_snprintf rt_snprintf
  48. #define ftk_vsnprintf vsnprintf
  49. #define ftk_getcwd getcwd
  50. #define ftk_sscanf sscanf
  51. #define FTK_PATH_DELIM '/'
  52. #define USE_FTK_MAIN
  53. #define FTK_HAS_DLOPEN
  54. #define usleep(us) rt_thread_sleep(us*1000/RT_TICK_PER_SECOND)
  55. #define select ftk_rtthread_select
  56. #define printf rt_kprintf
  57. #define HAS_BMP
  58. #define HAS_PNG
  59. #define HAS_JPEG
  60. #endif // __FTK_RTTHREAD_H__