/
NetDev_Stop() (Ethernet)
NetDev_Stop() (Ethernet)
The next function within the device API structure is the device Stop()
function. This function is called once each time an interface is stopped.
Files
Every device driver’s net_dev.c
Prototype
static void NetDev_Stop (NET_IF *pif, NET_ERR *perr);
Note that since every device driver’s Stop()
function is accessed only by function pointer via the device driver’s API structure, it doesn’t need to be globally available and should therefore be declared as ‘static
’.
Arguments
pif
Pointer to the interface to start a network device.
perr
Pointer to variable that will receive the return error code from this function.
Returned Value
None.
Required Configuration
None.
Notes / Warnings
The Stop()
function must perform the following operations:
- Disable the receiver and transmitter.
- Disable all local MAC interrupt sources.
- Clear all local MAC interrupt status flags.
- For DMA devices, re-initialize all receive descriptors.
- For DMA devices, free all transmit descriptors by calling
NetOS_IF_DeallocTaskPost()
with the address of the transmit descriptor data areas. - For DMA devices, re-initialize all transmit descriptors.
- Set
perr
toNET_DEV_ERR_NONE
if no error occurs. Otherwise, setperr
to an appropriate network device error code.
, multiple selections available,
Related content
NetDev_Stop() (Wireless)
NetDev_Stop() (Wireless)
More like this
NetDev_WiFi_Stop
NetDev_WiFi_Stop
More like this
NetDev_Start() (Ethernet)
NetDev_Start() (Ethernet)
More like this
NetWiFiMgr_Stop()
NetWiFiMgr_Stop()
More like this
NetPhy_EnDis()
NetPhy_EnDis()
More like this
Starting and Stopping Network Interfaces
Starting and Stopping Network Interfaces
More like this