Hi
I have a pointer to a function, like this:
How do I place the pointer in the rom insted of the ram.Code:extern MyProces(); void(*ProcesPtr)(void) = MyProces;
Hi
I have a pointer to a function, like this:
How do I place the pointer in the rom insted of the ram.Code:extern MyProces(); void(*ProcesPtr)(void) = MyProces;
Platform? Operating system (if any)? Could you be any less vague?
> How do I place the pointer in the rom insted of the ram.
Well you could try making it const, but then the function name is also const as well so what's the point?
non Operating system.
I have some struct’s with data.Well you could try making it const, but then the function name is also const as well so what's the point?
I don’t want to use the same function, for all of my struct’s, for this reason I want the pointer, then I will include the pointer I my struct’s.
By this, do you mean that this is an embedded application? How do you put your struct into ROM? If your function pointer is a struct member, then you simply use a static initializer for the struct and use the same tools that you use for putting structs into a ROM section. If this is not what you're doing, or if you need to make it so that you can change which function is being pointed to by the pointer at run-time, you're a bit out of luck other than using a pointer to a pointer to a function, and have a RAM resident function pointer that is pointed to by the ROM resident pointer. I've done both in the past.Originally Posted by ramdal
Insert obnoxious but pithy remark here
Yes ok, I think I got it, thanks.