Biomimetics MBED Library w/ Added Support for CAN3

Dependents:   CAN_TEST SPIne_Plus_DYNO_SENSORS SPIne_Plus_v2 SPIne_Plus_Dyno_v2

Committer:
saloutos
Date:
Thu Nov 26 04:08:56 2020 +0000
Revision:
0:083111ae2a11
first commit of leaned mbed dev lib

Who changed what in which revision?

UserRevisionLine numberNew contents of line
saloutos 0:083111ae2a11 1 /*
saloutos 0:083111ae2a11 2 * Copyright (c) 2015-2016 ARM Limited. All rights reserved.
saloutos 0:083111ae2a11 3 *
saloutos 0:083111ae2a11 4 * SPDX-License-Identifier: Apache-2.0
saloutos 0:083111ae2a11 5 *
saloutos 0:083111ae2a11 6 * Licensed under the Apache License, Version 2.0 (the License); you may
saloutos 0:083111ae2a11 7 * not use this file except in compliance with the License.
saloutos 0:083111ae2a11 8 * You may obtain a copy of the License at
saloutos 0:083111ae2a11 9 *
saloutos 0:083111ae2a11 10 * www.apache.org/licenses/LICENSE-2.0
saloutos 0:083111ae2a11 11 *
saloutos 0:083111ae2a11 12 * Unless required by applicable law or agreed to in writing, software
saloutos 0:083111ae2a11 13 * distributed under the License is distributed on an AS IS BASIS, WITHOUT
saloutos 0:083111ae2a11 14 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
saloutos 0:083111ae2a11 15 * See the License for the specific language governing permissions and
saloutos 0:083111ae2a11 16 * limitations under the License.
saloutos 0:083111ae2a11 17 *
saloutos 0:083111ae2a11 18 * ----------------------------------------------------------------------------
saloutos 0:083111ae2a11 19 *
saloutos 0:083111ae2a11 20 * $Date: 21. September 2016
saloutos 0:083111ae2a11 21 * $Revision: V1.0
saloutos 0:083111ae2a11 22 *
saloutos 0:083111ae2a11 23 * Project: TrustZone for ARMv8-M
saloutos 0:083111ae2a11 24 * Title: Context Management for ARMv8-M TrustZone
saloutos 0:083111ae2a11 25 *
saloutos 0:083111ae2a11 26 * Version 1.0
saloutos 0:083111ae2a11 27 * Initial Release
saloutos 0:083111ae2a11 28 *---------------------------------------------------------------------------*/
saloutos 0:083111ae2a11 29
saloutos 0:083111ae2a11 30 #ifndef TZ_CONTEXT_H
saloutos 0:083111ae2a11 31 #define TZ_CONTEXT_H
saloutos 0:083111ae2a11 32
saloutos 0:083111ae2a11 33 #include <stdint.h>
saloutos 0:083111ae2a11 34
saloutos 0:083111ae2a11 35 #ifndef TZ_MODULEID_T
saloutos 0:083111ae2a11 36 #define TZ_MODULEID_T
saloutos 0:083111ae2a11 37 /// \details Data type that identifies secure software modules called by a process.
saloutos 0:083111ae2a11 38 typedef uint32_t TZ_ModuleId_t;
saloutos 0:083111ae2a11 39 #endif
saloutos 0:083111ae2a11 40
saloutos 0:083111ae2a11 41 /// \details TZ Memory ID identifies an allocated memory slot.
saloutos 0:083111ae2a11 42 typedef uint32_t TZ_MemoryId_t;
saloutos 0:083111ae2a11 43
saloutos 0:083111ae2a11 44 /// Initialize secure context memory system
saloutos 0:083111ae2a11 45 /// \return execution status (1: success, 0: error)
saloutos 0:083111ae2a11 46 uint32_t TZ_InitContextSystem_S (void);
saloutos 0:083111ae2a11 47
saloutos 0:083111ae2a11 48 /// Allocate context memory for calling secure software modules in TrustZone
saloutos 0:083111ae2a11 49 /// \param[in] module identifies software modules called from non-secure mode
saloutos 0:083111ae2a11 50 /// \return value != 0 id TrustZone memory slot identifier
saloutos 0:083111ae2a11 51 /// \return value 0 no memory available or internal error
saloutos 0:083111ae2a11 52 TZ_MemoryId_t TZ_AllocModuleContext_S (TZ_ModuleId_t module);
saloutos 0:083111ae2a11 53
saloutos 0:083111ae2a11 54 /// Free context memory that was previously allocated with \ref TZ_AllocModuleContext_S
saloutos 0:083111ae2a11 55 /// \param[in] id TrustZone memory slot identifier
saloutos 0:083111ae2a11 56 /// \return execution status (1: success, 0: error)
saloutos 0:083111ae2a11 57 uint32_t TZ_FreeModuleContext_S (TZ_MemoryId_t id);
saloutos 0:083111ae2a11 58
saloutos 0:083111ae2a11 59 /// Load secure context (called on RTOS thread context switch)
saloutos 0:083111ae2a11 60 /// \param[in] id TrustZone memory slot identifier
saloutos 0:083111ae2a11 61 /// \return execution status (1: success, 0: error)
saloutos 0:083111ae2a11 62 uint32_t TZ_LoadContext_S (TZ_MemoryId_t id);
saloutos 0:083111ae2a11 63
saloutos 0:083111ae2a11 64 /// Store secure context (called on RTOS thread context switch)
saloutos 0:083111ae2a11 65 /// \param[in] id TrustZone memory slot identifier
saloutos 0:083111ae2a11 66 /// \return execution status (1: success, 0: error)
saloutos 0:083111ae2a11 67 uint32_t TZ_StoreContext_S (TZ_MemoryId_t id);
saloutos 0:083111ae2a11 68
saloutos 0:083111ae2a11 69 #endif // TZ_CONTEXT_H