Merge pull request #2791 from balanceTWK/gpio_pr

[bsp][stm32] fix drv_gpio.c 直接将特殊引脚删除,不再作为 pin 设备
This commit is contained in:
Bernard Xiong 2019-06-19 10:01:42 +08:00 committed by GitHub
commit d855d381ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 22 additions and 22 deletions

View File

@ -16,7 +16,7 @@
static const struct pin_index pins[] = static const struct pin_index pins[] =
{ {
#ifdef GPIOA #if defined(GPIOA)
__STM32_PIN(0 , A, 0 ), __STM32_PIN(0 , A, 0 ),
__STM32_PIN(1 , A, 1 ), __STM32_PIN(1 , A, 1 ),
__STM32_PIN(2 , A, 2 ), __STM32_PIN(2 , A, 2 ),
@ -33,8 +33,7 @@ static const struct pin_index pins[] =
__STM32_PIN(13, A, 13), __STM32_PIN(13, A, 13),
__STM32_PIN(14, A, 14), __STM32_PIN(14, A, 14),
__STM32_PIN(15, A, 15), __STM32_PIN(15, A, 15),
#endif #if defined(GPIOB)
#ifdef GPIOB
__STM32_PIN(16, B, 0), __STM32_PIN(16, B, 0),
__STM32_PIN(17, B, 1), __STM32_PIN(17, B, 1),
__STM32_PIN(18, B, 2), __STM32_PIN(18, B, 2),
@ -51,8 +50,7 @@ static const struct pin_index pins[] =
__STM32_PIN(29, B, 13), __STM32_PIN(29, B, 13),
__STM32_PIN(30, B, 14), __STM32_PIN(30, B, 14),
__STM32_PIN(31, B, 15), __STM32_PIN(31, B, 15),
#endif #if defined(GPIOC)
#ifdef GPIOC
__STM32_PIN(32, C, 0), __STM32_PIN(32, C, 0),
__STM32_PIN(33, C, 1), __STM32_PIN(33, C, 1),
__STM32_PIN(34, C, 2), __STM32_PIN(34, C, 2),
@ -69,8 +67,7 @@ static const struct pin_index pins[] =
__STM32_PIN(45, C, 13), __STM32_PIN(45, C, 13),
__STM32_PIN(46, C, 14), __STM32_PIN(46, C, 14),
__STM32_PIN(47, C, 15), __STM32_PIN(47, C, 15),
#endif #if defined(GPIOD)
#ifdef GPIOD
__STM32_PIN(48, D, 0), __STM32_PIN(48, D, 0),
__STM32_PIN(49, D, 1), __STM32_PIN(49, D, 1),
__STM32_PIN(50, D, 2), __STM32_PIN(50, D, 2),
@ -87,8 +84,7 @@ static const struct pin_index pins[] =
__STM32_PIN(61, D, 13), __STM32_PIN(61, D, 13),
__STM32_PIN(62, D, 14), __STM32_PIN(62, D, 14),
__STM32_PIN(63, D, 15), __STM32_PIN(63, D, 15),
#endif #if defined(GPIOE)
#ifdef GPIOE
__STM32_PIN(64, E, 0), __STM32_PIN(64, E, 0),
__STM32_PIN(65, E, 1), __STM32_PIN(65, E, 1),
__STM32_PIN(66, E, 2), __STM32_PIN(66, E, 2),
@ -105,8 +101,7 @@ static const struct pin_index pins[] =
__STM32_PIN(77, E, 13), __STM32_PIN(77, E, 13),
__STM32_PIN(78, E, 14), __STM32_PIN(78, E, 14),
__STM32_PIN(79, E, 15), __STM32_PIN(79, E, 15),
#endif #if defined(GPIOF)
#ifdef GPIOF
__STM32_PIN(80, F, 0), __STM32_PIN(80, F, 0),
__STM32_PIN(81, F, 1), __STM32_PIN(81, F, 1),
__STM32_PIN(82, F, 2), __STM32_PIN(82, F, 2),
@ -123,8 +118,7 @@ static const struct pin_index pins[] =
__STM32_PIN(93, F, 13), __STM32_PIN(93, F, 13),
__STM32_PIN(94, F, 14), __STM32_PIN(94, F, 14),
__STM32_PIN(95, F, 15), __STM32_PIN(95, F, 15),
#endif #if defined(GPIOG)
#ifdef GPIOG
__STM32_PIN(96, G, 0), __STM32_PIN(96, G, 0),
__STM32_PIN(97, G, 1), __STM32_PIN(97, G, 1),
__STM32_PIN(98, G, 2), __STM32_PIN(98, G, 2),
@ -141,8 +135,7 @@ static const struct pin_index pins[] =
__STM32_PIN(109, G, 13), __STM32_PIN(109, G, 13),
__STM32_PIN(110, G, 14), __STM32_PIN(110, G, 14),
__STM32_PIN(111, G, 15), __STM32_PIN(111, G, 15),
#endif #if defined(GPIOH)
#ifdef GPIOH
__STM32_PIN(112, H, 0), __STM32_PIN(112, H, 0),
__STM32_PIN(113, H, 1), __STM32_PIN(113, H, 1),
__STM32_PIN(114, H, 2), __STM32_PIN(114, H, 2),
@ -159,8 +152,7 @@ static const struct pin_index pins[] =
__STM32_PIN(125, H, 13), __STM32_PIN(125, H, 13),
__STM32_PIN(126, H, 14), __STM32_PIN(126, H, 14),
__STM32_PIN(127, H, 15), __STM32_PIN(127, H, 15),
#endif #if defined(GPIOI)
#ifdef GPIOI
__STM32_PIN(128, I, 0), __STM32_PIN(128, I, 0),
__STM32_PIN(129, I, 1), __STM32_PIN(129, I, 1),
__STM32_PIN(130, I, 2), __STM32_PIN(130, I, 2),
@ -177,8 +169,7 @@ static const struct pin_index pins[] =
__STM32_PIN(141, I, 13), __STM32_PIN(141, I, 13),
__STM32_PIN(142, I, 14), __STM32_PIN(142, I, 14),
__STM32_PIN(143, I, 15), __STM32_PIN(143, I, 15),
#endif #if defined(GPIOJ)
#ifdef GPIOJ
__STM32_PIN(144, J, 0), __STM32_PIN(144, J, 0),
__STM32_PIN(145, J, 1), __STM32_PIN(145, J, 1),
__STM32_PIN(146, J, 2), __STM32_PIN(146, J, 2),
@ -195,8 +186,7 @@ static const struct pin_index pins[] =
__STM32_PIN(157, J, 13), __STM32_PIN(157, J, 13),
__STM32_PIN(158, J, 14), __STM32_PIN(158, J, 14),
__STM32_PIN(159, J, 15), __STM32_PIN(159, J, 15),
#endif #if defined(GPIOK)
#ifdef GPIOK
__STM32_PIN(160, K, 0), __STM32_PIN(160, K, 0),
__STM32_PIN(161, K, 1), __STM32_PIN(161, K, 1),
__STM32_PIN(162, K, 2), __STM32_PIN(162, K, 2),
@ -213,7 +203,17 @@ static const struct pin_index pins[] =
__STM32_PIN(173, K, 13), __STM32_PIN(173, K, 13),
__STM32_PIN(174, K, 14), __STM32_PIN(174, K, 14),
__STM32_PIN(175, K, 15), __STM32_PIN(175, K, 15),
#endif #endif /* defined(GPIOK) */
#endif /* defined(GPIOJ) */
#endif /* defined(GPIOI) */
#endif /* defined(GPIOH) */
#endif /* defined(GPIOG) */
#endif /* defined(GPIOF) */
#endif /* defined(GPIOE) */
#endif /* defined(GPIOD) */
#endif /* defined(GPIOC) */
#endif /* defined(GPIOB) */
#endif /* defined(GPIOA) */
}; };
static const struct pin_irq_map pin_irq_map[] = static const struct pin_irq_map pin_irq_map[] =