Page 1 of 1

New serial code, interrupt clocks, and array buffers.

Posted: Thu Jan 05, 2012 3:37 am
by Danal
I've been looking at the assembler for the new Multiwii Serial code. In the interrupt handlers as coded, there are a few extra instructions because the buffers are arrays. This is not a huge deal, it is only a couple of instructions, but they'd be gone if we used separate buffers by name.

I would have thought the compiler would optimize these out, because the array references are all hard coded. But it doesn't.

Therefore, I'm going to change the buffers to non-array named objects. Almost no code will need to change, as the code already is based on case statements and so forth.


Just a heads up, and a "why" for when you see the changes in shared.


Cheers,
Danal