board.h 85 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365
  1. /*
  2. ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. /*
  14. * This file has been automatically generated using ChibiStudio board
  15. * generator plugin. Do not edit manually.
  16. */
  17. #ifndef BOARD_H
  18. #define BOARD_H
  19. /*===========================================================================*/
  20. /* Driver constants. */
  21. /*===========================================================================*/
  22. /*
  23. * Setup for STMicroelectronics STM32F401C-Discovery board.
  24. */
  25. /*
  26. * Board identifier.
  27. */
  28. #define BOARD_ST_STM32F401C_DISCOVERY
  29. #define BOARD_NAME "STMicroelectronics STM32F401C-Discovery"
  30. /*
  31. * Board oscillators-related settings.
  32. * NOTE: LSE not fitted.
  33. */
  34. #if !defined(STM32_LSECLK)
  35. #define STM32_LSECLK 0U
  36. #endif
  37. #if !defined(STM32_HSECLK)
  38. #define STM32_HSECLK 8000000U
  39. #endif
  40. /*
  41. * Board voltages.
  42. * Required for performance limits calculation.
  43. */
  44. #define STM32_VDD 300U
  45. /*
  46. * MCU type as defined in the ST header.
  47. */
  48. #define STM32F401xC
  49. /*
  50. * IO pins assignments.
  51. */
  52. #define GPIOA_BUTTON 0U
  53. #define GPIOA_PIN1 1U
  54. #define GPIOA_PIN2 2U
  55. #define GPIOA_PIN3 3U
  56. #define GPIOA_CS43L22_LRCK 4U
  57. #define GPIOA_L3GD20_SCL 5U
  58. #define GPIOA_L3GD20_SD0 6U
  59. #define GPIOA_L3GD20_SDI 7U
  60. #define GPIOA_PIN8 8U
  61. #define GPIOA_VBUS_FS 9U
  62. #define GPIOA_OTG_FS_ID 10U
  63. #define GPIOA_OTG_FS_DM 11U
  64. #define GPIOA_OTG_FS_DP 12U
  65. #define GPIOA_SWDIO 13U
  66. #define GPIOA_SWCLK 14U
  67. #define GPIOA_PIN15 15U
  68. #define GPIOB_PIN0 0U
  69. #define GPIOB_PIN1 1U
  70. #define GPIOB_PIN2 2U
  71. #define GPIOB_SWO 3U
  72. #define GPIOB_PIN4 4U
  73. #define GPIOB_PIN5 5U
  74. #define GPIOB_LSM303DLHC_SCL 6U
  75. #define GPIOB_PIN7 7U
  76. #define GPIOB_PIN8 8U
  77. #define GPIOB_LSM303DLHC_SDA 9U
  78. #define GPIOB_MP45DT02_CLK_IN 10U
  79. #define GPIOB_PIN11 11U
  80. #define GPIOB_PIN12 12U
  81. #define GPIOB_PIN13 13U
  82. #define GPIOB_PIN14 14U
  83. #define GPIOB_PIN15 15U
  84. #define GPIOC_OTG_FS_POWER_ON 0U
  85. #define GPIOC_PIN1 1U
  86. #define GPIOC_PIN2 2U
  87. #define GPIOC_CS43L22_AIN4x 3U
  88. #define GPIOC_MP45DT02_PDM_OUT 3U
  89. #define GPIOC_PIN4 4U
  90. #define GPIOC_PIN5 5U
  91. #define GPIOC_PIN6 6U
  92. #define GPIOC_CS43L22_MCLK 7U
  93. #define GPIOC_PIN8 8U
  94. #define GPIOC_PIN9 9U
  95. #define GPIOC_CS43L22_SCLK 10U
  96. #define GPIOC_PIN11 11U
  97. #define GPIOC_CS43L22_SDIN 12U
  98. #define GPIOC_PIN13 13U
  99. #define GPIOC_OSC32_IN 14U
  100. #define GPIOC_OSC32_OUT 15U
  101. #define GPIOD_PIN0 0U
  102. #define GPIOD_PIN1 1U
  103. #define GPIOD_PIN2 2U
  104. #define GPIOD_PIN3 3U
  105. #define GPIOD_CS43L22_RESET 4U
  106. #define GPIOD_OverCurrent 5U
  107. #define GPIOD_PIN6 6U
  108. #define GPIOD_PIN7 7U
  109. #define GPIOD_PIN8 8U
  110. #define GPIOD_PIN9 9U
  111. #define GPIOD_PIN10 10U
  112. #define GPIOD_PIN11 11U
  113. #define GPIOD_LED4 12U
  114. #define GPIOD_LED3 13U
  115. #define GPIOD_LED5 14U
  116. #define GPIOD_LED6 15U
  117. #define GPIOE_L3GD20_INT1 0U
  118. #define GPIOE_L3GD20_INT2 1U
  119. #define GPIOE_LSM303DLHC_DRDY 2U
  120. #define GPIOE_L3GD20_CS 3U
  121. #define GPIOE_LSM303DLHC_INT1 4U
  122. #define GPIOE_LSM303DLHC_INT2 5U
  123. #define GPIOE_PIN6 6U
  124. #define GPIOE_PIN7 7U
  125. #define GPIOE_PIN8 8U
  126. #define GPIOE_PIN9 9U
  127. #define GPIOE_PIN10 10U
  128. #define GPIOE_PIN11 11U
  129. #define GPIOE_PIN12 12U
  130. #define GPIOE_PIN13 13U
  131. #define GPIOE_PIN14 14U
  132. #define GPIOE_PIN15 15U
  133. #define GPIOF_PIN0 0U
  134. #define GPIOF_PIN1 1U
  135. #define GPIOF_PIN2 2U
  136. #define GPIOF_PIN3 3U
  137. #define GPIOF_PIN4 4U
  138. #define GPIOF_PIN5 5U
  139. #define GPIOF_PIN6 6U
  140. #define GPIOF_PIN7 7U
  141. #define GPIOF_PIN8 8U
  142. #define GPIOF_PIN9 9U
  143. #define GPIOF_PIN10 10U
  144. #define GPIOF_PIN11 11U
  145. #define GPIOF_PIN12 12U
  146. #define GPIOF_PIN13 13U
  147. #define GPIOF_PIN14 14U
  148. #define GPIOF_PIN15 15U
  149. #define GPIOG_PIN0 0U
  150. #define GPIOG_PIN1 1U
  151. #define GPIOG_PIN2 2U
  152. #define GPIOG_PIN3 3U
  153. #define GPIOG_PIN4 4U
  154. #define GPIOG_PIN5 5U
  155. #define GPIOG_PIN6 6U
  156. #define GPIOG_PIN7 7U
  157. #define GPIOG_PIN8 8U
  158. #define GPIOG_PIN9 9U
  159. #define GPIOG_PIN10 10U
  160. #define GPIOG_PIN11 11U
  161. #define GPIOG_PIN12 12U
  162. #define GPIOG_PIN13 13U
  163. #define GPIOG_PIN14 14U
  164. #define GPIOG_PIN15 15U
  165. #define GPIOH_OSC_IN 0U
  166. #define GPIOH_OSC_OUT 1U
  167. #define GPIOH_PIN2 2U
  168. #define GPIOH_PIN3 3U
  169. #define GPIOH_PIN4 4U
  170. #define GPIOH_PIN5 5U
  171. #define GPIOH_PIN6 6U
  172. #define GPIOH_PIN7 7U
  173. #define GPIOH_PIN8 8U
  174. #define GPIOH_PIN9 9U
  175. #define GPIOH_PIN10 10U
  176. #define GPIOH_PIN11 11U
  177. #define GPIOH_PIN12 12U
  178. #define GPIOH_PIN13 13U
  179. #define GPIOH_PIN14 14U
  180. #define GPIOH_PIN15 15U
  181. #define GPIOI_PIN0 0U
  182. #define GPIOI_PIN1 1U
  183. #define GPIOI_PIN2 2U
  184. #define GPIOI_PIN3 3U
  185. #define GPIOI_PIN4 4U
  186. #define GPIOI_PIN5 5U
  187. #define GPIOI_PIN6 6U
  188. #define GPIOI_PIN7 7U
  189. #define GPIOI_PIN8 8U
  190. #define GPIOI_PIN9 9U
  191. #define GPIOI_PIN10 10U
  192. #define GPIOI_PIN11 11U
  193. #define GPIOI_PIN12 12U
  194. #define GPIOI_PIN13 13U
  195. #define GPIOI_PIN14 14U
  196. #define GPIOI_PIN15 15U
  197. /*
  198. * IO lines assignments.
  199. */
  200. #define LINE_BUTTON PAL_LINE(GPIOA, 0U)
  201. #define LINE_CS43L22_LRCK PAL_LINE(GPIOA, 4U)
  202. #define LINE_L3GD20_SCL PAL_LINE(GPIOA, 5U)
  203. #define LINE_L3GD20_SD0 PAL_LINE(GPIOA, 6U)
  204. #define LINE_L3GD20_SDI PAL_LINE(GPIOA, 7U)
  205. #define LINE_VBUS_FS PAL_LINE(GPIOA, 9U)
  206. #define LINE_OTG_FS_ID PAL_LINE(GPIOA, 10U)
  207. #define LINE_OTG_FS_DM PAL_LINE(GPIOA, 11U)
  208. #define LINE_OTG_FS_DP PAL_LINE(GPIOA, 12U)
  209. #define LINE_SWDIO PAL_LINE(GPIOA, 13U)
  210. #define LINE_SWCLK PAL_LINE(GPIOA, 14U)
  211. #define LINE_SWO PAL_LINE(GPIOB, 3U)
  212. #define LINE_LSM303DLHC_SCL PAL_LINE(GPIOB, 6U)
  213. #define LINE_LSM303DLHC_SDA PAL_LINE(GPIOB, 9U)
  214. #define LINE_MP45DT02_CLK_IN PAL_LINE(GPIOB, 10U)
  215. #define LINE_OTG_FS_POWER_ON PAL_LINE(GPIOC, 0U)
  216. #define LINE_CS43L22_AIN4x PAL_LINE(GPIOC, 3U)
  217. #define LINE_MP45DT02_PDM_OUT PAL_LINE(GPIOC, 3U)
  218. #define LINE_CS43L22_MCLK PAL_LINE(GPIOC, 7U)
  219. #define LINE_CS43L22_SCLK PAL_LINE(GPIOC, 10U)
  220. #define LINE_CS43L22_SDIN PAL_LINE(GPIOC, 12U)
  221. #define LINE_OSC32_IN PAL_LINE(GPIOC, 14U)
  222. #define LINE_OSC32_OUT PAL_LINE(GPIOC, 15U)
  223. #define LINE_CS43L22_RESET PAL_LINE(GPIOD, 4U)
  224. #define LINE_OverCurrent PAL_LINE(GPIOD, 5U)
  225. #define LINE_LED4 PAL_LINE(GPIOD, 12U)
  226. #define LINE_LED3 PAL_LINE(GPIOD, 13U)
  227. #define LINE_LED5 PAL_LINE(GPIOD, 14U)
  228. #define LINE_LED6 PAL_LINE(GPIOD, 15U)
  229. #define LINE_L3GD20_INT1 PAL_LINE(GPIOE, 0U)
  230. #define LINE_L3GD20_INT2 PAL_LINE(GPIOE, 1U)
  231. #define LINE_LSM303DLHC_DRDY PAL_LINE(GPIOE, 2U)
  232. #define LINE_L3GD20_CS PAL_LINE(GPIOE, 3U)
  233. #define LINE_LSM303DLHC_INT1 PAL_LINE(GPIOE, 4U)
  234. #define LINE_LSM303DLHC_INT2 PAL_LINE(GPIOE, 5U)
  235. #define LINE_OSC_IN PAL_LINE(GPIOH, 0U)
  236. #define LINE_OSC_OUT PAL_LINE(GPIOH, 1U)
  237. /*===========================================================================*/
  238. /* Driver pre-compile time settings. */
  239. /*===========================================================================*/
  240. /*===========================================================================*/
  241. /* Derived constants and error checks. */
  242. /*===========================================================================*/
  243. /*===========================================================================*/
  244. /* Driver data structures and types. */
  245. /*===========================================================================*/
  246. /*===========================================================================*/
  247. /* Driver macros. */
  248. /*===========================================================================*/
  249. /*
  250. * I/O ports initial setup, this configuration is established soon after reset
  251. * in the initialization code.
  252. * Please refer to the STM32 Reference Manual for details.
  253. */
  254. #define PIN_MODE_INPUT(n) (0U << ((n) * 2U))
  255. #define PIN_MODE_OUTPUT(n) (1U << ((n) * 2U))
  256. #define PIN_MODE_ALTERNATE(n) (2U << ((n) * 2U))
  257. #define PIN_MODE_ANALOG(n) (3U << ((n) * 2U))
  258. #define PIN_ODR_LOW(n) (0U << (n))
  259. #define PIN_ODR_HIGH(n) (1U << (n))
  260. #define PIN_OTYPE_PUSHPULL(n) (0U << (n))
  261. #define PIN_OTYPE_OPENDRAIN(n) (1U << (n))
  262. #define PIN_OSPEED_VERYLOW(n) (0U << ((n) * 2U))
  263. #define PIN_OSPEED_LOW(n) (1U << ((n) * 2U))
  264. #define PIN_OSPEED_MEDIUM(n) (2U << ((n) * 2U))
  265. #define PIN_OSPEED_HIGH(n) (3U << ((n) * 2U))
  266. #define PIN_PUPDR_FLOATING(n) (0U << ((n) * 2U))
  267. #define PIN_PUPDR_PULLUP(n) (1U << ((n) * 2U))
  268. #define PIN_PUPDR_PULLDOWN(n) (2U << ((n) * 2U))
  269. #define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U))
  270. /*
  271. * GPIOA setup:
  272. *
  273. * PA0 - BUTTON (input floating).
  274. * PA1 - PIN1 (input pullup).
  275. * PA2 - PIN2 (input pullup).
  276. * PA3 - PIN3 (input pullup).
  277. * PA4 - CS43L22_LRCK (alternate 6).
  278. * PA5 - L3GD20_SCL (alternate 5).
  279. * PA6 - L3GD20_SD0 (alternate 5).
  280. * PA7 - L3GD20_SDI (alternate 5).
  281. * PA8 - PIN8 (input pullup).
  282. * PA9 - VBUS_FS (input floating).
  283. * PA10 - OTG_FS_ID (alternate 10).
  284. * PA11 - OTG_FS_DM (alternate 10).
  285. * PA12 - OTG_FS_DP (alternate 10).
  286. * PA13 - SWDIO (alternate 0).
  287. * PA14 - SWCLK (alternate 0).
  288. * PA15 - PIN15 (input pullup).
  289. */
  290. #define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_BUTTON) | \
  291. PIN_MODE_INPUT(GPIOA_PIN1) | \
  292. PIN_MODE_INPUT(GPIOA_PIN2) | \
  293. PIN_MODE_INPUT(GPIOA_PIN3) | \
  294. PIN_MODE_ALTERNATE(GPIOA_CS43L22_LRCK) |\
  295. PIN_MODE_ALTERNATE(GPIOA_L3GD20_SCL) | \
  296. PIN_MODE_ALTERNATE(GPIOA_L3GD20_SD0) | \
  297. PIN_MODE_ALTERNATE(GPIOA_L3GD20_SDI) | \
  298. PIN_MODE_INPUT(GPIOA_PIN8) | \
  299. PIN_MODE_INPUT(GPIOA_VBUS_FS) | \
  300. PIN_MODE_ALTERNATE(GPIOA_OTG_FS_ID) | \
  301. PIN_MODE_ALTERNATE(GPIOA_OTG_FS_DM) | \
  302. PIN_MODE_ALTERNATE(GPIOA_OTG_FS_DP) | \
  303. PIN_MODE_ALTERNATE(GPIOA_SWDIO) | \
  304. PIN_MODE_ALTERNATE(GPIOA_SWCLK) | \
  305. PIN_MODE_INPUT(GPIOA_PIN15))
  306. #define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_BUTTON) | \
  307. PIN_OTYPE_PUSHPULL(GPIOA_PIN1) | \
  308. PIN_OTYPE_PUSHPULL(GPIOA_PIN2) | \
  309. PIN_OTYPE_PUSHPULL(GPIOA_PIN3) | \
  310. PIN_OTYPE_PUSHPULL(GPIOA_CS43L22_LRCK) |\
  311. PIN_OTYPE_PUSHPULL(GPIOA_L3GD20_SCL) | \
  312. PIN_OTYPE_PUSHPULL(GPIOA_L3GD20_SD0) | \
  313. PIN_OTYPE_PUSHPULL(GPIOA_L3GD20_SDI) | \
  314. PIN_OTYPE_PUSHPULL(GPIOA_PIN8) | \
  315. PIN_OTYPE_PUSHPULL(GPIOA_VBUS_FS) | \
  316. PIN_OTYPE_PUSHPULL(GPIOA_OTG_FS_ID) | \
  317. PIN_OTYPE_PUSHPULL(GPIOA_OTG_FS_DM) | \
  318. PIN_OTYPE_PUSHPULL(GPIOA_OTG_FS_DP) | \
  319. PIN_OTYPE_PUSHPULL(GPIOA_SWDIO) | \
  320. PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | \
  321. PIN_OTYPE_PUSHPULL(GPIOA_PIN15))
  322. #define VAL_GPIOA_OSPEEDR (PIN_OSPEED_HIGH(GPIOA_BUTTON) | \
  323. PIN_OSPEED_HIGH(GPIOA_PIN1) | \
  324. PIN_OSPEED_HIGH(GPIOA_PIN2) | \
  325. PIN_OSPEED_HIGH(GPIOA_PIN3) | \
  326. PIN_OSPEED_HIGH(GPIOA_CS43L22_LRCK) | \
  327. PIN_OSPEED_HIGH(GPIOA_L3GD20_SCL) | \
  328. PIN_OSPEED_HIGH(GPIOA_L3GD20_SD0) | \
  329. PIN_OSPEED_HIGH(GPIOA_L3GD20_SDI) | \
  330. PIN_OSPEED_HIGH(GPIOA_PIN8) | \
  331. PIN_OSPEED_HIGH(GPIOA_VBUS_FS) | \
  332. PIN_OSPEED_HIGH(GPIOA_OTG_FS_ID) | \
  333. PIN_OSPEED_HIGH(GPIOA_OTG_FS_DM) | \
  334. PIN_OSPEED_HIGH(GPIOA_OTG_FS_DP) | \
  335. PIN_OSPEED_HIGH(GPIOA_SWDIO) | \
  336. PIN_OSPEED_HIGH(GPIOA_SWCLK) | \
  337. PIN_OSPEED_HIGH(GPIOA_PIN15))
  338. #define VAL_GPIOA_PUPDR (PIN_PUPDR_FLOATING(GPIOA_BUTTON) | \
  339. PIN_PUPDR_PULLUP(GPIOA_PIN1) | \
  340. PIN_PUPDR_PULLUP(GPIOA_PIN2) | \
  341. PIN_PUPDR_PULLUP(GPIOA_PIN3) | \
  342. PIN_PUPDR_FLOATING(GPIOA_CS43L22_LRCK) |\
  343. PIN_PUPDR_FLOATING(GPIOA_L3GD20_SCL) | \
  344. PIN_PUPDR_PULLUP(GPIOA_L3GD20_SD0) | \
  345. PIN_PUPDR_PULLUP(GPIOA_L3GD20_SDI) | \
  346. PIN_PUPDR_PULLUP(GPIOA_PIN8) | \
  347. PIN_PUPDR_FLOATING(GPIOA_VBUS_FS) | \
  348. PIN_PUPDR_FLOATING(GPIOA_OTG_FS_ID) | \
  349. PIN_PUPDR_FLOATING(GPIOA_OTG_FS_DM) | \
  350. PIN_PUPDR_FLOATING(GPIOA_OTG_FS_DP) | \
  351. PIN_PUPDR_FLOATING(GPIOA_SWDIO) | \
  352. PIN_PUPDR_FLOATING(GPIOA_SWCLK) | \
  353. PIN_PUPDR_PULLUP(GPIOA_PIN15))
  354. #define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_BUTTON) | \
  355. PIN_ODR_HIGH(GPIOA_PIN1) | \
  356. PIN_ODR_HIGH(GPIOA_PIN2) | \
  357. PIN_ODR_HIGH(GPIOA_PIN3) | \
  358. PIN_ODR_HIGH(GPIOA_CS43L22_LRCK) | \
  359. PIN_ODR_HIGH(GPIOA_L3GD20_SCL) | \
  360. PIN_ODR_HIGH(GPIOA_L3GD20_SD0) | \
  361. PIN_ODR_HIGH(GPIOA_L3GD20_SDI) | \
  362. PIN_ODR_HIGH(GPIOA_PIN8) | \
  363. PIN_ODR_HIGH(GPIOA_VBUS_FS) | \
  364. PIN_ODR_HIGH(GPIOA_OTG_FS_ID) | \
  365. PIN_ODR_HIGH(GPIOA_OTG_FS_DM) | \
  366. PIN_ODR_HIGH(GPIOA_OTG_FS_DP) | \
  367. PIN_ODR_HIGH(GPIOA_SWDIO) | \
  368. PIN_ODR_HIGH(GPIOA_SWCLK) | \
  369. PIN_ODR_HIGH(GPIOA_PIN15))
  370. #define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_BUTTON, 0U) | \
  371. PIN_AFIO_AF(GPIOA_PIN1, 0U) | \
  372. PIN_AFIO_AF(GPIOA_PIN2, 0U) | \
  373. PIN_AFIO_AF(GPIOA_PIN3, 0U) | \
  374. PIN_AFIO_AF(GPIOA_CS43L22_LRCK, 6U) | \
  375. PIN_AFIO_AF(GPIOA_L3GD20_SCL, 5U) | \
  376. PIN_AFIO_AF(GPIOA_L3GD20_SD0, 5U) | \
  377. PIN_AFIO_AF(GPIOA_L3GD20_SDI, 5U))
  378. #define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_PIN8, 0U) | \
  379. PIN_AFIO_AF(GPIOA_VBUS_FS, 0U) | \
  380. PIN_AFIO_AF(GPIOA_OTG_FS_ID, 10U) | \
  381. PIN_AFIO_AF(GPIOA_OTG_FS_DM, 10U) | \
  382. PIN_AFIO_AF(GPIOA_OTG_FS_DP, 10U) | \
  383. PIN_AFIO_AF(GPIOA_SWDIO, 0U) | \
  384. PIN_AFIO_AF(GPIOA_SWCLK, 0U) | \
  385. PIN_AFIO_AF(GPIOA_PIN15, 0U))
  386. /*
  387. * GPIOB setup:
  388. *
  389. * PB0 - PIN0 (input pullup).
  390. * PB1 - PIN1 (input pullup).
  391. * PB2 - PIN2 (input pullup).
  392. * PB3 - SWO (alternate 0).
  393. * PB4 - PIN4 (input pullup).
  394. * PB5 - PIN5 (input pullup).
  395. * PB6 - LSM303DLHC_SCL (alternate 4).
  396. * PB7 - PIN7 (input pullup).
  397. * PB8 - PIN8 (input pullup).
  398. * PB9 - LSM303DLHC_SDA (alternate 4).
  399. * PB10 - MP45DT02_CLK_IN (alternate 5).
  400. * PB11 - PIN11 (input pullup).
  401. * PB12 - PIN12 (input pullup).
  402. * PB13 - PIN13 (input pullup).
  403. * PB14 - PIN14 (input pullup).
  404. * PB15 - PIN15 (input pullup).
  405. */
  406. #define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_PIN0) | \
  407. PIN_MODE_INPUT(GPIOB_PIN1) | \
  408. PIN_MODE_INPUT(GPIOB_PIN2) | \
  409. PIN_MODE_ALTERNATE(GPIOB_SWO) | \
  410. PIN_MODE_INPUT(GPIOB_PIN4) | \
  411. PIN_MODE_INPUT(GPIOB_PIN5) | \
  412. PIN_MODE_ALTERNATE(GPIOB_LSM303DLHC_SCL) |\
  413. PIN_MODE_INPUT(GPIOB_PIN7) | \
  414. PIN_MODE_INPUT(GPIOB_PIN8) | \
  415. PIN_MODE_ALTERNATE(GPIOB_LSM303DLHC_SDA) |\
  416. PIN_MODE_ALTERNATE(GPIOB_MP45DT02_CLK_IN) |\
  417. PIN_MODE_INPUT(GPIOB_PIN11) | \
  418. PIN_MODE_INPUT(GPIOB_PIN12) | \
  419. PIN_MODE_INPUT(GPIOB_PIN13) | \
  420. PIN_MODE_INPUT(GPIOB_PIN14) | \
  421. PIN_MODE_INPUT(GPIOB_PIN15))
  422. #define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_PIN0) | \
  423. PIN_OTYPE_PUSHPULL(GPIOB_PIN1) | \
  424. PIN_OTYPE_PUSHPULL(GPIOB_PIN2) | \
  425. PIN_OTYPE_PUSHPULL(GPIOB_SWO) | \
  426. PIN_OTYPE_PUSHPULL(GPIOB_PIN4) | \
  427. PIN_OTYPE_PUSHPULL(GPIOB_PIN5) | \
  428. PIN_OTYPE_PUSHPULL(GPIOB_LSM303DLHC_SCL) |\
  429. PIN_OTYPE_PUSHPULL(GPIOB_PIN7) | \
  430. PIN_OTYPE_PUSHPULL(GPIOB_PIN8) | \
  431. PIN_OTYPE_PUSHPULL(GPIOB_LSM303DLHC_SDA) |\
  432. PIN_OTYPE_PUSHPULL(GPIOB_MP45DT02_CLK_IN) |\
  433. PIN_OTYPE_PUSHPULL(GPIOB_PIN11) | \
  434. PIN_OTYPE_PUSHPULL(GPIOB_PIN12) | \
  435. PIN_OTYPE_PUSHPULL(GPIOB_PIN13) | \
  436. PIN_OTYPE_PUSHPULL(GPIOB_PIN14) | \
  437. PIN_OTYPE_PUSHPULL(GPIOB_PIN15))
  438. #define VAL_GPIOB_OSPEEDR (PIN_OSPEED_HIGH(GPIOB_PIN0) | \
  439. PIN_OSPEED_HIGH(GPIOB_PIN1) | \
  440. PIN_OSPEED_HIGH(GPIOB_PIN2) | \
  441. PIN_OSPEED_HIGH(GPIOB_SWO) | \
  442. PIN_OSPEED_HIGH(GPIOB_PIN4) | \
  443. PIN_OSPEED_HIGH(GPIOB_PIN5) | \
  444. PIN_OSPEED_HIGH(GPIOB_LSM303DLHC_SCL) |\
  445. PIN_OSPEED_HIGH(GPIOB_PIN7) | \
  446. PIN_OSPEED_HIGH(GPIOB_PIN8) | \
  447. PIN_OSPEED_HIGH(GPIOB_LSM303DLHC_SDA) |\
  448. PIN_OSPEED_HIGH(GPIOB_MP45DT02_CLK_IN) |\
  449. PIN_OSPEED_HIGH(GPIOB_PIN11) | \
  450. PIN_OSPEED_HIGH(GPIOB_PIN12) | \
  451. PIN_OSPEED_HIGH(GPIOB_PIN13) | \
  452. PIN_OSPEED_HIGH(GPIOB_PIN14) | \
  453. PIN_OSPEED_HIGH(GPIOB_PIN15))
  454. #define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | \
  455. PIN_PUPDR_PULLUP(GPIOB_PIN1) | \
  456. PIN_PUPDR_PULLUP(GPIOB_PIN2) | \
  457. PIN_PUPDR_PULLUP(GPIOB_SWO) | \
  458. PIN_PUPDR_PULLUP(GPIOB_PIN4) | \
  459. PIN_PUPDR_PULLUP(GPIOB_PIN5) | \
  460. PIN_PUPDR_FLOATING(GPIOB_LSM303DLHC_SCL) |\
  461. PIN_PUPDR_PULLUP(GPIOB_PIN7) | \
  462. PIN_PUPDR_PULLUP(GPIOB_PIN8) | \
  463. PIN_PUPDR_FLOATING(GPIOB_LSM303DLHC_SDA) |\
  464. PIN_PUPDR_FLOATING(GPIOB_MP45DT02_CLK_IN) |\
  465. PIN_PUPDR_PULLUP(GPIOB_PIN11) | \
  466. PIN_PUPDR_PULLUP(GPIOB_PIN12) | \
  467. PIN_PUPDR_PULLUP(GPIOB_PIN13) | \
  468. PIN_PUPDR_PULLUP(GPIOB_PIN14) | \
  469. PIN_PUPDR_PULLUP(GPIOB_PIN15))
  470. #define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_PIN0) | \
  471. PIN_ODR_HIGH(GPIOB_PIN1) | \
  472. PIN_ODR_HIGH(GPIOB_PIN2) | \
  473. PIN_ODR_HIGH(GPIOB_SWO) | \
  474. PIN_ODR_HIGH(GPIOB_PIN4) | \
  475. PIN_ODR_HIGH(GPIOB_PIN5) | \
  476. PIN_ODR_HIGH(GPIOB_LSM303DLHC_SCL) | \
  477. PIN_ODR_HIGH(GPIOB_PIN7) | \
  478. PIN_ODR_HIGH(GPIOB_PIN8) | \
  479. PIN_ODR_HIGH(GPIOB_LSM303DLHC_SDA) | \
  480. PIN_ODR_HIGH(GPIOB_MP45DT02_CLK_IN) | \
  481. PIN_ODR_HIGH(GPIOB_PIN11) | \
  482. PIN_ODR_HIGH(GPIOB_PIN12) | \
  483. PIN_ODR_HIGH(GPIOB_PIN13) | \
  484. PIN_ODR_HIGH(GPIOB_PIN14) | \
  485. PIN_ODR_HIGH(GPIOB_PIN15))
  486. #define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_PIN0, 0U) | \
  487. PIN_AFIO_AF(GPIOB_PIN1, 0U) | \
  488. PIN_AFIO_AF(GPIOB_PIN2, 0U) | \
  489. PIN_AFIO_AF(GPIOB_SWO, 0U) | \
  490. PIN_AFIO_AF(GPIOB_PIN4, 0U) | \
  491. PIN_AFIO_AF(GPIOB_PIN5, 0U) | \
  492. PIN_AFIO_AF(GPIOB_LSM303DLHC_SCL, 4U) |\
  493. PIN_AFIO_AF(GPIOB_PIN7, 0U))
  494. #define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_PIN8, 0U) | \
  495. PIN_AFIO_AF(GPIOB_LSM303DLHC_SDA, 4U) |\
  496. PIN_AFIO_AF(GPIOB_MP45DT02_CLK_IN, 5U) |\
  497. PIN_AFIO_AF(GPIOB_PIN11, 0U) | \
  498. PIN_AFIO_AF(GPIOB_PIN12, 0U) | \
  499. PIN_AFIO_AF(GPIOB_PIN13, 0U) | \
  500. PIN_AFIO_AF(GPIOB_PIN14, 0U) | \
  501. PIN_AFIO_AF(GPIOB_PIN15, 0U))
  502. /*
  503. * GPIOC setup:
  504. *
  505. * PC0 - OTG_FS_POWER_ON (output pushpull maximum).
  506. * PC1 - PIN1 (input pullup).
  507. * PC2 - PIN2 (input pullup).
  508. * PC3 - CS43L22_AIN4x MP45DT02_PDM_OUT(alternate 5).
  509. * PC4 - PIN4 (input pullup).
  510. * PC5 - PIN5 (input pullup).
  511. * PC6 - PIN6 (input pullup).
  512. * PC7 - CS43L22_MCLK (alternate 6).
  513. * PC8 - PIN8 (input pullup).
  514. * PC9 - PIN9 (input pullup).
  515. * PC10 - CS43L22_SCLK (alternate 6).
  516. * PC11 - PIN11 (input pullup).
  517. * PC12 - CS43L22_SDIN (alternate 6).
  518. * PC13 - PIN13 (input pullup).
  519. * PC14 - OSC32_IN (input floating).
  520. * PC15 - OSC32_OUT (input floating).
  521. */
  522. #define VAL_GPIOC_MODER (PIN_MODE_OUTPUT(GPIOC_OTG_FS_POWER_ON) |\
  523. PIN_MODE_INPUT(GPIOC_PIN1) | \
  524. PIN_MODE_INPUT(GPIOC_PIN2) | \
  525. PIN_MODE_ALTERNATE(GPIOC_CS43L22_AIN4x) |\
  526. PIN_MODE_INPUT(GPIOC_PIN4) | \
  527. PIN_MODE_INPUT(GPIOC_PIN5) | \
  528. PIN_MODE_INPUT(GPIOC_PIN6) | \
  529. PIN_MODE_ALTERNATE(GPIOC_CS43L22_MCLK) |\
  530. PIN_MODE_INPUT(GPIOC_PIN8) | \
  531. PIN_MODE_INPUT(GPIOC_PIN9) | \
  532. PIN_MODE_ALTERNATE(GPIOC_CS43L22_SCLK) |\
  533. PIN_MODE_INPUT(GPIOC_PIN11) | \
  534. PIN_MODE_ALTERNATE(GPIOC_CS43L22_SDIN) |\
  535. PIN_MODE_INPUT(GPIOC_PIN13) | \
  536. PIN_MODE_INPUT(GPIOC_OSC32_IN) | \
  537. PIN_MODE_INPUT(GPIOC_OSC32_OUT))
  538. #define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_OTG_FS_POWER_ON) |\
  539. PIN_OTYPE_PUSHPULL(GPIOC_PIN1) | \
  540. PIN_OTYPE_PUSHPULL(GPIOC_PIN2) | \
  541. PIN_OTYPE_PUSHPULL(GPIOC_CS43L22_AIN4x) |\
  542. PIN_OTYPE_PUSHPULL(GPIOC_PIN4) | \
  543. PIN_OTYPE_PUSHPULL(GPIOC_PIN5) | \
  544. PIN_OTYPE_PUSHPULL(GPIOC_PIN6) | \
  545. PIN_OTYPE_PUSHPULL(GPIOC_CS43L22_MCLK) |\
  546. PIN_OTYPE_PUSHPULL(GPIOC_PIN8) | \
  547. PIN_OTYPE_PUSHPULL(GPIOC_PIN9) | \
  548. PIN_OTYPE_PUSHPULL(GPIOC_CS43L22_SCLK) |\
  549. PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | \
  550. PIN_OTYPE_PUSHPULL(GPIOC_CS43L22_SDIN) |\
  551. PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | \
  552. PIN_OTYPE_PUSHPULL(GPIOC_OSC32_IN) | \
  553. PIN_OTYPE_PUSHPULL(GPIOC_OSC32_OUT))
  554. #define VAL_GPIOC_OSPEEDR (PIN_OSPEED_HIGH(GPIOC_OTG_FS_POWER_ON) |\
  555. PIN_OSPEED_HIGH(GPIOC_PIN1) | \
  556. PIN_OSPEED_HIGH(GPIOC_PIN2) | \
  557. PIN_OSPEED_HIGH(GPIOC_CS43L22_AIN4x) | \
  558. PIN_OSPEED_HIGH(GPIOC_PIN4) | \
  559. PIN_OSPEED_HIGH(GPIOC_PIN5) | \
  560. PIN_OSPEED_HIGH(GPIOC_PIN6) | \
  561. PIN_OSPEED_HIGH(GPIOC_CS43L22_MCLK) | \
  562. PIN_OSPEED_HIGH(GPIOC_PIN8) | \
  563. PIN_OSPEED_HIGH(GPIOC_PIN9) | \
  564. PIN_OSPEED_HIGH(GPIOC_CS43L22_SCLK) | \
  565. PIN_OSPEED_HIGH(GPIOC_PIN11) | \
  566. PIN_OSPEED_HIGH(GPIOC_CS43L22_SDIN) | \
  567. PIN_OSPEED_HIGH(GPIOC_PIN13) | \
  568. PIN_OSPEED_HIGH(GPIOC_OSC32_IN) | \
  569. PIN_OSPEED_HIGH(GPIOC_OSC32_OUT))
  570. #define VAL_GPIOC_PUPDR (PIN_PUPDR_PULLUP(GPIOC_OTG_FS_POWER_ON) |\
  571. PIN_PUPDR_PULLUP(GPIOC_PIN1) | \
  572. PIN_PUPDR_PULLUP(GPIOC_PIN2) | \
  573. PIN_PUPDR_FLOATING(GPIOC_CS43L22_AIN4x) |\
  574. PIN_PUPDR_PULLUP(GPIOC_PIN4) | \
  575. PIN_PUPDR_PULLUP(GPIOC_PIN5) | \
  576. PIN_PUPDR_PULLUP(GPIOC_PIN6) | \
  577. PIN_PUPDR_PULLUP(GPIOC_CS43L22_MCLK) | \
  578. PIN_PUPDR_PULLUP(GPIOC_PIN8) | \
  579. PIN_PUPDR_PULLUP(GPIOC_PIN9) | \
  580. PIN_PUPDR_PULLUP(GPIOC_CS43L22_SCLK) | \
  581. PIN_PUPDR_PULLUP(GPIOC_PIN11) | \
  582. PIN_PUPDR_PULLUP(GPIOC_CS43L22_SDIN) | \
  583. PIN_PUPDR_PULLUP(GPIOC_PIN13) | \
  584. PIN_PUPDR_FLOATING(GPIOC_OSC32_IN) | \
  585. PIN_PUPDR_FLOATING(GPIOC_OSC32_OUT))
  586. #define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_OTG_FS_POWER_ON) | \
  587. PIN_ODR_HIGH(GPIOC_PIN1) | \
  588. PIN_ODR_HIGH(GPIOC_PIN2) | \
  589. PIN_ODR_HIGH(GPIOC_CS43L22_AIN4x) | \
  590. PIN_ODR_HIGH(GPIOC_PIN4) | \
  591. PIN_ODR_HIGH(GPIOC_PIN5) | \
  592. PIN_ODR_HIGH(GPIOC_PIN6) | \
  593. PIN_ODR_HIGH(GPIOC_CS43L22_MCLK) | \
  594. PIN_ODR_HIGH(GPIOC_PIN8) | \
  595. PIN_ODR_HIGH(GPIOC_PIN9) | \
  596. PIN_ODR_HIGH(GPIOC_CS43L22_SCLK) | \
  597. PIN_ODR_HIGH(GPIOC_PIN11) | \
  598. PIN_ODR_HIGH(GPIOC_CS43L22_SDIN) | \
  599. PIN_ODR_HIGH(GPIOC_PIN13) | \
  600. PIN_ODR_HIGH(GPIOC_OSC32_IN) | \
  601. PIN_ODR_HIGH(GPIOC_OSC32_OUT))
  602. #define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_OTG_FS_POWER_ON, 0U) |\
  603. PIN_AFIO_AF(GPIOC_PIN1, 0U) | \
  604. PIN_AFIO_AF(GPIOC_PIN2, 0U) | \
  605. PIN_AFIO_AF(GPIOC_CS43L22_AIN4x, 5U) | \
  606. PIN_AFIO_AF(GPIOC_PIN4, 0U) | \
  607. PIN_AFIO_AF(GPIOC_PIN5, 0U) | \
  608. PIN_AFIO_AF(GPIOC_PIN6, 0U) | \
  609. PIN_AFIO_AF(GPIOC_CS43L22_MCLK, 6U))
  610. #define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_PIN8, 0U) | \
  611. PIN_AFIO_AF(GPIOC_PIN9, 0U) | \
  612. PIN_AFIO_AF(GPIOC_CS43L22_SCLK, 6U) | \
  613. PIN_AFIO_AF(GPIOC_PIN11, 0U) | \
  614. PIN_AFIO_AF(GPIOC_CS43L22_SDIN, 6U) | \
  615. PIN_AFIO_AF(GPIOC_PIN13, 0U) | \
  616. PIN_AFIO_AF(GPIOC_OSC32_IN, 0U) | \
  617. PIN_AFIO_AF(GPIOC_OSC32_OUT, 0U))
  618. /*
  619. * GPIOD setup:
  620. *
  621. * PD0 - PIN0 (input pullup).
  622. * PD1 - PIN1 (input pullup).
  623. * PD2 - PIN2 (input pullup).
  624. * PD3 - PIN3 (input pullup).
  625. * PD4 - CS43L22_RESET (output pushpull maximum).
  626. * PD5 - OverCurrent (input floating).
  627. * PD6 - PIN6 (input pullup).
  628. * PD7 - PIN7 (input pullup).
  629. * PD8 - PIN8 (input pullup).
  630. * PD9 - PIN9 (input pullup).
  631. * PD10 - PIN10 (input pullup).
  632. * PD11 - PIN11 (input pullup).
  633. * PD12 - LED4 (output pushpull maximum).
  634. * PD13 - LED3 (output pushpull maximum).
  635. * PD14 - LED5 (output pushpull maximum).
  636. * PD15 - LED6 (output pushpull maximum).
  637. */
  638. #define VAL_GPIOD_MODER (PIN_MODE_INPUT(GPIOD_PIN0) | \
  639. PIN_MODE_INPUT(GPIOD_PIN1) | \
  640. PIN_MODE_INPUT(GPIOD_PIN2) | \
  641. PIN_MODE_INPUT(GPIOD_PIN3) | \
  642. PIN_MODE_OUTPUT(GPIOD_CS43L22_RESET) | \
  643. PIN_MODE_INPUT(GPIOD_OverCurrent) | \
  644. PIN_MODE_INPUT(GPIOD_PIN6) | \
  645. PIN_MODE_INPUT(GPIOD_PIN7) | \
  646. PIN_MODE_INPUT(GPIOD_PIN8) | \
  647. PIN_MODE_INPUT(GPIOD_PIN9) | \
  648. PIN_MODE_INPUT(GPIOD_PIN10) | \
  649. PIN_MODE_INPUT(GPIOD_PIN11) | \
  650. PIN_MODE_OUTPUT(GPIOD_LED4) | \
  651. PIN_MODE_OUTPUT(GPIOD_LED3) | \
  652. PIN_MODE_OUTPUT(GPIOD_LED5) | \
  653. PIN_MODE_OUTPUT(GPIOD_LED6))
  654. #define VAL_GPIOD_OTYPER (PIN_OTYPE_PUSHPULL(GPIOD_PIN0) | \
  655. PIN_OTYPE_PUSHPULL(GPIOD_PIN1) | \
  656. PIN_OTYPE_PUSHPULL(GPIOD_PIN2) | \
  657. PIN_OTYPE_PUSHPULL(GPIOD_PIN3) | \
  658. PIN_OTYPE_PUSHPULL(GPIOD_CS43L22_RESET) |\
  659. PIN_OTYPE_PUSHPULL(GPIOD_OverCurrent) |\
  660. PIN_OTYPE_PUSHPULL(GPIOD_PIN6) | \
  661. PIN_OTYPE_PUSHPULL(GPIOD_PIN7) | \
  662. PIN_OTYPE_PUSHPULL(GPIOD_PIN8) | \
  663. PIN_OTYPE_PUSHPULL(GPIOD_PIN9) | \
  664. PIN_OTYPE_PUSHPULL(GPIOD_PIN10) | \
  665. PIN_OTYPE_PUSHPULL(GPIOD_PIN11) | \
  666. PIN_OTYPE_PUSHPULL(GPIOD_LED4) | \
  667. PIN_OTYPE_PUSHPULL(GPIOD_LED3) | \
  668. PIN_OTYPE_PUSHPULL(GPIOD_LED5) | \
  669. PIN_OTYPE_PUSHPULL(GPIOD_LED6))
  670. #define VAL_GPIOD_OSPEEDR (PIN_OSPEED_HIGH(GPIOD_PIN0) | \
  671. PIN_OSPEED_HIGH(GPIOD_PIN1) | \
  672. PIN_OSPEED_HIGH(GPIOD_PIN2) | \
  673. PIN_OSPEED_HIGH(GPIOD_PIN3) | \
  674. PIN_OSPEED_HIGH(GPIOD_CS43L22_RESET) | \
  675. PIN_OSPEED_HIGH(GPIOD_OverCurrent) | \
  676. PIN_OSPEED_HIGH(GPIOD_PIN6) | \
  677. PIN_OSPEED_HIGH(GPIOD_PIN7) | \
  678. PIN_OSPEED_HIGH(GPIOD_PIN8) | \
  679. PIN_OSPEED_HIGH(GPIOD_PIN9) | \
  680. PIN_OSPEED_HIGH(GPIOD_PIN10) | \
  681. PIN_OSPEED_HIGH(GPIOD_PIN11) | \
  682. PIN_OSPEED_HIGH(GPIOD_LED4) | \
  683. PIN_OSPEED_HIGH(GPIOD_LED3) | \
  684. PIN_OSPEED_HIGH(GPIOD_LED5) | \
  685. PIN_OSPEED_HIGH(GPIOD_LED6))
  686. #define VAL_GPIOD_PUPDR (PIN_PUPDR_PULLUP(GPIOD_PIN0) | \
  687. PIN_PUPDR_PULLUP(GPIOD_PIN1) | \
  688. PIN_PUPDR_PULLUP(GPIOD_PIN2) | \
  689. PIN_PUPDR_PULLUP(GPIOD_PIN3) | \
  690. PIN_PUPDR_PULLUP(GPIOD_CS43L22_RESET) |\
  691. PIN_PUPDR_FLOATING(GPIOD_OverCurrent) |\
  692. PIN_PUPDR_PULLUP(GPIOD_PIN6) | \
  693. PIN_PUPDR_PULLUP(GPIOD_PIN7) | \
  694. PIN_PUPDR_PULLUP(GPIOD_PIN8) | \
  695. PIN_PUPDR_PULLUP(GPIOD_PIN9) | \
  696. PIN_PUPDR_PULLUP(GPIOD_PIN10) | \
  697. PIN_PUPDR_PULLUP(GPIOD_PIN11) | \
  698. PIN_PUPDR_FLOATING(GPIOD_LED4) | \
  699. PIN_PUPDR_FLOATING(GPIOD_LED3) | \
  700. PIN_PUPDR_FLOATING(GPIOD_LED5) | \
  701. PIN_PUPDR_FLOATING(GPIOD_LED6))
  702. #define VAL_GPIOD_ODR (PIN_ODR_HIGH(GPIOD_PIN0) | \
  703. PIN_ODR_HIGH(GPIOD_PIN1) | \
  704. PIN_ODR_HIGH(GPIOD_PIN2) | \
  705. PIN_ODR_HIGH(GPIOD_PIN3) | \
  706. PIN_ODR_HIGH(GPIOD_CS43L22_RESET) | \
  707. PIN_ODR_HIGH(GPIOD_OverCurrent) | \
  708. PIN_ODR_HIGH(GPIOD_PIN6) | \
  709. PIN_ODR_HIGH(GPIOD_PIN7) | \
  710. PIN_ODR_HIGH(GPIOD_PIN8) | \
  711. PIN_ODR_HIGH(GPIOD_PIN9) | \
  712. PIN_ODR_HIGH(GPIOD_PIN10) | \
  713. PIN_ODR_HIGH(GPIOD_PIN11) | \
  714. PIN_ODR_LOW(GPIOD_LED4) | \
  715. PIN_ODR_LOW(GPIOD_LED3) | \
  716. PIN_ODR_LOW(GPIOD_LED5) | \
  717. PIN_ODR_LOW(GPIOD_LED6))
  718. #define VAL_GPIOD_AFRL (PIN_AFIO_AF(GPIOD_PIN0, 0U) | \
  719. PIN_AFIO_AF(GPIOD_PIN1, 0U) | \
  720. PIN_AFIO_AF(GPIOD_PIN2, 0U) | \
  721. PIN_AFIO_AF(GPIOD_PIN3, 0U) | \
  722. PIN_AFIO_AF(GPIOD_CS43L22_RESET, 0U) | \
  723. PIN_AFIO_AF(GPIOD_OverCurrent, 0U) | \
  724. PIN_AFIO_AF(GPIOD_PIN6, 0U) | \
  725. PIN_AFIO_AF(GPIOD_PIN7, 0U))
  726. #define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0U) | \
  727. PIN_AFIO_AF(GPIOD_PIN9, 0U) | \
  728. PIN_AFIO_AF(GPIOD_PIN10, 0U) | \
  729. PIN_AFIO_AF(GPIOD_PIN11, 0U) | \
  730. PIN_AFIO_AF(GPIOD_LED4, 0U) | \
  731. PIN_AFIO_AF(GPIOD_LED3, 0U) | \
  732. PIN_AFIO_AF(GPIOD_LED5, 0U) | \
  733. PIN_AFIO_AF(GPIOD_LED6, 0U))
  734. /*
  735. * GPIOE setup:
  736. *
  737. * PE0 - L3GD20_INT1 (input pullup).
  738. * PE1 - L3GD20_INT2 (input pullup).
  739. * PE2 - LSM303DLHC_DRDY (input floating).
  740. * PE3 - L3GD20_CS (output pushpull maximum).
  741. * PE4 - LSM303DLHC_INT1 (output pushpull maximum).
  742. * PE5 - LSM303DLHC_INT2 (output pushpull maximum).
  743. * PE6 - PIN6 (input pullup).
  744. * PE7 - PIN7 (input pullup).
  745. * PE8 - PIN8 (input pullup).
  746. * PE9 - PIN9 (input pullup).
  747. * PE10 - PIN10 (input pullup).
  748. * PE11 - PIN11 (input pullup).
  749. * PE12 - PIN12 (input pullup).
  750. * PE13 - PIN13 (input pullup).
  751. * PE14 - PIN14 (input pullup).
  752. * PE15 - PIN15 (input pullup).
  753. */
  754. #define VAL_GPIOE_MODER (PIN_MODE_INPUT(GPIOE_L3GD20_INT1) | \
  755. PIN_MODE_INPUT(GPIOE_L3GD20_INT2) | \
  756. PIN_MODE_INPUT(GPIOE_LSM303DLHC_DRDY) |\
  757. PIN_MODE_OUTPUT(GPIOE_L3GD20_CS) | \
  758. PIN_MODE_OUTPUT(GPIOE_LSM303DLHC_INT1) |\
  759. PIN_MODE_OUTPUT(GPIOE_LSM303DLHC_INT2) |\
  760. PIN_MODE_INPUT(GPIOE_PIN6) | \
  761. PIN_MODE_INPUT(GPIOE_PIN7) | \
  762. PIN_MODE_INPUT(GPIOE_PIN8) | \
  763. PIN_MODE_INPUT(GPIOE_PIN9) | \
  764. PIN_MODE_INPUT(GPIOE_PIN10) | \
  765. PIN_MODE_INPUT(GPIOE_PIN11) | \
  766. PIN_MODE_INPUT(GPIOE_PIN12) | \
  767. PIN_MODE_INPUT(GPIOE_PIN13) | \
  768. PIN_MODE_INPUT(GPIOE_PIN14) | \
  769. PIN_MODE_INPUT(GPIOE_PIN15))
  770. #define VAL_GPIOE_OTYPER (PIN_OTYPE_PUSHPULL(GPIOE_L3GD20_INT1) |\
  771. PIN_OTYPE_PUSHPULL(GPIOE_L3GD20_INT2) |\
  772. PIN_OTYPE_PUSHPULL(GPIOE_LSM303DLHC_DRDY) |\
  773. PIN_OTYPE_PUSHPULL(GPIOE_L3GD20_CS) | \
  774. PIN_OTYPE_PUSHPULL(GPIOE_LSM303DLHC_INT1) |\
  775. PIN_OTYPE_PUSHPULL(GPIOE_LSM303DLHC_INT2) |\
  776. PIN_OTYPE_PUSHPULL(GPIOE_PIN6) | \
  777. PIN_OTYPE_PUSHPULL(GPIOE_PIN7) | \
  778. PIN_OTYPE_PUSHPULL(GPIOE_PIN8) | \
  779. PIN_OTYPE_PUSHPULL(GPIOE_PIN9) | \
  780. PIN_OTYPE_PUSHPULL(GPIOE_PIN10) | \
  781. PIN_OTYPE_PUSHPULL(GPIOE_PIN11) | \
  782. PIN_OTYPE_PUSHPULL(GPIOE_PIN12) | \
  783. PIN_OTYPE_PUSHPULL(GPIOE_PIN13) | \
  784. PIN_OTYPE_PUSHPULL(GPIOE_PIN14) | \
  785. PIN_OTYPE_PUSHPULL(GPIOE_PIN15))
  786. #define VAL_GPIOE_OSPEEDR (PIN_OSPEED_HIGH(GPIOE_L3GD20_INT1) | \
  787. PIN_OSPEED_HIGH(GPIOE_L3GD20_INT2) | \
  788. PIN_OSPEED_HIGH(GPIOE_LSM303DLHC_DRDY) |\
  789. PIN_OSPEED_HIGH(GPIOE_L3GD20_CS) | \
  790. PIN_OSPEED_HIGH(GPIOE_LSM303DLHC_INT1) |\
  791. PIN_OSPEED_HIGH(GPIOE_LSM303DLHC_INT2) |\
  792. PIN_OSPEED_HIGH(GPIOE_PIN6) | \
  793. PIN_OSPEED_HIGH(GPIOE_PIN7) | \
  794. PIN_OSPEED_HIGH(GPIOE_PIN8) | \
  795. PIN_OSPEED_HIGH(GPIOE_PIN9) | \
  796. PIN_OSPEED_HIGH(GPIOE_PIN10) | \
  797. PIN_OSPEED_HIGH(GPIOE_PIN11) | \
  798. PIN_OSPEED_HIGH(GPIOE_PIN12) | \
  799. PIN_OSPEED_HIGH(GPIOE_PIN13) | \
  800. PIN_OSPEED_HIGH(GPIOE_PIN14) | \
  801. PIN_OSPEED_HIGH(GPIOE_PIN15))
  802. #define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_L3GD20_INT1) | \
  803. PIN_PUPDR_PULLUP(GPIOE_L3GD20_INT2) | \
  804. PIN_PUPDR_FLOATING(GPIOE_LSM303DLHC_DRDY) |\
  805. PIN_PUPDR_PULLUP(GPIOE_L3GD20_CS) | \
  806. PIN_PUPDR_PULLUP(GPIOE_LSM303DLHC_INT1) |\
  807. PIN_PUPDR_PULLUP(GPIOE_LSM303DLHC_INT2) |\
  808. PIN_PUPDR_PULLUP(GPIOE_PIN6) | \
  809. PIN_PUPDR_PULLUP(GPIOE_PIN7) | \
  810. PIN_PUPDR_PULLUP(GPIOE_PIN8) | \
  811. PIN_PUPDR_PULLUP(GPIOE_PIN9) | \
  812. PIN_PUPDR_PULLUP(GPIOE_PIN10) | \
  813. PIN_PUPDR_PULLUP(GPIOE_PIN11) | \
  814. PIN_PUPDR_PULLUP(GPIOE_PIN12) | \
  815. PIN_PUPDR_PULLUP(GPIOE_PIN13) | \
  816. PIN_PUPDR_PULLUP(GPIOE_PIN14) | \
  817. PIN_PUPDR_PULLUP(GPIOE_PIN15))
  818. #define VAL_GPIOE_ODR (PIN_ODR_HIGH(GPIOE_L3GD20_INT1) | \
  819. PIN_ODR_HIGH(GPIOE_L3GD20_INT2) | \
  820. PIN_ODR_HIGH(GPIOE_LSM303DLHC_DRDY) | \
  821. PIN_ODR_HIGH(GPIOE_L3GD20_CS) | \
  822. PIN_ODR_HIGH(GPIOE_LSM303DLHC_INT1) | \
  823. PIN_ODR_HIGH(GPIOE_LSM303DLHC_INT2) | \
  824. PIN_ODR_HIGH(GPIOE_PIN6) | \
  825. PIN_ODR_HIGH(GPIOE_PIN7) | \
  826. PIN_ODR_HIGH(GPIOE_PIN8) | \
  827. PIN_ODR_HIGH(GPIOE_PIN9) | \
  828. PIN_ODR_HIGH(GPIOE_PIN10) | \
  829. PIN_ODR_HIGH(GPIOE_PIN11) | \
  830. PIN_ODR_HIGH(GPIOE_PIN12) | \
  831. PIN_ODR_HIGH(GPIOE_PIN13) | \
  832. PIN_ODR_HIGH(GPIOE_PIN14) | \
  833. PIN_ODR_HIGH(GPIOE_PIN15))
  834. #define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_L3GD20_INT1, 0U) | \
  835. PIN_AFIO_AF(GPIOE_L3GD20_INT2, 0U) | \
  836. PIN_AFIO_AF(GPIOE_LSM303DLHC_DRDY, 0U) |\
  837. PIN_AFIO_AF(GPIOE_L3GD20_CS, 0U) | \
  838. PIN_AFIO_AF(GPIOE_LSM303DLHC_INT1, 0U) |\
  839. PIN_AFIO_AF(GPIOE_LSM303DLHC_INT2, 0U) |\
  840. PIN_AFIO_AF(GPIOE_PIN6, 0U) | \
  841. PIN_AFIO_AF(GPIOE_PIN7, 0U))
  842. #define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_PIN8, 0U) | \
  843. PIN_AFIO_AF(GPIOE_PIN9, 0U) | \
  844. PIN_AFIO_AF(GPIOE_PIN10, 0U) | \
  845. PIN_AFIO_AF(GPIOE_PIN11, 0U) | \
  846. PIN_AFIO_AF(GPIOE_PIN12, 0U) | \
  847. PIN_AFIO_AF(GPIOE_PIN13, 0U) | \
  848. PIN_AFIO_AF(GPIOE_PIN14, 0U) | \
  849. PIN_AFIO_AF(GPIOE_PIN15, 0U))
  850. /*
  851. * GPIOF setup:
  852. *
  853. * PF0 - PIN0 (input pullup).
  854. * PF1 - PIN1 (input pullup).
  855. * PF2 - PIN2 (input pullup).
  856. * PF3 - PIN3 (input pullup).
  857. * PF4 - PIN4 (input pullup).
  858. * PF5 - PIN5 (input pullup).
  859. * PF6 - PIN6 (input pullup).
  860. * PF7 - PIN7 (input pullup).
  861. * PF8 - PIN8 (input pullup).
  862. * PF9 - PIN9 (input pullup).
  863. * PF10 - PIN10 (input pullup).
  864. * PF11 - PIN11 (input pullup).
  865. * PF12 - PIN12 (input pullup).
  866. * PF13 - PIN13 (input pullup).
  867. * PF14 - PIN14 (input pullup).
  868. * PF15 - PIN15 (input pullup).
  869. */
  870. #define VAL_GPIOF_MODER (PIN_MODE_INPUT(GPIOF_PIN0) | \
  871. PIN_MODE_INPUT(GPIOF_PIN1) | \
  872. PIN_MODE_INPUT(GPIOF_PIN2) | \
  873. PIN_MODE_INPUT(GPIOF_PIN3) | \
  874. PIN_MODE_INPUT(GPIOF_PIN4) | \
  875. PIN_MODE_INPUT(GPIOF_PIN5) | \
  876. PIN_MODE_INPUT(GPIOF_PIN6) | \
  877. PIN_MODE_INPUT(GPIOF_PIN7) | \
  878. PIN_MODE_INPUT(GPIOF_PIN8) | \
  879. PIN_MODE_INPUT(GPIOF_PIN9) | \
  880. PIN_MODE_INPUT(GPIOF_PIN10) | \
  881. PIN_MODE_INPUT(GPIOF_PIN11) | \
  882. PIN_MODE_INPUT(GPIOF_PIN12) | \
  883. PIN_MODE_INPUT(GPIOF_PIN13) | \
  884. PIN_MODE_INPUT(GPIOF_PIN14) | \
  885. PIN_MODE_INPUT(GPIOF_PIN15))
  886. #define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(GPIOF_PIN0) | \
  887. PIN_OTYPE_PUSHPULL(GPIOF_PIN1) | \
  888. PIN_OTYPE_PUSHPULL(GPIOF_PIN2) | \
  889. PIN_OTYPE_PUSHPULL(GPIOF_PIN3) | \
  890. PIN_OTYPE_PUSHPULL(GPIOF_PIN4) | \
  891. PIN_OTYPE_PUSHPULL(GPIOF_PIN5) | \
  892. PIN_OTYPE_PUSHPULL(GPIOF_PIN6) | \
  893. PIN_OTYPE_PUSHPULL(GPIOF_PIN7) | \
  894. PIN_OTYPE_PUSHPULL(GPIOF_PIN8) | \
  895. PIN_OTYPE_PUSHPULL(GPIOF_PIN9) | \
  896. PIN_OTYPE_PUSHPULL(GPIOF_PIN10) | \
  897. PIN_OTYPE_PUSHPULL(GPIOF_PIN11) | \
  898. PIN_OTYPE_PUSHPULL(GPIOF_PIN12) | \
  899. PIN_OTYPE_PUSHPULL(GPIOF_PIN13) | \
  900. PIN_OTYPE_PUSHPULL(GPIOF_PIN14) | \
  901. PIN_OTYPE_PUSHPULL(GPIOF_PIN15))
  902. #define VAL_GPIOF_OSPEEDR (PIN_OSPEED_HIGH(GPIOF_PIN0) | \
  903. PIN_OSPEED_HIGH(GPIOF_PIN1) | \
  904. PIN_OSPEED_HIGH(GPIOF_PIN2) | \
  905. PIN_OSPEED_HIGH(GPIOF_PIN3) | \
  906. PIN_OSPEED_HIGH(GPIOF_PIN4) | \
  907. PIN_OSPEED_HIGH(GPIOF_PIN5) | \
  908. PIN_OSPEED_HIGH(GPIOF_PIN6) | \
  909. PIN_OSPEED_HIGH(GPIOF_PIN7) | \
  910. PIN_OSPEED_HIGH(GPIOF_PIN8) | \
  911. PIN_OSPEED_HIGH(GPIOF_PIN9) | \
  912. PIN_OSPEED_HIGH(GPIOF_PIN10) | \
  913. PIN_OSPEED_HIGH(GPIOF_PIN11) | \
  914. PIN_OSPEED_HIGH(GPIOF_PIN12) | \
  915. PIN_OSPEED_HIGH(GPIOF_PIN13) | \
  916. PIN_OSPEED_HIGH(GPIOF_PIN14) | \
  917. PIN_OSPEED_HIGH(GPIOF_PIN15))
  918. #define VAL_GPIOF_PUPDR (PIN_PUPDR_PULLUP(GPIOF_PIN0) | \
  919. PIN_PUPDR_PULLUP(GPIOF_PIN1) | \
  920. PIN_PUPDR_PULLUP(GPIOF_PIN2) | \
  921. PIN_PUPDR_PULLUP(GPIOF_PIN3) | \
  922. PIN_PUPDR_PULLUP(GPIOF_PIN4) | \
  923. PIN_PUPDR_PULLUP(GPIOF_PIN5) | \
  924. PIN_PUPDR_PULLUP(GPIOF_PIN6) | \
  925. PIN_PUPDR_PULLUP(GPIOF_PIN7) | \
  926. PIN_PUPDR_PULLUP(GPIOF_PIN8) | \
  927. PIN_PUPDR_PULLUP(GPIOF_PIN9) | \
  928. PIN_PUPDR_PULLUP(GPIOF_PIN10) | \
  929. PIN_PUPDR_PULLUP(GPIOF_PIN11) | \
  930. PIN_PUPDR_PULLUP(GPIOF_PIN12) | \
  931. PIN_PUPDR_PULLUP(GPIOF_PIN13) | \
  932. PIN_PUPDR_PULLUP(GPIOF_PIN14) | \
  933. PIN_PUPDR_PULLUP(GPIOF_PIN15))
  934. #define VAL_GPIOF_ODR (PIN_ODR_HIGH(GPIOF_PIN0) | \
  935. PIN_ODR_HIGH(GPIOF_PIN1) | \
  936. PIN_ODR_HIGH(GPIOF_PIN2) | \
  937. PIN_ODR_HIGH(GPIOF_PIN3) | \
  938. PIN_ODR_HIGH(GPIOF_PIN4) | \
  939. PIN_ODR_HIGH(GPIOF_PIN5) | \
  940. PIN_ODR_HIGH(GPIOF_PIN6) | \
  941. PIN_ODR_HIGH(GPIOF_PIN7) | \
  942. PIN_ODR_HIGH(GPIOF_PIN8) | \
  943. PIN_ODR_HIGH(GPIOF_PIN9) | \
  944. PIN_ODR_HIGH(GPIOF_PIN10) | \
  945. PIN_ODR_HIGH(GPIOF_PIN11) | \
  946. PIN_ODR_HIGH(GPIOF_PIN12) | \
  947. PIN_ODR_HIGH(GPIOF_PIN13) | \
  948. PIN_ODR_HIGH(GPIOF_PIN14) | \
  949. PIN_ODR_HIGH(GPIOF_PIN15))
  950. #define VAL_GPIOF_AFRL (PIN_AFIO_AF(GPIOF_PIN0, 0U) | \
  951. PIN_AFIO_AF(GPIOF_PIN1, 0U) | \
  952. PIN_AFIO_AF(GPIOF_PIN2, 0U) | \
  953. PIN_AFIO_AF(GPIOF_PIN3, 0U) | \
  954. PIN_AFIO_AF(GPIOF_PIN4, 0U) | \
  955. PIN_AFIO_AF(GPIOF_PIN5, 0U) | \
  956. PIN_AFIO_AF(GPIOF_PIN6, 0U) | \
  957. PIN_AFIO_AF(GPIOF_PIN7, 0U))
  958. #define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0U) | \
  959. PIN_AFIO_AF(GPIOF_PIN9, 0U) | \
  960. PIN_AFIO_AF(GPIOF_PIN10, 0U) | \
  961. PIN_AFIO_AF(GPIOF_PIN11, 0U) | \
  962. PIN_AFIO_AF(GPIOF_PIN12, 0U) | \
  963. PIN_AFIO_AF(GPIOF_PIN13, 0U) | \
  964. PIN_AFIO_AF(GPIOF_PIN14, 0U) | \
  965. PIN_AFIO_AF(GPIOF_PIN15, 0U))
  966. /*
  967. * GPIOG setup:
  968. *
  969. * PG0 - PIN0 (input pullup).
  970. * PG1 - PIN1 (input pullup).
  971. * PG2 - PIN2 (input pullup).
  972. * PG3 - PIN3 (input pullup).
  973. * PG4 - PIN4 (input pullup).
  974. * PG5 - PIN5 (input pullup).
  975. * PG6 - PIN6 (input pullup).
  976. * PG7 - PIN7 (input pullup).
  977. * PG8 - PIN8 (input pullup).
  978. * PG9 - PIN9 (input pullup).
  979. * PG10 - PIN10 (input pullup).
  980. * PG11 - PIN11 (input pullup).
  981. * PG12 - PIN12 (input pullup).
  982. * PG13 - PIN13 (input pullup).
  983. * PG14 - PIN14 (input pullup).
  984. * PG15 - PIN15 (input pullup).
  985. */
  986. #define VAL_GPIOG_MODER (PIN_MODE_INPUT(GPIOG_PIN0) | \
  987. PIN_MODE_INPUT(GPIOG_PIN1) | \
  988. PIN_MODE_INPUT(GPIOG_PIN2) | \
  989. PIN_MODE_INPUT(GPIOG_PIN3) | \
  990. PIN_MODE_INPUT(GPIOG_PIN4) | \
  991. PIN_MODE_INPUT(GPIOG_PIN5) | \
  992. PIN_MODE_INPUT(GPIOG_PIN6) | \
  993. PIN_MODE_INPUT(GPIOG_PIN7) | \
  994. PIN_MODE_INPUT(GPIOG_PIN8) | \
  995. PIN_MODE_INPUT(GPIOG_PIN9) | \
  996. PIN_MODE_INPUT(GPIOG_PIN10) | \
  997. PIN_MODE_INPUT(GPIOG_PIN11) | \
  998. PIN_MODE_INPUT(GPIOG_PIN12) | \
  999. PIN_MODE_INPUT(GPIOG_PIN13) | \
  1000. PIN_MODE_INPUT(GPIOG_PIN14) | \
  1001. PIN_MODE_INPUT(GPIOG_PIN15))
  1002. #define VAL_GPIOG_OTYPER (PIN_OTYPE_PUSHPULL(GPIOG_PIN0) | \
  1003. PIN_OTYPE_PUSHPULL(GPIOG_PIN1) | \
  1004. PIN_OTYPE_PUSHPULL(GPIOG_PIN2) | \
  1005. PIN_OTYPE_PUSHPULL(GPIOG_PIN3) | \
  1006. PIN_OTYPE_PUSHPULL(GPIOG_PIN4) | \
  1007. PIN_OTYPE_PUSHPULL(GPIOG_PIN5) | \
  1008. PIN_OTYPE_PUSHPULL(GPIOG_PIN6) | \
  1009. PIN_OTYPE_PUSHPULL(GPIOG_PIN7) | \
  1010. PIN_OTYPE_PUSHPULL(GPIOG_PIN8) | \
  1011. PIN_OTYPE_PUSHPULL(GPIOG_PIN9) | \
  1012. PIN_OTYPE_PUSHPULL(GPIOG_PIN10) | \
  1013. PIN_OTYPE_PUSHPULL(GPIOG_PIN11) | \
  1014. PIN_OTYPE_PUSHPULL(GPIOG_PIN12) | \
  1015. PIN_OTYPE_PUSHPULL(GPIOG_PIN13) | \
  1016. PIN_OTYPE_PUSHPULL(GPIOG_PIN14) | \
  1017. PIN_OTYPE_PUSHPULL(GPIOG_PIN15))
  1018. #define VAL_GPIOG_OSPEEDR (PIN_OSPEED_HIGH(GPIOG_PIN0) | \
  1019. PIN_OSPEED_HIGH(GPIOG_PIN1) | \
  1020. PIN_OSPEED_HIGH(GPIOG_PIN2) | \
  1021. PIN_OSPEED_HIGH(GPIOG_PIN3) | \
  1022. PIN_OSPEED_HIGH(GPIOG_PIN4) | \
  1023. PIN_OSPEED_HIGH(GPIOG_PIN5) | \
  1024. PIN_OSPEED_HIGH(GPIOG_PIN6) | \
  1025. PIN_OSPEED_HIGH(GPIOG_PIN7) | \
  1026. PIN_OSPEED_HIGH(GPIOG_PIN8) | \
  1027. PIN_OSPEED_HIGH(GPIOG_PIN9) | \
  1028. PIN_OSPEED_HIGH(GPIOG_PIN10) | \
  1029. PIN_OSPEED_HIGH(GPIOG_PIN11) | \
  1030. PIN_OSPEED_HIGH(GPIOG_PIN12) | \
  1031. PIN_OSPEED_HIGH(GPIOG_PIN13) | \
  1032. PIN_OSPEED_HIGH(GPIOG_PIN14) | \
  1033. PIN_OSPEED_HIGH(GPIOG_PIN15))
  1034. #define VAL_GPIOG_PUPDR (PIN_PUPDR_PULLUP(GPIOG_PIN0) | \
  1035. PIN_PUPDR_PULLUP(GPIOG_PIN1) | \
  1036. PIN_PUPDR_PULLUP(GPIOG_PIN2) | \
  1037. PIN_PUPDR_PULLUP(GPIOG_PIN3) | \
  1038. PIN_PUPDR_PULLUP(GPIOG_PIN4) | \
  1039. PIN_PUPDR_PULLUP(GPIOG_PIN5) | \
  1040. PIN_PUPDR_PULLUP(GPIOG_PIN6) | \
  1041. PIN_PUPDR_PULLUP(GPIOG_PIN7) | \
  1042. PIN_PUPDR_PULLUP(GPIOG_PIN8) | \
  1043. PIN_PUPDR_PULLUP(GPIOG_PIN9) | \
  1044. PIN_PUPDR_PULLUP(GPIOG_PIN10) | \
  1045. PIN_PUPDR_PULLUP(GPIOG_PIN11) | \
  1046. PIN_PUPDR_PULLUP(GPIOG_PIN12) | \
  1047. PIN_PUPDR_PULLUP(GPIOG_PIN13) | \
  1048. PIN_PUPDR_PULLUP(GPIOG_PIN14) | \
  1049. PIN_PUPDR_PULLUP(GPIOG_PIN15))
  1050. #define VAL_GPIOG_ODR (PIN_ODR_HIGH(GPIOG_PIN0) | \
  1051. PIN_ODR_HIGH(GPIOG_PIN1) | \
  1052. PIN_ODR_HIGH(GPIOG_PIN2) | \
  1053. PIN_ODR_HIGH(GPIOG_PIN3) | \
  1054. PIN_ODR_HIGH(GPIOG_PIN4) | \
  1055. PIN_ODR_HIGH(GPIOG_PIN5) | \
  1056. PIN_ODR_HIGH(GPIOG_PIN6) | \
  1057. PIN_ODR_HIGH(GPIOG_PIN7) | \
  1058. PIN_ODR_HIGH(GPIOG_PIN8) | \
  1059. PIN_ODR_HIGH(GPIOG_PIN9) | \
  1060. PIN_ODR_HIGH(GPIOG_PIN10) | \
  1061. PIN_ODR_HIGH(GPIOG_PIN11) | \
  1062. PIN_ODR_HIGH(GPIOG_PIN12) | \
  1063. PIN_ODR_HIGH(GPIOG_PIN13) | \
  1064. PIN_ODR_HIGH(GPIOG_PIN14) | \
  1065. PIN_ODR_HIGH(GPIOG_PIN15))
  1066. #define VAL_GPIOG_AFRL (PIN_AFIO_AF(GPIOG_PIN0, 0U) | \
  1067. PIN_AFIO_AF(GPIOG_PIN1, 0U) | \
  1068. PIN_AFIO_AF(GPIOG_PIN2, 0U) | \
  1069. PIN_AFIO_AF(GPIOG_PIN3, 0U) | \
  1070. PIN_AFIO_AF(GPIOG_PIN4, 0U) | \
  1071. PIN_AFIO_AF(GPIOG_PIN5, 0U) | \
  1072. PIN_AFIO_AF(GPIOG_PIN6, 0U) | \
  1073. PIN_AFIO_AF(GPIOG_PIN7, 0U))
  1074. #define VAL_GPIOG_AFRH (PIN_AFIO_AF(GPIOG_PIN8, 0U) | \
  1075. PIN_AFIO_AF(GPIOG_PIN9, 0U) | \
  1076. PIN_AFIO_AF(GPIOG_PIN10, 0U) | \
  1077. PIN_AFIO_AF(GPIOG_PIN11, 0U) | \
  1078. PIN_AFIO_AF(GPIOG_PIN12, 0U) | \
  1079. PIN_AFIO_AF(GPIOG_PIN13, 0U) | \
  1080. PIN_AFIO_AF(GPIOG_PIN14, 0U) | \
  1081. PIN_AFIO_AF(GPIOG_PIN15, 0U))
  1082. /*
  1083. * GPIOH setup:
  1084. *
  1085. * PH0 - OSC_IN (input floating).
  1086. * PH1 - OSC_OUT (input floating).
  1087. * PH2 - PIN2 (input pullup).
  1088. * PH3 - PIN3 (input pullup).
  1089. * PH4 - PIN4 (input pullup).
  1090. * PH5 - PIN5 (input pullup).
  1091. * PH6 - PIN6 (input pullup).
  1092. * PH7 - PIN7 (input pullup).
  1093. * PH8 - PIN8 (input pullup).
  1094. * PH9 - PIN9 (input pullup).
  1095. * PH10 - PIN10 (input pullup).
  1096. * PH11 - PIN11 (input pullup).
  1097. * PH12 - PIN12 (input pullup).
  1098. * PH13 - PIN13 (input pullup).
  1099. * PH14 - PIN14 (input pullup).
  1100. * PH15 - PIN15 (input pullup).
  1101. */
  1102. #define VAL_GPIOH_MODER (PIN_MODE_INPUT(GPIOH_OSC_IN) | \
  1103. PIN_MODE_INPUT(GPIOH_OSC_OUT) | \
  1104. PIN_MODE_INPUT(GPIOH_PIN2) | \
  1105. PIN_MODE_INPUT(GPIOH_PIN3) | \
  1106. PIN_MODE_INPUT(GPIOH_PIN4) | \
  1107. PIN_MODE_INPUT(GPIOH_PIN5) | \
  1108. PIN_MODE_INPUT(GPIOH_PIN6) | \
  1109. PIN_MODE_INPUT(GPIOH_PIN7) | \
  1110. PIN_MODE_INPUT(GPIOH_PIN8) | \
  1111. PIN_MODE_INPUT(GPIOH_PIN9) | \
  1112. PIN_MODE_INPUT(GPIOH_PIN10) | \
  1113. PIN_MODE_INPUT(GPIOH_PIN11) | \
  1114. PIN_MODE_INPUT(GPIOH_PIN12) | \
  1115. PIN_MODE_INPUT(GPIOH_PIN13) | \
  1116. PIN_MODE_INPUT(GPIOH_PIN14) | \
  1117. PIN_MODE_INPUT(GPIOH_PIN15))
  1118. #define VAL_GPIOH_OTYPER (PIN_OTYPE_PUSHPULL(GPIOH_OSC_IN) | \
  1119. PIN_OTYPE_PUSHPULL(GPIOH_OSC_OUT) | \
  1120. PIN_OTYPE_PUSHPULL(GPIOH_PIN2) | \
  1121. PIN_OTYPE_PUSHPULL(GPIOH_PIN3) | \
  1122. PIN_OTYPE_PUSHPULL(GPIOH_PIN4) | \
  1123. PIN_OTYPE_PUSHPULL(GPIOH_PIN5) | \
  1124. PIN_OTYPE_PUSHPULL(GPIOH_PIN6) | \
  1125. PIN_OTYPE_PUSHPULL(GPIOH_PIN7) | \
  1126. PIN_OTYPE_PUSHPULL(GPIOH_PIN8) | \
  1127. PIN_OTYPE_PUSHPULL(GPIOH_PIN9) | \
  1128. PIN_OTYPE_PUSHPULL(GPIOH_PIN10) | \
  1129. PIN_OTYPE_PUSHPULL(GPIOH_PIN11) | \
  1130. PIN_OTYPE_PUSHPULL(GPIOH_PIN12) | \
  1131. PIN_OTYPE_PUSHPULL(GPIOH_PIN13) | \
  1132. PIN_OTYPE_PUSHPULL(GPIOH_PIN14) | \
  1133. PIN_OTYPE_PUSHPULL(GPIOH_PIN15))
  1134. #define VAL_GPIOH_OSPEEDR (PIN_OSPEED_HIGH(GPIOH_OSC_IN) | \
  1135. PIN_OSPEED_HIGH(GPIOH_OSC_OUT) | \
  1136. PIN_OSPEED_HIGH(GPIOH_PIN2) | \
  1137. PIN_OSPEED_HIGH(GPIOH_PIN3) | \
  1138. PIN_OSPEED_HIGH(GPIOH_PIN4) | \
  1139. PIN_OSPEED_HIGH(GPIOH_PIN5) | \
  1140. PIN_OSPEED_HIGH(GPIOH_PIN6) | \
  1141. PIN_OSPEED_HIGH(GPIOH_PIN7) | \
  1142. PIN_OSPEED_HIGH(GPIOH_PIN8) | \
  1143. PIN_OSPEED_HIGH(GPIOH_PIN9) | \
  1144. PIN_OSPEED_HIGH(GPIOH_PIN10) | \
  1145. PIN_OSPEED_HIGH(GPIOH_PIN11) | \
  1146. PIN_OSPEED_HIGH(GPIOH_PIN12) | \
  1147. PIN_OSPEED_HIGH(GPIOH_PIN13) | \
  1148. PIN_OSPEED_HIGH(GPIOH_PIN14) | \
  1149. PIN_OSPEED_HIGH(GPIOH_PIN15))
  1150. #define VAL_GPIOH_PUPDR (PIN_PUPDR_FLOATING(GPIOH_OSC_IN) | \
  1151. PIN_PUPDR_FLOATING(GPIOH_OSC_OUT) | \
  1152. PIN_PUPDR_PULLUP(GPIOH_PIN2) | \
  1153. PIN_PUPDR_PULLUP(GPIOH_PIN3) | \
  1154. PIN_PUPDR_PULLUP(GPIOH_PIN4) | \
  1155. PIN_PUPDR_PULLUP(GPIOH_PIN5) | \
  1156. PIN_PUPDR_PULLUP(GPIOH_PIN6) | \
  1157. PIN_PUPDR_PULLUP(GPIOH_PIN7) | \
  1158. PIN_PUPDR_PULLUP(GPIOH_PIN8) | \
  1159. PIN_PUPDR_PULLUP(GPIOH_PIN9) | \
  1160. PIN_PUPDR_PULLUP(GPIOH_PIN10) | \
  1161. PIN_PUPDR_PULLUP(GPIOH_PIN11) | \
  1162. PIN_PUPDR_PULLUP(GPIOH_PIN12) | \
  1163. PIN_PUPDR_PULLUP(GPIOH_PIN13) | \
  1164. PIN_PUPDR_PULLUP(GPIOH_PIN14) | \
  1165. PIN_PUPDR_PULLUP(GPIOH_PIN15))
  1166. #define VAL_GPIOH_ODR (PIN_ODR_HIGH(GPIOH_OSC_IN) | \
  1167. PIN_ODR_HIGH(GPIOH_OSC_OUT) | \
  1168. PIN_ODR_HIGH(GPIOH_PIN2) | \
  1169. PIN_ODR_HIGH(GPIOH_PIN3) | \
  1170. PIN_ODR_HIGH(GPIOH_PIN4) | \
  1171. PIN_ODR_HIGH(GPIOH_PIN5) | \
  1172. PIN_ODR_HIGH(GPIOH_PIN6) | \
  1173. PIN_ODR_HIGH(GPIOH_PIN7) | \
  1174. PIN_ODR_HIGH(GPIOH_PIN8) | \
  1175. PIN_ODR_HIGH(GPIOH_PIN9) | \
  1176. PIN_ODR_HIGH(GPIOH_PIN10) | \
  1177. PIN_ODR_HIGH(GPIOH_PIN11) | \
  1178. PIN_ODR_HIGH(GPIOH_PIN12) | \
  1179. PIN_ODR_HIGH(GPIOH_PIN13) | \
  1180. PIN_ODR_HIGH(GPIOH_PIN14) | \
  1181. PIN_ODR_HIGH(GPIOH_PIN15))
  1182. #define VAL_GPIOH_AFRL (PIN_AFIO_AF(GPIOH_OSC_IN, 0U) | \
  1183. PIN_AFIO_AF(GPIOH_OSC_OUT, 0U) | \
  1184. PIN_AFIO_AF(GPIOH_PIN2, 0U) | \
  1185. PIN_AFIO_AF(GPIOH_PIN3, 0U) | \
  1186. PIN_AFIO_AF(GPIOH_PIN4, 0U) | \
  1187. PIN_AFIO_AF(GPIOH_PIN5, 0U) | \
  1188. PIN_AFIO_AF(GPIOH_PIN6, 0U) | \
  1189. PIN_AFIO_AF(GPIOH_PIN7, 0U))
  1190. #define VAL_GPIOH_AFRH (PIN_AFIO_AF(GPIOH_PIN8, 0U) | \
  1191. PIN_AFIO_AF(GPIOH_PIN9, 0U) | \
  1192. PIN_AFIO_AF(GPIOH_PIN10, 0U) | \
  1193. PIN_AFIO_AF(GPIOH_PIN11, 0U) | \
  1194. PIN_AFIO_AF(GPIOH_PIN12, 0U) | \
  1195. PIN_AFIO_AF(GPIOH_PIN13, 0U) | \
  1196. PIN_AFIO_AF(GPIOH_PIN14, 0U) | \
  1197. PIN_AFIO_AF(GPIOH_PIN15, 0U))
  1198. /*
  1199. * GPIOI setup:
  1200. *
  1201. * PI0 - PIN0 (input pullup).
  1202. * PI1 - PIN1 (input pullup).
  1203. * PI2 - PIN2 (input pullup).
  1204. * PI3 - PIN3 (input pullup).
  1205. * PI4 - PIN4 (input pullup).
  1206. * PI5 - PIN5 (input pullup).
  1207. * PI6 - PIN6 (input pullup).
  1208. * PI7 - PIN7 (input pullup).
  1209. * PI8 - PIN8 (input pullup).
  1210. * PI9 - PIN9 (input pullup).
  1211. * PI10 - PIN10 (input pullup).
  1212. * PI11 - PIN11 (input pullup).
  1213. * PI12 - PIN12 (input pullup).
  1214. * PI13 - PIN13 (input pullup).
  1215. * PI14 - PIN14 (input pullup).
  1216. * PI15 - PIN15 (input pullup).
  1217. */
  1218. #define VAL_GPIOI_MODER (PIN_MODE_INPUT(GPIOI_PIN0) | \
  1219. PIN_MODE_INPUT(GPIOI_PIN1) | \
  1220. PIN_MODE_INPUT(GPIOI_PIN2) | \
  1221. PIN_MODE_INPUT(GPIOI_PIN3) | \
  1222. PIN_MODE_INPUT(GPIOI_PIN4) | \
  1223. PIN_MODE_INPUT(GPIOI_PIN5) | \
  1224. PIN_MODE_INPUT(GPIOI_PIN6) | \
  1225. PIN_MODE_INPUT(GPIOI_PIN7) | \
  1226. PIN_MODE_INPUT(GPIOI_PIN8) | \
  1227. PIN_MODE_INPUT(GPIOI_PIN9) | \
  1228. PIN_MODE_INPUT(GPIOI_PIN10) | \
  1229. PIN_MODE_INPUT(GPIOI_PIN11) | \
  1230. PIN_MODE_INPUT(GPIOI_PIN12) | \
  1231. PIN_MODE_INPUT(GPIOI_PIN13) | \
  1232. PIN_MODE_INPUT(GPIOI_PIN14) | \
  1233. PIN_MODE_INPUT(GPIOI_PIN15))
  1234. #define VAL_GPIOI_OTYPER (PIN_OTYPE_PUSHPULL(GPIOI_PIN0) | \
  1235. PIN_OTYPE_PUSHPULL(GPIOI_PIN1) | \
  1236. PIN_OTYPE_PUSHPULL(GPIOI_PIN2) | \
  1237. PIN_OTYPE_PUSHPULL(GPIOI_PIN3) | \
  1238. PIN_OTYPE_PUSHPULL(GPIOI_PIN4) | \
  1239. PIN_OTYPE_PUSHPULL(GPIOI_PIN5) | \
  1240. PIN_OTYPE_PUSHPULL(GPIOI_PIN6) | \
  1241. PIN_OTYPE_PUSHPULL(GPIOI_PIN7) | \
  1242. PIN_OTYPE_PUSHPULL(GPIOI_PIN8) | \
  1243. PIN_OTYPE_PUSHPULL(GPIOI_PIN9) | \
  1244. PIN_OTYPE_PUSHPULL(GPIOI_PIN10) | \
  1245. PIN_OTYPE_PUSHPULL(GPIOI_PIN11) | \
  1246. PIN_OTYPE_PUSHPULL(GPIOI_PIN12) | \
  1247. PIN_OTYPE_PUSHPULL(GPIOI_PIN13) | \
  1248. PIN_OTYPE_PUSHPULL(GPIOI_PIN14) | \
  1249. PIN_OTYPE_PUSHPULL(GPIOI_PIN15))
  1250. #define VAL_GPIOI_OSPEEDR (PIN_OSPEED_HIGH(GPIOI_PIN0) | \
  1251. PIN_OSPEED_HIGH(GPIOI_PIN1) | \
  1252. PIN_OSPEED_HIGH(GPIOI_PIN2) | \
  1253. PIN_OSPEED_HIGH(GPIOI_PIN3) | \
  1254. PIN_OSPEED_HIGH(GPIOI_PIN4) | \
  1255. PIN_OSPEED_HIGH(GPIOI_PIN5) | \
  1256. PIN_OSPEED_HIGH(GPIOI_PIN6) | \
  1257. PIN_OSPEED_HIGH(GPIOI_PIN7) | \
  1258. PIN_OSPEED_HIGH(GPIOI_PIN8) | \
  1259. PIN_OSPEED_HIGH(GPIOI_PIN9) | \
  1260. PIN_OSPEED_HIGH(GPIOI_PIN10) | \
  1261. PIN_OSPEED_HIGH(GPIOI_PIN11) | \
  1262. PIN_OSPEED_HIGH(GPIOI_PIN12) | \
  1263. PIN_OSPEED_HIGH(GPIOI_PIN13) | \
  1264. PIN_OSPEED_HIGH(GPIOI_PIN14) | \
  1265. PIN_OSPEED_HIGH(GPIOI_PIN15))
  1266. #define VAL_GPIOI_PUPDR (PIN_PUPDR_PULLUP(GPIOI_PIN0) | \
  1267. PIN_PUPDR_PULLUP(GPIOI_PIN1) | \
  1268. PIN_PUPDR_PULLUP(GPIOI_PIN2) | \
  1269. PIN_PUPDR_PULLUP(GPIOI_PIN3) | \
  1270. PIN_PUPDR_PULLUP(GPIOI_PIN4) | \
  1271. PIN_PUPDR_PULLUP(GPIOI_PIN5) | \
  1272. PIN_PUPDR_PULLUP(GPIOI_PIN6) | \
  1273. PIN_PUPDR_PULLUP(GPIOI_PIN7) | \
  1274. PIN_PUPDR_PULLUP(GPIOI_PIN8) | \
  1275. PIN_PUPDR_PULLUP(GPIOI_PIN9) | \
  1276. PIN_PUPDR_PULLUP(GPIOI_PIN10) | \
  1277. PIN_PUPDR_PULLUP(GPIOI_PIN11) | \
  1278. PIN_PUPDR_PULLUP(GPIOI_PIN12) | \
  1279. PIN_PUPDR_PULLUP(GPIOI_PIN13) | \
  1280. PIN_PUPDR_PULLUP(GPIOI_PIN14) | \
  1281. PIN_PUPDR_PULLUP(GPIOI_PIN15))
  1282. #define VAL_GPIOI_ODR (PIN_ODR_HIGH(GPIOI_PIN0) | \
  1283. PIN_ODR_HIGH(GPIOI_PIN1) | \
  1284. PIN_ODR_HIGH(GPIOI_PIN2) | \
  1285. PIN_ODR_HIGH(GPIOI_PIN3) | \
  1286. PIN_ODR_HIGH(GPIOI_PIN4) | \
  1287. PIN_ODR_HIGH(GPIOI_PIN5) | \
  1288. PIN_ODR_HIGH(GPIOI_PIN6) | \
  1289. PIN_ODR_HIGH(GPIOI_PIN7) | \
  1290. PIN_ODR_HIGH(GPIOI_PIN8) | \
  1291. PIN_ODR_HIGH(GPIOI_PIN9) | \
  1292. PIN_ODR_HIGH(GPIOI_PIN10) | \
  1293. PIN_ODR_HIGH(GPIOI_PIN11) | \
  1294. PIN_ODR_HIGH(GPIOI_PIN12) | \
  1295. PIN_ODR_HIGH(GPIOI_PIN13) | \
  1296. PIN_ODR_HIGH(GPIOI_PIN14) | \
  1297. PIN_ODR_HIGH(GPIOI_PIN15))
  1298. #define VAL_GPIOI_AFRL (PIN_AFIO_AF(GPIOI_PIN0, 0U) | \
  1299. PIN_AFIO_AF(GPIOI_PIN1, 0U) | \
  1300. PIN_AFIO_AF(GPIOI_PIN2, 0U) | \
  1301. PIN_AFIO_AF(GPIOI_PIN3, 0U) | \
  1302. PIN_AFIO_AF(GPIOI_PIN4, 0U) | \
  1303. PIN_AFIO_AF(GPIOI_PIN5, 0U) | \
  1304. PIN_AFIO_AF(GPIOI_PIN6, 0U) | \
  1305. PIN_AFIO_AF(GPIOI_PIN7, 0U))
  1306. #define VAL_GPIOI_AFRH (PIN_AFIO_AF(GPIOI_PIN8, 0U) | \
  1307. PIN_AFIO_AF(GPIOI_PIN9, 0U) | \
  1308. PIN_AFIO_AF(GPIOI_PIN10, 0U) | \
  1309. PIN_AFIO_AF(GPIOI_PIN11, 0U) | \
  1310. PIN_AFIO_AF(GPIOI_PIN12, 0U) | \
  1311. PIN_AFIO_AF(GPIOI_PIN13, 0U) | \
  1312. PIN_AFIO_AF(GPIOI_PIN14, 0U) | \
  1313. PIN_AFIO_AF(GPIOI_PIN15, 0U))
  1314. /*===========================================================================*/
  1315. /* External declarations. */
  1316. /*===========================================================================*/
  1317. #if !defined(_FROM_ASM_)
  1318. #ifdef __cplusplus
  1319. extern "C" {
  1320. #endif
  1321. void boardInit(void);
  1322. #ifdef __cplusplus
  1323. }
  1324. #endif
  1325. #endif /* _FROM_ASM_ */
  1326. #endif /* BOARD_H */