Download FreeRTOS
 

Quality RTOS & Embedded Software

LIBRARIES
WHAT'S NEW
FreeRTOS-Plus-TCP now has unified IPv4 and IPv6 functionalities and multi-interface support.
Achieving Unbrickable MCU FOTA for your FreeRTOS-powered Firmware:
FreeRTOS 202012 LTS end of support announced.
FreeRTOS website now available in Simplified Chinese
New FreeRTOS Long Term Support version now available.

FreeRTOS_GetUDPPayloadBuffer_Multi()

[FreeRTOS-Plus-TCP API Reference]

FreeRTOS_IP.h
void * FreeRTOS_GetUDPPayloadBuffer_Multi( size_t uxRequestedSizeBytes,
                                           TickType_t uxBlockTimeTicks,
                                           uint8_t ucIPType )

Obtains a buffer from the TCP/IP stack for use with the zero copy interface. The zero copy interface for transmitting data is described on the FreeRTOS_sendto() documentation page.

Parameters:

xRequestedSizeBytes
The size of the buffer being requested. The size is specified in bytes.

xBlockTimeTicks
The maximum time the calling RTOS task is prepared to wait for a buffer if one is not immediately available. If a buffer is not available then the calling RTOS task will be held in the Blocked state (so other tasks can execute) until either a buffer becomes available or the block time expires.
The block time is specified in ticks. Milliseconds can be converted to ticks by dividing the time in milliseconds by portTICK_PERIOD_MS.
To prevent deadlocks the maximum block time is capped to ipconfigMAX_SEND_BLOCK_TIME_TICKS. ipconfigMAX_SEND_BLOCK_TIME_TICKS is defined in FreeRTOSIPConfig.h

ucIPType
The type of buffer being requested - ipTYPE_IPv4 (0x40) or ipTYPE_IPv6 (0x60)

Returns:
If a buffer was obtained then a pointer to the obtained buffer is returned. If a buffer could not be obtained then NULL is returned.

Example usage:
The FreeRTOS_sendto() documentation page contains an example zero copy send operation that includes a call to FreeRTOS_GetUDPPayloadBuffer_Multi().

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