Kenji Arai / mbed-os_TYBLE16

Dependents:   TYBLE16_simple_data_logger TYBLE16_MP3_Air

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers utest_shim.h Source File

utest_shim.h

00001 
00002 /** \addtogroup frameworks */
00003 /** @{*/
00004 /****************************************************************************
00005  * Copyright (c) 2016, ARM Limited, All Rights Reserved
00006  * SPDX-License-Identifier: Apache-2.0
00007  *
00008  * Licensed under the Apache License, Version 2.0 (the "License"); you may
00009  * not use this file except in compliance with the License.
00010  * You may obtain a copy of the License at
00011  *
00012  * http://www.apache.org/licenses/LICENSE-2.0
00013  *
00014  * Unless required by applicable law or agreed to in writing, software
00015  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
00016  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00017  * See the License for the specific language governing permissions and
00018  * limitations under the License.
00019  ****************************************************************************
00020  */
00021 
00022 #ifndef UTEST_SHIM_H
00023 #define UTEST_SHIM_H
00024 
00025 #include <stdint.h>
00026 #include <stdbool.h>
00027 #include <stdio.h>
00028 #include "utest/utest_scheduler.h"
00029 
00030 #ifndef __deprecated_message
00031 #   if defined(__CC_ARM)
00032 #       define __deprecated_message(msg) __attribute__((deprecated))
00033 #   elif defined (__ICCARM__)
00034 #       define __deprecated_message(msg)
00035 #   else
00036 #       define __deprecated_message(msg) __attribute__((deprecated(msg)))
00037 #   endif
00038 #endif
00039 
00040 #ifndef UTEST_ENTER_CRITICAL_SECTION
00041 #   define UTEST_ENTER_CRITICAL_SECTION utest_v1_enter_critical_section()
00042 #endif
00043 #ifndef UTEST_LEAVE_CRITICAL_SECTION
00044 #   define UTEST_LEAVE_CRITICAL_SECTION utest_v1_leave_critical_section()
00045 #endif
00046 
00047 #ifdef __cplusplus
00048 extern "C" {
00049 #endif
00050 
00051 /// must be implemented by the port
00052 void utest_v1_enter_critical_section(void);
00053 void utest_v1_leave_critical_section(void);
00054 
00055 /// This is the default scheduler implementation used by the harness.
00056 utest_v1_scheduler_t utest_v1_get_scheduler(void);
00057 
00058 #ifdef __cplusplus
00059 }
00060 #endif
00061 
00062 #endif // UTEST_SHIM_H
00063 
00064 /** @}*/