Download FreeRTOS
 

Quality RTOS & Embedded Software

LIBRARIES
WHAT'S NEW
Simplifying Authenticated Cloud Connectivity for Any Device.
Designing an energy efficient and cloud-connected IoT solution with CoAP.
Introducing FreeRTOS Kernel version 11.0.0:
FreeRTOS Roadmap and Code Contribution process.
OPC-UA over TSN with FreeRTOS.
NOTE: This API has been deprecated from FreeRTOS V4.0.0 onwards. Please refer to FreeRTOS_SetEndPointConfiguration for the new APIs supporting IPv6, Multiple Endpoints and Multiple interfaces. To use the deprecated APIs please set ipconfigIPv4_BACKWARD_COMPATIBLE to 1 in the FreeRTOSIPConfig.h header file.

FreeRTOS_SetGatewayAddress()

[FreeRTOS-Plus-TCP API Reference]

FreeRTOS_IP.h

void FreeRTOS_SetGatewayAddress( uint32_t ulGatewayAddress );

This function can be used to update the IPv4 address of the gateway of first IPv4 endpoint used by the FreeRTOS-Plus-TCP device after the TCP stack has already been initialized with a call to FreeRTOS_IPInit_Multi(). It will have no effect if an IPv4 endpoint cannot be found.

Parameters:

ulGatewayAddress  The 32-bit IPv4 gateway address, in network endian order, that the device should use. FreeRTOS_htonl can be used to get the network endian representation of the 32-bit gateway address.

Caution:

This function is not thread safe and should be used with the taskENTER_CRITICAL/taskEXIT_CRITICAL pair. A call to this function should be made only when there is no active connection (either UDP or TCP), or else that connection might be severed.

Example usage:

See the FreeRTOS_SetIPAddress page for an example.

Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.