Updated to latest online libraries (See also mbed Apps: HelloBlue, FOTA4)

Dependencies:   BLE_API mbed nRF51822

Fork of BLE_Default_APP by Yihui Xiong

Committer:
yihui
Date:
Fri Oct 10 03:36:28 2014 +0000
Revision:
1:a607cd9655d7
use NVIC_SystemReset() to run bootloader

Who changed what in which revision?

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