STM32H7: Multiple Push Button Interrupts
Hello,
I am looking to implement multiple push buttons (7, specifically) that are used to turn certain features ON/OFF on a front panel. For example:
PB1 = LED ON/OFF
PB2 = DC Power ON/OFF
PB3 = AC Power ON/OFF
etc.
My current plan for my custom board to do this is to use pins PC6-12 and use interrupts (GPIO_EXTI6 for Push Button 1, GPIO_EXTI7 for Push Button 2, etc.). I did this because, on this resource below, it states you cannot use two pins on one line, so I wanted to make sure each button was on a different pin number.
I have two questions based on this:
1) If these buttons are NOT being pressed simultaneously (There's no application to turn them both on at the same time), is the above resource still a hinderance? Or if I just press one of the multiple buttons on the same pin (i.e. PC6 and PD6), can I distinguish which button was pressed?
2) Is this a logical approach? The tasks are not necessarily time sensitive, so I was wondering if polling made more sense, but both options would work, correct?
For reference, I am using STM32H7B3LIH6Q