Переношу проект, написанный в AVR Studio 4 под WinAvr, в среду IAR
Столкнулся с тем, что IAR ругается на такую конструкцию (ошибка Pe513):
ssp.spiHwInit=(void *)atmega_spi_init;
где объявления даны следующим образом:
euint8 atmega_spi_init(atmegaSpiInterface *iface);
и
Код
struct SdSpiProtocol
{
void *spiHwInterface;
euint8 (*spiHwInit)(void* spiHwInterface);
euint8 (*spiSendByte)(void* spiHwInterface,euint8 data);
};
typedef struct SdSpiProtocol SdSpiProtocol;
Подскажите, пожалуйста, как ее правильно описать в IAR?
{
void *spiHwInterface;
euint8 (*spiHwInit)(void* spiHwInterface);
euint8 (*spiSendByte)(void* spiHwInterface,euint8 data);
};
typedef struct SdSpiProtocol SdSpiProtocol;