示例#1
0
producer::producer() :
    scheduler_task("producer", 3 * 512, PRIORITY_LOW)
{
    /* Create the queue, and share the handle using an ID (enum) or index */
    QueueHandle_t qh = xQueueCreate(1, sizeof(int));
    addSharedObject(shared_SensorQueue, qh);
}
示例#2
0
bool queue_tx::init(void)
{
    // call our run() every second :
    setRunDuration(1000);

    /**
     * Create a queue, and add to mShared object by the name of "my_queue"
     * One small error is not to check for NULL from xQueueCreate()
     */
    QueueHandle_t my_queue = xQueueCreate(1, sizeof(int));
    return addSharedObject("my_queue", my_queue);
}
示例#3
0
 orient_compute(uint8_t priority) : scheduler_task("compute", 2048, priority)
 {
     /* We save the queue handle by using addSharedObject() */
     qid = xQueueCreate(1, sizeof(orientation_t));
     addSharedObject(shared_SensorQueueId, qid);
 }