Skip to content

Commit a566c69

Browse files
committed
With no ISR, use Mutex (not Binary) semaphore
1 parent 2019117 commit a566c69

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cores/nRF5/Tone.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ void tone(uint8_t pin, unsigned int frequency, unsigned long duration)
184184
// and to simplify ensuring the semaphore gets initialized.
185185
static StaticSemaphore_t _tone_semaphore_allocation;
186186
static auto init_semaphore = [] () throw() { //< use a lambda to both initialize AND give the mutex
187-
SemaphoreHandle_t handle = xSemaphoreCreateBinaryStatic(&_tone_semaphore_allocation);
187+
SemaphoreHandle_t handle = xSemaphoreCreateMutexStatic(&_tone_semaphore_allocation);
188188
auto mustSucceed = xSemaphoreGive(handle);
189189
(void)mustSucceed;
190190
NRFX_ASSERT(mustSucceed == pdTRUE);

0 commit comments

Comments
 (0)