Preferably more into efficient code than pretty pictures.
I've been doing some embedded development in C recently so i'm dealing with small amounts of memory (8kb) and interfacing with LCDs using buttons. Just wondering what the most efficient way of making a menu loop is? Besides modularising everything i'm not really sure where to start.
At the moment i've got an if statement that checks the value of a global menu variable and then checks the submenu variable etc and calls the relevant function. If a button is pressed to change modes the menu variable is changed before the function breaks to the main loop.
It's simple and it works well, but i don't know how efficient it is.
Google is a bit difficult because it throws up lots of stuff on GUIs and web interfaces but that's not what i need.


LinkBack URL
About LinkBacks
Reply With Quote