3#ifndef PRINTLINES_ALLOWED
4#define PRINTLINES_ALLOWED 0
7static const char *FNAME =
"kest_representation.c";
11#ifdef KEST_USE_FREERTOS
12QueueHandle_t kest_rep_update_queue;
13int rep_updated_initd = 0;
18 kest_representation_pll *current = reps;
22 if (current->data && current->data->update)
24 current->data->update(current->data->representer, current->data->representee);
27 current = current->next;
33#ifdef KEST_ENABLE_REPRESENTATIONS
34void update_queued_representations_cb(lv_timer_t *timer)
38 kest_representation_pll *list;
40 while (xQueueReceive(kest_rep_update_queue, &list, 0) == pdTRUE)
48int init_representation_updater()
50 kest_rep_update_queue = xQueueCreate(16,
sizeof(kest_representation_pll*));
51 lv_timer_t * timer = lv_timer_create(update_queued_representations_cb, 1, NULL);
52 rep_updated_initd = 1;
59 #ifdef KEST_ENABLE_REPRESENTATIONS
60 #ifdef KEST_USE_FREERTOS
61 if (!rep_updated_initd)
64 if (xQueueSend(kest_rep_update_queue, (
void*)&reps, (TickType_t)10) != pdPASS)
79 kest_representation_pll *current = reps;
80 kest_representation_pll *prev = NULL;
81 kest_representation_pll *head = reps;
85 if (current->data == rep)
88 prev->next = current->next;
97 current = current->next;
void kest_free(void *ptr)
#define ERR_CURRENTLY_EXHAUSTED
#define ERR_FEATURE_DISABLED
#define ERR_QUEUE_SEND_FAILED
#define IMPLEMENT_LINKED_PTR_LIST(X)
void kest_representation_pll_update_all(kest_representation_pll *reps)
int queue_representation_list_update(kest_representation_pll *reps)
kest_representation_pll * kest_representation_pll_remove(kest_representation_pll *reps, kest_representation *rep)