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