rtdevice.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. /*
  2. * Copyright (c) 2006-2021, 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. #include "drivers/serial.h"
  49. #endif /* RT_USING_SERIAL */
  50. #ifdef RT_USING_I2C
  51. #include "drivers/i2c.h"
  52. #include "drivers/i2c_dev.h"
  53. #ifdef RT_USING_I2C_BITOPS
  54. #include "drivers/i2c-bit-ops.h"
  55. #endif /* RT_USING_I2C_BITOPS */
  56. #endif /* RT_USING_I2C */
  57. #ifdef RT_USING_PHY
  58. #include "drivers/phy.h"
  59. #include "drivers/phy_mdio.h"
  60. #endif /* RT_USING_PHY */
  61. #ifdef RT_USING_SDIO
  62. #include "drivers/mmcsd_core.h"
  63. #include "drivers/sd.h"
  64. #include "drivers/sdio.h"
  65. #endif /* RT_USING_SDIO */
  66. #ifdef RT_USING_WDT
  67. #include "drivers/watchdog.h"
  68. #endif /* RT_USING_WDT */
  69. #ifdef RT_USING_PIN
  70. #include "drivers/pin.h"
  71. #endif /* RT_USING_PIN */
  72. #ifdef RT_USING_SENSOR
  73. #include "drivers/sensor.h"
  74. #endif /* RT_USING_SENSOR */
  75. #ifdef RT_USING_CAN
  76. #include "drivers/can.h"
  77. #endif /* RT_USING_CAN */
  78. #ifdef RT_USING_HWTIMER
  79. #include "drivers/hwtimer.h"
  80. #endif /* RT_USING_HWTIMER */
  81. #ifdef RT_USING_AUDIO
  82. #include "drivers/audio.h"
  83. #endif /* RT_USING_AUDIO */
  84. #ifdef RT_USING_CPUTIME
  85. #include "drivers/cputime.h"
  86. #endif /* RT_USING_CPUTIME */
  87. #ifdef RT_USING_ADC
  88. #include "drivers/adc.h"
  89. #endif /* RT_USING_ADC */
  90. #ifdef RT_USING_DAC
  91. #include "drivers/dac.h"
  92. #endif /* RT_USING_DAC */
  93. #ifdef RT_USING_PWM
  94. #include "drivers/rt_drv_pwm.h"
  95. #endif /* RT_USING_PWM */
  96. #ifdef RT_USING_PM
  97. #include "drivers/pm.h"
  98. #endif /* RT_USING_PM */
  99. #ifdef RT_USING_WIFI
  100. #include "drivers/wlan.h"
  101. #endif /* RT_USING_WIFI */
  102. #ifdef MTD_USING_NOR
  103. #include "drivers/mtdnor.h"
  104. #endif /* MTD_USING_NOR */
  105. #ifdef MTD_USING_NAND
  106. #include "drivers/mtdnand.h"
  107. #endif /* MTD_USING_NAND */
  108. #ifdef RT_USING_HWCRYPTO
  109. #include "drivers/crypto.h"
  110. #endif /* RT_USING_HWCRYPTO */
  111. #ifdef RT_USING_PULSE_ENCODER
  112. #include "drivers/pulse_encoder.h"
  113. #endif /* RT_USING_PULSE_ENCODER */
  114. #ifdef RT_USING_INPUT_CAPTURE
  115. #include "drivers/rt_inputcapture.h"
  116. #endif /* RT_USING_INPUT_CAPTURE */
  117. #ifdef __cplusplus
  118. }
  119. #endif
  120. #endif /* __RT_DEVICE_H__ */