17 #ifndef LPC546XX_EMAC_H_ 18 #define LPC546XX_EMAC_H_ 21 #include "rtos/Semaphore.h" 22 #include "rtos/Mutex.h" 53 virtual void get_ifname(
char *name, uint8_t size)
const;
97 virtual bool link_out(emac_mem_buf_t *buf);
152 bool low_level_init_successful();
159 emac_mem_buf_t *low_level_input();
160 static void thread_function(
void* pvParameters);
162 static void ethernet_callback(ENET_Type *base, enet_handle_t *handle, enet_event_t event, uint8_t channel,
void *param);
177 PHY_STATE prev_state;
178 uint8_t hwaddr[LPC546XX_HWADDR_SIZE];
virtual bool power_up()
Initializes the HW.
The Semaphore class is used to manage and protect access to a set of shared resources.
virtual bool get_hwaddr(uint8_t *addr) const
Return interface-supplied HW address.
virtual void set_memory_manager(EMACMemoryManager &mem_mngr)
Sets memory manager that is used to handle memory buffers.
virtual uint32_t get_align_preference() const
Gets memory buffer alignment preference.
virtual void get_ifname(char *name, uint8_t size) const
Return interface name.
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.
The Mutex class is used to synchronize the execution of threads.
virtual void set_hwaddr(const uint8_t *addr)
Set HW address for interface.
virtual void set_link_state_cb(emac_link_state_change_cb_t state_cb)
Sets a callback that needs to be called on link status changes for given interface.
virtual void add_multicast_group(const uint8_t *address)
Add device to a multicast group.
virtual uint32_t get_mtu_size() const
Return maximum transmission unit.
virtual uint8_t get_hwaddr_size() const
Returns size of the underlying interface HW address size.
virtual void set_all_multicast(bool all)
Request reception of all multicast packets.
virtual bool link_out(emac_mem_buf_t *buf)
Sends the packet over the link.
virtual void set_link_input_cb(emac_link_input_cb_t input_cb)
Sets a callback that needs to be called for packets received for that interface.
This interface should be used to abstract low level access to networking hardware All operations rece...
virtual void remove_multicast_group(const uint8_t *address)
Remove device from a multicast group.
virtual void power_down()
Deinitializes the HW.