summaryrefslogtreecommitdiff
path: root/lib/lvgl/src/osal/lv_windows.h
blob: fd930e872041712604c5093b2db3c519aa30d662 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/**
 * @file lv_windows.h
 *
 */

#ifndef LV_WINDOWS_H
#define LV_WINDOWS_H

#ifdef __cplusplus
extern "C" {
#endif

/*********************
 *      INCLUDES
 *********************/

#if LV_USE_OS == LV_OS_WINDOWS

#include <Windows.h>
#include <stdbool.h>

/*********************
 *      DEFINES
 *********************/

/**********************
 *      TYPEDEFS
 **********************/

typedef HANDLE lv_thread_t;

typedef CRITICAL_SECTION lv_mutex_t;

typedef struct {
    CRITICAL_SECTION cs;
    CONDITION_VARIABLE cv;
    bool v;
} lv_thread_sync_t;

/**********************
 * GLOBAL PROTOTYPES
 **********************/

/**********************
 *      MACROS
 **********************/

#endif /*LV_USE_OS == LV_OS_WINDOWS*/

#ifdef __cplusplus
} /*extern "C"*/
#endif

#endif /*LV_WINDOWS_H*/