[ ]
Real time embedded FreeRTOS mailing list 
Homepage FreeRTOS Labs FreeRTOS+TCP FreeRTOS+FAT Contact / Enquiries


FreeRTOS+TCP V2 is now included in the main FreeRTOS kernel download under the MIT license.

xSendEventStructToIPTask()
[Ethernet Driver Porting API]

FreeRTOS_IP_Private.h
BaseType_t xSendEventStructToIPTask( const IPStackEvent_t *pxEvent, TickType_t xTimeout );
		

xSendEventStructToIPTask() is used throughout the embedded TCP/IP stack's implementation to send various events to the RTOS task that is running the embedded TCP/IP stack. The function is made available to the network port layer so the network port layer can send receive events to the same RTOS task.


Parameters:

pxEvent   A pointer to a structure of type IPStackEvent_t.


typedef struct IP_TASK_COMMANDS
{
    /* Specifies the type of event being posted to the RTOS task.  Must be set to
    eNetworkRxEvent to signify a receive event. */
    eIPEvent_t eEventType;

    /* Points to additional data about the event.  Set pvData to the the address
    of the network buffer descriptor that references the received frame. */
    void *pvData;
} IPStackEvent_t;
											
The IPStackEvent_t type

xTimeout   The time, specified in RTOS ticks, to wait for the message to be sent to the RTOS task that is running the embedded TCP/IP stack if the message cannot be sent immediately. The message might not be able to be sent immediately if the network event queue is full.

Returns:

If the event was successfully sent to the RTOS task that is running the embedded TCP/IP stack then pdPASS is returned. If xTimeout is greater than zero then the calling task may have been held in the Blocked state (so not consuming any CPU time) to wait for the message to be sent - but the message was sent successfully before the function returned.

If the event could not be sent to the RTOS task that is running the embedded TCP/IP stack because the network event queue was full then pdFAIL is returned. If xTimeout is greater than zero then the calling task may have been held in the Blocked state to wait for space to become available on the network event queue, but the block time expired before that happened.

Example usage:

Examples are provided on the Porting FreeRTOS to a Different Microcontroller page. Search for xSendEventStructToIPTask() on that page to find example source code.


[ Back to the top ]    [ About FreeRTOS ]    [ FreeRTOS Labs Sitemap ]    [ Main FreeRTOS Sitemap ]    [ ]




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