1.2.8.5 WDRV_WINC_IPAddressSet Function
C
WDRV_WINC_STATUS WDRV_WINC_IPAddressSet ( DRV_HANDLE handle, uint32_t ipAddress, uint32_t netMask )
Summary
Configures an IPv4 address.
Description
Disables DHCP on the WINC and assigns a static IPv4 address. The address isn't applied to the WINC until a connection is formed.
Precondition
WDRV_WINC_Initialize should have been called. WDRV_WINC_Open should have been called to obtain a valid handle. The WINC must not be connected.
Parameters
Param | Description |
---|---|
handle | Client handle obtained by a call to WDRV_WINC_Open. |
ipAddress | IPv4 address. |
netMask | IPv4 netmask. |
Returns
WDRV_WINC_STATUS_OK - The address has been accepted.
WDRV_WINC_STATUS_NOT_OPEN - The driver instance is not open.
WDRV_WINC_STATUS_INVALID_ARG - The parameters were incorrect.
WDRV_WINC_STATUS_REQUEST_ERROR - The request to the WINC was rejected.
Remarks
Only applicable when connected in infrastructure station mode. The top 8 bits of the IPv4 32 bit representation corresponds to the last byte of the IPv4 address, i.e. 192.168.0.1 = 0x0100A8C0