rtdevice.h 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. /*
  2. * Copyright (c) 2006-2023, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2012-01-08 bernard first version.
  9. * 2014-07-12 bernard Add workqueue implementation.
  10. */
  11. #ifndef __RT_DEVICE_H__
  12. #define __RT_DEVICE_H__
  13. #include <rtdef.h>
  14. #include <rtthread.h>
  15. #include <drivers/core/driver.h>
  16. #include <drivers/core/bus.h>
  17. #include <drivers/classes/block.h>
  18. #include <drivers/classes/char.h>
  19. #include <drivers/classes/graphic.h>
  20. #include <drivers/classes/mtd.h>
  21. #include <drivers/classes/net.h>
  22. #include "ipc/ringbuffer.h"
  23. #include "ipc/completion.h"
  24. #include "ipc/dataqueue.h"
  25. #include "ipc/workqueue.h"
  26. #include "ipc/condvar.h"
  27. #include "ipc/waitqueue.h"
  28. #include "ipc/pipe.h"
  29. #include "ipc/poll.h"
  30. #include "ipc/ringblk_buf.h"
  31. #ifdef __cplusplus
  32. extern "C" {
  33. #endif
  34. #define RT_DEVICE(device) ((rt_device_t)device)
  35. #ifdef RT_USING_DM
  36. #include "drivers/core/dm.h"
  37. #include "drivers/core/numa.h"
  38. #include "drivers/core/power_domain.h"
  39. #include "drivers/platform.h"
  40. #ifdef RT_USING_OFW
  41. #include "drivers/ofw.h"
  42. #include "drivers/ofw_fdt.h"
  43. #include "drivers/ofw_io.h"
  44. #include "drivers/ofw_irq.h"
  45. #include "drivers/ofw_raw.h"
  46. #endif /* RT_USING_OFW */
  47. #ifdef RT_USING_PIC
  48. #include "drivers/pic.h"
  49. #endif
  50. #endif /* RT_USING_DM */
  51. #ifdef RT_USING_RTC
  52. #include "drivers/rtc.h"
  53. #ifdef RT_USING_ALARM
  54. #include "drivers/alarm.h"
  55. #endif
  56. #endif /* RT_USING_RTC */
  57. #ifdef RT_USING_SPI
  58. #include "drivers/spi.h"
  59. #endif /* RT_USING_SPI */
  60. #ifdef RT_USING_MTD_NOR
  61. #include "drivers/mtd_nor.h"
  62. #endif /* RT_USING_MTD_NOR */
  63. #ifdef RT_USING_MTD_NAND
  64. #include "drivers/mtd_nand.h"
  65. #endif /* RT_USING_MTD_NAND */
  66. #ifdef RT_USING_USB_DEVICE
  67. #include "drivers/usb_device.h"
  68. #endif /* RT_USING_USB_DEVICE */
  69. #ifdef RT_USING_USB_HOST
  70. #include "drivers/usb_host.h"
  71. #endif /* RT_USING_USB_HOST */
  72. #ifdef RT_USING_SERIAL
  73. #ifdef RT_USING_SERIAL_V2
  74. #include "drivers/serial_v2.h"
  75. #else
  76. #include "drivers/serial.h"
  77. #endif
  78. #endif /* RT_USING_SERIAL */
  79. #ifdef RT_USING_I2C
  80. #include "drivers/i2c.h"
  81. #include "drivers/i2c_dev.h"
  82. #ifdef RT_USING_I2C_BITOPS
  83. #include "drivers/i2c-bit-ops.h"
  84. #endif /* RT_USING_I2C_BITOPS */
  85. #ifdef RT_USING_DM
  86. #include "drivers/i2c_dm.h"
  87. #endif /* RT_USING_DM */
  88. #endif /* RT_USING_I2C */
  89. #ifdef RT_USING_PHY
  90. #include "drivers/phy.h"
  91. #include "drivers/phy_mdio.h"
  92. #endif /* RT_USING_PHY */
  93. #ifdef RT_USING_SDIO
  94. #include "drivers/mmcsd_core.h"
  95. #include "drivers/sd.h"
  96. #include "drivers/sdio.h"
  97. #endif /* RT_USING_SDIO */
  98. #ifdef RT_USING_WDT
  99. #include "drivers/watchdog.h"
  100. #endif /* RT_USING_WDT */
  101. #ifdef RT_USING_PIN
  102. #include "drivers/pin.h"
  103. #endif /* RT_USING_PIN */
  104. #ifdef RT_USING_SENSOR
  105. #ifdef RT_USING_SENSOR_V2
  106. #include "drivers/sensor_v2.h"
  107. #else
  108. #include "drivers/sensor.h"
  109. #endif /* RT_USING_SENSOR_V2 */
  110. #endif /* RT_USING_SENSOR */
  111. #ifdef RT_USING_CAN
  112. #include "drivers/can.h"
  113. #endif /* RT_USING_CAN */
  114. #ifdef RT_USING_HWTIMER
  115. #include "drivers/hwtimer.h"
  116. #endif /* RT_USING_HWTIMER */
  117. #ifdef RT_USING_AUDIO
  118. #include "drivers/audio.h"
  119. #endif /* RT_USING_AUDIO */
  120. #ifdef RT_USING_CPUTIME
  121. #include "drivers/cputime.h"
  122. #endif /* RT_USING_CPUTIME */
  123. #ifdef RT_USING_ADC
  124. #include "drivers/adc.h"
  125. #endif /* RT_USING_ADC */
  126. #ifdef RT_USING_DAC
  127. #include "drivers/dac.h"
  128. #endif /* RT_USING_DAC */
  129. #ifdef RT_USING_PWM
  130. #include "drivers/rt_drv_pwm.h"
  131. #endif /* RT_USING_PWM */
  132. #ifdef RT_USING_PM
  133. #include "drivers/pm.h"
  134. #endif /* RT_USING_PM */
  135. #ifdef RT_USING_WIFI
  136. #include "drivers/wlan.h"
  137. #endif /* RT_USING_WIFI */
  138. #ifdef MTD_USING_NOR
  139. #include "drivers/mtdnor.h"
  140. #endif /* MTD_USING_NOR */
  141. #ifdef MTD_USING_NAND
  142. #include "drivers/mtdnand.h"
  143. #endif /* MTD_USING_NAND */
  144. #ifdef RT_USING_HWCRYPTO
  145. #include "drivers/crypto.h"
  146. #endif /* RT_USING_HWCRYPTO */
  147. #ifdef RT_USING_PULSE_ENCODER
  148. #include "drivers/pulse_encoder.h"
  149. #endif /* RT_USING_PULSE_ENCODER */
  150. #ifdef RT_USING_INPUT_CAPTURE
  151. #include "drivers/rt_inputcapture.h"
  152. #endif /* RT_USING_INPUT_CAPTURE */
  153. #ifdef RT_USING_TOUCH
  154. #include "drivers/touch.h"
  155. #endif
  156. #ifdef RT_USING_DEV_BUS
  157. #include "drivers/rt_dev_bus.h"
  158. #endif
  159. #ifdef RT_USING_LCD
  160. #include "drivers/lcd.h"
  161. #endif
  162. #ifdef RT_USING_CLK
  163. #include "drivers/clk.h"
  164. #endif /* RT_USING_CLK */
  165. #ifdef __cplusplus
  166. }
  167. #endif
  168. #endif /* __RT_DEVICE_H__ */