freeRTOS Queu Management
‘Queues’ provide a task-to-task, task-to-interrupt, and interrupt-to-task communication mechanism. Characteristics of a Queue Data Storage A queue can hold a finite number of fixed size data items. The maximum number of items a queue can hold is called its ‘length’. Both the length and the size of each data item are set when the queue is created. Queues are normally used as First In First Out (FIFO) buffers, where data is written to the end (tail) of the queue and removed from the front (head) of the queue. There are two ways in which queue behavior could have been implemented: 1. Queue by copy Queuing by copy means the data sent to the queue is copied byte for byte into the queue 2. Queue by reference Queuing by reference means the queue only holds pointers to the data sent to the queue, not the data itself. FreeRTOS uses the queue by copy method. Queuing by copy is considered to be simultaneously more powerful and simpler to use than queueing by reference becaus...
留言
張貼留言