diff options
author | Uros Majstorovic <majstor@majstor.org> | 2018-01-20 06:26:28 +0100 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2018-01-20 06:26:28 +0100 |
commit | 1847482a7bc975e8a171cd1df9257647ab6b66f5 (patch) | |
tree | 028901a5d4c6944f29d79b9774f3cb38d1263cf2 /code/esp32/components/eos/fe310.c | |
parent | 116a4e241861dd35a61a822adb7badc42e8c81ee (diff) |
foxed esp32 semaphore bug
Diffstat (limited to 'code/esp32/components/eos/fe310.c')
-rw-r--r-- | code/esp32/components/eos/fe310.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/code/esp32/components/eos/fe310.c b/code/esp32/components/eos/fe310.c index a3552f9..b13d653 100644 --- a/code/esp32/components/eos/fe310.c +++ b/code/esp32/components/eos/fe310.c @@ -161,8 +161,9 @@ void eos_fe310_init(void) { assert(ret==ESP_OK); eos_msgq_init(&send_q, send_q_array, EOS_FE310_SIZE_Q); - mutex = xSemaphoreCreateMutex(); - xTaskCreate(&worker, "fe310_receiver", 4096, NULL, 5, NULL); + mutex = xSemaphoreCreateBinary(); + xSemaphoreGive(mutex); + xTaskCreatePinnedToCore(&worker, "fe310_receiver", 4096, NULL, 5, NULL, 1); } int eos_fe310_send(unsigned char cmd, unsigned char *buffer, uint16_t len) { |