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) 2015 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_LPTICKER_API_H
yihui 5:9b240c1d5251 17 #define MBED_LPTICKER_API_H
yihui 5:9b240c1d5251 18
yihui 5:9b240c1d5251 19 #include "device.h"
yihui 5:9b240c1d5251 20
yihui 5:9b240c1d5251 21 #if DEVICE_LOWPOWERTIMER
yihui 5:9b240c1d5251 22
yihui 5:9b240c1d5251 23 #include "ticker_api.h"
yihui 5:9b240c1d5251 24
yihui 5:9b240c1d5251 25 #ifdef __cplusplus
yihui 5:9b240c1d5251 26 extern "C" {
yihui 5:9b240c1d5251 27 #endif
yihui 5:9b240c1d5251 28
yihui 5:9b240c1d5251 29 /**
yihui 5:9b240c1d5251 30 * \defgroup LpTicker Low Power Ticker Functions
yihui 5:9b240c1d5251 31 * @{
yihui 5:9b240c1d5251 32 */
yihui 5:9b240c1d5251 33
yihui 5:9b240c1d5251 34 /** Get low power ticker's data
yihui 5:9b240c1d5251 35 *
yihui 5:9b240c1d5251 36 * @return The low power ticker data
yihui 5:9b240c1d5251 37 */
yihui 5:9b240c1d5251 38 const ticker_data_t* get_lp_ticker_data(void);
yihui 5:9b240c1d5251 39
yihui 5:9b240c1d5251 40 /** The wrapper for ticker_irq_handler, to pass lp ticker's data
yihui 5:9b240c1d5251 41 *
yihui 5:9b240c1d5251 42 */
yihui 5:9b240c1d5251 43 void lp_ticker_irq_handler(void);
yihui 5:9b240c1d5251 44
yihui 5:9b240c1d5251 45 /* HAL lp ticker */
yihui 5:9b240c1d5251 46
yihui 5:9b240c1d5251 47 /** Initialize the low power ticker
yihui 5:9b240c1d5251 48 *
yihui 5:9b240c1d5251 49 */
yihui 5:9b240c1d5251 50 void lp_ticker_init(void);
yihui 5:9b240c1d5251 51
yihui 5:9b240c1d5251 52 /** Read the current counter
yihui 5:9b240c1d5251 53 *
yihui 5:9b240c1d5251 54 * @return The current timer's counter value in microseconds
yihui 5:9b240c1d5251 55 */
yihui 5:9b240c1d5251 56 uint32_t lp_ticker_read(void);
yihui 5:9b240c1d5251 57
yihui 5:9b240c1d5251 58 /** Set interrupt for specified timestamp
yihui 5:9b240c1d5251 59 *
yihui 5:9b240c1d5251 60 * @param timestamp The time in microseconds to be set
yihui 5:9b240c1d5251 61 */
yihui 5:9b240c1d5251 62 void lp_ticker_set_interrupt(timestamp_t timestamp);
yihui 5:9b240c1d5251 63
yihui 5:9b240c1d5251 64 /** Disable low power ticker interrupt
yihui 5:9b240c1d5251 65 *
yihui 5:9b240c1d5251 66 */
yihui 5:9b240c1d5251 67 void lp_ticker_disable_interrupt(void);
yihui 5:9b240c1d5251 68
yihui 5:9b240c1d5251 69 /** Clear the low power ticker interrupt
yihui 5:9b240c1d5251 70 *
yihui 5:9b240c1d5251 71 */
yihui 5:9b240c1d5251 72 void lp_ticker_clear_interrupt(void);
yihui 5:9b240c1d5251 73
yihui 5:9b240c1d5251 74 /**@}*/
yihui 5:9b240c1d5251 75
yihui 5:9b240c1d5251 76 #ifdef __cplusplus
yihui 5:9b240c1d5251 77 }
yihui 5:9b240c1d5251 78 #endif
yihui 5:9b240c1d5251 79
yihui 5:9b240c1d5251 80 #endif
yihui 5:9b240c1d5251 81
yihui 5:9b240c1d5251 82 #endif