To get started with Seeed Tiny BLE, include detecting motion, button and battery level.

Dependencies:   BLE_API eMPL_MPU6050 mbed nRF51822

Committer:
yihui
Date:
Wed Apr 22 07:47:17 2015 +0000
Revision:
1:fc2f9d636751
update libraries; ; delete nRF51822/nordic-sdk/components/gpiote/app_gpiote.c to solve GPIOTE_IRQHandler multiply defined issue. temperarily change nRF51822 library to folder

Who changed what in which revision?

UserRevisionLine numberNew contents of line
yihui 1:fc2f9d636751 1 /*
yihui 1:fc2f9d636751 2 * Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved.
yihui 1:fc2f9d636751 3 *
yihui 1:fc2f9d636751 4 * The information contained herein is confidential property of Nordic Semiconductor. The use,
yihui 1:fc2f9d636751 5 * copying, transfer or disclosure of such information is prohibited except by express written
yihui 1:fc2f9d636751 6 * agreement with Nordic Semiconductor.
yihui 1:fc2f9d636751 7 *
yihui 1:fc2f9d636751 8 */
yihui 1:fc2f9d636751 9
yihui 1:fc2f9d636751 10 /** @brief Utilities for verifying program logic
yihui 1:fc2f9d636751 11 */
yihui 1:fc2f9d636751 12
yihui 1:fc2f9d636751 13 #ifndef SOFTDEVICE_ASSERT_H_
yihui 1:fc2f9d636751 14 #define SOFTDEVICE_ASSERT_H_
yihui 1:fc2f9d636751 15
yihui 1:fc2f9d636751 16 #include <stdint.h>
yihui 1:fc2f9d636751 17
yihui 1:fc2f9d636751 18 /** @brief This function handles assertions.
yihui 1:fc2f9d636751 19 *
yihui 1:fc2f9d636751 20 *
yihui 1:fc2f9d636751 21 * @note
yihui 1:fc2f9d636751 22 * This function is called when an assertion has triggered.
yihui 1:fc2f9d636751 23 *
yihui 1:fc2f9d636751 24 *
yihui 1:fc2f9d636751 25 * @param line_num The line number where the assertion is called
yihui 1:fc2f9d636751 26 * @param file_name Pointer to the file name
yihui 1:fc2f9d636751 27 */
yihui 1:fc2f9d636751 28 void assert_softdevice_callback(uint16_t line_num, const uint8_t *file_name);
yihui 1:fc2f9d636751 29
yihui 1:fc2f9d636751 30
yihui 1:fc2f9d636751 31 /*lint -emacro(506, ASSERT) */ /* Suppress "Constant value Boolean */
yihui 1:fc2f9d636751 32 /*lint -emacro(774, ASSERT) */ /* Suppress "Boolean within 'if' always evaluates to True" */ \
yihui 1:fc2f9d636751 33 /** @brief Check intended for production code
yihui 1:fc2f9d636751 34 *
yihui 1:fc2f9d636751 35 * Check passes if "expr" evaluates to true. */
yihui 1:fc2f9d636751 36 #define ASSERT(expr) \
yihui 1:fc2f9d636751 37 if (expr) \
yihui 1:fc2f9d636751 38 { \
yihui 1:fc2f9d636751 39 } \
yihui 1:fc2f9d636751 40 else \
yihui 1:fc2f9d636751 41 { \
yihui 1:fc2f9d636751 42 assert_softdevice_callback((uint16_t)__LINE__, (uint8_t *)__FILE__); \
yihui 1:fc2f9d636751 43 /*lint -unreachable */ \
yihui 1:fc2f9d636751 44 }
yihui 1:fc2f9d636751 45
yihui 1:fc2f9d636751 46 #endif /* SOFTDEVICE_ASSERT_H_ */