|
WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
|
函数 | |
| int | osal_msg_queue_create (const char *name, unsigned short queue_len, unsigned long *queue_id, unsigned int flags, unsigned short max_msgsize) |
| Create a message queue. | |
| int | osal_msg_queue_write_copy (unsigned long queue_id, void *buffer_addr, unsigned int buffer_size, unsigned int timeout) |
| Write data into a queue. | |
| int | osal_msg_queue_read_copy (unsigned long queue_id, void *buffer_addr, unsigned int *buffer_size, unsigned int timeout) |
| Read a queue. | |
| int | osal_msg_queue_write_head_copy (unsigned long queue_id, void *buffer_addr, unsigned int buffer_size, unsigned int timeout) |
| Write data into a queue header. | |
| void | osal_msg_queue_delete (unsigned long queue_id) |
| Delete a queue. | |
| int | osal_msg_queue_is_full (unsigned long queue_id) |
| Check whether the message queue is full. | |
| unsigned int | osal_msg_queue_get_msg_num (unsigned long queue_id) |
| Obtains the number of messages in the current message queue. | |
| int osal_msg_queue_create | ( | const char * | name, |
| unsigned short | queue_len, | ||
| unsigned long * | queue_id, | ||
| unsigned int | flags, | ||
| unsigned short | max_msgsize | ||
| ) |
Create a message queue.
| name | [in] Message queue name. Reserved parameter, not used for now. |
| queue_len | [in] Queue length. The value range is [1,0xffff]. |
| queue_id | [out] ID of the queue control structure that is successfully created. |
| flags | [in] Queue mode. Reserved parameter, not used for now. |
| max_msgsize | [in] Node size. The value range is [1,0xffff]. |
| void osal_msg_queue_delete | ( | unsigned long | queue_id | ) |
Delete a queue.
| queue_id | [in] Queue ID created by osal_msg_queue_create.. |
| unsigned int osal_msg_queue_get_msg_num | ( | unsigned long | queue_id | ) |
Obtains the number of messages in the current message queue.
| queue_id | [in] Queue ID created by osal_msg_queue_create |
| int osal_msg_queue_is_full | ( | unsigned long | queue_id | ) |
Check whether the message queue is full.
| queue_id | [in] Queue ID created by osal_msg_queue_create. |
| int osal_msg_queue_read_copy | ( | unsigned long | queue_id, |
| void * | buffer_addr, | ||
| unsigned int * | buffer_size, | ||
| unsigned int | timeout | ||
| ) |
Read a queue.
| queue_id | [in] Queue ID created by osal_msg_queue_create. |
| buffer_addr | [out] Starting address that stores the data to be written. The starting address must not be null. |
| buffer_size | [in/out] Where to maintain the buffer wanted-size before read, and the real-size after read. |
| timeout | [in] Expiry time. (unit: Tick). |
| int osal_msg_queue_write_copy | ( | unsigned long | queue_id, |
| void * | buffer_addr, | ||
| unsigned int | buffer_size, | ||
| unsigned int | timeout | ||
| ) |
Write data into a queue.
| queue_id | [in] Queue ID created by osal_msg_queue_create. |
| buffer_addr | [in] Starting address that stores the data to be written. The starting address must not be null. |
| buffer_size | [in] Passed-in buffer size. |
| timeout | [in] Expiry time. (unit: Tick). |
| int osal_msg_queue_write_head_copy | ( | unsigned long | queue_id, |
| void * | buffer_addr, | ||
| unsigned int | buffer_size, | ||
| unsigned int | timeout | ||
| ) |
Write data into a queue header.
| queue_id | [in] Queue ID created by osal_msg_queue_create. |
| buffer_addr | [out] Starting address that stores the data to be written. The starting address must not be null. |
| buffer_size | [in] Passed-in buffer size, which must not be 0. The value range is [1,0xffffffff]. |
| timeout | [in] Expiry time. (unit: Tick). |