summaryrefslogtreecommitdiff
path: root/components/drivers/include/rtdevice.h
diff options
context:
space:
mode:
authorzms123456 <[email protected]>2024-04-07 21:57:38 +0800
committerGitHub <[email protected]>2024-04-07 09:57:38 -0400
commit4ffcbfef2a05ac7f7962f8a7d718ea4c2a9b2a99 (patch)
treedbad864661cc50da8fd799bda490d23fdec65a81 /components/drivers/include/rtdevice.h
parent9c938e51a68a87a0be5fce014b4718f22db90803 (diff)
[components][drivers]add ofw support i2c
Diffstat (limited to 'components/drivers/include/rtdevice.h')
-rw-r--r--components/drivers/include/rtdevice.h39
1 files changed, 22 insertions, 17 deletions
diff --git a/components/drivers/include/rtdevice.h b/components/drivers/include/rtdevice.h
index 2445a65823..afb5bb2533 100644
--- a/components/drivers/include/rtdevice.h
+++ b/components/drivers/include/rtdevice.h
@@ -15,6 +15,7 @@
#include <rtdef.h>
#include <rtthread.h>
#include <drivers/core/driver.h>
+#include <drivers/core/bus.h>
#include <drivers/classes/block.h>
#include <drivers/classes/char.h>
@@ -38,6 +39,23 @@ extern "C" {
#define RT_DEVICE(device) ((rt_device_t)device)
+#ifdef RT_USING_DM
+#include "drivers/core/dm.h"
+#include "drivers/platform.h"
+
+#ifdef RT_USING_OFW
+#include "drivers/ofw.h"
+#include "drivers/ofw_fdt.h"
+#include "drivers/ofw_io.h"
+#include "drivers/ofw_irq.h"
+#include "drivers/ofw_raw.h"
+#endif /* RT_USING_OFW */
+
+#ifdef RT_USING_PIC
+#include "drivers/pic.h"
+#endif
+#endif /* RT_USING_DM */
+
#ifdef RT_USING_RTC
#include "drivers/rtc.h"
#ifdef RT_USING_ALARM
@@ -80,6 +98,10 @@ extern "C" {
#ifdef RT_USING_I2C_BITOPS
#include "drivers/i2c-bit-ops.h"
#endif /* RT_USING_I2C_BITOPS */
+
+#ifdef RT_USING_DM
+#include "drivers/i2c_dm.h"
+#endif /* RT_USING_DM */
#endif /* RT_USING_I2C */
#ifdef RT_USING_PHY
@@ -182,23 +204,6 @@ extern "C" {
#include "drivers/clk.h"
#endif /* RT_USING_CLK */
-#ifdef RT_USING_DM
-#include "drivers/core/dm.h"
-#include "drivers/platform.h"
-
-#ifdef RT_USING_OFW
-#include "drivers/ofw.h"
-#include "drivers/ofw_fdt.h"
-#include "drivers/ofw_io.h"
-#include "drivers/ofw_irq.h"
-#include "drivers/ofw_raw.h"
-#endif /* RT_USING_OFW */
-
-#ifdef RT_USING_PIC
-#include "drivers/pic.h"
-#endif
-#endif /* RT_USING_DM */
-
#ifdef __cplusplus
}
#endif