Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
platform_alt.h
00001 /* 00002 * platform_alt.h 00003 * 00004 * Copyright (C) 2018, Arm Limited, All Rights Reserved 00005 * SPDX-License-Identifier: Apache-2.0 00006 * 00007 * Licensed under the Apache License, Version 2.0 (the "License"); you may 00008 * not use this file except in compliance with the License. 00009 * You may obtain a copy of the License at 00010 * 00011 * http://www.apache.org/licenses/LICENSE-2.0 00012 * 00013 * Unless required by applicable law or agreed to in writing, software 00014 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 00015 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00016 * See the License for the specific language governing permissions and 00017 * limitations under the License. 00018 * 00019 */ 00020 00021 #ifndef __PLATFORM_ALT__ 00022 #define __PLATFORM_ALT__ 00023 #include "cc_platform.h" 00024 #include "crys_rnd.h" 00025 00026 /** 00027 * \brief The platform context structure. 00028 * 00029 * \note This structure may be used to assist platform-specific 00030 * setup or teardown operations. 00031 */ 00032 typedef struct { 00033 cc_platform_ctx platform_impl_ctx; /** A context holding all the partner's platform specific context */ 00034 /* 00035 * Add CRYS_RND_State_t rndState; when https://github.com/ARMmbed/mbedtls/issues/1200 is supported 00036 * */ 00037 } 00038 mbedtls_platform_context; 00039 00040 00041 /** 00042 * \brief This function performs any partner platform initialization operations, 00043 * needed top enable CryptoCell. 00044 * 00045 * \param ctx The platform specific context. 00046 * 00047 * \return \c 0 on success. 00048 * 00049 * \note This function is intended to allow platform-specific initialization for CryptoCell, 00050 * and is called before initializing the CC library(SaSi_LibInit). Its 00051 * implementation is platform-specific, and its implementation MUST be provided. 00052 * 00053 */ 00054 int cc_platform_setup( cc_platform_ctx *ctx ); 00055 00056 /** 00057 * \brief This function performs any partner platform teardown operations, to disable CryptoCell. 00058 * 00059 * \param ctx The platform specific context. 00060 * 00061 * \note This function is called after terminating CC library(SaSi_LibFini) 00062 * and intended to free any resource used for CryptoCell by the platform. 00063 * Its implementation is platform-specific,and its implementation MUST be provided. 00064 * 00065 */ 00066 void cc_platform_terminate( cc_platform_ctx *ctx ); 00067 00068 #endif /* __PLATFORM_ALT__ */ 00069
Generated on Tue Jul 12 2022 12:45:41 by
1.7.2