Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Ethernet MAC API. More...
Go to the source code of this file.
Typedefs | |
typedef void | data_request (const eth_mac_api_t *api, const eth_data_req_t *data) |
data_request data request call | |
typedef void | data_confirm (const eth_mac_api_t *api, const eth_data_conf_t *data) |
data_confirm confirm is called as a response to data_request | |
typedef void | data_indication (const eth_mac_api_t *api, const eth_data_ind_t *data) |
data_indication Data indication is called when MAC layer has received data | |
typedef int8_t | eth_mac_mac48_address_set (const eth_mac_api_t *api, const uint8_t *mac48) |
Set 48 bit address from MAC. | |
typedef int8_t | eth_mac_mac48_address_get (const eth_mac_api_t *api, uint8_t *mac48_buf) |
Read 48 bit address from MAC. | |
typedef int8_t | eth_mac_api_initialize (eth_mac_api_t *api, data_confirm *conf_cb, data_indication *ind_cb, uint8_t parent_id) |
Upper layer will call this function, when MAC is taken into use. | |
Functions | |
eth_mac_api_t * | ethernet_mac_create (int8_t driver_id) |
Creates ethernet MAC API instance which will use driver given. | |
int8_t | ethernet_mac_destroy (eth_mac_api_t *mac_api) |
Destroy ethernet MAC API instance Call this only for freeing all allocated memory and when mac is total unused. |
Detailed Description
Ethernet MAC API.
Definition in file ethernet_mac_api.h.
Typedef Documentation
typedef void data_confirm(const eth_mac_api_t *api, const eth_data_conf_t *data) |
data_confirm confirm is called as a response to data_request
- Parameters:
-
api The API which handled the request data Data containing confirm parameters
Definition at line 89 of file ethernet_mac_api.h.
typedef void data_indication(const eth_mac_api_t *api, const eth_data_ind_t *data) |
data_indication Data indication is called when MAC layer has received data
- Parameters:
-
api The API which handled the response data Data containing indication parameters
Definition at line 96 of file ethernet_mac_api.h.
typedef void data_request(const eth_mac_api_t *api, const eth_data_req_t *data) |
data_request data request call
- Parameters:
-
api API to handle the request data Data containing request parameters
Definition at line 82 of file ethernet_mac_api.h.
typedef int8_t eth_mac_api_initialize(eth_mac_api_t *api, data_confirm *conf_cb, data_indication *ind_cb, uint8_t parent_id) |
Upper layer will call this function, when MAC is taken into use.
- Parameters:
-
api API to initialize conf_cb Callback for confirm type of messages ind_cb Callback for indication type of messages parent_id Upper layer identifier
- Returns:
- 0 if success; -1 if api is NULL or not found
Definition at line 122 of file ethernet_mac_api.h.
typedef int8_t eth_mac_mac48_address_get(const eth_mac_api_t *api, uint8_t *mac48_buf) |
Read 48 bit address from MAC.
- Parameters:
-
api API to handle the request mac48_buf Pointer where mac address can be written
- Returns:
- 0 if successful, -1 otherwise
Definition at line 112 of file ethernet_mac_api.h.
typedef int8_t eth_mac_mac48_address_set(const eth_mac_api_t *api, const uint8_t *mac48) |
Set 48 bit address from MAC.
- Parameters:
-
api API to handle the request mac48 Pointer having mac address to be set
- Returns:
- 0 if successful, -1 otherwise
Definition at line 104 of file ethernet_mac_api.h.
Function Documentation
eth_mac_api_t* ethernet_mac_create | ( | int8_t | driver_id ) |
Creates ethernet MAC API instance which will use driver given.
- Parameters:
-
driver_id Ethernet driver id. Must be valid
- Returns:
- New MAC instance if successful, NULL otherwise
int8_t ethernet_mac_destroy | ( | eth_mac_api_t * | mac_api ) |
Destroy ethernet MAC API instance Call this only for freeing all allocated memory and when mac is total unused.
- Parameters:
-
mac_api Removed mac class pointer
- Returns:
- -1 Unknow MAC
- 0 Mac class is removed
Generated on Tue Jul 12 2022 18:19:36 by
