Mistake on this page?
Report an issue in GitHub or email us
Data Structures | Public Types | Public Member Functions | Static Public Member Functions
LPC546XX_EMAC Class Reference
Inheritance diagram for LPC546XX_EMAC:
EMAC

Public Types

typedef 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. More...
 
typedef 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. More...
 

Public Member Functions

virtual uint32_t get_mtu_size () const
 Return maximum transmission unit. More...
 
virtual uint32_t get_align_preference () const
 Gets memory buffer alignment preference. More...
 
virtual void get_ifname (char *name, uint8_t size) const
 Return interface name. More...
 
virtual uint8_t get_hwaddr_size () const
 Returns size of the underlying interface HW address size. More...
 
virtual bool get_hwaddr (uint8_t *addr) const
 Return interface-supplied HW address. More...
 
virtual void set_hwaddr (const uint8_t *addr)
 Set HW address for interface. More...
 
virtual bool link_out (emac_mem_buf_t *buf)
 Sends the packet over the link. More...
 
virtual bool power_up ()
 Initializes the HW. More...
 
virtual void power_down ()
 Deinitializes the HW. More...
 
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. More...
 
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. More...
 
virtual void add_multicast_group (const uint8_t *address)
 Add device to a multicast group. More...
 
virtual void remove_multicast_group (const uint8_t *address)
 Remove device from a multicast group. More...
 
virtual void set_all_multicast (bool all)
 Request reception of all multicast packets. More...
 
virtual void set_memory_manager (EMACMemoryManager &mem_mngr)
 Sets memory manager that is used to handle memory buffers. More...
 

Static Public Member Functions

static EMACget_default_instance ()
 Return the default on-board EMAC. More...
 

Detailed Description

Definition at line 24 of file lpc546xx_emac.h.

Member Typedef Documentation

typedef mbed::Callback<void (emac_mem_buf_t *buf)> emac_link_input_cb_t
inherited

Callback to be register with EMAC interface and to be called for received packets.

Parameters
bufReceived data

Definition at line 48 of file EMAC.h.

typedef mbed::Callback<void (bool up)> emac_link_state_change_cb_t
inherited

Callback to be register with EMAC interface and to be called for link status changes.

Parameters
upLink status

Definition at line 56 of file EMAC.h.

Member Function Documentation

virtual void add_multicast_group ( const uint8_t *  address)
virtual

Add device to a multicast group.

Parameters
addressA multicast group hardware address

Implements EMAC.

virtual uint32_t get_align_preference ( ) const
virtual

Gets memory buffer alignment preference.

Gets preferred memory buffer alignment of the Emac device. IP stack may or may not align link out memory buffer chains using the alignment.

Returns
Memory alignment requirement in bytes

Implements EMAC.

static EMAC& get_default_instance ( )
staticinherited

Return the default on-board EMAC.

Returns the default on-board EMAC - this will be target-specific, and may not be available on all targets.

virtual bool get_hwaddr ( uint8_t *  addr) const
virtual

Return interface-supplied HW address.

Copies HW address to provided memory,

Parameters
addrhas to be of correct size see get_hwaddr_size

HW address need not be provided if this interface does not have its own HW address configuration; stack will choose address from central system configuration if the function returns false and does not write to addr.

Parameters
addrHW address for underlying interface
Returns
true if HW address is available

Implements EMAC.

virtual uint8_t get_hwaddr_size ( ) const
virtual

Returns size of the underlying interface HW address size.

Returns
HW address size in bytes

Implements EMAC.

virtual void get_ifname ( char *  name,
uint8_t  size 
) const
virtual

Return interface name.

Parameters
namePointer to where the name should be written
sizeMaximum number of character to copy

Implements EMAC.

virtual uint32_t get_mtu_size ( ) const
virtual

Return maximum transmission unit.

Returns
MTU in bytes

Implements EMAC.

virtual bool link_out ( emac_mem_buf_t *  buf)
virtual

Sends the packet over the link.

That can not be called from an interrupt context.

Parameters
bufPacket to be send
Returns
True if the packet was send successfully, False otherwise

Implements EMAC.

virtual void power_down ( )
virtual

Deinitializes the HW.

Implements EMAC.

virtual bool power_up ( )
virtual

Initializes the HW.

Returns
True on success, False in case of an error.

Implements EMAC.

virtual void remove_multicast_group ( const uint8_t *  address)
virtual

Remove device from a multicast group.

Parameters
addressA multicast group hardware address

Implements EMAC.

virtual void set_all_multicast ( bool  all)
virtual

Request reception of all multicast packets.

Parameters
allTrue to receive all multicasts False to receive only multicasts addressed to specified groups

Implements EMAC.

virtual void set_hwaddr ( const uint8_t *  addr)
virtual

Set HW address for interface.

Provided address has to be of correct size, see get_hwaddr_size

Called to set the MAC address to actually use - if get_hwaddr is provided the stack would normally use that, but it could be overridden, eg for test purposes.

Parameters
addrAddress to be set

Implements EMAC.

virtual void set_link_input_cb ( emac_link_input_cb_t  input_cb)
virtual

Sets a callback that needs to be called for packets received for that interface.

Parameters
input_cbFunction to be register as a callback

Implements EMAC.

virtual void set_link_state_cb ( emac_link_state_change_cb_t  state_cb)
virtual

Sets a callback that needs to be called on link status changes for given interface.

Parameters
state_cbFunction to be register as a callback

Implements EMAC.

virtual void set_memory_manager ( EMACMemoryManager mem_mngr)
virtual

Sets memory manager that is used to handle memory buffers.

Parameters
mem_mngrPointer to memory manager

Implements EMAC.

Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.