Knight Rider PIO sample for teckBASIC, konashi.js
Dependencies: BLE_API_Native_IRC mbed
Fork of BLE_konashi_PIO_test by
ansi_escape.h
00001 /**************************************************************************/ 00002 /*! 00003 @file ansi_esc_code.h 00004 @author hathach (tinyusb.org) 00005 00006 @section LICENSE 00007 00008 Software License Agreement (BSD License) 00009 00010 Copyright (c) 2013, hathach (tinyusb.org) 00011 All rights reserved. 00012 00013 Redistribution and use in source and binary forms, with or without 00014 modification, are permitted provided that the following conditions are met: 00015 1. Redistributions of source code must retain the above copyright 00016 notice, this list of conditions and the following disclaimer. 00017 2. Redistributions in binary form must reproduce the above copyright 00018 notice, this list of conditions and the following disclaimer in the 00019 documentation and/or other materials provided with the distribution. 00020 3. Neither the name of the copyright holders nor the 00021 names of its contributors may be used to endorse or promote products 00022 derived from this software without specific prior written permission. 00023 00024 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY 00025 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 00026 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 00027 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY 00028 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 00029 INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 00030 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND 00031 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00032 INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS 00033 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00034 00035 This file is part of the tinyusb stack. 00036 */ 00037 /**************************************************************************/ 00038 00039 /** \file 00040 * \brief TBD 00041 * 00042 * \note TBD 00043 */ 00044 00045 /** \ingroup TBD 00046 * \defgroup TBD 00047 * \brief TBD 00048 * 00049 * @{ 00050 */ 00051 00052 #ifndef _ANSI_ESC_CODE_H_ 00053 #define _ANSI_ESC_CODE_H_ 00054 00055 00056 #ifdef __cplusplus 00057 extern "C" { 00058 #endif 00059 00060 #define CSI_CODE(seq) "\33[" seq 00061 #define CSI_SGR(x) CSI_CODE(#x) "m" 00062 00063 //------------- Cursor movement -------------// 00064 #define ANSI_CURSOR_UP(n) CSI_CODE(#n "A") 00065 #define ANSI_CURSOR_DOWN(n) CSI_CODE(#n "B") 00066 #define ANSI_CURSOR_FORWARD(n) CSI_CODE(#n "C") 00067 #define ANSI_CURSOR_BACKWARD(n) CSI_CODE(#n "D") 00068 #define ANSI_CURSOR_LINE_DOWN(n) CSI_CODE(#n "E") 00069 #define ANSI_CURSOR_LINE_UP(n) CSI_CODE(#n "F") 00070 #define ANSI_CURSOR_POSITION(n, m) CSI_CODE(#n ";" #m "H") 00071 00072 #define ANSI_ERASE_SCREEN(n) CSI_CODE(#n "J") 00073 #define ANSI_ERASE_LINE(n) CSI_CODE(#n "K") 00074 00075 /** text color */ 00076 #define ANSI_TEXT_BLACK CSI_SGR(30) 00077 #define ANSI_TEXT_RED CSI_SGR(31) 00078 #define ANSI_TEXT_GREEN CSI_SGR(32) 00079 #define ANSI_TEXT_YELLOW CSI_SGR(33) 00080 #define ANSI_TEXT_BLUE CSI_SGR(34) 00081 #define ANSI_TEXT_MAGENTA CSI_SGR(35) 00082 #define ANSI_TEXT_CYAN CSI_SGR(36) 00083 #define ANSI_TEXT_WHITE CSI_SGR(37) 00084 #define ANSI_TEXT_DEFAULT CSI_SGR(39) 00085 00086 /** background color */ 00087 #define ANSI_BG_BLACK CSI_SGR(40) 00088 #define ANSI_BG_RED CSI_SGR(41) 00089 #define ANSI_BG_GREEN CSI_SGR(42) 00090 #define ANSI_BG_YELLOW CSI_SGR(43) 00091 #define ANSI_BG_BLUE CSI_SGR(44) 00092 #define ANSI_BG_MAGENTA CSI_SGR(45) 00093 #define ANSI_BG_CYAN CSI_SGR(46) 00094 #define ANSI_BG_WHITE CSI_SGR(47) 00095 #define ANSI_BG_DEFAULT CSI_SGR(49) 00096 00097 #ifdef __cplusplus 00098 } 00099 #endif 00100 00101 #endif /* _TUSB_ANSI_ESC_CODE_H_ */ 00102 00103 /** @} */
Generated on Tue Jul 12 2022 16:55:06 by 1.7.2