sdk_config.h 84 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991
  1. #ifndef SDK_CONFIG_H
  2. #define SDK_CONFIG_H
  3. // <<< Use Configuration Wizard in Context Menu >>>\n
  4. #ifdef USE_APP_CONFIG
  5. #include "app_config.h"
  6. #endif
  7. // <h> nRF_BLE
  8. //==========================================================
  9. // <q> BLE_ADVERTISING_ENABLED - ble_advertising - Advertising module
  10. #ifndef BLE_ADVERTISING_ENABLED
  11. #define BLE_ADVERTISING_ENABLED 1
  12. #endif
  13. // <q> BLE_DTM_ENABLED - ble_dtm - Module for testing RF/PHY using DTM commands
  14. #ifndef BLE_DTM_ENABLED
  15. #define BLE_DTM_ENABLED 0
  16. #endif
  17. // <q> BLE_RACP_ENABLED - ble_racp - Record Access Control Point library
  18. #ifndef BLE_RACP_ENABLED
  19. #define BLE_RACP_ENABLED 0
  20. #endif
  21. // <e> NRF_BLE_GATT_ENABLED - nrf_ble_gatt - GATT module
  22. //==========================================================
  23. #ifndef NRF_BLE_GATT_ENABLED
  24. #define NRF_BLE_GATT_ENABLED 1
  25. #endif
  26. #if NRF_BLE_GATT_ENABLED
  27. // <o> NRF_BLE_GATT_MAX_MTU_SIZE - Static maximum MTU size that is passed to the @ref sd_ble_enable function.
  28. #ifndef NRF_BLE_GATT_MAX_MTU_SIZE
  29. #define NRF_BLE_GATT_MAX_MTU_SIZE 158
  30. #endif
  31. #endif //NRF_BLE_GATT_ENABLED
  32. // </e>
  33. // <q> NRF_BLE_QWR_ENABLED - nrf_ble_qwr - Queued writes support module (prepare/execute write)
  34. #ifndef NRF_BLE_QWR_ENABLED
  35. #define NRF_BLE_QWR_ENABLED 0
  36. #endif
  37. // <q> PEER_MANAGER_ENABLED - peer_manager - Peer Manager
  38. #ifndef PEER_MANAGER_ENABLED
  39. #define PEER_MANAGER_ENABLED 0
  40. #endif
  41. // </h>
  42. //==========================================================
  43. // <h> nRF_BLE_Services
  44. //==========================================================
  45. // <q> BLE_ANCS_C_ENABLED - ble_ancs_c - Apple Notification Service Client
  46. #ifndef BLE_ANCS_C_ENABLED
  47. #define BLE_ANCS_C_ENABLED 0
  48. #endif
  49. // <q> BLE_ANS_C_ENABLED - ble_ans_c - Alert Notification Service Client
  50. #ifndef BLE_ANS_C_ENABLED
  51. #define BLE_ANS_C_ENABLED 0
  52. #endif
  53. // <q> BLE_BAS_C_ENABLED - ble_bas_c - Battery Service Client
  54. #ifndef BLE_BAS_C_ENABLED
  55. #define BLE_BAS_C_ENABLED 0
  56. #endif
  57. // <q> BLE_BAS_ENABLED - ble_bas - Battery Service
  58. #ifndef BLE_BAS_ENABLED
  59. #define BLE_BAS_ENABLED 0
  60. #endif
  61. // <q> BLE_CSCS_ENABLED - ble_cscs - Cycling Speed and Cadence Service
  62. #ifndef BLE_CSCS_ENABLED
  63. #define BLE_CSCS_ENABLED 0
  64. #endif
  65. // <q> BLE_CTS_C_ENABLED - ble_cts_c - Current Time Service Client
  66. #ifndef BLE_CTS_C_ENABLED
  67. #define BLE_CTS_C_ENABLED 0
  68. #endif
  69. // <q> BLE_DIS_ENABLED - ble_dis - Device Information Service
  70. #ifndef BLE_DIS_ENABLED
  71. #define BLE_DIS_ENABLED 0
  72. #endif
  73. // <q> BLE_GLS_ENABLED - ble_gls - Glucose Service
  74. #ifndef BLE_GLS_ENABLED
  75. #define BLE_GLS_ENABLED 0
  76. #endif
  77. // <q> BLE_HIDS_ENABLED - ble_hids - Human Interface Device Service
  78. #ifndef BLE_HIDS_ENABLED
  79. #define BLE_HIDS_ENABLED 0
  80. #endif
  81. // <e> BLE_HRS_C_ENABLED - ble_hrs_c - Heart Rate Service Client
  82. //==========================================================
  83. #ifndef BLE_HRS_C_ENABLED
  84. #define BLE_HRS_C_ENABLED 0
  85. #endif
  86. #if BLE_HRS_C_ENABLED
  87. // <o> BLE_HRS_C_RR_INTERVALS_MAX_CNT - Maximum number of RR_INTERVALS per notification to be decoded
  88. #ifndef BLE_HRS_C_RR_INTERVALS_MAX_CNT
  89. #define BLE_HRS_C_RR_INTERVALS_MAX_CNT 30
  90. #endif
  91. #endif //BLE_HRS_C_ENABLED
  92. // </e>
  93. // <q> BLE_HRS_ENABLED - ble_hrs - Heart Rate Service
  94. #ifndef BLE_HRS_ENABLED
  95. #define BLE_HRS_ENABLED 0
  96. #endif
  97. // <q> BLE_HTS_ENABLED - ble_hts - Health Thermometer Service
  98. #ifndef BLE_HTS_ENABLED
  99. #define BLE_HTS_ENABLED 0
  100. #endif
  101. // <q> BLE_IAS_C_ENABLED - ble_ias_c - Immediate Alert Service Client
  102. #ifndef BLE_IAS_C_ENABLED
  103. #define BLE_IAS_C_ENABLED 0
  104. #endif
  105. // <q> BLE_IAS_ENABLED - ble_ias - Immediate Alert Service
  106. #ifndef BLE_IAS_ENABLED
  107. #define BLE_IAS_ENABLED 0
  108. #endif
  109. // <q> BLE_LBS_C_ENABLED - ble_lbs_c - Nordic LED Button Service Client
  110. #ifndef BLE_LBS_C_ENABLED
  111. #define BLE_LBS_C_ENABLED 0
  112. #endif
  113. // <q> BLE_LBS_ENABLED - ble_lbs - LED Button Service
  114. #ifndef BLE_LBS_ENABLED
  115. #define BLE_LBS_ENABLED 0
  116. #endif
  117. // <q> BLE_LLS_ENABLED - ble_lls - Link Loss Service
  118. #ifndef BLE_LLS_ENABLED
  119. #define BLE_LLS_ENABLED 0
  120. #endif
  121. // <q> BLE_NUS_C_ENABLED - ble_nus_c - Nordic UART Central Service
  122. #ifndef BLE_NUS_C_ENABLED
  123. #define BLE_NUS_C_ENABLED 0
  124. #endif
  125. // <q> BLE_NUS_ENABLED - ble_nus - Nordic UART Service
  126. #ifndef BLE_NUS_ENABLED
  127. #define BLE_NUS_ENABLED 1
  128. #endif
  129. // <q> BLE_RSCS_C_ENABLED - ble_rscs_c - Running Speed and Cadence Client
  130. #ifndef BLE_RSCS_C_ENABLED
  131. #define BLE_RSCS_C_ENABLED 0
  132. #endif
  133. // <q> BLE_RSCS_ENABLED - ble_rscs - Running Speed and Cadence Service
  134. #ifndef BLE_RSCS_ENABLED
  135. #define BLE_RSCS_ENABLED 0
  136. #endif
  137. // <q> BLE_TPS_ENABLED - ble_tps - TX Power Service
  138. #ifndef BLE_TPS_ENABLED
  139. #define BLE_TPS_ENABLED 0
  140. #endif
  141. // </h>
  142. //==========================================================
  143. // <h> nRF_Drivers
  144. //==========================================================
  145. // <e> APP_USBD_ENABLED - app_usbd - USB Device library
  146. //==========================================================
  147. #ifndef APP_USBD_ENABLED
  148. #define APP_USBD_ENABLED 0
  149. #endif
  150. #if APP_USBD_ENABLED
  151. // <o> APP_USBD_VID - Vendor ID <0x0000-0xFFFF>
  152. // <i> Vendor ID ordered from USB IF: http://www.usb.org/developers/vendor/
  153. #ifndef APP_USBD_VID
  154. #define APP_USBD_VID 0
  155. #endif
  156. // <o> APP_USBD_PID - Product ID <0x0000-0xFFFF>
  157. // <i> Selected Product ID
  158. #ifndef APP_USBD_PID
  159. #define APP_USBD_PID 0
  160. #endif
  161. // <o> APP_USBD_DEVICE_VER_MAJOR - Device version, major part <0-99>
  162. // <i> Device version, will be converted automatically to BCD notation. Use just decimal values.
  163. #ifndef APP_USBD_DEVICE_VER_MAJOR
  164. #define APP_USBD_DEVICE_VER_MAJOR 1
  165. #endif
  166. // <o> APP_USBD_DEVICE_VER_MINOR - Device version, minor part <0-99>
  167. // <i> Device version, will be converted automatically to BCD notation. Use just decimal values.
  168. #ifndef APP_USBD_DEVICE_VER_MINOR
  169. #define APP_USBD_DEVICE_VER_MINOR 0
  170. #endif
  171. #endif //APP_USBD_ENABLED
  172. // </e>
  173. // <e> CLOCK_ENABLED - nrf_drv_clock - CLOCK peripheral driver
  174. //==========================================================
  175. #ifndef CLOCK_ENABLED
  176. #define CLOCK_ENABLED 1
  177. #endif
  178. #if CLOCK_ENABLED
  179. // <o> CLOCK_CONFIG_XTAL_FREQ - HF XTAL Frequency
  180. // <0=> Default (64 MHz)
  181. #ifndef CLOCK_CONFIG_XTAL_FREQ
  182. #define CLOCK_CONFIG_XTAL_FREQ 0
  183. #endif
  184. // <o> CLOCK_CONFIG_LF_SRC - LF Clock Source
  185. // <0=> RC
  186. // <1=> XTAL
  187. // <2=> Synth
  188. #ifndef CLOCK_CONFIG_LF_SRC
  189. #define CLOCK_CONFIG_LF_SRC 1
  190. #endif
  191. // <o> CLOCK_CONFIG_IRQ_PRIORITY - Interrupt priority
  192. // <i> Priorities 0,2 (nRF51) and 0,1,4,5 (nRF52) are reserved for SoftDevice
  193. // <0=> 0 (highest)
  194. // <1=> 1
  195. // <2=> 2
  196. // <3=> 3
  197. // <4=> 4
  198. // <5=> 5
  199. // <6=> 6
  200. // <7=> 7
  201. #ifndef CLOCK_CONFIG_IRQ_PRIORITY
  202. #define CLOCK_CONFIG_IRQ_PRIORITY 7
  203. #endif
  204. // <e> CLOCK_CONFIG_LOG_ENABLED - Enables logging in the module.
  205. //==========================================================
  206. #ifndef CLOCK_CONFIG_LOG_ENABLED
  207. #define CLOCK_CONFIG_LOG_ENABLED 0
  208. #endif
  209. #if CLOCK_CONFIG_LOG_ENABLED
  210. // <o> CLOCK_CONFIG_LOG_LEVEL - Default Severity level
  211. // <0=> Off
  212. // <1=> Error
  213. // <2=> Warning
  214. // <3=> Info
  215. // <4=> Debug
  216. #ifndef CLOCK_CONFIG_LOG_LEVEL
  217. #define CLOCK_CONFIG_LOG_LEVEL 3
  218. #endif
  219. // <o> CLOCK_CONFIG_INFO_COLOR - ANSI escape code prefix.
  220. // <0=> Default
  221. // <1=> Black
  222. // <2=> Red
  223. // <3=> Green
  224. // <4=> Yellow
  225. // <5=> Blue
  226. // <6=> Magenta
  227. // <7=> Cyan
  228. // <8=> White
  229. #ifndef CLOCK_CONFIG_INFO_COLOR
  230. #define CLOCK_CONFIG_INFO_COLOR 0
  231. #endif
  232. // <o> CLOCK_CONFIG_DEBUG_COLOR - ANSI escape code prefix.
  233. // <0=> Default
  234. // <1=> Black
  235. // <2=> Red
  236. // <3=> Green
  237. // <4=> Yellow
  238. // <5=> Blue
  239. // <6=> Magenta
  240. // <7=> Cyan
  241. // <8=> White
  242. #ifndef CLOCK_CONFIG_DEBUG_COLOR
  243. #define CLOCK_CONFIG_DEBUG_COLOR 0
  244. #endif
  245. #endif //CLOCK_CONFIG_LOG_ENABLED
  246. // </e>
  247. #endif //CLOCK_ENABLED
  248. // </e>
  249. // <e> COMP_ENABLED - nrf_drv_comp - COMP peripheral driver
  250. //==========================================================
  251. #ifndef COMP_ENABLED
  252. #define COMP_ENABLED 0
  253. #endif
  254. #if COMP_ENABLED
  255. // <o> COMP_CONFIG_REF - Reference voltage
  256. // <0=> Internal 1.2V
  257. // <1=> Internal 1.8V
  258. // <2=> Internal 2.4V
  259. // <4=> VDD
  260. // <7=> ARef
  261. #ifndef COMP_CONFIG_REF
  262. #define COMP_CONFIG_REF 1
  263. #endif
  264. // <o> COMP_CONFIG_MAIN_MODE - Main mode
  265. // <0=> Single ended
  266. // <1=> Differential
  267. #ifndef COMP_CONFIG_MAIN_MODE
  268. #define COMP_CONFIG_MAIN_MODE 0
  269. #endif
  270. // <o> COMP_CONFIG_SPEED_MODE - Speed mode
  271. // <0=> Low power
  272. // <1=> Normal
  273. // <2=> High speed
  274. #ifndef COMP_CONFIG_SPEED_MODE
  275. #define COMP_CONFIG_SPEED_MODE 2
  276. #endif
  277. // <o> COMP_CONFIG_HYST - Hystheresis
  278. // <0=> No
  279. // <1=> 50mV
  280. #ifndef COMP_CONFIG_HYST
  281. #define COMP_CONFIG_HYST 0
  282. #endif
  283. // <o> COMP_CONFIG_ISOURCE - Current Source
  284. // <0=> Off
  285. // <1=> 2.5 uA
  286. // <2=> 5 uA
  287. // <3=> 10 uA
  288. #ifndef COMP_CONFIG_ISOURCE
  289. #define COMP_CONFIG_ISOURCE 0
  290. #endif
  291. // <o> COMP_CONFIG_INPUT - Analog input
  292. // <0=> 0
  293. // <1=> 1
  294. // <2=> 2
  295. // <3=> 3
  296. // <4=> 4
  297. // <5=> 5
  298. // <6=> 6
  299. // <7=> 7
  300. #ifndef COMP_CONFIG_INPUT
  301. #define COMP_CONFIG_INPUT 0
  302. #endif
  303. // <o> COMP_CONFIG_IRQ_PRIORITY - Interrupt priority
  304. // <i> Priorities 0,2 (nRF51) and 0,1,4,5 (nRF52) are reserved for SoftDevice
  305. // <0=> 0 (highest)
  306. // <1=> 1
  307. // <2=> 2
  308. // <3=> 3
  309. // <4=> 4
  310. // <5=> 5
  311. // <6=> 6
  312. // <7=> 7
  313. #ifndef COMP_CONFIG_IRQ_PRIORITY
  314. #define COMP_CONFIG_IRQ_PRIORITY 7
  315. #endif
  316. // <e> COMP_CONFIG_LOG_ENABLED - Enables logging in the module.
  317. //==========================================================
  318. #ifndef COMP_CONFIG_LOG_ENABLED
  319. #define COMP_CONFIG_LOG_ENABLED 0
  320. #endif
  321. #if COMP_CONFIG_LOG_ENABLED
  322. // <o> COMP_CONFIG_LOG_LEVEL - Default Severity level
  323. // <0=> Off
  324. // <1=> Error
  325. // <2=> Warning
  326. // <3=> Info
  327. // <4=> Debug
  328. #ifndef COMP_CONFIG_LOG_LEVEL
  329. #define COMP_CONFIG_LOG_LEVEL 3
  330. #endif
  331. // <o> COMP_CONFIG_INFO_COLOR - ANSI escape code prefix.
  332. // <0=> Default
  333. // <1=> Black
  334. // <2=> Red
  335. // <3=> Green
  336. // <4=> Yellow
  337. // <5=> Blue
  338. // <6=> Magenta
  339. // <7=> Cyan
  340. // <8=> White
  341. #ifndef COMP_CONFIG_INFO_COLOR
  342. #define COMP_CONFIG_INFO_COLOR 0
  343. #endif
  344. // <o> COMP_CONFIG_DEBUG_COLOR - ANSI escape code prefix.
  345. // <0=> Default
  346. // <1=> Black
  347. // <2=> Red
  348. // <3=> Green
  349. // <4=> Yellow
  350. // <5=> Blue
  351. // <6=> Magenta
  352. // <7=> Cyan
  353. // <8=> White
  354. #ifndef COMP_CONFIG_DEBUG_COLOR
  355. #define COMP_CONFIG_DEBUG_COLOR 0
  356. #endif
  357. #endif //COMP_CONFIG_LOG_ENABLED
  358. // </e>
  359. #endif //COMP_ENABLED
  360. // </e>
  361. // <e> EGU_ENABLED - nrf_drv_swi - SWI(EGU) peripheral driver
  362. //==========================================================
  363. #ifndef EGU_ENABLED
  364. #define EGU_ENABLED 0
  365. #endif
  366. #if EGU_ENABLED
  367. // <e> SWI_CONFIG_LOG_ENABLED - Enables logging in the module.
  368. //==========================================================
  369. #ifndef SWI_CONFIG_LOG_ENABLED
  370. #define SWI_CONFIG_LOG_ENABLED 0
  371. #endif
  372. #if SWI_CONFIG_LOG_ENABLED
  373. // <o> SWI_CONFIG_LOG_LEVEL - Default Severity level
  374. // <0=> Off
  375. // <1=> Error
  376. // <2=> Warning
  377. // <3=> Info
  378. // <4=> Debug
  379. #ifndef SWI_CONFIG_LOG_LEVEL
  380. #define SWI_CONFIG_LOG_LEVEL 3
  381. #endif
  382. // <o> SWI_CONFIG_INFO_COLOR - ANSI escape code prefix.
  383. // <0=> Default
  384. // <1=> Black
  385. // <2=> Red
  386. // <3=> Green
  387. // <4=> Yellow
  388. // <5=> Blue
  389. // <6=> Magenta
  390. // <7=> Cyan
  391. // <8=> White
  392. #ifndef SWI_CONFIG_INFO_COLOR
  393. #define SWI_CONFIG_INFO_COLOR 0
  394. #endif
  395. // <o> SWI_CONFIG_DEBUG_COLOR - ANSI escape code prefix.
  396. // <0=> Default
  397. // <1=> Black
  398. // <2=> Red
  399. // <3=> Green
  400. // <4=> Yellow
  401. // <5=> Blue
  402. // <6=> Magenta
  403. // <7=> Cyan
  404. // <8=> White
  405. #ifndef SWI_CONFIG_DEBUG_COLOR
  406. #define SWI_CONFIG_DEBUG_COLOR 0
  407. #endif
  408. #endif //SWI_CONFIG_LOG_ENABLED
  409. // </e>
  410. #endif //EGU_ENABLED
  411. // </e>
  412. // <e> GPIOTE_ENABLED - nrf_drv_gpiote - GPIOTE peripheral driver
  413. //==========================================================
  414. #ifndef GPIOTE_ENABLED
  415. #define GPIOTE_ENABLED 1
  416. #endif
  417. #if GPIOTE_ENABLED
  418. // <o> GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS - Number of lower power input pins
  419. #ifndef GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS
  420. #define GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS 4
  421. #endif
  422. // <o> GPIOTE_CONFIG_IRQ_PRIORITY - Interrupt priority
  423. // <i> Priorities 0,2 (nRF51) and 0,1,4,5 (nRF52) are reserved for SoftDevice
  424. // <0=> 0 (highest)
  425. // <1=> 1
  426. // <2=> 2
  427. // <3=> 3
  428. // <4=> 4
  429. // <5=> 5
  430. // <6=> 6
  431. // <7=> 7
  432. #ifndef GPIOTE_CONFIG_IRQ_PRIORITY
  433. #define GPIOTE_CONFIG_IRQ_PRIORITY 7
  434. #endif
  435. // <e> GPIOTE_CONFIG_LOG_ENABLED - Enables logging in the module.
  436. //==========================================================
  437. #ifndef GPIOTE_CONFIG_LOG_ENABLED
  438. #define GPIOTE_CONFIG_LOG_ENABLED 0
  439. #endif
  440. #if GPIOTE_CONFIG_LOG_ENABLED
  441. // <o> GPIOTE_CONFIG_LOG_LEVEL - Default Severity level
  442. // <0=> Off
  443. // <1=> Error
  444. // <2=> Warning
  445. // <3=> Info
  446. // <4=> Debug
  447. #ifndef GPIOTE_CONFIG_LOG_LEVEL
  448. #define GPIOTE_CONFIG_LOG_LEVEL 3
  449. #endif
  450. // <o> GPIOTE_CONFIG_INFO_COLOR - ANSI escape code prefix.
  451. // <0=> Default
  452. // <1=> Black
  453. // <2=> Red
  454. // <3=> Green
  455. // <4=> Yellow
  456. // <5=> Blue
  457. // <6=> Magenta
  458. // <7=> Cyan
  459. // <8=> White
  460. #ifndef GPIOTE_CONFIG_INFO_COLOR
  461. #define GPIOTE_CONFIG_INFO_COLOR 0
  462. #endif
  463. // <o> GPIOTE_CONFIG_DEBUG_COLOR - ANSI escape code prefix.
  464. // <0=> Default
  465. // <1=> Black
  466. // <2=> Red
  467. // <3=> Green
  468. // <4=> Yellow
  469. // <5=> Blue
  470. // <6=> Magenta
  471. // <7=> Cyan
  472. // <8=> White
  473. #ifndef GPIOTE_CONFIG_DEBUG_COLOR
  474. #define GPIOTE_CONFIG_DEBUG_COLOR 0
  475. #endif
  476. #endif //GPIOTE_CONFIG_LOG_ENABLED
  477. // </e>
  478. #endif //GPIOTE_ENABLED
  479. // </e>
  480. // <e> I2S_ENABLED - nrf_drv_i2s - I2S peripheral driver
  481. //==========================================================
  482. #ifndef I2S_ENABLED
  483. #define I2S_ENABLED 0
  484. #endif
  485. #if I2S_ENABLED
  486. // <o> I2S_CONFIG_SCK_PIN - SCK pin <0-31>
  487. #ifndef I2S_CONFIG_SCK_PIN
  488. #define I2S_CONFIG_SCK_PIN 31
  489. #endif
  490. // <o> I2S_CONFIG_LRCK_PIN - LRCK pin <1-31>
  491. #ifndef I2S_CONFIG_LRCK_PIN
  492. #define I2S_CONFIG_LRCK_PIN 30
  493. #endif
  494. // <o> I2S_CONFIG_MCK_PIN - MCK pin
  495. #ifndef I2S_CONFIG_MCK_PIN
  496. #define I2S_CONFIG_MCK_PIN 255
  497. #endif
  498. // <o> I2S_CONFIG_SDOUT_PIN - SDOUT pin <0-31>
  499. #ifndef I2S_CONFIG_SDOUT_PIN
  500. #define I2S_CONFIG_SDOUT_PIN 29
  501. #endif
  502. // <o> I2S_CONFIG_SDIN_PIN - SDIN pin <0-31>
  503. #ifndef I2S_CONFIG_SDIN_PIN
  504. #define I2S_CONFIG_SDIN_PIN 28
  505. #endif
  506. // <o> I2S_CONFIG_MASTER - Mode
  507. // <0=> Master
  508. // <1=> Slave
  509. #ifndef I2S_CONFIG_MASTER
  510. #define I2S_CONFIG_MASTER 0
  511. #endif
  512. // <o> I2S_CONFIG_FORMAT - Format
  513. // <0=> I2S
  514. // <1=> Aligned
  515. #ifndef I2S_CONFIG_FORMAT
  516. #define I2S_CONFIG_FORMAT 0
  517. #endif
  518. // <o> I2S_CONFIG_ALIGN - Alignment
  519. // <0=> Left
  520. // <1=> Right
  521. #ifndef I2S_CONFIG_ALIGN
  522. #define I2S_CONFIG_ALIGN 0
  523. #endif
  524. // <o> I2S_CONFIG_SWIDTH - Sample width (bits)
  525. // <0=> 8
  526. // <1=> 16
  527. // <2=> 24
  528. #ifndef I2S_CONFIG_SWIDTH
  529. #define I2S_CONFIG_SWIDTH 1
  530. #endif
  531. // <o> I2S_CONFIG_CHANNELS - Channels
  532. // <0=> Stereo
  533. // <1=> Left
  534. // <2=> Right
  535. #ifndef I2S_CONFIG_CHANNELS
  536. #define I2S_CONFIG_CHANNELS 1
  537. #endif
  538. // <o> I2S_CONFIG_MCK_SETUP - MCK behavior
  539. // <0=> Disabled
  540. // <2147483648=> 32MHz/2
  541. // <1342177280=> 32MHz/3
  542. // <1073741824=> 32MHz/4
  543. // <805306368=> 32MHz/5
  544. // <671088640=> 32MHz/6
  545. // <536870912=> 32MHz/8
  546. // <402653184=> 32MHz/10
  547. // <369098752=> 32MHz/11
  548. // <285212672=> 32MHz/15
  549. // <268435456=> 32MHz/16
  550. // <201326592=> 32MHz/21
  551. // <184549376=> 32MHz/23
  552. // <142606336=> 32MHz/30
  553. // <138412032=> 32MHz/31
  554. // <134217728=> 32MHz/32
  555. // <100663296=> 32MHz/42
  556. // <68157440=> 32MHz/63
  557. // <34340864=> 32MHz/125
  558. #ifndef I2S_CONFIG_MCK_SETUP
  559. #define I2S_CONFIG_MCK_SETUP 536870912
  560. #endif
  561. // <o> I2S_CONFIG_RATIO - MCK/LRCK ratio
  562. // <0=> 32x
  563. // <1=> 48x
  564. // <2=> 64x
  565. // <3=> 96x
  566. // <4=> 128x
  567. // <5=> 192x
  568. // <6=> 256x
  569. // <7=> 384x
  570. // <8=> 512x
  571. #ifndef I2S_CONFIG_RATIO
  572. #define I2S_CONFIG_RATIO 2000
  573. #endif
  574. // <o> I2S_CONFIG_IRQ_PRIORITY - Interrupt priority
  575. // <i> Priorities 0,2 (nRF51) and 0,1,4,5 (nRF52) are reserved for SoftDevice
  576. // <0=> 0 (highest)
  577. // <1=> 1
  578. // <2=> 2
  579. // <3=> 3
  580. // <4=> 4
  581. // <5=> 5
  582. // <6=> 6
  583. // <7=> 7
  584. #ifndef I2S_CONFIG_IRQ_PRIORITY
  585. #define I2S_CONFIG_IRQ_PRIORITY 7
  586. #endif
  587. // <e> I2S_CONFIG_LOG_ENABLED - Enables logging in the module.
  588. //==========================================================
  589. #ifndef I2S_CONFIG_LOG_ENABLED
  590. #define I2S_CONFIG_LOG_ENABLED 0
  591. #endif
  592. #if I2S_CONFIG_LOG_ENABLED
  593. // <o> I2S_CONFIG_LOG_LEVEL - Default Severity level
  594. // <0=> Off
  595. // <1=> Error
  596. // <2=> Warning
  597. // <3=> Info
  598. // <4=> Debug
  599. #ifndef I2S_CONFIG_LOG_LEVEL
  600. #define I2S_CONFIG_LOG_LEVEL 3
  601. #endif
  602. // <o> I2S_CONFIG_INFO_COLOR - ANSI escape code prefix.
  603. // <0=> Default
  604. // <1=> Black
  605. // <2=> Red
  606. // <3=> Green
  607. // <4=> Yellow
  608. // <5=> Blue
  609. // <6=> Magenta
  610. // <7=> Cyan
  611. // <8=> White
  612. #ifndef I2S_CONFIG_INFO_COLOR
  613. #define I2S_CONFIG_INFO_COLOR 0
  614. #endif
  615. // <o> I2S_CONFIG_DEBUG_COLOR - ANSI escape code prefix.
  616. // <0=> Default
  617. // <1=> Black
  618. // <2=> Red
  619. // <3=> Green
  620. // <4=> Yellow
  621. // <5=> Blue
  622. // <6=> Magenta
  623. // <7=> Cyan
  624. // <8=> White
  625. #ifndef I2S_CONFIG_DEBUG_COLOR
  626. #define I2S_CONFIG_DEBUG_COLOR 0
  627. #endif
  628. #endif //I2S_CONFIG_LOG_ENABLED
  629. // </e>
  630. #endif //I2S_ENABLED
  631. // </e>
  632. // <e> LPCOMP_ENABLED - nrf_drv_lpcomp - LPCOMP peripheral driver
  633. //==========================================================
  634. #ifndef LPCOMP_ENABLED
  635. #define LPCOMP_ENABLED 0
  636. #endif
  637. #if LPCOMP_ENABLED
  638. // <o> LPCOMP_CONFIG_REFERENCE - Reference voltage
  639. // <0=> Supply 1/8
  640. // <1=> Supply 2/8
  641. // <2=> Supply 3/8
  642. // <3=> Supply 4/8
  643. // <4=> Supply 5/8
  644. // <5=> Supply 6/8
  645. // <6=> Supply 7/8
  646. // <8=> Supply 1/16 (nRF52)
  647. // <9=> Supply 3/16 (nRF52)
  648. // <10=> Supply 5/16 (nRF52)
  649. // <11=> Supply 7/16 (nRF52)
  650. // <12=> Supply 9/16 (nRF52)
  651. // <13=> Supply 11/16 (nRF52)
  652. // <14=> Supply 13/16 (nRF52)
  653. // <15=> Supply 15/16 (nRF52)
  654. // <7=> External Ref 0
  655. // <65543=> External Ref 1
  656. #ifndef LPCOMP_CONFIG_REFERENCE
  657. #define LPCOMP_CONFIG_REFERENCE 3
  658. #endif
  659. // <o> LPCOMP_CONFIG_DETECTION - Detection
  660. // <0=> Crossing
  661. // <1=> Up
  662. // <2=> Down
  663. #ifndef LPCOMP_CONFIG_DETECTION
  664. #define LPCOMP_CONFIG_DETECTION 2
  665. #endif
  666. // <o> LPCOMP_CONFIG_INPUT - Analog input
  667. // <0=> 0
  668. // <1=> 1
  669. // <2=> 2
  670. // <3=> 3
  671. // <4=> 4
  672. // <5=> 5
  673. // <6=> 6
  674. // <7=> 7
  675. #ifndef LPCOMP_CONFIG_INPUT
  676. #define LPCOMP_CONFIG_INPUT 0
  677. #endif
  678. // <q> LPCOMP_CONFIG_HYST - Hysteresis
  679. #ifndef LPCOMP_CONFIG_HYST
  680. #define LPCOMP_CONFIG_HYST 0
  681. #endif
  682. // <o> LPCOMP_CONFIG_IRQ_PRIORITY - Interrupt priority
  683. // <i> Priorities 0,2 (nRF51) and 0,1,4,5 (nRF52) are reserved for SoftDevice
  684. // <0=> 0 (highest)
  685. // <1=> 1
  686. // <2=> 2
  687. // <3=> 3
  688. // <4=> 4
  689. // <5=> 5
  690. // <6=> 6
  691. // <7=> 7
  692. #ifndef LPCOMP_CONFIG_IRQ_PRIORITY
  693. #define LPCOMP_CONFIG_IRQ_PRIORITY 7
  694. #endif
  695. // <e> LPCOMP_CONFIG_LOG_ENABLED - Enables logging in the module.
  696. //==========================================================
  697. #ifndef LPCOMP_CONFIG_LOG_ENABLED
  698. #define LPCOMP_CONFIG_LOG_ENABLED 0
  699. #endif
  700. #if LPCOMP_CONFIG_LOG_ENABLED
  701. // <o> LPCOMP_CONFIG_LOG_LEVEL - Default Severity level
  702. // <0=> Off
  703. // <1=> Error
  704. // <2=> Warning
  705. // <3=> Info
  706. // <4=> Debug
  707. #ifndef LPCOMP_CONFIG_LOG_LEVEL
  708. #define LPCOMP_CONFIG_LOG_LEVEL 3
  709. #endif
  710. // <o> LPCOMP_CONFIG_INFO_COLOR - ANSI escape code prefix.
  711. // <0=> Default
  712. // <1=> Black
  713. // <2=> Red
  714. // <3=> Green
  715. // <4=> Yellow
  716. // <5=> Blue
  717. // <6=> Magenta
  718. // <7=> Cyan
  719. // <8=> White
  720. #ifndef LPCOMP_CONFIG_INFO_COLOR
  721. #define LPCOMP_CONFIG_INFO_COLOR 0
  722. #endif
  723. // <o> LPCOMP_CONFIG_DEBUG_COLOR - ANSI escape code prefix.
  724. // <0=> Default
  725. // <1=> Black
  726. // <2=> Red
  727. // <3=> Green
  728. // <4=> Yellow
  729. // <5=> Blue
  730. // <6=> Magenta
  731. // <7=> Cyan
  732. // <8=> White
  733. #ifndef LPCOMP_CONFIG_DEBUG_COLOR
  734. #define LPCOMP_CONFIG_DEBUG_COLOR 0
  735. #endif
  736. #endif //LPCOMP_CONFIG_LOG_ENABLED
  737. // </e>
  738. #endif //LPCOMP_ENABLED
  739. // </e>
  740. // <e> PDM_ENABLED - nrf_drv_pdm - PDM peripheral driver
  741. //==========================================================
  742. #ifndef PDM_ENABLED
  743. #define PDM_ENABLED 0
  744. #endif
  745. #if PDM_ENABLED
  746. // <o> PDM_CONFIG_MODE - Mode
  747. // <0=> Stereo
  748. // <1=> Mono
  749. #ifndef PDM_CONFIG_MODE
  750. #define PDM_CONFIG_MODE 1
  751. #endif
  752. // <o> PDM_CONFIG_EDGE - Edge
  753. // <0=> Left falling
  754. // <1=> Left rising
  755. #ifndef PDM_CONFIG_EDGE
  756. #define PDM_CONFIG_EDGE 0
  757. #endif
  758. // <o> PDM_CONFIG_CLOCK_FREQ - Clock frequency
  759. // <134217728=> 1000k
  760. // <138412032=> 1032k (default)
  761. // <142606336=> 1067k
  762. #ifndef PDM_CONFIG_CLOCK_FREQ
  763. #define PDM_CONFIG_CLOCK_FREQ 138412032
  764. #endif
  765. // <o> PDM_CONFIG_IRQ_PRIORITY - Interrupt priority
  766. // <i> Priorities 0,2 (nRF51) and 0,1,4,5 (nRF52) are reserved for SoftDevice
  767. // <0=> 0 (highest)
  768. // <1=> 1
  769. // <2=> 2
  770. // <3=> 3
  771. // <4=> 4
  772. // <5=> 5
  773. // <6=> 6
  774. // <7=> 7
  775. #ifndef PDM_CONFIG_IRQ_PRIORITY
  776. #define PDM_CONFIG_IRQ_PRIORITY 7
  777. #endif
  778. // <e> PDM_CONFIG_LOG_ENABLED - Enables logging in the module.
  779. //==========================================================
  780. #ifndef PDM_CONFIG_LOG_ENABLED
  781. #define PDM_CONFIG_LOG_ENABLED 0
  782. #endif
  783. #if PDM_CONFIG_LOG_ENABLED
  784. // <o> PDM_CONFIG_LOG_LEVEL - Default Severity level
  785. // <0=> Off
  786. // <1=> Error
  787. // <2=> Warning
  788. // <3=> Info
  789. // <4=> Debug
  790. #ifndef PDM_CONFIG_LOG_LEVEL
  791. #define PDM_CONFIG_LOG_LEVEL 3
  792. #endif
  793. // <o> PDM_CONFIG_INFO_COLOR - ANSI escape code prefix.
  794. // <0=> Default
  795. // <1=> Black
  796. // <2=> Red
  797. // <3=> Green
  798. // <4=> Yellow
  799. // <5=> Blue
  800. // <6=> Magenta
  801. // <7=> Cyan
  802. // <8=> White
  803. #ifndef PDM_CONFIG_INFO_COLOR
  804. #define PDM_CONFIG_INFO_COLOR 0
  805. #endif
  806. // <o> PDM_CONFIG_DEBUG_COLOR - ANSI escape code prefix.
  807. // <0=> Default
  808. // <1=> Black
  809. // <2=> Red
  810. // <3=> Green
  811. // <4=> Yellow
  812. // <5=> Blue
  813. // <6=> Magenta
  814. // <7=> Cyan
  815. // <8=> White
  816. #ifndef PDM_CONFIG_DEBUG_COLOR
  817. #define PDM_CONFIG_DEBUG_COLOR 0
  818. #endif
  819. #endif //PDM_CONFIG_LOG_ENABLED
  820. // </e>
  821. #endif //PDM_ENABLED
  822. // </e>
  823. // <e> PERIPHERAL_RESOURCE_SHARING_ENABLED - nrf_drv_common - Peripheral drivers common module
  824. //==========================================================
  825. #ifndef PERIPHERAL_RESOURCE_SHARING_ENABLED
  826. #define PERIPHERAL_RESOURCE_SHARING_ENABLED 0
  827. #endif
  828. #if PERIPHERAL_RESOURCE_SHARING_ENABLED
  829. // <e> COMMON_CONFIG_LOG_ENABLED - Enables logging in the module.
  830. //==========================================================
  831. #ifndef COMMON_CONFIG_LOG_ENABLED
  832. #define COMMON_CONFIG_LOG_ENABLED 0
  833. #endif
  834. #if COMMON_CONFIG_LOG_ENABLED
  835. // <o> COMMON_CONFIG_LOG_LEVEL - Default Severity level
  836. // <0=> Off
  837. // <1=> Error
  838. // <2=> Warning
  839. // <3=> Info
  840. // <4=> Debug
  841. #ifndef COMMON_CONFIG_LOG_LEVEL
  842. #define COMMON_CONFIG_LOG_LEVEL 3
  843. #endif
  844. // <o> COMMON_CONFIG_INFO_COLOR - ANSI escape code prefix.
  845. // <0=> Default
  846. // <1=> Black
  847. // <2=> Red
  848. // <3=> Green
  849. // <4=> Yellow
  850. // <5=> Blue
  851. // <6=> Magenta
  852. // <7=> Cyan
  853. // <8=> White
  854. #ifndef COMMON_CONFIG_INFO_COLOR
  855. #define COMMON_CONFIG_INFO_COLOR 0
  856. #endif
  857. // <o> COMMON_CONFIG_DEBUG_COLOR - ANSI escape code prefix.
  858. // <0=> Default
  859. // <1=> Black
  860. // <2=> Red
  861. // <3=> Green
  862. // <4=> Yellow
  863. // <5=> Blue
  864. // <6=> Magenta
  865. // <7=> Cyan
  866. // <8=> White
  867. #ifndef COMMON_CONFIG_DEBUG_COLOR
  868. #define COMMON_CONFIG_DEBUG_COLOR 0
  869. #endif
  870. #endif //COMMON_CONFIG_LOG_ENABLED
  871. // </e>
  872. #endif //PERIPHERAL_RESOURCE_SHARING_ENABLED
  873. // </e>
  874. // <e> POWER_ENABLED - nrf_drv_power - POWER peripheral driver
  875. //==========================================================
  876. #ifndef POWER_ENABLED
  877. #define POWER_ENABLED 0
  878. #endif
  879. #if POWER_ENABLED
  880. // <o> POWER_CONFIG_IRQ_PRIORITY - Interrupt priority
  881. // <i> Priorities 0,2 (nRF51) and 0,1,4,5 (nRF52) are reserved for SoftDevice
  882. // <0=> 0 (highest)
  883. // <1=> 1
  884. // <2=> 2
  885. // <3=> 3
  886. // <4=> 4
  887. // <5=> 5
  888. // <6=> 6
  889. // <7=> 7
  890. #ifndef POWER_CONFIG_IRQ_PRIORITY
  891. #define POWER_CONFIG_IRQ_PRIORITY 7
  892. #endif
  893. // <q> POWER_CONFIG_DEFAULT_DCDCEN - The default configuration of main DCDC regulator
  894. // <i> This settings means only that components for DCDC regulator are installed and it can be enabled.
  895. #ifndef POWER_CONFIG_DEFAULT_DCDCEN
  896. #define POWER_CONFIG_DEFAULT_DCDCEN 0
  897. #endif
  898. // <q> POWER_CONFIG_DEFAULT_DCDCENHV - The default configuration of High Voltage DCDC regulator
  899. // <i> This settings means only that components for DCDC regulator are installed and it can be enabled.
  900. #ifndef POWER_CONFIG_DEFAULT_DCDCENHV
  901. #define POWER_CONFIG_DEFAULT_DCDCENHV 0
  902. #endif
  903. #endif //POWER_ENABLED
  904. // </e>
  905. // <e> PPI_ENABLED - nrf_drv_ppi - PPI peripheral driver
  906. //==========================================================
  907. #ifndef PPI_ENABLED
  908. #define PPI_ENABLED 0
  909. #endif
  910. #if PPI_ENABLED
  911. // <e> PPI_CONFIG_LOG_ENABLED - Enables logging in the module.
  912. //==========================================================
  913. #ifndef PPI_CONFIG_LOG_ENABLED
  914. #define PPI_CONFIG_LOG_ENABLED 0
  915. #endif
  916. #if PPI_CONFIG_LOG_ENABLED
  917. // <o> PPI_CONFIG_LOG_LEVEL - Default Severity level
  918. // <0=> Off
  919. // <1=> Error
  920. // <2=> Warning
  921. // <3=> Info
  922. // <4=> Debug
  923. #ifndef PPI_CONFIG_LOG_LEVEL
  924. #define PPI_CONFIG_LOG_LEVEL 3
  925. #endif
  926. // <o> PPI_CONFIG_INFO_COLOR - ANSI escape code prefix.
  927. // <0=> Default
  928. // <1=> Black
  929. // <2=> Red
  930. // <3=> Green
  931. // <4=> Yellow
  932. // <5=> Blue
  933. // <6=> Magenta
  934. // <7=> Cyan
  935. // <8=> White
  936. #ifndef PPI_CONFIG_INFO_COLOR
  937. #define PPI_CONFIG_INFO_COLOR 0
  938. #endif
  939. // <o> PPI_CONFIG_DEBUG_COLOR - ANSI escape code prefix.
  940. // <0=> Default
  941. // <1=> Black
  942. // <2=> Red
  943. // <3=> Green
  944. // <4=> Yellow
  945. // <5=> Blue
  946. // <6=> Magenta
  947. // <7=> Cyan
  948. // <8=> White
  949. #ifndef PPI_CONFIG_DEBUG_COLOR
  950. #define PPI_CONFIG_DEBUG_COLOR 0
  951. #endif
  952. #endif //PPI_CONFIG_LOG_ENABLED
  953. // </e>
  954. #endif //PPI_ENABLED
  955. // </e>
  956. // <e> PWM_ENABLED - nrf_drv_pwm - PWM peripheral driver
  957. //==========================================================
  958. #ifndef PWM_ENABLED
  959. #define PWM_ENABLED 1
  960. #endif
  961. #if PWM_ENABLED
  962. // <o> PWM_DEFAULT_CONFIG_OUT0_PIN - Out0 pin <0-31>
  963. #ifndef PWM_DEFAULT_CONFIG_OUT0_PIN
  964. #define PWM_DEFAULT_CONFIG_OUT0_PIN 2
  965. #endif
  966. // <o> PWM_DEFAULT_CONFIG_OUT1_PIN - Out1 pin <0-31>
  967. #ifndef PWM_DEFAULT_CONFIG_OUT1_PIN
  968. #define PWM_DEFAULT_CONFIG_OUT1_PIN 31
  969. #endif
  970. // <o> PWM_DEFAULT_CONFIG_OUT2_PIN - Out2 pin <0-31>
  971. #ifndef PWM_DEFAULT_CONFIG_OUT2_PIN
  972. #define PWM_DEFAULT_CONFIG_OUT2_PIN 31
  973. #endif
  974. // <o> PWM_DEFAULT_CONFIG_OUT3_PIN - Out3 pin <0-31>
  975. #ifndef PWM_DEFAULT_CONFIG_OUT3_PIN
  976. #define PWM_DEFAULT_CONFIG_OUT3_PIN 31
  977. #endif
  978. // <o> PWM_DEFAULT_CONFIG_BASE_CLOCK - Base clock
  979. // <0=> 16 MHz
  980. // <1=> 8 MHz
  981. // <2=> 4 MHz
  982. // <3=> 2 MHz
  983. // <4=> 1 MHz
  984. // <5=> 500 kHz
  985. // <6=> 250 kHz
  986. // <7=> 125 MHz
  987. #ifndef PWM_DEFAULT_CONFIG_BASE_CLOCK
  988. #define PWM_DEFAULT_CONFIG_BASE_CLOCK 7
  989. #endif
  990. // <o> PWM_DEFAULT_CONFIG_COUNT_MODE - Count mode
  991. // <0=> Up
  992. // <1=> Up and Down
  993. #ifndef PWM_DEFAULT_CONFIG_COUNT_MODE
  994. #define PWM_DEFAULT_CONFIG_COUNT_MODE 0
  995. #endif
  996. // <o> PWM_DEFAULT_CONFIG_TOP_VALUE - Top value
  997. #ifndef PWM_DEFAULT_CONFIG_TOP_VALUE
  998. #define PWM_DEFAULT_CONFIG_TOP_VALUE 46
  999. #endif
  1000. // <o> PWM_DEFAULT_CONFIG_LOAD_MODE - Load mode
  1001. // <0=> Common
  1002. // <1=> Grouped
  1003. // <2=> Individual
  1004. // <3=> Waveform
  1005. #ifndef PWM_DEFAULT_CONFIG_LOAD_MODE
  1006. #define PWM_DEFAULT_CONFIG_LOAD_MODE 0
  1007. #endif
  1008. // <o> PWM_DEFAULT_CONFIG_STEP_MODE - Step mode
  1009. // <0=> Auto
  1010. // <1=> Triggered
  1011. #ifndef PWM_DEFAULT_CONFIG_STEP_MODE
  1012. #define PWM_DEFAULT_CONFIG_STEP_MODE 0
  1013. #endif
  1014. // <o> PWM_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority
  1015. // <i> Priorities 0,1,4,5 (nRF52) are reserved for SoftDevice
  1016. // <0=> 0 (highest)
  1017. // <1=> 1
  1018. // <2=> 2
  1019. // <3=> 3
  1020. // <4=> 4
  1021. // <5=> 5
  1022. // <6=> 6
  1023. // <7=> 7
  1024. #ifndef PWM_DEFAULT_CONFIG_IRQ_PRIORITY
  1025. #define PWM_DEFAULT_CONFIG_IRQ_PRIORITY 7
  1026. #endif
  1027. // <q> PWM0_ENABLED - Enable PWM0 instance
  1028. #ifndef PWM0_ENABLED
  1029. #define PWM0_ENABLED 1
  1030. #endif
  1031. // <q> PWM1_ENABLED - Enable PWM1 instance
  1032. #ifndef PWM1_ENABLED
  1033. #define PWM1_ENABLED 0
  1034. #endif
  1035. // <q> PWM2_ENABLED - Enable PWM2 instance
  1036. #ifndef PWM2_ENABLED
  1037. #define PWM2_ENABLED 0
  1038. #endif
  1039. // <e> PWM_CONFIG_LOG_ENABLED - Enables logging in the module.
  1040. //==========================================================
  1041. #ifndef PWM_CONFIG_LOG_ENABLED
  1042. #define PWM_CONFIG_LOG_ENABLED 0
  1043. #endif
  1044. #if PWM_CONFIG_LOG_ENABLED
  1045. // <o> PWM_CONFIG_LOG_LEVEL - Default Severity level
  1046. // <0=> Off
  1047. // <1=> Error
  1048. // <2=> Warning
  1049. // <3=> Info
  1050. // <4=> Debug
  1051. #ifndef PWM_CONFIG_LOG_LEVEL
  1052. #define PWM_CONFIG_LOG_LEVEL 3
  1053. #endif
  1054. // <o> PWM_CONFIG_INFO_COLOR - ANSI escape code prefix.
  1055. // <0=> Default
  1056. // <1=> Black
  1057. // <2=> Red
  1058. // <3=> Green
  1059. // <4=> Yellow
  1060. // <5=> Blue
  1061. // <6=> Magenta
  1062. // <7=> Cyan
  1063. // <8=> White
  1064. #ifndef PWM_CONFIG_INFO_COLOR
  1065. #define PWM_CONFIG_INFO_COLOR 0
  1066. #endif
  1067. // <o> PWM_CONFIG_DEBUG_COLOR - ANSI escape code prefix.
  1068. // <0=> Default
  1069. // <1=> Black
  1070. // <2=> Red
  1071. // <3=> Green
  1072. // <4=> Yellow
  1073. // <5=> Blue
  1074. // <6=> Magenta
  1075. // <7=> Cyan
  1076. // <8=> White
  1077. #ifndef PWM_CONFIG_DEBUG_COLOR
  1078. #define PWM_CONFIG_DEBUG_COLOR 0
  1079. #endif
  1080. #endif //PWM_CONFIG_LOG_ENABLED
  1081. // </e>
  1082. // <e> PWM_NRF52_ANOMALY_109_WORKAROUND_ENABLED - Enables nRF52 Anomaly 109 workaround for PWM.
  1083. // <i> The workaround uses interrupts to wake up the CPU and ensure
  1084. // <i> it is active when PWM is about to start a DMA transfer. For
  1085. // <i> initial transfer, done when a playback is started via PPI,
  1086. // <i> a specific EGU instance is used to generate the interrupt.
  1087. // <i> During the playback, the PWM interrupt triggered on SEQEND
  1088. // <i> event of a preceding sequence is used to protect the transfer
  1089. // <i> done for the next sequence to be played.
  1090. //==========================================================
  1091. #ifndef PWM_NRF52_ANOMALY_109_WORKAROUND_ENABLED
  1092. #define PWM_NRF52_ANOMALY_109_WORKAROUND_ENABLED 0
  1093. #endif
  1094. #if PWM_NRF52_ANOMALY_109_WORKAROUND_ENABLED
  1095. // <o> PWM_NRF52_ANOMALY_109_EGU_INSTANCE - EGU instance used by the nRF52 Anomaly 109 workaround for PWM.
  1096. // <0=> EGU0
  1097. // <1=> EGU1
  1098. // <2=> EGU2
  1099. // <3=> EGU3
  1100. // <4=> EGU4
  1101. // <5=> EGU5
  1102. #ifndef PWM_NRF52_ANOMALY_109_EGU_INSTANCE
  1103. #define PWM_NRF52_ANOMALY_109_EGU_INSTANCE 5
  1104. #endif
  1105. #endif //PWM_NRF52_ANOMALY_109_WORKAROUND_ENABLED
  1106. // </e>
  1107. #endif //PWM_ENABLED
  1108. // </e>
  1109. // <e> QDEC_ENABLED - nrf_drv_qdec - QDEC peripheral driver
  1110. //==========================================================
  1111. #ifndef QDEC_ENABLED
  1112. #define QDEC_ENABLED 0
  1113. #endif
  1114. #if QDEC_ENABLED
  1115. // <o> QDEC_CONFIG_REPORTPER - Report period
  1116. // <0=> 10 Samples
  1117. // <1=> 40 Samples
  1118. // <2=> 80 Samples
  1119. // <3=> 120 Samples
  1120. // <4=> 160 Samples
  1121. // <5=> 200 Samples
  1122. // <6=> 240 Samples
  1123. // <7=> 280 Samples
  1124. #ifndef QDEC_CONFIG_REPORTPER
  1125. #define QDEC_CONFIG_REPORTPER 0
  1126. #endif
  1127. // <o> QDEC_CONFIG_SAMPLEPER - Sample period
  1128. // <0=> 128 us
  1129. // <1=> 256 us
  1130. // <2=> 512 us
  1131. // <3=> 1024 us
  1132. // <4=> 2048 us
  1133. // <5=> 4096 us
  1134. // <6=> 8192 us
  1135. // <7=> 16384 us
  1136. #ifndef QDEC_CONFIG_SAMPLEPER
  1137. #define QDEC_CONFIG_SAMPLEPER 7
  1138. #endif
  1139. // <o> QDEC_CONFIG_PIO_A - A pin <0-31>
  1140. #ifndef QDEC_CONFIG_PIO_A
  1141. #define QDEC_CONFIG_PIO_A 31
  1142. #endif
  1143. // <o> QDEC_CONFIG_PIO_B - B pin <0-31>
  1144. #ifndef QDEC_CONFIG_PIO_B
  1145. #define QDEC_CONFIG_PIO_B 31
  1146. #endif
  1147. // <o> QDEC_CONFIG_PIO_LED - LED pin <0-31>
  1148. #ifndef QDEC_CONFIG_PIO_LED
  1149. #define QDEC_CONFIG_PIO_LED 31
  1150. #endif
  1151. // <o> QDEC_CONFIG_LEDPRE - LED pre
  1152. #ifndef QDEC_CONFIG_LEDPRE
  1153. #define QDEC_CONFIG_LEDPRE 511
  1154. #endif
  1155. // <o> QDEC_CONFIG_LEDPOL - LED polarity
  1156. // <0=> Active low
  1157. // <1=> Active high
  1158. #ifndef QDEC_CONFIG_LEDPOL
  1159. #define QDEC_CONFIG_LEDPOL 1
  1160. #endif
  1161. // <q> QDEC_CONFIG_DBFEN - Debouncing enable
  1162. #ifndef QDEC_CONFIG_DBFEN
  1163. #define QDEC_CONFIG_DBFEN 0
  1164. #endif
  1165. // <q> QDEC_CONFIG_SAMPLE_INTEN - Sample ready interrupt enable
  1166. #ifndef QDEC_CONFIG_SAMPLE_INTEN
  1167. #define QDEC_CONFIG_SAMPLE_INTEN 0
  1168. #endif
  1169. // <o> QDEC_CONFIG_IRQ_PRIORITY - Interrupt priority
  1170. // <i> Priorities 0,2 (nRF51) and 0,1,4,5 (nRF52) are reserved for SoftDevice
  1171. // <0=> 0 (highest)
  1172. // <1=> 1
  1173. // <2=> 2
  1174. // <3=> 3
  1175. // <4=> 4
  1176. // <5=> 5
  1177. // <6=> 6
  1178. // <7=> 7
  1179. #ifndef QDEC_CONFIG_IRQ_PRIORITY
  1180. #define QDEC_CONFIG_IRQ_PRIORITY 7
  1181. #endif
  1182. // <e> QDEC_CONFIG_LOG_ENABLED - Enables logging in the module.
  1183. //==========================================================
  1184. #ifndef QDEC_CONFIG_LOG_ENABLED
  1185. #define QDEC_CONFIG_LOG_ENABLED 0
  1186. #endif
  1187. #if QDEC_CONFIG_LOG_ENABLED
  1188. // <o> QDEC_CONFIG_LOG_LEVEL - Default Severity level
  1189. // <0=> Off
  1190. // <1=> Error
  1191. // <2=> Warning
  1192. // <3=> Info
  1193. // <4=> Debug
  1194. #ifndef QDEC_CONFIG_LOG_LEVEL
  1195. #define QDEC_CONFIG_LOG_LEVEL 3
  1196. #endif
  1197. // <o> QDEC_CONFIG_INFO_COLOR - ANSI escape code prefix.
  1198. // <0=> Default
  1199. // <1=> Black
  1200. // <2=> Red
  1201. // <3=> Green
  1202. // <4=> Yellow
  1203. // <5=> Blue
  1204. // <6=> Magenta
  1205. // <7=> Cyan
  1206. // <8=> White
  1207. #ifndef QDEC_CONFIG_INFO_COLOR
  1208. #define QDEC_CONFIG_INFO_COLOR 0
  1209. #endif
  1210. // <o> QDEC_CONFIG_DEBUG_COLOR - ANSI escape code prefix.
  1211. // <0=> Default
  1212. // <1=> Black
  1213. // <2=> Red
  1214. // <3=> Green
  1215. // <4=> Yellow
  1216. // <5=> Blue
  1217. // <6=> Magenta
  1218. // <7=> Cyan
  1219. // <8=> White
  1220. #ifndef QDEC_CONFIG_DEBUG_COLOR
  1221. #define QDEC_CONFIG_DEBUG_COLOR 0
  1222. #endif
  1223. #endif //QDEC_CONFIG_LOG_ENABLED
  1224. // </e>
  1225. #endif //QDEC_ENABLED
  1226. // </e>
  1227. // <e> RNG_ENABLED - nrf_drv_rng - RNG peripheral driver
  1228. //==========================================================
  1229. #ifndef RNG_ENABLED
  1230. #define RNG_ENABLED 0
  1231. #endif
  1232. #if RNG_ENABLED
  1233. // <q> RNG_CONFIG_ERROR_CORRECTION - Error correction
  1234. #ifndef RNG_CONFIG_ERROR_CORRECTION
  1235. #define RNG_CONFIG_ERROR_CORRECTION 0
  1236. #endif
  1237. // <o> RNG_CONFIG_POOL_SIZE - Pool size
  1238. #ifndef RNG_CONFIG_POOL_SIZE
  1239. #define RNG_CONFIG_POOL_SIZE 32
  1240. #endif
  1241. // <o> RNG_CONFIG_IRQ_PRIORITY - Interrupt priority
  1242. // <i> Priorities 0,2 (nRF51) and 0,1,4,5 (nRF52) are reserved for SoftDevice
  1243. // <0=> 0 (highest)
  1244. // <1=> 1
  1245. // <2=> 2
  1246. // <3=> 3
  1247. // <4=> 4
  1248. // <5=> 5
  1249. // <6=> 6
  1250. // <7=> 7
  1251. #ifndef RNG_CONFIG_IRQ_PRIORITY
  1252. #define RNG_CONFIG_IRQ_PRIORITY 7
  1253. #endif
  1254. // <e> RNG_CONFIG_LOG_ENABLED - Enables logging in the module.
  1255. //==========================================================
  1256. #ifndef RNG_CONFIG_LOG_ENABLED
  1257. #define RNG_CONFIG_LOG_ENABLED 0
  1258. #endif
  1259. #if RNG_CONFIG_LOG_ENABLED
  1260. // <o> RNG_CONFIG_LOG_LEVEL - Default Severity level
  1261. // <0=> Off
  1262. // <1=> Error
  1263. // <2=> Warning
  1264. // <3=> Info
  1265. // <4=> Debug
  1266. #ifndef RNG_CONFIG_LOG_LEVEL
  1267. #define RNG_CONFIG_LOG_LEVEL 3
  1268. #endif
  1269. // <o> RNG_CONFIG_INFO_COLOR - ANSI escape code prefix.
  1270. // <0=> Default
  1271. // <1=> Black
  1272. // <2=> Red
  1273. // <3=> Green
  1274. // <4=> Yellow
  1275. // <5=> Blue
  1276. // <6=> Magenta
  1277. // <7=> Cyan
  1278. // <8=> White
  1279. #ifndef RNG_CONFIG_INFO_COLOR
  1280. #define RNG_CONFIG_INFO_COLOR 0
  1281. #endif
  1282. // <o> RNG_CONFIG_DEBUG_COLOR - ANSI escape code prefix.
  1283. // <0=> Default
  1284. // <1=> Black
  1285. // <2=> Red
  1286. // <3=> Green
  1287. // <4=> Yellow
  1288. // <5=> Blue
  1289. // <6=> Magenta
  1290. // <7=> Cyan
  1291. // <8=> White
  1292. #ifndef RNG_CONFIG_DEBUG_COLOR
  1293. #define RNG_CONFIG_DEBUG_COLOR 0
  1294. #endif
  1295. // <q> RNG_CONFIG_RANDOM_NUMBER_LOG_ENABLED - Enables logging of random numbers.
  1296. #ifndef RNG_CONFIG_RANDOM_NUMBER_LOG_ENABLED
  1297. #define RNG_CONFIG_RANDOM_NUMBER_LOG_ENABLED 0
  1298. #endif
  1299. #endif //RNG_CONFIG_LOG_ENABLED
  1300. // </e>
  1301. #endif //RNG_ENABLED
  1302. // </e>
  1303. // <e> RTC_ENABLED - nrf_drv_rtc - RTC peripheral driver
  1304. //==========================================================
  1305. #ifndef RTC_ENABLED
  1306. #define RTC_ENABLED 0
  1307. #endif
  1308. #if RTC_ENABLED
  1309. // <o> RTC_DEFAULT_CONFIG_FREQUENCY - Frequency <16-32768>
  1310. #ifndef RTC_DEFAULT_CONFIG_FREQUENCY
  1311. #define RTC_DEFAULT_CONFIG_FREQUENCY 32768
  1312. #endif
  1313. // <q> RTC_DEFAULT_CONFIG_RELIABLE - Ensures safe compare event triggering
  1314. #ifndef RTC_DEFAULT_CONFIG_RELIABLE
  1315. #define RTC_DEFAULT_CONFIG_RELIABLE 0
  1316. #endif
  1317. // <o> RTC_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority
  1318. // <i> Priorities 0,2 (nRF51) and 0,1,4,5 (nRF52) are reserved for SoftDevice
  1319. // <0=> 0 (highest)
  1320. // <1=> 1
  1321. // <2=> 2
  1322. // <3=> 3
  1323. // <4=> 4
  1324. // <5=> 5
  1325. // <6=> 6
  1326. // <7=> 7
  1327. #ifndef RTC_DEFAULT_CONFIG_IRQ_PRIORITY
  1328. #define RTC_DEFAULT_CONFIG_IRQ_PRIORITY 7
  1329. #endif
  1330. // <q> RTC0_ENABLED - Enable RTC0 instance
  1331. #ifndef RTC0_ENABLED
  1332. #define RTC0_ENABLED 0
  1333. #endif
  1334. // <q> RTC1_ENABLED - Enable RTC1 instance
  1335. #ifndef RTC1_ENABLED
  1336. #define RTC1_ENABLED 0
  1337. #endif
  1338. // <q> RTC2_ENABLED - Enable RTC2 instance
  1339. #ifndef RTC2_ENABLED
  1340. #define RTC2_ENABLED 0
  1341. #endif
  1342. // <o> NRF_MAXIMUM_LATENCY_US - Maximum possible time[us] in highest priority interrupt
  1343. #ifndef NRF_MAXIMUM_LATENCY_US
  1344. #define NRF_MAXIMUM_LATENCY_US 2000
  1345. #endif
  1346. // <e> RTC_CONFIG_LOG_ENABLED - Enables logging in the module.
  1347. //==========================================================
  1348. #ifndef RTC_CONFIG_LOG_ENABLED
  1349. #define RTC_CONFIG_LOG_ENABLED 0
  1350. #endif
  1351. #if RTC_CONFIG_LOG_ENABLED
  1352. // <o> RTC_CONFIG_LOG_LEVEL - Default Severity level
  1353. // <0=> Off
  1354. // <1=> Error
  1355. // <2=> Warning
  1356. // <3=> Info
  1357. // <4=> Debug
  1358. #ifndef RTC_CONFIG_LOG_LEVEL
  1359. #define RTC_CONFIG_LOG_LEVEL 3
  1360. #endif
  1361. // <o> RTC_CONFIG_INFO_COLOR - ANSI escape code prefix.
  1362. // <0=> Default
  1363. // <1=> Black
  1364. // <2=> Red
  1365. // <3=> Green
  1366. // <4=> Yellow
  1367. // <5=> Blue
  1368. // <6=> Magenta
  1369. // <7=> Cyan
  1370. // <8=> White
  1371. #ifndef RTC_CONFIG_INFO_COLOR
  1372. #define RTC_CONFIG_INFO_COLOR 0
  1373. #endif
  1374. // <o> RTC_CONFIG_DEBUG_COLOR - ANSI escape code prefix.
  1375. // <0=> Default
  1376. // <1=> Black
  1377. // <2=> Red
  1378. // <3=> Green
  1379. // <4=> Yellow
  1380. // <5=> Blue
  1381. // <6=> Magenta
  1382. // <7=> Cyan
  1383. // <8=> White
  1384. #ifndef RTC_CONFIG_DEBUG_COLOR
  1385. #define RTC_CONFIG_DEBUG_COLOR 0
  1386. #endif
  1387. #endif //RTC_CONFIG_LOG_ENABLED
  1388. // </e>
  1389. #endif //RTC_ENABLED
  1390. // </e>
  1391. // <e> SAADC_ENABLED - nrf_drv_saadc - SAADC peripheral driver
  1392. //==========================================================
  1393. #ifndef SAADC_ENABLED
  1394. #define SAADC_ENABLED 1
  1395. #endif
  1396. #if SAADC_ENABLED
  1397. // <o> SAADC_CONFIG_RESOLUTION - Resolution
  1398. // <0=> 8 bit
  1399. // <1=> 10 bit
  1400. // <2=> 12 bit
  1401. // <3=> 14 bit
  1402. #ifndef SAADC_CONFIG_RESOLUTION
  1403. #define SAADC_CONFIG_RESOLUTION 2
  1404. #endif
  1405. // <o> SAADC_CONFIG_OVERSAMPLE - Sample period
  1406. // <0=> Disabled
  1407. // <1=> 2x
  1408. // <2=> 4x
  1409. // <3=> 8x
  1410. // <4=> 16x
  1411. // <5=> 32x
  1412. // <6=> 64x
  1413. // <7=> 128x
  1414. // <8=> 256x
  1415. #ifndef SAADC_CONFIG_OVERSAMPLE
  1416. #define SAADC_CONFIG_OVERSAMPLE 0
  1417. #endif
  1418. // <q> SAADC_CONFIG_LP_MODE - Enabling low power mode
  1419. #ifndef SAADC_CONFIG_LP_MODE
  1420. #define SAADC_CONFIG_LP_MODE 0
  1421. #endif
  1422. // <o> SAADC_CONFIG_IRQ_PRIORITY - Interrupt priority
  1423. // <i> Priorities 0,2 (nRF51) and 0,1,4,5 (nRF52) are reserved for SoftDevice
  1424. // <0=> 0 (highest)
  1425. // <1=> 1
  1426. // <2=> 2
  1427. // <3=> 3
  1428. // <4=> 4
  1429. // <5=> 5
  1430. // <6=> 6
  1431. // <7=> 7
  1432. #ifndef SAADC_CONFIG_IRQ_PRIORITY
  1433. #define SAADC_CONFIG_IRQ_PRIORITY 7
  1434. #endif
  1435. // <e> SAADC_CONFIG_LOG_ENABLED - Enables logging in the module.
  1436. //==========================================================
  1437. #ifndef SAADC_CONFIG_LOG_ENABLED
  1438. #define SAADC_CONFIG_LOG_ENABLED 0
  1439. #endif
  1440. #if SAADC_CONFIG_LOG_ENABLED
  1441. // <o> SAADC_CONFIG_LOG_LEVEL - Default Severity level
  1442. // <0=> Off
  1443. // <1=> Error
  1444. // <2=> Warning
  1445. // <3=> Info
  1446. // <4=> Debug
  1447. #ifndef SAADC_CONFIG_LOG_LEVEL
  1448. #define SAADC_CONFIG_LOG_LEVEL 3
  1449. #endif
  1450. // <o> SAADC_CONFIG_INFO_COLOR - ANSI escape code prefix.
  1451. // <0=> Default
  1452. // <1=> Black
  1453. // <2=> Red
  1454. // <3=> Green
  1455. // <4=> Yellow
  1456. // <5=> Blue
  1457. // <6=> Magenta
  1458. // <7=> Cyan
  1459. // <8=> White
  1460. #ifndef SAADC_CONFIG_INFO_COLOR
  1461. #define SAADC_CONFIG_INFO_COLOR 0
  1462. #endif
  1463. // <o> SAADC_CONFIG_DEBUG_COLOR - ANSI escape code prefix.
  1464. // <0=> Default
  1465. // <1=> Black
  1466. // <2=> Red
  1467. // <3=> Green
  1468. // <4=> Yellow
  1469. // <5=> Blue
  1470. // <6=> Magenta
  1471. // <7=> Cyan
  1472. // <8=> White
  1473. #ifndef SAADC_CONFIG_DEBUG_COLOR
  1474. #define SAADC_CONFIG_DEBUG_COLOR 0
  1475. #endif
  1476. #endif //SAADC_CONFIG_LOG_ENABLED
  1477. // </e>
  1478. #endif //SAADC_ENABLED
  1479. // </e>
  1480. // <e> SPIS_ENABLED - nrf_drv_spis - SPI Slave driver
  1481. //==========================================================
  1482. #ifndef SPIS_ENABLED
  1483. #define SPIS_ENABLED 0
  1484. #endif
  1485. #if SPIS_ENABLED
  1486. // <o> SPIS_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority
  1487. // <i> Priorities 0,2 (nRF51) and 0,1,4,5 (nRF52) are reserved for SoftDevice
  1488. // <0=> 0 (highest)
  1489. // <1=> 1
  1490. // <2=> 2
  1491. // <3=> 3
  1492. // <4=> 4
  1493. // <5=> 5
  1494. // <6=> 6
  1495. // <7=> 7
  1496. #ifndef SPIS_DEFAULT_CONFIG_IRQ_PRIORITY
  1497. #define SPIS_DEFAULT_CONFIG_IRQ_PRIORITY 7
  1498. #endif
  1499. // <o> SPIS_DEFAULT_MODE - Mode
  1500. // <0=> MODE_0
  1501. // <1=> MODE_1
  1502. // <2=> MODE_2
  1503. // <3=> MODE_3
  1504. #ifndef SPIS_DEFAULT_MODE
  1505. #define SPIS_DEFAULT_MODE 0
  1506. #endif
  1507. // <o> SPIS_DEFAULT_BIT_ORDER - SPIS default bit order
  1508. // <0=> MSB first
  1509. // <1=> LSB first
  1510. #ifndef SPIS_DEFAULT_BIT_ORDER
  1511. #define SPIS_DEFAULT_BIT_ORDER 0
  1512. #endif
  1513. // <o> SPIS_DEFAULT_DEF - SPIS default DEF character <0-255>
  1514. #ifndef SPIS_DEFAULT_DEF
  1515. #define SPIS_DEFAULT_DEF 255
  1516. #endif
  1517. // <o> SPIS_DEFAULT_ORC - SPIS default ORC character <0-255>
  1518. #ifndef SPIS_DEFAULT_ORC
  1519. #define SPIS_DEFAULT_ORC 255
  1520. #endif
  1521. // <q> SPIS0_ENABLED - Enable SPIS0 instance
  1522. #ifndef SPIS0_ENABLED
  1523. #define SPIS0_ENABLED 0
  1524. #endif
  1525. // <q> SPIS1_ENABLED - Enable SPIS1 instance
  1526. #ifndef SPIS1_ENABLED
  1527. #define SPIS1_ENABLED 0
  1528. #endif
  1529. // <q> SPIS2_ENABLED - Enable SPIS2 instance
  1530. #ifndef SPIS2_ENABLED
  1531. #define SPIS2_ENABLED 0
  1532. #endif
  1533. // <e> SPIS_CONFIG_LOG_ENABLED - Enables logging in the module.
  1534. //==========================================================
  1535. #ifndef SPIS_CONFIG_LOG_ENABLED
  1536. #define SPIS_CONFIG_LOG_ENABLED 0
  1537. #endif
  1538. #if SPIS_CONFIG_LOG_ENABLED
  1539. // <o> SPIS_CONFIG_LOG_LEVEL - Default Severity level
  1540. // <0=> Off
  1541. // <1=> Error
  1542. // <2=> Warning
  1543. // <3=> Info
  1544. // <4=> Debug
  1545. #ifndef SPIS_CONFIG_LOG_LEVEL
  1546. #define SPIS_CONFIG_LOG_LEVEL 3
  1547. #endif
  1548. // <o> SPIS_CONFIG_INFO_COLOR - ANSI escape code prefix.
  1549. // <0=> Default
  1550. // <1=> Black
  1551. // <2=> Red
  1552. // <3=> Green
  1553. // <4=> Yellow
  1554. // <5=> Blue
  1555. // <6=> Magenta
  1556. // <7=> Cyan
  1557. // <8=> White
  1558. #ifndef SPIS_CONFIG_INFO_COLOR
  1559. #define SPIS_CONFIG_INFO_COLOR 0
  1560. #endif
  1561. // <o> SPIS_CONFIG_DEBUG_COLOR - ANSI escape code prefix.
  1562. // <0=> Default
  1563. // <1=> Black
  1564. // <2=> Red
  1565. // <3=> Green
  1566. // <4=> Yellow
  1567. // <5=> Blue
  1568. // <6=> Magenta
  1569. // <7=> Cyan
  1570. // <8=> White
  1571. #ifndef SPIS_CONFIG_DEBUG_COLOR
  1572. #define SPIS_CONFIG_DEBUG_COLOR 0
  1573. #endif
  1574. #endif //SPIS_CONFIG_LOG_ENABLED
  1575. // </e>
  1576. // <q> SPIS_NRF52_ANOMALY_109_WORKAROUND_ENABLED - Enables nRF52 Anomaly 109 workaround for SPIS.
  1577. // <i> The workaround uses a GPIOTE channel to generate interrupts
  1578. // <i> on falling edges detected on the CSN line. This will make
  1579. // <i> the CPU active for the moment when SPIS starts DMA transfers,
  1580. // <i> and this way the transfers will be protected.
  1581. // <i> This workaround uses GPIOTE driver, so this driver must be
  1582. // <i> enabled as well.
  1583. #ifndef SPIS_NRF52_ANOMALY_109_WORKAROUND_ENABLED
  1584. #define SPIS_NRF52_ANOMALY_109_WORKAROUND_ENABLED 0
  1585. #endif
  1586. #endif //SPIS_ENABLED
  1587. // </e>
  1588. // <e> SPI_ENABLED - nrf_drv_spi - SPI/SPIM peripheral driver
  1589. //==========================================================
  1590. #ifndef SPI_ENABLED
  1591. #define SPI_ENABLED 0
  1592. #endif
  1593. #if SPI_ENABLED
  1594. // <o> SPI_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority
  1595. // <i> Priorities 0,2 (nRF51) and 0,1,4,5 (nRF52) are reserved for SoftDevice
  1596. // <0=> 0 (highest)
  1597. // <1=> 1
  1598. // <2=> 2
  1599. // <3=> 3
  1600. // <4=> 4
  1601. // <5=> 5
  1602. // <6=> 6
  1603. // <7=> 7
  1604. #ifndef SPI_DEFAULT_CONFIG_IRQ_PRIORITY
  1605. #define SPI_DEFAULT_CONFIG_IRQ_PRIORITY 7
  1606. #endif
  1607. // <e> SPI0_ENABLED - Enable SPI0 instance
  1608. //==========================================================
  1609. #ifndef SPI0_ENABLED
  1610. #define SPI0_ENABLED 0
  1611. #endif
  1612. #if SPI0_ENABLED
  1613. // <q> SPI0_USE_EASY_DMA - Use EasyDMA
  1614. #ifndef SPI0_USE_EASY_DMA
  1615. #define SPI0_USE_EASY_DMA 1
  1616. #endif
  1617. // <o> SPI0_DEFAULT_FREQUENCY - SPI frequency
  1618. // <33554432=> 125 kHz
  1619. // <67108864=> 250 kHz
  1620. // <134217728=> 500 kHz
  1621. // <268435456=> 1 MHz
  1622. // <536870912=> 2 MHz
  1623. // <1073741824=> 4 MHz
  1624. // <2147483648=> 8 MHz
  1625. #ifndef SPI0_DEFAULT_FREQUENCY
  1626. #define SPI0_DEFAULT_FREQUENCY 1073741824
  1627. #endif
  1628. #endif //SPI0_ENABLED
  1629. // </e>
  1630. // <e> SPI1_ENABLED - Enable SPI1 instance
  1631. //==========================================================
  1632. #ifndef SPI1_ENABLED
  1633. #define SPI1_ENABLED 0
  1634. #endif
  1635. #if SPI1_ENABLED
  1636. // <q> SPI1_USE_EASY_DMA - Use EasyDMA
  1637. #ifndef SPI1_USE_EASY_DMA
  1638. #define SPI1_USE_EASY_DMA 1
  1639. #endif
  1640. // <o> SPI1_DEFAULT_FREQUENCY - SPI frequency
  1641. // <33554432=> 125 kHz
  1642. // <67108864=> 250 kHz
  1643. // <134217728=> 500 kHz
  1644. // <268435456=> 1 MHz
  1645. // <536870912=> 2 MHz
  1646. // <1073741824=> 4 MHz
  1647. // <2147483648=> 8 MHz
  1648. #ifndef SPI1_DEFAULT_FREQUENCY
  1649. #define SPI1_DEFAULT_FREQUENCY 1073741824
  1650. #endif
  1651. #endif //SPI1_ENABLED
  1652. // </e>
  1653. // <e> SPI2_ENABLED - Enable SPI2 instance
  1654. //==========================================================
  1655. #ifndef SPI2_ENABLED
  1656. #define SPI2_ENABLED 0
  1657. #endif
  1658. #if SPI2_ENABLED
  1659. // <q> SPI2_USE_EASY_DMA - Use EasyDMA
  1660. #ifndef SPI2_USE_EASY_DMA
  1661. #define SPI2_USE_EASY_DMA 1
  1662. #endif
  1663. // <q> SPI2_DEFAULT_FREQUENCY - Use EasyDMA
  1664. #ifndef SPI2_DEFAULT_FREQUENCY
  1665. #define SPI2_DEFAULT_FREQUENCY 1
  1666. #endif
  1667. #endif //SPI2_ENABLED
  1668. // </e>
  1669. // <e> SPI_CONFIG_LOG_ENABLED - Enables logging in the module.
  1670. //==========================================================
  1671. #ifndef SPI_CONFIG_LOG_ENABLED
  1672. #define SPI_CONFIG_LOG_ENABLED 0
  1673. #endif
  1674. #if SPI_CONFIG_LOG_ENABLED
  1675. // <o> SPI_CONFIG_LOG_LEVEL - Default Severity level
  1676. // <0=> Off
  1677. // <1=> Error
  1678. // <2=> Warning
  1679. // <3=> Info
  1680. // <4=> Debug
  1681. #ifndef SPI_CONFIG_LOG_LEVEL
  1682. #define SPI_CONFIG_LOG_LEVEL 3
  1683. #endif
  1684. // <o> SPI_CONFIG_INFO_COLOR - ANSI escape code prefix.
  1685. // <0=> Default
  1686. // <1=> Black
  1687. // <2=> Red
  1688. // <3=> Green
  1689. // <4=> Yellow
  1690. // <5=> Blue
  1691. // <6=> Magenta
  1692. // <7=> Cyan
  1693. // <8=> White
  1694. #ifndef SPI_CONFIG_INFO_COLOR
  1695. #define SPI_CONFIG_INFO_COLOR 0
  1696. #endif
  1697. // <o> SPI_CONFIG_DEBUG_COLOR - ANSI escape code prefix.
  1698. // <0=> Default
  1699. // <1=> Black
  1700. // <2=> Red
  1701. // <3=> Green
  1702. // <4=> Yellow
  1703. // <5=> Blue
  1704. // <6=> Magenta
  1705. // <7=> Cyan
  1706. // <8=> White
  1707. #ifndef SPI_CONFIG_DEBUG_COLOR
  1708. #define SPI_CONFIG_DEBUG_COLOR 0
  1709. #endif
  1710. #endif //SPI_CONFIG_LOG_ENABLED
  1711. // </e>
  1712. // <q> SPIM_NRF52_ANOMALY_109_WORKAROUND_ENABLED - Enables nRF52 anomaly 109 workaround for SPIM.
  1713. // <i> The workaround uses interrupts to wake up the CPU by catching
  1714. // <i> a start event of zero-length transmission to start the clock. This
  1715. // <i> ensures that the DMA transfer will be executed without issues and
  1716. // <i> that the proper transfer will be started. See more in the Errata
  1717. // <i> document or Anomaly 109 Addendum located at
  1718. // <i> https://infocenter.nordicsemi.com/
  1719. #ifndef SPIM_NRF52_ANOMALY_109_WORKAROUND_ENABLED
  1720. #define SPIM_NRF52_ANOMALY_109_WORKAROUND_ENABLED 0
  1721. #endif
  1722. #endif //SPI_ENABLED
  1723. // </e>
  1724. // <e> TIMER_ENABLED - nrf_drv_timer - TIMER periperal driver
  1725. //==========================================================
  1726. #ifndef TIMER_ENABLED
  1727. #define TIMER_ENABLED 0
  1728. #endif
  1729. #if TIMER_ENABLED
  1730. // <o> TIMER_DEFAULT_CONFIG_FREQUENCY - Timer frequency if in Timer mode
  1731. // <0=> 16 MHz
  1732. // <1=> 8 MHz
  1733. // <2=> 4 MHz
  1734. // <3=> 2 MHz
  1735. // <4=> 1 MHz
  1736. // <5=> 500 kHz
  1737. // <6=> 250 kHz
  1738. // <7=> 125 kHz
  1739. // <8=> 62.5 kHz
  1740. // <9=> 31.25 kHz
  1741. #ifndef TIMER_DEFAULT_CONFIG_FREQUENCY
  1742. #define TIMER_DEFAULT_CONFIG_FREQUENCY 0
  1743. #endif
  1744. // <o> TIMER_DEFAULT_CONFIG_MODE - Timer mode or operation
  1745. // <0=> Timer
  1746. // <1=> Counter
  1747. #ifndef TIMER_DEFAULT_CONFIG_MODE
  1748. #define TIMER_DEFAULT_CONFIG_MODE 0
  1749. #endif
  1750. // <o> TIMER_DEFAULT_CONFIG_BIT_WIDTH - Timer counter bit width
  1751. // <0=> 16 bit
  1752. // <1=> 8 bit
  1753. // <2=> 24 bit
  1754. // <3=> 32 bit
  1755. #ifndef TIMER_DEFAULT_CONFIG_BIT_WIDTH
  1756. #define TIMER_DEFAULT_CONFIG_BIT_WIDTH 0
  1757. #endif
  1758. // <o> TIMER_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority
  1759. // <i> Priorities 0,2 (nRF51) and 0,1,4,5 (nRF52) are reserved for SoftDevice
  1760. // <0=> 0 (highest)
  1761. // <1=> 1
  1762. // <2=> 2
  1763. // <3=> 3
  1764. // <4=> 4
  1765. // <5=> 5
  1766. // <6=> 6
  1767. // <7=> 7
  1768. #ifndef TIMER_DEFAULT_CONFIG_IRQ_PRIORITY
  1769. #define TIMER_DEFAULT_CONFIG_IRQ_PRIORITY 7
  1770. #endif
  1771. // <q> TIMER0_ENABLED - Enable TIMER0 instance
  1772. #ifndef TIMER0_ENABLED
  1773. #define TIMER0_ENABLED 0
  1774. #endif
  1775. // <q> TIMER1_ENABLED - Enable TIMER1 instance
  1776. #ifndef TIMER1_ENABLED
  1777. #define TIMER1_ENABLED 0
  1778. #endif
  1779. // <q> TIMER2_ENABLED - Enable TIMER2 instance
  1780. #ifndef TIMER2_ENABLED
  1781. #define TIMER2_ENABLED 0
  1782. #endif
  1783. // <q> TIMER3_ENABLED - Enable TIMER3 instance
  1784. #ifndef TIMER3_ENABLED
  1785. #define TIMER3_ENABLED 0
  1786. #endif
  1787. // <q> TIMER4_ENABLED - Enable TIMER4 instance
  1788. #ifndef TIMER4_ENABLED
  1789. #define TIMER4_ENABLED 0
  1790. #endif
  1791. // <e> TIMER_CONFIG_LOG_ENABLED - Enables logging in the module.
  1792. //==========================================================
  1793. #ifndef TIMER_CONFIG_LOG_ENABLED
  1794. #define TIMER_CONFIG_LOG_ENABLED 0
  1795. #endif
  1796. #if TIMER_CONFIG_LOG_ENABLED
  1797. // <o> TIMER_CONFIG_LOG_LEVEL - Default Severity level
  1798. // <0=> Off
  1799. // <1=> Error
  1800. // <2=> Warning
  1801. // <3=> Info
  1802. // <4=> Debug
  1803. #ifndef TIMER_CONFIG_LOG_LEVEL
  1804. #define TIMER_CONFIG_LOG_LEVEL 3
  1805. #endif
  1806. // <o> TIMER_CONFIG_INFO_COLOR - ANSI escape code prefix.
  1807. // <0=> Default
  1808. // <1=> Black
  1809. // <2=> Red
  1810. // <3=> Green
  1811. // <4=> Yellow
  1812. // <5=> Blue
  1813. // <6=> Magenta
  1814. // <7=> Cyan
  1815. // <8=> White
  1816. #ifndef TIMER_CONFIG_INFO_COLOR
  1817. #define TIMER_CONFIG_INFO_COLOR 0
  1818. #endif
  1819. // <o> TIMER_CONFIG_DEBUG_COLOR - ANSI escape code prefix.
  1820. // <0=> Default
  1821. // <1=> Black
  1822. // <2=> Red
  1823. // <3=> Green
  1824. // <4=> Yellow
  1825. // <5=> Blue
  1826. // <6=> Magenta
  1827. // <7=> Cyan
  1828. // <8=> White
  1829. #ifndef TIMER_CONFIG_DEBUG_COLOR
  1830. #define TIMER_CONFIG_DEBUG_COLOR 0
  1831. #endif
  1832. #endif //TIMER_CONFIG_LOG_ENABLED
  1833. // </e>
  1834. #endif //TIMER_ENABLED
  1835. // </e>
  1836. // <e> TWIS_ENABLED - nrf_drv_twis - TWIS peripheral driver
  1837. //==========================================================
  1838. #ifndef TWIS_ENABLED
  1839. #define TWIS_ENABLED 0
  1840. #endif
  1841. #if TWIS_ENABLED
  1842. // <o> TWIS_DEFAULT_CONFIG_ADDR0 - Address0
  1843. #ifndef TWIS_DEFAULT_CONFIG_ADDR0
  1844. #define TWIS_DEFAULT_CONFIG_ADDR0 0
  1845. #endif
  1846. // <o> TWIS_DEFAULT_CONFIG_ADDR1 - Address1
  1847. #ifndef TWIS_DEFAULT_CONFIG_ADDR1
  1848. #define TWIS_DEFAULT_CONFIG_ADDR1 0
  1849. #endif
  1850. // <o> TWIS_DEFAULT_CONFIG_SCL_PULL - SCL pin pull configuration
  1851. // <0=> Disabled
  1852. // <1=> Pull down
  1853. // <3=> Pull up
  1854. #ifndef TWIS_DEFAULT_CONFIG_SCL_PULL
  1855. #define TWIS_DEFAULT_CONFIG_SCL_PULL 0
  1856. #endif
  1857. // <o> TWIS_DEFAULT_CONFIG_SDA_PULL - SDA pin pull configuration
  1858. // <0=> Disabled
  1859. // <1=> Pull down
  1860. // <3=> Pull up
  1861. #ifndef TWIS_DEFAULT_CONFIG_SDA_PULL
  1862. #define TWIS_DEFAULT_CONFIG_SDA_PULL 0
  1863. #endif
  1864. // <o> TWIS_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority
  1865. // <i> Priorities 0,2 (nRF51) and 0,1,4,5 (nRF52) are reserved for SoftDevice
  1866. // <0=> 0 (highest)
  1867. // <1=> 1
  1868. // <2=> 2
  1869. // <3=> 3
  1870. // <4=> 4
  1871. // <5=> 5
  1872. // <6=> 6
  1873. // <7=> 7
  1874. #ifndef TWIS_DEFAULT_CONFIG_IRQ_PRIORITY
  1875. #define TWIS_DEFAULT_CONFIG_IRQ_PRIORITY 7
  1876. #endif
  1877. // <q> TWIS0_ENABLED - Enable TWIS0 instance
  1878. #ifndef TWIS0_ENABLED
  1879. #define TWIS0_ENABLED 0
  1880. #endif
  1881. // <q> TWIS1_ENABLED - Enable TWIS1 instance
  1882. #ifndef TWIS1_ENABLED
  1883. #define TWIS1_ENABLED 0
  1884. #endif
  1885. // <q> TWIS_ASSUME_INIT_AFTER_RESET_ONLY - Assume that any instance would be initialized only once
  1886. // <i> Optimization flag. Registers used by TWIS are shared by other peripherals. Normally, during initialization driver tries to clear all registers to known state before doing the initialization itself. This gives initialization safe procedure, no matter when it would be called. If you activate TWIS only once and do never uninitialize it - set this flag to 1 what gives more optimal code.
  1887. #ifndef TWIS_ASSUME_INIT_AFTER_RESET_ONLY
  1888. #define TWIS_ASSUME_INIT_AFTER_RESET_ONLY 0
  1889. #endif
  1890. // <q> TWIS_NO_SYNC_MODE - Remove support for synchronous mode
  1891. // <i> Synchronous mode would be used in specific situations. And it uses some additional code and data memory to safely process state machine by polling it in status functions. If this functionality is not required it may be disabled to free some resources.
  1892. #ifndef TWIS_NO_SYNC_MODE
  1893. #define TWIS_NO_SYNC_MODE 0
  1894. #endif
  1895. // <e> TWIS_CONFIG_LOG_ENABLED - Enables logging in the module.
  1896. //==========================================================
  1897. #ifndef TWIS_CONFIG_LOG_ENABLED
  1898. #define TWIS_CONFIG_LOG_ENABLED 0
  1899. #endif
  1900. #if TWIS_CONFIG_LOG_ENABLED
  1901. // <o> TWIS_CONFIG_LOG_LEVEL - Default Severity level
  1902. // <0=> Off
  1903. // <1=> Error
  1904. // <2=> Warning
  1905. // <3=> Info
  1906. // <4=> Debug
  1907. #ifndef TWIS_CONFIG_LOG_LEVEL
  1908. #define TWIS_CONFIG_LOG_LEVEL 3
  1909. #endif
  1910. // <o> TWIS_CONFIG_INFO_COLOR - ANSI escape code prefix.
  1911. // <0=> Default
  1912. // <1=> Black
  1913. // <2=> Red
  1914. // <3=> Green
  1915. // <4=> Yellow
  1916. // <5=> Blue
  1917. // <6=> Magenta
  1918. // <7=> Cyan
  1919. // <8=> White
  1920. #ifndef TWIS_CONFIG_INFO_COLOR
  1921. #define TWIS_CONFIG_INFO_COLOR 0
  1922. #endif
  1923. // <o> TWIS_CONFIG_DEBUG_COLOR - ANSI escape code prefix.
  1924. // <0=> Default
  1925. // <1=> Black
  1926. // <2=> Red
  1927. // <3=> Green
  1928. // <4=> Yellow
  1929. // <5=> Blue
  1930. // <6=> Magenta
  1931. // <7=> Cyan
  1932. // <8=> White
  1933. #ifndef TWIS_CONFIG_DEBUG_COLOR
  1934. #define TWIS_CONFIG_DEBUG_COLOR 0
  1935. #endif
  1936. #endif //TWIS_CONFIG_LOG_ENABLED
  1937. // </e>
  1938. #endif //TWIS_ENABLED
  1939. // </e>
  1940. // <e> TWI_ENABLED - nrf_drv_twi - TWI/TWIM peripheral driver
  1941. //==========================================================
  1942. #ifndef TWI_ENABLED
  1943. #define TWI_ENABLED 0
  1944. #endif
  1945. #if TWI_ENABLED
  1946. // <o> TWI_DEFAULT_CONFIG_FREQUENCY - Frequency
  1947. // <26738688=> 100k
  1948. // <67108864=> 250k
  1949. // <104857600=> 400k
  1950. #ifndef TWI_DEFAULT_CONFIG_FREQUENCY
  1951. #define TWI_DEFAULT_CONFIG_FREQUENCY 26738688
  1952. #endif
  1953. // <q> TWI_DEFAULT_CONFIG_CLR_BUS_INIT - Enables bus clearing procedure during init
  1954. #ifndef TWI_DEFAULT_CONFIG_CLR_BUS_INIT
  1955. #define TWI_DEFAULT_CONFIG_CLR_BUS_INIT 0
  1956. #endif
  1957. // <q> TWI_DEFAULT_CONFIG_HOLD_BUS_UNINIT - Enables bus holding after uninit
  1958. #ifndef TWI_DEFAULT_CONFIG_HOLD_BUS_UNINIT
  1959. #define TWI_DEFAULT_CONFIG_HOLD_BUS_UNINIT 0
  1960. #endif
  1961. // <o> TWI_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority
  1962. // <i> Priorities 0,2 (nRF51) and 0,1,4,5 (nRF52) are reserved for SoftDevice
  1963. // <0=> 0 (highest)
  1964. // <1=> 1
  1965. // <2=> 2
  1966. // <3=> 3
  1967. // <4=> 4
  1968. // <5=> 5
  1969. // <6=> 6
  1970. // <7=> 7
  1971. #ifndef TWI_DEFAULT_CONFIG_IRQ_PRIORITY
  1972. #define TWI_DEFAULT_CONFIG_IRQ_PRIORITY 7
  1973. #endif
  1974. // <e> TWI0_ENABLED - Enable TWI0 instance
  1975. //==========================================================
  1976. #ifndef TWI0_ENABLED
  1977. #define TWI0_ENABLED 0
  1978. #endif
  1979. #if TWI0_ENABLED
  1980. // <q> TWI0_USE_EASY_DMA - Use EasyDMA (if present)
  1981. #ifndef TWI0_USE_EASY_DMA
  1982. #define TWI0_USE_EASY_DMA 0
  1983. #endif
  1984. #endif //TWI0_ENABLED
  1985. // </e>
  1986. // <e> TWI1_ENABLED - Enable TWI1 instance
  1987. //==========================================================
  1988. #ifndef TWI1_ENABLED
  1989. #define TWI1_ENABLED 0
  1990. #endif
  1991. #if TWI1_ENABLED
  1992. // <q> TWI1_USE_EASY_DMA - Use EasyDMA (if present)
  1993. #ifndef TWI1_USE_EASY_DMA
  1994. #define TWI1_USE_EASY_DMA 0
  1995. #endif
  1996. #endif //TWI1_ENABLED
  1997. // </e>
  1998. // <e> TWI_CONFIG_LOG_ENABLED - Enables logging in the module.
  1999. //==========================================================
  2000. #ifndef TWI_CONFIG_LOG_ENABLED
  2001. #define TWI_CONFIG_LOG_ENABLED 0
  2002. #endif
  2003. #if TWI_CONFIG_LOG_ENABLED
  2004. // <o> TWI_CONFIG_LOG_LEVEL - Default Severity level
  2005. // <0=> Off
  2006. // <1=> Error
  2007. // <2=> Warning
  2008. // <3=> Info
  2009. // <4=> Debug
  2010. #ifndef TWI_CONFIG_LOG_LEVEL
  2011. #define TWI_CONFIG_LOG_LEVEL 3
  2012. #endif
  2013. // <o> TWI_CONFIG_INFO_COLOR - ANSI escape code prefix.
  2014. // <0=> Default
  2015. // <1=> Black
  2016. // <2=> Red
  2017. // <3=> Green
  2018. // <4=> Yellow
  2019. // <5=> Blue
  2020. // <6=> Magenta
  2021. // <7=> Cyan
  2022. // <8=> White
  2023. #ifndef TWI_CONFIG_INFO_COLOR
  2024. #define TWI_CONFIG_INFO_COLOR 0
  2025. #endif
  2026. // <o> TWI_CONFIG_DEBUG_COLOR - ANSI escape code prefix.
  2027. // <0=> Default
  2028. // <1=> Black
  2029. // <2=> Red
  2030. // <3=> Green
  2031. // <4=> Yellow
  2032. // <5=> Blue
  2033. // <6=> Magenta
  2034. // <7=> Cyan
  2035. // <8=> White
  2036. #ifndef TWI_CONFIG_DEBUG_COLOR
  2037. #define TWI_CONFIG_DEBUG_COLOR 0
  2038. #endif
  2039. #endif //TWI_CONFIG_LOG_ENABLED
  2040. // </e>
  2041. // <q> TWIM_NRF52_ANOMALY_109_WORKAROUND_ENABLED - Enables nRF52 anomaly 109 workaround for TWIM.
  2042. // <i> The workaround uses interrupts to wake up the CPU by catching
  2043. // <i> the start event of zero-frequency transmission, clear the
  2044. // <i> peripheral, set desired frequency, start the peripheral, and
  2045. // <i> the proper transmission. See more in the Errata document or
  2046. // <i> Anomaly 109 Addendum located at https://infocenter.nordicsemi.com/
  2047. #ifndef TWIM_NRF52_ANOMALY_109_WORKAROUND_ENABLED
  2048. #define TWIM_NRF52_ANOMALY_109_WORKAROUND_ENABLED 0
  2049. #endif
  2050. #endif //TWI_ENABLED
  2051. // </e>
  2052. // <e> UART_ENABLED - nrf_drv_uart - UART/UARTE peripheral driver
  2053. //==========================================================
  2054. #ifndef UART_ENABLED
  2055. #define UART_ENABLED 1
  2056. #endif
  2057. #if UART_ENABLED
  2058. // <o> UART_DEFAULT_CONFIG_HWFC - Hardware Flow Control
  2059. // <0=> Disabled
  2060. // <1=> Enabled
  2061. #ifndef UART_DEFAULT_CONFIG_HWFC
  2062. #define UART_DEFAULT_CONFIG_HWFC 0
  2063. #endif
  2064. // <o> UART_DEFAULT_CONFIG_PARITY - Parity
  2065. // <0=> Excluded
  2066. // <14=> Included
  2067. #ifndef UART_DEFAULT_CONFIG_PARITY
  2068. #define UART_DEFAULT_CONFIG_PARITY 0
  2069. #endif
  2070. // <o> UART_DEFAULT_CONFIG_BAUDRATE - Default Baudrate
  2071. // <323584=> 1200 baud
  2072. // <643072=> 2400 baud
  2073. // <1290240=> 4800 baud
  2074. // <2576384=> 9600 baud
  2075. // <3862528=> 14400 baud
  2076. // <5152768=> 19200 baud
  2077. // <7716864=> 28800 baud
  2078. // <10289152=> 38400 baud
  2079. // <15400960=> 57600 baud
  2080. // <20615168=> 76800 baud
  2081. // <30801920=> 115200 baud
  2082. // <61865984=> 230400 baud
  2083. // <67108864=> 250000 baud
  2084. // <121634816=> 460800 baud
  2085. // <251658240=> 921600 baud
  2086. // <268435456=> 57600 baud
  2087. #ifndef UART_DEFAULT_CONFIG_BAUDRATE
  2088. #define UART_DEFAULT_CONFIG_BAUDRATE 30801920
  2089. #endif
  2090. // <o> UART_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority
  2091. // <i> Priorities 0,2 (nRF51) and 0,1,4,5 (nRF52) are reserved for SoftDevice
  2092. // <0=> 0 (highest)
  2093. // <1=> 1
  2094. // <2=> 2
  2095. // <3=> 3
  2096. // <4=> 4
  2097. // <5=> 5
  2098. // <6=> 6
  2099. // <7=> 7
  2100. #ifndef UART_DEFAULT_CONFIG_IRQ_PRIORITY
  2101. #define UART_DEFAULT_CONFIG_IRQ_PRIORITY 7
  2102. #endif
  2103. // <q> UART_EASY_DMA_SUPPORT - Driver supporting EasyDMA
  2104. #ifndef UART_EASY_DMA_SUPPORT
  2105. #define UART_EASY_DMA_SUPPORT 0
  2106. #endif
  2107. // <q> UART_LEGACY_SUPPORT - Driver supporting Legacy mode
  2108. #ifndef UART_LEGACY_SUPPORT
  2109. #define UART_LEGACY_SUPPORT 1
  2110. #endif
  2111. // <e> UART0_ENABLED - Enable UART0 instance
  2112. //==========================================================
  2113. #ifndef UART0_ENABLED
  2114. #define UART0_ENABLED 1
  2115. #endif
  2116. #if UART0_ENABLED
  2117. // <q> UART0_CONFIG_USE_EASY_DMA - Default setting for using EasyDMA
  2118. #ifndef UART0_CONFIG_USE_EASY_DMA
  2119. #define UART0_CONFIG_USE_EASY_DMA 0
  2120. #endif
  2121. #endif //UART0_ENABLED
  2122. // </e>
  2123. // <e> UART_CONFIG_LOG_ENABLED - Enables logging in the module.
  2124. //==========================================================
  2125. #ifndef UART_CONFIG_LOG_ENABLED
  2126. #define UART_CONFIG_LOG_ENABLED 0
  2127. #endif
  2128. #if UART_CONFIG_LOG_ENABLED
  2129. // <o> UART_CONFIG_LOG_LEVEL - Default Severity level
  2130. // <0=> Off
  2131. // <1=> Error
  2132. // <2=> Warning
  2133. // <3=> Info
  2134. // <4=> Debug
  2135. #ifndef UART_CONFIG_LOG_LEVEL
  2136. #define UART_CONFIG_LOG_LEVEL 3
  2137. #endif
  2138. // <o> UART_CONFIG_INFO_COLOR - ANSI escape code prefix.
  2139. // <0=> Default
  2140. // <1=> Black
  2141. // <2=> Red
  2142. // <3=> Green
  2143. // <4=> Yellow
  2144. // <5=> Blue
  2145. // <6=> Magenta
  2146. // <7=> Cyan
  2147. // <8=> White
  2148. #ifndef UART_CONFIG_INFO_COLOR
  2149. #define UART_CONFIG_INFO_COLOR 0
  2150. #endif
  2151. // <o> UART_CONFIG_DEBUG_COLOR - ANSI escape code prefix.
  2152. // <0=> Default
  2153. // <1=> Black
  2154. // <2=> Red
  2155. // <3=> Green
  2156. // <4=> Yellow
  2157. // <5=> Blue
  2158. // <6=> Magenta
  2159. // <7=> Cyan
  2160. // <8=> White
  2161. #ifndef UART_CONFIG_DEBUG_COLOR
  2162. #define UART_CONFIG_DEBUG_COLOR 0
  2163. #endif
  2164. #endif //UART_CONFIG_LOG_ENABLED
  2165. // </e>
  2166. #endif //UART_ENABLED
  2167. // </e>
  2168. // <e> USBD_ENABLED - nrf_drv_usbd - USB driver
  2169. //==========================================================
  2170. #ifndef USBD_ENABLED
  2171. #define USBD_ENABLED 0
  2172. #endif
  2173. #if USBD_ENABLED
  2174. // <o> USBD_CONFIG_IRQ_PRIORITY - Interrupt priority
  2175. // <i> Priorities 0,2 (nRF51) and 0,1,4,5 (nRF52) are reserved for SoftDevice
  2176. // <0=> 0 (highest)
  2177. // <1=> 1
  2178. // <2=> 2
  2179. // <3=> 3
  2180. // <4=> 4
  2181. // <5=> 5
  2182. // <6=> 6
  2183. // <7=> 7
  2184. #ifndef USBD_CONFIG_IRQ_PRIORITY
  2185. #define USBD_CONFIG_IRQ_PRIORITY 7
  2186. #endif
  2187. // <o> NRF_DRV_USBD_DMASCHEDULER_MODE - USBD SMA scheduler working scheme
  2188. // <0=> Prioritized access
  2189. // <1=> Round Robin
  2190. #ifndef NRF_DRV_USBD_DMASCHEDULER_MODE
  2191. #define NRF_DRV_USBD_DMASCHEDULER_MODE 0
  2192. #endif
  2193. // <q> NRF_USBD_DRV_LOG_ENABLED - Enable logging
  2194. #ifndef NRF_USBD_DRV_LOG_ENABLED
  2195. #define NRF_USBD_DRV_LOG_ENABLED 0
  2196. #endif
  2197. #endif //USBD_ENABLED
  2198. // </e>
  2199. // <e> WDT_ENABLED - nrf_drv_wdt - WDT peripheral driver
  2200. //==========================================================
  2201. #ifndef WDT_ENABLED
  2202. #define WDT_ENABLED 0
  2203. #endif
  2204. #if WDT_ENABLED
  2205. // <o> WDT_CONFIG_BEHAVIOUR - WDT behavior in CPU SLEEP or HALT mode
  2206. // <1=> Run in SLEEP, Pause in HALT
  2207. // <8=> Pause in SLEEP, Run in HALT
  2208. // <9=> Run in SLEEP and HALT
  2209. // <0=> Pause in SLEEP and HALT
  2210. #ifndef WDT_CONFIG_BEHAVIOUR
  2211. #define WDT_CONFIG_BEHAVIOUR 1
  2212. #endif
  2213. // <o> WDT_CONFIG_RELOAD_VALUE - Reload value <15-4294967295>
  2214. #ifndef WDT_CONFIG_RELOAD_VALUE
  2215. #define WDT_CONFIG_RELOAD_VALUE 2000
  2216. #endif
  2217. // <o> WDT_CONFIG_IRQ_PRIORITY - Interrupt priority
  2218. // <i> Priorities 0,2 (nRF51) and 0,1,4,5 (nRF52) are reserved for SoftDevice
  2219. // <0=> 0 (highest)
  2220. // <1=> 1
  2221. // <2=> 2
  2222. // <3=> 3
  2223. // <4=> 4
  2224. // <5=> 5
  2225. // <6=> 6
  2226. // <7=> 7
  2227. #ifndef WDT_CONFIG_IRQ_PRIORITY
  2228. #define WDT_CONFIG_IRQ_PRIORITY 7
  2229. #endif
  2230. // <e> WDT_CONFIG_LOG_ENABLED - Enables logging in the module.
  2231. //==========================================================
  2232. #ifndef WDT_CONFIG_LOG_ENABLED
  2233. #define WDT_CONFIG_LOG_ENABLED 0
  2234. #endif
  2235. #if WDT_CONFIG_LOG_ENABLED
  2236. // <o> WDT_CONFIG_LOG_LEVEL - Default Severity level
  2237. // <0=> Off
  2238. // <1=> Error
  2239. // <2=> Warning
  2240. // <3=> Info
  2241. // <4=> Debug
  2242. #ifndef WDT_CONFIG_LOG_LEVEL
  2243. #define WDT_CONFIG_LOG_LEVEL 3
  2244. #endif
  2245. // <o> WDT_CONFIG_INFO_COLOR - ANSI escape code prefix.
  2246. // <0=> Default
  2247. // <1=> Black
  2248. // <2=> Red
  2249. // <3=> Green
  2250. // <4=> Yellow
  2251. // <5=> Blue
  2252. // <6=> Magenta
  2253. // <7=> Cyan
  2254. // <8=> White
  2255. #ifndef WDT_CONFIG_INFO_COLOR
  2256. #define WDT_CONFIG_INFO_COLOR 0
  2257. #endif
  2258. // <o> WDT_CONFIG_DEBUG_COLOR - ANSI escape code prefix.
  2259. // <0=> Default
  2260. // <1=> Black
  2261. // <2=> Red
  2262. // <3=> Green
  2263. // <4=> Yellow
  2264. // <5=> Blue
  2265. // <6=> Magenta
  2266. // <7=> Cyan
  2267. // <8=> White
  2268. #ifndef WDT_CONFIG_DEBUG_COLOR
  2269. #define WDT_CONFIG_DEBUG_COLOR 0
  2270. #endif
  2271. #endif //WDT_CONFIG_LOG_ENABLED
  2272. // </e>
  2273. #endif //WDT_ENABLED
  2274. // </e>
  2275. // </h>
  2276. //==========================================================
  2277. // <h> nRF_Libraries
  2278. //==========================================================
  2279. // <q> APP_FIFO_ENABLED - app_fifo - Software FIFO implementation
  2280. #ifndef APP_FIFO_ENABLED
  2281. #define APP_FIFO_ENABLED 1
  2282. #endif
  2283. // <q> APP_GPIOTE_ENABLED - app_gpiote - GPIOTE events dispatcher
  2284. #ifndef APP_GPIOTE_ENABLED
  2285. #define APP_GPIOTE_ENABLED 0
  2286. #endif
  2287. // <q> APP_PWM_ENABLED - app_pwm - PWM functionality
  2288. #ifndef APP_PWM_ENABLED
  2289. #define APP_PWM_ENABLED 0
  2290. #endif
  2291. // <e> APP_SCHEDULER_ENABLED - app_scheduler - Events scheduler
  2292. //==========================================================
  2293. #ifndef APP_SCHEDULER_ENABLED
  2294. #define APP_SCHEDULER_ENABLED 1
  2295. #endif
  2296. #if APP_SCHEDULER_ENABLED
  2297. // <q> APP_SCHEDULER_WITH_PAUSE - Enabling pause feature
  2298. #ifndef APP_SCHEDULER_WITH_PAUSE
  2299. #define APP_SCHEDULER_WITH_PAUSE 0
  2300. #endif
  2301. // <q> APP_SCHEDULER_WITH_PROFILER - Enabling scheduler profiling
  2302. #ifndef APP_SCHEDULER_WITH_PROFILER
  2303. #define APP_SCHEDULER_WITH_PROFILER 0
  2304. #endif
  2305. #endif //APP_SCHEDULER_ENABLED
  2306. // </e>
  2307. // <e> APP_TIMER_ENABLED - app_timer - Application timer functionality
  2308. //==========================================================
  2309. #ifndef APP_TIMER_ENABLED
  2310. #define APP_TIMER_ENABLED 1
  2311. #endif
  2312. #if APP_TIMER_ENABLED
  2313. // <o> APP_TIMER_CONFIG_RTC_FREQUENCY - Configure RTC prescaler.
  2314. // <0=> 32768 Hz
  2315. // <1=> 16384 Hz
  2316. // <3=> 8192 Hz
  2317. // <7=> 4096 Hz
  2318. // <15=> 2048 Hz
  2319. // <31=> 1024 Hz
  2320. #ifndef APP_TIMER_CONFIG_RTC_FREQUENCY
  2321. #define APP_TIMER_CONFIG_RTC_FREQUENCY 0
  2322. #endif
  2323. // <o> APP_TIMER_CONFIG_IRQ_PRIORITY - Interrupt priority
  2324. // <i> Priorities 0,2 (nRF51) and 0,1,4,5 (nRF52) are reserved for SoftDevice
  2325. // <0=> 0 (highest)
  2326. // <1=> 1
  2327. // <2=> 2
  2328. // <3=> 3
  2329. // <4=> 4
  2330. // <5=> 5
  2331. // <6=> 6
  2332. // <7=> 7
  2333. #ifndef APP_TIMER_CONFIG_IRQ_PRIORITY
  2334. #define APP_TIMER_CONFIG_IRQ_PRIORITY 7
  2335. #endif
  2336. // <o> APP_TIMER_CONFIG_OP_QUEUE_SIZE - Capacity of timer requests queue.
  2337. // <i> Size of the queue depends on how many timers are used
  2338. // <i> in the system, how often timers are started and overall
  2339. // <i> system latency. If queue size is too small app_timer calls
  2340. // <i> will fail.
  2341. #ifndef APP_TIMER_CONFIG_OP_QUEUE_SIZE
  2342. #define APP_TIMER_CONFIG_OP_QUEUE_SIZE 10
  2343. #endif
  2344. // <q> APP_TIMER_CONFIG_USE_SCHEDULER - Enable scheduling app_timer events to app_scheduler
  2345. #ifndef APP_TIMER_CONFIG_USE_SCHEDULER
  2346. #define APP_TIMER_CONFIG_USE_SCHEDULER 0
  2347. #endif
  2348. // <q> APP_TIMER_WITH_PROFILER - Enable app_timer profiling
  2349. #ifndef APP_TIMER_WITH_PROFILER
  2350. #define APP_TIMER_WITH_PROFILER 0
  2351. #endif
  2352. // <q> APP_TIMER_KEEPS_RTC_ACTIVE - Enable RTC always on
  2353. // <i> If option is enabled RTC is kept running even if there is no active timers.
  2354. // <i> This option can be used when app_timer is used for timestamping.
  2355. #ifndef APP_TIMER_KEEPS_RTC_ACTIVE
  2356. #define APP_TIMER_KEEPS_RTC_ACTIVE 0
  2357. #endif
  2358. // <o> APP_TIMER_CONFIG_SWI_NUMBER - Configure SWI instance used.
  2359. // <0=> 0
  2360. // <1=> 1
  2361. #ifndef APP_TIMER_CONFIG_SWI_NUMBER
  2362. #define APP_TIMER_CONFIG_SWI_NUMBER 0
  2363. #endif
  2364. #endif //APP_TIMER_ENABLED
  2365. // </e>
  2366. // <q> APP_TWI_ENABLED - app_twi - TWI transaction manager
  2367. #ifndef APP_TWI_ENABLED
  2368. #define APP_TWI_ENABLED 0
  2369. #endif
  2370. // <e> APP_UART_ENABLED - app_uart - UART driver
  2371. //==========================================================
  2372. #ifndef APP_UART_ENABLED
  2373. #define APP_UART_ENABLED 1
  2374. #endif
  2375. #if APP_UART_ENABLED
  2376. // <o> APP_UART_DRIVER_INSTANCE - UART instance used
  2377. // <0=> 0
  2378. #ifndef APP_UART_DRIVER_INSTANCE
  2379. #define APP_UART_DRIVER_INSTANCE 0
  2380. #endif
  2381. #endif //APP_UART_ENABLED
  2382. // </e>
  2383. // <q> APP_USBD_CLASS_AUDIO_ENABLED - app_usbd_audio - USB AUDIO class
  2384. #ifndef APP_USBD_CLASS_AUDIO_ENABLED
  2385. #define APP_USBD_CLASS_AUDIO_ENABLED 0
  2386. #endif
  2387. // <q> APP_USBD_CLASS_HID_ENABLED - app_usbd_hid - USB HID class
  2388. #ifndef APP_USBD_CLASS_HID_ENABLED
  2389. #define APP_USBD_CLASS_HID_ENABLED 0
  2390. #endif
  2391. // <q> APP_USBD_HID_GENERIC_ENABLED - app_usbd_hid_generic - USB HID generic
  2392. #ifndef APP_USBD_HID_GENERIC_ENABLED
  2393. #define APP_USBD_HID_GENERIC_ENABLED 0
  2394. #endif
  2395. // <q> APP_USBD_HID_KBD_ENABLED - app_usbd_hid_kbd - USB HID keyboard
  2396. #ifndef APP_USBD_HID_KBD_ENABLED
  2397. #define APP_USBD_HID_KBD_ENABLED 0
  2398. #endif
  2399. // <q> APP_USBD_HID_MOUSE_ENABLED - app_usbd_hid_mouse - USB HID mouse
  2400. #ifndef APP_USBD_HID_MOUSE_ENABLED
  2401. #define APP_USBD_HID_MOUSE_ENABLED 0
  2402. #endif
  2403. // <q> BUTTON_ENABLED - app_button - buttons handling module
  2404. #ifndef BUTTON_ENABLED
  2405. #define BUTTON_ENABLED 1
  2406. #endif
  2407. // <q> CRC16_ENABLED - crc16 - CRC16 calculation routines
  2408. #ifndef CRC16_ENABLED
  2409. #define CRC16_ENABLED 0
  2410. #endif
  2411. // <q> CRC32_ENABLED - crc32 - CRC32 calculation routines
  2412. #ifndef CRC32_ENABLED
  2413. #define CRC32_ENABLED 0
  2414. #endif
  2415. // <q> ECC_ENABLED - ecc - Elliptic Curve Cryptography Library
  2416. #ifndef ECC_ENABLED
  2417. #define ECC_ENABLED 0
  2418. #endif
  2419. // <e> FDS_ENABLED - fds - Flash data storage module
  2420. //==========================================================
  2421. #ifndef FDS_ENABLED
  2422. #define FDS_ENABLED 0
  2423. #endif
  2424. #if FDS_ENABLED
  2425. // <o> FDS_OP_QUEUE_SIZE - Size of the internal queue.
  2426. #ifndef FDS_OP_QUEUE_SIZE
  2427. #define FDS_OP_QUEUE_SIZE 4
  2428. #endif
  2429. // <o> FDS_CHUNK_QUEUE_SIZE - Determines how many @ref fds_record_chunk_t structures can be buffered at any time.
  2430. #ifndef FDS_CHUNK_QUEUE_SIZE
  2431. #define FDS_CHUNK_QUEUE_SIZE 8
  2432. #endif
  2433. // <o> FDS_MAX_USERS - Maximum number of callbacks that can be registered.
  2434. #ifndef FDS_MAX_USERS
  2435. #define FDS_MAX_USERS 8
  2436. #endif
  2437. // <o> FDS_VIRTUAL_PAGES - Number of virtual flash pages to use.
  2438. // <i> One of the virtual pages is reserved by the system for garbage collection.
  2439. // <i> Therefore, the minimum is two virtual pages: one page to store data and
  2440. // <i> one page to be used by the system for garbage collection. The total amount
  2441. // <i> of flash memory that is used by FDS amounts to @ref FDS_VIRTUAL_PAGES
  2442. // <i> @ref FDS_VIRTUAL_PAGE_SIZE * 4 bytes.
  2443. #ifndef FDS_VIRTUAL_PAGES
  2444. #define FDS_VIRTUAL_PAGES 3
  2445. #endif
  2446. // <o> FDS_VIRTUAL_PAGE_SIZE - The size of a virtual page of flash memory, expressed in number of 4-byte words.
  2447. // <i> By default, a virtual page is the same size as a physical page.
  2448. // <i> The size of a virtual page must be a multiple of the size of a physical page.
  2449. // <1024=> 1024
  2450. // <2048=> 2048
  2451. #ifndef FDS_VIRTUAL_PAGE_SIZE
  2452. #define FDS_VIRTUAL_PAGE_SIZE 1024
  2453. #endif
  2454. #endif //FDS_ENABLED
  2455. // </e>
  2456. // <e> FSTORAGE_ENABLED - fstorage - Flash storage module
  2457. //==========================================================
  2458. #ifndef FSTORAGE_ENABLED
  2459. #define FSTORAGE_ENABLED 1
  2460. #endif
  2461. #if FSTORAGE_ENABLED
  2462. // <o> FS_QUEUE_SIZE - Configures the size of the internal queue.
  2463. // <i> Increase this if there are many users, or if it is likely that many
  2464. // <i> operation will be queued at once without waiting for the previous operations
  2465. // <i> to complete. In general, increase the queue size if you frequently receive
  2466. // <i> @ref FS_ERR_QUEUE_FULL errors when calling @ref fs_store or @ref fs_erase.
  2467. #ifndef FS_QUEUE_SIZE
  2468. #define FS_QUEUE_SIZE 4
  2469. #endif
  2470. // <o> FS_OP_MAX_RETRIES - Number attempts to execute an operation if the SoftDevice fails.
  2471. // <i> Increase this value if events return the @ref FS_ERR_OPERATION_TIMEOUT
  2472. // <i> error often. The SoftDevice may fail to schedule flash access due to high BLE activity.
  2473. #ifndef FS_OP_MAX_RETRIES
  2474. #define FS_OP_MAX_RETRIES 3
  2475. #endif
  2476. // <o> FS_MAX_WRITE_SIZE_WORDS - Maximum number of words to be written to flash in a single operation.
  2477. // <i> Tweaking this value can increase the chances of the SoftDevice being
  2478. // <i> able to fit flash operations in between radio activity. This value is bound by the
  2479. // <i> maximum number of words which the SoftDevice can write to flash in a single call to
  2480. // <i> @ref sd_flash_write, which is 256 words for nRF51 ICs and 1024 words for nRF52 ICs.
  2481. #ifndef FS_MAX_WRITE_SIZE_WORDS
  2482. #define FS_MAX_WRITE_SIZE_WORDS 1024
  2483. #endif
  2484. #endif //FSTORAGE_ENABLED
  2485. // </e>
  2486. // <q> HARDFAULT_HANDLER_ENABLED - hardfault_default - HardFault default handler for debugging and release
  2487. #ifndef HARDFAULT_HANDLER_ENABLED
  2488. #define HARDFAULT_HANDLER_ENABLED 0
  2489. #endif
  2490. // <e> HCI_MEM_POOL_ENABLED - hci_mem_pool - memory pool implementation used by HCI
  2491. //==========================================================
  2492. #ifndef HCI_MEM_POOL_ENABLED
  2493. #define HCI_MEM_POOL_ENABLED 0
  2494. #endif
  2495. #if HCI_MEM_POOL_ENABLED
  2496. // <o> HCI_TX_BUF_SIZE - TX buffer size in bytes.
  2497. #ifndef HCI_TX_BUF_SIZE
  2498. #define HCI_TX_BUF_SIZE 600
  2499. #endif
  2500. // <o> HCI_RX_BUF_SIZE - RX buffer size in bytes.
  2501. #ifndef HCI_RX_BUF_SIZE
  2502. #define HCI_RX_BUF_SIZE 600
  2503. #endif
  2504. // <o> HCI_RX_BUF_QUEUE_SIZE - RX buffer queue size.
  2505. #ifndef HCI_RX_BUF_QUEUE_SIZE
  2506. #define HCI_RX_BUF_QUEUE_SIZE 4
  2507. #endif
  2508. #endif //HCI_MEM_POOL_ENABLED
  2509. // </e>
  2510. // <e> HCI_SLIP_ENABLED - hci_slip - SLIP protocol implementation used by HCI
  2511. //==========================================================
  2512. #ifndef HCI_SLIP_ENABLED
  2513. #define HCI_SLIP_ENABLED 0
  2514. #endif
  2515. #if HCI_SLIP_ENABLED
  2516. // <o> HCI_UART_BAUDRATE - Default Baudrate
  2517. // <323584=> 1200 baud
  2518. // <643072=> 2400 baud
  2519. // <1290240=> 4800 baud
  2520. // <2576384=> 9600 baud
  2521. // <3862528=> 14400 baud
  2522. // <5152768=> 19200 baud
  2523. // <7716864=> 28800 baud
  2524. // <10289152=> 38400 baud
  2525. // <15400960=> 57600 baud
  2526. // <20615168=> 76800 baud
  2527. // <30801920=> 115200 baud
  2528. // <61865984=> 230400 baud
  2529. // <67108864=> 250000 baud
  2530. // <121634816=> 460800 baud
  2531. // <251658240=> 921600 baud
  2532. // <268435456=> 57600 baud
  2533. #ifndef HCI_UART_BAUDRATE
  2534. #define HCI_UART_BAUDRATE 30801920
  2535. #endif
  2536. // <o> HCI_UART_FLOW_CONTROL - Hardware Flow Control
  2537. // <0=> Disabled
  2538. // <1=> Enabled
  2539. #ifndef HCI_UART_FLOW_CONTROL
  2540. #define HCI_UART_FLOW_CONTROL 0
  2541. #endif
  2542. // <o> HCI_UART_RX_PIN - UART RX pin
  2543. #ifndef HCI_UART_RX_PIN
  2544. #define HCI_UART_RX_PIN 8
  2545. #endif
  2546. // <o> HCI_UART_TX_PIN - UART TX pin
  2547. #ifndef HCI_UART_TX_PIN
  2548. #define HCI_UART_TX_PIN 6
  2549. #endif
  2550. // <o> HCI_UART_RTS_PIN - UART RTS pin
  2551. #ifndef HCI_UART_RTS_PIN
  2552. #define HCI_UART_RTS_PIN 5
  2553. #endif
  2554. // <o> HCI_UART_CTS_PIN - UART CTS pin
  2555. #ifndef HCI_UART_CTS_PIN
  2556. #define HCI_UART_CTS_PIN 7
  2557. #endif
  2558. #endif //HCI_SLIP_ENABLED
  2559. // </e>
  2560. // <e> HCI_TRANSPORT_ENABLED - hci_transport - HCI transport
  2561. //==========================================================
  2562. #ifndef HCI_TRANSPORT_ENABLED
  2563. #define HCI_TRANSPORT_ENABLED 0
  2564. #endif
  2565. #if HCI_TRANSPORT_ENABLED
  2566. // <o> HCI_MAX_PACKET_SIZE_IN_BITS - Maximum size of a single application packet in bits.
  2567. #ifndef HCI_MAX_PACKET_SIZE_IN_BITS
  2568. #define HCI_MAX_PACKET_SIZE_IN_BITS 8000
  2569. #endif
  2570. #endif //HCI_TRANSPORT_ENABLED
  2571. // </e>
  2572. // <q> LED_SOFTBLINK_ENABLED - led_softblink - led_softblink module
  2573. #ifndef LED_SOFTBLINK_ENABLED
  2574. #define LED_SOFTBLINK_ENABLED 0
  2575. #endif
  2576. // <q> LOW_POWER_PWM_ENABLED - low_power_pwm - low_power_pwm module
  2577. #ifndef LOW_POWER_PWM_ENABLED
  2578. #define LOW_POWER_PWM_ENABLED 0
  2579. #endif
  2580. // <e> MEM_MANAGER_ENABLED - mem_manager - Dynamic memory allocator
  2581. //==========================================================
  2582. #ifndef MEM_MANAGER_ENABLED
  2583. #define MEM_MANAGER_ENABLED 0
  2584. #endif
  2585. #if MEM_MANAGER_ENABLED
  2586. // <o> MEMORY_MANAGER_SMALL_BLOCK_COUNT - Size of each memory blocks identified as 'small' block. <0-255>
  2587. #ifndef MEMORY_MANAGER_SMALL_BLOCK_COUNT
  2588. #define MEMORY_MANAGER_SMALL_BLOCK_COUNT 1
  2589. #endif
  2590. // <o> MEMORY_MANAGER_SMALL_BLOCK_SIZE - Size of each memory blocks identified as 'small' block.
  2591. // <i> Size of each memory blocks identified as 'small' block. Memory block are recommended to be word-sized.
  2592. #ifndef MEMORY_MANAGER_SMALL_BLOCK_SIZE
  2593. #define MEMORY_MANAGER_SMALL_BLOCK_SIZE 32
  2594. #endif
  2595. // <o> MEMORY_MANAGER_MEDIUM_BLOCK_COUNT - Size of each memory blocks identified as 'medium' block. <0-255>
  2596. #ifndef MEMORY_MANAGER_MEDIUM_BLOCK_COUNT
  2597. #define MEMORY_MANAGER_MEDIUM_BLOCK_COUNT 0
  2598. #endif
  2599. // <o> MEMORY_MANAGER_MEDIUM_BLOCK_SIZE - Size of each memory blocks identified as 'medium' block.
  2600. // <i> Size of each memory blocks identified as 'medium' block. Memory block are recommended to be word-sized.
  2601. #ifndef MEMORY_MANAGER_MEDIUM_BLOCK_SIZE
  2602. #define MEMORY_MANAGER_MEDIUM_BLOCK_SIZE 256
  2603. #endif
  2604. // <o> MEMORY_MANAGER_LARGE_BLOCK_COUNT - Size of each memory blocks identified as 'large' block. <0-255>
  2605. #ifndef MEMORY_MANAGER_LARGE_BLOCK_COUNT
  2606. #define MEMORY_MANAGER_LARGE_BLOCK_COUNT 0
  2607. #endif
  2608. // <o> MEMORY_MANAGER_LARGE_BLOCK_SIZE - Size of each memory blocks identified as 'large' block.
  2609. // <i> Size of each memory blocks identified as 'large' block. Memory block are recommended to be word-sized.
  2610. #ifndef MEMORY_MANAGER_LARGE_BLOCK_SIZE
  2611. #define MEMORY_MANAGER_LARGE_BLOCK_SIZE 256
  2612. #endif
  2613. // <o> MEMORY_MANAGER_XLARGE_BLOCK_COUNT - Size of each memory blocks identified as 'extra large' block. <0-255>
  2614. #ifndef MEMORY_MANAGER_XLARGE_BLOCK_COUNT
  2615. #define MEMORY_MANAGER_XLARGE_BLOCK_COUNT 0
  2616. #endif
  2617. // <o> MEMORY_MANAGER_XLARGE_BLOCK_SIZE - Size of each memory blocks identified as 'extra large' block.
  2618. // <i> Size of each memory blocks identified as 'extra large' block. Memory block are recommended to be word-sized.
  2619. #ifndef MEMORY_MANAGER_XLARGE_BLOCK_SIZE
  2620. #define MEMORY_MANAGER_XLARGE_BLOCK_SIZE 1320
  2621. #endif
  2622. // <o> MEMORY_MANAGER_XXLARGE_BLOCK_COUNT - Size of each memory blocks identified as 'extra extra large' block. <0-255>
  2623. #ifndef MEMORY_MANAGER_XXLARGE_BLOCK_COUNT
  2624. #define MEMORY_MANAGER_XXLARGE_BLOCK_COUNT 0
  2625. #endif
  2626. // <o> MEMORY_MANAGER_XXLARGE_BLOCK_SIZE - Size of each memory blocks identified as 'extra extra large' block.
  2627. // <i> Size of each memory blocks identified as 'extra extra large' block. Memory block are recommended to be word-sized.
  2628. #ifndef MEMORY_MANAGER_XXLARGE_BLOCK_SIZE
  2629. #define MEMORY_MANAGER_XXLARGE_BLOCK_SIZE 3444
  2630. #endif
  2631. // <o> MEMORY_MANAGER_XSMALL_BLOCK_COUNT - Size of each memory blocks identified as 'extra small' block. <0-255>
  2632. #ifndef MEMORY_MANAGER_XSMALL_BLOCK_COUNT
  2633. #define MEMORY_MANAGER_XSMALL_BLOCK_COUNT 0
  2634. #endif
  2635. // <o> MEMORY_MANAGER_XSMALL_BLOCK_SIZE - Size of each memory blocks identified as 'extra small' block.
  2636. // <i> Size of each memory blocks identified as 'extra large' block. Memory block are recommended to be word-sized.
  2637. #ifndef MEMORY_MANAGER_XSMALL_BLOCK_SIZE
  2638. #define MEMORY_MANAGER_XSMALL_BLOCK_SIZE 64
  2639. #endif
  2640. // <o> MEMORY_MANAGER_XXSMALL_BLOCK_COUNT - Size of each memory blocks identified as 'extra extra small' block. <0-255>
  2641. #ifndef MEMORY_MANAGER_XXSMALL_BLOCK_COUNT
  2642. #define MEMORY_MANAGER_XXSMALL_BLOCK_COUNT 0
  2643. #endif
  2644. // <o> MEMORY_MANAGER_XXSMALL_BLOCK_SIZE - Size of each memory blocks identified as 'extra extra small' block.
  2645. // <i> Size of each memory blocks identified as 'extra extra small' block. Memory block are recommended to be word-sized.
  2646. #ifndef MEMORY_MANAGER_XXSMALL_BLOCK_SIZE
  2647. #define MEMORY_MANAGER_XXSMALL_BLOCK_SIZE 32
  2648. #endif
  2649. // <q> MEM_MANAGER_ENABLE_LOGS - Enable debug trace in the module.
  2650. #ifndef MEM_MANAGER_ENABLE_LOGS
  2651. #define MEM_MANAGER_ENABLE_LOGS 0
  2652. #endif
  2653. // <q> MEM_MANAGER_DISABLE_API_PARAM_CHECK - Disable API parameter checks in the module.
  2654. #ifndef MEM_MANAGER_DISABLE_API_PARAM_CHECK
  2655. #define MEM_MANAGER_DISABLE_API_PARAM_CHECK 0
  2656. #endif
  2657. #endif //MEM_MANAGER_ENABLED
  2658. // </e>
  2659. // <e> NRF_CSENSE_ENABLED - nrf_csense - Capacitive sensor module
  2660. //==========================================================
  2661. #ifndef NRF_CSENSE_ENABLED
  2662. #define NRF_CSENSE_ENABLED 0
  2663. #endif
  2664. #if NRF_CSENSE_ENABLED
  2665. // <o> NRF_CSENSE_PAD_HYSTERESIS - Minimum value of change required to determine that a pad was touched.
  2666. #ifndef NRF_CSENSE_PAD_HYSTERESIS
  2667. #define NRF_CSENSE_PAD_HYSTERESIS 15
  2668. #endif
  2669. // <o> NRF_CSENSE_PAD_DEVIATION - Minimum value measured on a pad required to take it into account while calculating the step.
  2670. #ifndef NRF_CSENSE_PAD_DEVIATION
  2671. #define NRF_CSENSE_PAD_DEVIATION 70
  2672. #endif
  2673. // <o> NRF_CSENSE_MIN_PAD_VALUE - Minimum normalized value on a pad required to take its value into account.
  2674. #ifndef NRF_CSENSE_MIN_PAD_VALUE
  2675. #define NRF_CSENSE_MIN_PAD_VALUE 20
  2676. #endif
  2677. // <o> NRF_CSENSE_MAX_PADS_NUMBER - Maximum number of pads used for one instance.
  2678. #ifndef NRF_CSENSE_MAX_PADS_NUMBER
  2679. #define NRF_CSENSE_MAX_PADS_NUMBER 20
  2680. #endif
  2681. // <o> NRF_CSENSE_MAX_VALUE - Maximum normalized value obtained from measurement.
  2682. #ifndef NRF_CSENSE_MAX_VALUE
  2683. #define NRF_CSENSE_MAX_VALUE 1000
  2684. #endif
  2685. // <o> NRF_CSENSE_OUTPUT_PIN - Output pin used by the low-level module.
  2686. // <i> This is used when capacitive sensor does not use COMP.
  2687. #ifndef NRF_CSENSE_OUTPUT_PIN
  2688. #define NRF_CSENSE_OUTPUT_PIN 26
  2689. #endif
  2690. #endif //NRF_CSENSE_ENABLED
  2691. // </e>
  2692. // <e> NRF_DRV_CSENSE_ENABLED - nrf_drv_csense - Capacitive sensor low-level module
  2693. //==========================================================
  2694. #ifndef NRF_DRV_CSENSE_ENABLED
  2695. #define NRF_DRV_CSENSE_ENABLED 0
  2696. #endif
  2697. #if NRF_DRV_CSENSE_ENABLED
  2698. // <e> USE_COMP - Use the comparator to implement the capacitive sensor driver.
  2699. // <i> Due to Anomaly 84, COMP I_SOURCE is not functional. It has too high a varation.
  2700. //==========================================================
  2701. #ifndef USE_COMP
  2702. #define USE_COMP 0
  2703. #endif
  2704. #if USE_COMP
  2705. // <o> TIMER0_FOR_CSENSE - First TIMER instance used by the driver (not used on nRF51).
  2706. #ifndef TIMER0_FOR_CSENSE
  2707. #define TIMER0_FOR_CSENSE 1
  2708. #endif
  2709. // <o> TIMER1_FOR_CSENSE - Second TIMER instance used by the driver (not used on nRF51).
  2710. #ifndef TIMER1_FOR_CSENSE
  2711. #define TIMER1_FOR_CSENSE 2
  2712. #endif
  2713. // <o> MEASUREMENT_PERIOD - Single measurement period.
  2714. // <i> Time of a single measurement can be calculated as
  2715. // <i> T = (1/2)*MEASUREMENT_PERIOD*(1/f_OSC) where f_OSC = I_SOURCE / (2C*(VUP-VDOWN) ).
  2716. // <i> I_SOURCE, VUP, and VDOWN are values used to initialize COMP and C is the capacitance of the used pad.
  2717. #ifndef MEASUREMENT_PERIOD
  2718. #define MEASUREMENT_PERIOD 20
  2719. #endif
  2720. #endif //USE_COMP
  2721. // </e>
  2722. #endif //NRF_DRV_CSENSE_ENABLED
  2723. // </e>
  2724. // <q> NRF_QUEUE_ENABLED - nrf_queue - Queue module
  2725. #ifndef NRF_QUEUE_ENABLED
  2726. #define NRF_QUEUE_ENABLED 0
  2727. #endif
  2728. // <q> NRF_STRERROR_ENABLED - nrf_strerror - Library for converting error code to string.
  2729. #ifndef NRF_STRERROR_ENABLED
  2730. #define NRF_STRERROR_ENABLED 1
  2731. #endif
  2732. // <q> RETARGET_ENABLED - retarget - Retargeting stdio functions
  2733. #ifndef RETARGET_ENABLED
  2734. #define RETARGET_ENABLED 1
  2735. #endif
  2736. // <q> SLIP_ENABLED - slip - SLIP encoding and decoding
  2737. #ifndef SLIP_ENABLED
  2738. #define SLIP_ENABLED 0
  2739. #endif
  2740. // <h> app_usbd_cdc_acm - USB CDC ACM class
  2741. //==========================================================
  2742. // <q> APP_USBD_CLASS_CDC_ACM_ENABLED - Enabling USBD CDC ACM Class library
  2743. #ifndef APP_USBD_CLASS_CDC_ACM_ENABLED
  2744. #define APP_USBD_CLASS_CDC_ACM_ENABLED 0
  2745. #endif
  2746. // <q> APP_USBD_CDC_ACM_LOG_ENABLED - Enables logging in the module.
  2747. #ifndef APP_USBD_CDC_ACM_LOG_ENABLED
  2748. #define APP_USBD_CDC_ACM_LOG_ENABLED 0
  2749. #endif
  2750. // </h>
  2751. //==========================================================
  2752. // <h> app_usbd_msc - USB MSC class
  2753. //==========================================================
  2754. // <q> APP_USBD_CLASS_MSC_ENABLED - Enabling USBD MSC Class library
  2755. #ifndef APP_USBD_CLASS_MSC_ENABLED
  2756. #define APP_USBD_CLASS_MSC_ENABLED 0
  2757. #endif
  2758. // <q> APP_USBD_MSC_CLASS_LOG_ENABLED - Enables logging in the module.
  2759. #ifndef APP_USBD_MSC_CLASS_LOG_ENABLED
  2760. #define APP_USBD_MSC_CLASS_LOG_ENABLED 0
  2761. #endif
  2762. // </h>
  2763. //==========================================================
  2764. // </h>
  2765. //==========================================================
  2766. // <h> nRF_Log
  2767. //==========================================================
  2768. // <e> NRF_LOG_ENABLED - nrf_log - Logging
  2769. //==========================================================
  2770. #ifndef NRF_LOG_ENABLED
  2771. #define NRF_LOG_ENABLED 0
  2772. #endif
  2773. #if NRF_LOG_ENABLED
  2774. // <e> NRF_LOG_USES_COLORS - If enabled then ANSI escape code for colors is prefixed to every string
  2775. //==========================================================
  2776. #ifndef NRF_LOG_USES_COLORS
  2777. #define NRF_LOG_USES_COLORS 0
  2778. #endif
  2779. #if NRF_LOG_USES_COLORS
  2780. // <o> NRF_LOG_COLOR_DEFAULT - ANSI escape code prefix.
  2781. // <0=> Default
  2782. // <1=> Black
  2783. // <2=> Red
  2784. // <3=> Green
  2785. // <4=> Yellow
  2786. // <5=> Blue
  2787. // <6=> Magenta
  2788. // <7=> Cyan
  2789. // <8=> White
  2790. #ifndef NRF_LOG_COLOR_DEFAULT
  2791. #define NRF_LOG_COLOR_DEFAULT 0
  2792. #endif
  2793. // <o> NRF_LOG_ERROR_COLOR - ANSI escape code prefix.
  2794. // <0=> Default
  2795. // <1=> Black
  2796. // <2=> Red
  2797. // <3=> Green
  2798. // <4=> Yellow
  2799. // <5=> Blue
  2800. // <6=> Magenta
  2801. // <7=> Cyan
  2802. // <8=> White
  2803. #ifndef NRF_LOG_ERROR_COLOR
  2804. #define NRF_LOG_ERROR_COLOR 0
  2805. #endif
  2806. // <o> NRF_LOG_WARNING_COLOR - ANSI escape code prefix.
  2807. // <0=> Default
  2808. // <1=> Black
  2809. // <2=> Red
  2810. // <3=> Green
  2811. // <4=> Yellow
  2812. // <5=> Blue
  2813. // <6=> Magenta
  2814. // <7=> Cyan
  2815. // <8=> White
  2816. #ifndef NRF_LOG_WARNING_COLOR
  2817. #define NRF_LOG_WARNING_COLOR 0
  2818. #endif
  2819. #endif //NRF_LOG_USES_COLORS
  2820. // </e>
  2821. // <o> NRF_LOG_DEFAULT_LEVEL - Default Severity level
  2822. // <0=> Off
  2823. // <1=> Error
  2824. // <2=> Warning
  2825. // <3=> Info
  2826. // <4=> Debug
  2827. #ifndef NRF_LOG_DEFAULT_LEVEL
  2828. #define NRF_LOG_DEFAULT_LEVEL 3
  2829. #endif
  2830. // <e> NRF_LOG_DEFERRED - Enable deffered logger.
  2831. // <i> Log data is buffered and can be processed in idle.
  2832. //==========================================================
  2833. #ifndef NRF_LOG_DEFERRED
  2834. #define NRF_LOG_DEFERRED 0
  2835. #endif
  2836. #if NRF_LOG_DEFERRED
  2837. // <o> NRF_LOG_DEFERRED_BUFSIZE - Size of the buffer for logs in words.
  2838. // <i> Must be power of 2
  2839. #ifndef NRF_LOG_DEFERRED_BUFSIZE
  2840. #define NRF_LOG_DEFERRED_BUFSIZE 256
  2841. #endif
  2842. #endif //NRF_LOG_DEFERRED
  2843. // </e>
  2844. // <q> NRF_LOG_USES_TIMESTAMP - Enable timestamping
  2845. // <i> Function for getting the timestamp is provided by the user
  2846. #ifndef NRF_LOG_USES_TIMESTAMP
  2847. #define NRF_LOG_USES_TIMESTAMP 0
  2848. #endif
  2849. #endif //NRF_LOG_ENABLED
  2850. // </e>
  2851. // <h> nrf_log_backend - Logging sink
  2852. //==========================================================
  2853. // <o> NRF_LOG_BACKEND_MAX_STRING_LENGTH - Buffer for storing single output string
  2854. // <i> Logger backend RAM usage is determined by this value.
  2855. #ifndef NRF_LOG_BACKEND_MAX_STRING_LENGTH
  2856. #define NRF_LOG_BACKEND_MAX_STRING_LENGTH 256
  2857. #endif
  2858. // <o> NRF_LOG_TIMESTAMP_DIGITS - Number of digits for timestamp
  2859. // <i> If higher resolution timestamp source is used it might be needed to increase that
  2860. #ifndef NRF_LOG_TIMESTAMP_DIGITS
  2861. #define NRF_LOG_TIMESTAMP_DIGITS 8
  2862. #endif
  2863. // <e> NRF_LOG_BACKEND_SERIAL_USES_UART - If enabled data is printed over UART
  2864. //==========================================================
  2865. #ifndef NRF_LOG_BACKEND_SERIAL_USES_UART
  2866. #define NRF_LOG_BACKEND_SERIAL_USES_UART 0
  2867. #endif
  2868. #if NRF_LOG_BACKEND_SERIAL_USES_UART
  2869. // <o> NRF_LOG_BACKEND_SERIAL_UART_BAUDRATE - Default Baudrate
  2870. // <323584=> 1200 baud
  2871. // <643072=> 2400 baud
  2872. // <1290240=> 4800 baud
  2873. // <2576384=> 9600 baud
  2874. // <3862528=> 14400 baud
  2875. // <5152768=> 19200 baud
  2876. // <7716864=> 28800 baud
  2877. // <10289152=> 38400 baud
  2878. // <15400960=> 57600 baud
  2879. // <20615168=> 76800 baud
  2880. // <30801920=> 115200 baud
  2881. // <61865984=> 230400 baud
  2882. // <67108864=> 250000 baud
  2883. // <121634816=> 460800 baud
  2884. // <251658240=> 921600 baud
  2885. // <268435456=> 57600 baud
  2886. #ifndef NRF_LOG_BACKEND_SERIAL_UART_BAUDRATE
  2887. #define NRF_LOG_BACKEND_SERIAL_UART_BAUDRATE 30801920
  2888. #endif
  2889. // <o> NRF_LOG_BACKEND_SERIAL_UART_TX_PIN - UART TX pin
  2890. #ifndef NRF_LOG_BACKEND_SERIAL_UART_TX_PIN
  2891. #define NRF_LOG_BACKEND_SERIAL_UART_TX_PIN 4
  2892. #endif
  2893. // <o> NRF_LOG_BACKEND_SERIAL_UART_RX_PIN - UART RX pin
  2894. #ifndef NRF_LOG_BACKEND_SERIAL_UART_RX_PIN
  2895. #define NRF_LOG_BACKEND_SERIAL_UART_RX_PIN 3
  2896. #endif
  2897. // <o> NRF_LOG_BACKEND_SERIAL_UART_RTS_PIN - UART RTS pin
  2898. #ifndef NRF_LOG_BACKEND_SERIAL_UART_RTS_PIN
  2899. #define NRF_LOG_BACKEND_SERIAL_UART_RTS_PIN 5
  2900. #endif
  2901. // <o> NRF_LOG_BACKEND_SERIAL_UART_CTS_PIN - UART CTS pin
  2902. #ifndef NRF_LOG_BACKEND_SERIAL_UART_CTS_PIN
  2903. #define NRF_LOG_BACKEND_SERIAL_UART_CTS_PIN 7
  2904. #endif
  2905. // <o> NRF_LOG_BACKEND_SERIAL_UART_FLOW_CONTROL - Hardware Flow Control
  2906. // <0=> Disabled
  2907. // <1=> Enabled
  2908. #ifndef NRF_LOG_BACKEND_SERIAL_UART_FLOW_CONTROL
  2909. #define NRF_LOG_BACKEND_SERIAL_UART_FLOW_CONTROL 0
  2910. #endif
  2911. // <o> NRF_LOG_BACKEND_UART_INSTANCE - UART instance used
  2912. // <0=> 0
  2913. #ifndef NRF_LOG_BACKEND_UART_INSTANCE
  2914. #define NRF_LOG_BACKEND_UART_INSTANCE 0
  2915. #endif
  2916. #endif //NRF_LOG_BACKEND_SERIAL_USES_UART
  2917. // </e>
  2918. // <e> NRF_LOG_BACKEND_SERIAL_USES_RTT - If enabled data is printed using RTT
  2919. //==========================================================
  2920. #ifndef NRF_LOG_BACKEND_SERIAL_USES_RTT
  2921. #define NRF_LOG_BACKEND_SERIAL_USES_RTT 0
  2922. #endif
  2923. #if NRF_LOG_BACKEND_SERIAL_USES_RTT
  2924. // <o> NRF_LOG_BACKEND_RTT_OUTPUT_BUFFER_SIZE - RTT output buffer size.
  2925. // <i> Should be equal or bigger than \ref NRF_LOG_BACKEND_MAX_STRING_LENGTH.
  2926. // <i> This value is used in Segger RTT configuration to set the buffer size
  2927. // <i> if it is bigger than default RTT buffer size.
  2928. #ifndef NRF_LOG_BACKEND_RTT_OUTPUT_BUFFER_SIZE
  2929. #define NRF_LOG_BACKEND_RTT_OUTPUT_BUFFER_SIZE 512
  2930. #endif
  2931. #endif //NRF_LOG_BACKEND_SERIAL_USES_RTT
  2932. // </e>
  2933. // </h>
  2934. //==========================================================
  2935. // </h>
  2936. //==========================================================
  2937. // <h> nRF_Segger_RTT
  2938. //==========================================================
  2939. // <h> segger_rtt - SEGGER RTT
  2940. //==========================================================
  2941. // <o> SEGGER_RTT_CONFIG_BUFFER_SIZE_UP - Size of upstream buffer.
  2942. // <i> Note that either @ref NRF_LOG_BACKEND_RTT_OUTPUT_BUFFER_SIZE
  2943. // <i> or this value is actually used. It depends on which one is bigger.
  2944. #ifndef SEGGER_RTT_CONFIG_BUFFER_SIZE_UP
  2945. #define SEGGER_RTT_CONFIG_BUFFER_SIZE_UP 64
  2946. #endif
  2947. // <o> SEGGER_RTT_CONFIG_MAX_NUM_UP_BUFFERS - Size of upstream buffer.
  2948. #ifndef SEGGER_RTT_CONFIG_MAX_NUM_UP_BUFFERS
  2949. #define SEGGER_RTT_CONFIG_MAX_NUM_UP_BUFFERS 2
  2950. #endif
  2951. // <o> SEGGER_RTT_CONFIG_BUFFER_SIZE_DOWN - Size of upstream buffer.
  2952. #ifndef SEGGER_RTT_CONFIG_BUFFER_SIZE_DOWN
  2953. #define SEGGER_RTT_CONFIG_BUFFER_SIZE_DOWN 16
  2954. #endif
  2955. // <o> SEGGER_RTT_CONFIG_MAX_NUM_DOWN_BUFFERS - Size of upstream buffer.
  2956. #ifndef SEGGER_RTT_CONFIG_MAX_NUM_DOWN_BUFFERS
  2957. #define SEGGER_RTT_CONFIG_MAX_NUM_DOWN_BUFFERS 2
  2958. #endif
  2959. // <o> SEGGER_RTT_CONFIG_DEFAULT_MODE - RTT behavior if the buffer is full.
  2960. // <i> The following modes are supported:
  2961. // <i> - SKIP - Do not block, output nothing.
  2962. // <i> - TRIM - Do not block, output as much as fits.
  2963. // <i> - BLOCK - Wait until there is space in the buffer.
  2964. // <0=> SKIP
  2965. // <1=> TRIM
  2966. // <2=> BLOCK_IF_FIFO_FULL
  2967. #ifndef SEGGER_RTT_CONFIG_DEFAULT_MODE
  2968. #define SEGGER_RTT_CONFIG_DEFAULT_MODE 0
  2969. #endif
  2970. // </h>
  2971. //==========================================================
  2972. // </h>
  2973. //==========================================================
  2974. // <<< end of configuration section >>>
  2975. #endif //SDK_CONFIG_H