diff options
| author | zms123456 <[email protected]> | 2024-04-07 21:57:38 +0800 |
|---|---|---|
| committer | Meco Man <[email protected]> | 2024-04-16 22:45:04 -0400 |
| commit | a075fd69d068ba6b2cdf60bd65090cdfa1b68c12 (patch) | |
| tree | d833fcfb00ad6a0dcb117b9eecbaa09058e4a069 /components/drivers/include/rtdevice.h | |
| parent | 065e742d40cf400238240bdbb1d71522299e6e81 (diff) | |
[components][drivers]add ofw support i2c
Diffstat (limited to 'components/drivers/include/rtdevice.h')
| -rw-r--r-- | components/drivers/include/rtdevice.h | 39 |
1 files changed, 22 insertions, 17 deletions
diff --git a/components/drivers/include/rtdevice.h b/components/drivers/include/rtdevice.h index 5da3c955d6..c930904919 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> @@ -37,6 +38,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 @@ -79,6 +97,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 @@ -181,23 +203,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 |
