Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Device Driver

...

Functions for Wireless Module

...

NetDev_Init()

Anchor11160311116031The first function within the wireless API is the device driver initialization/Init() function. This function is called by NetIF_Add() exactly once for each specific network device added by the application. If multiple instances of the same network device are present on the development board, then this function is called for each instance of the device. However, applications should not try to add the same specific device more than once. If a network device fails to initialize, we recommend debugging to find and correct the cause of failure. Anchor

10908341090834Note: This function relies heavily on the implementation of several network device board support package (BSP) functions. See Chapter 6, “Network Board Support Package” on page 121 and Appendix B, “Device Driver BSP Functions” on page 387 for more information on network device BSP functions. Anchor11064411106441

Files

...

1106442Every device driver’s net_dev.c Anchor11064431106443

Prototype

anchor 11232431123243

 

...

rowspan2

...

Note that since every device driver’s Init() 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’. Anchor11095391109539static’.

Arguments

Anchor11095401109540p_ifanchor11318091131809

Pointer to the interface to initialize a network device.

...

p_err Anchor11318111131811

Pointer to variable that will receive the return error code from this function.

...

...

Returned Value

Anchor11070061107006None. Anchor11098651109865

Required Configuration

Anchor11098661109866None. Anchor11098671109867

Notes / Warnings

Anchor10908621090862The Init() function generally performs the following operations, however, depending on the device being initialized, functionality may need to be added or removed:

...