แนวคิด — Binary Semaphore กับ Event Group
Binary semaphore — ใช้เมื่อต้องการ "มีสัญญาณแล้ว" ไม่ใช่ส่ง payload ใหญ่ (ถ้าต้องส่งข้อมูล ให้ใช้ queue)
(void)xSemaphoreTake(s_evt, pdMS_TO_TICKS(1000));
(void)xSemaphoreGive(s_evt);
Event group — ธงสถานะที่รอได้หลายบิต เช่น "I²C พร้อมแล้ว" ก่อนให้เซ็นเซอร์เริ่มทำงาน
(void)xEventGroupSetBits(s_ready, READY_BIT);
EventBits_t bits = xEventGroupWaitBits(s_ready, READY_BIT, pdFALSE, pdFALSE, ticks);