Use MPU9250 with nRF51822

Dependencies:   eMPL_MPU

Fork of Seeed_Tiny_BLE_Flash by Darren Huang

Committer:
yihui
Date:
Thu Dec 10 08:00:18 2015 +0000
Revision:
5:9b240c1d5251
get 9dof data from mpu9250

Who changed what in which revision?

UserRevisionLine numberNew contents of line
yihui 5:9b240c1d5251 1 /* mbed Microcontroller Library
yihui 5:9b240c1d5251 2 * Copyright (c) 2006-2013 ARM Limited
yihui 5:9b240c1d5251 3 *
yihui 5:9b240c1d5251 4 * Licensed under the Apache License, Version 2.0 (the "License");
yihui 5:9b240c1d5251 5 * you may not use this file except in compliance with the License.
yihui 5:9b240c1d5251 6 * You may obtain a copy of the License at
yihui 5:9b240c1d5251 7 *
yihui 5:9b240c1d5251 8 * http://www.apache.org/licenses/LICENSE-2.0
yihui 5:9b240c1d5251 9 *
yihui 5:9b240c1d5251 10 * Unless required by applicable law or agreed to in writing, software
yihui 5:9b240c1d5251 11 * distributed under the License is distributed on an "AS IS" BASIS,
yihui 5:9b240c1d5251 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
yihui 5:9b240c1d5251 13 * See the License for the specific language governing permissions and
yihui 5:9b240c1d5251 14 * limitations under the License.
yihui 5:9b240c1d5251 15 */
yihui 5:9b240c1d5251 16 #ifndef MBED_ASSERT_H
yihui 5:9b240c1d5251 17 #define MBED_ASSERT_H
yihui 5:9b240c1d5251 18
yihui 5:9b240c1d5251 19 #ifdef __cplusplus
yihui 5:9b240c1d5251 20 extern "C" {
yihui 5:9b240c1d5251 21 #endif
yihui 5:9b240c1d5251 22
yihui 5:9b240c1d5251 23 /** Internal mbed assert function which is invoked when MBED_ASSERT macro failes.
yihui 5:9b240c1d5251 24 * This function is active only if NDEBUG is not defined prior to including this
yihui 5:9b240c1d5251 25 * assert header file.
yihui 5:9b240c1d5251 26 * In case of MBED_ASSERT failing condition, error() is called with the assertation message.
yihui 5:9b240c1d5251 27 * @param expr Expresion to be checked.
yihui 5:9b240c1d5251 28 * @param file File where assertation failed.
yihui 5:9b240c1d5251 29 * @param line Failing assertation line number.
yihui 5:9b240c1d5251 30 */
yihui 5:9b240c1d5251 31 void mbed_assert_internal(const char *expr, const char *file, int line);
yihui 5:9b240c1d5251 32
yihui 5:9b240c1d5251 33 #ifdef __cplusplus
yihui 5:9b240c1d5251 34 }
yihui 5:9b240c1d5251 35 #endif
yihui 5:9b240c1d5251 36
yihui 5:9b240c1d5251 37 #ifdef NDEBUG
yihui 5:9b240c1d5251 38 #define MBED_ASSERT(expr) ((void)0)
yihui 5:9b240c1d5251 39
yihui 5:9b240c1d5251 40 #else
yihui 5:9b240c1d5251 41 #define MBED_ASSERT(expr) \
yihui 5:9b240c1d5251 42 do { \
yihui 5:9b240c1d5251 43 if (!(expr)) { \
yihui 5:9b240c1d5251 44 mbed_assert_internal(#expr, __FILE__, __LINE__); \
yihui 5:9b240c1d5251 45 } \
yihui 5:9b240c1d5251 46 } while (0)
yihui 5:9b240c1d5251 47 #endif
yihui 5:9b240c1d5251 48
yihui 5:9b240c1d5251 49 #endif