- The fnet.h file includes all the other header files needed to use the FNET TCP/IP stack user interface. This means that it is the only file the application developer needs to include in the source code using the FNET stack API.
- The fnet_init() function must be called in order to initialize the FNET TCP/IP stack. The return value from fnet_init() must be verified to indicate the success before calling any other TCP/IP functions.
- After fnet_init() returns the FNET_OK value, the FNET TCP/IP stack is ready for use.
- Initialize required networking interfaces using fnet_netif_init().
For example:
...
static fnet_uint8_t stack_heap[FAPP_CFG_HEAP_SIZE];
init_params.netheap_size = sizeof(stack_heap);
{
,,,
}
else
fnet_printf(
"ERROR: FNET stack initialization is failed!\n");
...