взял пример драйвера с atmel.com, пример заточен под ARM. Теперь переношу под arm-gcc (toolchain из проекта YAGARTO), все подточил, кроме файла udp.c. Постоянно валится со следующими ошибками:
Код
udp.c: In function 'UDP_ConfigureEndpoint':
udp.c:579: error: dereferencing pointer to incomplete type
udp.c:580: error: dereferencing pointer to incomplete type
udp.c:582: error: dereferencing pointer to incomplete type
udp.c:602: error: dereferencing pointer to incomplete type
udp.c:579: error: dereferencing pointer to incomplete type
udp.c:580: error: dereferencing pointer to incomplete type
udp.c:582: error: dereferencing pointer to incomplete type
udp.c:602: error: dereferencing pointer to incomplete type
Код, на котором валится:
Код
bool UDP_ConfigureEndpoint(const S_usb *pUsb,
const S_usb_endpoint_descriptor *pEpDesc)
{
unsigned char bEndpoint;
...
bEndpoint = (unsigned char) (pEpDesc->bEndpointAddress & 0x7);
bType = (unsigned char) (pEpDesc->bmAttributes & 0x3);
if (ISSET(pEpDesc->bEndpointAddress, 1 << 7)) {
....
}
.....
pEndpoint->wMaxPacketSize = pEpDesc->wMaxPacketSize;
.....
}
const S_usb_endpoint_descriptor *pEpDesc)
{
unsigned char bEndpoint;
...
bEndpoint = (unsigned char) (pEpDesc->bEndpointAddress & 0x7);
bType = (unsigned char) (pEpDesc->bmAttributes & 0x3);
if (ISSET(pEpDesc->bEndpointAddress, 1 << 7)) {
....
}
.....
pEndpoint->wMaxPacketSize = pEpDesc->wMaxPacketSize;
.....
}
Файл, в котором определен S_usb_endpoint_descriptor подключается в самом начале udp.c.
В чем же проблема? Надеюсь кто-то уже поборол это?
Заранее благодарю!