??? 12/15/08 09:44 Read: times |
#160940 - What do you want burn? Responding to: ???'s previous message |
Code memory, or execution cycles?
In the first case, rewrite the function as a macro, and use the pin names as parameters. Upon using the macro, each time a new "instance" of the function will be created. In the second case, you will need to use shift-and-mask operations to set/clear bits, and a switch-case construct to select the desired port. You might find some more elegant description in C, but the compiler will boil it down to one of these two cases anyway. JW |
Topic | Author | Date |
function reuse on multiple ports | 01/01/70 00:00 | |
What do you want burn? | 01/01/70 00:00 | |
Surely a you connect multiple devices to a single bus![]() | 01/01/70 00:00 |