On Tue, 2012-07-24 at 11:11 +0200, Maarten Brock wrote:
> Roelof,
>
> Is there a reason why you use this "poor man's malloc"?
Because I have been trying to get this pointer thing to
work for ages now and that was the best I could come up
with. First time, long ago, I tried it would not work so
I implemented a large array and had #defines for the
different positions in the header file. But that annoyed
me to the extent that I wanted to change it to a structure
so I started trying again a few weeks ago.
> You could also just place a struct variable in memory.
That works right out of the box :-)
> And unless you use its contents in
> an ISR or asm you don't need volatile either.
So, if I read this right I do not have to make the variable
volatile and can still use it in an ISR (and all the other
c files).
Anyway, dank je wel !
roelof

Community

Help

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

I agree to receive quotes, newsletters and other information from sourceforge.net and its partners regarding IT services and products. I understand that I can withdraw my consent at any time. Please refer to our Privacy Policy or Contact Us for more details