Lines Matching refs:post
125 …esp_event_loop_instance_t* loop, esp_event_handler_node_t *handler, esp_event_post_instance_t post) in handler_execute() argument
127 …ESP_LOGD(TAG, "running post %s:%d with handler %p and context %p on loop %p", post.base, post.id, … in handler_execute()
137 if (post.data_set) { in handler_execute()
138 if (post.data_allocated) { in handler_execute()
139 data_ptr = post.data.ptr; in handler_execute()
141 data_ptr = &post.data.val; in handler_execute()
145 (*(handler->handler_ctx->handler))(handler->handler_ctx->arg, post.base, post.id, data_ptr); in handler_execute()
147 (*(handler->handler_ctx->handler))(handler->handler_ctx->arg, post.base, post.id, post.data); in handler_execute()
432 …ic void inline __attribute__((always_inline)) post_instance_delete(esp_event_post_instance_t* post) in post_instance_delete() argument
435 if (post->data_allocated && post->data.ptr) { in post_instance_delete()
436 free(post->data.ptr); in post_instance_delete()
439 if (post->data) { in post_instance_delete()
440 free(post->data); in post_instance_delete()
443 memset(post, 0, sizeof(*post)); in post_instance_delete()
556 esp_event_post_instance_t post; in esp_event_loop_run() local
566 while(xQueueReceive(loop->queue, &post, ticks_to_run) == pdTRUE) { in esp_event_loop_run()
582 handler_execute(loop, handler, post); in esp_event_loop_run()
587 if (base_node->base == post.base) { in esp_event_loop_run()
590 handler_execute(loop, handler, post); in esp_event_loop_run()
595 if (id_node->id == post.id) { in esp_event_loop_run()
598 handler_execute(loop, handler, post); in esp_event_loop_run()
609 esp_event_base_t base = post.base; in esp_event_loop_run()
610 int32_t id = post.id; in esp_event_loop_run()
612 post_instance_delete(&post); in esp_event_loop_run()
672 esp_event_post_instance_t post; in esp_event_loop_delete() local
673 while(xQueueReceive(loop->queue, &post, 0) == pdTRUE) { in esp_event_loop_delete()
674 post_instance_delete(&post); in esp_event_loop_delete()
836 esp_event_post_instance_t post; in esp_event_post_to() local
837 memset((void*)(&post), 0, sizeof(post)); in esp_event_post_to()
849 post.data.ptr = event_data_copy; in esp_event_post_to()
850 post.data_allocated = true; in esp_event_post_to()
851 post.data_set = true; in esp_event_post_to()
853 post.data = event_data_copy; in esp_event_post_to()
856 post.base = event_base; in esp_event_post_to()
857 post.id = event_id; in esp_event_post_to()
870 result = xQueueSendToBack(loop->queue, &post, ticks_to_wait); in esp_event_post_to()
873 result = xQueueSendToBack(loop->queue, &post, 0); in esp_event_post_to()
879 result = xQueueSendToBack(loop->queue, &post, ticks_to_wait); in esp_event_post_to()
881 result = xQueueSendToBack(loop->queue, &post, 0); in esp_event_post_to()
886 post_instance_delete(&post); in esp_event_post_to()
913 esp_event_post_instance_t post; in esp_event_isr_post_to() local
914 memset((void*)(&post), 0, sizeof(post)); in esp_event_isr_post_to()
916 if (event_data_size > sizeof(post.data.val)) { in esp_event_isr_post_to()
921 memcpy((void*)(&(post.data.val)), event_data, event_data_size); in esp_event_isr_post_to()
922 post.data_allocated = false; in esp_event_isr_post_to()
923 post.data_set = true; in esp_event_isr_post_to()
925 post.base = event_base; in esp_event_isr_post_to()
926 post.id = event_id; in esp_event_isr_post_to()
931 result = xQueueSendToBackFromISR(loop->queue, &post, task_unblocked); in esp_event_isr_post_to()
934 post_instance_delete(&post); in esp_event_isr_post_to()