FreeRTOS API Queue

Started by tha, December 23, 2021, 06:14:24 AM

Previous topic - Next topic

tha


tha

Detailed Description

uxQueueMessagesWaiting

queue.h

UBaseType_t uxQueueMessagesWaiting( QueueHandle_t xQueue );

ส่งคืนกลับจำนวนของ messages ที่เก็บใน a queue.

Parameters:

     xQueue          A handle to the queue ที่กำลังถูกสอบถาม.

Returns:

     จำนวนของ messages มีให้ใช้ประโยชน์ใน the queue

tha

uxQueueMessagesWaitingFromISR

queue.h

UBaseType_t uxQueueMessagesWaitingFromISR( QueueHandle_t xQueue );

A version of uxQueueMessagesWaiting() ที่สามารถถูกเรียกจาก an ISR. ส่งคืนกลับจำนวนของ messages ที่เก็บใน a queue.

Parameters:

     xQueue          A handle to the queue ที่กำลังถูกสอบถาม.

Returns:

     จำนวนของ messages มีให้ใช้ประโยชน์ใน the queue


tha

uxQueueSpacesAvailable

queue.h

UBaseType_t uxQueueSpacesAvailable( QueueHandle_t xQueue );

Return the number of free spaces in a queue.

Parameters:

     xQueue          A handle to the queue ที่กำลังถูกสอบถาม.

Returns:

     จำนวนของ free spaces มีให้ใช้ประโยชน์ใน the queue.

tha

vQueueDelete

queue.h

void vQueueDelete( QueueHandle_t xQueue );

ลบ a queue - ปล่อยฟรี the memory ทั้งหมดที่จัดสรรสำหรับการเก็บ items ที่วางบน the queue.

Parameters:

     xQueue          A handle to the queue ที่ถูกลบ.

tha

xQueueReset

queue.h

BaseType_t xQueueReset( QueueHandle_t xQueue );

รีเซ็ต a queue เป็น original empty state ของมัน.

Parameters:

     xQueue          The handle of the queue ที่กำลังถูกรีเซ็ต

Returns:

     ตั้งแต่ FreeRTOS V7.2.0 xQueueReset() ส่งคืนกลับ pdPASS เสมอ.

tha

xQueueIsQueueEmptyFromISR

queue.h

BaseType_t xQueueIsQueueEmptyFromISR( const QueueHandle_t xQueue );

สอบถาม a queue เพื่อตัดสินใจถ้า the queue ว่างเปล่า. ฟังชั่นนี้ควรถูกใช้เฉพาะใน an ISR.

Parameters:

     xQueue          The handle of the queue ที่กำลังถูกสอบถาม

Returns:

     pdFALSE ถ้า the queue ไม่ว่างเปล่า, หรือ pdTRUE ถ้า the queue ว่างเปล่า.

tha

xQueueIsQueueFullFromISR

queue.h

BaseType_t xQueueIsQueueFullFromISR( const QueueHandle_t xQueue );

สอบถาม a queue เพื่อตัดสินใจถ้า the queue เต็ม. ฟังชั่นนี้ควรถูกใช้เฉพาะใน an ISR.

Parameters:

     xQueue          The handle of the queue ที่กำลังถูกสอบถาม

Returns:

     pdFALSE ถ้า the queue ไม่เต็ม, หรือ pdTRUE ถ้า the queue เต็ม.