Versions Compared

Key

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

Device Driver Functions for Wireless Module

NetDev_Init()

The 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.

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

...

Every device driver’s net_dev.c

Prototype

 

...

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’.

...