Versions Compared

Key

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

...

A call to NetIF_WiFi_Leave() is shown below.

Code Block
languagecpp
titleListing - Call to NetIF_WiFi_Leave()
linenumberstrue
NET_ERR         err;

ap_ctn = NetIF_WiFi_Leave(if_nbr, (1)
                         &err);   (2)


Panel
bgColor#f0f0f0
  1. NetIF_WiFi_Leave() requires two arguments. The first function argument is the interface number. The interface number is acquired upon successful addition of the interface and upon the successful start of the interface.
  2. The last argument is a pointer to a NET_ERR to contain the return error code. The return error variable will contain the value NET_IF_WIFI_ERR_NONE if the leave process has been completed successfully.

There are very few things that could cause a network interface to leave improperly. You should always inspect the return error code and take the appropriate action if an error occurs. Once the error is resolved, the application may again attempt to call NetIF_WiFi_Leave().