mcuconf.h 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. /*
  2. ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. #ifndef MCUCONF_H
  14. #define MCUCONF_H
  15. /*
  16. * AVR drivers configuration.
  17. * The following settings override the default settings present in
  18. * the various device driver implementation headers.
  19. * Note that the settings for each driver only have effect if the driver
  20. * is enabled in halconf.h.
  21. */
  22. /*
  23. * ADC driver system settings.
  24. */
  25. #define AVR_ADC_USE_ADC1 FALSE
  26. /*
  27. * DAC driver system settings.
  28. */
  29. #define AVR_DAC_USE_DAC1 TRUE
  30. /*
  31. * EXT drivers system settings.
  32. */
  33. #define AVR_EXT_USE_INT0 FALSE
  34. #define AVR_EXT_USE_INT1 FALSE
  35. #define AVR_EXT_USE_INT2 FALSE
  36. #define AVR_EXT_USE_INT3 FALSE
  37. #define AVR_EXT_USE_INT4 FALSE
  38. #define AVR_EXT_USE_INT5 FALSE
  39. /*
  40. * PCINT driver system settings.
  41. */
  42. #define AVR_EXT_USE_PCINT0 FALSE
  43. #define AVR_EXT_USE_PCINT1 FALSE
  44. #define AVR_EXT_USE_PCINT2 FALSE
  45. #define AVR_EXT_USE_PCINT3 FALSE
  46. #define AVR_EXT_USE_PCINT4 FALSE
  47. #define AVR_EXT_USE_PCINT5 FALSE
  48. #define AVR_EXT_USE_PCINT6 FALSE
  49. #define AVR_EXT_USE_PCINT7 FALSE
  50. #define AVR_EXT_USE_PCINT8 FALSE
  51. #define AVR_EXT_USE_PCINT9 FALSE
  52. #define AVR_EXT_USE_PCINT10 FALSE
  53. /*
  54. * CAN driver system settings.
  55. */
  56. /*
  57. * MAC driver system settings.
  58. */
  59. /*
  60. * PWM driver system settings.
  61. */
  62. #define AVR_PWM_USE_TIM1 FALSE
  63. #define AVR_PWM_USE_TIM2 FALSE
  64. #define AVR_PWM_USE_TIM3 FALSE
  65. #define AVR_PWM_USE_TIM4 FALSE
  66. #define AVR_PWM_USE_TIM5 FALSE
  67. /*
  68. * ICU driver system settings.
  69. */
  70. #define AVR_ICU_USE_TIM1 FALSE
  71. #define AVR_ICU_USE_TIM3 FALSE
  72. #define AVR_ICU_USE_TIM4 FALSE
  73. #define AVR_ICU_USE_TIM5 FALSE
  74. /*
  75. * GPT driver system settings.
  76. */
  77. #define AVR_GPT_USE_TIM1 FALSE
  78. #define AVR_GPT_USE_TIM2 FALSE
  79. #define AVR_GPT_USE_TIM3 FALSE
  80. #define AVR_GPT_USE_TIM4 FALSE
  81. #define AVR_GPT_USE_TIM5 FALSE
  82. /*
  83. * SERIAL driver system settings.
  84. */
  85. #define AVR_SERIAL_USE_USART1 FALSE /* USARTC0 */
  86. #define AVR_SERIAL_USE_USART2 FALSE /* USARTC1. */
  87. #define AVR_SERIAL_USE_USART3 FALSE /* USARTD0. */
  88. #define AVR_SERIAL_USE_USART4 FALSE /* USARTD1. */
  89. #define AVR_SERIAL_USE_USART5 FALSE /* USARTE0. */
  90. //TODO: Define the priority if the datasheet define this parameter.
  91. //#define AVR_UART_USART1_IRQ_PRIORITY 12
  92. //#define AVR_UART_USART2_IRQ_PRIORITY 12
  93. //#define AVR_UART_USART3_IRQ_PRIORITY 12
  94. //#define AVR_UART_USART4_IRQ_PRIORITY 12
  95. //#define AVR_UART_USART5_IRQ_PRIORITY 12
  96. /*
  97. * UART driver system settings.
  98. */
  99. #define AVR_UART_USE_USART1 TRUE /* USARTC0 */
  100. #define AVR_UART_USE_USART2 FALSE /* USARTC1 */
  101. #define AVR_UART_USE_USART3 FALSE /* USARTD0 */
  102. #define AVR_UART_USE_USART4 FALSE /* USARTD1 */
  103. #define AVR_UART_USE_USART5 FALSE /* USARTE0 */
  104. // TODO: Definen the DMA stream like bellow
  105. //#define AVR_UART_USART1_RX_DMA_STREAM AVR_DMA_STREAM_ID(2, 5)
  106. //#define AVR_UART_USART2_RX_DMA_STREAM AVR_DMA_STREAM_ID(2, 5)
  107. //#define AVR_UART_USART3_RX_DMA_STREAM AVR_DMA_STREAM_ID(2, 5)
  108. //#define AVR_UART_USART4_RX_DMA_STREAM AVR_DMA_STREAM_ID(2, 5)
  109. //#define AVR_UART_USART5_RX_DMA_STREAM AVR_DMA_STREAM_ID(2, 5)
  110. //TODO: Define the priority if the datasheet define this parameter.
  111. //#define AVR_UART_USART1_IRQ_PRIORITY 12
  112. //#define AVR_UART_USART2_IRQ_PRIORITY 12
  113. //#define AVR_UART_USART3_IRQ_PRIORITY 12
  114. //#define AVR_UART_USART4_IRQ_PRIORITY 12
  115. //#define AVR_UART_USART5_IRQ_PRIORITY 12
  116. /*
  117. * I2C driver system settings.
  118. */
  119. #define AVR_I2C_USE_I2C1 FALSE
  120. /*
  121. * SPI driver system settings.
  122. */
  123. #define AVR_SPI_USE_SPI1 FALSE
  124. #define AVR_SPI_USE_16BIT_POLLED_EXCHANGE FALSE
  125. /*
  126. * USB driver system settings.
  127. */
  128. #define AVR_USB_USE_USB1 FALSE
  129. #define AVR_USB_USE_NAMED_ADDRESS_SPACES FALSE
  130. #endif /* MCUCONF_H */