Fixed MIDI class driver send routines silently discarding packets if the endpoint...
[pub/USBasp.git] / LUFA / Drivers / Misc / TerminalCodes.h
index 0576285..25037cc 100644 (file)
@@ -1,21 +1,21 @@
 /*
              LUFA Library
      Copyright (C) Dean Camera, 2010.
 /*
              LUFA Library
      Copyright (C) Dean Camera, 2010.
-              
+
   dean [at] fourwalledcubicle [dot] com
   dean [at] fourwalledcubicle [dot] com
-      www.fourwalledcubicle.com
+           www.lufa-lib.org
 */
 
 /*
   Copyright 2010  Dean Camera (dean [at] fourwalledcubicle [dot] com)
 
 */
 
 /*
   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
   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
   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
   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.
  */
  *  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
  *
 /** \ingroup Group_MiscDrivers
  *  @defgroup Group_Terminal ANSI Terminal Escape Codes - LUFA/Drivers/Misc/TerminalCodes.h
  *
  *
  *  @{
  */
  *
  *  @{
  */
+
 #ifndef __TERMINALCODES_H__
 #define __TERMINALCODES_H__
 
        /* Public Interface - May be used in end-application: */
                /* Macros: */
                        #if !defined(DISABLE_TERMINAL_CODES)
 #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
 
                                #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")
 
                        /** 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 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. */
                        #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. */
                         *  the center.
                         */
                        #define ESC_STRIKETHROUGH_OFF    ANSI_ESCAPE_SEQUENCE("29m")
                         *  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")
 
                        /** Sets the foreground (text) colour to black. */
                        #define ESC_FG_BLACK             ANSI_ESCAPE_SEQUENCE("30m")
 
 
                        /** Sets the text background colour to the terminal's default. */
                        #define ESC_BG_DEFAULT           ANSI_ESCAPE_SEQUENCE("49m")
 
                        /** 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")
 
                        /** Sets the cursor position to the given line and column. */
                        #define ESC_CURSOR_POS(L, C)     ANSI_ESCAPE_SEQUENCE(#L ";" #C "H")
 
 
                        /** Restores the cursor position to the last position saved with \ref ESC_CURSOR_POS_SAVE. */
                        #define ESC_CURSOR_POS_RESTORE   ANSI_ESCAPE_SEQUENCE("u")
 
                        /** 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")
                        /** 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
 
 /** @} */
 
 #endif
 
 /** @} */
+