[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] state machine.
From: |
Richard Urwin |
Subject: |
Re: [avr-gcc-list] state machine. |
Date: |
Fri, 2 Jan 2004 07:39:38 +0000 |
User-agent: |
KMail/1.5.3 |
On Thursday 01 Jan 2004 9:46 pm, Larry Barello wrote:
> Use the jump table. Declare an array of pointers to functions in flash and
> GCC will do the right thing. Unfortunately you can't directly invoke the
> function out of FLASH, but rather you will have to read in the address and
> then call it. It will be ugly in C, but turn into pretty optimal assembly
> code.
I don't use a jump table. The state variable is a pointer to a function.
Not sure how that would turn out for AVR, but it should be good.
--
Richard Urwin