so basically i have a big switch that executes actions depending on the button press of a tv remote, sometimes a function call the function call successfully operates a timer counter which i am using to generate a PWM signal and output a square wave to a speaker. I understand how everything works, I wrote every line of code that I have thus far, the only thing i do not understand is how to make it break out of the "subswitch".
basicallly what is happening when you press a button on the remote, i want it to alter the frequency of the note that plays. I calculated how many counts are required for each frequency of note that is desired. So basically the subswitch is supposed to operate via a counter, to know where it is in the sequence of notes, then I have to pass the timer variable back to the switch so i can do the same thing with another button, except this time, decrease the frequency with a button press
if you need any further information I can surely provide it. I tried to include as many important details as possible