apply_old_config.h 43 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385
  1. /**
  2. * Copyright (c) 2017 - 2018, Nordic Semiconductor ASA
  3. *
  4. * All rights reserved.
  5. *
  6. * Redistribution and use in source and binary forms, with or without modification,
  7. * are permitted provided that the following conditions are met:
  8. *
  9. * 1. Redistributions of source code must retain the above copyright notice, this
  10. * list of conditions and the following disclaimer.
  11. *
  12. * 2. Redistributions in binary form, except as embedded into a Nordic
  13. * Semiconductor ASA integrated circuit in a product or a software update for
  14. * such product, must reproduce the above copyright notice, this list of
  15. * conditions and the following disclaimer in the documentation and/or other
  16. * materials provided with the distribution.
  17. *
  18. * 3. Neither the name of Nordic Semiconductor ASA nor the names of its
  19. * contributors may be used to endorse or promote products derived from this
  20. * software without specific prior written permission.
  21. *
  22. * 4. This software, with or without modification, must only be used with a
  23. * Nordic Semiconductor ASA integrated circuit.
  24. *
  25. * 5. Any software provided in binary form under this license must not be reverse
  26. * engineered, decompiled, modified and/or disassembled.
  27. *
  28. * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS
  29. * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  30. * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
  31. * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE
  32. * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  33. * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
  34. * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  35. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  36. * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  37. * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  38. *
  39. */
  40. #ifndef APPLY_OLD_CONFIG_H__
  41. #define APPLY_OLD_CONFIG_H__
  42. //------------------------------------------------------------------------------
  43. // Peripheral Resource Sharing (PRS)
  44. #if defined(PERIPHERAL_RESOURCE_SHARING_ENABLED)
  45. #define NRFX_PRS_ENABLED PERIPHERAL_RESOURCE_SHARING_ENABLED
  46. #define NRFX_PRS_BOX_0_ENABLED PERIPHERAL_RESOURCE_SHARING_ENABLED
  47. #define NRFX_PRS_BOX_1_ENABLED PERIPHERAL_RESOURCE_SHARING_ENABLED
  48. #define NRFX_PRS_BOX_2_ENABLED PERIPHERAL_RESOURCE_SHARING_ENABLED
  49. #define NRFX_PRS_BOX_3_ENABLED PERIPHERAL_RESOURCE_SHARING_ENABLED
  50. #define NRFX_PRS_BOX_4_ENABLED PERIPHERAL_RESOURCE_SHARING_ENABLED
  51. #if defined(COMMON_CONFIG_LOG_ENABLED)
  52. #undef NRFX_PRS_CONFIG_LOG_ENABLED
  53. #define NRFX_PRS_CONFIG_LOG_ENABLED COMMON_CONFIG_LOG_ENABLED
  54. #endif
  55. #if defined(COMMON_CONFIG_LOG_LEVEL)
  56. #undef NRFX_PRS_CONFIG_LOG_LEVEL
  57. #define NRFX_PRS_CONFIG_LOG_LEVEL COMMON_CONFIG_LOG_LEVEL
  58. #endif
  59. #if defined(COMMON_CONFIG_INFO_COLOR)
  60. #undef NRFX_PRS_CONFIG_INFO_COLOR
  61. #define NRFX_PRS_CONFIG_INFO_COLOR COMMON_CONFIG_INFO_COLOR
  62. #endif
  63. #if defined(COMMON_CONFIG_DEBUG_COLOR)
  64. #undef NRFX_PRS_CONFIG_DEBUG_COLOR
  65. #define NRFX_PRS_CONFIG_DEBUG_COLOR COMMON_CONFIG_DEBUG_COLOR
  66. #endif
  67. #endif // defined(PERIPHERAL_RESOURCE_SHARING_ENABLED)
  68. //------------------------------------------------------------------------------
  69. // CLOCK
  70. #if defined(NRF_CLOCK_ENABLED)
  71. #undef NRFX_CLOCK_ENABLED
  72. #define NRFX_CLOCK_ENABLED NRF_CLOCK_ENABLED
  73. #if defined(CLOCK_CONFIG_LF_SRC)
  74. #undef NRFX_CLOCK_CONFIG_LF_SRC
  75. #define NRFX_CLOCK_CONFIG_LF_SRC CLOCK_CONFIG_LF_SRC
  76. #endif
  77. #if defined(CLOCK_CONFIG_IRQ_PRIORITY)
  78. #undef NRFX_CLOCK_CONFIG_IRQ_PRIORITY
  79. #define NRFX_CLOCK_CONFIG_IRQ_PRIORITY CLOCK_CONFIG_IRQ_PRIORITY
  80. #endif
  81. #if defined(CLOCK_CONFIG_LOG_ENABLED)
  82. #undef NRFX_CLOCK_CONFIG_LOG_ENABLED
  83. #define NRFX_CLOCK_CONFIG_LOG_ENABLED CLOCK_CONFIG_LOG_ENABLED
  84. #endif
  85. #if defined(CLOCK_CONFIG_LOG_LEVEL)
  86. #undef NRFX_CLOCK_CONFIG_LOG_LEVEL
  87. #define NRFX_CLOCK_CONFIG_LOG_LEVEL CLOCK_CONFIG_LOG_LEVEL
  88. #endif
  89. #if defined(CLOCK_CONFIG_INFO_COLOR)
  90. #undef NRFX_CLOCK_CONFIG_INFO_COLOR
  91. #define NRFX_CLOCK_CONFIG_INFO_COLOR CLOCK_CONFIG_INFO_COLOR
  92. #endif
  93. #if defined(CLOCK_CONFIG_DEBUG_COLOR)
  94. #undef NRFX_CLOCK_CONFIG_DEBUG_COLOR
  95. #define NRFX_CLOCK_CONFIG_DEBUG_COLOR CLOCK_CONFIG_DEBUG_COLOR
  96. #endif
  97. #endif // defined(NRF_CLOCK_ENABLED)
  98. //------------------------------------------------------------------------------
  99. // COMP
  100. #if defined(COMP_ENABLED)
  101. #undef NRFX_COMP_ENABLED
  102. #define NRFX_COMP_ENABLED COMP_ENABLED
  103. #if defined(COMP_CONFIG_REF)
  104. #undef NRFX_COMP_CONFIG_REF
  105. #define NRFX_COMP_CONFIG_REF COMP_CONFIG_REF
  106. #endif
  107. #if defined(COMP_CONFIG_MAIN_MODE)
  108. #undef NRFX_COMP_CONFIG_MAIN_MODE
  109. #define NRFX_COMP_CONFIG_MAIN_MODE COMP_CONFIG_MAIN_MODE
  110. #endif
  111. #if defined(COMP_CONFIG_SPEED_MODE)
  112. #undef NRFX_COMP_CONFIG_SPEED_MODE
  113. #define NRFX_COMP_CONFIG_SPEED_MODE COMP_CONFIG_SPEED_MODE
  114. #endif
  115. #if defined(COMP_CONFIG_HYST)
  116. #undef NRFX_COMP_CONFIG_HYST
  117. #define NRFX_COMP_CONFIG_HYST COMP_CONFIG_HYST
  118. #endif
  119. #if defined(COMP_CONFIG_ISOURCE)
  120. #undef NRFX_COMP_CONFIG_ISOURCE
  121. #define NRFX_COMP_CONFIG_ISOURCE COMP_CONFIG_ISOURCE
  122. #endif
  123. #if defined(COMP_CONFIG_INPUT)
  124. #undef NRFX_COMP_CONFIG_INPUT
  125. #define NRFX_COMP_CONFIG_INPUT COMP_CONFIG_INPUT
  126. #endif
  127. #if defined(COMP_CONFIG_IRQ_PRIORITY)
  128. #undef NRFX_COMP_CONFIG_IRQ_PRIORITY
  129. #define NRFX_COMP_CONFIG_IRQ_PRIORITY COMP_CONFIG_IRQ_PRIORITY
  130. #endif
  131. #if defined(COMP_CONFIG_LOG_ENABLED)
  132. #undef NRFX_COMP_CONFIG_LOG_ENABLED
  133. #define NRFX_COMP_CONFIG_LOG_ENABLED COMP_CONFIG_LOG_ENABLED
  134. #endif
  135. #if defined(COMP_CONFIG_LOG_LEVEL)
  136. #undef NRFX_COMP_CONFIG_LOG_LEVEL
  137. #define NRFX_COMP_CONFIG_LOG_LEVEL COMP_CONFIG_LOG_LEVEL
  138. #endif
  139. #if defined(COMP_CONFIG_INFO_COLOR)
  140. #undef NRFX_COMP_CONFIG_INFO_COLOR
  141. #define NRFX_COMP_CONFIG_INFO_COLOR COMP_CONFIG_INFO_COLOR
  142. #endif
  143. #if defined(COMP_CONFIG_DEBUG_COLOR)
  144. #undef NRFX_COMP_CONFIG_DEBUG_COLOR
  145. #define NRFX_COMP_CONFIG_DEBUG_COLOR COMP_CONFIG_DEBUG_COLOR
  146. #endif
  147. #endif // defined(COMP_ENABLED)
  148. //------------------------------------------------------------------------------
  149. // GPIOTE
  150. #if defined(GPIOTE_ENABLED)
  151. #undef NRFX_GPIOTE_ENABLED
  152. #define NRFX_GPIOTE_ENABLED GPIOTE_ENABLED
  153. #if defined(GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS)
  154. #undef NRFX_GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS
  155. #define NRFX_GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS
  156. #endif
  157. #if defined(GPIOTE_CONFIG_IRQ_PRIORITY)
  158. #undef NRFX_GPIOTE_CONFIG_IRQ_PRIORITY
  159. #define NRFX_GPIOTE_CONFIG_IRQ_PRIORITY GPIOTE_CONFIG_IRQ_PRIORITY
  160. #endif
  161. #if defined(GPIOTE_CONFIG_LOG_ENABLED)
  162. #undef NRFX_GPIOTE_CONFIG_LOG_ENABLED
  163. #define NRFX_GPIOTE_CONFIG_LOG_ENABLED GPIOTE_CONFIG_LOG_ENABLED
  164. #endif
  165. #if defined(GPIOTE_CONFIG_LOG_LEVEL)
  166. #undef NRFX_GPIOTE_CONFIG_LOG_LEVEL
  167. #define NRFX_GPIOTE_CONFIG_LOG_LEVEL GPIOTE_CONFIG_LOG_LEVEL
  168. #endif
  169. #if defined(GPIOTE_CONFIG_INFO_COLOR)
  170. #undef NRFX_GPIOTE_CONFIG_INFO_COLOR
  171. #define NRFX_GPIOTE_CONFIG_INFO_COLOR GPIOTE_CONFIG_INFO_COLOR
  172. #endif
  173. #if defined(GPIOTE_CONFIG_DEBUG_COLOR)
  174. #undef NRFX_GPIOTE_CONFIG_DEBUG_COLOR
  175. #define NRFX_GPIOTE_CONFIG_DEBUG_COLOR GPIOTE_CONFIG_DEBUG_COLOR
  176. #endif
  177. #endif // defined(GPIOTE_ENABLED)
  178. //------------------------------------------------------------------------------
  179. // I2S
  180. #if defined(I2S_ENABLED)
  181. #undef NRFX_I2S_ENABLED
  182. #define NRFX_I2S_ENABLED I2S_ENABLED
  183. #if defined(I2S_CONFIG_SCK_PIN)
  184. #undef NRFX_I2S_CONFIG_SCK_PIN
  185. #define NRFX_I2S_CONFIG_SCK_PIN I2S_CONFIG_SCK_PIN
  186. #endif
  187. #if defined(I2S_CONFIG_LRCK_PIN)
  188. #undef NRFX_I2S_CONFIG_LRCK_PIN
  189. #define NRFX_I2S_CONFIG_LRCK_PIN I2S_CONFIG_LRCK_PIN
  190. #endif
  191. #if defined(I2S_CONFIG_MCK_PIN)
  192. #undef NRFX_I2S_CONFIG_MCK_PIN
  193. #define NRFX_I2S_CONFIG_MCK_PIN I2S_CONFIG_MCK_PIN
  194. #endif
  195. #if defined(I2S_CONFIG_SDOUT_PIN)
  196. #undef NRFX_I2S_CONFIG_SDOUT_PIN
  197. #define NRFX_I2S_CONFIG_SDOUT_PIN I2S_CONFIG_SDOUT_PIN
  198. #endif
  199. #if defined(I2S_CONFIG_SDIN_PIN)
  200. #undef NRFX_I2S_CONFIG_SDIN_PIN
  201. #define NRFX_I2S_CONFIG_SDIN_PIN I2S_CONFIG_SDIN_PIN
  202. #endif
  203. #if defined(I2S_CONFIG_MASTER)
  204. #undef NRFX_I2S_CONFIG_MASTER
  205. #define NRFX_I2S_CONFIG_MASTER I2S_CONFIG_MASTER
  206. #endif
  207. #if defined(I2S_CONFIG_FORMAT)
  208. #undef NRFX_I2S_CONFIG_FORMAT
  209. #define NRFX_I2S_CONFIG_FORMAT I2S_CONFIG_FORMAT
  210. #endif
  211. #if defined(I2S_CONFIG_ALIGN)
  212. #undef NRFX_I2S_CONFIG_ALIGN
  213. #define NRFX_I2S_CONFIG_ALIGN I2S_CONFIG_ALIGN
  214. #endif
  215. #if defined(I2S_CONFIG_SWIDTH)
  216. #undef NRFX_I2S_CONFIG_SWIDTH
  217. #define NRFX_I2S_CONFIG_SWIDTH I2S_CONFIG_SWIDTH
  218. #endif
  219. #if defined(I2S_CONFIG_CHANNELS)
  220. #undef NRFX_I2S_CONFIG_CHANNELS
  221. #define NRFX_I2S_CONFIG_CHANNELS I2S_CONFIG_CHANNELS
  222. #endif
  223. #if defined(I2S_CONFIG_MCK_SETUP)
  224. #undef NRFX_I2S_CONFIG_MCK_SETUP
  225. #define NRFX_I2S_CONFIG_MCK_SETUP I2S_CONFIG_MCK_SETUP
  226. #endif
  227. #if defined(I2S_CONFIG_RATIO)
  228. #undef NRFX_I2S_CONFIG_RATIO
  229. #define NRFX_I2S_CONFIG_RATIO I2S_CONFIG_RATIO
  230. #endif
  231. #if defined(I2S_CONFIG_IRQ_PRIORITY)
  232. #undef NRFX_I2S_CONFIG_IRQ_PRIORITY
  233. #define NRFX_I2S_CONFIG_IRQ_PRIORITY I2S_CONFIG_IRQ_PRIORITY
  234. #endif
  235. #if defined(I2S_CONFIG_LOG_ENABLED)
  236. #undef NRFX_I2S_CONFIG_LOG_ENABLED
  237. #define NRFX_I2S_CONFIG_LOG_ENABLED I2S_CONFIG_LOG_ENABLED
  238. #endif
  239. #if defined(I2S_CONFIG_LOG_LEVEL)
  240. #undef NRFX_I2S_CONFIG_LOG_LEVEL
  241. #define NRFX_I2S_CONFIG_LOG_LEVEL I2S_CONFIG_LOG_LEVEL
  242. #endif
  243. #if defined(I2S_CONFIG_INFO_COLOR)
  244. #undef NRFX_I2S_CONFIG_INFO_COLOR
  245. #define NRFX_I2S_CONFIG_INFO_COLOR I2S_CONFIG_INFO_COLOR
  246. #endif
  247. #if defined(I2S_CONFIG_DEBUG_COLOR)
  248. #undef NRFX_I2S_CONFIG_DEBUG_COLOR
  249. #define NRFX_I2S_CONFIG_DEBUG_COLOR I2S_CONFIG_DEBUG_COLOR
  250. #endif
  251. #endif // defined(I2S_ENABLED)
  252. //------------------------------------------------------------------------------
  253. // LPCOMP
  254. #if defined(LPCOMP_ENABLED)
  255. #undef NRFX_LPCOMP_ENABLED
  256. #define NRFX_LPCOMP_ENABLED LPCOMP_ENABLED
  257. #if defined(LPCOMP_CONFIG_REFERENCE)
  258. #undef NRFX_LPCOMP_CONFIG_REFERENCE
  259. #define NRFX_LPCOMP_CONFIG_REFERENCE LPCOMP_CONFIG_REFERENCE
  260. #endif
  261. #if defined(LPCOMP_CONFIG_DETECTION)
  262. #undef NRFX_LPCOMP_CONFIG_DETECTION
  263. #define NRFX_LPCOMP_CONFIG_DETECTION LPCOMP_CONFIG_DETECTION
  264. #endif
  265. #if defined(LPCOMP_CONFIG_INPUT)
  266. #undef NRFX_LPCOMP_CONFIG_INPUT
  267. #define NRFX_LPCOMP_CONFIG_INPUT LPCOMP_CONFIG_INPUT
  268. #endif
  269. #if defined(LPCOMP_CONFIG_HYST)
  270. #undef NRFX_LPCOMP_CONFIG_HYST
  271. #define NRFX_LPCOMP_CONFIG_HYST LPCOMP_CONFIG_HYST
  272. #endif
  273. #if defined(LPCOMP_CONFIG_IRQ_PRIORITY)
  274. #undef NRFX_LPCOMP_CONFIG_IRQ_PRIORITY
  275. #define NRFX_LPCOMP_CONFIG_IRQ_PRIORITY LPCOMP_CONFIG_IRQ_PRIORITY
  276. #endif
  277. #if defined(LPCOMP_CONFIG_LOG_ENABLED)
  278. #undef NRFX_LPCOMP_CONFIG_LOG_ENABLED
  279. #define NRFX_LPCOMP_CONFIG_LOG_ENABLED LPCOMP_CONFIG_LOG_ENABLED
  280. #endif
  281. #if defined(LPCOMP_CONFIG_LOG_LEVEL)
  282. #undef NRFX_LPCOMP_CONFIG_LOG_LEVEL
  283. #define NRFX_LPCOMP_CONFIG_LOG_LEVEL LPCOMP_CONFIG_LOG_LEVEL
  284. #endif
  285. #if defined(LPCOMP_CONFIG_INFO_COLOR)
  286. #undef NRFX_LPCOMP_CONFIG_INFO_COLOR
  287. #define NRFX_LPCOMP_CONFIG_INFO_COLOR LPCOMP_CONFIG_INFO_COLOR
  288. #endif
  289. #if defined(LPCOMP_CONFIG_DEBUG_COLOR)
  290. #undef NRFX_LPCOMP_CONFIG_DEBUG_COLOR
  291. #define NRFX_LPCOMP_CONFIG_DEBUG_COLOR LPCOMP_CONFIG_DEBUG_COLOR
  292. #endif
  293. #endif // defined(LPCOMP_ENABLED)
  294. //------------------------------------------------------------------------------
  295. // PDM
  296. #if defined(PDM_ENABLED)
  297. #undef NRFX_PDM_ENABLED
  298. #define NRFX_PDM_ENABLED PDM_ENABLED
  299. #if defined(PDM_CONFIG_MODE)
  300. #undef NRFX_PDM_CONFIG_MODE
  301. #define NRFX_PDM_CONFIG_MODE PDM_CONFIG_MODE
  302. #endif
  303. #if defined(PDM_CONFIG_EDGE)
  304. #undef NRFX_PDM_CONFIG_EDGE
  305. #define NRFX_PDM_CONFIG_EDGE PDM_CONFIG_EDGE
  306. #endif
  307. #if defined(PDM_CONFIG_CLOCK_FREQ)
  308. #undef NRFX_PDM_CONFIG_CLOCK_FREQ
  309. #define NRFX_PDM_CONFIG_CLOCK_FREQ PDM_CONFIG_CLOCK_FREQ
  310. #endif
  311. #if defined(PDM_CONFIG_IRQ_PRIORITY)
  312. #undef NRFX_PDM_CONFIG_IRQ_PRIORITY
  313. #define NRFX_PDM_CONFIG_IRQ_PRIORITY PDM_CONFIG_IRQ_PRIORITY
  314. #endif
  315. #if defined(PDM_CONFIG_LOG_ENABLED)
  316. #undef NRFX_PDM_CONFIG_LOG_ENABLED
  317. #define NRFX_PDM_CONFIG_LOG_ENABLED PDM_CONFIG_LOG_ENABLED
  318. #endif
  319. #if defined(PDM_CONFIG_LOG_LEVEL)
  320. #undef NRFX_PDM_CONFIG_LOG_LEVEL
  321. #define NRFX_PDM_CONFIG_LOG_LEVEL PDM_CONFIG_LOG_LEVEL
  322. #endif
  323. #if defined(PDM_CONFIG_INFO_COLOR)
  324. #undef NRFX_PDM_CONFIG_INFO_COLOR
  325. #define NRFX_PDM_CONFIG_INFO_COLOR PDM_CONFIG_INFO_COLOR
  326. #endif
  327. #if defined(PDM_CONFIG_DEBUG_COLOR)
  328. #undef NRFX_PDM_CONFIG_DEBUG_COLOR
  329. #define NRFX_PDM_CONFIG_DEBUG_COLOR PDM_CONFIG_DEBUG_COLOR
  330. #endif
  331. #endif // defined(PDM_ENABLED)
  332. //------------------------------------------------------------------------------
  333. // POWER
  334. #if defined(POWER_ENABLED)
  335. #undef NRFX_POWER_ENABLED
  336. #define NRFX_POWER_ENABLED POWER_ENABLED
  337. #if defined(POWER_CONFIG_IRQ_PRIORITY)
  338. #undef NRFX_POWER_CONFIG_IRQ_PRIORITY
  339. #define NRFX_POWER_CONFIG_IRQ_PRIORITY POWER_CONFIG_IRQ_PRIORITY
  340. #endif
  341. #if defined(POWER_CONFIG_DEFAULT_DCDCEN)
  342. #undef NRFX_POWER_CONFIG_DEFAULT_DCDCEN
  343. #define NRFX_POWER_CONFIG_DEFAULT_DCDCEN POWER_CONFIG_DEFAULT_DCDCEN
  344. #endif
  345. #if defined(POWER_CONFIG_DEFAULT_DCDCENHV)
  346. #undef NRFX_POWER_CONFIG_DEFAULT_DCDCENHV
  347. #define NRFX_POWER_CONFIG_DEFAULT_DCDCENHV POWER_CONFIG_DEFAULT_DCDCENHV
  348. #endif
  349. #endif // defined(POWER_ENABLED)
  350. //------------------------------------------------------------------------------
  351. // PPI
  352. #if defined(PPI_ENABLED)
  353. #undef NRFX_PPI_ENABLED
  354. #define NRFX_PPI_ENABLED PPI_ENABLED
  355. #if defined(PPI_CONFIG_LOG_ENABLED)
  356. #undef NRFX_PPI_CONFIG_LOG_ENABLED
  357. #define NRFX_PPI_CONFIG_LOG_ENABLED PPI_CONFIG_LOG_ENABLED
  358. #endif
  359. #if defined(PPI_CONFIG_LOG_LEVEL)
  360. #undef NRFX_PPI_CONFIG_LOG_LEVEL
  361. #define NRFX_PPI_CONFIG_LOG_LEVEL PPI_CONFIG_LOG_LEVEL
  362. #endif
  363. #if defined(PPI_CONFIG_INFO_COLOR)
  364. #undef NRFX_PPI_CONFIG_INFO_COLOR
  365. #define NRFX_PPI_CONFIG_INFO_COLOR PPI_CONFIG_INFO_COLOR
  366. #endif
  367. #if defined(PPI_CONFIG_DEBUG_COLOR)
  368. #undef NRFX_PPI_CONFIG_DEBUG_COLOR
  369. #define NRFX_PPI_CONFIG_DEBUG_COLOR PPI_CONFIG_DEBUG_COLOR
  370. #endif
  371. #endif // defined(PPI_ENABLED)
  372. //------------------------------------------------------------------------------
  373. // PWM
  374. #if defined(PWM_ENABLED)
  375. #undef NRFX_PWM_ENABLED
  376. #define NRFX_PWM_ENABLED PWM_ENABLED
  377. #if defined(PWM0_ENABLED)
  378. #undef NRFX_PWM0_ENABLED
  379. #define NRFX_PWM0_ENABLED PWM0_ENABLED
  380. #endif
  381. #if defined(PWM1_ENABLED)
  382. #undef NRFX_PWM1_ENABLED
  383. #define NRFX_PWM1_ENABLED PWM1_ENABLED
  384. #endif
  385. #if defined(PWM2_ENABLED)
  386. #undef NRFX_PWM2_ENABLED
  387. #define NRFX_PWM2_ENABLED PWM2_ENABLED
  388. #endif
  389. #if defined(PWM3_ENABLED)
  390. #undef NRFX_PWM3_ENABLED
  391. #define NRFX_PWM3_ENABLED PWM3_ENABLED
  392. #endif
  393. #if defined(PWM_DEFAULT_CONFIG_OUT0_PIN)
  394. #undef NRFX_PWM_DEFAULT_CONFIG_OUT0_PIN
  395. #define NRFX_PWM_DEFAULT_CONFIG_OUT0_PIN PWM_DEFAULT_CONFIG_OUT0_PIN
  396. #endif
  397. #if defined(PWM_DEFAULT_CONFIG_OUT1_PIN)
  398. #undef NRFX_PWM_DEFAULT_CONFIG_OUT1_PIN
  399. #define NRFX_PWM_DEFAULT_CONFIG_OUT1_PIN PWM_DEFAULT_CONFIG_OUT1_PIN
  400. #endif
  401. #if defined(PWM_DEFAULT_CONFIG_OUT2_PIN)
  402. #undef NRFX_PWM_DEFAULT_CONFIG_OUT2_PIN
  403. #define NRFX_PWM_DEFAULT_CONFIG_OUT2_PIN PWM_DEFAULT_CONFIG_OUT2_PIN
  404. #endif
  405. #if defined(PWM_DEFAULT_CONFIG_OUT3_PIN)
  406. #undef NRFX_PWM_DEFAULT_CONFIG_OUT3_PIN
  407. #define NRFX_PWM_DEFAULT_CONFIG_OUT3_PIN PWM_DEFAULT_CONFIG_OUT3_PIN
  408. #endif
  409. #if defined(PWM_DEFAULT_CONFIG_BASE_CLOCK)
  410. #undef NRFX_PWM_DEFAULT_CONFIG_BASE_CLOCK
  411. #define NRFX_PWM_DEFAULT_CONFIG_BASE_CLOCK PWM_DEFAULT_CONFIG_BASE_CLOCK
  412. #endif
  413. #if defined(PWM_DEFAULT_CONFIG_COUNT_MODE)
  414. #undef NRFX_PWM_DEFAULT_CONFIG_COUNT_MODE
  415. #define NRFX_PWM_DEFAULT_CONFIG_COUNT_MODE PWM_DEFAULT_CONFIG_COUNT_MODE
  416. #endif
  417. #if defined(PWM_DEFAULT_CONFIG_TOP_VALUE)
  418. #undef NRFX_PWM_DEFAULT_CONFIG_TOP_VALUE
  419. #define NRFX_PWM_DEFAULT_CONFIG_TOP_VALUE PWM_DEFAULT_CONFIG_TOP_VALUE
  420. #endif
  421. #if defined(PWM_DEFAULT_CONFIG_LOAD_MODE)
  422. #undef NRFX_PWM_DEFAULT_CONFIG_LOAD_MODE
  423. #define NRFX_PWM_DEFAULT_CONFIG_LOAD_MODE PWM_DEFAULT_CONFIG_LOAD_MODE
  424. #endif
  425. #if defined(PWM_DEFAULT_CONFIG_STEP_MODE)
  426. #undef NRFX_PWM_DEFAULT_CONFIG_STEP_MODE
  427. #define NRFX_PWM_DEFAULT_CONFIG_STEP_MODE PWM_DEFAULT_CONFIG_STEP_MODE
  428. #endif
  429. #if defined(PWM_DEFAULT_CONFIG_IRQ_PRIORITY)
  430. #undef NRFX_PWM_DEFAULT_CONFIG_IRQ_PRIORITY
  431. #define NRFX_PWM_DEFAULT_CONFIG_IRQ_PRIORITY PWM_DEFAULT_CONFIG_IRQ_PRIORITY
  432. #endif
  433. #if defined(PWM_CONFIG_LOG_ENABLED)
  434. #undef NRFX_PWM_CONFIG_LOG_ENABLED
  435. #define NRFX_PWM_CONFIG_LOG_ENABLED PWM_CONFIG_LOG_ENABLED
  436. #endif
  437. #if defined(PWM_CONFIG_LOG_LEVEL)
  438. #undef NRFX_PWM_CONFIG_LOG_LEVEL
  439. #define NRFX_PWM_CONFIG_LOG_LEVEL PWM_CONFIG_LOG_LEVEL
  440. #endif
  441. #if defined(PWM_CONFIG_INFO_COLOR)
  442. #undef NRFX_PWM_CONFIG_INFO_COLOR
  443. #define NRFX_PWM_CONFIG_INFO_COLOR PWM_CONFIG_INFO_COLOR
  444. #endif
  445. #if defined(PWM_CONFIG_DEBUG_COLOR)
  446. #undef NRFX_PWM_CONFIG_DEBUG_COLOR
  447. #define NRFX_PWM_CONFIG_DEBUG_COLOR PWM_CONFIG_DEBUG_COLOR
  448. #endif
  449. #if defined(PWM_NRF52_ANOMALY_109_WORKAROUND_ENABLED)
  450. #undef NRFX_PWM_NRF52_ANOMALY_109_WORKAROUND_ENABLED
  451. #define NRFX_PWM_NRF52_ANOMALY_109_WORKAROUND_ENABLED PWM_NRF52_ANOMALY_109_WORKAROUND_ENABLED
  452. #endif
  453. #if defined(PWM_NRF52_ANOMALY_109_EGU_INSTANCE)
  454. #undef NRFX_PWM_NRF52_ANOMALY_109_EGU_INSTANCE
  455. #define NRFX_PWM_NRF52_ANOMALY_109_EGU_INSTANCE PWM_NRF52_ANOMALY_109_EGU_INSTANCE
  456. #endif
  457. #endif // defined(PWM_ENABLED)
  458. //------------------------------------------------------------------------------
  459. // QDEC
  460. #if defined(QDEC_ENABLED)
  461. #undef NRFX_QDEC_ENABLED
  462. #define NRFX_QDEC_ENABLED QDEC_ENABLED
  463. #if defined(QDEC_CONFIG_REPORTPER)
  464. #undef NRFX_QDEC_CONFIG_REPORTPER
  465. #define NRFX_QDEC_CONFIG_REPORTPER QDEC_CONFIG_REPORTPER
  466. #endif
  467. #if defined(QDEC_CONFIG_SAMPLEPER)
  468. #undef NRFX_QDEC_CONFIG_SAMPLEPER
  469. #define NRFX_QDEC_CONFIG_SAMPLEPER QDEC_CONFIG_SAMPLEPER
  470. #endif
  471. #if defined(QDEC_CONFIG_PIO_A)
  472. #undef NRFX_QDEC_CONFIG_PIO_A
  473. #define NRFX_QDEC_CONFIG_PIO_A QDEC_CONFIG_PIO_A
  474. #endif
  475. #if defined(QDEC_CONFIG_PIO_B)
  476. #undef NRFX_QDEC_CONFIG_PIO_B
  477. #define NRFX_QDEC_CONFIG_PIO_B QDEC_CONFIG_PIO_B
  478. #endif
  479. #if defined(QDEC_CONFIG_PIO_LED)
  480. #undef NRFX_QDEC_CONFIG_PIO_LED
  481. #define NRFX_QDEC_CONFIG_PIO_LED QDEC_CONFIG_PIO_LED
  482. #endif
  483. #if defined(QDEC_CONFIG_LEDPRE)
  484. #undef NRFX_QDEC_CONFIG_LEDPRE
  485. #define NRFX_QDEC_CONFIG_LEDPRE QDEC_CONFIG_LEDPRE
  486. #endif
  487. #if defined(QDEC_CONFIG_LEDPOL)
  488. #undef NRFX_QDEC_CONFIG_LEDPOL
  489. #define NRFX_QDEC_CONFIG_LEDPOL QDEC_CONFIG_LEDPOL
  490. #endif
  491. #if defined(QDEC_CONFIG_DBFEN)
  492. #undef NRFX_QDEC_CONFIG_DBFEN
  493. #define NRFX_QDEC_CONFIG_DBFEN QDEC_CONFIG_DBFEN
  494. #endif
  495. #if defined(QDEC_CONFIG_SAMPLE_INTEN)
  496. #undef NRFX_QDEC_CONFIG_SAMPLE_INTEN
  497. #define NRFX_QDEC_CONFIG_SAMPLE_INTEN QDEC_CONFIG_SAMPLE_INTEN
  498. #endif
  499. #if defined(QDEC_CONFIG_IRQ_PRIORITY)
  500. #undef NRFX_QDEC_CONFIG_IRQ_PRIORITY
  501. #define NRFX_QDEC_CONFIG_IRQ_PRIORITY QDEC_CONFIG_IRQ_PRIORITY
  502. #endif
  503. #if defined(QDEC_CONFIG_LOG_ENABLED)
  504. #undef NRFX_QDEC_CONFIG_LOG_ENABLED
  505. #define NRFX_QDEC_CONFIG_LOG_ENABLED QDEC_CONFIG_LOG_ENABLED
  506. #endif
  507. #if defined(QDEC_CONFIG_LOG_LEVEL)
  508. #undef NRFX_QDEC_CONFIG_LOG_LEVEL
  509. #define NRFX_QDEC_CONFIG_LOG_LEVEL QDEC_CONFIG_LOG_LEVEL
  510. #endif
  511. #if defined(QDEC_CONFIG_INFO_COLOR)
  512. #undef NRFX_QDEC_CONFIG_INFO_COLOR
  513. #define NRFX_QDEC_CONFIG_INFO_COLOR QDEC_CONFIG_INFO_COLOR
  514. #endif
  515. #if defined(QDEC_CONFIG_DEBUG_COLOR)
  516. #undef NRFX_QDEC_CONFIG_DEBUG_COLOR
  517. #define NRFX_QDEC_CONFIG_DEBUG_COLOR QDEC_CONFIG_DEBUG_COLOR
  518. #endif
  519. #endif // defined(QDEC_ENABLED)
  520. //------------------------------------------------------------------------------
  521. // QSPI
  522. #if defined(QSPI_ENABLED)
  523. #undef NRFX_QSPI_ENABLED
  524. #define NRFX_QSPI_ENABLED QSPI_ENABLED
  525. #if defined(QSPI_CONFIG_SCK_DELAY)
  526. #undef NRFX_QSPI_CONFIG_SCK_DELAY
  527. #define NRFX_QSPI_CONFIG_SCK_DELAY QSPI_CONFIG_SCK_DELAY
  528. #endif
  529. #if defined(QSPI_CONFIG_XIP_OFFSET)
  530. #undef NRFX_QSPI_CONFIG_XIP_OFFSET
  531. #define NRFX_QSPI_CONFIG_XIP_OFFSET QSPI_CONFIG_XIP_OFFSET
  532. #endif
  533. #if defined(QSPI_CONFIG_READOC)
  534. #undef NRFX_QSPI_CONFIG_READOC
  535. #define NRFX_QSPI_CONFIG_READOC QSPI_CONFIG_READOC
  536. #endif
  537. #if defined(QSPI_CONFIG_WRITEOC)
  538. #undef NRFX_QSPI_CONFIG_WRITEOC
  539. #define NRFX_QSPI_CONFIG_WRITEOC QSPI_CONFIG_WRITEOC
  540. #endif
  541. #if defined(QSPI_CONFIG_ADDRMODE)
  542. #undef NRFX_QSPI_CONFIG_ADDRMODE
  543. #define NRFX_QSPI_CONFIG_ADDRMODE QSPI_CONFIG_ADDRMODE
  544. #endif
  545. #if defined(QSPI_CONFIG_MODE)
  546. #undef NRFX_QSPI_CONFIG_MODE
  547. #define NRFX_QSPI_CONFIG_MODE QSPI_CONFIG_MODE
  548. #endif
  549. #if defined(QSPI_CONFIG_FREQUENCY)
  550. #undef NRFX_QSPI_CONFIG_FREQUENCY
  551. #define NRFX_QSPI_CONFIG_FREQUENCY QSPI_CONFIG_FREQUENCY
  552. #endif
  553. #if defined(QSPI_CONFIG_IRQ_PRIORITY)
  554. #undef NRFX_QSPI_CONFIG_IRQ_PRIORITY
  555. #define NRFX_QSPI_CONFIG_IRQ_PRIORITY QSPI_CONFIG_IRQ_PRIORITY
  556. #endif
  557. #if defined(QSPI_PIN_SCK)
  558. #undef NRFX_QSPI_PIN_SCK
  559. #define NRFX_QSPI_PIN_SCK QSPI_PIN_SCK
  560. #endif
  561. #if defined(QSPI_PIN_CSN)
  562. #undef NRFX_QSPI_PIN_CSN
  563. #define NRFX_QSPI_PIN_CSN QSPI_PIN_CSN
  564. #endif
  565. #if defined(QSPI_PIN_IO0)
  566. #undef NRFX_QSPI_PIN_IO0
  567. #define NRFX_QSPI_PIN_IO0 QSPI_PIN_IO0
  568. #endif
  569. #if defined(QSPI_PIN_IO0)
  570. #undef NRFX_QSPI_PIN_IO0
  571. #define NRFX_QSPI_PIN_IO0 QSPI_PIN_IO0
  572. #endif
  573. #if defined(QSPI_PIN_IO1)
  574. #undef NRFX_QSPI_PIN_IO1
  575. #define NRFX_QSPI_PIN_IO1 QSPI_PIN_IO1
  576. #endif
  577. #if defined(QSPI_PIN_IO2)
  578. #undef NRFX_QSPI_PIN_IO2
  579. #define NRFX_QSPI_PIN_IO2 QSPI_PIN_IO2
  580. #endif
  581. #if defined(QSPI_PIN_IO3)
  582. #undef NRFX_QSPI_PIN_IO3
  583. #define NRFX_QSPI_PIN_IO3 QSPI_PIN_IO3
  584. #endif
  585. #endif // defined(QSPI_ENABLED)
  586. //------------------------------------------------------------------------------
  587. // RNG
  588. #if defined(RNG_ENABLED)
  589. #undef NRFX_RNG_ENABLED
  590. #define NRFX_RNG_ENABLED RNG_ENABLED
  591. #if defined(RNG_CONFIG_ERROR_CORRECTION)
  592. #undef NRFX_RNG_CONFIG_ERROR_CORRECTION
  593. #define NRFX_RNG_CONFIG_ERROR_CORRECTION RNG_CONFIG_ERROR_CORRECTION
  594. #endif
  595. #if defined(RNG_CONFIG_IRQ_PRIORITY)
  596. #undef NRFX_RNG_CONFIG_IRQ_PRIORITY
  597. #define NRFX_RNG_CONFIG_IRQ_PRIORITY RNG_CONFIG_IRQ_PRIORITY
  598. #endif
  599. #if defined(RNG_CONFIG_LOG_ENABLED)
  600. #undef NRFX_RNG_CONFIG_LOG_ENABLED
  601. #define NRFX_RNG_CONFIG_LOG_ENABLED RNG_CONFIG_LOG_ENABLED
  602. #endif
  603. #if defined(RNG_CONFIG_LOG_LEVEL)
  604. #undef NRFX_RNG_CONFIG_LOG_LEVEL
  605. #define NRFX_RNG_CONFIG_LOG_LEVEL RNG_CONFIG_LOG_LEVEL
  606. #endif
  607. #if defined(RNG_CONFIG_INFO_COLOR)
  608. #undef NRFX_RNG_CONFIG_INFO_COLOR
  609. #define NRFX_RNG_CONFIG_INFO_COLOR RNG_CONFIG_INFO_COLOR
  610. #endif
  611. #if defined(RNG_CONFIG_DEBUG_COLOR)
  612. #undef NRFX_RNG_CONFIG_DEBUG_COLOR
  613. #define NRFX_RNG_CONFIG_DEBUG_COLOR RNG_CONFIG_DEBUG_COLOR
  614. #endif
  615. #endif // defined(RNG_ENABLED)
  616. //------------------------------------------------------------------------------
  617. // RTC
  618. #if defined(RTC_ENABLED)
  619. #undef NRFX_RTC_ENABLED
  620. #define NRFX_RTC_ENABLED RTC_ENABLED
  621. #if defined(RTC0_ENABLED)
  622. #undef NRFX_RTC0_ENABLED
  623. #define NRFX_RTC0_ENABLED RTC0_ENABLED
  624. #endif
  625. #if defined(RTC1_ENABLED)
  626. #undef NRFX_RTC1_ENABLED
  627. #define NRFX_RTC1_ENABLED RTC1_ENABLED
  628. #endif
  629. #if defined(RTC2_ENABLED)
  630. #undef NRFX_RTC2_ENABLED
  631. #define NRFX_RTC2_ENABLED RTC2_ENABLED
  632. #endif
  633. #if defined(RTC_DEFAULT_CONFIG_FREQUENCY)
  634. #undef NRFX_RTC_DEFAULT_CONFIG_FREQUENCY
  635. #define NRFX_RTC_DEFAULT_CONFIG_FREQUENCY RTC_DEFAULT_CONFIG_FREQUENCY
  636. #endif
  637. #if defined(RTC_DEFAULT_CONFIG_RELIABLE)
  638. #undef NRFX_RTC_DEFAULT_CONFIG_RELIABLE
  639. #define NRFX_RTC_DEFAULT_CONFIG_RELIABLE RTC_DEFAULT_CONFIG_RELIABLE
  640. #endif
  641. #if defined(RTC_DEFAULT_CONFIG_IRQ_PRIORITY)
  642. #undef NRFX_RTC_DEFAULT_CONFIG_IRQ_PRIORITY
  643. #define NRFX_RTC_DEFAULT_CONFIG_IRQ_PRIORITY RTC_DEFAULT_CONFIG_IRQ_PRIORITY
  644. #endif
  645. #if defined(NRF_MAXIMUM_LATENCY_US)
  646. #undef NRFX_RTC_MAXIMUM_LATENCY_US
  647. #define NRFX_RTC_MAXIMUM_LATENCY_US NRF_MAXIMUM_LATENCY_US
  648. #endif
  649. #if defined(RTC_CONFIG_LOG_ENABLED)
  650. #undef NRFX_RTC_CONFIG_LOG_ENABLED
  651. #define NRFX_RTC_CONFIG_LOG_ENABLED RTC_CONFIG_LOG_ENABLED
  652. #endif
  653. #if defined(RTC_CONFIG_LOG_LEVEL)
  654. #undef NRFX_RTC_CONFIG_LOG_LEVEL
  655. #define NRFX_RTC_CONFIG_LOG_LEVEL RTC_CONFIG_LOG_LEVEL
  656. #endif
  657. #if defined(RTC_CONFIG_INFO_COLOR)
  658. #undef NRFX_RTC_CONFIG_INFO_COLOR
  659. #define NRFX_RTC_CONFIG_INFO_COLOR RTC_CONFIG_INFO_COLOR
  660. #endif
  661. #if defined(RTC_CONFIG_DEBUG_COLOR)
  662. #undef NRFX_RTC_CONFIG_DEBUG_COLOR
  663. #define NRFX_RTC_CONFIG_DEBUG_COLOR RTC_CONFIG_DEBUG_COLOR
  664. #endif
  665. #endif // defined(RTC_ENABLED)
  666. //------------------------------------------------------------------------------
  667. // SAADC
  668. #if defined(SAADC_ENABLED)
  669. #undef NRFX_SAADC_ENABLED
  670. #define NRFX_SAADC_ENABLED SAADC_ENABLED
  671. #if defined(SAADC_CONFIG_RESOLUTION)
  672. #undef NRFX_SAADC_CONFIG_RESOLUTION
  673. #define NRFX_SAADC_CONFIG_RESOLUTION SAADC_CONFIG_RESOLUTION
  674. #endif
  675. #if defined(SAADC_CONFIG_OVERSAMPLE)
  676. #undef NRFX_SAADC_CONFIG_OVERSAMPLE
  677. #define NRFX_SAADC_CONFIG_OVERSAMPLE SAADC_CONFIG_OVERSAMPLE
  678. #endif
  679. #if defined(SAADC_CONFIG_LP_MODE)
  680. #undef NRFX_SAADC_CONFIG_LP_MODE
  681. #define NRFX_SAADC_CONFIG_LP_MODE SAADC_CONFIG_LP_MODE
  682. #endif
  683. #if defined(SAADC_CONFIG_IRQ_PRIORITY)
  684. #undef NRFX_SAADC_CONFIG_IRQ_PRIORITY
  685. #define NRFX_SAADC_CONFIG_IRQ_PRIORITY SAADC_CONFIG_IRQ_PRIORITY
  686. #endif
  687. #if defined(SAADC_CONFIG_LOG_ENABLED)
  688. #undef NRFX_SAADC_CONFIG_LOG_ENABLED
  689. #define NRFX_SAADC_CONFIG_LOG_ENABLED SAADC_CONFIG_LOG_ENABLED
  690. #endif
  691. #if defined(SAADC_CONFIG_LOG_LEVEL)
  692. #undef NRFX_SAADC_CONFIG_LOG_LEVEL
  693. #define NRFX_SAADC_CONFIG_LOG_LEVEL SAADC_CONFIG_LOG_LEVEL
  694. #endif
  695. #if defined(SAADC_CONFIG_INFO_COLOR)
  696. #undef NRFX_SAADC_CONFIG_INFO_COLOR
  697. #define NRFX_SAADC_CONFIG_INFO_COLOR SAADC_CONFIG_INFO_COLOR
  698. #endif
  699. #if defined(SAADC_CONFIG_DEBUG_COLOR)
  700. #undef NRFX_SAADC_CONFIG_DEBUG_COLOR
  701. #define NRFX_SAADC_CONFIG_DEBUG_COLOR SAADC_CONFIG_DEBUG_COLOR
  702. #endif
  703. #endif // defined(SAADC_ENABLED)
  704. //------------------------------------------------------------------------------
  705. // SPI
  706. #if defined(SPI_ENABLED)
  707. #undef NRFX_SPI_ENABLED
  708. #define NRFX_SPI_ENABLED \
  709. (SPI_ENABLED && (NRFX_SPI0_ENABLED || NRFX_SPI1_ENABLED || NRFX_SPI2_ENABLED))
  710. #undef NRFX_SPIM_ENABLED
  711. #define NRFX_SPIM_ENABLED \
  712. (SPI_ENABLED && (NRFX_SPIM0_ENABLED || NRFX_SPIM1_ENABLED || NRFX_SPIM2_ENABLED))
  713. #if defined(SPI_PRESENT) && !defined(SPIM_PRESENT)
  714. #undef NRFX_SPI0_ENABLED
  715. #define NRFX_SPI0_ENABLED SPI0_ENABLED
  716. #undef NRFX_SPIM0_ENABLED
  717. #define NRFX_SPIM0_ENABLED 0
  718. #undef NRFX_SPI1_ENABLED
  719. #define NRFX_SPI1_ENABLED SPI1_ENABLED
  720. #undef NRFX_SPIM1_ENABLED
  721. #define NRFX_SPIM1_ENABLED 0
  722. #undef NRFX_SPI2_ENABLED
  723. #define NRFX_SPI2_ENABLED SPI2_ENABLED
  724. #undef NRFX_SPIM2_ENABLED
  725. #define NRFX_SPIM2_ENABLED 0
  726. #elif !defined(SPI_PRESENT) && defined(SPIM_PRESENT)
  727. #undef NRFX_SPI0_ENABLED
  728. #define NRFX_SPI0_ENABLED 0
  729. #undef NRFX_SPIM0_ENABLED
  730. #define NRFX_SPIM0_ENABLED SPI0_ENABLED
  731. #undef NRFX_SPI1_ENABLED
  732. #define NRFX_SPI1_ENABLED 0
  733. #undef NRFX_SPIM1_ENABLED
  734. #define NRFX_SPIM1_ENABLED SPI1_ENABLED
  735. #undef NRFX_SPI2_ENABLED
  736. #define NRFX_SPI2_ENABLED 0
  737. #undef NRFX_SPIM2_ENABLED
  738. #define NRFX_SPIM2_ENABLED SPI2_ENABLED
  739. #else // -> defined(SPI_PRESENT) && defined(SPIM_PRESENT)
  740. #undef NRFX_SPI0_ENABLED
  741. #define NRFX_SPI0_ENABLED (SPI0_ENABLED && !SPI0_USE_EASY_DMA)
  742. #undef NRFX_SPIM0_ENABLED
  743. #define NRFX_SPIM0_ENABLED (SPI0_ENABLED && SPI0_USE_EASY_DMA)
  744. #undef NRFX_SPI1_ENABLED
  745. #define NRFX_SPI1_ENABLED (SPI1_ENABLED && !SPI1_USE_EASY_DMA)
  746. #undef NRFX_SPIM1_ENABLED
  747. #define NRFX_SPIM1_ENABLED (SPI1_ENABLED && SPI1_USE_EASY_DMA)
  748. #undef NRFX_SPI2_ENABLED
  749. #define NRFX_SPI2_ENABLED (SPI2_ENABLED && !SPI2_USE_EASY_DMA)
  750. #undef NRFX_SPIM2_ENABLED
  751. #define NRFX_SPIM2_ENABLED (SPI2_ENABLED && SPI2_USE_EASY_DMA)
  752. #endif // -> defined(SPI_PRESENT) && defined(SPIM_PRESENT)
  753. #if defined(NRF_SPI_DRV_MISO_PULLUP_CFG)
  754. #undef NRFX_SPI_MISO_PULL_CFG
  755. #define NRFX_SPI_MISO_PULL_CFG NRF_SPI_DRV_MISO_PULLUP_CFG
  756. #undef NRFX_SPIM_MISO_PULL_CFG
  757. #define NRFX_SPIM_MISO_PULL_CFG NRF_SPI_DRV_MISO_PULLUP_CFG
  758. #endif
  759. #if defined(SPI_DEFAULT_CONFIG_IRQ_PRIORITY)
  760. #undef NRFX_SPI_DEFAULT_CONFIG_IRQ_PRIORITY
  761. #define NRFX_SPI_DEFAULT_CONFIG_IRQ_PRIORITY SPI_DEFAULT_CONFIG_IRQ_PRIORITY
  762. #undef NRFX_SPIM_DEFAULT_CONFIG_IRQ_PRIORITY
  763. #define NRFX_SPIM_DEFAULT_CONFIG_IRQ_PRIORITY SPI_DEFAULT_CONFIG_IRQ_PRIORITY
  764. #endif
  765. #if defined(SPI_CONFIG_LOG_ENABLED)
  766. #undef NRFX_SPI_CONFIG_LOG_ENABLED
  767. #define NRFX_SPI_CONFIG_LOG_ENABLED SPI_CONFIG_LOG_ENABLED
  768. #undef NRFX_SPIM_CONFIG_LOG_ENABLED
  769. #define NRFX_SPIM_CONFIG_LOG_ENABLED SPI_CONFIG_LOG_ENABLED
  770. #endif
  771. #if defined(SPI_CONFIG_LOG_LEVEL)
  772. #undef NRFX_SPI_CONFIG_LOG_LEVEL
  773. #define NRFX_SPI_CONFIG_LOG_LEVEL SPI_CONFIG_LOG_LEVEL
  774. #undef NRFX_SPIM_CONFIG_LOG_LEVEL
  775. #define NRFX_SPIM_CONFIG_LOG_LEVEL SPI_CONFIG_LOG_LEVEL
  776. #endif
  777. #if defined(SPI_CONFIG_INFO_COLOR)
  778. #undef NRFX_SPI_CONFIG_INFO_COLOR
  779. #define NRFX_SPI_CONFIG_INFO_COLOR SPI_CONFIG_INFO_COLOR
  780. #undef NRFX_SPIM_CONFIG_INFO_COLOR
  781. #define NRFX_SPIM_CONFIG_INFO_COLOR SPI_CONFIG_INFO_COLOR
  782. #endif
  783. #if defined(SPI_CONFIG_DEBUG_COLOR)
  784. #undef NRFX_SPI_CONFIG_DEBUG_COLOR
  785. #define NRFX_SPI_CONFIG_DEBUG_COLOR SPI_CONFIG_DEBUG_COLOR
  786. #undef NRFX_SPIM_CONFIG_DEBUG_COLOR
  787. #define NRFX_SPIM_CONFIG_DEBUG_COLOR SPI_CONFIG_DEBUG_COLOR
  788. #endif
  789. #if defined(SPIM_NRF52_ANOMALY_109_WORKAROUND_ENABLED)
  790. #undef NRFX_SPIM_NRF52_ANOMALY_109_WORKAROUND_ENABLED
  791. #define NRFX_SPIM_NRF52_ANOMALY_109_WORKAROUND_ENABLED SPIM_NRF52_ANOMALY_109_WORKAROUND_ENABLED
  792. #endif
  793. #endif // defined(SPI_ENABLED)
  794. //------------------------------------------------------------------------------
  795. // SPIS
  796. #if defined(SPIS_ENABLED)
  797. #undef NRFX_SPIS_ENABLED
  798. #define NRFX_SPIS_ENABLED SPIS_ENABLED
  799. #if defined(SPIS0_ENABLED)
  800. #undef NRFX_SPIS0_ENABLED
  801. #define NRFX_SPIS0_ENABLED SPIS0_ENABLED
  802. #endif
  803. #if defined(SPIS1_ENABLED)
  804. #undef NRFX_SPIS1_ENABLED
  805. #define NRFX_SPIS1_ENABLED SPIS1_ENABLED
  806. #endif
  807. #if defined(SPIS2_ENABLED)
  808. #undef NRFX_SPIS2_ENABLED
  809. #define NRFX_SPIS2_ENABLED SPIS2_ENABLED
  810. #endif
  811. #if defined(SPIS_DEFAULT_CONFIG_IRQ_PRIORITY)
  812. #undef NRFX_SPIS_DEFAULT_CONFIG_IRQ_PRIORITY
  813. #define NRFX_SPIS_DEFAULT_CONFIG_IRQ_PRIORITY SPIS_DEFAULT_CONFIG_IRQ_PRIORITY
  814. #endif
  815. #if defined(SPIS_DEFAULT_MODE)
  816. #undef NRFX_SPIS_DEFAULT_MODE
  817. #define NRFX_SPIS_DEFAULT_MODE SPIS_DEFAULT_MODE
  818. #endif
  819. #if defined(SPIS_DEFAULT_BIT_ORDER)
  820. #undef NRFX_SPIS_DEFAULT_BIT_ORDER
  821. #define NRFX_SPIS_DEFAULT_BIT_ORDER SPIS_DEFAULT_BIT_ORDER
  822. #endif
  823. #if defined(SPIS_DEFAULT_DEF)
  824. #undef NRFX_SPIS_DEFAULT_DEF
  825. #define NRFX_SPIS_DEFAULT_DEF SPIS_DEFAULT_DEF
  826. #endif
  827. #if defined(SPIS_DEFAULT_ORC)
  828. #undef NRFX_SPIS_DEFAULT_ORC
  829. #define NRFX_SPIS_DEFAULT_ORC SPIS_DEFAULT_ORC
  830. #endif
  831. #if defined(SPIS_CONFIG_LOG_ENABLED)
  832. #undef NRFX_SPIS_CONFIG_LOG_ENABLED
  833. #define NRFX_SPIS_CONFIG_LOG_ENABLED SPIS_CONFIG_LOG_ENABLED
  834. #endif
  835. #if defined(SPIS_CONFIG_LOG_LEVEL)
  836. #undef NRFX_SPIS_CONFIG_LOG_LEVEL
  837. #define NRFX_SPIS_CONFIG_LOG_LEVEL SPIS_CONFIG_LOG_LEVEL
  838. #endif
  839. #if defined(SPIS_CONFIG_INFO_COLOR)
  840. #undef NRFX_SPIS_CONFIG_INFO_COLOR
  841. #define NRFX_SPIS_CONFIG_INFO_COLOR SPIS_CONFIG_INFO_COLOR
  842. #endif
  843. #if defined(SPIS_CONFIG_DEBUG_COLOR)
  844. #undef NRFX_SPIS_CONFIG_DEBUG_COLOR
  845. #define NRFX_SPIS_CONFIG_DEBUG_COLOR SPIS_CONFIG_DEBUG_COLOR
  846. #endif
  847. #if defined(SPIS_NRF52_ANOMALY_109_WORKAROUND_ENABLED)
  848. #undef NRFX_SPIS_NRF52_ANOMALY_109_WORKAROUND_ENABLED
  849. #define NRFX_SPIS_NRF52_ANOMALY_109_WORKAROUND_ENABLED SPIS_NRF52_ANOMALY_109_WORKAROUND_ENABLED
  850. #endif
  851. #endif // defined(SPIS_ENABLED)
  852. //------------------------------------------------------------------------------
  853. // SWI
  854. #if defined(SWI_DISABLE0)
  855. #undef NRFX_SWI0_DISABLED
  856. #define NRFX_SWI0_DISABLED 1
  857. #endif
  858. #if defined(SWI_DISABLE1)
  859. #undef NRFX_SWI1_DISABLED
  860. #define NRFX_SWI1_DISABLED 1
  861. #endif
  862. #if defined(SWI_DISABLE2)
  863. #undef NRFX_SWI2_DISABLED
  864. #define NRFX_SWI2_DISABLED 1
  865. #endif
  866. #if defined(SWI_DISABLE3)
  867. #undef NRFX_SWI3_DISABLED
  868. #define NRFX_SWI3_DISABLED 1
  869. #endif
  870. #if defined(SWI_DISABLE4)
  871. #undef NRFX_SWI4_DISABLED
  872. #define NRFX_SWI4_DISABLED 1
  873. #endif
  874. #if defined(SWI_DISABLE5)
  875. #undef NRFX_SWI5_DISABLED
  876. #define NRFX_SWI5_DISABLED 1
  877. #endif
  878. #if defined(EGU_ENABLED)
  879. #undef NRFX_EGU_ENABLED
  880. #define NRFX_EGU_ENABLED EGU_ENABLED
  881. #endif
  882. #if defined(SWI_CONFIG_LOG_ENABLED)
  883. #undef NRFX_SWI_CONFIG_LOG_ENABLED
  884. #define NRFX_SWI_CONFIG_LOG_ENABLED SWI_CONFIG_LOG_ENABLED
  885. #endif
  886. #if defined(SWI_CONFIG_LOG_LEVEL)
  887. #undef NRFX_SWI_CONFIG_LOG_LEVEL
  888. #define NRFX_SWI_CONFIG_LOG_LEVEL SWI_CONFIG_LOG_LEVEL
  889. #endif
  890. #if defined(SWI_CONFIG_INFO_COLOR)
  891. #undef NRFX_SWI_CONFIG_INFO_COLOR
  892. #define NRFX_SWI_CONFIG_INFO_COLOR SWI_CONFIG_INFO_COLOR
  893. #endif
  894. #if defined(SWI_CONFIG_DEBUG_COLOR)
  895. #undef NRFX_SWI_CONFIG_DEBUG_COLOR
  896. #define NRFX_SWI_CONFIG_DEBUG_COLOR SWI_CONFIG_DEBUG_COLOR
  897. #endif
  898. //------------------------------------------------------------------------------
  899. // SysTick
  900. #if defined(SYSTICK_ENABLED)
  901. #undef NRFX_SYSTICK_ENABLED
  902. #define NRFX_SYSTICK_ENABLED SYSTICK_ENABLED
  903. #endif // defined(SYSTICK_ENABLED)
  904. //------------------------------------------------------------------------------
  905. // TIMER
  906. #if defined(TIMER_ENABLED)
  907. #undef NRFX_TIMER_ENABLED
  908. #define NRFX_TIMER_ENABLED TIMER_ENABLED
  909. #if defined(TIMER0_ENABLED)
  910. #undef NRFX_TIMER0_ENABLED
  911. #define NRFX_TIMER0_ENABLED TIMER0_ENABLED
  912. #endif
  913. #if defined(TIMER1_ENABLED)
  914. #undef NRFX_TIMER1_ENABLED
  915. #define NRFX_TIMER1_ENABLED TIMER1_ENABLED
  916. #endif
  917. #if defined(TIMER2_ENABLED)
  918. #undef NRFX_TIMER2_ENABLED
  919. #define NRFX_TIMER2_ENABLED TIMER2_ENABLED
  920. #endif
  921. #if defined(TIMER3_ENABLED)
  922. #undef NRFX_TIMER3_ENABLED
  923. #define NRFX_TIMER3_ENABLED TIMER3_ENABLED
  924. #endif
  925. #if defined(TIMER4_ENABLED)
  926. #undef NRFX_TIMER4_ENABLED
  927. #define NRFX_TIMER4_ENABLED TIMER4_ENABLED
  928. #endif
  929. #if defined(TIMER_DEFAULT_CONFIG_FREQUENCY)
  930. #undef NRFX_TIMER_DEFAULT_CONFIG_FREQUENCY
  931. #define NRFX_TIMER_DEFAULT_CONFIG_FREQUENCY TIMER_DEFAULT_CONFIG_FREQUENCY
  932. #endif
  933. #if defined(TIMER_DEFAULT_CONFIG_MODE)
  934. #undef NRFX_TIMER_DEFAULT_CONFIG_MODE
  935. #define NRFX_TIMER_DEFAULT_CONFIG_MODE TIMER_DEFAULT_CONFIG_MODE
  936. #endif
  937. #if defined(TIMER_DEFAULT_CONFIG_BIT_WIDTH)
  938. #undef NRFX_TIMER_DEFAULT_CONFIG_BIT_WIDTH
  939. #define NRFX_TIMER_DEFAULT_CONFIG_BIT_WIDTH TIMER_DEFAULT_CONFIG_BIT_WIDTH
  940. #endif
  941. #if defined(TIMER_DEFAULT_CONFIG_IRQ_PRIORITY)
  942. #undef NRFX_TIMER_DEFAULT_CONFIG_IRQ_PRIORITY
  943. #define NRFX_TIMER_DEFAULT_CONFIG_IRQ_PRIORITY TIMER_DEFAULT_CONFIG_IRQ_PRIORITY
  944. #endif
  945. #if defined(TIMER_CONFIG_LOG_ENABLED)
  946. #undef NRFX_TIMER_CONFIG_LOG_ENABLED
  947. #define NRFX_TIMER_CONFIG_LOG_ENABLED TIMER_CONFIG_LOG_ENABLED
  948. #endif
  949. #if defined(TIMER_CONFIG_LOG_LEVEL)
  950. #undef NRFX_TIMER_CONFIG_LOG_LEVEL
  951. #define NRFX_TIMER_CONFIG_LOG_LEVEL TIMER_CONFIG_LOG_LEVEL
  952. #endif
  953. #if defined(TIMER_CONFIG_INFO_COLOR)
  954. #undef NRFX_TIMER_CONFIG_INFO_COLOR
  955. #define NRFX_TIMER_CONFIG_INFO_COLOR TIMER_CONFIG_INFO_COLOR
  956. #endif
  957. #if defined(TIMER_CONFIG_DEBUG_COLOR)
  958. #undef NRFX_TIMER_CONFIG_DEBUG_COLOR
  959. #define NRFX_TIMER_CONFIG_DEBUG_COLOR TIMER_CONFIG_DEBUG_COLOR
  960. #endif
  961. #endif // defined(TIMER_ENABLED)
  962. //------------------------------------------------------------------------------
  963. // TWI
  964. #define TWI_ONLY ( defined(TWI_PRESENT) && !defined(TWIM_PRESENT))
  965. #define TWIM_ONLY (!defined(TWI_PRESENT) && defined(TWIM_PRESENT))
  966. #define TWI_AND_TWIM ( defined(TWI_PRESENT) && defined(TWIM_PRESENT))
  967. #if defined(TWI_ENABLED)
  968. #undef NRFX_TWI_ENABLED
  969. #define NRFX_TWI_ENABLED (TWI_ENABLED && (NRFX_TWI0_ENABLED || NRFX_TWI1_ENABLED))
  970. #undef NRFX_TWIM_ENABLED
  971. #define NRFX_TWIM_ENABLED (TWI_ENABLED && (NRFX_TWIM0_ENABLED || NRFX_TWIM1_ENABLED))
  972. #if defined(TWI_PRESENT) && !defined(TWIM_PRESENT)
  973. #undef NRFX_TWI0_ENABLED
  974. #define NRFX_TWI0_ENABLED TWI0_ENABLED
  975. #undef NRFX_TWIM0_ENABLED
  976. #define NRFX_TWIM0_ENABLED 0
  977. #undef NRFX_TWI1_ENABLED
  978. #define NRFX_TWI1_ENABLED TWI1_ENABLED
  979. #undef NRFX_TWIM1_ENABLED
  980. #define NRFX_TWIM1_ENABLED 0
  981. #elif !defined(TWI_PRESENT) && defined(TWIM_PRESENT)
  982. #undef NRFX_TWI0_ENABLED
  983. #define NRFX_TWI0_ENABLED 0
  984. #undef NRFX_TWIM0_ENABLED
  985. #define NRFX_TWIM0_ENABLED TWI0_ENABLED
  986. #undef NRFX_TWI1_ENABLED
  987. #define NRFX_TWI1_ENABLED 0
  988. #undef NRFX_TWIM1_ENABLED
  989. #define NRFX_TWIM1_ENABLED TWI1_ENABLED
  990. #else // -> defined(TWI_PRESENT) && defined(TWIM_PRESENT)
  991. #undef NRFX_TWI0_ENABLED
  992. #define NRFX_TWI0_ENABLED (TWI0_ENABLED && !TWI0_USE_EASY_DMA)
  993. #undef NRFX_TWIM0_ENABLED
  994. #define NRFX_TWIM0_ENABLED (TWI0_ENABLED && TWI0_USE_EASY_DMA)
  995. #undef NRFX_TWI1_ENABLED
  996. #define NRFX_TWI1_ENABLED (TWI1_ENABLED && !TWI1_USE_EASY_DMA)
  997. #undef NRFX_TWIM1_ENABLED
  998. #define NRFX_TWIM1_ENABLED (TWI1_ENABLED && TWI1_USE_EASY_DMA)
  999. #endif // -> defined(TWI_PRESENT) && defined(TWIM_PRESENT)
  1000. #if defined(TWI_DEFAULT_CONFIG_FREQUENCY)
  1001. #undef NRFX_TWI_DEFAULT_CONFIG_FREQUENCY
  1002. #define NRFX_TWI_DEFAULT_CONFIG_FREQUENCY TWI_DEFAULT_CONFIG_FREQUENCY
  1003. #undef NRFX_TWIM_DEFAULT_CONFIG_FREQUENCY
  1004. #define NRFX_TWIM_DEFAULT_CONFIG_FREQUENCY TWI_DEFAULT_CONFIG_FREQUENCY
  1005. #endif
  1006. #if defined(TWI_DEFAULT_CONFIG_HOLD_BUS_UNINIT)
  1007. #undef NRFX_TWI_DEFAULT_CONFIG_HOLD_BUS_UNINIT
  1008. #define NRFX_TWI_DEFAULT_CONFIG_HOLD_BUS_UNINIT TWI_DEFAULT_CONFIG_HOLD_BUS_UNINIT
  1009. #undef NRFX_TWIM_DEFAULT_CONFIG_HOLD_BUS_UNINIT
  1010. #define NRFX_TWIM_DEFAULT_CONFIG_HOLD_BUS_UNINIT TWI_DEFAULT_CONFIG_HOLD_BUS_UNINIT
  1011. #endif
  1012. #if defined(TWI_DEFAULT_CONFIG_IRQ_PRIORITY)
  1013. #undef NRFX_TWI_DEFAULT_CONFIG_IRQ_PRIORITY
  1014. #define NRFX_TWI_DEFAULT_CONFIG_IRQ_PRIORITY TWI_DEFAULT_CONFIG_IRQ_PRIORITY
  1015. #undef NRFX_TWIM_DEFAULT_CONFIG_IRQ_PRIORITY
  1016. #define NRFX_TWIM_DEFAULT_CONFIG_IRQ_PRIORITY TWI_DEFAULT_CONFIG_IRQ_PRIORITY
  1017. #endif
  1018. #if defined(TWI_CONFIG_LOG_ENABLED)
  1019. #undef NRFX_TWI_CONFIG_LOG_ENABLED
  1020. #define NRFX_TWI_CONFIG_LOG_ENABLED TWI_CONFIG_LOG_ENABLED
  1021. #undef NRFX_TWIM_CONFIG_LOG_ENABLED
  1022. #define NRFX_TWIM_CONFIG_LOG_ENABLED TWI_CONFIG_LOG_ENABLED
  1023. #endif
  1024. #if defined(TWI_CONFIG_LOG_LEVEL)
  1025. #undef NRFX_TWI_CONFIG_LOG_LEVEL
  1026. #define NRFX_TWI_CONFIG_LOG_LEVEL TWI_CONFIG_LOG_LEVEL
  1027. #undef NRFX_TWIM_CONFIG_LOG_LEVEL
  1028. #define NRFX_TWIM_CONFIG_LOG_LEVEL TWI_CONFIG_LOG_LEVEL
  1029. #endif
  1030. #if defined(TWI_CONFIG_INFO_COLOR)
  1031. #undef NRFX_TWI_CONFIG_INFO_COLOR
  1032. #define NRFX_TWI_CONFIG_INFO_COLOR TWI_CONFIG_INFO_COLOR
  1033. #undef NRFX_TWIM_CONFIG_INFO_COLOR
  1034. #define NRFX_TWIM_CONFIG_INFO_COLOR TWI_CONFIG_INFO_COLOR
  1035. #endif
  1036. #if defined(TWI_CONFIG_DEBUG_COLOR)
  1037. #undef NRFX_TWI_CONFIG_DEBUG_COLOR
  1038. #define NRFX_TWI_CONFIG_DEBUG_COLOR TWI_CONFIG_DEBUG_COLOR
  1039. #undef NRFX_TWIM_CONFIG_DEBUG_COLOR
  1040. #define NRFX_TWIM_CONFIG_DEBUG_COLOR TWI_CONFIG_DEBUG_COLOR
  1041. #endif
  1042. #if defined(TWIM_NRF52_ANOMALY_109_WORKAROUND_ENABLED)
  1043. #undef NRFX_TWIM_NRF52_ANOMALY_109_WORKAROUND_ENABLED
  1044. #define NRFX_TWIM_NRF52_ANOMALY_109_WORKAROUND_ENABLED TWIM_NRF52_ANOMALY_109_WORKAROUND_ENABLED
  1045. #endif
  1046. #endif // defined(TWI_ENABLED)
  1047. //------------------------------------------------------------------------------
  1048. // TWIS
  1049. #if defined(TWIS_ENABLED)
  1050. #undef NRFX_TWIS_ENABLED
  1051. #define NRFX_TWIS_ENABLED TWIS_ENABLED
  1052. #if defined(TWIS0_ENABLED)
  1053. #undef NRFX_TWIS0_ENABLED
  1054. #define NRFX_TWIS0_ENABLED TWIS0_ENABLED
  1055. #endif
  1056. #if defined(TWIS1_ENABLED)
  1057. #undef NRFX_TWIS1_ENABLED
  1058. #define NRFX_TWIS1_ENABLED TWIS1_ENABLED
  1059. #endif
  1060. #if defined(TWIS_ASSUME_INIT_AFTER_RESET_ONLY)
  1061. #undef NRFX_TWIS_ASSUME_INIT_AFTER_RESET_ONLY
  1062. #define NRFX_TWIS_ASSUME_INIT_AFTER_RESET_ONLY TWIS_ASSUME_INIT_AFTER_RESET_ONLY
  1063. #endif
  1064. #if defined(TWIS_NO_SYNC_MODE)
  1065. #undef NRFX_TWIS_NO_SYNC_MODE
  1066. #define NRFX_TWIS_NO_SYNC_MODE TWIS_NO_SYNC_MODE
  1067. #endif
  1068. #if defined(TWIS_DEFAULT_CONFIG_ADDR0)
  1069. #undef NRFX_TWIS_DEFAULT_CONFIG_ADDR0
  1070. #define NRFX_TWIS_DEFAULT_CONFIG_ADDR0 TWIS_DEFAULT_CONFIG_ADDR0
  1071. #endif
  1072. #if defined(TWIS_DEFAULT_CONFIG_ADDR1)
  1073. #undef NRFX_TWIS_DEFAULT_CONFIG_ADDR1
  1074. #define NRFX_TWIS_DEFAULT_CONFIG_ADDR1 TWIS_DEFAULT_CONFIG_ADDR1
  1075. #endif
  1076. #if defined(TWIS_DEFAULT_CONFIG_SCL_PULL)
  1077. #undef NRFX_TWIS_DEFAULT_CONFIG_SCL_PULL
  1078. #define NRFX_TWIS_DEFAULT_CONFIG_SCL_PULL TWIS_DEFAULT_CONFIG_SCL_PULL
  1079. #endif
  1080. #if defined(TWIS_DEFAULT_CONFIG_SDA_PULL)
  1081. #undef NRFX_TWIS_DEFAULT_CONFIG_SDA_PULL
  1082. #define NRFX_TWIS_DEFAULT_CONFIG_SDA_PULL TWIS_DEFAULT_CONFIG_SDA_PULL
  1083. #endif
  1084. #if defined(TWIS_DEFAULT_CONFIG_IRQ_PRIORITY)
  1085. #undef NRFX_TWIS_DEFAULT_CONFIG_IRQ_PRIORITY
  1086. #define NRFX_TWIS_DEFAULT_CONFIG_IRQ_PRIORITY TWIS_DEFAULT_CONFIG_IRQ_PRIORITY
  1087. #endif
  1088. #if defined(TWIS_CONFIG_LOG_ENABLED)
  1089. #undef NRFX_TWIS_CONFIG_LOG_ENABLED
  1090. #define NRFX_TWIS_CONFIG_LOG_ENABLED TWIS_CONFIG_LOG_ENABLED
  1091. #endif
  1092. #if defined(TWIS_CONFIG_LOG_LEVEL)
  1093. #undef NRFX_TWIS_CONFIG_LOG_LEVEL
  1094. #define NRFX_TWIS_CONFIG_LOG_LEVEL TWIS_CONFIG_LOG_LEVEL
  1095. #endif
  1096. #if defined(TWIS_CONFIG_INFO_COLOR)
  1097. #undef NRFX_TWIS_CONFIG_INFO_COLOR
  1098. #define NRFX_TWIS_CONFIG_INFO_COLOR TWIS_CONFIG_INFO_COLOR
  1099. #endif
  1100. #if defined(TWIS_CONFIG_DEBUG_COLOR)
  1101. #undef NRFX_TWIS_CONFIG_DEBUG_COLOR
  1102. #define NRFX_TWIS_CONFIG_DEBUG_COLOR TWIS_CONFIG_DEBUG_COLOR
  1103. #endif
  1104. #endif // defined(TWIS_ENABLED)
  1105. //------------------------------------------------------------------------------
  1106. // UART
  1107. #if defined(UART_ENABLED)
  1108. #undef NRFX_UART_ENABLED
  1109. #define NRFX_UART_ENABLED (UART_ENABLED && NRFX_UART0_ENABLED)
  1110. #undef NRFX_UARTE_ENABLED
  1111. #define NRFX_UARTE_ENABLED (UART_ENABLED && (NRFX_UARTE0_ENABLED || NRFX_UARTE1_ENABLED))
  1112. #if defined(UART0_ENABLED)
  1113. #undef NRFX_UART0_ENABLED
  1114. #define NRFX_UART0_ENABLED (UART0_ENABLED && UART_LEGACY_SUPPORT)
  1115. #undef NRFX_UARTE0_ENABLED
  1116. #define NRFX_UARTE0_ENABLED (UART0_ENABLED && UART_EASY_DMA_SUPPORT)
  1117. #endif
  1118. #if defined(UART1_ENABLED)
  1119. #undef NRFX_UARTE1_ENABLED
  1120. #define NRFX_UARTE1_ENABLED (UART1_ENABLED && UART_EASY_DMA_SUPPORT)
  1121. #endif
  1122. #if defined(UART_DEFAULT_CONFIG_HWFC)
  1123. #undef NRFX_UART_DEFAULT_CONFIG_HWFC
  1124. #define NRFX_UART_DEFAULT_CONFIG_HWFC UART_DEFAULT_CONFIG_HWFC
  1125. #undef NRFX_UARTE_DEFAULT_CONFIG_HWFC
  1126. #define NRFX_UARTE_DEFAULT_CONFIG_HWFC UART_DEFAULT_CONFIG_HWFC
  1127. #endif
  1128. #if defined(UART_DEFAULT_CONFIG_PARITY)
  1129. #undef NRFX_UART_DEFAULT_CONFIG_PARITY
  1130. #define NRFX_UART_DEFAULT_CONFIG_PARITY UART_DEFAULT_CONFIG_PARITY
  1131. #undef NRFX_UARTE_DEFAULT_CONFIG_PARITY
  1132. #define NRFX_UARTE_DEFAULT_CONFIG_PARITY UART_DEFAULT_CONFIG_PARITY
  1133. #endif
  1134. #if defined(UART_DEFAULT_CONFIG_BAUDRATE)
  1135. #undef NRFX_UART_DEFAULT_CONFIG_BAUDRATE
  1136. #define NRFX_UART_DEFAULT_CONFIG_BAUDRATE UART_DEFAULT_CONFIG_BAUDRATE
  1137. #undef NRFX_UARTE_DEFAULT_CONFIG_BAUDRATE
  1138. #define NRFX_UARTE_DEFAULT_CONFIG_BAUDRATE UART_DEFAULT_CONFIG_BAUDRATE
  1139. #endif
  1140. #if defined(UART_DEFAULT_CONFIG_IRQ_PRIORITY)
  1141. #undef NRFX_UART_DEFAULT_CONFIG_IRQ_PRIORITY
  1142. #define NRFX_UART_DEFAULT_CONFIG_IRQ_PRIORITY UART_DEFAULT_CONFIG_IRQ_PRIORITY
  1143. #undef NRFX_UARTE_DEFAULT_CONFIG_IRQ_PRIORITY
  1144. #define NRFX_UARTE_DEFAULT_CONFIG_IRQ_PRIORITY UART_DEFAULT_CONFIG_IRQ_PRIORITY
  1145. #endif
  1146. #if defined(UART_CONFIG_LOG_ENABLED)
  1147. #undef NRFX_UART_CONFIG_LOG_ENABLED
  1148. #define NRFX_UART_CONFIG_LOG_ENABLED UART_CONFIG_LOG_ENABLED
  1149. #undef NRFX_UARTE_CONFIG_LOG_ENABLED
  1150. #define NRFX_UARTE_CONFIG_LOG_ENABLED UART_CONFIG_LOG_ENABLED
  1151. #endif
  1152. #if defined(UART_CONFIG_LOG_LEVEL)
  1153. #undef NRFX_UART_CONFIG_LOG_LEVEL
  1154. #define NRFX_UART_CONFIG_LOG_LEVEL UART_CONFIG_LOG_LEVEL
  1155. #undef NRFX_UARTE_CONFIG_LOG_LEVEL
  1156. #define NRFX_UARTE_CONFIG_LOG_LEVEL UART_CONFIG_LOG_LEVEL
  1157. #endif
  1158. #if defined(UART_CONFIG_INFO_COLOR)
  1159. #undef NRFX_UART_CONFIG_INFO_COLOR
  1160. #define NRFX_UART_CONFIG_INFO_COLOR UART_CONFIG_INFO_COLOR
  1161. #undef NRFX_UARTE_CONFIG_INFO_COLOR
  1162. #define NRFX_UARTE_CONFIG_INFO_COLOR UART_CONFIG_INFO_COLOR
  1163. #endif
  1164. #if defined(UART_CONFIG_DEBUG_COLOR)
  1165. #undef NRFX_UART_CONFIG_DEBUG_COLOR
  1166. #define NRFX_UART_CONFIG_DEBUG_COLOR UART_CONFIG_DEBUG_COLOR
  1167. #undef NRFX_UARTE_CONFIG_DEBUG_COLOR
  1168. #define NRFX_UARTE_CONFIG_DEBUG_COLOR UART_CONFIG_DEBUG_COLOR
  1169. #endif
  1170. #endif // defined(UART_ENABLED)
  1171. //------------------------------------------------------------------------------
  1172. // WDT
  1173. #if defined(WDT_ENABLED)
  1174. #undef NRFX_WDT_ENABLED
  1175. #define NRFX_WDT_ENABLED WDT_ENABLED
  1176. #if defined(WDT_CONFIG_BEHAVIOUR)
  1177. #undef NRFX_WDT_CONFIG_BEHAVIOUR
  1178. #define NRFX_WDT_CONFIG_BEHAVIOUR WDT_CONFIG_BEHAVIOUR
  1179. #endif
  1180. #if defined(WDT_CONFIG_RELOAD_VALUE)
  1181. #undef NRFX_WDT_CONFIG_RELOAD_VALUE
  1182. #define NRFX_WDT_CONFIG_RELOAD_VALUE WDT_CONFIG_RELOAD_VALUE
  1183. #endif
  1184. #if defined(WDT_CONFIG_IRQ_PRIORITY)
  1185. #undef NRFX_WDT_CONFIG_IRQ_PRIORITY
  1186. #define NRFX_WDT_CONFIG_IRQ_PRIORITY WDT_CONFIG_IRQ_PRIORITY
  1187. #endif
  1188. #if defined(WDT_CONFIG_LOG_ENABLED)
  1189. #undef NRFX_WDT_CONFIG_LOG_ENABLED
  1190. #define NRFX_WDT_CONFIG_LOG_ENABLED WDT_CONFIG_LOG_ENABLED
  1191. #endif
  1192. #if defined(WDT_CONFIG_LOG_LEVEL)
  1193. #undef NRFX_WDT_CONFIG_LOG_LEVEL
  1194. #define NRFX_WDT_CONFIG_LOG_LEVEL WDT_CONFIG_LOG_LEVEL
  1195. #endif
  1196. #if defined(WDT_CONFIG_INFO_COLOR)
  1197. #undef NRFX_WDT_CONFIG_INFO_COLOR
  1198. #define NRFX_WDT_CONFIG_INFO_COLOR WDT_CONFIG_INFO_COLOR
  1199. #endif
  1200. #if defined(WDT_CONFIG_DEBUG_COLOR)
  1201. #undef NRFX_WDT_CONFIG_DEBUG_COLOR
  1202. #define NRFX_WDT_CONFIG_DEBUG_COLOR WDT_CONFIG_DEBUG_COLOR
  1203. #endif
  1204. #endif // defined(WDT_ENABLED)
  1205. #endif // APPLY_OLD_CONFIG_H__