/* The callback function that will execute in the context of the daemon task.
Note callback functions must all use this same prototype. */
void vProcessInterface( void *pvParameter1, uint32_t ulParameter2 )
{
BaseType_t xInterfaceToService;
/* The interface that requires servicing is passed in the second
parameter. The first parameter is not used in this case. */
xInterfaceToService = ( BaseType_t ) ulParameter2;
/* ...Perform the processing here... */
}
/* An ISR that receives data packets from multiple interfaces */
void vAnISR( void )
{
BaseType_t xInterfaceToService, xHigherPriorityTaskWoken;
/* Query the hardware to determine which interface needs processing. */
xInterfaceToService = prvCheckInterfaces();
/* The actual processing is to be deferred to a task. Request the
vProcessInterface() callback function is executed, passing in the
number of the interface that needs processing. The interface to
service is passed in the second parameter. The first parameter is
not used in this case. */
xHigherPriorityTaskWoken = pdFALSE;
xTimerPendFunctionCallFromISR( vProcessInterface,
NULL,
( uint32_t ) xInterfaceToService,
&xHigherPriorityTaskWoken );
/* If xHigherPriorityTaskWoken is now set to pdTRUE then a context
switch should be requested. The macro used is port specific and will
be either portYIELD_FROM_ISR() or portEND_SWITCHING_ISR() - refer to
the documentation page for the port being used. */
portYIELD_FROM_ISR( xHigherPriorityTaskWoken );
}
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|
Latest News
NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS. Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019 Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed. View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS. Careers
FreeRTOS and other embedded software careers at AWS. FreeRTOS Partners
|
|||||||||||||||||||||||||||