Mistake on this page?
Report an issue in GitHub or email us
common_defines_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 #error [NOT_SUPPORTED] Either WiFi, Ethernet or Cellular network interface need to be enabled
39 #endif
40 
41 #define FS_FAT 1
42 #define FS_LFS 2
43 
44 #if COMPONENT_SPIF
45 #define TEST_BLOCK_DEVICE_TYPE "SPIF"
46 #elif COMPONENT_QSPIF
47 #define TEST_BLOCK_DEVICE_TYPE "QSPIF"
48 #elif COMPONENT_DATAFLASH
49 #define TEST_BLOCK_DEVICE_TYPE "DATAFLASH"
50 #elif COMPONENT_SD
51 #define TEST_BLOCK_DEVICE_TYPE "SD"
52 #define TEST_USE_FILESYSTEM FS_FAT
53 #elif COMPONENT_FLASHIAP
54 #define TEST_BLOCK_DEVICE_TYPE "FLASHIAP"
55 #elif COMPONENT_SDIO
56 #define TEST_BLOCK_DEVICE_TYPE "SDIO"
57 #elif COMPONENT_NUSD
58 #define TEST_BLOCK_DEVICE_TYPE "NUSD"
59 #define TEST_USE_FILESYSTEM FS_FAT
60 #else
61 #define TEST_BLOCK_DEVICE_TYPE "UNKNOWN"
62 #endif
63 
64 #if !defined(TEST_USE_FILESYSTEM)
65 #define TEST_USE_FILESYSTEM FS_LFS
66 #endif
67 
68 #if TEST_USE_FILESYSTEM == FS_FAT
69 #define TEST_FILESYSTEM_TYPE "FAT"
70 #elif TEST_USE_FILESYSTEM == FS_LFS
71 #define TEST_FILESYSTEM_TYPE "LFS"
72 #else
73 #define TEST_FILESYSTEM_TYPE "UNKNOWN"
74 #endif
75 
76 #define TEST_MEMORY_SIZE_10K 10240
77 #define TEST_MEMORY_SIZE_20K 20480
78 #define TEST_MEMORY_SIZE_40K 40960
79 #define TEST_MEMORY_SIZE_60K 61440
80 #define TEST_MEMORY_SIZE_80K 81920
81 #define TEST_MEMORY_SIZE_100K 102400
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.