Hi,
Define a function pointer:
STATUS (*ptrghigh_fxn)(uint8 evt, void *parg1, void *parg2); /* Pointer to the trigger function */
Initi it:
ptrghigh_fxn = &TriggerFxn;
Call it:
ptrghigh_fxn(1,2,3);
----------------------------------------------------------
Function:
STATUS TriggerFxn(uint8 ucEvent, void *pArg1, void *pArg2) {
/* do something */
}
Hope it helps,
marko
---- Marko Pavlin <mp@...> piše:
> How can I call function where address is in pointer? Something like this:
>
>
> void test1(void){
> puts("blah");
> }
>
>
> void *exec;
>
> void main(void) {
> exec = (void *)test1;
> __asm
> {
> BL exec
> }
>
> ...
>
> It's out of context. There will be more pointers and *exec can be constant:
> const void *exec = (void *)test1;
>
>
> Thanks!
>
> Marko
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>Message
Re: [lpc2000] Jump from variable
2006-02-23 by marko.panger@siol.net
Attachments
- No local attachments were found for this message.