ВходНаше всё Теги codebook 无线电组件 Поиск Опросы Закон Воскресенье
21 июля
43190
_igor_U_ (03.11.2005 13:53, просмотров: 751)
Создание массива ссылок на функцию. Корректно ли делать так в avr gcc. typedef void (*Call)(struct StructFormation *Adr); void SearchStart(struct StructFormation *Adr) { ...... } void ConfirmationStart(struct StructFormation *Adr) { ...... } void ConfirmationStop(struct StructFormation *Adr) { .... } void FormationByte(struct StructFormation *Adr) { .... } Call AdrCall[] PROGMEM = { SearchStart, ConfirmationStart, FormationByte, ConfirmationStop, }; void FormationChanal(struct StructFormation *Adr) { .... ((Call)pgm_read_word(&AdrCall[Adr->Flags]))(Adr); .... }