Kenji Arai / mbed-os_TYBLE16

Dependents:   TYBLE16_simple_data_logger TYBLE16_MP3_Air

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Deprecated.h Source File

Deprecated.h

00001 /* mbed Microcontroller Library
00002  * Copyright (c) 2018 ARM Limited
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 #ifndef BLE_PAL_DEPRECATED_H
00017 #define BLE_PAL_DEPRECATED_H
00018 
00019 /**
00020  * Declare the beginning of a code block that uses a deprecated API
00021  */
00022 #if defined(__GNUC__) && !defined(__CC_ARM)
00023 #define BLE_DEPRECATED_API_USE_BEGIN() \
00024     _Pragma("GCC diagnostic push") \
00025     _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
00026 #elif defined(__CC_ARM)
00027 #define BLE_DEPRECATED_API_USE_BEGIN() \
00028     _Pragma("push") \
00029     _Pragma("diag_suppress 1361")
00030 #else
00031 #define BLE_DEPRECATED_API_USE_BEGIN()
00032 #endif
00033 
00034 /**
00035  * Declare the end of a code block that uses a deprecated API
00036  */
00037 #if defined(__GNUC__) && !defined(__CC_ARM)
00038 #define BLE_DEPRECATED_API_USE_END() \
00039     _Pragma("GCC diagnostic pop")
00040 #elif defined(__CC_ARM)
00041 #define BLE_DEPRECATED_API_USE_END() \
00042         _Pragma("pop")
00043 #else
00044 #define BLE_DEPRECATED_API_USE_END()
00045 #endif
00046 
00047 
00048 #endif //BLE_PAL_DEPRECATED_H