rtdevice.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. /*
  2. * Copyright (c) 2006-2018, 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_SDIO
  58. #include "drivers/mmcsd_core.h"
  59. #include "drivers/sd.h"
  60. #include "drivers/sdio.h"
  61. #endif
  62. #ifdef RT_USING_WDT
  63. #include "drivers/watchdog.h"
  64. #endif
  65. #ifdef RT_USING_PIN
  66. #include "drivers/pin.h"
  67. #endif
  68. #ifdef RT_USING_CAN
  69. #include "drivers/can.h"
  70. #endif
  71. #ifdef RT_USING_HWTIMER
  72. #include "drivers/hwtimer.h"
  73. #endif
  74. #ifdef RT_USING_AUDIO
  75. #include "drivers/audio.h"
  76. #endif
  77. #ifdef RT_USING_CPUTIME
  78. #include "drivers/cputime.h"
  79. #endif
  80. #ifdef RT_USING_ADC
  81. #include "drivers/adc.h"
  82. #endif
  83. #ifdef RT_USING_PWM
  84. #include "drivers/rt_drv_pwm.h"
  85. #endif
  86. #ifdef RT_USING_PM
  87. #include "drivers/pm.h"
  88. #endif
  89. #ifdef RT_USING_WIFI
  90. #include "drivers/wlan.h"
  91. #endif
  92. #ifdef MTD_USING_NOR
  93. #include "drivers/mtdnor.h"
  94. #endif
  95. #ifdef MTD_USING_NAND
  96. #include "drivers/mtdnand.h"
  97. #endif
  98. #ifdef RT_USING_HWCRYPTO
  99. #include "drivers/crypto.h"
  100. #endif
  101. #ifdef RT_USING_PULSE_ENCODER
  102. #include "drivers/pulse_encoder.h"
  103. #endif
  104. #ifdef RT_USING_INPUT_CAPTURE
  105. #include "drivers/rt_inputcapture.h"
  106. #endif
  107. #ifdef __cplusplus
  108. }
  109. #endif
  110. #endif /* __RT_DEVICE_H__ */