rtconfig.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. /******************************************************************//**
  2. * @file rtconfig.h
  3. * @brief RT-Thread config file
  4. * COPYRIGHT (C) 2009, RT-Thread Development Team
  5. * @author
  6. * @version 0.4 beta
  7. **********************************************************************
  8. * @section License
  9. * The license and distribution terms for this file may be found in the file LICENSE in this
  10. * distribution or at http://www.rt-thread.org/license/LICENSE
  11. *********************************************************************/
  12. #ifndef __RTTHREAD_CFG_H__
  13. #define __RTTHREAD_CFG_H__
  14. /* Includes -------------------------------------------------------------------*/
  15. /* Exported types -------------------------------------------------------------*/
  16. /* Exported constants ---------------------------------------------------------*/
  17. /* Exported macro -------------------------------------------------------------*/
  18. /* RT_NAME_MAX*/
  19. #define RT_NAME_MAX 8
  20. /* RT_ALIGN_SIZE*/
  21. #define RT_ALIGN_SIZE 4
  22. /* PRIORITY_MAX */
  23. #define RT_THREAD_PRIORITY_MAX 32
  24. /* Tick per Second */
  25. #define RT_TICK_PER_SECOND 100
  26. /* SECTION: RT_DEBUG */
  27. #define RT_DEBUG
  28. #define RT_MEM_DEBUG
  29. //#define THREAD_DEBUG
  30. //#define IRQ_DEBUG
  31. //#define RT_IRQHDL_DEBUG
  32. //#define RT_ADC_DEBUG
  33. #define RT_USING_OVERFLOW_CHECK
  34. #define RT_USART_DEBUG
  35. /* Using Hook */
  36. #define RT_USING_HOOK
  37. /* Using Software Timer */
  38. /* #define RT_USING_TIMER_SOFT */
  39. #define RT_TIMER_THREAD_PRIO 4
  40. #define RT_TIMER_THREAD_STACK_SIZE 512
  41. #define RT_TIMER_TICK_PER_SECOND 10
  42. /* SECTION: IPC */
  43. /* Using Semaphore*/
  44. #define RT_USING_SEMAPHORE
  45. /* Using Mutex */
  46. #define RT_USING_MUTEX
  47. /* Using Event */
  48. #define RT_USING_EVENT
  49. /* Using MailBox */
  50. #define RT_USING_MAILBOX
  51. /* Using Message Queue */
  52. #define RT_USING_MESSAGEQUEUE
  53. /* SECTION: Memory Management */
  54. /* Using Memory Pool Management*/
  55. #define RT_USING_MEMPOOL
  56. /* Using Dynamic Heap Management */
  57. #define RT_USING_HEAP
  58. /* Using Small MM */
  59. #define RT_USING_SMALL_MEM
  60. /* SECTION: Device System */
  61. /* Using Device System */
  62. #define RT_USING_DEVICE
  63. /* USART Device for Console */
  64. #if defined(EFM32_G290_DK)
  65. #define RT_USING_USART0 0x2UL
  66. #define RT_USART0_NAME "debug"
  67. #define RT_USART0_USING_DMA 0x0UL
  68. #elif defined(EFM32_G890_STK)
  69. #define RT_USING_USART1 0x1UL
  70. #define RT_USART1_NAME "debug"
  71. #define RT_USART1_USING_DMA 0x0UL
  72. #endif
  73. /* SECTION: RTC options */
  74. #if (defined(EFM32_G290_DK) || defined(EFM32_G890_STK))
  75. #define RT_USING_RTC
  76. #endif
  77. #define RT_RTC_NAME "rtc"
  78. /* SECTION: ADC options */
  79. #define RT_USING_ACMP0
  80. #define RT_ACMP0_NAME "acmp0"
  81. /* SECTION: ADC options */
  82. #define RT_USING_ADC0
  83. #define RT_ADC0_NAME "adc"
  84. /* SECTION: Serial options */
  85. #if defined(EFM32_G290_DK)
  86. #define RT_CONSOLE_DEVICE 0x0UL
  87. #elif defined(EFM32_G890_STK)
  88. #define RT_CONSOLE_DEVICE 0x1UL
  89. #endif
  90. /* SECTION: Console options */
  91. /* the buffer size of console*/
  92. #define RT_CONSOLEBUF_SIZE 128
  93. /* SECTION: finsh, a C-Express shell */
  94. #define RT_USING_FINSH
  95. /* Using symbol table */
  96. #define FINSH_USING_SYMTAB
  97. #define FINSH_USING_DESCRIPTION
  98. /* Exported functions --------------------------------------------------------- */
  99. #endif /* __RTTHREAD_CFG_H__ */