Mistake on this page?
Report an issue in GitHub or email us
common_defines_net_test.h
1 /*
2  * mbed Microcontroller Library
3  * Copyright (c) 2006-2019 ARM Limited
4  *
5  * SPDX-License-Identifier: Apache-2.0
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19 
20 #define ETHERNET 1
21 #define WIFI 2
22 #define MESH 3
23 #define CELLULAR 4
24 
25 #if !defined(MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE)
26 #error [NOT_SUPPORTED] No network interface found on this target.
27 #endif
28 
29 #if MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == ETHERNET
30 #define TEST_NETWORK_TYPE "Ethernet"
31 #elif MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == WIFI
32 #define TEST_NETWORK_TYPE "WiFi"
33 #elif MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == MESH
34 #define TEST_NETWORK_TYPE "Mesh"
35 #elif MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == CELLULAR
36 #define TEST_NETWORK_TYPE "Cellular"
37 #else
38 #define TEST_NETWORK_TYPE "Unknown"
39 #error [NOT_SUPPORTED] Either WiFi, Ethernet or Cellular network interface need to be enabled
40 #endif
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.