cancel
Showing results for 
Search instead for 
Did you mean: 

Configure all the pins on PORT D ?

antonius
Senior
Posted on March 30, 2014 at 14:35

Guys,

How can I configure all the pins on PORT D as output ? I see for one pin :

1.
GPIO_InitStructure.GPIO_Pin = LED1_D_PIN;
2.
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
3.
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
4.
GPIO_Init(LED1_D_PORT, &GPIO_InitStructure);

Thanks
1 REPLY 1
Posted on March 30, 2014 at 14:45

GPIO_Pin is a bit field

GPIO_InitStructure.GPIO_Pin = GPIO_Pin_All;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_Init(GPIOD, &GPIO_InitStructure);

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..