-
Notifications
You must be signed in to change notification settings - Fork 23
/
ESP_PanelVersions.h
104 lines (94 loc) · 5.11 KB
/
ESP_PanelVersions.h
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
/*
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include "ESP_Panel_Conf_Internal.h"
#include "ESP_Panel_Board_Internal.h"
/* Library Version */
#define ESP_PANEL_VERSION_MAJOR 0
#define ESP_PANEL_VERSION_MINOR 2
#define ESP_PANEL_VERSION_PATCH 1
/* File `ESP_Panel_Conf.h` */
#define ESP_PANEL_CONF_VERSION_MAJOR 0
#define ESP_PANEL_CONF_VERSION_MINOR 1
#define ESP_PANEL_CONF_VERSION_PATCH 2
/* File `ESP_Panel_Board_Custom.h` */
#define ESP_PANEL_BOARD_CUSTOM_VERSION_MAJOR 0
#define ESP_PANEL_BOARD_CUSTOM_VERSION_MINOR 3
#define ESP_PANEL_BOARD_CUSTOM_VERSION_PATCH 1
/* File `ESP_Panel_Board_Supported.h` */
#define ESP_PANEL_BOARD_SUPPORTED_VERSION_MAJOR 0
#define ESP_PANEL_BOARD_SUPPORTED_VERSION_MINOR 7
#define ESP_PANEL_BOARD_SUPPORTED_VERSION_PATCH 0
// *INDENT-OFF*
/**
* Check if the current configuration file version is compatible with the library version
*
*/
/* File `ESP_Panel_Conf.h` */
#ifndef ESP_PANEL_CONF_FILE_SKIP
// If the version is not defined, set it to `0.1.0`
#if !defined(ESP_PANEL_CONF_FILE_VERSION_MAJOR) && \
!defined(ESP_PANEL_CONF_FILE_VERSION_MINOR) && \
!defined(ESP_PANEL_CONF_FILE_VERSION_PATCH)
#define ESP_PANEL_CONF_FILE_VERSION_MAJOR 0
#define ESP_PANEL_CONF_FILE_VERSION_MINOR 1
#define ESP_PANEL_CONF_FILE_VERSION_PATCH 0
#endif
// Check if the current configuration file version is compatible with the library version
#if ESP_PANEL_CONF_FILE_VERSION_MAJOR != ESP_PANEL_CONF_VERSION_MAJOR
#error "The file `ESP_Panel_Conf.h` version is not compatible. Please update it with the file from the library"
#elif ESP_PANEL_CONF_FILE_VERSION_MINOR < ESP_PANEL_CONF_VERSION_MINOR
#warning "The file `ESP_Panel_Conf.h` version is outdated. Some new configurations are missing"
#elif ESP_PANEL_CONF_FILE_VERSION_PATCH > ESP_PANEL_VERSION_PATCH
#warning "The file `ESP_Panel_Conf.h` version is newer than the library. Some new configurations are not supported"
#endif /* ESP_PANEL_CONF_INCLUDE_INSIDE */
#endif /* ESP_PANEL_CONF_FILE_SKIP */
/* File `ESP_Panel_Board_Custom.h` & `ESP_Panel_Board_Supported.h` */
#ifdef ESP_PANEL_USE_BOARD
/* File `ESP_Panel_Board_Supported.h` */
// Only check this file versions if use a supported board and not skip the file
#if ESP_PANEL_USE_SUPPORTED_BOARD && !defined(ESP_PANEL_BOARD_FILE_SKIP)
// If the version is not defined, set it to `0.1.0`
#if !defined(ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MAJOR) && \
!defined(ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MINOR) && \
!defined(ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_PATCH)
#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MAJOR 0
#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MINOR 1
#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_PATCH 0
#endif
// Check if the current configuration file version is compatible with the library version
#if ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MAJOR != ESP_PANEL_BOARD_SUPPORTED_VERSION_MAJOR
#error "The file `ESP_Panel_Board_Supported.h` version is not compatible. Please update it with the file from the library"
#elif ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MINOR < ESP_PANEL_BOARD_SUPPORTED_VERSION_MINOR
#warning "The file `ESP_Panel_Board_Supported.h` version is outdated. Some new configurations are missing"
#elif ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MINOR > ESP_PANEL_BOARD_SUPPORTED_VERSION_MINOR
#warning "The file `ESP_Panel_Board_Supported.h` version is newer than the library. Some new configurations are not supported"
#endif
#endif
/* File `ESP_Panel_Board_Custom.h` */
// If the version is not defined, set it to `0.1.0`
#if !defined(ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MAJOR) && \
!defined(ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MINOR) && \
!defined(ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH)
#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MAJOR 0
#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MINOR 1
#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 0
#endif
// Check if the current configuration file version is compatible with the library version
// Must check the major version
#if ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MAJOR != ESP_PANEL_BOARD_CUSTOM_VERSION_MAJOR
#error "The file `ESP_Panel_Board_Custom.h` version is not compatible. Please update it with the file from the library"
#endif
// Only check the other versions if not skip the file
#if !defined(ESP_PANEL_BOARD_FILE_SKIP)
#if ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MINOR < ESP_PANEL_BOARD_CUSTOM_VERSION_MINOR
#warning "The file `ESP_Panel_Board_Custom.h` version is outdated. Some new configurations are missing"
#elif ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MINOR > ESP_PANEL_BOARD_CUSTOM_VERSION_PATCH
#warning "The file `ESP_Panel_Board_Custom.h` version is newer than the library. Some new configurations are not supported"
#endif
#endif
#endif /* ESP_PANEL_USE_BOARD */
// *INDENT-OFF*