How to index different GPIO ports in one array
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2023-08-22 6:46 AM - edited 2023-08-22 6:47 AM
hi everyone.
I'm trying to index different GPIO ports and pins.
#define STEP1_HALF1_PORT GPIOA
#define STEP2_HALF1_PORT GPIOB
#define STEP3_HALF1_PORT GPIOA
#define STEP4_HALF1_PORT GPIOC
#define STEP5_HALF1_PORT GPIOB
GPIO_TypeDef *Half1StepPortNum[5] = {
STEP1_HALF1_PORT,
STEP2_HALF1_PORT,
STEP3_HALF1_PORT,
STEP4_HALF1_PORT,
STEP5_HALF1_PORT };
BUT the code does not work. and stuck
Labels:
- Labels:
-
GPIO-EXTI
-
STM32CubeMX
-
STM32F1 Series
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2023-08-22 6:54 AM
The code you presented is fine. The issue is somewhere else.
If you feel a post has answered your question, please click "Accept as Solution".
