...
Anchor
Stop()
function. This function is called once each time an interface is stopped.Files
...
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 *p_if, Anchor | | 1151418 | 1151418 | NET_ERR *p_err);|
Table Row (tr) |
...
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’‘static
’. Anchor
Arguments
pif
Pointer to the interface to start a network device.
Anchor
perr
Pointer to variable that will receive the return error code from this function.
...
Returned Value
Anchor
Required Configuration
...
None. 1110265 Anchor
Notes / Warnings
...
The Stop()
function must perform the following operations:
...
1091079 Disable the receiver and transmitter.Anchor 1091086 1091086- Disable all local MAC interrupt sources.anchor
1091093 1091093 Clear all local MAC interrupt status flags.Anchor 1091100 1091100 Power down the wireless device.Anchor 1091121 1091121 Set p_err- 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, set p_errperr
to an appropriate network device error code.