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