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_SLEEP_API_H
yihui 5:9b240c1d5251 17 #define MBED_SLEEP_API_H
yihui 5:9b240c1d5251 18
yihui 5:9b240c1d5251 19 #include "device.h"
yihui 5:9b240c1d5251 20
yihui 5:9b240c1d5251 21 #if DEVICE_SLEEP
yihui 5:9b240c1d5251 22
yihui 5:9b240c1d5251 23 #ifdef __cplusplus
yihui 5:9b240c1d5251 24 extern "C" {
yihui 5:9b240c1d5251 25 #endif
yihui 5:9b240c1d5251 26
yihui 5:9b240c1d5251 27 /** Send the microcontroller to sleep
yihui 5:9b240c1d5251 28 *
yihui 5:9b240c1d5251 29 * The processor is setup ready for sleep, and sent to sleep using __WFI(). In this mode, the
yihui 5:9b240c1d5251 30 * system clock to the core is stopped until a reset or an interrupt occurs. This eliminates
yihui 5:9b240c1d5251 31 * dynamic power used by the processor, memory systems and buses. The processor, peripheral and
yihui 5:9b240c1d5251 32 * memory state are maintained, and the peripherals continue to work and can generate interrupts.
yihui 5:9b240c1d5251 33 *
yihui 5:9b240c1d5251 34 * The processor can be woken up by any internal peripheral interrupt or external pin interrupt.
yihui 5:9b240c1d5251 35 *
yihui 5:9b240c1d5251 36 * @note
yihui 5:9b240c1d5251 37 * The mbed interface semihosting is disconnected as part of going to sleep, and can not be restored.
yihui 5:9b240c1d5251 38 * Flash re-programming and the USB serial port will remain active, but the mbed program will no longer be
yihui 5:9b240c1d5251 39 * able to access the LocalFileSystem
yihui 5:9b240c1d5251 40 */
yihui 5:9b240c1d5251 41 void sleep(void);
yihui 5:9b240c1d5251 42
yihui 5:9b240c1d5251 43 /** Send the microcontroller to deep sleep
yihui 5:9b240c1d5251 44 *
yihui 5:9b240c1d5251 45 * This processor is setup ready for deep sleep, and sent to sleep using __WFI(). This mode
yihui 5:9b240c1d5251 46 * has the same sleep features as sleep plus it powers down peripherals and clocks. All state
yihui 5:9b240c1d5251 47 * is still maintained.
yihui 5:9b240c1d5251 48 *
yihui 5:9b240c1d5251 49 * The processor can only be woken up by an external interrupt on a pin or a watchdog timer.
yihui 5:9b240c1d5251 50 *
yihui 5:9b240c1d5251 51 * @note
yihui 5:9b240c1d5251 52 * The mbed interface semihosting is disconnected as part of going to sleep, and can not be restored.
yihui 5:9b240c1d5251 53 * Flash re-programming and the USB serial port will remain active, but the mbed program will no longer be
yihui 5:9b240c1d5251 54 * able to access the LocalFileSystem
yihui 5:9b240c1d5251 55 */
yihui 5:9b240c1d5251 56 void deepsleep(void);
yihui 5:9b240c1d5251 57
yihui 5:9b240c1d5251 58 #ifdef __cplusplus
yihui 5:9b240c1d5251 59 }
yihui 5:9b240c1d5251 60 #endif
yihui 5:9b240c1d5251 61
yihui 5:9b240c1d5251 62 #endif
yihui 5:9b240c1d5251 63
yihui 5:9b240c1d5251 64 #endif