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