File tree Expand file tree Collapse file tree 2 files changed +22
-15
lines changed Expand file tree Collapse file tree 2 files changed +22
-15
lines changed Original file line number Diff line number Diff line change 1+ #ifndef NOTE_DEFINES_H
2+ #define NOTE_DEFINES_H
3+
4+ // Define the version of the `note-arduino` library
5+ #define NOTE_ARDUINO_VERSION_MAJOR 1
6+ #define NOTE_ARDUINO_VERSION_MINOR 6
7+ #define NOTE_ARDUINO_VERSION_PATCH 3
8+
9+ #define NOTE_ARDUINO_VERSION NOTE_C_STRINGIZE(NOTE_ARDUINO_VERSION_MAJOR) "." NOTE_C_STRINGIZE(NOTE_ARDUINO_VERSION_MINOR) "." NOTE_C_STRINGIZE(NOTE_ARDUINO_VERSION_PATCH)
10+
11+ // Unified attribute for marking functions as deprecated
12+ #if defined(__GNUC__ ) | defined(__clang__ )
13+ #define NOTE_ARDUINO_DEPRECATED __attribute__((__deprecated__))
14+ #elif defined(_MSC_VER )
15+ #define NOTE_ARDUINO_DEPRECATED __declspec(deprecated)
16+ #else
17+ #define NOTE_ARDUINO_DEPRECATED
18+ #define NOTE_ARDUINO_NO_DEPRECATED_ATTR
19+ #endif // __GNUC__ || __clang__
20+
21+ #endif // NOTE_DEFINES_H
Original file line number Diff line number Diff line change 2727#include < stddef.h>
2828#include < stdint.h>
2929
30+ #include " NoteDefines.h"
3031#include " NoteI2c.hpp"
3132#include " NoteLog.hpp"
3233#include " NoteSerial.hpp"
4546#include " mock/mock-parameters.hpp"
4647#endif
4748
48- #define NOTE_ARDUINO_VERSION_MAJOR 1
49- #define NOTE_ARDUINO_VERSION_MINOR 6
50- #define NOTE_ARDUINO_VERSION_PATCH 3
51-
52- #define NOTE_ARDUINO_VERSION NOTE_C_STRINGIZE (NOTE_ARDUINO_VERSION_MAJOR) "." NOTE_C_STRINGIZE(NOTE_ARDUINO_VERSION_MINOR) "." NOTE_C_STRINGIZE(NOTE_ARDUINO_VERSION_PATCH)
53-
54- #if defined(__GNUC__) | defined(__clang__)
55- #define NOTE_ARDUINO_DEPRECATED __attribute__ ((__deprecated__))
56- #elif defined(_MSC_VER)
57- #define NOTE_ARDUINO_DEPRECATED __declspec (deprecated)
58- #else
59- #define NOTE_ARDUINO_DEPRECATED
60- #define NOTE_ARDUINO_NO_DEPRECATED_ATTR
61- #endif // __GNUC__ || __clang__
62-
6349/* *************************************************************************/
6450/* !
6551 @brief Class that stores state and functions for interacting with the
You can’t perform that action at this time.
0 commit comments