RTE_Device.h 85 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356
  1. /* --------------------------------------------------------------------------
  2. * Copyright (c) 2013-2016 ARM Limited. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Licensed under the Apache License, Version 2.0 (the License); you may
  7. * not use this file except in compliance with the License.
  8. * You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing, software
  13. * distributed under the License is distributed on an AS IS BASIS, WITHOUT
  14. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. * See the License for the specific language governing permissions and
  16. * limitations under the License.
  17. *
  18. * $Date: 02. March 2016
  19. * $Revision: V2.2.0
  20. *
  21. * Project: RTE Device Configuration for NXP LPC18xx
  22. * -------------------------------------------------------------------------- */
  23. //-------- <<< Use Configuration Wizard in Context Menu >>> --------------------
  24. #ifndef __RTE_DEVICE_H
  25. #define __RTE_DEVICE_H
  26. // <e> USB0 Controller [Driver_USBD0 and Driver_USBH0]
  27. // <i> Configuration settings for Driver_USBD0 in component ::Drivers:USB Device
  28. // <i> Configuration settings for Driver_USBH0 in component ::Drivers:USB Host
  29. #define RTE_USB_USB0 0
  30. // <h> Pin Configuration
  31. // <o> USB0_PPWR (Host) <0=>Not used <1=>P1_7 <2=>P2_0 <3=>P2_3 <4=>P6_3
  32. // <i> VBUS drive signal (towards external charge pump or power management unit).
  33. #define RTE_USB0_PPWR_ID 1
  34. #if (RTE_USB0_PPWR_ID == 0)
  35. #define RTE_USB0_PPWR_PIN_EN 0
  36. #elif (RTE_USB0_PPWR_ID == 1)
  37. #define RTE_USB0_PPWR_PORT 1
  38. #define RTE_USB0_PPWR_BIT 7
  39. #define RTE_USB0_PPWR_FUNC 4
  40. #elif (RTE_USB0_PPWR_ID == 2)
  41. #define RTE_USB0_PPWR_PORT 2
  42. #define RTE_USB0_PPWR_BIT 0
  43. #define RTE_USB0_PPWR_FUNC 3
  44. #elif (RTE_USB0_PPWR_ID == 3)
  45. #define RTE_USB0_PPWR_PORT 2
  46. #define RTE_USB0_PPWR_BIT 3
  47. #define RTE_USB0_PPWR_FUNC 7
  48. #elif (RTE_USB0_PPWR_ID == 4)
  49. #define RTE_USB0_PPWR_PORT 6
  50. #define RTE_USB0_PPWR_BIT 3
  51. #define RTE_USB0_PPWR_FUNC 1
  52. #else
  53. #error "Invalid RTE_USB0_PPWR Pin Configuration!"
  54. #endif
  55. #ifndef RTE_USB0_PPWR_PIN_EN
  56. #define RTE_USB0_PPWR_PIN_EN 1
  57. #endif
  58. // <o> USB0_PWR_FAULT (Host) <0=>Not used <1=>P1_5 <2=>P2_1 <3=>P2_4 <4=>P6_6 <5=>P8_0
  59. // <i> Port power fault signal indicating overcurrent condition.
  60. // <i> This signal monitors over-current on the USB bus
  61. // (external circuitry required to detect over-current condition).
  62. #define RTE_USB0_PWR_FAULT_ID 1
  63. #if (RTE_USB0_PWR_FAULT_ID == 0)
  64. #define RTE_USB0_PWR_FAULT_PIN_EN 0
  65. #elif (RTE_USB0_PWR_FAULT_ID == 1)
  66. #define RTE_USB0_PWR_FAULT_PORT 1
  67. #define RTE_USB0_PWR_FAULT_BIT 5
  68. #define RTE_USB0_PWR_FAULT_FUNC 4
  69. #elif (RTE_USB0_PWR_FAULT_ID == 2)
  70. #define RTE_USB0_PWR_FAULT_PORT 2
  71. #define RTE_USB0_PWR_FAULT_BIT 1
  72. #define RTE_USB0_PWR_FAULT_FUNC 3
  73. #elif (RTE_USB0_PWR_FAULT_ID == 3)
  74. #define RTE_USB0_PWR_FAULT_PORT 2
  75. #define RTE_USB0_PWR_FAULT_BIT 4
  76. #define RTE_USB0_PWR_FAULT_FUNC 7
  77. #elif (RTE_USB0_PWR_FAULT_ID == 4)
  78. #define RTE_USB0_PWR_FAULT_PORT 6
  79. #define RTE_USB0_PWR_FAULT_BIT 6
  80. #define RTE_USB0_PWR_FAULT_FUNC 3
  81. #elif (RTE_USB0_PWR_FAULT_ID == 5)
  82. #define RTE_USB0_PWR_FAULT_PORT 8
  83. #define RTE_USB0_PWR_FAULT_BIT 0
  84. #define RTE_USB0_PWR_FAULT_FUNC 1
  85. #else
  86. #error "Invalid RTE_USB0_PWR_FAULT Pin Configuration!"
  87. #endif
  88. #ifndef RTE_USB0_PWR_FAULT_PIN_EN
  89. #define RTE_USB0_PWR_FAULT_PIN_EN 1
  90. #endif
  91. // <o> USB0_IND0 <0=>Not used <1=>P1_4 <2=>P2_5 <3=>P2_6 <4=>P6_8 <5=>P8_2
  92. // <i> USB0 port indicator LED control output 0
  93. #define RTE_USB0_IND0_ID 1
  94. #if (RTE_USB0_IND0_ID == 0)
  95. #define RTE_USB0_IND0_PIN_EN 0
  96. #elif (RTE_USB0_IND0_ID == 1)
  97. #define RTE_USB0_IND0_PORT 1
  98. #define RTE_USB0_IND0_BIT 4
  99. #define RTE_USB0_IND0_FUNC 4
  100. #elif (RTE_USB0_IND0_ID == 2)
  101. #define RTE_USB0_IND0_PORT 2
  102. #define RTE_USB0_IND0_BIT 5
  103. #define RTE_USB0_IND0_FUNC 7
  104. #elif (RTE_USB0_IND0_ID == 3)
  105. #define RTE_USB0_IND0_PORT 2
  106. #define RTE_USB0_IND0_BIT 6
  107. #define RTE_USB0_IND0_FUNC 3
  108. #elif (RTE_USB0_IND0_ID == 4)
  109. #define RTE_USB0_IND0_PORT 6
  110. #define RTE_USB0_IND0_BIT 8
  111. #define RTE_USB0_IND0_FUNC 3
  112. #elif (RTE_USB0_IND0_ID == 5)
  113. #define RTE_USB0_IND0_PORT 8
  114. #define RTE_USB0_IND0_BIT 2
  115. #define RTE_USB0_IND0_FUNC 1
  116. #else
  117. #error "Invalid RTE_USB0_IND0 Pin Configuration!"
  118. #endif
  119. #ifndef RTE_USB0_IND0_PIN_EN
  120. #define RTE_USB0_IND0_PIN_EN 1
  121. #endif
  122. // <o> USB0_IND1 <0=>Not used <1=>P1_3 <2=>P2_2 <3=>P6_7 <4=>P8_1
  123. // <i> USB0 port indicator LED control output 1
  124. #define RTE_USB0_IND1_ID 1
  125. #if (RTE_USB0_IND1_ID == 0)
  126. #define RTE_USB0_IND1_PIN_EN 0
  127. #elif (RTE_USB0_IND1_ID == 1)
  128. #define RTE_USB0_IND1_PORT 1
  129. #define RTE_USB0_IND1_BIT 3
  130. #define RTE_USB0_IND1_FUNC 4
  131. #elif (RTE_USB0_IND1_ID == 2)
  132. #define RTE_USB0_IND1_PORT 2
  133. #define RTE_USB0_IND1_BIT 2
  134. #define RTE_USB0_IND1_FUNC 3
  135. #elif (RTE_USB0_IND1_ID == 3)
  136. #define RTE_USB0_IND1_PORT 6
  137. #define RTE_USB0_IND1_BIT 7
  138. #define RTE_USB0_IND1_FUNC 3
  139. #elif (RTE_USB0_IND1_ID == 4)
  140. #define RTE_USB0_IND1_PORT 8
  141. #define RTE_USB0_IND1_BIT 1
  142. #define RTE_USB0_IND1_FUNC 1
  143. #else
  144. #error "Invalid RTE_USB0_IND1 Pin Configuration!"
  145. #endif
  146. #ifndef RTE_USB0_IND1_PIN_EN
  147. #define RTE_USB0_IND1_PIN_EN 1
  148. #endif
  149. // </h> Pin Configuration
  150. // <h> Device [Driver_USBD0]
  151. // <i> Configuration settings for Driver_USBD0 in component ::Drivers:USB Device
  152. // <o.0> High-speed
  153. // <i> Enable high-speed functionality
  154. #define RTE_USB_USB0_HS_EN 0
  155. // </h> Device [Driver_USBD0]
  156. // </e> USB0 Controller [Driver_USBD0 and Driver_USBH0]
  157. // <e> USB1 Controller [Driver_USBD1 and Driver_USBH1]
  158. // <i> Configuration settings for Driver_USBD1 in component ::Drivers:USB Device
  159. // <i> Configuration settings for Driver_USBH1 in component ::Drivers:USB Host
  160. #define RTE_USB_USB1 0
  161. // <h> Pin Configuration
  162. // <o> USB1_PPWR (Host) <0=>Not used <1=>P9_5
  163. // <i> VBUS drive signal (towards external charge pump or power management unit).
  164. #define RTE_USB1_PPWR_ID 1
  165. #if (RTE_USB1_PPWR_ID == 0)
  166. #define RTE_USB1_PPWR_PIN_EN 0
  167. #elif (RTE_USB1_PPWR_ID == 1)
  168. #define RTE_USB1_PPWR_PORT 9
  169. #define RTE_USB1_PPWR_BIT 5
  170. #define RTE_USB1_PPWR_FUNC 2
  171. #else
  172. #error "Invalid RTE_USB1_PPWR Pin Configuration!"
  173. #endif
  174. #ifndef RTE_USB1_PPWR_PIN_EN
  175. #define RTE_USB1_PPWR_PIN_EN 1
  176. #endif
  177. // <o> USB1_PWR_FAULT (Host) <0=>Not used <1=>P9_6
  178. // <i> Port power fault signal indicating overcurrent condition.
  179. // <i> This signal monitors over-current on the USB bus
  180. // (external circuitry required to detect over-current condition).
  181. #define RTE_USB1_PWR_FAULT_ID 1
  182. #if (RTE_USB1_PWR_FAULT_ID == 0)
  183. #define RTE_USB1_PWR_FAULT_PIN_EN 0
  184. #elif (RTE_USB1_PWR_FAULT_ID == 1)
  185. #define RTE_USB1_PWR_FAULT_PORT 9
  186. #define RTE_USB1_PWR_FAULT_BIT 6
  187. #define RTE_USB1_PWR_FAULT_FUNC 2
  188. #else
  189. #error "Invalid RTE_USB1_PWR_FAULT Pin Configuration!"
  190. #endif
  191. #ifndef RTE_USB1_PWR_FAULT_PIN_EN
  192. #define RTE_USB1_PWR_FAULT_PIN_EN 1
  193. #endif
  194. // <o> USB1_IND0 <0=>Not used <1=>P3_2 <2=>P9_4
  195. // <i> USB1 port indicator LED control output 0
  196. #define RTE_USB1_IND0_ID 1
  197. #if (RTE_USB1_IND0_ID == 0)
  198. #define RTE_USB1_IND0_PIN_EN 0
  199. #elif (RTE_USB1_IND0_ID == 1)
  200. #define RTE_USB1_IND0_PORT 3
  201. #define RTE_USB1_IND0_BIT 2
  202. #define RTE_USB1_IND0_FUNC 3
  203. #elif (RTE_USB1_IND0_ID == 2)
  204. #define RTE_USB1_IND0_PORT 9
  205. #define RTE_USB1_IND0_BIT 4
  206. #define RTE_USB1_IND0_FUNC 2
  207. #else
  208. #error "Invalid RTE_USB1_IND0 Pin Configuration!"
  209. #endif
  210. #ifndef RTE_USB1_IND0_PIN_EN
  211. #define RTE_USB1_IND0_PIN_EN 1
  212. #endif
  213. // <o> USB1_IND1 <0=>Not used <1=>P3_1 <2=>P9_3
  214. // <i> USB1 port indicator LED control output 1
  215. #define RTE_USB1_IND1_ID 1
  216. #if (RTE_USB1_IND1_ID == 0)
  217. #define RTE_USB1_IND1_PIN_EN 0
  218. #elif (RTE_USB1_IND1_ID == 1)
  219. #define RTE_USB1_IND1_PORT 3
  220. #define RTE_USB1_IND1_BIT 1
  221. #define RTE_USB1_IND1_FUNC 3
  222. #elif (RTE_USB1_IND1_ID == 2)
  223. #define RTE_USB1_IND1_PORT 9
  224. #define RTE_USB1_IND1_BIT 3
  225. #define RTE_USB1_IND1_FUNC 2
  226. #else
  227. #error "Invalid RTE_USB1_IND1 Pin Configuration!"
  228. #endif
  229. #ifndef RTE_USB1_IND1_PIN_EN
  230. #define RTE_USB1_IND1_PIN_EN 1
  231. #endif
  232. // <e> On-chip full-speed PHY
  233. #define RTE_USB_USB1_FS_PHY_EN 1
  234. // <o> USB1_VBUS (Device) <0=>Not used <1=>P2_5
  235. // <i> Monitors the presence of USB1 bus power.
  236. #define RTE_USB1_VBUS_ID 1
  237. #if (RTE_USB1_VBUS_ID == 0)
  238. #define RTE_USB1_VBUS_PIN_EN 0
  239. #elif (RTE_USB1_VBUS_ID == 1)
  240. #define RTE_USB1_VBUS_PORT 2
  241. #define RTE_USB1_VBUS_BIT 5
  242. #define RTE_USB1_VBUS_FUNC 2
  243. #else
  244. #error "Invalid RTE_USB1_VBUS Pin Configuration!"
  245. #endif
  246. #ifndef RTE_USB1_VBUS_PIN_EN
  247. #define RTE_USB1_VBUS_PIN_EN 1
  248. #endif
  249. // </e> On-chip full-speed PHY
  250. // <e> External high-speed ULPI PHY (UTMI+ Low Pin Interface)
  251. #define RTE_USB_USB1_HS_PHY_EN 0
  252. // <o> USB1_ULPI_CLK <0=>P8_8 <1=>PC_0
  253. // <i> USB1 ULPI link CLK signal.
  254. // <i> 60 MHz clock generated by the PHY.
  255. #define RTE_USB1_ULPI_CLK_ID 0
  256. #if (RTE_USB1_ULPI_CLK_ID == 0)
  257. #define RTE_USB1_ULPI_CLK_PORT 8
  258. #define RTE_USB1_ULPI_CLK_BIT 8
  259. #define RTE_USB1_ULPI_CLK_FUNC 1
  260. #elif (RTE_USB1_ULPI_CLK_ID == 1)
  261. #define RTE_USB1_ULPI_CLK_PORT 0xC
  262. #define RTE_USB1_ULPI_CLK_BIT 0
  263. #define RTE_USB1_ULPI_CLK_FUNC 1
  264. #else
  265. #error "Invalid RTE_USB1_ULPI_CLK Pin Configuration!"
  266. #endif
  267. // <o> USB1_ULPI_DIR <0=>PB_1 <1=>PC_11
  268. // <i> USB1 ULPI link DIR signal.
  269. // <i> Controls the ULPI data line direction.
  270. #define RTE_USB1_ULPI_DIR_ID 0
  271. #if (RTE_USB1_ULPI_DIR_ID == 0)
  272. #define RTE_USB1_ULPI_DIR_PORT 0xB
  273. #define RTE_USB1_ULPI_DIR_BIT 1
  274. #define RTE_USB1_ULPI_DIR_FUNC 1
  275. #elif (RTE_USB1_ULPI_DIR_ID == 1)
  276. #define RTE_USB1_ULPI_DIR_PORT 0xC
  277. #define RTE_USB1_ULPI_DIR_BIT 11
  278. #define RTE_USB1_ULPI_DIR_FUNC 1
  279. #else
  280. #error "Invalid RTE_USB1_ULPI_DIR Pin Configuration!"
  281. #endif
  282. // <o> USB1_ULPI_STP <0=>P8_7 <1=>PC_10
  283. // <i> USB1 ULPI link STP signal.
  284. // <i> Asserted to end or interrupt transfers to the PHY.
  285. #define RTE_USB1_ULPI_STP_ID 0
  286. #if (RTE_USB1_ULPI_STP_ID == 0)
  287. #define RTE_USB1_ULPI_STP_PORT 8
  288. #define RTE_USB1_ULPI_STP_BIT 7
  289. #define RTE_USB1_ULPI_STP_FUNC 1
  290. #elif (RTE_USB1_ULPI_STP_ID == 1)
  291. #define RTE_USB1_ULPI_STP_PORT 0xC
  292. #define RTE_USB1_ULPI_STP_BIT 10
  293. #define RTE_USB1_ULPI_STP_FUNC 1
  294. #else
  295. #error "Invalid RTE_USB1_ULPI_STP Pin Configuration!"
  296. #endif
  297. // <o> USB1_ULPI_NXT <0=>P8_6 <1=>PC_9
  298. // <i> USB1 ULPI link NXT signal.
  299. // <i> Data flow control signal from the PHY.
  300. #define RTE_USB1_ULPI_NXT_ID 0
  301. #if (RTE_USB1_ULPI_NXT_ID == 0)
  302. #define RTE_USB1_ULPI_NXT_PORT 8
  303. #define RTE_USB1_ULPI_NXT_BIT 6
  304. #define RTE_USB1_ULPI_NXT_FUNC 1
  305. #elif (RTE_USB1_ULPI_NXT_ID == 1)
  306. #define RTE_USB1_ULPI_NXT_PORT 0xC
  307. #define RTE_USB1_ULPI_NXT_BIT 9
  308. #define RTE_USB1_ULPI_NXT_FUNC 1
  309. #else
  310. #error "Invalid RTE_USB1_ULPI_NXT Pin Configuration!"
  311. #endif
  312. // <o> USB1_ULPI_D0 <0=>P8_5 <1=>PC_8 <2=>PD_11
  313. // <i> USB1 ULPI link bidirectional data line 0.
  314. #define RTE_USB1_ULPI_D0_ID 0
  315. #if (RTE_USB1_ULPI_D0_ID == 0)
  316. #define RTE_USB1_ULPI_D0_PORT 8
  317. #define RTE_USB1_ULPI_D0_BIT 5
  318. #define RTE_USB1_ULPI_D0_FUNC 1
  319. #elif (RTE_USB1_ULPI_D0_ID == 1)
  320. #define RTE_USB1_ULPI_D0_PORT 0xC
  321. #define RTE_USB1_ULPI_D0_BIT 8
  322. #define RTE_USB1_ULPI_D0_FUNC 1
  323. #elif (RTE_USB1_ULPI_D0_ID == 2)
  324. #define RTE_USB1_ULPI_D0_PORT 0xD
  325. #define RTE_USB1_ULPI_D0_BIT 11
  326. #define RTE_USB1_ULPI_D0_FUNC 5
  327. #else
  328. #error "Invalid RTE_USB1_ULPI_D0 Pin Configuration!"
  329. #endif
  330. // <o> USB1_ULPI_D1 <0=>P8_4 <1=>PC_7
  331. // <i> USB1 ULPI link bidirectional data line 1.
  332. #define RTE_USB1_ULPI_D1_ID 0
  333. #if (RTE_USB1_ULPI_D1_ID == 0)
  334. #define RTE_USB1_ULPI_D1_PORT 8
  335. #define RTE_USB1_ULPI_D1_BIT 4
  336. #define RTE_USB1_ULPI_D1_FUNC 1
  337. #elif (RTE_USB1_ULPI_D1_ID == 1)
  338. #define RTE_USB1_ULPI_D1_PORT 0xC
  339. #define RTE_USB1_ULPI_D1_BIT 7
  340. #define RTE_USB1_ULPI_D1_FUNC 1
  341. #else
  342. #error "Invalid RTE_USB1_ULPI_D1 Pin Configuration!"
  343. #endif
  344. // <o> USB1_ULPI_D2 <0=>P8_3 <1=>PC_6
  345. // <i> USB1 ULPI link bidirectional data line 2.
  346. #define RTE_USB1_ULPI_D2_ID 0
  347. #if (RTE_USB1_ULPI_D2_ID == 0)
  348. #define RTE_USB1_ULPI_D2_PORT 8
  349. #define RTE_USB1_ULPI_D2_BIT 3
  350. #define RTE_USB1_ULPI_D2_FUNC 1
  351. #elif (RTE_USB1_ULPI_D2_ID == 1)
  352. #define RTE_USB1_ULPI_D2_PORT 0xC
  353. #define RTE_USB1_ULPI_D2_BIT 6
  354. #define RTE_USB1_ULPI_D2_FUNC 1
  355. #else
  356. #error "Invalid RTE_USB1_ULPI_D2 Pin Configuration!"
  357. #endif
  358. // <o> USB1_ULPI_D3 <0=>PB_6 <1=>PC_5
  359. // <i> USB1 ULPI link bidirectional data line 3.
  360. #define RTE_USB1_ULPI_D3_ID 0
  361. #if (RTE_USB1_ULPI_D3_ID == 0)
  362. #define RTE_USB1_ULPI_D3_PORT 0xB
  363. #define RTE_USB1_ULPI_D3_BIT 6
  364. #define RTE_USB1_ULPI_D3_FUNC 1
  365. #elif (RTE_USB1_ULPI_D3_ID == 1)
  366. #define RTE_USB1_ULPI_D3_PORT 0xC
  367. #define RTE_USB1_ULPI_D3_BIT 5
  368. #define RTE_USB1_ULPI_D3_FUNC 1
  369. #else
  370. #error "Invalid RTE_USB1_ULPI_D3 Pin Configuration!"
  371. #endif
  372. // <o> USB1_ULPI_D4 <0=>PB_5 <1=>PC_4
  373. // <i> USB1 ULPI link bidirectional data line 4.
  374. #define RTE_USB1_ULPI_D4_ID 0
  375. #if (RTE_USB1_ULPI_D4_ID == 0)
  376. #define RTE_USB1_ULPI_D4_PORT 0xB
  377. #define RTE_USB1_ULPI_D4_BIT 5
  378. #define RTE_USB1_ULPI_D4_FUNC 1
  379. #elif (RTE_USB1_ULPI_D4_ID == 1)
  380. #define RTE_USB1_ULPI_D4_PORT 0xC
  381. #define RTE_USB1_ULPI_D4_BIT 4
  382. #define RTE_USB1_ULPI_D4_FUNC 1
  383. #else
  384. #error "Invalid RTE_USB1_ULPI_D4 Pin Configuration!"
  385. #endif
  386. // <o> USB1_ULPI_D5 <0=>PB_4 <1=>PC_3
  387. // <i> USB1 ULPI link bidirectional data line 5.
  388. #define RTE_USB1_ULPI_D5_ID 0
  389. #if (RTE_USB1_ULPI_D5_ID == 0)
  390. #define RTE_USB1_ULPI_D5_PORT 0xB
  391. #define RTE_USB1_ULPI_D5_BIT 4
  392. #define RTE_USB1_ULPI_D5_FUNC 1
  393. #elif (RTE_USB1_ULPI_D5_ID == 1)
  394. #define RTE_USB1_ULPI_D5_PORT 0xC
  395. #define RTE_USB1_ULPI_D5_BIT 3
  396. #define RTE_USB1_ULPI_D5_FUNC 0
  397. #else
  398. #error "Invalid RTE_USB1_ULPI_D5 Pin Configuration!"
  399. #endif
  400. // <o> USB1_ULPI_D6 <0=>PB_3 <1=>PC_2
  401. // <i> USB1 ULPI link bidirectional data line 6.
  402. #define RTE_USB1_ULPI_D6_ID 0
  403. #if (RTE_USB1_ULPI_D6_ID == 0)
  404. #define RTE_USB1_ULPI_D6_PORT 0xB
  405. #define RTE_USB1_ULPI_D6_BIT 3
  406. #define RTE_USB1_ULPI_D6_FUNC 1
  407. #elif (RTE_USB1_ULPI_D6_ID == 1)
  408. #define RTE_USB1_ULPI_D6_PORT 0xC
  409. #define RTE_USB1_ULPI_D6_BIT 2
  410. #define RTE_USB1_ULPI_D6_FUNC 0
  411. #else
  412. #error "Invalid RTE_USB1_ULPI_D6 Pin Configuration!"
  413. #endif
  414. // <o> USB1_ULPI_D7 <0=>PB_2 <1=>PC_1
  415. // <i> USB1 ULPI link bidirectional data line 7.
  416. #define RTE_USB1_ULPI_D7_ID 0
  417. #if (RTE_USB1_ULPI_D7_ID == 0)
  418. #define RTE_USB1_ULPI_D7_PORT 0xB
  419. #define RTE_USB1_ULPI_D7_BIT 2
  420. #define RTE_USB1_ULPI_D7_FUNC 1
  421. #elif (RTE_USB1_ULPI_D7_ID == 1)
  422. #define RTE_USB1_ULPI_D7_PORT 0xC
  423. #define RTE_USB1_ULPI_D7_BIT 1
  424. #define RTE_USB1_ULPI_D7_FUNC 0
  425. #else
  426. #error "Invalid RTE_USB1_ULPI_D7 Pin Configuration!"
  427. #endif
  428. // </e> External high-speed ULPI PHY (UTMI+ Low Pin Interface)
  429. // </h> Pin Configuration
  430. // </e> USB1 Controller [Driver_USBD1 and Driver_USBH1]
  431. // <e> ENET (Ethernet Interface) [Driver_ETH_MAC0]
  432. // <i> Configuration settings for Driver_ETH_MAC0 in component ::Drivers:Ethernet MAC
  433. #define RTE_ENET 0
  434. // <e> MII (Media Independent Interface)
  435. #define RTE_ENET_MII 0
  436. // <o> ENET_TXD0 Pin <0=>P1_18
  437. #define RTE_ENET_MII_TXD0_PORT_ID 0
  438. #if (RTE_ENET_MII_TXD0_PORT_ID == 0)
  439. #define RTE_ENET_MII_TXD0_PORT 1
  440. #define RTE_ENET_MII_TXD0_PIN 18
  441. #define RTE_ENET_MII_TXD0_FUNC 3
  442. #else
  443. #error "Invalid ENET_TXD0 Pin Configuration!"
  444. #endif
  445. // <o> ENET_TXD1 Pin <0=>P1_20
  446. #define RTE_ENET_MII_TXD1_PORT_ID 0
  447. #if (RTE_ENET_MII_TXD1_PORT_ID == 0)
  448. #define RTE_ENET_MII_TXD1_PORT 1
  449. #define RTE_ENET_MII_TXD1_PIN 20
  450. #define RTE_ENET_MII_TXD1_FUNC 3
  451. #else
  452. #error "Invalid ENET_TXD1 Pin Configuration!"
  453. #endif
  454. // <o> ENET_TXD2 Pin <0=>P9_4 <1=>PC_2
  455. #define RTE_ENET_MII_TXD2_PORT_ID 0
  456. #if (RTE_ENET_MII_TXD2_PORT_ID == 0)
  457. #define RTE_ENET_MII_TXD2_PORT 9
  458. #define RTE_ENET_MII_TXD2_PIN 4
  459. #define RTE_ENET_MII_TXD2_FUNC 5
  460. #elif (RTE_ENET_MII_TXD2_PORT_ID == 1)
  461. #define RTE_ENET_MII_TXD2_PORT 0xC
  462. #define RTE_ENET_MII_TXD2_PIN 2
  463. #define RTE_ENET_MII_TXD2_FUNC 3
  464. #else
  465. #error "Invalid ENET_TXD2 Pin Configuration!"
  466. #endif
  467. // <o> ENET_TXD3 Pin <0=>P9_5 <1=>PC_3
  468. #define RTE_ENET_MII_TXD3_PORT_ID 0
  469. #if (RTE_ENET_MII_TXD3_PORT_ID == 0)
  470. #define RTE_ENET_MII_TXD3_PORT 9
  471. #define RTE_ENET_MII_TXD3_PIN 5
  472. #define RTE_ENET_MII_TXD3_FUNC 5
  473. #elif (RTE_ENET_MII_TXD3_PORT_ID == 1)
  474. #define RTE_ENET_MII_TXD3_PORT 0xC
  475. #define RTE_ENET_MII_TXD3_PIN 3
  476. #define RTE_ENET_MII_TXD3_FUNC 3
  477. #else
  478. #error "Invalid ENET_TXD3 Pin Configuration!"
  479. #endif
  480. // <o> ENET_TX_EN Pin <0=>P0_1 <1=>PC_4
  481. #define RTE_ENET_MII_TX_EN_PORT_ID 0
  482. #if (RTE_ENET_MII_TX_EN_PORT_ID == 0)
  483. #define RTE_ENET_MII_TX_EN_PORT 0
  484. #define RTE_ENET_MII_TX_EN_PIN 1
  485. #define RTE_ENET_MII_TX_EN_FUNC 6
  486. #elif (RTE_ENET_MII_TX_EN_PORT_ID == 1)
  487. #define RTE_ENET_MII_TX_EN_PORT 0xC
  488. #define RTE_ENET_MII_TX_EN_PIN 4
  489. #define RTE_ENET_MII_TX_EN_FUNC 3
  490. #else
  491. #error "Invalid ENET_TX_EN Pin Configuration!"
  492. #endif
  493. // <o> ENET_TX_CLK Pin <0=>P1_19 <1=>CLK0
  494. #define RTE_ENET_MII_TX_CLK_PORT_ID 0
  495. #if (RTE_ENET_MII_TX_CLK_PORT_ID == 0)
  496. #define RTE_ENET_MII_TX_CLK_PORT 1
  497. #define RTE_ENET_MII_TX_CLK_PIN 19
  498. #define RTE_ENET_MII_TX_CLK_FUNC 0
  499. #elif (RTE_ENET_MII_TX_CLK_PORT_ID == 1)
  500. #define RTE_ENET_MII_TX_CLK_PORT 0x10
  501. #define RTE_ENET_MII_TX_CLK_PIN 0
  502. #define RTE_ENET_MII_TX_CLK_FUNC 7
  503. #else
  504. #error "Invalid ENET_TX_CLK Pin Configuration!"
  505. #endif
  506. // <o> ENET_TX_ER Pin <0=>Not used <1=>PC_5 <2=>PC_14
  507. // <i> Optional signal, rarely used
  508. #define RTE_ENET_MII_TX_ER_PORT_ID 0
  509. #if (RTE_ENET_MII_TX_ER_PORT_ID == 0)
  510. #define RTE_ENET_MII_TX_ER_PIN_EN 0
  511. #elif (RTE_ENET_MII_TX_ER_PORT_ID == 1)
  512. #define RTE_ENET_MII_TX_ER_PORT 0xC
  513. #define RTE_ENET_MII_TX_ER_PIN 5
  514. #define RTE_ENET_MII_TX_ER_FUNC 3
  515. #elif (RTE_ENET_MII_TX_ER_PORT_ID == 2)
  516. #define RTE_ENET_MII_TX_ER_PORT 0xC
  517. #define RTE_ENET_MII_TX_ER_PIN 14
  518. #define RTE_ENET_MII_TX_ER_FUNC 6
  519. #else
  520. #error "Invalid ENET_TX_ER Pin Configuration!"
  521. #endif
  522. #ifndef RTE_ENET_MII_TX_ER_PIN_EN
  523. #define RTE_ENET_MII_TX_ER_PIN_EN 1
  524. #endif
  525. // <o> ENET_RXD0 Pin <0=>P1_15
  526. #define RTE_ENET_MII_RXD0_PORT_ID 0
  527. #if (RTE_ENET_MII_RXD0_PORT_ID == 0)
  528. #define RTE_ENET_MII_RXD0_PORT 1
  529. #define RTE_ENET_MII_RXD0_PIN 15
  530. #define RTE_ENET_MII_RXD0_FUNC 3
  531. #else
  532. #error "Invalid ENET_RXD0 Pin Configuration!"
  533. #endif
  534. // <o> ENET_RXD1 Pin <0=>P0_0
  535. #define RTE_ENET_MII_RXD1_PORT_ID 0
  536. #if (RTE_ENET_MII_RXD1_PORT_ID == 0)
  537. #define RTE_ENET_MII_RXD1_PORT 0
  538. #define RTE_ENET_MII_RXD1_PIN 0
  539. #define RTE_ENET_MII_RXD1_FUNC 2
  540. #else
  541. #error "Invalid ENET_RXD1 Pin Configuration!"
  542. #endif
  543. // <o> ENET_RXD2 Pin <0=>P9_3 <1=>PC_6
  544. #define RTE_ENET_MII_RXD2_PORT_ID 0
  545. #if (RTE_ENET_MII_RXD2_PORT_ID == 0)
  546. #define RTE_ENET_MII_RXD2_PORT 9
  547. #define RTE_ENET_MII_RXD2_PIN 3
  548. #define RTE_ENET_MII_RXD2_FUNC 5
  549. #elif (RTE_ENET_MII_RXD2_PORT_ID == 1)
  550. #define RTE_ENET_MII_RXD2_PORT 0xC
  551. #define RTE_ENET_MII_RXD2_PIN 6
  552. #define RTE_ENET_MII_RXD2_FUNC 3
  553. #else
  554. #error "Invalid ENET_RXD2 Pin Configuration!"
  555. #endif
  556. // <o> ENET_RXD3 Pin <0=>P9_2 <1=>PC_7
  557. #define RTE_ENET_MII_RXD3_PORT_ID 0
  558. #if (RTE_ENET_MII_RXD3_PORT_ID == 0)
  559. #define RTE_ENET_MII_RXD3_PORT 9
  560. #define RTE_ENET_MII_RXD3_PIN 2
  561. #define RTE_ENET_MII_RXD3_FUNC 5
  562. #elif (RTE_ENET_MII_RXD3_PORT_ID == 1)
  563. #define RTE_ENET_MII_RXD3_PORT 0xC
  564. #define RTE_ENET_MII_RXD3_PIN 7
  565. #define RTE_ENET_MII_RXD3_FUNC 3
  566. #else
  567. #error "Invalid ENET_RXD3 Pin Configuration!"
  568. #endif
  569. // <o> ENET_RX_DV Pin <0=>P1_16 <1=>PC_8
  570. #define RTE_ENET_MII_RX_DV_PORT_ID 0
  571. #if (RTE_ENET_MII_RX_DV_PORT_ID == 0)
  572. #define RTE_ENET_MII_RX_DV_PORT 1
  573. #define RTE_ENET_MII_RX_DV_PIN 16
  574. #define RTE_ENET_MII_RX_DV_FUNC 7
  575. #elif (RTE_ENET_MII_RX_DV_PORT_ID == 1)
  576. #define RTE_ENET_MII_RX_DV_PORT 0xC
  577. #define RTE_ENET_MII_RX_DV_PIN 8
  578. #define RTE_ENET_MII_RX_DV_FUNC 3
  579. #else
  580. #error "Invalid ENET_RX_DV Pin Configuration!"
  581. #endif
  582. // <o> ENET_RX_CLK Pin <0=>PC_0
  583. #define RTE_ENET_MII_RX_CLK_PORT_ID 0
  584. #if (RTE_ENET_MII_RX_CLK_PORT_ID == 0)
  585. #define RTE_ENET_MII_RX_CLK_PORT 0xC
  586. #define RTE_ENET_MII_RX_CLK_PIN 0
  587. #define RTE_ENET_MII_RX_CLK_FUNC 3
  588. #else
  589. #error "Invalid ENET_RX_CLK Pin Configuration!"
  590. #endif
  591. // <o> ENET_RX_ER Pin <0=>P9_1 <1=>PC_9
  592. #define RTE_ENET_MII_RX_ER_PORT_ID 0
  593. #if (RTE_ENET_MII_RX_ER_PORT_ID == 0)
  594. #define RTE_ENET_MII_RX_ER_PORT 9
  595. #define RTE_ENET_MII_RX_ER_PIN 1
  596. #define RTE_ENET_MII_RX_ER_FUNC 5
  597. #elif (RTE_ENET_MII_RX_ER_PORT_ID == 1)
  598. #define RTE_ENET_MII_RX_ER_PORT 0xC
  599. #define RTE_ENET_MII_RX_ER_PIN 9
  600. #define RTE_ENET_MII_RX_ER_FUNC 3
  601. #else
  602. #error "Invalid ENET_RX_ER Pin Configuration!"
  603. #endif
  604. // <o> ENET_COL Pin <0=>P0_1 <1=>P4_1 <2=>P9_6
  605. #define RTE_ENET_MII_COL_PORT_ID 0
  606. #if (RTE_ENET_MII_COL_PORT_ID == 0)
  607. #define RTE_ENET_MII_COL_PORT 0
  608. #define RTE_ENET_MII_COL_PIN 1
  609. #define RTE_ENET_MII_COL_FUNC 2
  610. #elif (RTE_ENET_MII_COL_PORT_ID == 1)
  611. #define RTE_ENET_MII_COL_PORT 4
  612. #define RTE_ENET_MII_COL_PIN 1
  613. #define RTE_ENET_MII_COL_FUNC 7
  614. #elif (RTE_ENET_MII_COL_PORT_ID == 2)
  615. #define RTE_ENET_MII_COL_PORT 9
  616. #define RTE_ENET_MII_COL_PIN 6
  617. #define RTE_ENET_MII_COL_FUNC 5
  618. #else
  619. #error "Invalid ENET_COL Pin Configuration!"
  620. #endif
  621. // <o> ENET_CRS Pin <0=>P1_16 <1=>P9_0
  622. #define RTE_ENET_MII_CRS_PORT_ID 0
  623. #if (RTE_ENET_MII_CRS_PORT_ID == 0)
  624. #define RTE_ENET_MII_CRS_PORT 1
  625. #define RTE_ENET_MII_CRS_PIN 16
  626. #define RTE_ENET_MII_CRS_FUNC 3
  627. #elif (RTE_ENET_MII_CRS_PORT_ID == 1)
  628. #define RTE_ENET_MII_CRS_PORT 9
  629. #define RTE_ENET_MII_CRS_PIN 0
  630. #define RTE_ENET_MII_CRS_FUNC 5
  631. #else
  632. #error "Invalid ENET_CRS Pin Configuration!"
  633. #endif
  634. // </e> MII (Media Independent Interface)
  635. // <e> RMII (Reduced Media Independent Interface)
  636. #define RTE_ENET_RMII 0
  637. // <o> ENET_TXD0 Pin <0=>P1_18
  638. #define RTE_ENET_RMII_TXD0_PORT_ID 0
  639. #if (RTE_ENET_RMII_TXD0_PORT_ID == 0)
  640. #define RTE_ENET_RMII_TXD0_PORT 1
  641. #define RTE_ENET_RMII_TXD0_PIN 18
  642. #define RTE_ENET_RMII_TXD0_FUNC 3
  643. #else
  644. #error "Invalid ENET_TXD0 Pin Configuration!"
  645. #endif
  646. // <o> ENET_TXD1 Pin <0=>P1_20
  647. #define RTE_ENET_RMII_TXD1_PORT_ID 0
  648. #if (RTE_ENET_RMII_TXD1_PORT_ID == 0)
  649. #define RTE_ENET_RMII_TXD1_PORT 1
  650. #define RTE_ENET_RMII_TXD1_PIN 20
  651. #define RTE_ENET_RMII_TXD1_FUNC 3
  652. #else
  653. #error "Invalid ENET_TXD1 Pin Configuration!"
  654. #endif
  655. // <o> ENET_TX_EN Pin <0=>P0_1 <1=>PC_4
  656. #define RTE_ENET_RMII_TX_EN_PORT_ID 0
  657. #if (RTE_ENET_RMII_TX_EN_PORT_ID == 0)
  658. #define RTE_ENET_RMII_TX_EN_PORT 0
  659. #define RTE_ENET_RMII_TX_EN_PIN 1
  660. #define RTE_ENET_RMII_TX_EN_FUNC 6
  661. #elif (RTE_ENET_RMII_TX_EN_PORT_ID == 1)
  662. #define RTE_ENET_RMII_TX_EN_PORT 0xC
  663. #define RTE_ENET_RMII_TX_EN_PIN 4
  664. #define RTE_ENET_RMII_TX_EN_FUNC 3
  665. #else
  666. #error "Invalid ENET_TX_EN Pin Configuration!"
  667. #endif
  668. // <o> ENET_REF_CLK Pin <0=>P1_19 <1=>CLK0
  669. #define RTE_ENET_RMII_REF_CLK_PORT_ID 0
  670. #if (RTE_ENET_RMII_REF_CLK_PORT_ID == 0)
  671. #define RTE_ENET_RMII_REF_CLK_PORT 1
  672. #define RTE_ENET_RMII_REF_CLK_PIN 19
  673. #define RTE_ENET_RMII_REF_CLK_FUNC 0
  674. #elif (RTE_ENET_RMII_REF_CLK_PORT_ID == 1)
  675. #define RTE_ENET_RMII_REF_CLK_PORT 0x10
  676. #define RTE_ENET_RMII_REF_CLK_PIN 0
  677. #define RTE_ENET_RMII_REF_CLK_FUNC 7
  678. #else
  679. #error "Invalid ENET_REF_CLK Pin Configuration!"
  680. #endif
  681. // <o> ENET_RXD0 Pin <0=>P1_15
  682. #define RTE_ENET_RMII_RXD0_PORT_ID 0
  683. #if (RTE_ENET_RMII_RXD0_PORT_ID == 0)
  684. #define RTE_ENET_RMII_RXD0_PORT 1
  685. #define RTE_ENET_RMII_RXD0_PIN 15
  686. #define RTE_ENET_RMII_RXD0_FUNC 3
  687. #else
  688. #error "Invalid ENET_RXD0 Pin Configuration!"
  689. #endif
  690. // <o> ENET_RXD1 Pin <0=>P0_0
  691. #define RTE_ENET_RMII_RXD1_PORT_ID 0
  692. #if (RTE_ENET_RMII_RXD1_PORT_ID == 0)
  693. #define RTE_ENET_RMII_RXD1_PORT 0
  694. #define RTE_ENET_RMII_RXD1_PIN 0
  695. #define RTE_ENET_RMII_RXD1_FUNC 2
  696. #else
  697. #error "Invalid ENET_RXD1 Pin Configuration!"
  698. #endif
  699. // <o> ENET_RX_DV Pin <0=>P1_16 <1=>PC_8
  700. #define RTE_ENET_RMII_RX_DV_PORT_ID 0
  701. #if (RTE_ENET_RMII_RX_DV_PORT_ID == 0)
  702. #define RTE_ENET_RMII_RX_DV_PORT 1
  703. #define RTE_ENET_RMII_RX_DV_PIN 16
  704. #define RTE_ENET_RMII_RX_DV_FUNC 7
  705. #elif (RTE_ENET_RMII_RX_DV_PORT_ID == 1)
  706. #define RTE_ENET_RMII_RX_DV_PORT 0xC
  707. #define RTE_ENET_RMII_RX_DV_PIN 8
  708. #define RTE_ENET_RMII_RX_DV_FUNC 3
  709. #else
  710. #error "Invalid ENET_RX_DV Pin Configuration!"
  711. #endif
  712. // </e> RMII (Reduced Media Independent Interface)
  713. // <h> MIIM (Management Data Interface)
  714. // <o> ENET_MDIO Pin <0=>P1_17
  715. #define RTE_ENET_MDI_MDIO_PORT_ID 0
  716. #if (RTE_ENET_MDI_MDIO_PORT_ID == 0)
  717. #define RTE_ENET_MDI_MDIO_PORT 1
  718. #define RTE_ENET_MDI_MDIO_PIN 17
  719. #define RTE_ENET_MDI_MDIO_FUNC 3
  720. #else
  721. #error "Invalid ENET_MDIO Pin Configuration!"
  722. #endif
  723. // <o> ENET_MDC Pin <0=>P2_0 <1=>P7_7 <2=>PC_1
  724. #define RTE_ENET_MDI_MDC_PORT_ID 2
  725. #if (RTE_ENET_MDI_MDC_PORT_ID == 0)
  726. #define RTE_ENET_MDI_MDC_PORT 2
  727. #define RTE_ENET_MDI_MDC_PIN 0
  728. #define RTE_ENET_MDI_MDC_FUNC 7
  729. #elif (RTE_ENET_MDI_MDC_PORT_ID == 1)
  730. #define RTE_ENET_MDI_MDC_PORT 7
  731. #define RTE_ENET_MDI_MDC_PIN 7
  732. #define RTE_ENET_MDI_MDC_FUNC 6
  733. #elif (RTE_ENET_MDI_MDC_PORT_ID == 2)
  734. #define RTE_ENET_MDI_MDC_PORT 0xC
  735. #define RTE_ENET_MDI_MDC_PIN 1
  736. #define RTE_ENET_MDI_MDC_FUNC 3
  737. #else
  738. #error "Invalid ENET_MDC Pin Configuration!"
  739. #endif
  740. // </h> MIIM (Management Data Interface)
  741. // </e> ENET (Ethernet Interface) [Driver_ETH_MAC0]
  742. // <e> SD/MMC Interface [Driver_MCI0]
  743. // <i> Configuration settings for Driver_MCI0 in component ::Drivers:MCI
  744. #define RTE_SDMMC 0
  745. // <h> SD/MMC Peripheral Bus
  746. // <o> SD_CLK Pin <0=>PC_0 <1=>CLK0 <2=>CLK2
  747. #define RTE_SD_CLK_PORT_ID 0
  748. #if (RTE_SD_CLK_PORT_ID == 0)
  749. #define RTE_SD_CLK_PORT 0xC
  750. #define RTE_SD_CLK_PIN 0
  751. #define RTE_SD_CLK_FUNC 7
  752. #elif (RTE_SD_CLK_PORT_ID == 1)
  753. #define RTE_SD_CLK_PORT 0x10
  754. #define RTE_SD_CLK_PIN 0
  755. #define RTE_SD_CLK_FUNC 4
  756. #elif (RTE_SD_CLK_PORT_ID == 2)
  757. #define RTE_SD_CLK_PORT 0x10
  758. #define RTE_SD_CLK_PIN 2
  759. #define RTE_SD_CLK_FUNC 4
  760. #else
  761. #error "Invalid SD_CLK Pin Configuration!"
  762. #endif
  763. // <o> SD_CMD Pin <0=>P1_6 <1=>PC_10
  764. #define RTE_SD_CMD_PORT_ID 0
  765. #if (RTE_SD_CMD_PORT_ID == 0)
  766. #define RTE_SD_CMD_PORT 1
  767. #define RTE_SD_CMD_PIN 6
  768. #define RTE_SD_CMD_FUNC 7
  769. #elif (RTE_SD_CMD_PORT_ID == 1)
  770. #define RTE_SD_CMD_PORT 0xC
  771. #define RTE_SD_CMD_PIN 10
  772. #define RTE_SD_CMD_FUNC 7
  773. #else
  774. #error "Invalid SD_CMD Pin Configuration!"
  775. #endif
  776. // <o> SD_DAT0 Pin <0=>P1_9 <1=>PC_4
  777. #define RTE_SD_DAT0_PORT_ID 0
  778. #if (RTE_SD_DAT0_PORT_ID == 0)
  779. #define RTE_SD_DAT0_PORT 1
  780. #define RTE_SD_DAT0_PIN 9
  781. #define RTE_SD_DAT0_FUNC 7
  782. #elif (RTE_SD_DAT0_PORT_ID == 1)
  783. #define RTE_SD_DAT0_PORT 0xC
  784. #define RTE_SD_DAT0_PIN 4
  785. #define RTE_SD_DAT0_FUNC 7
  786. #else
  787. #error "Invalid SD_DAT0 Pin Configuration!"
  788. #endif
  789. // <e> SD_DAT[1 .. 3]
  790. #define RTE_SDMMC_BUS_WIDTH_4 0
  791. // <o> SD_DAT1 Pin <0=>P1_10 <1=>PC_5
  792. #define RTE_SD_DAT1_PORT_ID 0
  793. #if (RTE_SD_DAT1_PORT_ID == 0)
  794. #define RTE_SD_DAT1_PORT 1
  795. #define RTE_SD_DAT1_PIN 10
  796. #define RTE_SD_DAT1_FUNC 7
  797. #elif (RTE_SD_DAT1_PORT_ID == 1)
  798. #define RTE_SD_DAT1_PORT 0xC
  799. #define RTE_SD_DAT1_PIN 5
  800. #define RTE_SD_DAT1_FUNC 7
  801. #else
  802. #error "Invalid SD_DAT1 Pin Configuration!"
  803. #endif
  804. // <o> SD_DAT2 Pin <0=>P1_11 <1=>PC_6
  805. #define RTE_SD_DAT2_PORT_ID 0
  806. #if (RTE_SD_DAT2_PORT_ID == 0)
  807. #define RTE_SD_DAT2_PORT 1
  808. #define RTE_SD_DAT2_PIN 11
  809. #define RTE_SD_DAT2_FUNC 7
  810. #elif (RTE_SD_DAT2_PORT_ID == 1)
  811. #define RTE_SD_DAT2_PORT 0xC
  812. #define RTE_SD_DAT2_PIN 6
  813. #define RTE_SD_DAT2_FUNC 7
  814. #else
  815. #error "Invalid SD_DAT2 Pin Configuration!"
  816. #endif
  817. // <o> SD_DAT3 Pin <0=>P1_12 <1=>PC_7
  818. #define RTE_SD_DAT3_PORT_ID 0
  819. #if (RTE_SD_DAT3_PORT_ID == 0)
  820. #define RTE_SD_DAT3_PORT 1
  821. #define RTE_SD_DAT3_PIN 12
  822. #define RTE_SD_DAT3_FUNC 7
  823. #elif (RTE_SD_DAT3_PORT_ID == 1)
  824. #define RTE_SD_DAT3_PORT 0xC
  825. #define RTE_SD_DAT3_PIN 7
  826. #define RTE_SD_DAT3_FUNC 7
  827. #else
  828. #error "Invalid SD_DAT3 Pin Configuration!"
  829. #endif
  830. // </e> SD_DAT[1 .. 3]
  831. // <e> SD_DAT[4 .. 7]
  832. #define RTE_SDMMC_BUS_WIDTH_8 0
  833. // <o> SD_DAT4 Pin <0=>PC_11
  834. #define RTE_SD_DAT4_PORT_ID 0
  835. #if (RTE_SD_DAT4_PORT_ID == 0)
  836. #define RTE_SD_DAT4_PORT 0xC
  837. #define RTE_SD_DAT4_PIN 11
  838. #define RTE_SD_DAT4_FUNC 7
  839. #else
  840. #error "Invalid SD_DAT4 Pin Configuration!"
  841. #endif
  842. // <o> SD_DAT5 Pin <0=>PC_12
  843. #define RTE_SD_DAT5_PORT_ID 0
  844. #if (RTE_SD_DAT5_PORT_ID == 0)
  845. #define RTE_SD_DAT5_PORT 0xC
  846. #define RTE_SD_DAT5_PIN 12
  847. #define RTE_SD_DAT5_FUNC 7
  848. #else
  849. #error "Invalid SD_DAT5 Pin Configuration!"
  850. #endif
  851. // <o> SD_DAT6 Pin <0=>PC_13
  852. #define RTE_SD_DAT6_PORT_ID 0
  853. #if (RTE_SD_DAT6_PORT_ID == 0)
  854. #define RTE_SD_DAT6_PORT 0xC
  855. #define RTE_SD_DAT6_PIN 13
  856. #define RTE_SD_DAT6_FUNC 7
  857. #else
  858. #error "Invalid SD_DAT6 Pin Configuration!"
  859. #endif
  860. // <o> SD_DAT7 Pin <0=>PC_14
  861. #define RTE_SD_DAT7_PORT_ID 0
  862. #if (RTE_SD_DAT7_PORT_ID == 0)
  863. #define RTE_SD_DAT7_PORT 0xC
  864. #define RTE_SD_DAT7_PIN 14
  865. #define RTE_SD_DAT7_FUNC 7
  866. #else
  867. #error "Invalid SD_DAT7 Pin Configuration!"
  868. #endif
  869. // </e> SD_DAT[4 .. 7]
  870. // </h> SD/MMC Peripheral Bus
  871. // <o> SD_CD (Card Detect) Pin <0=>Not used <1=>P1_13 <2=>PC_8
  872. // <i> Configure Pin if exists
  873. #define RTE_SD_CD_PORT_ID 0
  874. #if (RTE_SD_CD_PORT_ID == 0)
  875. #define RTE_SD_CD_PIN_EN 0
  876. #elif (RTE_SD_CD_PORT_ID == 1)
  877. #define RTE_SD_CD_PORT 1
  878. #define RTE_SD_CD_PIN 13
  879. #define RTE_SD_CD_FUNC 7
  880. #elif (RTE_SD_CD_PORT_ID == 2)
  881. #define RTE_SD_CD_PORT 0xC
  882. #define RTE_SD_CD_PIN 8
  883. #define RTE_SD_CD_FUNC 7
  884. #else
  885. #error "Invalid SD_CD Pin Configuration!"
  886. #endif
  887. #ifndef RTE_SD_CD_PIN_EN
  888. #define RTE_SD_CD_PIN_EN 1
  889. #endif
  890. // <o> SD_WP (Write Protect) Pin <0=>Not used <1=>PD_15 <2=>PF_10
  891. // <i> Configure Pin if exists
  892. #define RTE_SD_WP_PORT_ID 0
  893. #if (RTE_SD_WP_PORT_ID == 0)
  894. #define RTE_SD_WP_PIN_EN 0
  895. #elif (RTE_SD_WP_PORT_ID == 1)
  896. #define RTE_SD_WP_PORT 0xD
  897. #define RTE_SD_WP_PIN 15
  898. #define RTE_SD_WP_FUNC 5
  899. #elif (RTE_SD_WP_PORT_ID == 2)
  900. #define RTE_SD_WP_PORT 0xF
  901. #define RTE_SD_WP_PIN 10
  902. #define RTE_SD_WP_FUNC 6
  903. #else
  904. #error "Invalid SD_WP Pin Configuration!"
  905. #endif
  906. #ifndef RTE_SD_WP_PIN_EN
  907. #define RTE_SD_WP_PIN_EN 1
  908. #endif
  909. // <o> SD_POW (Power) Pin <0=>Not used <1=>P1_5 <2=>PC_9 <3=>PD_1
  910. // <i> Configure Pin if exists
  911. #define RTE_SD_POW_PORT_ID 0
  912. #if (RTE_SD_POW_PORT_ID == 0)
  913. #define RTE_SD_POW_PIN_EN 0
  914. #elif (RTE_SD_POW_PORT_ID == 1)
  915. #define RTE_SD_POW_PORT 1
  916. #define RTE_SD_POW_PIN 5
  917. #define RTE_SD_POW_FUNC 7
  918. #elif (RTE_SD_POW_PORT_ID == 2)
  919. #define RTE_SD_POW_PORT 0xC
  920. #define RTE_SD_POW_PIN 9
  921. #define RTE_SD_POW_FUNC 7
  922. #elif (RTE_SD_POW_PORT_ID == 3)
  923. #define RTE_SD_POW_PORT 0xD
  924. #define RTE_SD_POW_PIN 1
  925. #define RTE_SD_POW_FUNC 5
  926. #else
  927. #error "Invalid SD_POW Pin Configuration!"
  928. #endif
  929. #ifndef RTE_SD_POW_PIN_EN
  930. #define RTE_SD_POW_PIN_EN 1
  931. #endif
  932. // <o> SD_RST (Card Reset for MMC4.4) Pin <0=>Not used <1=>P1_3 <2=>PC_2
  933. // <i> Configure Pin if exists
  934. #define RTE_SD_RST_PORT_ID 0
  935. #if (RTE_SD_RST_PORT_ID == 0)
  936. #define RTE_SD_RST_PIN_EN 0
  937. #elif (RTE_SD_RST_PORT_ID == 1)
  938. #define RTE_SD_RST_PORT 1
  939. #define RTE_SD_RST_PIN 3
  940. #define RTE_SD_RST_FUNC 7
  941. #elif (RTE_SD_RST_PORT_ID == 2)
  942. #define RTE_SD_RST_PORT 0xC
  943. #define RTE_SD_RST_PIN 2
  944. #define RTE_SD_RST_FUNC 7
  945. #else
  946. #error "Invalid SD_RST Pin Configuration!"
  947. #endif
  948. #ifndef RTE_SD_RST_PIN_EN
  949. #define RTE_SD_RST_PIN_EN 1
  950. #endif
  951. // </e> SD/MMC Interface [Driver_MCI0]
  952. // <e> I2C0 (Inter-integrated Circuit Interface 0) [Driver_I2C0]
  953. // <i> Configuration settings for Driver_I2C0 in component ::Drivers:I2C
  954. // </e> I2C0 (Inter-integrated Circuit Interface 0) [Driver_I2C0]
  955. #define RTE_I2C0 0
  956. // <e> I2C1 (Inter-integrated Circuit Interface 1) [Driver_I2C1]
  957. // <i> Configuration settings for Driver_I2C1 in component ::Drivers:I2C
  958. #define RTE_I2C1 0
  959. // <o> I2C1_SCL Pin <0=>P2_4 <1=>PE_15
  960. #define RTE_I2C1_SCL_PORT_ID 0
  961. #if (RTE_I2C1_SCL_PORT_ID == 0)
  962. #define RTE_I2C1_SCL_PORT 2
  963. #define RTE_I2C1_SCL_PIN 4
  964. #define RTE_I2C1_SCL_FUNC 1
  965. #elif (RTE_I2C1_SCL_PORT_ID == 1)
  966. #define RTE_I2C1_SCL_PORT 0xE
  967. #define RTE_I2C1_SCL_PIN 15
  968. #define RTE_I2C1_SCL_FUNC 2
  969. #else
  970. #error "Invalid I2C1_SCL Pin Configuration!"
  971. #endif
  972. // <o> I2C1_SDA Pin <0=>P2_3 <1=>PE_13
  973. #define RTE_I2C1_SDA_PORT_ID 0
  974. #if (RTE_I2C1_SDA_PORT_ID == 0)
  975. #define RTE_I2C1_SDA_PORT 2
  976. #define RTE_I2C1_SDA_PIN 3
  977. #define RTE_I2C1_SDA_FUNC 1
  978. #elif (RTE_I2C1_SDA_PORT_ID == 1)
  979. #define RTE_I2C1_SDA_PORT 0xE
  980. #define RTE_I2C1_SDA_PIN 13
  981. #define RTE_I2C1_SDA_FUNC 2
  982. #else
  983. #error "Invalid I2C1_SDA Pin Configuration!"
  984. #endif
  985. // </e> I2C1 (Inter-integrated Circuit Interface 1) [Driver_I2C1]
  986. // <e> USART0 (Universal synchronous asynchronous receiver transmitter) [Driver_USART0]
  987. #define RTE_USART0 0
  988. // <h> Pin Configuration
  989. // <o> TX <0=>P2_0 <1=>P6_4 <2=>P9_5 <3=>PF_10
  990. // <i> USART0 Serial Output pin
  991. #define RTE_USART0_TX_ID 0
  992. #if (RTE_USART0_TX_ID == 0)
  993. #define RTE_USART0_TX_PORT 2
  994. #define RTE_USART0_TX_BIT 0
  995. #define RTE_USART0_TX_FUNC 1
  996. #elif (RTE_USART0_TX_ID == 1)
  997. #define RTE_USART0_TX_PORT 6
  998. #define RTE_USART0_TX_BIT 4
  999. #define RTE_USART0_TX_FUNC 2
  1000. #elif (RTE_USART0_TX_ID == 2)
  1001. #define RTE_USART0_TX_PORT 9
  1002. #define RTE_USART0_TX_BIT 5
  1003. #define RTE_USART0_TX_FUNC 7
  1004. #elif (RTE_USART0_TX_ID == 3)
  1005. #define RTE_USART0_TX_PORT 0xF
  1006. #define RTE_USART0_TX_BIT 10
  1007. #define RTE_USART0_TX_FUNC 1
  1008. #else
  1009. #error "Invalid USART0_TX Pin Configuration!"
  1010. #endif
  1011. // <o> RX <0=>P2_1 <1=>P6_5 <2=>P9_6 <3=>PF_11
  1012. // <i> USART0 Serial Input pin
  1013. #define RTE_USART0_RX_ID 0
  1014. #if (RTE_USART0_RX_ID == 0)
  1015. #define RTE_USART0_RX_PORT 2
  1016. #define RTE_USART0_RX_BIT 1
  1017. #define RTE_USART0_RX_FUNC 1
  1018. #elif (RTE_USART0_RX_ID == 1)
  1019. #define RTE_USART0_RX_PORT 6
  1020. #define RTE_USART0_RX_BIT 5
  1021. #define RTE_USART0_RX_FUNC 2
  1022. #elif (RTE_USART0_RX_ID == 2)
  1023. #define RTE_USART0_RX_PORT 9
  1024. #define RTE_USART0_RX_BIT 6
  1025. #define RTE_USART0_RX_FUNC 7
  1026. #elif (RTE_USART0_RX_ID == 3)
  1027. #define RTE_USART0_RX_PORT 0xF
  1028. #define RTE_USART0_RX_BIT 11
  1029. #define RTE_USART0_RX_FUNC 1
  1030. #else
  1031. #error "Invalid USART0_RX Pin Configuration!"
  1032. #endif
  1033. // <o> UCLK (Synchronous and SmartCard mode) <0=>Not used <1=>P2_2 <2=>P6_1 <3=>PF_8
  1034. // <i> USART0 Serial Clock input/output synchronous mode
  1035. #define RTE_USART0_UCLK_ID 0
  1036. #if (RTE_USART0_UCLK_ID == 0)
  1037. #define RTE_USART0_UCLK_PIN_EN 0
  1038. #elif (RTE_USART0_UCLK_ID == 1)
  1039. #define RTE_USART0_UCLK_PORT 2
  1040. #define RTE_USART0_UCLK_BIT 2
  1041. #define RTE_USART0_UCLK_FUNC 1
  1042. #elif (RTE_USART0_UCLK_ID == 2)
  1043. #define RTE_USART0_UCLK_PORT 6
  1044. #define RTE_USART0_UCLK_BIT 1
  1045. #define RTE_USART0_UCLK_FUNC 2
  1046. #elif (RTE_USART0_UCLK_ID == 3)
  1047. #define RTE_USART0_UCLK_PORT 0xF
  1048. #define RTE_USART0_UCLK_BIT 8
  1049. #define RTE_USART0_UCLK_FUNC 1
  1050. #else
  1051. #error "Invalid USART0_UCLK Pin Configuration!"
  1052. #endif
  1053. #ifndef RTE_USART0_UCLK_PIN_EN
  1054. #define RTE_USART0_UCLK_PIN_EN 1
  1055. #endif
  1056. // </h> Pin Configuration
  1057. // <h> DMA
  1058. // <e> Tx
  1059. // <o1> Channel <0=>0 <1=>1 <2=>2 <3=>3 <4=>4 <5=>5 <6=>6 <7=>7
  1060. // <o2> Peripheral <0=>1 (DMAMUXPER1) <1=>11 (DMAMUXPER11)
  1061. // </e>
  1062. #define RTE_USART0_DMA_TX_EN 0
  1063. #define RTE_USART0_DMA_TX_CH 0
  1064. #define RTE_USART0_DMA_TX_PERI_ID 0
  1065. #if (RTE_USART0_DMA_TX_PERI_ID == 0)
  1066. #define RTE_USART0_DMA_TX_PERI 1
  1067. #define RTE_USART0_DMA_TX_PERI_SEL 1
  1068. #elif (RTE_USART0_DMA_TX_PERI_ID == 1)
  1069. #define RTE_USART0_DMA_TX_PERI 11
  1070. #define RTE_USART0_DMA_TX_PERI_SEL 2
  1071. #endif
  1072. // <e> Rx
  1073. // <o1> Channel <0=>0 <1=>1 <2=>2 <3=>3 <4=>4 <5=>5 <6=>6 <7=>7
  1074. // <o2> Peripheral <0=>2 (DMAMUXPER2) <1=>12 (DMAMUXPER12)
  1075. // </e>
  1076. #define RTE_USART0_DMA_RX_EN 0
  1077. #define RTE_USART0_DMA_RX_CH 1
  1078. #define RTE_USART0_DMA_RX_PERI_ID 0
  1079. #if (RTE_USART0_DMA_RX_PERI_ID == 0)
  1080. #define RTE_USART0_DMA_RX_PERI 2
  1081. #define RTE_USART0_DMA_RX_PERI_SEL 1
  1082. #elif (RTE_USART0_DMA_RX_PERI_ID == 1)
  1083. #define RTE_USART0_DMA_RX_PERI 12
  1084. #define RTE_USART0_DMA_RX_PERI_SEL 2
  1085. #endif
  1086. // </h> DMA
  1087. // </e> USART0 (Universal synchronous asynchronous receiver transmitter) [Driver_USART0]
  1088. // <e> UART1 (Universal asynchronous receiver transmitter) [Driver_USART1]
  1089. #define RTE_UART1 0
  1090. // <h> Pin Configuration
  1091. // <o> TX <0=>P1_13 <1=>P3_4 <2=>P5_6 <3=>PC_13 <4=>PE_11
  1092. // <i> UART0 Serial Output pin
  1093. #define RTE_UART1_TX_ID 2
  1094. #if (RTE_UART1_TX_ID == 0)
  1095. #define RTE_UART1_TX_PORT 1
  1096. #define RTE_UART1_TX_BIT 13
  1097. #define RTE_UART1_TX_FUNC 1
  1098. #elif (RTE_UART1_TX_ID == 1)
  1099. #define RTE_UART1_TX_PORT 3
  1100. #define RTE_UART1_TX_BIT 4
  1101. #define RTE_UART1_TX_FUNC 4
  1102. #elif (RTE_UART1_TX_ID == 2)
  1103. #define RTE_UART1_TX_PORT 5
  1104. #define RTE_UART1_TX_BIT 6
  1105. #define RTE_UART1_TX_FUNC 4
  1106. #elif (RTE_UART1_TX_ID == 3)
  1107. #define RTE_UART1_TX_PORT 0xC
  1108. #define RTE_UART1_TX_BIT 13
  1109. #define RTE_UART1_TX_FUNC 2
  1110. #elif (RTE_UART1_TX_ID == 4)
  1111. #define RTE_UART1_TX_PORT 0xE
  1112. #define RTE_UART1_TX_BIT 11
  1113. #define RTE_UART1_TX_FUNC 2
  1114. #else
  1115. #error "Invalid UART1_TX Pin Configuration!"
  1116. #endif
  1117. // <o> RX <0=>P1_14 <1=>P3_5 <2=>P5_7 <3=>PC_14 <4=>PE_12
  1118. // <i> UART1 Serial Input pin
  1119. #define RTE_UART1_RX_ID 0
  1120. #if (RTE_UART1_RX_ID == 0)
  1121. #define RTE_UART1_RX_PORT 1
  1122. #define RTE_UART1_RX_BIT 14
  1123. #define RTE_UART1_RX_FUNC 1
  1124. #elif (RTE_UART1_RX_ID == 1)
  1125. #define RTE_UART1_RX_PORT 3
  1126. #define RTE_UART1_RX_BIT 5
  1127. #define RTE_UART1_RX_FUNC 4
  1128. #elif (RTE_UART1_RX_ID == 2)
  1129. #define RTE_UART1_RX_PORT 5
  1130. #define RTE_UART1_RX_BIT 7
  1131. #define RTE_UART1_RX_FUNC 4
  1132. #elif (RTE_UART1_RX_ID == 3)
  1133. #define RTE_UART1_RX_PORT 0xC
  1134. #define RTE_UART1_RX_BIT 14
  1135. #define RTE_UART1_RX_FUNC 2
  1136. #elif (RTE_UART1_RX_ID == 4)
  1137. #define RTE_UART1_RX_PORT 0xE
  1138. #define RTE_UART1_RX_BIT 12
  1139. #define RTE_UART1_RX_FUNC 2
  1140. #else
  1141. #error "Invalid UART1_RX Pin Configuration!"
  1142. #endif
  1143. // <h> Modem Lines
  1144. // <o> CTS <0=>Not used <1=>P1_11 <2=>P5_4 <3=>PC_2 <4=>PE_7
  1145. #define RTE_UART1_CTS_ID 1
  1146. #if (RTE_UART1_CTS_ID == 0)
  1147. #define RTE_UART1_CTS_PIN_EN 0
  1148. #elif (RTE_UART1_CTS_ID == 1)
  1149. #define RTE_UART1_CTS_PORT 1
  1150. #define RTE_UART1_CTS_BIT 11
  1151. #define RTE_UART1_CTS_FUNC 1
  1152. #elif (RTE_UART1_CTS_ID == 2)
  1153. #define RTE_UART1_CTS_PORT 5
  1154. #define RTE_UART1_CTS_BIT 4
  1155. #define RTE_UART1_CTS_FUNC 4
  1156. #elif (RTE_UART1_CTS_ID == 3)
  1157. #define RTE_UART1_CTS_PORT 0xC
  1158. #define RTE_UART1_CTS_BIT 2
  1159. #define RTE_UART1_CTS_FUNC 2
  1160. #elif (RTE_UART1_CTS_ID == 4)
  1161. #define RTE_UART1_CTS_PORT 0xE
  1162. #define RTE_UART1_CTS_BIT 7
  1163. #define RTE_UART1_CTS_FUNC 2
  1164. #else
  1165. #error "Invalid UART1_CTS Pin Configuration!"
  1166. #endif
  1167. #ifndef RTE_UART1_CTS_PIN_EN
  1168. #define RTE_UART1_CTS_PIN_EN 1
  1169. #endif
  1170. // <o> RTS <0=>Not used <1=>P1_9 <2=>P5_2 <3=>PC_3 <4=>PE_5
  1171. #define RTE_UART1_RTS_ID 1
  1172. #if (RTE_UART1_RTS_ID == 0)
  1173. #define RTE_UART1_RTS_PIN_EN 0
  1174. #elif (RTE_UART1_RTS_ID == 1)
  1175. #define RTE_UART1_RTS_PORT 1
  1176. #define RTE_UART1_RTS_BIT 9
  1177. #define RTE_UART1_RTS_FUNC 1
  1178. #elif (RTE_UART1_RTS_ID == 2)
  1179. #define RTE_UART1_RTS_PORT 5
  1180. #define RTE_UART1_RTS_BIT 2
  1181. #define RTE_UART1_RTS_FUNC 4
  1182. #elif (RTE_UART1_RTS_ID == 3)
  1183. #define RTE_UART1_RTS_PORT 0xC
  1184. #define RTE_UART1_RTS_BIT 3
  1185. #define RTE_UART1_RTS_FUNC 2
  1186. #elif (RTE_UART1_RTS_ID == 4)
  1187. #define RTE_UART1_RTS_PORT 0xE
  1188. #define RTE_UART1_RTS_BIT 5
  1189. #define RTE_UART1_RTS_FUNC 2
  1190. #else
  1191. #error "Invalid UART1_RTS Pin Configuration!"
  1192. #endif
  1193. #ifndef RTE_UART1_RTS_PIN_EN
  1194. #define RTE_UART1_RTS_PIN_EN 1
  1195. #endif
  1196. // <o> DCD <0=>Not used <1=>P1_12 <2=>P5_5 <3=>PC_11 <4=>PE_9
  1197. #define RTE_UART1_DCD_ID 1
  1198. #if (RTE_UART1_DCD_ID == 0)
  1199. #define RTE_UART1_DCD_PIN_EN 0
  1200. #elif (RTE_UART1_DCD_ID == 1)
  1201. #define RTE_UART1_DCD_PORT 1
  1202. #define RTE_UART1_DCD_BIT 12
  1203. #define RTE_UART1_DCD_FUNC 1
  1204. #elif (RTE_UART1_DCD_ID == 2)
  1205. #define RTE_UART1_DCD_PORT 5
  1206. #define RTE_UART1_DCD_BIT 5
  1207. #define RTE_UART1_DCD_FUNC 4
  1208. #elif (RTE_UART1_DCD_ID == 3)
  1209. #define RTE_UART1_DCD_PORT 0xC
  1210. #define RTE_UART1_DCD_BIT 11
  1211. #define RTE_UART1_DCD_FUNC 2
  1212. #elif (RTE_UART1_DCD_ID == 4)
  1213. #define RTE_UART1_DCD_PORT 0xE
  1214. #define RTE_UART1_DCD_BIT 9
  1215. #define RTE_UART1_DCD_FUNC 2
  1216. #else
  1217. #error "Invalid UART1_DCD Pin Configuration!"
  1218. #endif
  1219. #ifndef RTE_UART1_DCD_PIN_EN
  1220. #define RTE_UART1_DCD_PIN_EN 1
  1221. #endif
  1222. // <o> DSR <0=>Not used <1=>P1_7 <2=>P5_0 <3=>PC_10 <4=>PE_8
  1223. #define RTE_UART1_DSR_ID 1
  1224. #if (RTE_UART1_DSR_ID == 0)
  1225. #define RTE_UART1_DSR_PIN_EN 0
  1226. #elif (RTE_UART1_DSR_ID == 1)
  1227. #define RTE_UART1_DSR_PORT 1
  1228. #define RTE_UART1_DSR_BIT 7
  1229. #define RTE_UART1_DSR_FUNC 1
  1230. #elif (RTE_UART1_DSR_ID == 2)
  1231. #define RTE_UART1_DSR_PORT 5
  1232. #define RTE_UART1_DSR_BIT 0
  1233. #define RTE_UART1_DSR_FUNC 4
  1234. #elif (RTE_UART1_DSR_ID == 3)
  1235. #define RTE_UART1_DSR_PORT 0xC
  1236. #define RTE_UART1_DSR_BIT 10
  1237. #define RTE_UART1_DSR_FUNC 2
  1238. #elif (RTE_UART1_DSR_ID == 4)
  1239. #define RTE_UART1_DSR_PORT 0xE
  1240. #define RTE_UART1_DSR_BIT 8
  1241. #define RTE_UART1_DSR_FUNC 2
  1242. #else
  1243. #error "Invalid UART1_DSR Pin Configuration!"
  1244. #endif
  1245. #ifndef RTE_UART1_DSR_PIN_EN
  1246. #define RTE_UART1_DSR_PIN_EN 1
  1247. #endif
  1248. // <o> DTR <0=>Not used <1=>P1_8 <2=>P5_1 <3=>PC_12 <4=>PE_10
  1249. #define RTE_UART1_DTR_ID 1
  1250. #if (RTE_UART1_DTR_ID == 0)
  1251. #define RTE_UART1_DTR_PIN_EN 0
  1252. #elif (RTE_UART1_DTR_ID == 1)
  1253. #define RTE_UART1_DTR_PORT 1
  1254. #define RTE_UART1_DTR_BIT 8
  1255. #define RTE_UART1_DTR_FUNC 1
  1256. #elif (RTE_UART1_DTR_ID == 2)
  1257. #define RTE_UART1_DTR_PORT 5
  1258. #define RTE_UART1_DTR_BIT 1
  1259. #define RTE_UART1_DTR_FUNC 4
  1260. #elif (RTE_UART1_DTR_ID == 3)
  1261. #define RTE_UART1_DTR_PORT 0xC
  1262. #define RTE_UART1_DTR_BIT 12
  1263. #define RTE_UART1_DTR_FUNC 2
  1264. #elif (RTE_UART1_DTR_ID == 4)
  1265. #define RTE_UART1_DTR_PORT 0xE
  1266. #define RTE_UART1_DTR_BIT 10
  1267. #define RTE_UART1_DTR_FUNC 2
  1268. #else
  1269. #error "Invalid UART1_DTR Pin Configuration!"
  1270. #endif
  1271. #ifndef RTE_UART1_DTR_PIN_EN
  1272. #define RTE_UART1_DTR_PIN_EN 1
  1273. #endif
  1274. // <o> RI <0=>Not used <1=>P1_10 <2=>P5_3 <3=>PC_1 <4=>PE_6
  1275. #define RTE_UART1_RI_ID 1
  1276. #if (RTE_UART1_RI_ID == 0)
  1277. #define RTE_UART1_RI_PIN_EN 0
  1278. #elif (RTE_UART1_RI_ID == 1)
  1279. #define RTE_UART1_RI_PORT 1
  1280. #define RTE_UART1_RI_BIT 10
  1281. #define RTE_UART1_RI_FUNC 1
  1282. #elif (RTE_UART1_RI_ID == 2)
  1283. #define RTE_UART1_RI_PORT 5
  1284. #define RTE_UART1_RI_BIT 3
  1285. #define RTE_UART1_RI_FUNC 4
  1286. #elif (RTE_UART1_RI_ID == 3)
  1287. #define RTE_UART1_RI_PORT 0xC
  1288. #define RTE_UART1_RI_BIT 1
  1289. #define RTE_UART1_RI_FUNC 2
  1290. #elif (RTE_UART1_RI_ID == 4)
  1291. #define RTE_UART1_RI_PORT 0xE
  1292. #define RTE_UART1_RI_BIT 6
  1293. #define RTE_UART1_RI_FUNC 2
  1294. #else
  1295. #error "Invalid UART1_RI Pin Configuration!"
  1296. #endif
  1297. #ifndef RTE_UART1_RI_PIN_EN
  1298. #define RTE_UART1_RI_PIN_EN 1
  1299. #endif
  1300. // </h> Modem Lines
  1301. // </h> Pin Configuration
  1302. // <h> DMA
  1303. // <e> Tx
  1304. // <o1> Channel <0=>0 <1=>1 <2=>2 <3=>3 <4=>4 <5=>5 <6=>6 <7=>7
  1305. // <o2> Peripheral <0=>3 (DMAMUXPER3)
  1306. // </e>
  1307. #define RTE_UART1_DMA_TX_EN 0
  1308. #define RTE_UART1_DMA_TX_CH 0
  1309. #define RTE_UART1_DMA_TX_PERI_ID 0
  1310. #if (RTE_UART1_DMA_TX_PERI_ID == 0)
  1311. #define RTE_UART1_DMA_TX_PERI 3
  1312. #define RTE_UART1_DMA_TX_PERI_SEL 1
  1313. #endif
  1314. // <e> Rx
  1315. // <o1> Channel <0=>0 <1=>1 <2=>2 <3=>3 <4=>4 <5=>5 <6=>6 <7=>7
  1316. // <o2> Peripheral <0=>4 (DMAMUXPER4)
  1317. // </e>
  1318. #define RTE_UART1_DMA_RX_EN 0
  1319. #define RTE_UART1_DMA_RX_CH 1
  1320. #define RTE_UART1_DMA_RX_PERI_ID 0
  1321. #if (RTE_UART1_DMA_RX_PERI_ID == 0)
  1322. #define RTE_UART1_DMA_RX_PERI 4
  1323. #define RTE_UART1_DMA_RX_PERI_SEL 1
  1324. #endif
  1325. // </h> DMA
  1326. // </e> UART1 (Universal asynchronous receiver transmitter) [Driver_USART1]
  1327. // <e> USART2 (Universal synchronous asynchronous receiver transmitter) [Driver_USART2]
  1328. #define RTE_USART2 0
  1329. // <h> Pin Configuration
  1330. // <o> TX <0=>P1_15 <1=>P2_10 <2=>P7_1 <3=>PA_1
  1331. // <i> USART2 Serial Output pin
  1332. #define RTE_USART2_TX_ID 0
  1333. #if (RTE_USART2_TX_ID == 0)
  1334. #define RTE_USART2_TX_PORT 1
  1335. #define RTE_USART2_TX_BIT 15
  1336. #define RTE_USART2_TX_FUNC 1
  1337. #elif (RTE_USART2_TX_ID == 1)
  1338. #define RTE_USART2_TX_PORT 2
  1339. #define RTE_USART2_TX_BIT 10
  1340. #define RTE_USART2_TX_FUNC 2
  1341. #elif (RTE_USART2_TX_ID == 2)
  1342. #define RTE_USART2_TX_PORT 7
  1343. #define RTE_USART2_TX_BIT 1
  1344. #define RTE_USART2_TX_FUNC 6
  1345. #elif (RTE_USART2_TX_ID == 3)
  1346. #define RTE_USART2_TX_PORT 0xA
  1347. #define RTE_USART2_TX_BIT 1
  1348. #define RTE_USART2_TX_FUNC 3
  1349. #else
  1350. #error "Invalid USART2_TX Pin Configuration!"
  1351. #endif
  1352. // <o> RX <0=>P1_16 <1=>P2_11 <2=>P7_2 <3=>PA_2
  1353. // <i> USART2 Serial Input pin
  1354. #define RTE_USART2_RX_ID 0
  1355. #if (RTE_USART2_RX_ID == 0)
  1356. #define RTE_USART2_RX_PORT 1
  1357. #define RTE_USART2_RX_BIT 16
  1358. #define RTE_USART2_RX_FUNC 1
  1359. #elif (RTE_USART2_RX_ID == 1)
  1360. #define RTE_USART2_RX_PORT 2
  1361. #define RTE_USART2_RX_BIT 11
  1362. #define RTE_USART2_RX_FUNC 2
  1363. #elif (RTE_USART2_RX_ID == 2)
  1364. #define RTE_USART2_RX_PORT 7
  1365. #define RTE_USART2_RX_BIT 2
  1366. #define RTE_USART2_RX_FUNC 6
  1367. #elif (RTE_USART2_RX_ID == 3)
  1368. #define RTE_USART2_RX_PORT 0xA
  1369. #define RTE_USART2_RX_BIT 2
  1370. #define RTE_USART2_RX_FUNC 3
  1371. #else
  1372. #error "Invalid USART2_RX Pin Configuration!"
  1373. #endif
  1374. // <o> UCLK (Synchronous and SmartCard mode) <0=>Not used <1=>P1_17 <2=>P2_12
  1375. // <i> USART2 Serial Clock input/output synchronous mode
  1376. #define RTE_USART2_UCLK_ID 0
  1377. #if (RTE_USART2_UCLK_ID == 0)
  1378. #define RTE_USART2_UCLK_PIN_EN 0
  1379. #elif (RTE_USART2_UCLK_ID == 1)
  1380. #define RTE_USART2_UCLK_PORT 1
  1381. #define RTE_USART2_UCLK_BIT 17
  1382. #define RTE_USART2_UCLK_FUNC 1
  1383. #elif (RTE_USART2_UCLK_ID == 1)
  1384. #define RTE_USART2_UCLK_PORT 2
  1385. #define RTE_USART2_UCLK_BIT 12
  1386. #define RTE_USART2_UCLK_FUNC 7
  1387. #else
  1388. #error "Invalid USART2_UCLK Pin Configuration!"
  1389. #endif
  1390. #ifndef RTE_USART2_UCLK_PIN_EN
  1391. #define RTE_USART2_UCLK_PIN_EN 1
  1392. #endif
  1393. // </h> Pin Configuration
  1394. // <h> DMA
  1395. // <e> Tx
  1396. // <o1> Channel <0=>0 <1=>1 <2=>2 <3=>3 <4=>4 <5=>5 <6=>6 <7=>7
  1397. // <o2> Peripheral <0=>5 (DMAMUXPER5)
  1398. // </e>
  1399. #define RTE_USART2_DMA_TX_EN 0
  1400. #define RTE_USART2_DMA_TX_CH 0
  1401. #define RTE_USART2_DMA_TX_PERI_ID 0
  1402. #if (RTE_USART2_DMA_TX_PERI_ID == 0)
  1403. #define RTE_USART2_DMA_TX_PERI 5
  1404. #define RTE_USART2_DMA_TX_PERI_SEL 1
  1405. #endif
  1406. // <e> Rx
  1407. // <o1> Channel <0=>0 <1=>1 <2=>2 <3=>3 <4=>4 <5=>5 <6=>6 <7=>7
  1408. // <o2> Peripheral <0=>6 (DMAMUXPER6)
  1409. // </e>
  1410. #define RTE_USART2_DMA_RX_EN 0
  1411. #define RTE_USART2_DMA_RX_CH 1
  1412. #define RTE_USART2_DMA_RX_PERI_ID 0
  1413. #if (RTE_USART2_DMA_RX_PERI_ID == 0)
  1414. #define RTE_USART2_DMA_RX_PERI 6
  1415. #define RTE_USART2_DMA_RX_PERI_SEL 1
  1416. #endif
  1417. // </h> DMA
  1418. // </e> USART2 (Universal synchronous asynchronous receiver transmitter) [Driver_USART2]
  1419. // <e> USART3 (Universal synchronous asynchronous receiver transmitter) [Driver_USART3]
  1420. #define RTE_USART3 0
  1421. // <h> Pin Configuration
  1422. // <o> TX <0=>P2_3 <1=>P4_1 <2=>P9_3 <3=>PF_2
  1423. // <i> USART3 Serial Output pin
  1424. #define RTE_USART3_TX_ID 0
  1425. #if (RTE_USART3_TX_ID == 0)
  1426. #define RTE_USART3_TX_PORT 2
  1427. #define RTE_USART3_TX_BIT 3
  1428. #define RTE_USART3_TX_FUNC 2
  1429. #elif (RTE_USART3_TX_ID == 1)
  1430. #define RTE_USART3_TX_PORT 4
  1431. #define RTE_USART3_TX_BIT 1
  1432. #define RTE_USART3_TX_FUNC 6
  1433. #elif (RTE_USART3_TX_ID == 2)
  1434. #define RTE_USART3_TX_PORT 9
  1435. #define RTE_USART3_TX_BIT 3
  1436. #define RTE_USART3_TX_FUNC 7
  1437. #elif (RTE_USART3_TX_ID == 3)
  1438. #define RTE_USART3_TX_PORT 0xF
  1439. #define RTE_USART3_TX_BIT 2
  1440. #define RTE_USART3_TX_FUNC 1
  1441. #else
  1442. #error "Invalid USART3_TX Pin Configuration!"
  1443. #endif
  1444. // <o> RX <0=>P2_4 <1=>P4_2 <2=>P9_4 <3=>PF_3
  1445. // <i> USART3 Serial Input pin
  1446. #define RTE_USART3_RX_ID 0
  1447. #if (RTE_USART3_RX_ID == 0)
  1448. #define RTE_USART3_RX_PORT 2
  1449. #define RTE_USART3_RX_BIT 4
  1450. #define RTE_USART3_RX_FUNC 2
  1451. #elif (RTE_USART3_RX_ID == 1)
  1452. #define RTE_USART3_RX_PORT 4
  1453. #define RTE_USART3_RX_BIT 2
  1454. #define RTE_USART3_RX_FUNC 6
  1455. #elif (RTE_USART3_RX_ID == 2)
  1456. #define RTE_USART3_RX_PORT 9
  1457. #define RTE_USART3_RX_BIT 4
  1458. #define RTE_USART3_RX_FUNC 7
  1459. #elif (RTE_USART3_RX_ID == 3)
  1460. #define RTE_USART3_RX_PORT 0xF
  1461. #define RTE_USART3_RX_BIT 3
  1462. #define RTE_USART3_RX_FUNC 1
  1463. #else
  1464. #error "Invalid USART3_RX Pin Configuration!"
  1465. #endif
  1466. // <o> UCLK (Synchronous and SmartCard mode) <0=>Not used <1=>P2_7 <2=>P4_0 <3=>PF_5
  1467. // <i> USART3 Serial Clock input/output synchronous mode
  1468. #define RTE_USART3_UCLK_ID 0
  1469. #if (RTE_USART3_UCLK_ID == 0)
  1470. #define RTE_USART3_UCLK_PIN_EN 0
  1471. #elif (RTE_USART3_UCLK_ID == 1)
  1472. #define RTE_USART3_UCLK_PORT 2
  1473. #define RTE_USART3_UCLK_BIT 7
  1474. #define RTE_USART3_UCLK_FUNC 2
  1475. #elif (RTE_USART3_UCLK_ID == 2)
  1476. #define RTE_USART3_UCLK_PORT 4
  1477. #define RTE_USART3_UCLK_BIT 0
  1478. #define RTE_USART3_UCLK_FUNC 6
  1479. #elif (RTE_USART3_UCLK_ID == 3)
  1480. #define RTE_USART3_UCLK_PORT 0xF
  1481. #define RTE_USART3_UCLK_BIT 5
  1482. #define RTE_USART3_UCLK_FUNC 1
  1483. #else
  1484. #error "Invalid USART3_UCLK Pin Configuration!"
  1485. #endif
  1486. #ifndef RTE_USART3_UCLK_PIN_EN
  1487. #define RTE_USART3_UCLK_PIN_EN 1
  1488. #endif
  1489. // </h> Pin Configuration
  1490. // <h> DMA
  1491. // <e> Tx
  1492. // <o1> Channel <0=>0 <1=>1 <2=>2 <3=>3 <4=>4 <5=>5 <6=>6 <7=>7
  1493. // <o2> Peripheral <0=>7 (DMAMUXPER7) <1=>14 (DMAMUXPER14)
  1494. // </e>
  1495. #define RTE_USART3_DMA_TX_EN 0
  1496. #define RTE_USART3_DMA_TX_CH 0
  1497. #define RTE_USART3_DMA_TX_PERI_ID 0
  1498. #if (RTE_USART3_DMA_TX_PERI_ID == 0)
  1499. #define RTE_USART3_DMA_TX_PERI 7
  1500. #define RTE_USART3_DMA_TX_PERI_SEL 1
  1501. #elif (RTE_USART3_DMA_TX_PERI_ID == 1)
  1502. #define RTE_USART3_DMA_TX_PERI 14
  1503. #define RTE_USART3_DMA_TX_PERI_SEL 3
  1504. #endif
  1505. // <e> Rx
  1506. // <o1> Channel <0=>0 <1=>1 <2=>2 <3=>3 <4=>4 <5=>5 <6=>6 <7=>7
  1507. // <o2> Peripheral <0=>8 (DMAMUXPER8) <1=>13 (DMAMUXPER13)
  1508. // </e>
  1509. #define RTE_USART3_DMA_RX_EN 0
  1510. #define RTE_USART3_DMA_RX_CH 1
  1511. #define RTE_USART3_DMA_RX_PERI_ID 0
  1512. #if (RTE_USART3_DMA_RX_PERI_ID == 0)
  1513. #define RTE_USART3_DMA_RX_PERI 8
  1514. #define RTE_USART3_DMA_RX_PERI_SEL 1
  1515. #elif (RTE_USART3_DMA_RX_PERI_ID == 1)
  1516. #define RTE_USART3_DMA_RX_PERI 13
  1517. #define RTE_USART3_DMA_RX_PERI_SEL 3
  1518. #endif
  1519. // </h> DMA
  1520. // </e> USART3 (Universal synchronous asynchronous receiver transmitter) [Driver_USART3]
  1521. // <e> SSP0 (Synchronous Serial Port 0) [Driver_SPI0]
  1522. // <i> Configuration settings for Driver_SPI0 in component ::Drivers:SPI
  1523. #define RTE_SSP0 0
  1524. // <h> Pin Configuration
  1525. // <o> SSP0_SSEL <0=>Not used <1=>P1_0 <2=>P3_6 <3=>P3_8 <4=>P9_0 <5=>PF_1
  1526. // <i> Slave Select for SSP0
  1527. #define RTE_SSP0_SSEL_PIN_SEL 1
  1528. #if (RTE_SSP0_SSEL_PIN_SEL == 0)
  1529. #define RTE_SSP0_SSEL_PIN_EN 0
  1530. #elif (RTE_SSP0_SSEL_PIN_SEL == 1)
  1531. #define RTE_SSP0_SSEL_PORT 1
  1532. #define RTE_SSP0_SSEL_BIT 0
  1533. #define RTE_SSP0_SSEL_FUNC 5
  1534. #define RTE_SSP0_SSEL_GPIO_FUNC 0
  1535. #define RTE_SSP0_SSEL_GPIO_PORT 0
  1536. #define RTE_SSP0_SSEL_GPIO_BIT 4
  1537. #elif (RTE_SSP0_SSEL_PIN_SEL == 2)
  1538. #define RTE_SSP0_SSEL_PORT 3
  1539. #define RTE_SSP0_SSEL_BIT 6
  1540. #define RTE_SSP0_SSEL_FUNC 2
  1541. #define RTE_SSP0_SSEL_GPIO_FUNC 0
  1542. #define RTE_SSP0_SSEL_GPIO_PORT 0
  1543. #define RTE_SSP0_SSEL_GPIO_BIT 6
  1544. #elif (RTE_SSP0_SSEL_PIN_SEL == 3)
  1545. #define RTE_SSP0_SSEL_PORT 3
  1546. #define RTE_SSP0_SSEL_BIT 8
  1547. #define RTE_SSP0_SSEL_FUNC 5
  1548. #define RTE_SSP0_SSEL_GPIO_FUNC 4
  1549. #define RTE_SSP0_SSEL_GPIO_PORT 5
  1550. #define RTE_SSP0_SSEL_GPIO_BIT 11
  1551. #elif (RTE_SSP0_SSEL_PIN_SEL == 4)
  1552. #define RTE_SSP0_SSEL_PORT 9
  1553. #define RTE_SSP0_SSEL_BIT 0
  1554. #define RTE_SSP0_SSEL_FUNC 7
  1555. #define RTE_SSP0_SSEL_GPIO_FUNC 0
  1556. #define RTE_SSP0_SSEL_GPIO_PORT 4
  1557. #define RTE_SSP0_SSEL_GPIO_BIT 12
  1558. #elif (RTE_SSP0_SSEL_PIN_SEL == 5)
  1559. #define RTE_SSP0_SSEL_PORT 0xF
  1560. #define RTE_SSP0_SSEL_BIT 1
  1561. #define RTE_SSP0_SSEL_FUNC 2
  1562. #define RTE_SSP0_SSEL_GPIO_FUNC 4
  1563. #define RTE_SSP0_SSEL_GPIO_PORT 7
  1564. #define RTE_SSP0_SSEL_GPIO_BIT 16
  1565. #else
  1566. #error "Invalid SSP0 SSP0_SSEL Pin Configuration!"
  1567. #endif
  1568. #ifndef RTE_SSP0_SSEL_PIN_EN
  1569. #define RTE_SSP0_SSEL_PIN_EN 1
  1570. #endif
  1571. // <o> SSP0_SCK <0=>P3_0 <1=>P3_3 <2=>PF_0
  1572. // <i> Serial clock for SSP0
  1573. #define RTE_SSP0_SCK_PIN_SEL 0
  1574. #if (RTE_SSP0_SCK_PIN_SEL == 0)
  1575. #define RTE_SSP0_SCK_PORT 3
  1576. #define RTE_SSP0_SCK_BIT 0
  1577. #define RTE_SSP0_SCK_FUNC 4
  1578. #elif (RTE_SSP0_SCK_PIN_SEL == 1)
  1579. #define RTE_SSP0_SCK_PORT 3
  1580. #define RTE_SSP0_SCK_BIT 3
  1581. #define RTE_SSP0_SCK_FUNC 2
  1582. #elif (RTE_SSP0_SCK_PIN_SEL == 2)
  1583. #define RTE_SSP0_SCK_PORT 0xF
  1584. #define RTE_SSP0_SCK_BIT 0
  1585. #define RTE_SSP0_SCK_FUNC 0
  1586. #else
  1587. #error "Invalid SSP0 SSP0_SCK Pin Configuration!"
  1588. #endif
  1589. // <o> SSP0_MISO <0=>P1_1 <1=>P3_6 <2=>P3_7 <3=>P9_1 <4=>PF_2
  1590. // <i> Master In Slave Out for SSP0
  1591. #define RTE_SSP0_MISO_PIN_SEL 0
  1592. #if (RTE_SSP0_MISO_PIN_SEL == 0)
  1593. #define RTE_SSP0_MISO_PORT 1
  1594. #define RTE_SSP0_MISO_BIT 1
  1595. #define RTE_SSP0_MISO_FUNC 5
  1596. #elif (RTE_SSP0_MISO_PIN_SEL == 1)
  1597. #define RTE_SSP0_MISO_PORT 3
  1598. #define RTE_SSP0_MISO_BIT 6
  1599. #define RTE_SSP0_MISO_FUNC 5
  1600. #elif (RTE_SSP0_MISO_PIN_SEL == 2)
  1601. #define RTE_SSP0_MISO_PORT 3
  1602. #define RTE_SSP0_MISO_BIT 7
  1603. #define RTE_SSP0_MISO_FUNC 2
  1604. #elif (RTE_SSP0_MISO_PIN_SEL == 3)
  1605. #define RTE_SSP0_MISO_PORT 9
  1606. #define RTE_SSP0_MISO_BIT 1
  1607. #define RTE_SSP0_MISO_FUNC 7
  1608. #elif (RTE_SSP0_MISO_PIN_SEL == 4)
  1609. #define RTE_SSP0_MISO_PORT 0xF
  1610. #define RTE_SSP0_MISO_BIT 2
  1611. #define RTE_SSP0_MISO_FUNC 2
  1612. #else
  1613. #error "Invalid SSP0 SSP0_MISO Pin Configuration!"
  1614. #endif
  1615. // <o> SSP0_MOSI <0=>P1_2 <1=>P3_7 <2=>P3_8 <3=>P9_2 <4=>PF_3
  1616. // <i> Master Out Slave In for SSP0
  1617. #define RTE_SSP0_MOSI_PIN_SEL 0
  1618. #if (RTE_SSP0_MOSI_PIN_SEL == 0)
  1619. #define RTE_SSP0_MOSI_PORT 1
  1620. #define RTE_SSP0_MOSI_BIT 2
  1621. #define RTE_SSP0_MOSI_FUNC 5
  1622. #elif (RTE_SSP0_MOSI_PIN_SEL == 1)
  1623. #define RTE_SSP0_MOSI_PORT 3
  1624. #define RTE_SSP0_MOSI_BIT 7
  1625. #define RTE_SSP0_MOSI_FUNC 5
  1626. #elif (RTE_SSP0_MOSI_PIN_SEL == 2)
  1627. #define RTE_SSP0_MOSI_PORT 3
  1628. #define RTE_SSP0_MOSI_BIT 8
  1629. #define RTE_SSP0_MOSI_FUNC 2
  1630. #elif (RTE_SSP0_MOSI_PIN_SEL == 3)
  1631. #define RTE_SSP0_MOSI_PORT 9
  1632. #define RTE_SSP0_MOSI_BIT 2
  1633. #define RTE_SSP0_MOSI_FUNC 7
  1634. #elif (RTE_SSP0_MOSI_PIN_SEL == 4)
  1635. #define RTE_SSP0_MOSI_PORT 0xF
  1636. #define RTE_SSP0_MOSI_BIT 3
  1637. #define RTE_SSP0_MOSI_FUNC 2
  1638. #else
  1639. #error "Invalid SSP0 SSP0_MOSI Pin Configuration!"
  1640. #endif
  1641. // </h> Pin Configuration
  1642. // <h> DMA
  1643. // <e> Tx
  1644. // <o1> Channel <0=>0 <1=>1 <2=>2 <3=>3 <4=>4 <5=>5 <6=>6 <7=>7
  1645. // <o2> Peripheral <0=>10 (DMAMUXPER10)
  1646. // </e>
  1647. #define RTE_SSP0_DMA_TX_EN 0
  1648. #define RTE_SSP0_DMA_TX_CH 0
  1649. #define RTE_SSP0_DMA_TX_PERI_ID 0
  1650. #if (RTE_SSP0_DMA_TX_PERI_ID == 0)
  1651. #define RTE_SSP0_DMA_TX_PERI 10
  1652. #define RTE_SSP0_DMA_TX_PERI_SEL 0
  1653. #endif
  1654. // <e> Rx
  1655. // <o1> Channel <0=>0 <1=>1 <2=>2 <3=>3 <4=>4 <5=>5 <6=>6 <7=>7
  1656. // <o2> Peripheral <0=>9 (DMAMUXPER9)
  1657. // </e>
  1658. #define RTE_SSP0_DMA_RX_EN 0
  1659. #define RTE_SSP0_DMA_RX_CH 1
  1660. #define RTE_SSP0_DMA_RX_PERI_ID 0
  1661. #if (RTE_SSP0_DMA_RX_PERI_ID == 0)
  1662. #define RTE_SSP0_DMA_RX_PERI 9
  1663. #define RTE_SSP0_DMA_RX_PERI_SEL 0
  1664. #endif
  1665. // </h> DMA
  1666. // </e> SSP0 (Synchronous Serial Port 0) [Driver_SPI0]
  1667. // <e> SSP1 (Synchronous Serial Port 1) [Driver_SPI1]
  1668. // <i> Configuration settings for Driver_SPI1 in component ::Drivers:SPI
  1669. #define RTE_SSP1 0
  1670. // <h> Pin Configuration
  1671. // <o> SSP1_SSEL <0=>Not used <1=>P1_5 <2=>P1_20 <3=>PF_5
  1672. // <i> Slave Select for SSP1
  1673. #define RTE_SSP1_SSEL_PIN_SEL 1
  1674. #if (RTE_SSP1_SSEL_PIN_SEL == 0)
  1675. #define RTE_SSP1_SSEL_PIN_EN 0
  1676. #elif (RTE_SSP1_SSEL_PIN_SEL == 1)
  1677. #define RTE_SSP1_SSEL_PORT 1
  1678. #define RTE_SSP1_SSEL_BIT 5
  1679. #define RTE_SSP1_SSEL_FUNC 5
  1680. #define RTE_SSP1_SSEL_GPIO_FUNC 0
  1681. #define RTE_SSP1_SSEL_GPIO_PORT 1
  1682. #define RTE_SSP1_SSEL_GPIO_BIT 8
  1683. #elif (RTE_SSP1_SSEL_PIN_SEL == 2)
  1684. #define RTE_SSP1_SSEL_PORT 1
  1685. #define RTE_SSP1_SSEL_BIT 20
  1686. #define RTE_SSP1_SSEL_FUNC 1
  1687. #define RTE_SSP1_SSEL_GPIO_FUNC 0
  1688. #define RTE_SSP1_SSEL_GPIO_PORT 0
  1689. #define RTE_SSP1_SSEL_GPIO_BIT 15
  1690. #elif (RTE_SSP1_SSEL_PIN_SEL == 3)
  1691. #define RTE_SSP1_SSEL_PORT 0xF
  1692. #define RTE_SSP1_SSEL_BIT 5
  1693. #define RTE_SSP1_SSEL_FUNC 2
  1694. #define RTE_SSP1_SSEL_GPIO_FUNC 4
  1695. #define RTE_SSP1_SSEL_GPIO_PORT 7
  1696. #define RTE_SSP1_SSEL_GPIO_BIT 19
  1697. #else
  1698. #error "Invalid SSP1 SSP1_SSEL Pin Configuration!"
  1699. #endif
  1700. #ifndef RTE_SSP1_SSEL_PIN_EN
  1701. #define RTE_SSP1_SSEL_PIN_EN 1
  1702. #endif
  1703. // <o> SSP1_SCK <0=>P1_19 <1=>PF_4 <2=>CLK0
  1704. // <i> Serial clock for SSP1
  1705. #define RTE_SSP1_SCK_PIN_SEL 0
  1706. #if (RTE_SSP1_SCK_PIN_SEL == 0)
  1707. #define RTE_SSP1_SCK_PORT 1
  1708. #define RTE_SSP1_SCK_BIT 19
  1709. #define RTE_SSP1_SCK_FUNC 1
  1710. #elif (RTE_SSP1_SCK_PIN_SEL == 1)
  1711. #define RTE_SSP1_SCK_PORT 0xF
  1712. #define RTE_SSP1_SCK_BIT 4
  1713. #define RTE_SSP1_SCK_FUNC 0
  1714. #elif (RTE_SSP1_SCK_PIN_SEL == 2)
  1715. #define RTE_SSP1_SCK_PORT 0x10
  1716. #define RTE_SSP1_SCK_BIT 0
  1717. #define RTE_SSP1_SCK_FUNC 6
  1718. #else
  1719. #error "Invalid SSP1 SSP1_SCK Pin Configuration!"
  1720. #endif
  1721. // <o> SSP1_MISO <0=>P0_0 <1=>P1_3 <2=>PF_6
  1722. // <i> Master In Slave Out for SSP1
  1723. #define RTE_SSP1_MISO_PIN_SEL 0
  1724. #if (RTE_SSP1_MISO_PIN_SEL == 0)
  1725. #define RTE_SSP1_MISO_PORT 0
  1726. #define RTE_SSP1_MISO_BIT 0
  1727. #define RTE_SSP1_MISO_FUNC 1
  1728. #elif (RTE_SSP1_MISO_PIN_SEL == 1)
  1729. #define RTE_SSP1_MISO_PORT 1
  1730. #define RTE_SSP1_MISO_BIT 3
  1731. #define RTE_SSP1_MISO_FUNC 5
  1732. #elif (RTE_SSP1_MISO_PIN_SEL == 2)
  1733. #define RTE_SSP1_MISO_PORT 0xF
  1734. #define RTE_SSP1_MISO_BIT 6
  1735. #define RTE_SSP1_MISO_FUNC 2
  1736. #else
  1737. #error "Invalid SSP1 SSP1_MISO Pin Configuration!"
  1738. #endif
  1739. // <o> SSP1_MOSI <0=>P0_1 <1=>P1_4 <2=>PF_7
  1740. // <i> Master Out Slave In for SSP1
  1741. #define RTE_SSP1_MOSI_PIN_SEL 0
  1742. #if (RTE_SSP1_MOSI_PIN_SEL == 0)
  1743. #define RTE_SSP1_MOSI_PORT 0
  1744. #define RTE_SSP1_MOSI_BIT 1
  1745. #define RTE_SSP1_MOSI_FUNC 1
  1746. #elif (RTE_SSP1_MOSI_PIN_SEL == 1)
  1747. #define RTE_SSP1_MOSI_PORT 1
  1748. #define RTE_SSP1_MOSI_BIT 4
  1749. #define RTE_SSP1_MOSI_FUNC 5
  1750. #elif (RTE_SSP1_MOSI_PIN_SEL == 2)
  1751. #define RTE_SSP1_MOSI_PORT 0xF
  1752. #define RTE_SSP1_MOSI_BIT 7
  1753. #define RTE_SSP1_MOSI_FUNC 2
  1754. #else
  1755. #error "Invalid SSP1 SSP1_MOSI Pin Configuration!"
  1756. #endif
  1757. // </h> Pin Configuration
  1758. // <h> DMA
  1759. // <e> Tx
  1760. // <o1> Channel <0=>0 <1=>1 <2=>2 <3=>3 <4=>4 <5=>5 <6=>6 <7=>7
  1761. // <o2> Peripheral <0=>3 (DMAMUXPER3) <1=>5 (DMAMUXPER5) <2=>12 (DMAMUXPER12) <3=>14 (DMAMUXPER14)
  1762. // </e>
  1763. #define RTE_SSP1_DMA_TX_EN 0
  1764. #define RTE_SSP1_DMA_TX_CH 0
  1765. #define RTE_SSP1_DMA_TX_PERI_ID 0
  1766. #if (RTE_SSP1_DMA_TX_PERI_ID == 0)
  1767. #define RTE_SSP1_DMA_TX_PERI 3
  1768. #define RTE_SSP1_DMA_TX_PERI_SEL 3
  1769. #elif (RTE_SSP1_DMA_TX_PERI_ID == 1)
  1770. #define RTE_SSP1_DMA_TX_PERI 5
  1771. #define RTE_SSP1_DMA_TX_PERI_SEL 2
  1772. #elif (RTE_SSP1_DMA_TX_PERI_ID == 2)
  1773. #define RTE_SSP1_DMA_TX_PERI 12
  1774. #define RTE_SSP1_DMA_TX_PERI_SEL 0
  1775. #elif (RTE_SSP1_DMA_TX_PERI_ID == 3)
  1776. #define RTE_SSP1_DMA_TX_PERI 14
  1777. #define RTE_SSP1_DMA_TX_PERI_SEL 2
  1778. #endif
  1779. // <e> Rx
  1780. // <o1> Channel <0=>0 <1=>1 <2=>2 <3=>3 <4=>4 <5=>5 <6=>6 <7=>7
  1781. // <o2> Peripheral <0=>4 (DMAMUXPER4) <1=>6 (DMAMUXPER6) <2=>11 (DMAMUXPER11) <3=>13 (DMAMUXPER13)
  1782. // </e>
  1783. #define RTE_SSP1_DMA_RX_EN 0
  1784. #define RTE_SSP1_DMA_RX_CH 1
  1785. #define RTE_SSP1_DMA_RX_PERI_ID 0
  1786. #if (RTE_SSP1_DMA_RX_PERI_ID == 0)
  1787. #define RTE_SSP1_DMA_RX_PERI 4
  1788. #define RTE_SSP1_DMA_RX_PERI_SEL 3
  1789. #elif (RTE_SSP1_DMA_RX_PERI_ID == 1)
  1790. #define RTE_SSP1_DMA_RX_PERI 6
  1791. #define RTE_SSP1_DMA_RX_PERI_SEL 2
  1792. #elif (RTE_SSP1_DMA_RX_PERI_ID == 2)
  1793. #define RTE_SSP1_DMA_RX_PERI 11
  1794. #define RTE_SSP1_DMA_RX_PERI_SEL 0
  1795. #elif (RTE_SSP1_DMA_RX_PERI_ID == 3)
  1796. #define RTE_SSP1_DMA_RX_PERI 13
  1797. #define RTE_SSP1_DMA_RX_PERI_SEL 2
  1798. #endif
  1799. // </h> DMA
  1800. // </e> SSP1 (Synchronous Serial Port 1) [Driver_SPI1]
  1801. // <e> I2S0 (Integrated Interchip Sound 0) [Driver_SAI0]
  1802. // <i> Configuration settings for Driver_SAI0 in component ::Drivers:SAI
  1803. #define RTE_I2S0 0
  1804. // <h> Pin Configuration
  1805. // <o> I2S0_RX_SCK <0=>Not used <1=>P3_0 <2=>P6_0 <3=>PF_4
  1806. // <i> Receive clock for I2S0
  1807. #define RTE_I2S0_RX_SCK_PIN_SEL 2
  1808. #if (RTE_I2S0_RX_SCK_PIN_SEL == 0)
  1809. #define RTE_I2S0_RX_SCK_PIN_EN 0
  1810. #elif (RTE_I2S0_RX_SCK_PIN_SEL == 1)
  1811. #define RTE_I2S0_RX_SCK_PORT 3
  1812. #define RTE_I2S0_RX_SCK_BIT 0
  1813. #define RTE_I2S0_RX_SCK_FUNC 0
  1814. #elif (RTE_I2S0_RX_SCK_PIN_SEL == 2)
  1815. #define RTE_I2S0_RX_SCK_PORT 6
  1816. #define RTE_I2S0_RX_SCK_BIT 0
  1817. #define RTE_I2S0_RX_SCK_FUNC 4
  1818. #elif (RTE_I2S0_RX_SCK_PIN_SEL == 3)
  1819. #define RTE_I2S0_RX_SCK_PORT 0xF
  1820. #define RTE_I2S0_RX_SCK_BIT 4
  1821. #define RTE_I2S0_RX_SCK_FUNC 7
  1822. #else
  1823. #error "Invalid I2S0 I2S0_RX_SCK Pin Configuration!"
  1824. #endif
  1825. #ifndef RTE_I2S0_RX_SCK_PIN_EN
  1826. #define RTE_I2S0_RX_SCK_PIN_EN 1
  1827. #endif
  1828. // <o> I2S0_RX_WS <0=>Not used <1=>P3_1 <2=>P6_1
  1829. // <i> Receive word select for I2S0
  1830. #define RTE_I2S0_RX_WS_PIN_SEL 2
  1831. #if (RTE_I2S0_RX_WS_PIN_SEL == 0)
  1832. #define RTE_I2S0_RX_WS_PIN_EN 0
  1833. #elif (RTE_I2S0_RX_WS_PIN_SEL == 1)
  1834. #define RTE_I2S0_RX_WS_PORT 3
  1835. #define RTE_I2S0_RX_WS_BIT 1
  1836. #define RTE_I2S0_RX_WS_FUNC 1
  1837. #elif (RTE_I2S0_RX_WS_PIN_SEL == 2)
  1838. #define RTE_I2S0_RX_WS_PORT 6
  1839. #define RTE_I2S0_RX_WS_BIT 1
  1840. #define RTE_I2S0_RX_WS_FUNC 3
  1841. #else
  1842. #error "Invalid I2S0 I2S0_RX_WS Pin Configuration!"
  1843. #endif
  1844. #ifndef RTE_I2S0_RX_WS_PIN_EN
  1845. #define RTE_I2S0_RX_WS_PIN_EN 1
  1846. #endif
  1847. // <o> I2S0_RX_SDA <0=>Not used <1=>P3_2 <2=>P6_2
  1848. // <i> Receive master clock for I2S0
  1849. #define RTE_I2S0_RX_SDA_PIN_SEL 2
  1850. #if (RTE_I2S0_RX_SDA_PIN_SEL == 0)
  1851. #define RTE_I2S0_RX_SDA_PIN_EN 0
  1852. #elif (RTE_I2S0_RX_SDA_PIN_SEL == 1)
  1853. #define RTE_I2S0_RX_SDA_PORT 3
  1854. #define RTE_I2S0_RX_SDA_BIT 2
  1855. #define RTE_I2S0_RX_SDA_FUNC 1
  1856. #elif (RTE_I2S0_RX_SDA_PIN_SEL == 2)
  1857. #define RTE_I2S0_RX_SDA_PORT 6
  1858. #define RTE_I2S0_RX_SDA_BIT 2
  1859. #define RTE_I2S0_RX_SDA_FUNC 3
  1860. #else
  1861. #error "Invalid I2S0 I2S0_RX_SDA Pin Configuration!"
  1862. #endif
  1863. #ifndef RTE_I2S0_RX_SDA_PIN_EN
  1864. #define RTE_I2S0_RX_SDA_PIN_EN 1
  1865. #endif
  1866. // <o> I2S0_RX_MCLK <0=>Not used <1=>P1_19 <2=>P3_0 <3=>P6_0
  1867. // <i> Receive master clock for I2S0
  1868. #define RTE_I2S0_RX_MCLK_PIN_SEL 0
  1869. #if (RTE_I2S0_RX_MCLK_PIN_SEL == 0)
  1870. #define RTE_I2S0_RX_MCLK_PIN_EN 0
  1871. #elif (RTE_I2S0_RX_MCLK_PIN_SEL == 1)
  1872. #define RTE_I2S0_RX_MCLK_PORT 1
  1873. #define RTE_I2S0_RX_MCLK_BIT 19
  1874. #define RTE_I2S0_RX_MCLK_FUNC 6
  1875. #elif (RTE_I2S0_RX_MCLK_PIN_SEL == 2)
  1876. #define RTE_I2S0_RX_MCLK_PORT 3
  1877. #define RTE_I2S0_RX_MCLK_BIT 0
  1878. #define RTE_I2S0_RX_MCLK_FUNC 1
  1879. #elif (RTE_I2S0_RX_MCLK_PIN_SEL == 3)
  1880. #define RTE_I2S0_RX_MCLK_PORT 6
  1881. #define RTE_I2S0_RX_MCLK_BIT 0
  1882. #define RTE_I2S0_RX_MCLK_FUNC 1
  1883. #else
  1884. #error "Invalid I2S0 I2S0_RX_MCLK Pin Configuration!"
  1885. #endif
  1886. #ifndef RTE_I2S0_RX_MCLK_PIN_EN
  1887. #define RTE_I2S0_RX_MCLK_PIN_EN 1
  1888. #endif
  1889. // <o> I2S0_TX_SCK <0=>Not used <1=>P3_0 <2=>P4_7
  1890. // <i> Transmit clock for I2S0
  1891. #define RTE_I2S0_TX_SCK_PIN_SEL 1
  1892. #if (RTE_I2S0_TX_SCK_PIN_SEL == 0)
  1893. #define RTE_I2S0_TX_SCK_PIN_EN 0
  1894. #elif (RTE_I2S0_TX_SCK_PIN_SEL == 1)
  1895. #define RTE_I2S0_TX_SCK_PORT 3
  1896. #define RTE_I2S0_TX_SCK_BIT 0
  1897. #define RTE_I2S0_TX_SCK_FUNC 2
  1898. #elif (RTE_I2S0_TX_SCK_PIN_SEL == 2)
  1899. #define RTE_I2S0_TX_SCK_PORT 4
  1900. #define RTE_I2S0_TX_SCK_BIT 7
  1901. #define RTE_I2S0_TX_SCK_FUNC 7
  1902. #else
  1903. #error "Invalid I2S0 I2S0_TX_SCK Pin Configuration!"
  1904. #endif
  1905. #ifndef RTE_I2S0_TX_SCK_PIN_EN
  1906. #define RTE_I2S0_TX_SCK_PIN_EN 1
  1907. #endif
  1908. // <o> I2S0_TX_WS <0=>Not used <1=>P0_0 <2=>P3_1 <3=>P3_4 <4=>P7_1 <5=>P9_1 <6=>PC_13
  1909. // <i> Transmit word select for I2S0
  1910. #define RTE_I2S0_TX_WS_PIN_SEL 4
  1911. #if (RTE_I2S0_TX_WS_PIN_SEL == 0)
  1912. #define RTE_I2S0_TX_WS_PIN_EN 0
  1913. #elif (RTE_I2S0_TX_WS_PIN_SEL == 1)
  1914. #define RTE_I2S0_TX_WS_PORT 0
  1915. #define RTE_I2S0_TX_WS_BIT 0
  1916. #define RTE_I2S0_TX_WS_FUNC 6
  1917. #elif (RTE_I2S0_TX_WS_PIN_SEL == 2)
  1918. #define RTE_I2S0_TX_WS_PORT 3
  1919. #define RTE_I2S0_TX_WS_BIT 1
  1920. #define RTE_I2S0_TX_WS_FUNC 0
  1921. #elif (RTE_I2S0_TX_WS_PIN_SEL == 3)
  1922. #define RTE_I2S0_TX_WS_PORT 3
  1923. #define RTE_I2S0_TX_WS_BIT 4
  1924. #define RTE_I2S0_TX_WS_FUNC 5
  1925. #elif (RTE_I2S0_TX_WS_PIN_SEL == 4)
  1926. #define RTE_I2S0_TX_WS_PORT 7
  1927. #define RTE_I2S0_TX_WS_BIT 1
  1928. #define RTE_I2S0_TX_WS_FUNC 2
  1929. #elif (RTE_I2S0_TX_WS_PIN_SEL == 5)
  1930. #define RTE_I2S0_TX_WS_PORT 9
  1931. #define RTE_I2S0_TX_WS_BIT 1
  1932. #define RTE_I2S0_TX_WS_FUNC 4
  1933. #elif (RTE_I2S0_TX_WS_PIN_SEL == 6)
  1934. #define RTE_I2S0_TX_WS_PORT 0xC
  1935. #define RTE_I2S0_TX_WS_BIT 13
  1936. #define RTE_I2S0_TX_WS_FUNC 6
  1937. #else
  1938. #error "Invalid I2S0 I2S0_TX_WS Pin Configuration!"
  1939. #endif
  1940. #ifndef RTE_I2S0_TX_WS_PIN_EN
  1941. #define RTE_I2S0_TX_WS_PIN_EN 1
  1942. #endif
  1943. // <o> I2S0_TX_SDA <0=>Not used <1=>P3_2 <2=>P3_5 <3=>P7_2 <4=>P9_2 <5=>PC_12
  1944. // <i> Transmit data for I2S0
  1945. #define RTE_I2S0_TX_SDA_PIN_SEL 3
  1946. #if (RTE_I2S0_TX_SDA_PIN_SEL == 0)
  1947. #define RTE_I2S0_TX_SDA_PIN_EN 0
  1948. #elif (RTE_I2S0_TX_SDA_PIN_SEL == 1)
  1949. #define RTE_I2S0_TX_SDA_PORT 3
  1950. #define RTE_I2S0_TX_SDA_BIT 2
  1951. #define RTE_I2S0_TX_SDA_FUNC 0
  1952. #elif (RTE_I2S0_TX_SDA_PIN_SEL == 2)
  1953. #define RTE_I2S0_TX_SDA_PORT 3
  1954. #define RTE_I2S0_TX_SDA_BIT 5
  1955. #define RTE_I2S0_TX_SDA_FUNC 5
  1956. #elif (RTE_I2S0_TX_SDA_PIN_SEL == 3)
  1957. #define RTE_I2S0_TX_SDA_PORT 7
  1958. #define RTE_I2S0_TX_SDA_BIT 2
  1959. #define RTE_I2S0_TX_SDA_FUNC 2
  1960. #elif (RTE_I2S0_TX_SDA_PIN_SEL == 4)
  1961. #define RTE_I2S0_TX_SDA_PORT 9
  1962. #define RTE_I2S0_TX_SDA_BIT 2
  1963. #define RTE_I2S0_TX_SDA_FUNC 4
  1964. #elif (RTE_I2S0_TX_SDA_PIN_SEL == 5)
  1965. #define RTE_I2S0_TX_SDA_PORT 0xC
  1966. #define RTE_I2S0_TX_SDA_BIT 12
  1967. #define RTE_I2S0_TX_SDA_FUNC 6
  1968. #else
  1969. #error "Invalid I2S0 I2S0_TX_SDA Pin Configuration!"
  1970. #endif
  1971. #ifndef RTE_I2S0_TX_SDA_PIN_EN
  1972. #define RTE_I2S0_TX_SDA_PIN_EN 1
  1973. #endif
  1974. // <o> I2S0_TX_MCLK <0=>Not used <1=>P3_0 <2=>P3_3 <3=>PF_4 <4=>CLK2
  1975. // <i> Transmit master clock for I2S0
  1976. #define RTE_I2S0_TX_MCLK_PIN_SEL 2
  1977. #if (RTE_I2S0_TX_MCLK_PIN_SEL == 0)
  1978. #define RTE_I2S0_TX_MCLK_PIN_EN 0
  1979. #elif (RTE_I2S0_TX_MCLK_PIN_SEL == 1)
  1980. #define RTE_I2S0_TX_MCLK_PORT 3
  1981. #define RTE_I2S0_TX_MCLK_BIT 0
  1982. #define RTE_I2S0_TX_MCLK_FUNC 3
  1983. #elif (RTE_I2S0_TX_MCLK_PIN_SEL == 2)
  1984. #define RTE_I2S0_TX_MCLK_PORT 3
  1985. #define RTE_I2S0_TX_MCLK_BIT 3
  1986. #define RTE_I2S0_TX_MCLK_FUNC 6
  1987. #elif (RTE_I2S0_TX_MCLK_PIN_SEL == 3)
  1988. #define RTE_I2S0_TX_MCLK_PORT 0xf
  1989. #define RTE_I2S0_TX_MCLK_BIT 4
  1990. #define RTE_I2S0_TX_MCLK_FUNC 6
  1991. #elif (RTE_I2S0_TX_MCLK_PIN_SEL == 4)
  1992. #define RTE_I2S0_TX_MCLK_PORT 0x10
  1993. #define RTE_I2S0_TX_MCLK_BIT 2
  1994. #define RTE_I2S0_TX_MCLK_FUNC 6
  1995. #else
  1996. #error "Invalid I2S0 I2S0_TX_MCLK Pin Configuration!"
  1997. #endif
  1998. #ifndef RTE_I2S0_TX_MCLK_PIN_EN
  1999. #define RTE_I2S0_TX_MCLK_PIN_EN 1
  2000. #endif
  2001. // </h> Pin Configuration
  2002. // <h> DMA
  2003. // <e> Tx
  2004. // <o1> Channel <0=>0 <1=>1 <2=>2 <3=>3 <4=>4 <5=>5 <6=>6 <7=>7
  2005. // <o2> Peripheral <0=>9 (DMAMUXPER9)
  2006. // </e>
  2007. #define RTE_I2S0_DMA_TX_EN 0
  2008. #define RTE_I2S0_DMA_TX_CH 0
  2009. #define RTE_I2S0_DMA_TX_PERI_ID 0
  2010. #if (RTE_I2S0_DMA_TX_PERI_ID == 0)
  2011. #define RTE_I2S0_DMA_TX_PERI 9
  2012. #define RTE_I2S0_DMA_TX_PERI_SEL 1
  2013. #endif
  2014. // <e> Rx
  2015. // <o1> Channel <0=>0 <1=>1 <2=>2 <3=>3 <4=>4 <5=>5 <6=>6 <7=>7
  2016. // <o2> Peripheral <0=>10 (DMAMUXPER10)
  2017. // </e>
  2018. #define RTE_I2S0_DMA_RX_EN 0
  2019. #define RTE_I2S0_DMA_RX_CH 1
  2020. #define RTE_I2S0_DMA_RX_PERI_ID 0
  2021. #if (RTE_I2S0_DMA_RX_PERI_ID == 0)
  2022. #define RTE_I2S0_DMA_RX_PERI 10
  2023. #define RTE_I2S0_DMA_RX_PERI_SEL 1
  2024. #endif
  2025. // </h> DMA
  2026. // </e> I2S0 (Integrated Interchip Sound 0) [Driver_SAI0]
  2027. // <e> I2S1 (Integrated Interchip Sound 1) [Driver_SAI1]
  2028. // <i> Configuration settings for Driver_I2S1 in component ::Drivers:SAI
  2029. #define RTE_I2S1 0
  2030. // <h> Pin Configuration
  2031. // <o> I2S1_RX_SCK <0=>Not used <1=>CLK2 <2=>CLK3
  2032. // <i> Receive clock for I2S1
  2033. #define RTE_I2S1_RX_SCK_PIN_SEL 0
  2034. #if (RTE_I2S1_RX_SCK_PIN_SEL == 0)
  2035. #define RTE_I2S1_RX_SCK_PIN_EN 0
  2036. #elif (RTE_I2S1_RX_SCK_PIN_SEL == 1)
  2037. #define RTE_I2S1_RX_SCK_PORT 0x10
  2038. #define RTE_I2S1_RX_SCK_BIT 2
  2039. #define RTE_I2S1_RX_SCK_FUNC 7
  2040. #elif (RTE_I2S1_RX_SCK_PIN_SEL == 2)
  2041. #define RTE_I2S1_RX_SCK_PORT 0x10
  2042. #define RTE_I2S1_RX_SCK_BIT 3
  2043. #define RTE_I2S1_RX_SCK_FUNC 7
  2044. #else
  2045. #error "Invalid I2S1 I2S1_RX_SCK Pin Configuration!"
  2046. #endif
  2047. #ifndef RTE_I2S1_RX_SCK_PIN_EN
  2048. #define RTE_I2S1_RX_SCK_PIN_EN 1
  2049. #endif
  2050. // <o> I2S1_RX_WS <0=>Not used <1=>P3_5
  2051. // <i> Receive word select for I2S1
  2052. #define RTE_I2S1_RX_WS_PIN_SEL 0
  2053. #if (RTE_I2S1_RX_WS_PIN_SEL == 0)
  2054. #define RTE_I2S1_RX_WS_PIN_EN 0
  2055. #elif (RTE_I2S1_RX_WS_PIN_SEL == 1)
  2056. #define RTE_I2S1_RX_WS_PORT 3
  2057. #define RTE_I2S1_RX_WS_BIT 5
  2058. #define RTE_I2S1_RX_WS_FUNC 6
  2059. #else
  2060. #error "Invalid I2S1 I2S1_RX_WS Pin Configuration!"
  2061. #endif
  2062. #ifndef RTE_I2S1_RX_WS_PIN_EN
  2063. #define RTE_I2S1_RX_WS_PIN_EN 1
  2064. #endif
  2065. // <o> I2S1_RX_SDA <0=>Not used <1=>P3_4
  2066. // <i> Receive master clock for I2S1
  2067. #define RTE_I2S1_RX_SDA_PIN_SEL 0
  2068. #if (RTE_I2S1_RX_SDA_PIN_SEL == 0)
  2069. #define RTE_I2S1_RX_SDA_PIN_EN 0
  2070. #elif (RTE_I2S1_RX_SDA_PIN_SEL == 1)
  2071. #define RTE_I2S1_RX_SDA_PORT 3
  2072. #define RTE_I2S1_RX_SDA_BIT 4
  2073. #define RTE_I2S1_RX_SDA_FUNC 6
  2074. #else
  2075. #error "Invalid I2S1 I2S1_RX_SDA Pin Configuration!"
  2076. #endif
  2077. #ifndef RTE_I2S1_RX_SDA_PIN_EN
  2078. #define RTE_I2S1_RX_SDA_PIN_EN 1
  2079. #endif
  2080. // <o> I2S1_RX_MCLK <0=>Not used <1=>PA_0
  2081. // <i> Receive master clock for I2S1
  2082. #define RTE_I2S1_RX_MCLK_PIN_SEL 0
  2083. #if (RTE_I2S1_RX_MCLK_PIN_SEL == 0)
  2084. #define RTE_I2S1_RX_MCLK_PIN_EN 0
  2085. #elif (RTE_I2S1_RX_MCLK_PIN_SEL == 1)
  2086. #define RTE_I2S1_RX_MCLK_PORT 0x0A
  2087. #define RTE_I2S1_RX_MCLK_BIT 0
  2088. #define RTE_I2S1_RX_MCLK_FUNC 5
  2089. #else
  2090. #error "Invalid I2S1 I2S1_RX_MCLK Pin Configuration!"
  2091. #endif
  2092. #ifndef RTE_I2S1_RX_MCLK_PIN_EN
  2093. #define RTE_I2S1_RX_MCLK_PIN_EN 1
  2094. #endif
  2095. // <o> I2S1_TX_SCK <0=>Not used <1=>P1_19 <2=>P3_3 <3=>P4_7
  2096. // <i> Transmit clock for I2S1
  2097. #define RTE_I2S1_TX_SCK_PIN_SEL 0
  2098. #if (RTE_I2S1_TX_SCK_PIN_SEL == 0)
  2099. #define RTE_I2S1_TX_SCK_PIN_EN 0
  2100. #elif (RTE_I2S1_TX_SCK_PIN_SEL == 1)
  2101. #define RTE_I2S1_TX_SCK_PORT 1
  2102. #define RTE_I2S1_TX_SCK_BIT 19
  2103. #define RTE_I2S1_TX_SCK_FUNC 7
  2104. #elif (RTE_I2S1_TX_SCK_PIN_SEL == 2)
  2105. #define RTE_I2S1_TX_SCK_PORT 3
  2106. #define RTE_I2S1_TX_SCK_BIT 3
  2107. #define RTE_I2S1_TX_SCK_FUNC 7
  2108. #elif (RTE_I2S1_TX_SCK_PIN_SEL == 3)
  2109. #define RTE_I2S1_TX_SCK_PORT 4
  2110. #define RTE_I2S1_TX_SCK_BIT 7
  2111. #define RTE_I2S1_TX_SCK_FUNC 6
  2112. #else
  2113. #error "Invalid I2S1 I2S1_TX_SCK Pin Configuration!"
  2114. #endif
  2115. #ifndef RTE_I2S1_TX_SCK_PIN_EN
  2116. #define RTE_I2S1_TX_SCK_PIN_EN 1
  2117. #endif
  2118. // <o> I2S1_TX_WS <0=>Not used <1=>P0_0 <2=>PF_7
  2119. // <i> Transmit word select for I2S1
  2120. #define RTE_I2S1_TX_WS_PIN_SEL 0
  2121. #if (RTE_I2S1_TX_WS_PIN_SEL == 0)
  2122. #define RTE_I2S1_TX_WS_PIN_EN 0
  2123. #elif (RTE_I2S1_TX_WS_PIN_SEL == 1)
  2124. #define RTE_I2S1_TX_WS_PORT 0
  2125. #define RTE_I2S1_TX_WS_BIT 0
  2126. #define RTE_I2S1_TX_WS_FUNC 7
  2127. #elif (RTE_I2S1_TX_WS_PIN_SEL == 2)
  2128. #define RTE_I2S1_TX_WS_PORT 0x0F
  2129. #define RTE_I2S1_TX_WS_BIT 7
  2130. #define RTE_I2S1_TX_WS_FUNC 7
  2131. #else
  2132. #error "Invalid I2S1 I2S1_TX_WS Pin Configuration!"
  2133. #endif
  2134. #ifndef RTE_I2S1_TX_WS_PIN_EN
  2135. #define RTE_I2S1_TX_WS_PIN_EN 1
  2136. #endif
  2137. // <o> I2S1_TX_SDA <0=>Not used <1=>P0_1 <2=>PF_6
  2138. // <i> Transmit data for I2S
  2139. #define RTE_I2S1_TX_SDA_PIN_SEL 0
  2140. #if (RTE_I2S1_TX_SDA_PIN_SEL == 0)
  2141. #define RTE_I2S1_TX_SDA_PIN_EN 0
  2142. #elif (RTE_I2S1_TX_SDA_PIN_SEL == 1)
  2143. #define RTE_I2S1_TX_SDA_PORT 0
  2144. #define RTE_I2S1_TX_SDA_BIT 1
  2145. #define RTE_I2S1_TX_SDA_FUNC 7
  2146. #elif (RTE_I2S1_TX_SDA_PIN_SEL == 2)
  2147. #define RTE_I2S1_TX_SDA_PORT 0x0F
  2148. #define RTE_I2S1_TX_SDA_BIT 6
  2149. #define RTE_I2S1_TX_SDA_FUNC 7
  2150. #else
  2151. #error "Invalid I2S1 I2S1_TX_SDA Pin Configuration!"
  2152. #endif
  2153. #ifndef RTE_I2S1_TX_SDA_PIN_EN
  2154. #define RTE_I2S1_TX_SDA_PIN_EN 1
  2155. #endif
  2156. // <o> I2S1_TX_MCLK <0=>Not used <1=>P8_8 <2=>PF_0 <3=>CLK1
  2157. // <i> Transmit master clock for I2S1
  2158. #define RTE_I2S1_TX_MCLK_PIN_SEL 0
  2159. #if (RTE_I2S1_TX_MCLK_PIN_SEL == 0)
  2160. #define RTE_I2S1_TX_MCLK_PIN_EN 0
  2161. #elif (RTE_I2S1_TX_MCLK_PIN_SEL == 1)
  2162. #define RTE_I2S1_TX_MCLK_PORT 8
  2163. #define RTE_I2S1_TX_MCLK_BIT 8
  2164. #define RTE_I2S1_TX_MCLK_FUNC 7
  2165. #elif (RTE_I2S1_TX_MCLK_PIN_SEL == 2)
  2166. #define RTE_I2S1_TX_MCLK_PORT 0x0F
  2167. #define RTE_I2S1_TX_MCLK_BIT 0
  2168. #define RTE_I2S1_TX_MCLK_FUNC 7
  2169. #elif (RTE_I2S1_TX_MCLK_PIN_SEL == 3)
  2170. #define RTE_I2S1_TX_MCLK_PORT 0x10
  2171. #define RTE_I2S1_TX_MCLK_BIT 1
  2172. #define RTE_I2S1_TX_MCLK_FUNC 7
  2173. #else
  2174. #error "Invalid I2S1 I2S1_TX_MCLK Pin Configuration!"
  2175. #endif
  2176. #ifndef RTE_I2S1_TX_MCLK_PIN_EN
  2177. #define RTE_I2S1_TX_MCLK_PIN_EN 1
  2178. #endif
  2179. // </h> Pin Configuration
  2180. // <h> DMA
  2181. // <e> Tx
  2182. // <o1> Channel <0=>0 <1=>1 <2=>2 <3=>3 <4=>4 <5=>5 <6=>6 <7=>7
  2183. // <o2> Peripheral <0=>3 (DMAMUXPER3)
  2184. // </e>
  2185. #define RTE_I2S1_DMA_TX_EN 0
  2186. #define RTE_I2S1_DMA_TX_CH 0
  2187. #define RTE_I2S1_DMA_TX_PERI_ID 0
  2188. #if (RTE_I2S1_DMA_TX_PERI_ID == 0)
  2189. #define RTE_I2S1_DMA_TX_PERI 3
  2190. #define RTE_I2S1_DMA_TX_PERI_SEL 2
  2191. #endif
  2192. // <e> Rx
  2193. // <o1> Channel <0=>0 <1=>1 <2=>2 <3=>3 <4=>4 <5=>5 <6=>6 <7=>7
  2194. // <o2> Peripheral <0=>4 (DMAMUXPER4)
  2195. // </e>
  2196. #define RTE_I2S1_DMA_RX_EN 0
  2197. #define RTE_I2S1_DMA_RX_CH 1
  2198. #define RTE_I2S1_DMA_RX_PERI_ID 0
  2199. #if (RTE_I2S1_DMA_RX_PERI_ID == 0)
  2200. #define RTE_I2S1_DMA_RX_PERI 4
  2201. #define RTE_I2S1_DMA_RX_PERI_SEL 2
  2202. #endif
  2203. // </h> DMA
  2204. // </e> I2S1 (Integrated Interchip Sound 1) [Driver_SAI1]
  2205. // <e> CAN0 Controller [Driver_CAN0]
  2206. // <i> Configuration settings for Driver_CAN0 in component ::Drivers:CAN
  2207. #define RTE_CAN_CAN0 0
  2208. // <h> Pin Configuration
  2209. // <o> CAN0_RD <0=>Not used <1=>P3_1 <2=>PE_2
  2210. // <i> CAN0 receiver input.
  2211. #define RTE_CAN0_RD_ID 0
  2212. #if (RTE_CAN0_RD_ID == 0)
  2213. #define RTE_CAN0_RD_PIN_EN 0
  2214. #elif (RTE_CAN0_RD_ID == 1)
  2215. #define RTE_CAN0_RD_PORT 3
  2216. #define RTE_CAN0_RD_BIT 1
  2217. #define RTE_CAN0_RD_FUNC 2
  2218. #elif (RTE_CAN0_RD_ID == 2)
  2219. #define RTE_CAN0_RD_PORT 0xE
  2220. #define RTE_CAN0_RD_BIT 2
  2221. #define RTE_CAN0_RD_FUNC 1
  2222. #else
  2223. #error "Invalid RTE_CAN0_RD Pin Configuration!"
  2224. #endif
  2225. #ifndef RTE_CAN0_RD_PIN_EN
  2226. #define RTE_CAN0_RD_PIN_EN 1
  2227. #endif
  2228. // <o> CAN0_TD <0=>Not used <1=>P3_2 <2=>PE_3
  2229. // <i> CAN0 transmitter output.
  2230. #define RTE_CAN0_TD_ID 0
  2231. #if (RTE_CAN0_TD_ID == 0)
  2232. #define RTE_CAN0_TD_PIN_EN 0
  2233. #elif (RTE_CAN0_TD_ID == 1)
  2234. #define RTE_CAN0_TD_PORT 3
  2235. #define RTE_CAN0_TD_BIT 2
  2236. #define RTE_CAN0_TD_FUNC 2
  2237. #elif (RTE_CAN0_TD_ID == 2)
  2238. #define RTE_CAN0_TD_PORT 0xE
  2239. #define RTE_CAN0_TD_BIT 3
  2240. #define RTE_CAN0_TD_FUNC 1
  2241. #else
  2242. #error "Invalid RTE_CAN0_TD Pin Configuration!"
  2243. #endif
  2244. #ifndef RTE_CAN0_TD_PIN_EN
  2245. #define RTE_CAN0_TD_PIN_EN 1
  2246. #endif
  2247. // </h> Pin Configuration
  2248. // </e> CAN0 Controller [Driver_CAN0]
  2249. // <e> CAN1 Controller [Driver_CAN1]
  2250. // <i> Configuration settings for Driver_CAN1 in component ::Drivers:CAN
  2251. #define RTE_CAN_CAN1 0
  2252. // <h> Pin Configuration
  2253. // <o> CAN1_RD <0=>Not used <1=>P1_18 <2=>P4_9 <3=>PE_1
  2254. // <i> CAN1 receiver input.
  2255. #define RTE_CAN1_RD_ID 0
  2256. #if (RTE_CAN1_RD_ID == 0)
  2257. #define RTE_CAN1_RD_PIN_EN 0
  2258. #elif (RTE_CAN1_RD_ID == 1)
  2259. #define RTE_CAN1_RD_PORT 1
  2260. #define RTE_CAN1_RD_BIT 18
  2261. #define RTE_CAN1_RD_FUNC 5
  2262. #elif (RTE_CAN1_RD_ID == 2)
  2263. #define RTE_CAN1_RD_PORT 4
  2264. #define RTE_CAN1_RD_BIT 9
  2265. #define RTE_CAN1_RD_FUNC 6
  2266. #elif (RTE_CAN1_RD_ID == 3)
  2267. #define RTE_CAN1_RD_PORT 0xE
  2268. #define RTE_CAN1_RD_BIT 1
  2269. #define RTE_CAN1_RD_FUNC 5
  2270. #else
  2271. #error "Invalid RTE_CAN1_RD Pin Configuration!"
  2272. #endif
  2273. #ifndef RTE_CAN1_RD_PIN_EN
  2274. #define RTE_CAN1_RD_PIN_EN 1
  2275. #endif
  2276. // <o> CAN1_TD <0=>Not used <1=>P1_17 <2=>P4_8 <3=>PE_0
  2277. // <i> CAN1 transmitter output.
  2278. #define RTE_CAN1_TD_ID 0
  2279. #if (RTE_CAN1_TD_ID == 0)
  2280. #define RTE_CAN1_TD_PIN_EN 0
  2281. #elif (RTE_CAN1_TD_ID == 1)
  2282. #define RTE_CAN1_TD_PORT 1
  2283. #define RTE_CAN1_TD_BIT 17
  2284. #define RTE_CAN1_TD_FUNC 5
  2285. #elif (RTE_CAN1_TD_ID == 2)
  2286. #define RTE_CAN1_TD_PORT 4
  2287. #define RTE_CAN1_TD_BIT 8
  2288. #define RTE_CAN1_TD_FUNC 6
  2289. #elif (RTE_CAN1_TD_ID == 3)
  2290. #define RTE_CAN1_TD_PORT 0xE
  2291. #define RTE_CAN1_TD_BIT 0
  2292. #define RTE_CAN1_TD_FUNC 5
  2293. #else
  2294. #error "Invalid RTE_CAN1_TD Pin Configuration!"
  2295. #endif
  2296. #ifndef RTE_CAN1_TD_PIN_EN
  2297. #define RTE_CAN1_TD_PIN_EN 1
  2298. #endif
  2299. // </h> Pin Configuration
  2300. // </e> CAN1 Controller [Driver_CAN1]
  2301. #endif /* __RTE_DEVICE_H */