Skip to main content
Visitor II
August 22, 2023
Question

How to index different GPIO ports in one array

  • August 22, 2023
  • 1 reply
  • 2713 views

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 

This topic has been closed for replies.

1 reply

TDK
August 22, 2023

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""."