ON Semiconductor / mbed-os

Dependents:   mbed-TFT-example-NCS36510 mbed-Accelerometer-example-NCS36510 mbed-Accelerometer-example-NCS36510

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers eventloop_config.h Source File

eventloop_config.h

00001 /*
00002  * Copyright (c) 2014-2015 ARM Limited. All rights reserved.
00003  * SPDX-License-Identifier: Apache-2.0
00004  * Licensed under the Apache License, Version 2.0 (the License); you may
00005  * 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, WITHOUT
00012  * 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 EVENTLOOP_CONFIG_H_
00017 #define EVENTLOOP_CONFIG_H_
00018 
00019 /*
00020  * Undefine all internal flags before evaluating the configuration
00021  */
00022 #undef NS_EVENTLOOP_USE_TICK_TIMER
00023 #undef NS_EXCLUDE_HIGHRES_TIMER
00024 
00025 /*
00026  * mbedOS 5 specific configuration flag mapping to internal flags
00027  */
00028 #ifdef MBED_CONF_NANOSTACK_EVENTLOOP_USE_PLATFORM_TICK_TIMER
00029 #define NS_EVENTLOOP_USE_TICK_TIMER     1
00030 #endif
00031 
00032 #ifdef MBED_CONF_NANOSTACK_EVENTLOOP_EXCLUDE_HIGHRES_TIMER
00033 #define NS_EXCLUDE_HIGHRES_TIMER        1
00034 #endif
00035 
00036 /*
00037  * For mbedOS 3 and minar use platform tick timer by default, highres timers should come from eventloop adaptor
00038  */
00039 #ifdef YOTTA_CFG_MINAR
00040 #define NS_EVENTLOOP_USE_TICK_TIMER     1
00041 #endif
00042 
00043 /*
00044  * Include the user config file if defined
00045  */
00046 #ifdef NS_EVENTLOOP_USER_CONFIG_FILE
00047 #include NS_EVENTLOOP_USER_CONFIG_FILE
00048 #endif
00049 
00050 #endif /* EVENTLOOP_CONFIG_H_ */