23 #include "EMACMemoryManager.h" 82 virtual void get_ifname(
char *name, uint8_t size)
const = 0;
103 virtual bool get_hwaddr(uint8_t *addr)
const = 0;
116 virtual void set_hwaddr(
const uint8_t *addr) = 0;
126 virtual bool link_out(emac_mem_buf_t *buf) = 0;
virtual uint8_t get_hwaddr_size() const =0
Returns size of the underlying interface HW address size.
virtual bool get_hwaddr(uint8_t *addr) const =0
Return interface-supplied HW address.
virtual bool link_out(emac_mem_buf_t *buf)=0
Sends the packet over the link.
virtual void set_memory_manager(EMACMemoryManager &mem_mngr)=0
Sets memory manager that is used to handle memory buffers.
virtual uint32_t get_mtu_size() const =0
Return maximum transmission unit.
virtual uint32_t get_align_preference() const =0
Gets memory buffer alignment preference.
virtual void set_all_multicast(bool all)=0
Request reception of all multicast packets.
virtual bool power_up()=0
Initializes the HW.
mbed::Callback< void(bool up)> emac_link_state_change_cb_t
Callback to be register with EMAC interface and to be called for link status changes.
mbed::Callback< void(emac_mem_buf_t *buf)> emac_link_input_cb_t
Callback to be register with EMAC interface and to be called for received packets.
static EMAC & get_default_instance()
Return the default on-board EMAC.
virtual void get_ifname(char *name, uint8_t size) const =0
Return interface name.
virtual void set_hwaddr(const uint8_t *addr)=0
Set HW address for interface.
virtual void power_down()=0
Deinitializes the HW.
virtual void set_link_state_cb(emac_link_state_change_cb_t state_cb)=0
Sets a callback that needs to be called on link status changes for given interface.
This interface should be used to abstract low level access to networking hardware All operations rece...
virtual void set_link_input_cb(emac_link_input_cb_t input_cb)=0
Sets a callback that needs to be called for packets received for that interface.
virtual void add_multicast_group(const uint8_t *address)=0
Add device to a multicast group.
Callback class based on template specialization.
virtual void remove_multicast_group(const uint8_t *address)=0
Remove device from a multicast group.