mirror of https://github.com/ARMmbed/mbed-os.git
EMAC: Fix "#if DEVICE_EMAC " usage
parent
2ce9039a1a
commit
c80641fe11
|
@ -22,7 +22,11 @@
|
|||
EthernetInterface::EthernetInterface()
|
||||
: _dhcp(true), _ip_address(), _netmask(), _gateway()
|
||||
{
|
||||
#if DEVICE_EMAC
|
||||
return lwip_bringup(NULL);
|
||||
#else /* DEVICE_EMAC */
|
||||
return lwip_bringup();
|
||||
#endif /* DEVICE_EMAC */
|
||||
}
|
||||
|
||||
int EthernetInterface::set_network(const char *ip_address, const char *netmask, const char *gateway)
|
||||
|
|
|
@ -14,6 +14,10 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "platform.h"
|
||||
|
||||
#if DEVICE_EMAC
|
||||
|
||||
#include "IPStackInterface.h"
|
||||
#include "lwip_stack.h"
|
||||
|
||||
|
@ -39,3 +43,5 @@ const char * IPStackInterface::get_ip_address()
|
|||
{
|
||||
return lwip_get_ip_address(_ip_address, sizeof(_ip_address));
|
||||
}
|
||||
|
||||
#endif /* DEVICE_EMAC */
|
||||
|
|
|
@ -17,6 +17,10 @@
|
|||
#ifndef IP_STACK_INTERFACE_H
|
||||
#define IP_STACK_INTERFACE_H
|
||||
|
||||
#include "platform.h"
|
||||
|
||||
#if DEVICE_EMAC
|
||||
|
||||
#include "emac_api.h"
|
||||
|
||||
/**
|
||||
|
@ -56,4 +60,6 @@ private:
|
|||
char _ip_address[16]; //IPv4
|
||||
};
|
||||
|
||||
#endif /* DEVICE_EMAC */
|
||||
|
||||
#endif /* IP_STACK_INTERFACE_H */
|
||||
|
|
|
@ -16,6 +16,10 @@
|
|||
#ifndef MBED_EMAC_STACK_MEM_H
|
||||
#define MBED_EMAC_STACK_MEM_H
|
||||
|
||||
#include "platform.h"
|
||||
|
||||
#if DEVICE_EMAC
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/**
|
||||
|
@ -92,4 +96,6 @@ emac_stack_mem_t *emac_stack_mem_chain_dequeue(emac_stack_t* stack, emac_stack_m
|
|||
*/
|
||||
uint32_t emac_stack_mem_chain_len(emac_stack_t* stack, emac_stack_mem_chain_t *chain);
|
||||
|
||||
#endif /* DEVICE_EMAC */
|
||||
|
||||
#endif /* EMAC_MBED_STACK_MEM_h */
|
||||
|
|
Loading…
Reference in New Issue