My ad-don to display in ANSI code on the debug terminal.

Committer:
salco
Date:
Mon Aug 07 00:21:21 2017 +0000
Revision:
0:ad081a718bb3
clean code and prepare to first publish

Who changed what in which revision?

UserRevisionLine numberNew contents of line
salco 0:ad081a718bb3 1 /** Addon to use with debug console. Easy way to use an Ansi console.
salco 0:ad081a718bb3 2 * I use Tera term but any terminal ANSI work.
salco 0:ad081a718bb3 3 *
salco 0:ad081a718bb3 4 * @see https://ttssh2.osdn.jp/index.html.en
salco 0:ad081a718bb3 5 * @file
salco 0:ad081a718bb3 6 * @todo voir un moyen de patcher les case coller
salco 0:ad081a718bb3 7 *
salco 0:ad081a718bb3 8 * This file is subject to the terms and conditions of the GNU Lesser
salco 0:ad081a718bb3 9 * General Public License v2.1. See the file LICENSE in the top level
salco 0:ad081a718bb3 10 * directory for more details.
salco 0:ad081a718bb3 11 *
salco 0:ad081a718bb3 12 * @author Salco <JeSuisSalco@gmail.com>
salco 0:ad081a718bb3 13 */
salco 0:ad081a718bb3 14
salco 0:ad081a718bb3 15 #ifndef ANSIGRAPHICALCONSOLE_H
salco 0:ad081a718bb3 16 #define ANSIGRAPHICALCONSOLE_H
salco 0:ad081a718bb3 17
salco 0:ad081a718bb3 18 /** Uncomment that to put delay in the display.
salco 0:ad081a718bb3 19 */
salco 0:ad081a718bb3 20 //#define CONSOLE_DELAY_TEST
salco 0:ad081a718bb3 21 /** Uncomment that to use the debug from mbed.h
salco 0:ad081a718bb3 22 */
salco 0:ad081a718bb3 23 #define USE_MBED_LIB
salco 0:ad081a718bb3 24
salco 0:ad081a718bb3 25 #if defined( CONSOLE_DELAY_TEST) || defined(USE_MBED_LIB)
salco 0:ad081a718bb3 26 #include "mbed.h"
salco 0:ad081a718bb3 27 #endif
salco 0:ad081a718bb3 28
salco 0:ad081a718bb3 29 /** Adjust the define for a bigger buffer.
salco 0:ad081a718bb3 30 */
salco 0:ad081a718bb3 31 #define BUFFER_LIMIT 50
salco 0:ad081a718bb3 32
salco 0:ad081a718bb3 33 /** Use to create a single line box.
salco 0:ad081a718bb3 34 * @note the position X=0,Y=0 is at the top left.
salco 0:ad081a718bb3 35 * @param[in] posX position in X to put the box.
salco 0:ad081a718bb3 36 * @param[in] posY position in X to put the box.
salco 0:ad081a718bb3 37 * @param[in] height lenght of the box for Y.
salco 0:ad081a718bb3 38 * @param[in] width lenght of the box for X.
salco 0:ad081a718bb3 39 * @param[in] title Title to show on top of the box.
salco 0:ad081a718bb3 40 */
salco 0:ad081a718bb3 41 void createSLbox(int posX, int posY, int height, int width,const char* title=0);
salco 0:ad081a718bb3 42
salco 0:ad081a718bb3 43 /** Use to create a double line box.
salco 0:ad081a718bb3 44 * @note the position X=0,Y=0 is at the top left.
salco 0:ad081a718bb3 45 * @param[in] posX position in X to put the box.
salco 0:ad081a718bb3 46 * @param[in] posY position in X to put the box.
salco 0:ad081a718bb3 47 * @param[in] height lenght of the box for Y.
salco 0:ad081a718bb3 48 * @param[in] width lenght of the box for X.
salco 0:ad081a718bb3 49 * @param[in] title Title to show on top of the box.
salco 0:ad081a718bb3 50 */
salco 0:ad081a718bb3 51 void createDLbox(int posX, int posY, int height, int width,const char* title=0);
salco 0:ad081a718bb3 52
salco 0:ad081a718bb3 53 /** Use to create a double line box.
salco 0:ad081a718bb3 54 * @note the position X=0,Y=0 is at the top left.
salco 0:ad081a718bb3 55 * @param[in] posX position in X to put the text.
salco 0:ad081a718bb3 56 * @param[in] posY position in X to put the text.
salco 0:ad081a718bb3 57 * @param[in] title Text to show on screen.(Use like printf and other).
salco 0:ad081a718bb3 58 */
salco 0:ad081a718bb3 59 void setText(int posX, int posY,const char* title,...);
salco 0:ad081a718bb3 60
salco 0:ad081a718bb3 61 /** Use to clear the screen
salco 0:ad081a718bb3 62 */
salco 0:ad081a718bb3 63 void clearscreen(void);
salco 0:ad081a718bb3 64
salco 0:ad081a718bb3 65
salco 0:ad081a718bb3 66 #endif