apply_old_config.h 43 KB

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