ตัวอย่างสมบูรณ์ — lv_timer เดียวเรียก poll ทุกตัว
โค้ดจาก tesaiot/developer-hub (Apache-2.0) · commit 9a8e3ed · sensorhub_presenter.c
static void sensorhub_poll_timer_cb(lv_timer_t *timer)
{
uint32_t now_ms = lv_tick_get();
sensorhub_poll_dps(now_ms);
sensorhub_poll_sht(now_ms);
sensorhub_poll_bmi(now_ms);
sensorhub_poll_bmm(now_ms);
sensorhub_poll_bmm_calibration();
sensorhub_poll_mic();
}
s_ctx.poll_timer = lv_timer_create(sensorhub_poll_timer_cb,
HUB_UI_POLL_MS, NULL);