mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-06-27 20:27:43 +08:00
Merge branch 'bugfix/fix_wifi_osi_queue_msg_pos' into 'master'
Fix queue send pos data error See merge request sdk/ESP8266_RTOS_SDK!297
This commit is contained in:
@ -199,11 +199,19 @@ static void queue_delete_wrapper(void *queue)
|
|||||||
static bool queue_send_wrapper(void *queue, void *item, uint32_t block_time_tick, uint32_t pos)
|
static bool queue_send_wrapper(void *queue, void *item, uint32_t block_time_tick, uint32_t pos)
|
||||||
{
|
{
|
||||||
signed portBASE_TYPE ret;
|
signed portBASE_TYPE ret;
|
||||||
|
BaseType_t os_pos;
|
||||||
|
|
||||||
|
if (pos == OSI_QUEUE_SEND_BACK)
|
||||||
|
os_pos = queueSEND_TO_BACK;
|
||||||
|
else if (pos == OSI_QUEUE_SEND_FRONT)
|
||||||
|
os_pos = queueSEND_TO_FRONT;
|
||||||
|
else
|
||||||
|
os_pos = queueOVERWRITE;
|
||||||
|
|
||||||
if (block_time_tick == OSI_FUNCS_TIME_BLOCKING) {
|
if (block_time_tick == OSI_FUNCS_TIME_BLOCKING) {
|
||||||
ret = xQueueGenericSend(queue, item, portMAX_DELAY, pos);
|
ret = xQueueGenericSend(queue, item, portMAX_DELAY, os_pos);
|
||||||
} else {
|
} else {
|
||||||
ret = xQueueGenericSend(queue, item, block_time_tick, pos);
|
ret = xQueueGenericSend(queue, item, block_time_tick, os_pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret == pdPASS ? true : false;
|
return ret == pdPASS ? true : false;
|
||||||
|
Reference in New Issue
Block a user