...
Anchor
Stop()
function. This function is called once each time an interface is stopped.Files
Anchor
net_dev.c
Prototype
...
HTML Table | summary | |||
---|---|---|---|---|
class | Code_Listing | |||
Table Row (tr) | ||||
Table Cell (td) | ||||
| ||||
Anchor | 1109785 | 1109785 | static void NetDev_Stop||
Code Block | ||||
static void NetDev_Stop (NET_IF *pif, Anchor | | 1135876 | 1135876 | |
Table Row (tr) |
...
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’‘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
Anchor
Required Configuration
...
None.anchor
Notes / Warnings
...
Stop()
function must perform the following operations:...
- Disable the receiver and transmitter.anchor
1091086 1091086 Disable all local MAC interrupt sources. 1091093Anchor 1091093 - Clear all local MAC interrupt status flags.
Anchor 1091100 1091100 - For DMA devices, re-initialize all receive descriptors.anchor
1091107 1091107 - For DMA devices, free all transmit descriptors by calling
NetOS_IF_DeallocTaskPost()
with the address of the transmit descriptor data areas. 1091114Anchor 1091114 - For DMA devices, re-initialize all transmit descriptors.
Anchor 1091121 1091121 - Set
perr
toNET_DEV_ERR_NONE
if no error occurs. Otherwise, setperr
to an appropriate network device error code.