config_sampleboard.h 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. #ifndef CORE_CONFIG_H
  2. #define CORE_CONFIG_H
  3. #define CONFIG_YES 1
  4. #define CONFIG_NO 0
  5. #define CONFIG_SYSCLOCK_HIGH 2
  6. #define CONFIG_SYSCLOCK_NORMAL 1
  7. #define CONFIG_SYSCLOCK_LOW 0
  8. #define CONFIG_SYSTICK_NORMAL 1
  9. #define CONFIG_SYSTICK_LOW 0
  10. #define CONFIG_MSI_FREQ_DEFAULT 0
  11. #define CONFIG_MSI_FREQ_4MHZ 4
  12. #define CONFIG_MSI_FREQ_2MHZ 2
  13. #define CONFIG_MSI_FREQ_1MHZ 1
  14. #define CONFIG_CRYSTAL_12MHZ 0
  15. #define CONFIG_CRYSTAL_16MHZ 1
  16. #define CONFIG_CRYSTAL_8MHZ 2
  17. #define CONFIG_CRYSTAL_4MHZ 3
  18. //----------------------------------------------------------------
  19. // CONFIG_CRYSTAL
  20. // Specifies the external crystal oscillator frequency
  21. // Default: CONFIG_CRYSTAL_12MHZ
  22. #define CONFIG_CRYSTAL CONFIG_CRYSTAL_12MHZ
  23. //----------------------------------------------------------------
  24. // CONFIG_SYSCLOCK
  25. // Default system clock
  26. // Default: CONFIG_SYSCLOCK_NORMAL
  27. #define CONFIG_SYSCLOCK CONFIG_SYSCLOCK_HIGH /// !!!!!!
  28. //----------------------------------------------------------------
  29. // CONFIG_SYSTICK
  30. // Default SysTick timer tick interval
  31. // Default: CONFIG_SYSTICK_NORMAL
  32. #define CONFIG_SYSTICK CONFIG_SYSTICK_NORMAL
  33. //----------------------------------------------------------------
  34. // CONFIG_SYSTICK_BOOST_MULTIPLIER
  35. // Requires: CONFIG_SYSTICK=CONFIG_SYSTICK_NORMAL
  36. // Default: 5
  37. #define CONFIG_SYSTICK_BOOST_MULTIPLIER 4
  38. //----------------------------------------------------------------
  39. // CONFIG_SLEEPMANAGER
  40. // Enable sleep/wakeup power-, clock- and usb- control
  41. // Default: CONFIG_YES
  42. #define CONFIG_SLEEPMANAGER CONFIG_YES
  43. //----------------------------------------------------------------
  44. // CONFIG_EXTMEM
  45. // Use external memory
  46. // Default: CONFIG_YES
  47. #define CONFIG_EXTMEM CONFIG_YES
  48. //----------------------------------------------------------------
  49. // CONFIG_KEYSW
  50. // Use RF-key-switch control
  51. // Default: CONFIG_YES
  52. #define CONFIG_KEYSW CONFIG_YES
  53. //----------------------------------------------------------------
  54. // CONFIG_TSENSOR
  55. // Use thermal sensor
  56. // Default: CONFIG_YES
  57. #define CONFIG_TSENSOR CONFIG_YES
  58. //----------------------------------------------------------------
  59. // CONFIG_LEDS
  60. // Use LED-indication
  61. // Default: CONFIG_YES
  62. #define CONFIG_LEDS CONFIG_YES
  63. //----------------------------------------------------------------
  64. // CONFIG_LED_LOWBAT_FLASH_INTERVAL
  65. // Low Battery Voltage Indication interval, ms
  66. // Default: 5000
  67. #define CONFIG_LED_LOWBAT_FLASH_INTERVAL 5000
  68. //----------------------------------------------------------------
  69. // CONFIG_LED_LOWBAT_FLASH_TIME
  70. // Low Battery Voltage Indication time (LED ON), ms
  71. // Default: 10
  72. #define CONFIG_LED_LOWBAT_FLASH_TIME 5
  73. //----------------------------------------------------------------
  74. // CONFIG_LED_OKBAT_FLASH_INTERVAL
  75. // Normal Battery Voltage Indication interval, ms
  76. // Default: 5000
  77. // Depends on CONFIG_LED_OKBAT_FLASH_ENABLE
  78. #define CONFIG_LED_OKBAT_FLASH_INTERVAL 10000 // !!!!
  79. //----------------------------------------------------------------
  80. // CONFIG_LED_OKWBAT_FLASH_TIME
  81. // Normal Battery Voltage Indication time (LED ON), ms
  82. // Default: 1
  83. // Depends on CONFIG_LED_OKBAT_FLASH_ENABLE
  84. #define CONFIG_LED_OKBAT_FLASH_TIME 1
  85. //----------------------------------------------------------------
  86. // CONFIG_LED_OKBAT_FLASH_ENABLE
  87. // Normal Battery Voltage Indication
  88. // Default: CONFIG_NO
  89. #define CONFIG_LED_OKBAT_FLASH_ENABLE CONFIG_YES /// !!!!!!!
  90. //----------------------------------------------------------------
  91. // CONFIG_BATTERY_LOW_VOLTAGE
  92. // Discharged battery voltage level
  93. // Default: 1000
  94. #define CONFIG_BATTERY_LOW_VOLTAGE 1100
  95. //----------------------------------------------------------------
  96. // CONFIG_LED_POLARITY_INVERTED
  97. // Invered LED-control polarity (Active Low)
  98. // Default: CONFIG_YES
  99. #define CONFIG_LED_POLARITY_INVERTED CONFIG_NO /// !!!!!!!!!!!!!!
  100. //----------------------------------------------------------------
  101. // CONFIG_VBATMON
  102. // Use battery voltage monitor
  103. // Default: CONFIG_YES
  104. #define CONFIG_VBATMON CONFIG_YES
  105. //----------------------------------------------------------------
  106. // CONFIG_USB
  107. // Use USB interface
  108. // Default: CONFIG_YES
  109. #define CONFIG_USB CONFIG_YES
  110. //----------------------------------------------------------------
  111. // CONFIG_USB_DYNAMIC_CLOCK_ADOPT
  112. // Use dynamic system clock depending on if USB is connected or not
  113. // Depends on: CONFIG_SLEEPMANAGER
  114. // Default: CONFIG_YES
  115. #define CONFIG_USB_DYNAMIC_CLOCK_ADOPT CONFIG_YES
  116. //----------------------------------------------------------------
  117. // CONFIG_USB_INTERNAL_WKUP_SUPPORT
  118. // Enables internal USB wakeup-event support
  119. // Default: CONFIG_YES
  120. #define CONFIG_USB_INTERNAL_WKUP_SUPPORT CONFIG_YES
  121. //----------------------------------------------------------------
  122. // CONFIG_AUTOMAT_MODE
  123. // Enables "Automat Mode" - automatic switch control for remote measurement.
  124. // Requires: CONFIG_KEYSW
  125. // Default: CONFIG_YES
  126. #define CONFIG_AUTOMAT_MODE CONFIG_YES
  127. //----------------------------------------------------------------
  128. // CONFIG_MSI_FREQ
  129. // Set internal clock generator frequency (MSI)
  130. // Available values: CONFIG_MSI_FREQ_4MHZ, CONFIG_MSI_FREQ_2MHZ, CONFIG_MSI_FREQ_1MHZ
  131. // Default: CONFIG_MSI_FREQ_4MHZ
  132. #define CONFIG_MSI_FREQ CONFIG_MSI_FREQ_4MHZ // !!!!!!
  133. //----------------------------------------------------------------
  134. //----------------------------------------------------------------
  135. // DEBUG FEATURES:
  136. //----------------------------------------------------------------
  137. // CONFIG_EXTREME_LOWPOWTEST
  138. // Extreme low-power test for debug (DEBUG)
  139. // Default: CONFIG_NO
  140. #define CONFIG_EXTREME_LOWPOWTEST CONFIG_NO
  141. //----------------------------------------------------------------
  142. // CONFIG_USBIRQ_TEST
  143. // USB IRQ test: disable USB IRQ for some time to test stability (DEBUG)
  144. // Default: CONFIG_NO
  145. #define CONFIG_USBIRQ_TEST CONFIG_NO
  146. //----------------------------------------------------------------
  147. // CONFIG_DEBUG_USB_SUPRESS_VBUS_WKUP
  148. // Debug: do not wakeup on VBUS line changing (DEBUG)
  149. // Default: CONFIG_NO
  150. #define CONFIG_DEBUG_USB_SUPRESS_VBUS_WKUP CONFIG_NO
  151. //----------------------------------------------------------------
  152. // CONFIG_USB_VENDOR_DUMMYREAD
  153. // Debug: do not call user handler on USB Vendor IN request (DEBUG)
  154. // Default: CONFIG_NO
  155. #define CONFIG_USB_VENDOR_DUMMYREAD CONFIG_NO
  156. //----------------------------------------------------------------
  157. // CONFIG_TSENSOR_EMULATE_FOR_USB
  158. // Emulate the thermosensor presence for USB requests (DEBUG)
  159. // Default: CONFIG_NO
  160. #define CONFIG_TSENSOR_EMULATE_FOR_USB CONFIG_NO
  161. //----------------------------------------------------------------
  162. // CONFIG_EXTMEM_EMULATEREAD
  163. // Emulate reading of external memory instead of real reading (DEBUG)
  164. // Default: CONFIG_NO
  165. #define CONFIG_EXTMEM_EMULATEREAD CONFIG_NO
  166. //----------------------------------------------------------------
  167. // CONFIG_EXTMEM_EMULATEWRITE
  168. // Emulate writing of external memory instead of real writing (DEBUG)
  169. // Default: CONFIG_NO
  170. #define CONFIG_EXTMEM_EMULATEWRITE CONFIG_NO
  171. //----------------------------------------------------------------
  172. // CONFIG_SLEEPMANAGER_DEBUG_NOSLEEP
  173. // Do not sleep at all (DEBUG)
  174. // Default: CONFIG_NO
  175. #define CONFIG_SLEEPMANAGER_DEBUG_NOSLEEP CONFIG_YES // !!!!
  176. //----------------------------------------------------------------
  177. // CONFIG_SLEEPMANAGER_KEEPDEBUGCLK
  178. // Keep debugger clocking enabled during sleep modes (DEBUG)
  179. // Default: CONFIG_NO
  180. #define CONFIG_SLEEPMANAGER_KEEPDEBUGCLK CONFIG_NO
  181. //----------------------------------------------------------------
  182. // CONFIG_MAINC_DEBUGPIN_1
  183. // Initialize DEBUG GPIO Pin #1 (DEBUG)
  184. // Default: CONFIG_NO
  185. #define CONFIG_MAINC_DEBUGPIN_1 CONFIG_NO
  186. //----------------------------------------------------------------
  187. // CONFIG_MAINC_DEBUGPIN_2
  188. // Initialize DEBUG GPIO Pin #2 (DEBUG)
  189. // Default: CONFIG_NO
  190. #define CONFIG_MAINC_DEBUGPIN_2 CONFIG_NO
  191. //----------------------------------------------------------------
  192. // CONFIG_MAINC_DEBUGPIN_3
  193. // Initialize DEBUG GPIO Pin #3 (DEBUG)
  194. // Default: CONFIG_NO
  195. #define CONFIG_MAINC_DEBUGPIN_3 CONFIG_NO
  196. //----------------------------------------------------------------
  197. // CONFIG_AUTOMAT_DEBUGPIN
  198. // Use debug pin in "Automat" module (DEBUG)
  199. #define CONFIG_AUTOMAT_DEBUGPIN CONFIG_NO
  200. //----------------------------------------------------------------
  201. // CONFIG_CSECT_DEBUG
  202. // Use debug pin in "CSect" (critical sections) module (DEBUG)
  203. #define CONFIG_CSECT_DEBUG CONFIG_NO
  204. //----------------------------------------------------------------
  205. // CONFIG_SYSTICK_DEBUG
  206. // Use debug pin in "SysTick" module (SysTick IRQ) (DEBUG)
  207. #define CONFIG_SYSTICK_DEBUG CONFIG_NO
  208. //----------------------------------------------------------------
  209. // CONFIG_USB_DEBUGPIN
  210. // Use debug pin in "USB" module (USB IRQ) (DEBUG)
  211. #define CONFIG_USB_DEBUGPIN CONFIG_NO
  212. //----------------------------------------------------------------
  213. // CONFIG_SLEEPMANAGER_DEBUGPIN
  214. // Use debug pin in sleep manager driver (DEBUG)
  215. // Default: CONFIG_NO
  216. #define CONFIG_SLEEPMANAGER_DEBUGPIN CONFIG_NO
  217. //----------------------------------------------------------------
  218. // Debug Pin Routing
  219. #include "core/debugpinsapi.h" // debugpin_X_set / debugpin_X_clr
  220. // CONFIG_CSECT_DEBUG_SETPIN / CONFIG_CSECT_DEBUG_CLRPIN
  221. // Set and Clear macro for CSect debug pin, use debugpin_X_set / debugpin_X_clr functions
  222. #define CONFIG_CSECT_DEBUG_SETPIN debugpin_3_set();
  223. #define CONFIG_CSECT_DEBUG_CLRPIN debugpin_3_clr();
  224. // CONFIG_SYSTICK_DEBUG_SETPIN / CONFIG_SYSTICK_DEBUG_CLRPIN
  225. // Set and Clear macro for Systick debug pin, use debugpin_X_set / debugpin_X_clr functions
  226. #define CONFIG_SYSTICK_DEBUG_SETPIN debugpin_1_set();
  227. #define CONFIG_SYSTICK_DEBUG_CLRPIN debugpin_1_clr();
  228. // CONFIG_AUTOMAT_DEBUGPIN_SETPIN / CONFIG_AUTOMAT_DEBUGPIN_CLRPIN
  229. // Set and Clear macro for Automat debug pin, use debugpin_X_set / debugpin_X_clr functions
  230. #define CONFIG_AUTOMAT_DEBUGPIN_SETPIN debugpin_2_set();
  231. #define CONFIG_AUTOMAT_DEBUGPIN_CLRPIN debugpin_2_clr();
  232. // CONFIG_USB_DEBUGPIN_SETPIN / CONFIG_USB_DEBUGPIN_CLRPIN
  233. // Set and Clear macro for USB debug pin, use debugpin_X_set / debugpin_X_clr functions
  234. #define CONFIG_USB_DEBUGPIN_SETPIN debugpin_2_set();
  235. #define CONFIG_USB_DEBUGPIN_CLRPIN debugpin_2_clr();
  236. //----------------------------------------------------------------
  237. #endif