rtdevice.h 4.0 KB

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