Cefn Hoile / nRF51822

Dependencies:   nrf51-sdk

Dependents:   microbit-dal

Fork of nRF51822 by Lancaster University

Committer:
rgrover1
Date:
Mon Jul 06 10:21:01 2015 +0100
Revision:
374:d57070489710
Synchronized with git rev 3d87035e
Author: Rohit Grover
fix #16: hide duplicate symbol definitions in ble_types.h

Who changed what in which revision?

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