rtdevice.h 4.1 KB

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