leo hendrickson
/
S
simple-mbed-cloud-client/TESTS/COMMON/common_defines_test.h@0:25fa8795676b, 2021-04-18 (annotated)
- Committer:
- leothedragon
- Date:
- Sun Apr 18 15:20:23 2021 +0000
- Revision:
- 0:25fa8795676b
DS
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
leothedragon | 0:25fa8795676b | 1 | /* |
leothedragon | 0:25fa8795676b | 2 | * mbed Microcontroller Library |
leothedragon | 0:25fa8795676b | 3 | * Copyright (c) 2006-2018 ARM Limited |
leothedragon | 0:25fa8795676b | 4 | * |
leothedragon | 0:25fa8795676b | 5 | * SPDX-License-Identifier: Apache-2.0 |
leothedragon | 0:25fa8795676b | 6 | * |
leothedragon | 0:25fa8795676b | 7 | * Licensed under the Apache License, Version 2.0 (the "License"); |
leothedragon | 0:25fa8795676b | 8 | * you may not use this file except in compliance with the License. |
leothedragon | 0:25fa8795676b | 9 | * You may obtain a copy of the License at |
leothedragon | 0:25fa8795676b | 10 | * |
leothedragon | 0:25fa8795676b | 11 | * http://www.apache.org/licenses/LICENSE-2.0 |
leothedragon | 0:25fa8795676b | 12 | * |
leothedragon | 0:25fa8795676b | 13 | * Unless required by applicable law or agreed to in writing, software |
leothedragon | 0:25fa8795676b | 14 | * distributed under the License is distributed on an "AS IS" BASIS, |
leothedragon | 0:25fa8795676b | 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
leothedragon | 0:25fa8795676b | 16 | * See the License for the specific language governing permissions and |
leothedragon | 0:25fa8795676b | 17 | * limitations under the License. |
leothedragon | 0:25fa8795676b | 18 | */ |
leothedragon | 0:25fa8795676b | 19 | |
leothedragon | 0:25fa8795676b | 20 | #define ETHERNET 1 |
leothedragon | 0:25fa8795676b | 21 | #define WIFI 2 |
leothedragon | 0:25fa8795676b | 22 | #define MESH 3 |
leothedragon | 0:25fa8795676b | 23 | #define CELLULAR 4 |
leothedragon | 0:25fa8795676b | 24 | |
leothedragon | 0:25fa8795676b | 25 | #if !defined(MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE) |
leothedragon | 0:25fa8795676b | 26 | #error [NOT_SUPPORTED] No network interface found on this target. |
leothedragon | 0:25fa8795676b | 27 | #endif |
leothedragon | 0:25fa8795676b | 28 | |
leothedragon | 0:25fa8795676b | 29 | #if MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == ETHERNET |
leothedragon | 0:25fa8795676b | 30 | #define TEST_NETWORK_TYPE "Ethernet" |
leothedragon | 0:25fa8795676b | 31 | #elif MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == WIFI |
leothedragon | 0:25fa8795676b | 32 | #define TEST_NETWORK_TYPE "WiFi" |
leothedragon | 0:25fa8795676b | 33 | #elif MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == MESH |
leothedragon | 0:25fa8795676b | 34 | #define TEST_NETWORK_TYPE "Mesh" |
leothedragon | 0:25fa8795676b | 35 | #elif MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == CELLULAR |
leothedragon | 0:25fa8795676b | 36 | #define TEST_NETWORK_TYPE "Cellular" |
leothedragon | 0:25fa8795676b | 37 | #else |
leothedragon | 0:25fa8795676b | 38 | #error [NOT_SUPPORTED] Either WiFi, Ethernet or Cellular network interface need to be enabled |
leothedragon | 0:25fa8795676b | 39 | #endif |
leothedragon | 0:25fa8795676b | 40 | |
leothedragon | 0:25fa8795676b | 41 | #define FS_FAT 1 |
leothedragon | 0:25fa8795676b | 42 | #define FS_LFS 2 |
leothedragon | 0:25fa8795676b | 43 | |
leothedragon | 0:25fa8795676b | 44 | #if COMPONENT_SPIF |
leothedragon | 0:25fa8795676b | 45 | #define TEST_BLOCK_DEVICE_TYPE "SPIF" |
leothedragon | 0:25fa8795676b | 46 | #elif COMPONENT_QSPIF |
leothedragon | 0:25fa8795676b | 47 | #define TEST_BLOCK_DEVICE_TYPE "QSPIF" |
leothedragon | 0:25fa8795676b | 48 | #elif COMPONENT_DATAFLASH |
leothedragon | 0:25fa8795676b | 49 | #define TEST_BLOCK_DEVICE_TYPE "DATAFLASH" |
leothedragon | 0:25fa8795676b | 50 | #elif COMPONENT_SD |
leothedragon | 0:25fa8795676b | 51 | #define TEST_BLOCK_DEVICE_TYPE "SD" |
leothedragon | 0:25fa8795676b | 52 | #define TEST_USE_FILESYSTEM FS_FAT |
leothedragon | 0:25fa8795676b | 53 | #elif COMPONENT_FLASHIAP |
leothedragon | 0:25fa8795676b | 54 | #define TEST_BLOCK_DEVICE_TYPE "FLASHIAP" |
leothedragon | 0:25fa8795676b | 55 | #elif COMPONENT_SDIO |
leothedragon | 0:25fa8795676b | 56 | #define TEST_BLOCK_DEVICE_TYPE "SDIO" |
leothedragon | 0:25fa8795676b | 57 | #elif COMPONENT_NUSD |
leothedragon | 0:25fa8795676b | 58 | #define TEST_BLOCK_DEVICE_TYPE "NUSD" |
leothedragon | 0:25fa8795676b | 59 | #define TEST_USE_FILESYSTEM FS_FAT |
leothedragon | 0:25fa8795676b | 60 | #else |
leothedragon | 0:25fa8795676b | 61 | #define TEST_BLOCK_DEVICE_TYPE "UNKNOWN" |
leothedragon | 0:25fa8795676b | 62 | #endif |
leothedragon | 0:25fa8795676b | 63 | |
leothedragon | 0:25fa8795676b | 64 | #if !defined(TEST_USE_FILESYSTEM) |
leothedragon | 0:25fa8795676b | 65 | #define TEST_USE_FILESYSTEM FS_LFS |
leothedragon | 0:25fa8795676b | 66 | #endif |
leothedragon | 0:25fa8795676b | 67 | |
leothedragon | 0:25fa8795676b | 68 | #if TEST_USE_FILESYSTEM == FS_FAT |
leothedragon | 0:25fa8795676b | 69 | #define TEST_FILESYSTEM_TYPE "FAT" |
leothedragon | 0:25fa8795676b | 70 | #elif TEST_USE_FILESYSTEM == FS_LFS |
leothedragon | 0:25fa8795676b | 71 | #define TEST_FILESYSTEM_TYPE "LFS" |
leothedragon | 0:25fa8795676b | 72 | #else |
leothedragon | 0:25fa8795676b | 73 | #define TEST_FILESYSTEM_TYPE "UNKNOWN" |
leothedragon | 0:25fa8795676b | 74 | #endif |
leothedragon | 0:25fa8795676b | 75 | |
leothedragon | 0:25fa8795676b | 76 | #define TEST_MEMORY_SIZE_10K 10240 |
leothedragon | 0:25fa8795676b | 77 | #define TEST_MEMORY_SIZE_20K 20480 |
leothedragon | 0:25fa8795676b | 78 | #define TEST_MEMORY_SIZE_40K 40960 |
leothedragon | 0:25fa8795676b | 79 | #define TEST_MEMORY_SIZE_60K 61440 |
leothedragon | 0:25fa8795676b | 80 | #define TEST_MEMORY_SIZE_80K 81920 |
leothedragon | 0:25fa8795676b | 81 | #define TEST_MEMORY_SIZE_100K 102400 |