|
| 1 | +/*! |
| 2 | + * @file llcc68_driver_version.h |
| 3 | + * |
| 4 | + * @brief Placeholder to keep the version of LLCC68 driver. |
| 5 | + * |
| 6 | + * The Clear BSD License |
| 7 | + * Copyright Semtech Corporation 2023. All rights reserved. |
| 8 | + * |
| 9 | + * Redistribution and use in source and binary forms, with or without |
| 10 | + * modification, are permitted (subject to the limitations in the disclaimer |
| 11 | + * below) provided that the following conditions are met: |
| 12 | + * * Redistributions of source code must retain the above copyright |
| 13 | + * notice, this list of conditions and the following disclaimer. |
| 14 | + * * Redistributions in binary form must reproduce the above copyright |
| 15 | + * notice, this list of conditions and the following disclaimer in the |
| 16 | + * documentation and/or other materials provided with the distribution. |
| 17 | + * * Neither the name of the Semtech corporation nor the |
| 18 | + * names of its contributors may be used to endorse or promote products |
| 19 | + * derived from this software without specific prior written permission. |
| 20 | + * |
| 21 | + * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY |
| 22 | + * THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND |
| 23 | + * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT |
| 24 | + * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A |
| 25 | + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE |
| 26 | + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 27 | + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 28 | + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| 29 | + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
| 30 | + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 31 | + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 32 | + * POSSIBILITY OF SUCH DAMAGE. |
| 33 | + */ |
| 34 | + |
| 35 | +#ifndef LLCC68_DRIVER_VERSION_H |
| 36 | +#define LLCC68_DRIVER_VERSION_H |
| 37 | + |
| 38 | +#ifdef __cplusplus |
| 39 | +extern "C" { |
| 40 | +#endif |
| 41 | + |
| 42 | +/* |
| 43 | + * ----------------------------------------------------------------------------- |
| 44 | + * --- DEPENDENCIES ------------------------------------------------------------ |
| 45 | + */ |
| 46 | + |
| 47 | +/* |
| 48 | + * ----------------------------------------------------------------------------- |
| 49 | + * --- PUBLIC MACROS ----------------------------------------------------------- |
| 50 | + */ |
| 51 | + |
| 52 | +/* |
| 53 | + * ----------------------------------------------------------------------------- |
| 54 | + * --- PUBLIC CONSTANTS -------------------------------------------------------- |
| 55 | + */ |
| 56 | + |
| 57 | +#define LLCC68_DRIVER_VERSION_MAJOR 2 |
| 58 | +#define LLCC68_DRIVER_VERSION_MINOR 2 |
| 59 | +#define LLCC68_DRIVER_VERSION_PATCH 0 |
| 60 | + |
| 61 | +/* |
| 62 | + * ----------------------------------------------------------------------------- |
| 63 | + * --- PUBLIC TYPES ------------------------------------------------------------ |
| 64 | + */ |
| 65 | + |
| 66 | +/* |
| 67 | + * ----------------------------------------------------------------------------- |
| 68 | + * --- PUBLIC FUNCTIONS PROTOTYPES --------------------------------------------- |
| 69 | + */ |
| 70 | + |
| 71 | +/*! |
| 72 | + * @brief Compare version information with current ones |
| 73 | + * |
| 74 | + * This macro expands to true boolean value if the version information provided in argument is compatible or |
| 75 | + * retro-compatible with the version of this code base |
| 76 | + */ |
| 77 | +#define LLCC68_DRIVER_VERSION_CHECK( x, y, z ) \ |
| 78 | + ( x == LLCC68_DRIVER_VERSION_MAJOR && \ |
| 79 | + ( y < LLCC68_DRIVER_VERSION_MINOR || \ |
| 80 | + ( y == LLCC68_DRIVER_VERSION_MINOR && z <= LLCC68_DRIVER_VERSION_PATCH ) ) ) |
| 81 | + |
| 82 | +const char* llcc68_driver_version_get_version_string( void ); |
| 83 | + |
| 84 | +#ifdef __cplusplus |
| 85 | +} |
| 86 | +#endif |
| 87 | + |
| 88 | +#endif // LLCC68_DRIVER_VERSION_H |
| 89 | + |
| 90 | +/* --- EOF ------------------------------------------------------------------ */ |
0 commit comments