avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] Re: [Re: Allocating variables to a fixed address]


From: David Brown
Subject: [avr-gcc-list] Re: [Re: Allocating variables to a fixed address]
Date: Wed, 13 May 2009 12:34:11 +0200
User-agent: Thunderbird 2.0.0.21 (Windows/20090302)

Robert von Knobloch wrote:

This solution, while a purer 'C' solution would require me to have all
my 'internal' functions with similar call/return requirements.
This is not, and cannot be, the case. I fear that the magig 'array of
function pointers' has only limited use and is unsuitable here.
But many thanks for your thoughts, every comment here makes me re-think
the problem, which is good.

Cheers,

Robert

You can get around this with some ugly typecasts (hidden in macros), casting your functions to (*void)(void) when initialising the array, and casting back to appropriate signatures before calling the functions. The result will be the same since casting the function signature is not going to affect the value of the function pointer.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]