rtdevice.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. /*
  2. * File : rtdevice.h
  3. * This file is part of RT-Thread RTOS
  4. * COPYRIGHT (C) 2006 - 2012, RT-Thread Development Team
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License along
  17. * with this program; if not, write to the Free Software Foundation, Inc.,
  18. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  19. *
  20. * Change Logs:
  21. * Date Author Notes
  22. * 2012-01-08 bernard first version.
  23. * 2014-07-12 bernard Add workqueue implementation.
  24. */
  25. #ifndef __RT_DEVICE_H__
  26. #define __RT_DEVICE_H__
  27. #include <rtthread.h>
  28. #include "ipc/ringbuffer.h"
  29. #include "ipc/completion.h"
  30. #include "ipc/dataqueue.h"
  31. #include "ipc/workqueue.h"
  32. #include "ipc/waitqueue.h"
  33. #include "ipc/pipe.h"
  34. #include "ipc/poll.h"
  35. #include "ipc/ringblk_buf.h"
  36. #ifdef __cplusplus
  37. extern "C" {
  38. #endif
  39. #define RT_DEVICE(device) ((rt_device_t)device)
  40. #ifdef RT_USING_RTC
  41. #include "drivers/rtc.h"
  42. #ifdef RT_USING_ALARM
  43. #include "drivers/alarm.h"
  44. #endif
  45. #endif /* RT_USING_RTC */
  46. #ifdef RT_USING_SPI
  47. #include "drivers/spi.h"
  48. #endif /* RT_USING_SPI */
  49. #ifdef RT_USING_MTD_NOR
  50. #include "drivers/mtd_nor.h"
  51. #endif /* RT_USING_MTD_NOR */
  52. #ifdef RT_USING_MTD_NAND
  53. #include "drivers/mtd_nand.h"
  54. #endif /* RT_USING_MTD_NAND */
  55. #ifdef RT_USING_USB_DEVICE
  56. #include "drivers/usb_device.h"
  57. #endif /* RT_USING_USB_DEVICE */
  58. #ifdef RT_USING_USB_HOST
  59. #include "drivers/usb_host.h"
  60. #endif /* RT_USING_USB_HOST */
  61. #ifdef RT_USING_SERIAL
  62. #include "drivers/serial.h"
  63. #endif /* RT_USING_SERIAL */
  64. #ifdef RT_USING_I2C
  65. #include "drivers/i2c.h"
  66. #include "drivers/i2c_dev.h"
  67. #ifdef RT_USING_I2C_BITOPS
  68. #include "drivers/i2c-bit-ops.h"
  69. #endif /* RT_USING_I2C_BITOPS */
  70. #endif /* RT_USING_I2C */
  71. #ifdef RT_USING_SDIO
  72. #include "drivers/mmcsd_core.h"
  73. #include "drivers/sd.h"
  74. #include "drivers/sdio.h"
  75. #endif
  76. #ifdef RT_USING_WDT
  77. #include "drivers/watchdog.h"
  78. #endif
  79. #ifdef RT_USING_PIN
  80. #include "drivers/pin.h"
  81. #endif
  82. #ifdef RT_USING_CAN
  83. #include "drivers/can.h"
  84. #endif
  85. #ifdef RT_USING_HWTIMER
  86. #include "drivers/hwtimer.h"
  87. #endif
  88. #ifdef RT_USING_AUDIO
  89. #include "drivers/audio.h"
  90. #endif
  91. #ifdef RT_USING_CPUTIME
  92. #include "drivers/cputime.h"
  93. #endif
  94. #ifdef RT_USING_PWM
  95. #include "drivers/rt_drv_pwm.h"
  96. #endif
  97. #ifdef MTD_USING_NOR
  98. #include "drivers/mtdnor.h"
  99. #endif
  100. #ifdef MTD_USING_NAND
  101. #include "drivers/mtdnand.h"
  102. #endif
  103. #ifdef __cplusplus
  104. }
  105. #endif
  106. #endif /* __RT_DEVICE_H__ */