Пытаюсь добавить поддержку DHCP в проект Simple Webserver из IAR.
Скопировал файлы dhcpc.h и dhcp.c и файл dhcp.c добавил к проекту.
При компиляции IAR ругается на строки, где используется структура struct uip_eth_addr которая определена в файле uip.h как
Код
/**
* Representation of a 48-bit Ethernet address.
*/
struct uip_eth_addr{
u8_t addr[6];
};
* Representation of a 48-bit Ethernet address.
*/
struct uip_eth_addr{
u8_t addr[6];
};
Например кусок кода
Код
#ifndef __UIP_ARP_H__
#define __UIP_ARP_H__
#include "uip.h"
#if UIP_FIXEDETHADDR
extern const struct uip_eth_addr uip_ethaddr;
#else
extern struct uip_eth_addr uip_ethaddr;
#endif
/**
* The Ethernet header.
*/
struct uip_eth_hdr {
struct uip_eth_addr dest; //Error[Pe070] incomplet type is not allowed
struct uip_eth_addr src; //Error[Pe070] incomplet type is not allowed
u16_t type;
};
#endif //__UIP_ARP_H__
#define __UIP_ARP_H__
#include "uip.h"
#if UIP_FIXEDETHADDR
extern const struct uip_eth_addr uip_ethaddr;
#else
extern struct uip_eth_addr uip_ethaddr;
#endif
/**
* The Ethernet header.
*/
struct uip_eth_hdr {
struct uip_eth_addr dest; //Error[Pe070] incomplet type is not allowed
struct uip_eth_addr src; //Error[Pe070] incomplet type is not allowed
u16_t type;
};
#endif //__UIP_ARP_H__
В этом куске кода файл uip.h подключён директивой #include.
Т.е. теоретически код ниже должен свободно понимать что такое struct uip_eth_addr.
Практически выдаётся ошибка Pe070.
В чём я не прав? Или что я упускаю из виду?
Прилагаю также проект в IAR ARM 5.40