commit | author | age
|
d6b4a7
|
1 |
/* |
G |
2 |
* coreSNTP v1.2.0 |
|
3 |
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. |
|
4 |
* |
|
5 |
* SPDX-License-Identifier: MIT |
|
6 |
* |
|
7 |
* Permission is hereby granted, free of charge, to any person obtaining a copy of |
|
8 |
* this software and associated documentation files (the "Software"), to deal in |
|
9 |
* the Software without restriction, including without limitation the rights to |
|
10 |
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of |
|
11 |
* the Software, and to permit persons to whom the Software is furnished to do so, |
|
12 |
* subject to the following conditions: |
|
13 |
* |
|
14 |
* The above copyright notice and this permission notice shall be included in all |
|
15 |
* copies or substantial portions of the Software. |
|
16 |
* |
|
17 |
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
18 |
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS |
|
19 |
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR |
|
20 |
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER |
|
21 |
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN |
|
22 |
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
|
23 |
*/ |
|
24 |
|
|
25 |
/** |
|
26 |
* @file core_sntp_config_defaults.h |
|
27 |
* @brief This file represents the default values for the configuration macros |
|
28 |
* of the coreSNTP library. |
|
29 |
* |
|
30 |
* @note This file SHOULD NOT be modified. If custom values are needed for |
|
31 |
* any configuration macro, a core_sntp_config.h file should be provided to |
|
32 |
* the SNTP library to override the default values defined in this file. |
|
33 |
* To build the library with the core_sntp_config.h file, make sure to |
|
34 |
* not set the SNTP_DO_NOT_USE_CUSTOM_CONFIG preprocessor macro. |
|
35 |
*/ |
|
36 |
|
|
37 |
#ifndef CORE_SNTP_CONFIG_DEFAULTS_H_ |
|
38 |
#define CORE_SNTP_CONFIG_DEFAULTS_H_ |
|
39 |
|
|
40 |
/* The macro definition for SNTP_DO_NOT_USE_CUSTOM_CONFIG is for Doxygen |
|
41 |
* documentation only. */ |
|
42 |
|
|
43 |
/** |
|
44 |
* @brief Define this macro to build the SNTP library without the custom config |
|
45 |
* file core_sntp_config.h. |
|
46 |
* |
|
47 |
* Without the custom config, the SNTP library builds with |
|
48 |
* default values of config macros defined in core_sntp_config_defaults.h file. |
|
49 |
* |
|
50 |
* If a custom config is provided, then SNTP_DO_NOT_USE_CUSTOM_CONFIG should not |
|
51 |
* be defined. |
|
52 |
*/ |
|
53 |
#ifdef DOXYGEN |
|
54 |
#define SNTP_DO_NOT_USE_CUSTOM_CONFIG |
|
55 |
#endif |
|
56 |
|
|
57 |
/* SNTP_DO_NOT_USE_CUSTOM_CONFIG allows building the SNTP library |
|
58 |
* without a custom config. If a custom config is provided, the |
|
59 |
* SNTP_DO_NOT_USE_CUSTOM_CONFIG macro should not be defined. */ |
|
60 |
#ifndef SNTP_DO_NOT_USE_CUSTOM_CONFIG |
|
61 |
#include "core_sntp_config.h" |
|
62 |
#endif |
|
63 |
|
|
64 |
/** |
|
65 |
* @brief Macro that is called in the SNTP library for logging "Error" level |
|
66 |
* messages. |
|
67 |
* |
|
68 |
* To enable error level logging in the SNTP library, this macro should be mapped to the |
|
69 |
* application-specific logging implementation that supports error logging. |
|
70 |
* |
|
71 |
* @note This logging macro is called in the SNTP library with parameters wrapped in |
|
72 |
* double parentheses to be ISO C89/C90 standard compliant. For a reference |
|
73 |
* POSIX implementation of the logging macros, refer to core_sntp_config.h files, and the |
|
74 |
* logging-stack in demos folder of the |
|
75 |
* [AWS IoT Embedded C SDK repository](https://github.com/aws/aws-iot-device-sdk-embedded-C). |
|
76 |
* |
|
77 |
* <b>Default value</b>: Error logging is turned off, and no code is generated for calls |
|
78 |
* to the macro in the SNTP library on compilation. |
|
79 |
*/ |
|
80 |
#ifndef LogError |
|
81 |
#define LogError( message ) |
|
82 |
#endif |
|
83 |
|
|
84 |
/** |
|
85 |
* @brief Macro that is called in the SNTP library for logging "Warning" level |
|
86 |
* messages. |
|
87 |
* |
|
88 |
* To enable warning level logging in the SNTP library, this macro should be mapped to the |
|
89 |
* application-specific logging implementation that supports warning logging. |
|
90 |
* |
|
91 |
* @note This logging macro is called in the SNTP library with parameters wrapped in |
|
92 |
* double parentheses to be ISO C89/C90 standard compliant. For a reference |
|
93 |
* POSIX implementation of the logging macros, refer to core_sntp_config.h files, and the |
|
94 |
* logging-stack in demos folder of the |
|
95 |
* [AWS IoT Embedded C SDK repository](https://github.com/aws/aws-iot-device-sdk-embedded-C/). |
|
96 |
* |
|
97 |
* <b>Default value</b>: Warning logs are turned off, and no code is generated for calls |
|
98 |
* to the macro in the SNTP library on compilation. |
|
99 |
*/ |
|
100 |
#ifndef LogWarn |
|
101 |
#define LogWarn( message ) |
|
102 |
#endif |
|
103 |
|
|
104 |
/** |
|
105 |
* @brief Macro that is called in the SNTP library for logging "Info" level |
|
106 |
* messages. |
|
107 |
* |
|
108 |
* To enable info level logging in the SNTP library, this macro should be mapped to the |
|
109 |
* application-specific logging implementation that supports info logging. |
|
110 |
* |
|
111 |
* @note This logging macro is called in the SNTP library with parameters wrapped in |
|
112 |
* double parentheses to be ISO C89/C90 standard compliant. For a reference |
|
113 |
* POSIX implementation of the logging macros, refer to core_sntp_config.h files, and the |
|
114 |
* logging-stack in demos folder of the |
|
115 |
* [AWS IoT Embedded C SDK repository](https://github.com/aws/aws-iot-device-sdk-embedded-C/). |
|
116 |
* |
|
117 |
* <b>Default value</b>: Info logging is turned off, and no code is generated for calls |
|
118 |
* to the macro in the SNTP library on compilation. |
|
119 |
*/ |
|
120 |
#ifndef LogInfo |
|
121 |
#define LogInfo( message ) |
|
122 |
#endif |
|
123 |
|
|
124 |
/** |
|
125 |
* @brief Macro that is called in the SNTP library for logging "Debug" level |
|
126 |
* messages. |
|
127 |
* |
|
128 |
* To enable debug level logging from SNTP library, this macro should be mapped to the |
|
129 |
* application-specific logging implementation that supports debug logging. |
|
130 |
* |
|
131 |
* @note This logging macro is called in the SNTP library with parameters wrapped in |
|
132 |
* double parentheses to be ISO C89/C90 standard compliant. For a reference |
|
133 |
* POSIX implementation of the logging macros, refer to core_sntp_config.h files, and the |
|
134 |
* logging-stack in demos folder of the |
|
135 |
* [AWS IoT Embedded C SDK repository](https://github.com/aws/aws-iot-device-sdk-embedded-C/). |
|
136 |
* |
|
137 |
* <b>Default value</b>: Debug logging is turned off, and no code is generated for calls |
|
138 |
* to the macro in the SNTP library on compilation. |
|
139 |
*/ |
|
140 |
#ifndef LogDebug |
|
141 |
#define LogDebug( message ) |
|
142 |
#endif |
|
143 |
|
|
144 |
#endif /* ifndef CORE_SNTP_CONFIG_DEFAULTS_H_ */ |