1 /* 2 * Copyright (c) 2024, The OpenThread Authors. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. 9 * 2. Redistributions in binary form must reproduce the above copyright 10 * notice, this list of conditions and the following disclaimer in the 11 * documentation and/or other materials provided with the distribution. 12 * 3. Neither the name of the copyright holder nor the 13 * names of its contributors may be used to endorse or promote products 14 * derived from this software without specific prior written permission. 15 * 16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 20 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 * POSSIBILITY OF SUCH DAMAGE. 27 */ 28 29 /** 30 * @file 31 * This file includes compile-time configurations for the Wake-up Coordinator and Wake-up End Device roles. 32 */ 33 34 #ifndef CONFIG_WAKEUP_H_ 35 #define CONFIG_WAKEUP_H_ 36 37 /** 38 * @addtogroup config-wakeup 39 * 40 * @brief 41 * This module includes configuration variables for the Wake-up Coordinator and Wake-up End Device roles. 42 * 43 * @{ 44 */ 45 46 /** 47 * @def OPENTHREAD_CONFIG_WAKEUP_COORDINATOR_ENABLE 48 * 49 * Define to 1 to enable the Wake-up Coordinator role that is capable of establishing 50 * a link with one or more Wake-up End Devices by sending a sequence of wake-up frames. 51 */ 52 #ifndef OPENTHREAD_CONFIG_WAKEUP_COORDINATOR_ENABLE 53 #define OPENTHREAD_CONFIG_WAKEUP_COORDINATOR_ENABLE 0 54 #endif 55 56 /** 57 * @def OPENTHREAD_CONFIG_WAKEUP_COORDINATOR_CONNECTION_RETRY_INTERVAL 58 * 59 * The Connection Retry Interval is included in the Connection IE of each wake-up frame sent by the Wake-up Coordinator 60 * to a Wake-up End Device. 61 * 62 * This value defines how frequently the Wake-up End Device should retry sending the initial MLE message to the Wake-up 63 * Parent after receiving a wake-up frame, in the units of Wake-up Intervals (7.5ms by default). 64 */ 65 #ifndef OPENTHREAD_CONFIG_WAKEUP_COORDINATOR_CONNECTION_RETRY_INTERVAL 66 #define OPENTHREAD_CONFIG_WAKEUP_COORDINATOR_CONNECTION_RETRY_INTERVAL 1 67 #endif 68 69 /** 70 * @def OPENTHREAD_CONFIG_WAKEUP_COORDINATOR_CONNECTION_RETRY_COUNT 71 * 72 * The Connection Retry Count is included in the Connection IE of each wake-up frame sent by the Wake-up Coordinator to 73 * a Wake-up End Device. 74 * 75 * This value defines how many times the Wake-up End Device should retry sending the initial MLE message to the Wake-up 76 * Parent after receiving a wake-up frame. 77 */ 78 #ifndef OPENTHREAD_CONFIG_WAKEUP_COORDINATOR_CONNECTION_RETRY_COUNT 79 #define OPENTHREAD_CONFIG_WAKEUP_COORDINATOR_CONNECTION_RETRY_COUNT 12 80 #endif 81 82 /** 83 * @def OPENTHREAD_CONFIG_WAKEUP_END_DEVICE_ENABLE 84 * 85 * Define to 1 to enable the Wake-up End Device role that periodically listens for wake-up 86 * frames to establish a link with a Wake-up Coordinator device. 87 */ 88 #ifndef OPENTHREAD_CONFIG_WAKEUP_END_DEVICE_ENABLE 89 #define OPENTHREAD_CONFIG_WAKEUP_END_DEVICE_ENABLE 0 90 #endif 91 92 /** 93 * @def OPENTHREAD_CONFIG_WED_LISTEN_INTERVAL 94 * 95 * The default wake-up listen interval in microseconds. 96 */ 97 #ifndef OPENTHREAD_CONFIG_WED_LISTEN_INTERVAL 98 #define OPENTHREAD_CONFIG_WED_LISTEN_INTERVAL 1000000 99 #endif 100 101 /** 102 * @def OPENTHREAD_CONFIG_WED_LISTEN_DURATION 103 * 104 * The default wake-up listen duration in microseconds. 105 */ 106 #ifndef OPENTHREAD_CONFIG_WED_LISTEN_DURATION 107 #define OPENTHREAD_CONFIG_WED_LISTEN_DURATION 8000 108 #endif 109 110 /** 111 * @def OPENTHREAD_CONFIG_WED_RECEIVE_TIME_AFTER 112 * 113 * Margin to be applied after the end of a wake-up listen duration to schedule the next listen interval, in units of 114 * microseconds. 115 */ 116 #ifndef OPENTHREAD_CONFIG_WED_RECEIVE_TIME_AFTER 117 #define OPENTHREAD_CONFIG_WED_RECEIVE_TIME_AFTER 500 118 #endif 119 120 /** 121 * @} 122 */ 123 124 #endif // CONFIG_WAKEUP_H_ 125