|
| 1 | +/** |
| 2 | + * @file common_app_configuration.h |
| 3 | + * |
| 4 | + * @brief App configuration common to all apps |
| 5 | + * |
| 6 | + * The Clear BSD License |
| 7 | + * Copyright Semtech Corporation 2024. 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 COMMON_APP_CONFIGURATION_H |
| 36 | +#define COMMON_APP_CONFIGURATION_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 | + * @brief Watchdog counter reload value during sleep (The period must be lower than MCU watchdog period (here 20s)) |
| 54 | + */ |
| 55 | +#ifndef WATCHDOG_RELOAD_PERIOD_MS |
| 56 | +#define WATCHDOG_RELOAD_PERIOD_MS 20000 |
| 57 | +#endif // WATCHDOG_RELOAD_PERIOD_MS |
| 58 | + |
| 59 | +/*! |
| 60 | + * @brief User application data buffer size |
| 61 | + */ |
| 62 | +#ifndef LORAWAN_APP_DATA_MAX_SIZE |
| 63 | +#define LORAWAN_APP_DATA_MAX_SIZE 242 |
| 64 | +#endif // LORAWAN_APP_DATA_MAX_SIZE |
| 65 | + |
| 66 | +/*! |
| 67 | + * @brief LoRaWAN regulatory region. |
| 68 | + * One of: |
| 69 | + * LR1121_LORAWAN_REGION_AS923_GRP1 |
| 70 | + * LR1121_LORAWAN_REGION_AS923_GRP2 |
| 71 | + * LR1121_LORAWAN_REGION_AS923_GRP3 |
| 72 | + * LR1121_LORAWAN_REGION_AS923_GRP4 |
| 73 | + * LR1121_LORAWAN_REGION_AU915 |
| 74 | + * LR1121_LORAWAN_REGION_CN470 |
| 75 | + * LR1121_LORAWAN_REGION_EU868 |
| 76 | + * LR1121_LORAWAN_REGION_IN865 |
| 77 | + * LR1121_LORAWAN_REGION_KR920 |
| 78 | + * LR1121_LORAWAN_REGION_RU864 |
| 79 | + * LR1121_LORAWAN_REGION_US915 |
| 80 | + */ |
| 81 | +#ifndef LORAWAN_REGION_USED |
| 82 | +#define LORAWAN_REGION_USED LR1121_LORAWAN_REGION_EU868 |
| 83 | +#endif // LORAWAN_REGION_USED |
| 84 | + |
| 85 | +/** |
| 86 | + * @brief Periodical uplink alarm delay in seconds |
| 87 | + */ |
| 88 | +#ifndef PERIODICAL_UPLINK_DELAY_S |
| 89 | +#define PERIODICAL_UPLINK_DELAY_S 30 |
| 90 | +#endif // PERIODICAL_UPLINK_DELAY_S |
| 91 | + |
| 92 | + |
| 93 | + |
| 94 | + |
| 95 | +/* |
| 96 | + * ----------------------------------------------------------------------------- |
| 97 | + * --- PUBLIC CONSTANTS -------------------------------------------------------- |
| 98 | + */ |
| 99 | + |
| 100 | +/* |
| 101 | + * ----------------------------------------------------------------------------- |
| 102 | + * --- PUBLIC TYPES ------------------------------------------------------------ |
| 103 | + */ |
| 104 | + |
| 105 | +/* |
| 106 | + * ----------------------------------------------------------------------------- |
| 107 | + * --- PUBLIC FUNCTIONS PROTOTYPES --------------------------------------------- |
| 108 | + */ |
| 109 | + |
| 110 | +#ifdef __cplusplus |
| 111 | +} |
| 112 | +#endif |
| 113 | + |
| 114 | +#endif // COMMON_APP_CONFIGURATION_H |
| 115 | + |
| 116 | +/* --- EOF ------------------------------------------------------------------ */ |
0 commit comments