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

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

Fw: [avr-gcc-list] Array of pointers to functions


From: Royce & Sharal Pereira
Subject: Fw: [avr-gcc-list] Array of pointers to functions
Date: Sat, 17 Jul 2004 18:11:34 +0530

Hi, all,
----- Original Message -----
From: "Martin Krüger " <address@hidden>
To: "Royce & Sharal Pereira" <address@hidden>
Cc: "AVR-GCC" <address@hidden>
Sent: Saturday, July 17, 2004 3:29 PM
Subject: Antworten: [avr-gcc-list] Array of pointers to functions

Hello Royce
Try this:

void (*func)();
func=(__LPM_word_classic__((PGM_P)call_fun[0]));
(func());

I looked in the produces .s file,seems to be ok.

Martin
//---------------------------------------------------------------------------
Thanks, Martin, for the tip. It works.
Actually I found the 'PGM_P' makes no difference to the code generated, if it 
is omitted(Actually it
means 'const char *', which has no relevance here).
Also, I used ' pgm_read_word(call_fun[f_cnt])' instead of '__LPM..etc..' this 
makes the C code more
readable!
Thanks again!
--Royce.




_______________________________________________
avr-gcc-list mailing list
address@hidden
http://www.avr1.org/mailman/listinfo/avr-gcc-list

Fußball EM 2004: Alle Spiele, alle Tore bei Lycos Sport unter 
http://em2004.lycos.de!





reply via email to

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