CY generic lwIP WHD glue results/error codes

group generic_lwip_whd_port_defines

Wi-Fi middleware core APIs return results of type cy_rslt_t and comprise of three parts:

  • module base

  • type

  • error code

           Module base                   Type    Library specific error code
   +-----------------------------------+------+------------------------------+
   |CY_RSLT_MODULE_LWIP_WHD_PORT_BASE  | 0x2  |           Error Code         |
   +-----------------------------------+------+------------------------------+
             14-bits                    2-bits            16-bits

Refer to the macro section of this document for library specific error codes.
Result Format

The data structure cy_rslt_t is part of cy_result.h located in <core_lib/include>

Module base: This base is derived from CY_RSLT_MODULE_MIDDLEWARE_BASE (defined in cy_result.h) and is an offset of the CY_RSLT_MODULE_MIDDLEWARE_BASE The details of the offset and the middleware base are defined in cy_result_mw.h, that is part of Github connectivity-utilities For instance, lwIP WHD PORT (CY_LWP_WHD_PORT) uses CY_RSLT_MODULE_LWIP_WHD_PORT_BASE as the module base

Type: This type is defined in cy_result.h and can be one of CY_RSLT_TYPE_FATAL, CY_RSLT_TYPE_ERROR, CY_RSLT_TYPE_WARNING or CY_RSLT_TYPE_INFO. AWS library error codes are of type CY_RSLT_TYPE_ERROR

Library specific error code: These error codes are library specific and defined in macro section

Helper macros used for creating the library specific result are provided as part of cy_result.h

Defines

CY_RSLT_LWIP_WHD_PORT_ERR_BASE

Generic CY LWIP WHD port base error code.

CY_RSLT_LWIP_INTERFACE_EXISTS

CY LWIP error.

Denotes interface already exists

CY_RSLT_LWIP_ERROR_ADDING_INTERFACE

Denotes adding interface failed.

CY_RSLT_LWIP_ERROR_STARTING_DHCP

Denotes failure to start DHCP.

CY_RSLT_LWIP_INTERFACE_DOES_NOT_EXIST

Denotes interface does not exist.

CY_RSLT_LWIP_BAD_ARG

Denotes BAD arg.

CY_RSLT_LWIP_SOCKET_ERROR

Denotes LwIP socket error.

CY_RSLT_LWIP_SOCKET_CREATE_FAIL

Denotes LwIP socket create fail.

CY_RSLT_LWIP_INVALID_SOCKET

Denotes invalid socket.

CY_RSLT_LWIP_CORRUPT_BUFFER

Denotes corrupt buffer.

CY_RSLT_LWIP_DHCP_TIMEOUT

Denotes DHCP timeout.

CY_RSLT_LWIP_DHCP_WAIT_TIMEOUT

Denotes DHCP wait timeout.

CY_RSLT_LWIP_DHCP_MUTEX_ERROR

Denotes DHCP Mutex error.

CY_RSLT_LWIP_ERROR_STARTING_INTERNAL_DHCP

Denotes failure to start internal DHCP server.

CY_RSLT_LWIP_INTERFACE_NETWORK_NOT_UP

Denotes network is not up for the given interface.

CY_RSLT_LWIP_ERROR_REMOVING_INTERFACE

Denotes error while removing interface.