...
Device Driver
...
BSP Functions
...
NetDev_
...
CfgClk()
...
This function is called by a device driver’s NetDev_
StartInit()
to start and power up the wireless hardware. Anchor
Files
net_bsp.c
Anchor
Prototype
...
rowspan | 2 |
---|
...
Anchor
Note: since NetDev_
WiFi_StartCfgClk()
is accessed only by function pointer via a BSP interface structure, it doesn’t need to be globally available and should therefore be declared as ‘static’. Anchor
static
’.Arguments
Anchor
pif
Pointer to specific interface to
...
configure device’s
...
clocks.
Anchor
perr
Pointer to variable that will receive the return error code from this function:
...
NET_DEV_ERR_NONE
...
NET_DEV_ERR_FAULT
...
...
Returned Value
...
Required Configuration
Anchor
Notes / Warnings
Anchor
NetDev_CfgClk()
should configure and enable all required clocks for the network device. For example, on some devices it may be necessary to enable clock gating for an embedded Ethernet MAC as well as various GPIO modules in order to configure Ethernet Phy pins for (R)MII mode and interrupts.Since each network device requires a unique NetDev_
WiFi_StartCfgClk()
, it is recommended that each device’s NetDev_
WiFi_StartCfgClk()
function be named using the following convention:anchor
NetDev_
WiFi_[Device]
_StartCfgClk[Number]()
Anchor
[Device]
Network device name or type, e.g.
...
MACB (optional if the development board does not support multiple devices)
Anchor
[Number]
Network device number for each specific instance of device (optional if the development board does not support multiple instances of the specific device)
Anchor
NetDev_
WiFi_StartCfgClk()
function for the #2 RS9110 wireless devie MACB Ethernet controller on an Atmel AT91SAM9263-EK should be named NetDev_
WiFiMACB_
RS9110_Start2CfgClk2()
, or NetDev_
WiFIMACB_
RS9110_StartCfgClk_2()
with additional underscore optional.