summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author[email protected] <[email protected]>2012-10-05 08:44:10 +0000
committer[email protected] <[email protected]>2012-10-05 08:44:10 +0000
commit2114b73b4b1c2e9171259521e5efab01f20f9a67 (patch)
tree9aa367aae1bc180ed8eaa76502ac5921b7fc24cf
parentc75867fc5fe4b78dac60cf81bbd8bbb65772c215 (diff)
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
-rw-r--r--include/rtdef.h12
-rw-r--r--include/rtthread.h2
2 files changed, 12 insertions, 2 deletions
diff --git a/include/rtdef.h b/include/rtdef.h
index e749e2413e..042235c09b 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 <stdarg.h>
+ #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 a78b5f823a..8a5d97bea1 100644
--- a/include/rtthread.h
+++ b/include/rtthread.h
@@ -23,7 +23,7 @@
#include <rtdef.h>
#include <rtdebug.h>
#include <rtservice.h>
-#include <rtm.h>
+#include <rtm.h>
#ifdef __cplusplus
extern "C" {