[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-gcc-list] Array of function pointers in program memory
From: |
Guy Robinson |
Subject: |
[avr-gcc-list] Array of function pointers in program memory |
Date: |
Fri, 4 May 2001 13:48:21 +1200 |
Hi
OK, the following program runs but the array is in SRAM not program memory
like I want. Can anyone point me to some documentation that might explain
what I'm doing wrong or even better tell me the answer:-)?
Regards,
Guy
#include <io.h>
#include <pgmspace.h>
typedef unsigned char u08;
typedef unsigned int u16;
void function0();
void function1();
static prog_void (*FunctionTable[2])() ={function0,function1};
u08 index;
void function0(){
}
void function1(){
}
void main(void){
index =0;
do
{
(*FunctionTable[index])();
index++;
}
while(index<2);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [avr-gcc-list] Array of function pointers in program memory,
Guy Robinson <=