1
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
34
35
36
37
38
39
40
43
44
45
46
51
58
59
60
63
67
68
69
72
76
77
/* ... */
/* ... */
/* ... */
#include "FreeRTOS.h"
#include "semphr.h"
#if configUSE_MUTEXES
/* ... */
static SemaphoreHandle_t xt_overlay_mutex;
/* ... */
void xt_overlay_init_os(void)
{
/* ... */
xt_overlay_mutex = xSemaphoreCreateMutex();
}{ ... }
/* ... */
void xt_overlay_lock(void)
{
xSemaphoreTake(xt_overlay_mutex, 0);
}{ ... }
/* ... */
void xt_overlay_unlock(void)
{
xSemaphoreGive(xt_overlay_mutex);
}{ ... }
/* ... */#endif