Different between RT_SLEEP(rt, 100) and RT_YIELD(rt)?

I don’t understand the meaning of the 2 command lines
RT_BEGIN(rt);
RT_YIELD(rt);
Can someone explain it to me?

I found it in:

int blinkThread(struct rt *rt) {
RT_BEGIN(rt);

for (;;) {
    if (buttonState == HIGH) {
        digitalWrite(LED_SEND , HIGH);
        RT_SLEEP(rt, 200);
        digitalWrite(LED_SEND , LOW);
        RT_SLEEP(rt, 100);
    } else {
        digitalWrite(LED_SEND , LOW);
        RT_YIELD(rt);
    }
}

RT_END(rt);

}

Thank you.

Where did you find this?

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.