rtdevice.h 3.7 KB

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