rtdevice.h 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  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_BLK
  41. #include "drivers/blk.h"
  42. #endif
  43. #ifdef RT_USING_DMA
  44. #include "drivers/dma.h"
  45. #endif
  46. #include "drivers/iio.h"
  47. #ifdef RT_USING_OFW
  48. #include "drivers/ofw.h"
  49. #include "drivers/ofw_fdt.h"
  50. #include "drivers/ofw_io.h"
  51. #include "drivers/ofw_irq.h"
  52. #include "drivers/ofw_raw.h"
  53. #endif /* RT_USING_OFW */
  54. #ifdef RT_USING_PIC
  55. #include "drivers/pic.h"
  56. #endif
  57. #ifdef RT_USING_SCSI
  58. #include "drivers/scsi.h"
  59. #endif
  60. #ifdef RT_MFD_SYSCON
  61. #include "drivers/syscon.h"
  62. #endif
  63. #endif /* RT_USING_DM */
  64. #ifdef RT_USING_RTC
  65. #include "drivers/dev_rtc.h"
  66. #ifdef RT_USING_ALARM
  67. #include "drivers/dev_alarm.h"
  68. #endif
  69. #endif /* RT_USING_RTC */
  70. #ifdef RT_USING_SPI
  71. #include "drivers/dev_spi.h"
  72. #endif /* RT_USING_SPI */
  73. #ifdef RT_USING_MTD_NOR
  74. #include "drivers/mtd_nor.h"
  75. #endif /* RT_USING_MTD_NOR */
  76. #ifdef RT_USING_MTD_NAND
  77. #include "drivers/mtd_nand.h"
  78. #endif /* RT_USING_MTD_NAND */
  79. #ifdef RT_USING_USB_DEVICE
  80. #include "drivers/usb_device.h"
  81. #endif /* RT_USING_USB_DEVICE */
  82. #ifdef RT_USING_USB_HOST
  83. #include "drivers/usb_host.h"
  84. #endif /* RT_USING_USB_HOST */
  85. #ifdef RT_USING_SERIAL
  86. #ifdef RT_USING_SERIAL_V2
  87. #include "drivers/dev_serial_v2.h"
  88. #else
  89. #include "drivers/dev_serial.h"
  90. #endif
  91. #endif /* RT_USING_SERIAL */
  92. #ifdef RT_USING_I2C
  93. #include "drivers/dev_i2c.h"
  94. #ifdef RT_USING_I2C_BITOPS
  95. #include "drivers/dev_i2c_bit_ops.h"
  96. #endif /* RT_USING_I2C_BITOPS */
  97. #ifdef RT_USING_DM
  98. #include "drivers/dev_i2c_dm.h"
  99. #endif /* RT_USING_DM */
  100. #endif /* RT_USING_I2C */
  101. #ifdef RT_USING_PHY
  102. #include "drivers/phy.h"
  103. #endif /* RT_USING_PHY */
  104. #ifdef RT_USING_SDIO
  105. #include "drivers/dev_mmcsd_core.h"
  106. #include "drivers/dev_sd.h"
  107. #include "drivers/dev_sdio.h"
  108. #endif /* RT_USING_SDIO */
  109. #ifdef RT_USING_WDT
  110. #include "drivers/dev_watchdog.h"
  111. #endif /* RT_USING_WDT */
  112. #ifdef RT_USING_PIN
  113. #include "drivers/dev_pin.h"
  114. #endif /* RT_USING_PIN */
  115. #ifdef RT_USING_SENSOR
  116. #ifdef RT_USING_SENSOR_V2
  117. #include "drivers/sensor_v2.h"
  118. #else
  119. #include "drivers/sensor.h"
  120. #endif /* RT_USING_SENSOR_V2 */
  121. #endif /* RT_USING_SENSOR */
  122. #ifdef RT_USING_CAN
  123. #include "drivers/dev_can.h"
  124. #endif /* RT_USING_CAN */
  125. #ifdef RT_USING_HWTIMER
  126. #include "drivers/hwtimer.h"
  127. #endif /* RT_USING_HWTIMER */
  128. #ifdef RT_USING_AUDIO
  129. #include "drivers/dev_audio.h"
  130. #endif /* RT_USING_AUDIO */
  131. #ifdef RT_USING_CPUTIME
  132. #include "drivers/cputime.h"
  133. #endif /* RT_USING_CPUTIME */
  134. #ifdef RT_USING_ADC
  135. #include "drivers/adc.h"
  136. #endif /* RT_USING_ADC */
  137. #ifdef RT_USING_DAC
  138. #include "drivers/dac.h"
  139. #endif /* RT_USING_DAC */
  140. #ifdef RT_USING_PWM
  141. #include "drivers/dev_pwm.h"
  142. #endif /* RT_USING_PWM */
  143. #ifdef RT_USING_PM
  144. #include "drivers/pm.h"
  145. #endif /* RT_USING_PM */
  146. #ifdef RT_USING_WIFI
  147. #include "drivers/wlan.h"
  148. #endif /* RT_USING_WIFI */
  149. #ifdef MTD_USING_NOR
  150. #include "drivers/mtdnor.h"
  151. #endif /* MTD_USING_NOR */
  152. #ifdef MTD_USING_NAND
  153. #include "drivers/mtdnand.h"
  154. #endif /* MTD_USING_NAND */
  155. #ifdef RT_USING_HWCRYPTO
  156. #include "drivers/crypto.h"
  157. #endif /* RT_USING_HWCRYPTO */
  158. #ifdef RT_USING_PULSE_ENCODER
  159. #include "drivers/pulse_encoder.h"
  160. #endif /* RT_USING_PULSE_ENCODER */
  161. #ifdef RT_USING_INPUT_CAPTURE
  162. #include "drivers/rt_inputcapture.h"
  163. #endif /* RT_USING_INPUT_CAPTURE */
  164. #ifdef RT_USING_TOUCH
  165. #include "drivers/dev_touch.h"
  166. #endif
  167. #ifdef RT_USING_DEV_BUS
  168. #include "drivers/rt_dev_bus.h"
  169. #endif
  170. #ifdef RT_USING_LCD
  171. #include "drivers/lcd.h"
  172. #endif
  173. #ifdef RT_USING_CLK
  174. #include "drivers/clk.h"
  175. #endif /* RT_USING_CLK */
  176. #ifdef __cplusplus
  177. }
  178. #endif
  179. #endif /* __RT_DEVICE_H__ */