Microchip® Advanced Software Framework

semphr.h File Reference
#include "queue.h"

Macros

#define semBINARY_SEMAPHORE_QUEUE_LENGTH   ( ( unsigned char ) 1U )
 
#define semGIVE_BLOCK_TIME   ( ( portTickType ) 0U )
 
#define semSEMAPHORE_QUEUE_ITEM_LENGTH   ( ( unsigned char ) 0U )
 
#define vSemaphoreCreateBinary(xSemaphore)
 
#define xSemaphoreAltGive(xSemaphore)   xQueueAltGenericSend( ( xQueueHandle ) ( xSemaphore ), NULL, semGIVE_BLOCK_TIME, queueSEND_TO_BACK )
 
#define xSemaphoreAltTake(xSemaphore, xBlockTime)   xQueueAltGenericReceive( ( xQueueHandle ) ( xSemaphore ), NULL, ( xBlockTime ), pdFALSE )
 
#define xSemaphoreCreateCounting(uxMaxCount, uxInitialCount)   xQueueCreateCountingSemaphore( ( uxMaxCount ), ( uxInitialCount ) )
 
#define xSemaphoreCreateMutex()   xQueueCreateMutex()
 
#define xSemaphoreCreateRecursiveMutex()   xQueueCreateMutex()
 
#define xSemaphoreGive(xSemaphore)   xQueueGenericSend( ( xQueueHandle ) ( xSemaphore ), NULL, semGIVE_BLOCK_TIME, queueSEND_TO_BACK )
 
#define xSemaphoreGiveFromISR(xSemaphore, pxHigherPriorityTaskWoken)   xQueueGenericSendFromISR( ( xQueueHandle ) ( xSemaphore ), NULL, ( pxHigherPriorityTaskWoken ), queueSEND_TO_BACK )
 
#define xSemaphoreGiveRecursive(xMutex)   xQueueGiveMutexRecursive( ( xMutex ) )
 
#define xSemaphoreTake(xSemaphore, xBlockTime)   xQueueGenericReceive( ( xQueueHandle ) ( xSemaphore ), NULL, ( xBlockTime ), pdFALSE )
 
#define xSemaphoreTakeRecursive(xMutex, xBlockTime)   xQueueTakeMutexRecursive( ( xMutex ), ( xBlockTime ) )
 

Typedefs

typedef xQueueHandle xSemaphoreHandle
 

#define semBINARY_SEMAPHORE_QUEUE_LENGTH   ( ( unsigned char ) 1U )
#define semGIVE_BLOCK_TIME   ( ( portTickType ) 0U )
#define semSEMAPHORE_QUEUE_ITEM_LENGTH   ( ( unsigned char ) 0U )
#define vSemaphoreCreateBinary (   xSemaphore)
Value:
{ \
( xSemaphore ) = xQueueCreate( ( unsigned portBASE_TYPE ) 1, semSEMAPHORE_QUEUE_ITEM_LENGTH ); \
if( ( xSemaphore ) != NULL ) \
{ \
xSemaphoreGive( ( xSemaphore ) ); \
} \
}
#define semSEMAPHORE_QUEUE_ITEM_LENGTH
Definition: semphr.h:72
#define xSemaphoreGive(xSemaphore)
Definition: semphr.h:358
xQueueHandle xQueueCreate(unsigned portBASE_TYPE uxQueueLength, unsigned portBASE_TYPE uxItemSize) PRIVILEGED_FUNCTION
Definition: queue.c:252

Referenced by main().

#define xSemaphoreAltGive (   xSemaphore)    xQueueAltGenericSend( ( xQueueHandle ) ( xSemaphore ), NULL, semGIVE_BLOCK_TIME, queueSEND_TO_BACK )
#define xSemaphoreAltTake (   xSemaphore,
  xBlockTime 
)    xQueueAltGenericReceive( ( xQueueHandle ) ( xSemaphore ), NULL, ( xBlockTime ), pdFALSE )
#define xSemaphoreCreateCounting (   uxMaxCount,
  uxInitialCount 
)    xQueueCreateCountingSemaphore( ( uxMaxCount ), ( uxInitialCount ) )
#define xSemaphoreCreateMutex ( )    xQueueCreateMutex()
#define xSemaphoreCreateRecursiveMutex ( )    xQueueCreateMutex()
#define xSemaphoreGive (   xSemaphore)    xQueueGenericSend( ( xQueueHandle ) ( xSemaphore ), NULL, semGIVE_BLOCK_TIME, queueSEND_TO_BACK )
#define xSemaphoreGiveFromISR (   xSemaphore,
  pxHigherPriorityTaskWoken 
)    xQueueGenericSendFromISR( ( xQueueHandle ) ( xSemaphore ), NULL, ( pxHigherPriorityTaskWoken ), queueSEND_TO_BACK )

Referenced by main_msc_notify_trans().

#define xSemaphoreGiveRecursive (   xMutex)    xQueueGiveMutexRecursive( ( xMutex ) )
#define xSemaphoreTake (   xSemaphore,
  xBlockTime 
)    xQueueGenericReceive( ( xQueueHandle ) ( xSemaphore ), NULL, ( xBlockTime ), pdFALSE )

Referenced by task_usb().

#define xSemaphoreTakeRecursive (   xMutex,
  xBlockTime 
)    xQueueTakeMutexRecursive( ( xMutex ), ( xBlockTime ) )