Microchip® Advanced Software Framework

crhook.c File Reference
#include "FreeRTOS.h"
#include "croutine.h"
#include "queue.h"
#include "crhook.h"

Macros

#define hookHOOK_QUEUE_LENGTH   ( 1 )
 
#define hookNO_BLOCK_TIME   ( 0 )
 
#define hookNUM_HOOK_CO_ROUTINES   ( 4 )
 
#define hookTICK_CALLS_BEFORE_POST   ( 500 )
 
#define mainHOOK_CR_PRIORITY   ( 1 )
 

Functions

static void prvHookCoRoutine (xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex)
 
void vApplicationTickHook (void)
 This function is called by FreeRTOS each tick. More...
 
void vStartHookCoRoutines (void)
 
portBASE_TYPE xAreHookCoRoutinesStillRunning (void)
 

Variables

static unsigned portBASE_TYPE uxCallCounter = 0
 
static unsigned portBASE_TYPE uxNumberToPost = 0
 
static portBASE_TYPE xCoRoutineErrorDetected = pdFALSE
 
static xQueueHandle xHookRxQueues [hookNUM_HOOK_CO_ROUTINES]
 
static xQueueHandle xHookTxQueues [hookNUM_HOOK_CO_ROUTINES]
 

#define hookHOOK_QUEUE_LENGTH   ( 1 )

Referenced by vStartHookCoRoutines().

#define hookNO_BLOCK_TIME   ( 0 )
#define hookNUM_HOOK_CO_ROUTINES   ( 4 )
#define hookTICK_CALLS_BEFORE_POST   ( 500 )
#define mainHOOK_CR_PRIORITY   ( 1 )

Referenced by vStartHookCoRoutines().

static void prvHookCoRoutine ( xCoRoutineHandle  xHandle,
unsigned portBASE_TYPE  uxIndex 
)
static
void vApplicationTickHook ( void  )

This function is called by FreeRTOS each tick.

This function will be called by each tick interrupt if configUSE_TICK_HOOK is set to 1 in FreeRTOSConfig.h. User code can be added here, but the tick hook is called from an interrupt context, so code must not attempt to block, and only the interrupt safe FreeRTOS API functions can be used (those that end in FromISR()).

portBASE_TYPE xAreHookCoRoutinesStillRunning ( void  )

unsigned portBASE_TYPE uxCallCounter = 0
static
unsigned portBASE_TYPE uxNumberToPost = 0
static
portBASE_TYPE xCoRoutineErrorDetected = pdFALSE
static
xQueueHandle xHookRxQueues[hookNUM_HOOK_CO_ROUTINES]
static
xQueueHandle xHookTxQueues[hookNUM_HOOK_CO_ROUTINES]
static