29#ifndef NFC_SCHEDULER_H_
30#define NFC_SCHEDULER_H_
39#define EVENT_TIMEOUT 1
40#define EVENT_ABORTED 2
41#define EVENT_HW_INTERRUPT 4
44typedef struct __nfc_timer nfc_scheduler_timer_t;
51 nfc_scheduler_timer_t *pTimer;
54typedef void (*nfc_task_fn)(uint32_t events,
void *pUserData);
59 int64_t timeoutInitial;
67void nfc_scheduler_timer_init(nfc_scheduler_timer_t *timer);
69void nfc_scheduler_timer_start(nfc_scheduler_timer_t *timer);
71uint32_t nfc_scheduler_timer_get(nfc_scheduler_timer_t *timer);
73void nfc_scheduler_timer_stop(nfc_scheduler_timer_t *timer);
75void nfc_scheduler_timer_reset(nfc_scheduler_timer_t *timer);
void nfc_scheduler_queue_task(nfc_scheduler_t *pScheduler, nfc_task_t *pTask)
Queue a task to execute.
void nfc_scheduler_dequeue_task(nfc_scheduler_t *pScheduler, bool abort, nfc_task_t *pTask)
Remove a task to execute.
void nfc_scheduler_init(nfc_scheduler_t *pScheduler, nfc_scheduler_timer_t *pTimer)
Init scheduler.
uint32_t nfc_scheduler_iteration(nfc_scheduler_t *pScheduler, uint32_t events)
Iterate through all tasks.
void task_init(nfc_task_t *pTask, uint32_t events, uint32_t timeout, nfc_task_fn fn, void *pUserData)
Initialize task with the following parameters.