mbed TLS v2.2.0
slpal_common.h
Go to the documentation of this file.
1 /*
2  * Common SLPAL definitions for all platforms.
3  *
4  * Copyright (C) 2016, Silicon Labs, http://www.silabs.com
5  * SPDX-License-Identifier: Apache-2.0
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License"); you may
8  * 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, WITHOUT
15  * 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 #ifndef MBEDTLS_SLPAL_COMMON_H
21 #define MBEDTLS_SLPAL_COMMON_H
22 
23 #include "mbedtls_ecode.h"
24 
25 /*******************************************************************************
26  ******************************* ERROR CODES **********************************
27  ******************************************************************************/
28 
29 #define SLPAL_ERROR_TIMEOUT ((int)MBEDTLS_ERR_SLPAL_BASE | 0x1)
30 #define SLPAL_ERROR_OS_SPECIFIC ((int)MBEDTLS_ERR_SLPAL_BASE | 0x2)
31 
32 /*******************************************************************************
33  ****************************** Defines **********************************
34  ******************************************************************************/
35 
36 /* Determine if executing at interrupt level on ARM Cortex-M. */
37 #define RUNNING_AT_INTERRUPT_LEVEL (SCB->ICSR & SCB_ICSR_VECTACTIVE_Msk)
38 
39 /*******************************************************************************
40  ************************* TYPEDEFS ****************************************
41  ******************************************************************************/
42 
46 typedef uint32_t SLPAL_irqState_t;
47 
48 #endif /* MBEDTLS_SLPAL_COMMON_H */
uint32_t SLPAL_irqState_t
Storage for PRIMASK or BASEPRI value used for SLPAL critical regions.
Definition: slpal_common.h:46
Silicon Labs specific mbedtls error code definitions.