Forráskód Böngészése

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
bernard.xiong@gmail.com 13 éve
szülő
commit
2114b73b4b
2 módosított fájl, 12 hozzáadás és 2 törlés
  1. 11 1
      include/rtdef.h
  2. 1 1
      include/rtthread.h

+ 11 - 1
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

+ 1 - 1
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" {