Definition at line 27 of file wiced_emac.h.
◆ emac_link_input_cb_t
Callback to be register with EMAC interface and to be called for received packets.
buf
: Received data
Definition at line 49 of file EMAC.h.
◆ emac_link_state_change_cb_t
Callback to be register with EMAC interface and to be called for link status changes.
up
: Link status
Definition at line 57 of file EMAC.h.
◆ get_mtu_size()
virtual uint32_t get_mtu_size |
( |
| ) |
const |
|
virtual |
Return maximum transmission unit.
- Returns
- MTU in bytes
Implements EMAC.
◆ get_align_preference()
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.
◆ get_ifname()
virtual void get_ifname |
( |
char * |
name, |
|
|
uint8_t |
size |
|
) |
| const |
|
virtual |
Return interface name.
- Parameters
-
name | Pointer to where the name should be written |
size | Maximum number of character to copy |
Implements EMAC.
◆ get_hwaddr_size()
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.
◆ get_hwaddr()
bool get_hwaddr |
( |
uint8_t * |
addr | ) |
const |
|
overridevirtual |
Return interface-supplied HW address.
Copies HW address to provided memory, addr
has 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
-
addr | HW address for underlying interface |
- Returns
- true if HW address is available
Implements EMAC.
◆ set_hwaddr()
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
-
Implements EMAC.
◆ link_out()
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
-
- Returns
- True if the packet was send successfully, False otherwise
Implements EMAC.
◆ power_up()
virtual bool power_up |
( |
| ) |
|
|
virtual |
Initializes the HW.
- Returns
- True on success, False in case of an error.
Implements EMAC.
◆ power_down()
virtual void power_down |
( |
| ) |
|
|
virtual |
Deinitializes the HW.
Implements EMAC.
◆ set_link_input_cb()
Sets a callback that needs to be called for packets received for that interface.
- Parameters
-
input_cb | Function to be register as a callback |
Implements EMAC.
◆ set_link_state_cb()
Sets a callback that needs to be called on link status changes for given interface.
- Parameters
-
state_cb | Function to be register as a callback |
Implements EMAC.
◆ add_multicast_group()
virtual void add_multicast_group |
( |
const uint8_t * |
address | ) |
|
|
virtual |
Add device to a multicast group.
- Parameters
-
address | A multicast group hardware address |
Implements EMAC.
◆ remove_multicast_group()
virtual void remove_multicast_group |
( |
const uint8_t * |
address | ) |
|
|
virtual |
Remove device from a multicast group.
- Parameters
-
address | A multicast group hardware address |
Implements EMAC.
◆ set_all_multicast()
virtual void set_all_multicast |
( |
bool |
all | ) |
|
|
virtual |
Request reception of all multicast packets.
- Parameters
-
all | True to receive all multicasts False to receive only multicasts addressed to specified groups |
Implements EMAC.
◆ set_memory_manager()
Sets memory manager that is used to handle memory buffers.
- Parameters
-
mem_mngr | Pointer to memory manager |
Implements EMAC.
◆ get_default_instance()
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.
◆ emac_link_input_cb