rtdevice.h 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  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/waitqueue.h"
  27. #include "ipc/pipe.h"
  28. #include "ipc/poll.h"
  29. #include "ipc/ringblk_buf.h"
  30. #ifdef __cplusplus
  31. extern "C" {
  32. #endif
  33. #define RT_DEVICE(device) ((rt_device_t)device)
  34. #ifdef RT_USING_DM
  35. #include "drivers/core/dm.h"
  36. #include "drivers/platform.h"
  37. #ifdef RT_USING_OFW
  38. #include "drivers/ofw.h"
  39. #include "drivers/ofw_fdt.h"
  40. #include "drivers/ofw_io.h"
  41. #include "drivers/ofw_irq.h"
  42. #include "drivers/ofw_raw.h"
  43. #endif /* RT_USING_OFW */
  44. #ifdef RT_USING_PIC
  45. #include "drivers/pic.h"
  46. #endif
  47. #endif /* RT_USING_DM */
  48. #ifdef RT_USING_RTC
  49. #include "drivers/rtc.h"
  50. #ifdef RT_USING_ALARM
  51. #include "drivers/alarm.h"
  52. #endif
  53. #endif /* RT_USING_RTC */
  54. #ifdef RT_USING_SPI
  55. #include "drivers/spi.h"
  56. #endif /* RT_USING_SPI */
  57. #ifdef RT_USING_MTD_NOR
  58. #include "drivers/mtd_nor.h"
  59. #endif /* RT_USING_MTD_NOR */
  60. #ifdef RT_USING_MTD_NAND
  61. #include "drivers/mtd_nand.h"
  62. #endif /* RT_USING_MTD_NAND */
  63. #ifdef RT_USING_USB_DEVICE
  64. #include "drivers/usb_device.h"
  65. #endif /* RT_USING_USB_DEVICE */
  66. #ifdef RT_USING_USB_HOST
  67. #include "drivers/usb_host.h"
  68. #endif /* RT_USING_USB_HOST */
  69. #ifdef RT_USING_SERIAL
  70. #ifdef RT_USING_SERIAL_V2
  71. #include "drivers/serial_v2.h"
  72. #else
  73. #include "drivers/serial.h"
  74. #endif
  75. #endif /* RT_USING_SERIAL */
  76. #ifdef RT_USING_I2C
  77. #include "drivers/i2c.h"
  78. #include "drivers/i2c_dev.h"
  79. #ifdef RT_USING_I2C_BITOPS
  80. #include "drivers/i2c-bit-ops.h"
  81. #endif /* RT_USING_I2C_BITOPS */
  82. #ifdef RT_USING_DM
  83. #include "drivers/i2c_dm.h"
  84. #endif /* RT_USING_DM */
  85. #endif /* RT_USING_I2C */
  86. #ifdef RT_USING_PHY
  87. #include "drivers/phy.h"
  88. #include "drivers/phy_mdio.h"
  89. #endif /* RT_USING_PHY */
  90. #ifdef RT_USING_SDIO
  91. #include "drivers/mmcsd_core.h"
  92. #include "drivers/sd.h"
  93. #include "drivers/sdio.h"
  94. #endif /* RT_USING_SDIO */
  95. #ifdef RT_USING_WDT
  96. #include "drivers/watchdog.h"
  97. #endif /* RT_USING_WDT */
  98. #ifdef RT_USING_PIN
  99. #include "drivers/pin.h"
  100. #endif /* RT_USING_PIN */
  101. #ifdef RT_USING_SENSOR
  102. #ifdef RT_USING_SENSOR_V2
  103. #include "drivers/sensor_v2.h"
  104. #else
  105. #include "drivers/sensor.h"
  106. #endif /* RT_USING_SENSOR_V2 */
  107. #endif /* RT_USING_SENSOR */
  108. #ifdef RT_USING_CAN
  109. #include "drivers/can.h"
  110. #endif /* RT_USING_CAN */
  111. #ifdef RT_USING_HWTIMER
  112. #include "drivers/hwtimer.h"
  113. #endif /* RT_USING_HWTIMER */
  114. #ifdef RT_USING_AUDIO
  115. #include "drivers/audio.h"
  116. #endif /* RT_USING_AUDIO */
  117. #ifdef RT_USING_CPUTIME
  118. #include "drivers/cputime.h"
  119. #endif /* RT_USING_CPUTIME */
  120. #ifdef RT_USING_ADC
  121. #include "drivers/adc.h"
  122. #endif /* RT_USING_ADC */
  123. #ifdef RT_USING_DAC
  124. #include "drivers/dac.h"
  125. #endif /* RT_USING_DAC */
  126. #ifdef RT_USING_PWM
  127. #include "drivers/rt_drv_pwm.h"
  128. #endif /* RT_USING_PWM */
  129. #ifdef RT_USING_PM
  130. #include "drivers/pm.h"
  131. #endif /* RT_USING_PM */
  132. #ifdef RT_USING_WIFI
  133. #include "drivers/wlan.h"
  134. #endif /* RT_USING_WIFI */
  135. #ifdef MTD_USING_NOR
  136. #include "drivers/mtdnor.h"
  137. #endif /* MTD_USING_NOR */
  138. #ifdef MTD_USING_NAND
  139. #include "drivers/mtdnand.h"
  140. #endif /* MTD_USING_NAND */
  141. #ifdef RT_USING_HWCRYPTO
  142. #include "drivers/crypto.h"
  143. #endif /* RT_USING_HWCRYPTO */
  144. #ifdef RT_USING_PULSE_ENCODER
  145. #include "drivers/pulse_encoder.h"
  146. #endif /* RT_USING_PULSE_ENCODER */
  147. #ifdef RT_USING_INPUT_CAPTURE
  148. #include "drivers/rt_inputcapture.h"
  149. #endif /* RT_USING_INPUT_CAPTURE */
  150. #ifdef RT_USING_TOUCH
  151. #include "drivers/touch.h"
  152. #endif
  153. #ifdef RT_USING_DEV_BUS
  154. #include "drivers/rt_dev_bus.h"
  155. #endif
  156. #ifdef RT_USING_LCD
  157. #include "drivers/lcd.h"
  158. #endif
  159. #ifdef RT_USING_CLK
  160. #include "drivers/clk.h"
  161. #endif /* RT_USING_CLK */
  162. #ifdef __cplusplus
  163. }
  164. #endif
  165. #endif /* __RT_DEVICE_H__ */