소스 검색

[fix]避免字符设备特殊控制指令和通用控制指令冲突

jonas 2 년 전
부모
커밋
aaba21c938
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      include/rtdef.h

+ 1 - 1
include/rtdef.h

@@ -1187,7 +1187,7 @@ enum rt_device_class_type
 /**
  * device control
  */
-#define RT_DEVICE_CTRL_BASE(Type)        (RT_Device_Class_##Type * 0x100)
+#define RT_DEVICE_CTRL_BASE(Type)        ((RT_Device_Class_##Type + 1) * 0x100)
 
 /**
  * special device commands