GPIO Initialization Function.
1282{
1283 GPIO_InitTypeDef GPIO_InitStruct = {0};
1284
1285
1286
1287
1288 __HAL_RCC_GPIOE_CLK_ENABLE();
1289 __HAL_RCC_GPIOC_CLK_ENABLE();
1290 __HAL_RCC_GPIOF_CLK_ENABLE();
1291 __HAL_RCC_GPIOH_CLK_ENABLE();
1292 __HAL_RCC_GPIOA_CLK_ENABLE();
1293 __HAL_RCC_GPIOB_CLK_ENABLE();
1294 __HAL_RCC_GPIOG_CLK_ENABLE();
1295 __HAL_RCC_GPIOD_CLK_ENABLE();
1296
1297
1298 HAL_GPIO_WritePin(GPIOF, GPIO_PIN_12|GPIO_PIN_13, GPIO_PIN_RESET);
1299
1300
1301 HAL_GPIO_WritePin(GPIOE, GPIO_PIN_7|GPIO_PIN_8|GPIO_PIN_9|GPIO_PIN_11
1302 |GPIO_PIN_13, GPIO_PIN_RESET);
1303
1304
1305 HAL_GPIO_WritePin(GPIOD, GPIO_PIN_14|GPIO_PIN_15, GPIO_PIN_RESET);
1306
1307
1308 HAL_GPIO_WritePin(GPIOG, GPIO_PIN_9, GPIO_PIN_RESET);
1309
1310
1312
1313
1314
1315 GPIO_InitStruct.Pin = GPIO_PIN_3|GPIO_PIN_4|GPIO_PIN_10|GPIO_PIN_12
1316 |GPIO_PIN_14|GPIO_PIN_15|GPIO_PIN_0|GPIO_PIN_1;
1317 GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
1318 GPIO_InitStruct.Pull = GPIO_NOPULL;
1319 HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);
1320
1321
1323 GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING;
1324 GPIO_InitStruct.Pull = GPIO_NOPULL;
1326
1327
1328 GPIO_InitStruct.Pin = GPIO_PIN_2|GPIO_PIN_11;
1329 GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
1330 GPIO_InitStruct.Pull = GPIO_NOPULL;
1331 HAL_GPIO_Init(GPIOF, &GPIO_InitStruct);
1332
1333
1334
1335 GPIO_InitStruct.Pin = GPIO_PIN_2|GPIO_PIN_10|GPIO_PIN_11|GPIO_PIN_12
1336 |GPIO_PIN_14|GPIO_PIN_15|GPIO_PIN_4|GPIO_PIN_6;
1337 GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
1338 GPIO_InitStruct.Pull = GPIO_NOPULL;
1339 HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
1340
1341
1342 GPIO_InitStruct.Pin = GPIO_PIN_12|GPIO_PIN_13;
1343 GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
1344 GPIO_InitStruct.Pull = GPIO_NOPULL;
1345 GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
1346 HAL_GPIO_Init(GPIOF, &GPIO_InitStruct);
1347
1348
1349
1350
1351 GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3
1352 |GPIO_PIN_4|GPIO_PIN_5|GPIO_PIN_6|GPIO_PIN_8
1353 |GPIO_PIN_10|GPIO_PIN_11|GPIO_PIN_15;
1354 GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
1355 GPIO_InitStruct.Pull = GPIO_NOPULL;
1356 HAL_GPIO_Init(GPIOG, &GPIO_InitStruct);
1357
1358
1359
1360 GPIO_InitStruct.Pin = GPIO_PIN_7|GPIO_PIN_8|GPIO_PIN_9|GPIO_PIN_11
1361 |GPIO_PIN_13;
1362 GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
1363 GPIO_InitStruct.Pull = GPIO_NOPULL;
1364 GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
1365 HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);
1366
1367
1368
1369
1370 GPIO_InitStruct.Pin = GPIO_PIN_10|GPIO_PIN_11|GPIO_PIN_12|GPIO_PIN_13
1371 |GPIO_PIN_3|GPIO_PIN_4|GPIO_PIN_5|GPIO_PIN_6
1372 |GPIO_PIN_7;
1373 GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
1374 GPIO_InitStruct.Pull = GPIO_NOPULL;
1375 HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
1376
1377
1378 GPIO_InitStruct.Pin = GPIO_PIN_14|GPIO_PIN_15;
1379 GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
1380 GPIO_InitStruct.Pull = GPIO_NOPULL;
1381 GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
1382 HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
1383
1384
1386 GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
1387 GPIO_InitStruct.Pull = GPIO_NOPULL;
1389
1390
1391
1392 GPIO_InitStruct.Pin = GPIO_PIN_6|GPIO_PIN_7|GPIO_PIN_8|GPIO_PIN_9
1393 |GPIO_PIN_10|GPIO_PIN_11|GPIO_PIN_12;
1394 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
1395 GPIO_InitStruct.Pull = GPIO_NOPULL;
1396 GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
1397 GPIO_InitStruct.Alternate = GPIO_AF12_SDMMC1;
1398 HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
1399
1400
1401 GPIO_InitStruct.Pin = GPIO_PIN_9|GPIO_PIN_10|GPIO_PIN_11|GPIO_PIN_12;
1402 GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
1403 GPIO_InitStruct.Pull = GPIO_NOPULL;
1404 HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
1405
1406
1407 GPIO_InitStruct.Pin = GPIO_PIN_2;
1408 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
1409 GPIO_InitStruct.Pull = GPIO_NOPULL;
1410 GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
1411 GPIO_InitStruct.Alternate = GPIO_AF12_SDMMC1;
1412 HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
1413
1414
1415 GPIO_InitStruct.Pin = GPIO_PIN_9;
1416 GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
1417 GPIO_InitStruct.Pull = GPIO_NOPULL;
1418 GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
1419 HAL_GPIO_Init(GPIOG, &GPIO_InitStruct);
1420
1421
1422 GPIO_InitStruct.Pin =
LD2_Pin;
1423 GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
1424 GPIO_InitStruct.Pull = GPIO_NOPULL;
1425 GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
1427
1428
1429 GPIO_InitStruct.Pin = GPIO_PIN_8|GPIO_PIN_9;
1430 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
1431 GPIO_InitStruct.Pull = GPIO_NOPULL;
1432 GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
1433 GPIO_InitStruct.Alternate = GPIO_AF12_SDMMC1;
1434 HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
1435
1436
1437
1438}
#define USB_OverCurrent_GPIO_Port
#define USB_OverCurrent_Pin
#define USER_Btn_GPIO_Port