* "config.h" and delete the CONFIG_ macros for the modules
* you're not using.
*
- * \para Working with multiple applications
+ * <h2>Working with multiple applications</h2>
*
* If your project is made of multiple DevLib-based applications,
* create a custom "config.h" file in each application subdirectory
* You can share common options by creationg a "config_common.h" header
* and including it from all your "config.h" copies.
*
- * \para Configuration style
+ * <h2>Configuration style</h2>
*
* For improved compile-time checking of configuration options,
* the preferred way to use a \c CONFIG_ symbol is keeping it
/*
* $Log$
+ * Revision 1.2 2004/08/05 18:46:52 bernie
+ * Documentation improvements.
+ *
* Revision 1.1 2004/07/29 23:34:32 bernie
* Add template configuration file.
*
/*
* $Log$
+ * Revision 1.3 2004/08/05 18:46:44 bernie
+ * Documentation improvements.
+ *
* Revision 1.2 2004/06/03 11:27:09 bernie
* Add dual-license information.
*
#include "compiler.h"
#include <stdarg.h>
-/* Style flags */
+/*!
+ * \name Style flags
+ * \see text_style()
+ * \{
+ */
#define STYLEF_BOLD BV(0)
#define STYLEF_ITALIC BV(1)
#define STYLEF_UNDERLINE BV(2)
#define STYLEF_INVERT BV(3)
#define STYLEF_EXPANDED BV(4)
#define STYLEF_CONDENSED BV(5)
-#define STYLEF_STRIKEOUT BV(6) /* Not implemented */
+#define STYLEF_STRIKEOUT BV(6) /*<! Not implemented */
#define STYLEF_MASK \
(STYLEF_BOLD | STYLEF_ITALIC | STYLEF_UNDERLINE | \
STYLEF_EXPANDED | STYLEF_CONDENSED | STYLEF_INVERT)
+/*\}*/
-/* Flags for text_xprintf() */
+/*!
+ * \name Formatting flags for text rendering
+ * \see text_xprintf()
+ * \{
+ */
#define TEXT_NORMAL 0 /*!< Normal mode */
#define TEXT_FILL BV(0) /*!< Fill rest of line with spaces */
#define TEXT_CENTER BV(1) /*!< Center string in line */
#define TEXT_INVERT BV(2) /*!< Inverted mode */
#define TEXT_RIGHT BV(3) /*!< Right aligned */
+/*\}*/
-/* Escape sequences codes */
+/*! Escape sequences codes */
#define ANSI_ESC_CLEARSCREEN 'c'
/*!
* \file
- *
* <!--
+ * Copyright 2003, 2004 Develer S.r.l. (http://www.develer.com/)
* Copyright 1999 Bernardo Innocenti <bernie@develer.com>
- * Copyright 2003,2004 Develer S.r.l. (http://www.develer.com/)
* This file is part of DevLib - See devlib/README for information.
* -->
*
/*
* $Log$
+ * Revision 1.4 2004/08/05 18:46:44 bernie
+ * Documentation improvements.
+ *
* Revision 1.3 2004/08/03 15:57:18 aleph
* Add include to fix warning for vsprintf()
*
#include <string.h> /* strlen() */
/*!
- * Render string <code>str</code> in bitmap
+ * Render string \a str in Bitmap \a bm at current cursor position
+ *
+ * \note Text formatting functions are also available with an _P suffix
+ * accepting the source string from program memory. This feature
+ * is only available (and useful) on Harvard microprocessors such
+ * as the AVR.
+ *
+ * \see text_putchar()
*/
int PGM_FUNC(text_puts)(const char * PGM_ATTR str, struct Bitmap *bm)
{
}
+/*!
+ * vprintf()-like formatter to render text in a Bitmap.
+ *
+ * Perform vprintf()-like formatting on the \a fmt format string using the
+ * variable-argument list \a ap.
+ * Render the resulting string in Bitmap \a bm starting at the current
+ * cursor position.
+ *
+ * \see text_puts() text_putchar() text_printf()
+ */
int PGM_FUNC(text_vprintf)(struct Bitmap *bm, const char * PGM_ATTR fmt, va_list ap)
{
return PGM_FUNC(_formatted_write)(fmt, (void (*)(char, void *))text_putchar, bm, ap);
}
-
+/*!
+ * printf()-like formatter to render text in a Bitmap.
+ *
+ * Perform printf()-like formatting on the \a fmt format string.
+ * Render the resulting string in Bitmap \a bm starting at the
+ * current cursor position.
+ *
+ * \see text_puts() text_putchar() text_vprintf()
+ */
int PGM_FUNC(text_printf)(struct Bitmap *bm, const char * PGM_ATTR fmt, ...)
{
int len;
}
+/*!
+ * Render the result of printf()-like formatting in a specified position
+ * of a Bitmap.
+ *
+ * \param bm Bitmap where to render the text
+ * \param row Starting row in character units (zero based)
+ * \param col Starting column in character units (zero based)
+ * \param mode Formatting mode to use. Can be TEXT_NORMAL,
+ * TEXT_FILL, TEXT_INVERT or TEXT_RIGHT or a combination
+ * of these flags ORed together.
+ * \param fmt String possibly containing printf() formatting commands.
+ *
+ * \see text_puts() text_putchar() text_printf() text_vprintf()
+ * \see text_moveto() text_style()
+ */
int PGM_FUNC(text_xprintf)(struct Bitmap *bm,
- uint8_t row, uint8_t col, uint8_t mode, const char * PGM_ATTR fmt, ...)
+ uint8_t row, uint8_t col, uint8_t mode, const char * PGM_ATTR fmt, ...)
{
int len;
uint8_t oldstyle = 0;