Kenji Arai / mbed-os_TYBLE16

Dependents:   TYBLE16_simple_data_logger TYBLE16_MP3_Air

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers platform_mbed.h Source File

platform_mbed.h

00001 /**
00002  *  Copyright (C) 2006-2016, ARM Limited, All Rights Reserved
00003  *  SPDX-License-Identifier: Apache-2.0
00004  *
00005  *  Licensed under the Apache License, Version 2.0 (the "License"); you may
00006  *  not use this file except in compliance with the License.
00007  *  You may obtain a copy of the License at
00008  *
00009  *  http://www.apache.org/licenses/LICENSE-2.0
00010  *
00011  *  Unless required by applicable law or agreed to in writing, software
00012  *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
00013  *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  *  See the License for the specific language governing permissions and
00015  *  limitations under the License.
00016  *
00017  *  This file is part of mbed TLS (https://tls.mbed.org)
00018  */
00019 
00020 
00021 #ifndef __PLATFORM_MBED__H__
00022 #define __PLATFORM_MBED__H__
00023 
00024 #if (defined(TARGET_PSA) && defined(MBEDTLS_ENTROPY_NV_SEED))
00025 
00026 #include "default_random_seed.h"
00027 
00028 #if !defined(MBEDTLS_PLATFORM_NV_SEED_READ_MACRO)
00029 #define MBEDTLS_PLATFORM_NV_SEED_READ_MACRO mbed_default_seed_read
00030 #endif
00031 
00032 #if !defined(MBEDTLS_PLATFORM_NV_SEED_WRITE_MACRO)
00033 #define MBEDTLS_PLATFORM_NV_SEED_WRITE_MACRO mbed_default_seed_write
00034 #endif
00035 
00036 /* Automatically enable the Mbed Crypto entropy injection API if
00037  * MBEDTLS_ENTROPY_NV_SEED is enabled. */
00038 #define MBEDTLS_PSA_INJECT_ENTROPY
00039 
00040 #endif  // (defined(TARGET_PSA) && defined(MBEDTLS_ENTROPY_NV_SEED))
00041 
00042 #if DEVICE_TRNG
00043 #define MBEDTLS_ENTROPY_HARDWARE_ALT
00044 #endif
00045 
00046 #if defined(MBEDTLS_CONFIG_HW_SUPPORT)
00047 #include "mbedtls_device.h"
00048 #endif
00049 
00050 #if defined(TARGET_PSA)
00051 /* The following configurations are a needed for Mbed Crypto submodule.
00052  * They are related to the persistent key storage feature.
00053  */
00054 #define MBEDTLS_PSA_CRYPTO_STORAGE_C
00055 #define MBEDTLS_PSA_CRYPTO_STORAGE_ITS_C
00056 #undef MBEDTLS_PSA_CRYPTO_STORAGE_FILE_C
00057 #endif
00058 
00059 /*
00060  * MBEDTLS_ERR_PLATFORM_HW_FAILED is deprecated and should not be used.
00061  */
00062 #define MBEDTLS_ERR_PLATFORM_HW_FAILED       -0x0080
00063 
00064 #define MBEDTLS_ERR_PLATFORM_HW_ACCEL_FAILED -0x0070
00065 
00066 #endif  // __PLATFORM_MBED__H__