Microchip® Advanced Software Framework

countsem.c File Reference
#include "FreeRTOS.h"
#include "task.h"
#include "semphr.h"
#include "countsem.h"

Data Structures

struct  COUNT_SEM_STRUCT
 

Macros

#define countDONT_BLOCK   ( 0 )
 
#define countMAX_COUNT_VALUE   ( 200 )
 
#define countNUM_TEST_TASKS   ( 2 )
 
#define countSTART_AT_MAX_COUNT   ( 0xaa )
 
#define countSTART_AT_ZERO   ( 0x55 )
 

Typedefs

typedef struct COUNT_SEM_STRUCT xCountSemStruct
 

Functions

static void prvCountingSemaphoreTask (void *pvParameters)
 
static void prvDecrementSemaphoreCount (xSemaphoreHandle xSemaphore, unsigned portBASE_TYPE *puxLoopCounter)
 
static void prvIncrementSemaphoreCount (xSemaphoreHandle xSemaphore, unsigned portBASE_TYPE *puxLoopCounter)
 
void vStartCountingSemaphoreTasks (void)
 
portBASE_TYPE xAreCountingSemaphoreTasksStillRunning (void)
 

Variables

static volatile portBASE_TYPE xErrorDetected = pdFALSE
 
static volatile xCountSemStruct xParameters [countNUM_TEST_TASKS]
 

#define countDONT_BLOCK   ( 0 )
#define countMAX_COUNT_VALUE   ( 200 )
#define countNUM_TEST_TASKS   ( 2 )
#define countSTART_AT_MAX_COUNT   ( 0xaa )
#define countSTART_AT_ZERO   ( 0x55 )

static void prvDecrementSemaphoreCount ( xSemaphoreHandle  xSemaphore,
unsigned portBASE_TYPE *  puxLoopCounter 
)
static
static void prvIncrementSemaphoreCount ( xSemaphoreHandle  xSemaphore,
unsigned portBASE_TYPE *  puxLoopCounter 
)
static
portBASE_TYPE xAreCountingSemaphoreTasksStillRunning ( void  )

volatile xCountSemStruct xParameters[countNUM_TEST_TASKS]
static