[an error occurred while processing this directive] [an error occurred while processing this directive]
Ну тады ещё проще(+)
(«Телесистемы»: Конференция «Микроконтроллеры и их применение»)
[an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive]

Отправлено AlexD 11 сентября 2001 г. 09:39
В ответ на: Ответ: Спасибо! В таком варианте все работает.А....? отправлено Hunter 11 сентября 2001 г. 08:06

#include  <inavr.h>

typedef unsigned int uint;
typedef void (*pFun)(void);

//Есть функциии:
void Func1(void){
__no_operation ();
__no_operation ();
}
void Func2(void){
__no_operation ();
__no_operation ();
}
//есть таблица:
__root __flash uint fFun[]={
/* здесь должен быть адрес функции Func1 (что писать?)*/
(uint)&Func1,
/* здесь должен быть адрес функции Func2 (что писать?)*/
(uint)&Func2
};

void main(void){
((pFun)fFun[0])(); // вызов функции
}


Составить ответ  |||  Конференция  |||  Архив

Ответы



Перейти к списку ответов  |||  Конференция  |||  Архив  |||  Главная страница  |||  Содержание  |||  Без кадра

E-mail: info@telesys.ru