queue. h
void *pvBuffer,
);
long BaseType_t
Definition portmacro.h:59
BaseType_t xQueueReceiveFromISR(QueueHandle_t xQueue, void *const pvBuffer, BaseType_t *const pxHigherPriorityTaskWoken)
Definition queue.c:2035
struct QueueDefinition * QueueHandle_t
Definition queue.h:51
Receive an item from a queue. It is safe to use this function from within an interrupt service routine.
- Parameters
-
xQueue | The handle to the queue from which the item is to be received. |
pvBuffer | Pointer to the buffer into which the received item will be copied. |
pxHigherPriorityTaskWoken | A task may be blocked waiting for space to become available on the queue. If xQueueReceiveFromISR causes such a task to unblock *pxTaskWoken will get set to pdTRUE, otherwise *pxTaskWoken will remain unchanged. |
- Returns
- pdTRUE if an item was successfully received from the queue, otherwise pdFALSE.
Example usage:
void vAFunction( void *pvParameters )
{
char cValueToPost;
xQueue = xQueueCreate( 10, sizeof( char ) );
if( xQueue == 0 )
{
}
cValueToPost = 'a';
xQueueSend( xQueue, (
void * ) &cValueToPost, xTicksToWait );
cValueToPost = 'b';
xQueueSend( xQueue, (
void * ) &cValueToPost, xTicksToWait );
cValueToPost = 'c';
xQueueSend( xQueue, (
void * ) &cValueToPost, xTicksToWait );
}
void vISR_Routine( void )
{
char cRxedChar;
{
vOutputCharacter( cRxedChar );
}
if( xTaskWokenByReceive != (
char )
pdFALSE;
{
}
}
uint16_t TickType_t
Definition portmacro.h:63
#define pdFALSE
Definition projdefs.h:52
#define xQueueSend(xQueue, pvItemToQueue, xTicksToWait)
Definition queue.h:513
#define taskYIELD()
Definition task.h:213