Semaphore not firing #103
Unanswered
orbitcoms
asked this question in
Course Qeustions
Replies: 1 comment
-
|
@orbitcoms It looks good to me. It should fire the way you have it set up |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I could not find any information in the RTOS videos how to use semaphores across files. I cannot get a semaphore being Given in one file to get taken in another.
I have Wifi.C file that defines and gives the semaphore like this.
xSemaphoreHandle wifi_data;
in wifi receive function...
xSemaphoreGive(wifi_data); //I create a print before this line to confirm code is getting here
void init()...
wifi_data = xSemaphoreCreateBinary();
My other file "Process.C" I set up like this...
#include "wifi.h"
extern xSemaphoreHandle wifi_data;
And my task...
void process_wifi_detection(void * params)
{
while (true)
{
xSemaphoreTake(wifi_data, portMAX_DELAY);
Beta Was this translation helpful? Give feedback.
All reactions