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