Nordic stack and drivers for the mbed BLE API Modified for HRM 1017 and correct DISCONNECT event processing

Fork of nRF51822 by Nordic Semiconductor

Committer:
bogdanm
Date:
Wed Mar 26 14:38:17 2014 +0000
Revision:
0:eff01767de02
Child:
58:de6b64cd7f21
Initial import of the nRF51822 code

Who changed what in which revision?

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