I need some guidance on how to structure my code for a STM32G0 MCU
What I am trying to accomplish:
I have a old dimmer rack that is used just for decoration but is also a really cool piece of film history. As a project to learn more about embedded development I wanted to make it more interesting to look at. It has nine incandescent indicator lights that I am switching over to nine white LEDs that are being driven by a nine channel LED driver (LP55231) via a STM32G0 to create interesting lighting sequences.
I would like to have nine different LED lighting sequences, all pretty basic like a simple chase from one side to the other, or fading up and down all the LEDs at once, etc. I want to be able to switch between the different lighting sequences by flipping a different switch and have that lighting sequence associated with the switch repeat indefinitely until another switch is turned on or off. The switches them selves are an old school blade type switch so it would either be high or low.
I am having a hard time figuring out how to structure my code overall. I think some of the lighting sequences I have made would be too much code to run inside an interrupt routine. I have read that you want to keep them as short as possible.
When I was learning the C programming language by it self I wrote a program that ran in the terminal using Switch Case to implement a sort of menu that the user could select between some options. This is something similar to what I want to do here but I can’t figure out how to translate what I learned by writing that program to the embedded world. My gut is telling me to use an interrupt but I haven't written enough code to know what is the best way to do this.
I guess ultimately my question is what is the best way to continually detect if a high or low change has occurred on one of nine pins and when that happens run a block of code that corresponds to that pin until another switch is set high or low? Sorry if this seems obvious to some people but I can't seem to figure out what the best way to accomplish this is and have no one else I can ask.
Thank you for your time. 
