Code: Select all
// task A sets the marker
bool marker;
function setMarker() {
marker = true;
}
// Task B checks the marker every second
while ( !marker ) {
vTaskDelay(1000);
};
Code: Select all
// task A sets the marker
extern EventGroupHandle_t events;
function setMarker() {
xEventGroupSetBits(events, 1);
}
// Task B blocks until this bit i set
xEventGroupWaitBits(events,1,pdFALSE,pdFALSE,portMAX_DELAY)
TIA