From 2114b73b4b1c2e9171259521e5efab01f20f9a67 Mon Sep 17 00:00:00 2001 From: "bernard.xiong@gmail.com" Date: Fri, 5 Oct 2012 08:44:10 +0000 Subject: [PATCH] Add _MSC_VER compiler checking; Add DEVICE_CTRL_BLK_SYNC flag. git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2315 bbd45198-f89e-11dd-88c7-29a3b14d5316 --- include/rtdef.h | 12 +++++++++++- include/rtthread.h | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/include/rtdef.h b/include/rtdef.h index e749e2413..042235c09 100644 --- a/include/rtdef.h +++ b/include/rtdef.h @@ -133,6 +133,13 @@ typedef rt_base_t rt_off_t; /* Type for offset */ #define ALIGN(n) __attribute__((aligned(n))) #define rt_inline static inline #define RTT_API +#elif defined (_MSC_VER) + #include + #define SECTION(x) + #define UNUSED + #define ALIGN(n) __declspec(align(n)) + #define rt_inline static __inline + #define RTT_API #endif /* event length */ @@ -680,7 +687,8 @@ enum rt_device_class_type * special device commands */ #define RT_DEVICE_CTRL_CHAR_STREAM 0x10 /* stream mode on char device */ -#define RT_DEVICE_CTRL_BLK_GETGEOME 0x10 /* get geometry information */ +#define RT_DEVICE_CTRL_BLK_GETGEOME 0x10 /* get geometry information */ +#define RT_DEVICE_CTRL_BLK_SYNC 0x11 /* flush data to block device */ #define RT_DEVICE_CTRL_NETIF_GETMAC 0x10 /* get mac address */ #define RT_DEVICE_CTRL_MTD_FORMAT 0x10 /* format a MTD device */ #define RT_DEVICE_CTRL_RTC_GET_TIME 0x10 /* get time */ @@ -738,6 +746,8 @@ struct rt_device_blk_geometry #define RTGRAPHIC_CTRL_POWEROFF 2 #define RTGRAPHIC_CTRL_GET_INFO 3 #define RTGRAPHIC_CTRL_SET_MODE 4 +#define RTGRAPHIC_CTRL_FILL_RECT 5 +#define RTGRAPHIC_CTRL_DRAW_RECT 6 /* graphic deice */ enum diff --git a/include/rtthread.h b/include/rtthread.h index a78b5f823..8a5d97bea 100644 --- a/include/rtthread.h +++ b/include/rtthread.h @@ -23,7 +23,7 @@ #include #include #include -#include +#include #ifdef __cplusplus extern "C" { -- GitLab