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 /*!
yihui 1:fc2f9d636751 3 @file ansi_esc_code.h
yihui 1:fc2f9d636751 4 @author hathach (tinyusb.org)
yihui 1:fc2f9d636751 5
yihui 1:fc2f9d636751 6 @section LICENSE
yihui 1:fc2f9d636751 7
yihui 1:fc2f9d636751 8 Software License Agreement (BSD License)
yihui 1:fc2f9d636751 9
yihui 1:fc2f9d636751 10 Copyright (c) 2013, hathach (tinyusb.org)
yihui 1:fc2f9d636751 11 All rights reserved.
yihui 1:fc2f9d636751 12
yihui 1:fc2f9d636751 13 Redistribution and use in source and binary forms, with or without
yihui 1:fc2f9d636751 14 modification, are permitted provided that the following conditions are met:
yihui 1:fc2f9d636751 15 1. Redistributions of source code must retain the above copyright
yihui 1:fc2f9d636751 16 notice, this list of conditions and the following disclaimer.
yihui 1:fc2f9d636751 17 2. Redistributions in binary form must reproduce the above copyright
yihui 1:fc2f9d636751 18 notice, this list of conditions and the following disclaimer in the
yihui 1:fc2f9d636751 19 documentation and/or other materials provided with the distribution.
yihui 1:fc2f9d636751 20 3. Neither the name of the copyright holders nor the
yihui 1:fc2f9d636751 21 names of its contributors may be used to endorse or promote products
yihui 1:fc2f9d636751 22 derived from this software without specific prior written permission.
yihui 1:fc2f9d636751 23
yihui 1:fc2f9d636751 24 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
yihui 1:fc2f9d636751 25 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
yihui 1:fc2f9d636751 26 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
yihui 1:fc2f9d636751 27 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY
yihui 1:fc2f9d636751 28 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
yihui 1:fc2f9d636751 29 INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
yihui 1:fc2f9d636751 30 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND
yihui 1:fc2f9d636751 31 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
yihui 1:fc2f9d636751 32 INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS
yihui 1:fc2f9d636751 33 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
yihui 1:fc2f9d636751 34
yihui 1:fc2f9d636751 35 This file is part of the tinyusb stack.
yihui 1:fc2f9d636751 36 */
yihui 1:fc2f9d636751 37 /**************************************************************************/
yihui 1:fc2f9d636751 38
yihui 1:fc2f9d636751 39 /** \file
yihui 1:fc2f9d636751 40 * \brief TBD
yihui 1:fc2f9d636751 41 *
yihui 1:fc2f9d636751 42 * \note TBD
yihui 1:fc2f9d636751 43 */
yihui 1:fc2f9d636751 44
yihui 1:fc2f9d636751 45 /** \ingroup TBD
yihui 1:fc2f9d636751 46 * \defgroup TBD
yihui 1:fc2f9d636751 47 * \brief TBD
yihui 1:fc2f9d636751 48 *
yihui 1:fc2f9d636751 49 * @{
yihui 1:fc2f9d636751 50 */
yihui 1:fc2f9d636751 51
yihui 1:fc2f9d636751 52 #ifndef _ANSI_ESC_CODE_H_
yihui 1:fc2f9d636751 53 #define _ANSI_ESC_CODE_H_
yihui 1:fc2f9d636751 54
yihui 1:fc2f9d636751 55
yihui 1:fc2f9d636751 56 #ifdef __cplusplus
yihui 1:fc2f9d636751 57 extern "C" {
yihui 1:fc2f9d636751 58 #endif
yihui 1:fc2f9d636751 59
yihui 1:fc2f9d636751 60 #define CSI_CODE(seq) "\33[" seq
yihui 1:fc2f9d636751 61 #define CSI_SGR(x) CSI_CODE(#x) "m"
yihui 1:fc2f9d636751 62
yihui 1:fc2f9d636751 63 //------------- Cursor movement -------------//
yihui 1:fc2f9d636751 64 #define ANSI_CURSOR_UP(n) CSI_CODE(#n "A")
yihui 1:fc2f9d636751 65 #define ANSI_CURSOR_DOWN(n) CSI_CODE(#n "B")
yihui 1:fc2f9d636751 66 #define ANSI_CURSOR_FORWARD(n) CSI_CODE(#n "C")
yihui 1:fc2f9d636751 67 #define ANSI_CURSOR_BACKWARD(n) CSI_CODE(#n "D")
yihui 1:fc2f9d636751 68 #define ANSI_CURSOR_LINE_DOWN(n) CSI_CODE(#n "E")
yihui 1:fc2f9d636751 69 #define ANSI_CURSOR_LINE_UP(n) CSI_CODE(#n "F")
yihui 1:fc2f9d636751 70 #define ANSI_CURSOR_POSITION(n, m) CSI_CODE(#n ";" #m "H")
yihui 1:fc2f9d636751 71
yihui 1:fc2f9d636751 72 #define ANSI_ERASE_SCREEN(n) CSI_CODE(#n "J")
yihui 1:fc2f9d636751 73 #define ANSI_ERASE_LINE(n) CSI_CODE(#n "K")
yihui 1:fc2f9d636751 74
yihui 1:fc2f9d636751 75 /** text color */
yihui 1:fc2f9d636751 76 #define ANSI_TEXT_BLACK CSI_SGR(30)
yihui 1:fc2f9d636751 77 #define ANSI_TEXT_RED CSI_SGR(31)
yihui 1:fc2f9d636751 78 #define ANSI_TEXT_GREEN CSI_SGR(32)
yihui 1:fc2f9d636751 79 #define ANSI_TEXT_YELLOW CSI_SGR(33)
yihui 1:fc2f9d636751 80 #define ANSI_TEXT_BLUE CSI_SGR(34)
yihui 1:fc2f9d636751 81 #define ANSI_TEXT_MAGENTA CSI_SGR(35)
yihui 1:fc2f9d636751 82 #define ANSI_TEXT_CYAN CSI_SGR(36)
yihui 1:fc2f9d636751 83 #define ANSI_TEXT_WHITE CSI_SGR(37)
yihui 1:fc2f9d636751 84 #define ANSI_TEXT_DEFAULT CSI_SGR(39)
yihui 1:fc2f9d636751 85
yihui 1:fc2f9d636751 86 /** background color */
yihui 1:fc2f9d636751 87 #define ANSI_BG_BLACK CSI_SGR(40)
yihui 1:fc2f9d636751 88 #define ANSI_BG_RED CSI_SGR(41)
yihui 1:fc2f9d636751 89 #define ANSI_BG_GREEN CSI_SGR(42)
yihui 1:fc2f9d636751 90 #define ANSI_BG_YELLOW CSI_SGR(43)
yihui 1:fc2f9d636751 91 #define ANSI_BG_BLUE CSI_SGR(44)
yihui 1:fc2f9d636751 92 #define ANSI_BG_MAGENTA CSI_SGR(45)
yihui 1:fc2f9d636751 93 #define ANSI_BG_CYAN CSI_SGR(46)
yihui 1:fc2f9d636751 94 #define ANSI_BG_WHITE CSI_SGR(47)
yihui 1:fc2f9d636751 95 #define ANSI_BG_DEFAULT CSI_SGR(49)
yihui 1:fc2f9d636751 96
yihui 1:fc2f9d636751 97 #ifdef __cplusplus
yihui 1:fc2f9d636751 98 }
yihui 1:fc2f9d636751 99 #endif
yihui 1:fc2f9d636751 100
yihui 1:fc2f9d636751 101 #endif /* _TUSB_ANSI_ESC_CODE_H_ */
yihui 1:fc2f9d636751 102
yihui 1:fc2f9d636751 103 /** @} */