Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port Radio to RTOS #85

Open
kylestach opened this issue Oct 6, 2019 · 0 comments
Open

Port Radio to RTOS #85

kylestach opened this issue Oct 6, 2019 · 0 comments

Comments

@kylestach
Copy link
Contributor

We need to port the radio to RTOS so we can take advantage of yielding (instead of just delaying for 1ms).

This should basically look like the following:

static SemaphoreHandle_t radio_semaphore;

void radio_interrupt() {
    xSemaphoreGiveFromISR(radio_semaphore, NULL);
}

void radio_task_function() {
    while (true) {
        // TODO: Request data from the ISM
        if (xSemaphoreTake(radio_semaphore, 1ms_in_ticks)) {
            // TODO: Get data from the ISM
        }
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant