Name
cyg_net_eth_phy_ctx_acquire — Allocate PHY event context
Synopsis
#include <cyg/io/eth/eth_drv.h>
void *cyg_net_eth_phy_ctx_acquire
(
void *priv
)
;
Description
To allow per-interface PHY notification, the client network driver
will call this function to register the
passed priv
reference, and to be given an
abstract handle which is subsequently passed to
the cyg_net_eth_phy_dsr function when the
driver needs to notify the lwIP stack of a PHY event. For lwIP this
passed value MUST be
a structnetif*netif (network interface)
reference.
Return value
A NULL
value indicates a system error, otherwise
it is the abstract handle used in the driver->lwIP PHY event
notification. The caller of this function does not need to interpret
the returned value. Internal to the lwIP stack the value returned
depends on whether the lwIP world is configured to use a helper
thread. For NO_SYS
(true raw) configurations
without a helper thread this function will just return the
passed netif
parameter since that is all that
is needed for the driver->lwIP support. When a helper thread is
being used (e.g. sequential API) then it will be a pointer to the
message used to communicate the PHY event information in a thread-safe
manner.
2024-03-18 | LWIP Documentation Notices |