1 /* 2 * Copyright (c) 2018, 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 the platform-specific configuration. 32 */ 33 34 /** 35 * @def OPENTHREAD_SIMULATION_UART_BAUDRATE 36 * 37 * This setting configures the baud rate of the UART. 38 */ 39 #ifndef OPENTHREAD_SIMULATION_UART_BAUDRATE 40 #define OPENTHREAD_SIMULATION_UART_BAUDRATE B115200 41 #endif 42 43 /** 44 * @def OPENTHREAD_SIMULATION_VIRTUAL_TIME 45 * 46 * This setting configures whether to use virtual time (used for simulation) in simulation platform. 47 */ 48 #ifndef OPENTHREAD_SIMULATION_VIRTUAL_TIME 49 #define OPENTHREAD_SIMULATION_VIRTUAL_TIME 0 50 #endif 51 52 /** 53 * @def OPENTHREAD_SIMULATION_VIRTUAL_TIME_UART 54 * 55 * This setting configures whether to use virtual time for UART. 56 */ 57 #ifndef OPENTHREAD_SIMULATION_VIRTUAL_TIME_UART 58 #define OPENTHREAD_SIMULATION_VIRTUAL_TIME_UART 0 59 #endif 60 61 /** 62 * @def OPENTHREAD_PLATFORM_USE_PSEUDO_RESET 63 * 64 * Define as 1 to enable pseudo-reset. 65 */ 66 #ifndef OPENTHREAD_PLATFORM_USE_PSEUDO_RESET 67 #define OPENTHREAD_PLATFORM_USE_PSEUDO_RESET 0 68 #endif 69 70 /** 71 * @def OPENTHREAD_CONFIG_NCP_SPI_ENABLE 72 * 73 * Define as 1 to enable SPI NCP interface. 74 */ 75 #ifndef OPENTHREAD_CONFIG_NCP_SPI_ENABLE 76 #define OPENTHREAD_CONFIG_NCP_SPI_ENABLE 0 77 #endif 78 79 /** 80 * Check OTNS configurations 81 */ 82 #if OPENTHREAD_CONFIG_OTNS_ENABLE 83 84 #if !OPENTHREAD_SIMULATION_VIRTUAL_TIME 85 #error "OTNS requires virtual time simulations" 86 #endif 87 88 #endif // OPENTHREAD_CONFIG_OTNS_ENABLE 89 90 /** 91 * @def OPENTHREAD_SIMULATION_MAX_NETWORK_SIZE 92 * 93 * This setting configures the maximum network size in simulation. 94 */ 95 #ifndef OPENTHREAD_SIMULATION_MAX_NETWORK_SIZE 96 #define OPENTHREAD_SIMULATION_MAX_NETWORK_SIZE 33 97 #endif 98 99 /** 100 * @def OPENTHREAD_SIMULATION_MDNS_SOCKET_IMPLEMENT_POSIX 101 * 102 * Define as 1 for the simulation platform to provide a simplified implementation of `otPlatMdns` APIs using posix 103 * socket. 104 * 105 * This is intended for testing of the OpenThread Multicast DNS (mDNS) module. 106 */ 107 #ifndef OPENTHREAD_SIMULATION_MDNS_SOCKET_IMPLEMENT_POSIX 108 #define OPENTHREAD_SIMULATION_MDNS_SOCKET_IMPLEMENT_POSIX 0 109 #endif 110 111 /** 112 * @def OPENTHREAD_SIMULATION_IMPLMENT_INFRA_IF 113 * 114 * Define as 1 for the simulation platform to provide implementation of `otPlatInfra` APIs. 115 */ 116 #ifndef OPENTHREAD_SIMULATION_IMPLEMENT_INFRA_IF 117 #define OPENTHREAD_SIMULATION_IMPLEMENT_INFRA_IF 1 118 #endif 119 120 /** 121 * @def OPENTHREAD_SIMULATION_IMPLEMENT_DNSSD 122 * 123 * Define as 1 for the simulation platform to provide implementation of `otPlatDnssd` APIs. 124 */ 125 #ifndef OPENTHREAD_SIMULATION_IMPLEMENT_DNSSD 126 #define OPENTHREAD_SIMULATION_IMPLEMENT_DNSSD 1 127 #endif 128