X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/071e02c6b6b4837fa9cf0b6d4c749994e02638d7..ee495ca5002da26bae51a95d1922474708a2e818:/LUFA/Drivers/Misc/TerminalCodes.h diff --git a/LUFA/Drivers/Misc/TerminalCodes.h b/LUFA/Drivers/Misc/TerminalCodes.h index 05762858d..25037cc91 100644 --- a/LUFA/Drivers/Misc/TerminalCodes.h +++ b/LUFA/Drivers/Misc/TerminalCodes.h @@ -1,21 +1,21 @@ /* LUFA Library Copyright (C) Dean Camera, 2010. - + dean [at] fourwalledcubicle [dot] com - www.fourwalledcubicle.com + www.lufa-lib.org */ /* Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com) - Permission to use, copy, modify, distribute, and sell this + Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted - without fee, provided that the above copyright notice appear in + without fee, provided that the above copyright notice appear in all copies and that both that the copyright notice and this - permission notice and warranty disclaimer appear in supporting - documentation, and that the name of the author not be used in - advertising or publicity pertaining to distribution of the + permission notice and warranty disclaimer appear in supporting + documentation, and that the name of the author not be used in + advertising or publicity pertaining to distribution of the software without specific, written prior permission. The author disclaim all warranties with regard to this @@ -34,7 +34,7 @@ * ANSI terminal compatible escape sequences. These escape sequences are designed to be concatenated with existing * strings to modify their display on a compatible terminal application. */ - + /** \ingroup Group_MiscDrivers * @defgroup Group_Terminal ANSI Terminal Escape Codes - LUFA/Drivers/Misc/TerminalCodes.h * @@ -56,22 +56,24 @@ * * @{ */ - + #ifndef __TERMINALCODES_H__ #define __TERMINALCODES_H__ /* Public Interface - May be used in end-application: */ /* Macros: */ #if !defined(DISABLE_TERMINAL_CODES) - /** Creates an ANSII escape sequence with the payload specified by "c". */ + /** Creates an ANSI escape sequence with the payload specified by "c". + * + * \param[in] c Payload to encode as an ANSI escape sequence, a ESC_* mask. + */ #define ANSI_ESCAPE_SEQUENCE(c) "\33[" c #else #define ANSI_ESCAPE_SEQUENCE(c) #endif - /** Resets any escape sequence modifiers back to their defaults. */ - #define ESC_RESET ANSI_ESCAPE_SEQUENCE("0m") - + /** \name Text Display Modifier Escape Sequences */ + //@{ /** Turns on bold so that any following text is printed to the terminal in bold. */ #define ESC_BOLD_ON ANSI_ESCAPE_SEQUENCE("1m") @@ -94,8 +96,8 @@ /** Turns off italics so that any following text is printed to the terminal in non italics. */ #define ESC_ITALICS_OFF ANSI_ESCAPE_SEQUENCE("23m") - - /** Turns off underline so that any following text is printed to the terminal non underlined. */ + + /** Turns off underline so that any following text is printed to the terminal non underlined. */ #define ESC_UNDERLINE_OFF ANSI_ESCAPE_SEQUENCE("24m") /** Turns off inverse so that any following text is printed to the terminal in non inverted colours. */ @@ -105,7 +107,10 @@ * the center. */ #define ESC_STRIKETHROUGH_OFF ANSI_ESCAPE_SEQUENCE("29m") - + //@} + + /** \name Text Colour Control Sequences */ + //@{ /** Sets the foreground (text) colour to black. */ #define ESC_FG_BLACK ANSI_ESCAPE_SEQUENCE("30m") @@ -159,7 +164,10 @@ /** Sets the text background colour to the terminal's default. */ #define ESC_BG_DEFAULT ANSI_ESCAPE_SEQUENCE("49m") - + //@} + + /** \name Cursor Positioning Control Sequences */ + //@{ /** Sets the cursor position to the given line and column. */ #define ESC_CURSOR_POS(L, C) ANSI_ESCAPE_SEQUENCE(#L ";" #C "H") @@ -180,13 +188,21 @@ /** Restores the cursor position to the last position saved with \ref ESC_CURSOR_POS_SAVE. */ #define ESC_CURSOR_POS_RESTORE ANSI_ESCAPE_SEQUENCE("u") - + //@} + + /** \name Miscellaneous Control Sequences */ + //@{ + /** Resets any escape sequence modifiers back to their defaults. */ + #define ESC_RESET ANSI_ESCAPE_SEQUENCE("0m") + /** Erases the entire display, returning the cursor to the top left. */ #define ESC_ERASE_DISPLAY ANSI_ESCAPE_SEQUENCE("2J") /** Erases the current line, returning the cursor to the far left. */ #define ESC_ERASE_LINE ANSI_ESCAPE_SEQUENCE("K") + //@} #endif /** @} */ +