rtdevice.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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. #ifdef __cplusplus
  36. extern "C" {
  37. #endif
  38. #define RT_DEVICE(device) ((rt_device_t)device)
  39. #ifdef RT_USING_RTC
  40. #include "drivers/rtc.h"
  41. #ifdef RT_USING_ALARM
  42. #include "drivers/alarm.h"
  43. #endif
  44. #endif /* RT_USING_RTC */
  45. #ifdef RT_USING_SPI
  46. #include "drivers/spi.h"
  47. #endif /* RT_USING_SPI */
  48. #ifdef RT_USING_MTD_NOR
  49. #include "drivers/mtd_nor.h"
  50. #endif /* RT_USING_MTD_NOR */
  51. #ifdef RT_USING_MTD_NAND
  52. #include "drivers/mtd_nand.h"
  53. #endif /* RT_USING_MTD_NAND */
  54. #ifdef RT_USING_USB_DEVICE
  55. #include "drivers/usb_device.h"
  56. #endif /* RT_USING_USB_DEVICE */
  57. #ifdef RT_USING_USB_HOST
  58. #include "drivers/usb_host.h"
  59. #endif /* RT_USING_USB_HOST */
  60. #ifdef RT_USING_SERIAL
  61. #include "drivers/serial.h"
  62. #endif /* RT_USING_SERIAL */
  63. #ifdef RT_USING_I2C
  64. #include "drivers/i2c.h"
  65. #include "drivers/i2c_dev.h"
  66. #ifdef RT_USING_I2C_BITOPS
  67. #include "drivers/i2c-bit-ops.h"
  68. #endif /* RT_USING_I2C_BITOPS */
  69. #endif /* RT_USING_I2C */
  70. #ifdef RT_USING_SDIO
  71. #include "drivers/mmcsd_core.h"
  72. #include "drivers/sd.h"
  73. #include "drivers/sdio.h"
  74. #endif
  75. #ifdef RT_USING_WDT
  76. #include "drivers/watchdog.h"
  77. #endif
  78. #ifdef RT_USING_PIN
  79. #include "drivers/pin.h"
  80. #endif
  81. #ifdef RT_USING_CAN
  82. #include "drivers/can.h"
  83. #endif
  84. #ifdef RT_USING_HWTIMER
  85. #include "drivers/hwtimer.h"
  86. #endif
  87. #ifdef RT_USING_AUDIO
  88. #include "drivers/audio.h"
  89. #endif
  90. #ifdef __cplusplus
  91. }
  92. #endif
  93. #endif /* __RT_DEVICE_H__ */