25 lines
950 B
C
25 lines
950 B
C
#ifndef K10_HOST_QUEUE_H
|
|
#define K10_HOST_QUEUE_H
|
|
#include "FreeRTOS.h"
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
QueueHandle_t k10_create_dynamic( UBaseType_t, UBaseType_t );
|
|
QueueHandle_t k10_create_static( UBaseType_t, UBaseType_t, uint8_t *, StaticQueue_t * );
|
|
BaseType_t k10_send( QueueHandle_t, const void *, TickType_t );
|
|
BaseType_t k10_receive( QueueHandle_t, void *, TickType_t );
|
|
UBaseType_t uxQueueMessagesWaiting( QueueHandle_t );
|
|
void vQueueDelete( QueueHandle_t );
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
#define xQueueCreate( capacity, item_size ) \
|
|
k10_create_dynamic( ( capacity ), ( item_size ) )
|
|
#define xQueueCreateStatic( capacity, item_size, bytes, control ) \
|
|
k10_create_static( ( capacity ), ( item_size ), ( bytes ), ( control ) )
|
|
#define xQueueSend( queue, item, timeout ) \
|
|
k10_send( ( queue ), ( item ), ( timeout ) )
|
|
#define xQueueReceive( queue, item, timeout ) \
|
|
k10_receive( ( queue ), ( item ), ( timeout ) )
|
|
#endif
|