From 969e1369c0731a169c4d0258c2c449ff5c4e2569 Mon Sep 17 00:00:00 2001 From: marschap Date: Sun, 21 Dec 2008 17:15:03 +0000 Subject: [PATCH] make private data structs unique to keep Doxygen happy --- server/drivers/glcdlib.c | 8 ++++---- server/drivers/icp_a106.c | 5 +++-- server/drivers/imon.c | 19 ++++++++++--------- server/drivers/lcterm.c | 19 ++++++++++--------- server/drivers/lis.h | 5 +++-- server/drivers/pylcd.h | 5 +++-- server/drivers/serialPOS.c | 35 ++++++++++++++++++---------------- server/drivers/ula200.c | 39 +++++++++++++++----------------------- 8 files changed, 67 insertions(+), 68 deletions(-) diff --git a/server/drivers/glcdlib.c b/server/drivers/glcdlib.c index c578820..859b100 100644 --- a/server/drivers/glcdlib.c +++ b/server/drivers/glcdlib.c @@ -41,10 +41,10 @@ #include "glcdlib.h" -// our private data -typedef struct { - GlcdDriver * glcdDriver; - char info[255]; +/** private data for the \c glcdlib driver */ +typedef struct glcdlib_private_data { + GlcdDriver *glcdDriver; /**< GlcdDriver handle */ + char info[255]; /**< info string contents */ } glcdlibPD; diff --git a/server/drivers/icp_a106.c b/server/drivers/icp_a106.c index 8502ccf..67227a8 100644 --- a/server/drivers/icp_a106.c +++ b/server/drivers/icp_a106.c @@ -51,8 +51,9 @@ #include "icp_a106.h" #include "report.h" -typedef struct -{ + +/** private data for the \c icp_a106 driver */ +typedef struct icp_a106_private_data { unsigned char *framebuf; unsigned char *last_framebuf; int width; diff --git a/server/drivers/imon.c b/server/drivers/imon.c index d711468..53bad97 100644 --- a/server/drivers/imon.c +++ b/server/drivers/imon.c @@ -97,15 +97,16 @@ MODULE_EXPORT int stay_in_foreground = 0; MODULE_EXPORT int supports_multiple = 0; MODULE_EXPORT char *symbol_prefix = "imon_"; -// our private data -typedef struct { - char info[255]; - int imon_fd; - unsigned char *framebuf; - int height; - int width; - int cellwidth; - int cellheight; + +/** private data for the \c imon driver */ +typedef struct imon_private_data { + char info[255]; /**< info string contents */ + int imon_fd; /**< file descriptor to the display */ + unsigned char *framebuf; /**< fram buffer */ + int height; /**< display height in characters */ + int width; /**< display width in characters */ + int cellwidth; /**< character cell width */ + int cellheight; /**< character cell height */ } PrivateData; diff --git a/server/drivers/lcterm.c b/server/drivers/lcterm.c index 0e868c6..6ab53d0 100644 --- a/server/drivers/lcterm.c +++ b/server/drivers/lcterm.c @@ -52,15 +52,16 @@ typedef enum CCMODE_BIGNUM } CCMode; -typedef struct -{ - CCMode ccmode; /* custom character mode for current display */ - CCMode last_ccmode; /* custom character set that is loaded in the display */ - unsigned char *framebuf; - unsigned char *last_framebuf; - int width; - int height; - int fd; + +/** private data for the \c lcterm driver */ +typedef struct lcterm_private_data { + CCMode ccmode; /**< custom character mode for current display */ + CCMode last_ccmode; /**< custom character set that is loaded in the display */ + unsigned char *framebuf; /**< frame buffer */ + unsigned char *last_framebuf; /**< old frame buffer contents */ + int width; /**< display width in characters */ + int height; /**< display height in characters */ + int fd; /**< handle to the device */ } PrivateData; diff --git a/server/drivers/lis.h b/server/drivers/lis.h index 180985b..a6c5bb4 100644 --- a/server/drivers/lis.h +++ b/server/drivers/lis.h @@ -58,8 +58,9 @@ typedef struct cgram_cache { int clean; } CGram; -typedef struct { +/** private data for the \c lis driver */ +typedef struct lis_private_data { // the handle for the USB FTDI library struct ftdi_context ftdic; @@ -98,9 +99,9 @@ typedef struct { /* underline effect (false). To avoid the underline effect in the latter case, the last */ /* line is always zeroed for whatever redefined character */ char lastline; - } PrivateData; + MODULE_EXPORT int lis_init(Driver *drvthis); MODULE_EXPORT void lis_close (Driver *drvthis); MODULE_EXPORT int lis_width (Driver *drvthis); diff --git a/server/drivers/pylcd.h b/server/drivers/pylcd.h index 63837be..865944d 100644 --- a/server/drivers/pylcd.h +++ b/server/drivers/pylcd.h @@ -53,8 +53,9 @@ typedef enum { custom1 = 16 } custom_type; -typedef struct -{ + +/** private data for the \c pyramid driver */ +typedef struct pyramid_private_data { /* device io */ int FD; char device[255]; diff --git a/server/drivers/serialPOS.c b/server/drivers/serialPOS.c index fa6320f..5ed4522 100644 --- a/server/drivers/serialPOS.c +++ b/server/drivers/serialPOS.c @@ -143,9 +143,9 @@ typedef enum { - -typedef struct { - int fd; /* The LCD file descriptor */ +/** private data for the \c serialPOS driver */ +typedef struct serialPOS_private_data { + int fd; /**< LCD file descriptor */ /* dimensions */ int width, height; @@ -162,9 +162,9 @@ typedef struct { int hardwrap; int hardscroll; - POS_EmulationType emulation_mode; /* The emulation type */ + POS_EmulationType emulation_mode; /**< emulation type */ - char info[255]; /* static data from serialPOS_get_info */ + char info[255]; /**< static data from serialPOS_get_info */ } PrivateData; @@ -181,6 +181,7 @@ static void serialPOS_autoscroll(Driver *drvthis, int on); static void serialPOS_cursorblink(Driver *drvthis, int on); static void serialPOS_cursor_goto(Driver *drvthis, int x, int y); + /* Parse one key from the configfile */ static char serialPOS_parse_keypad_setting (Driver *drvthis, char *keyname, char default_value) @@ -204,8 +205,8 @@ serialPOS_parse_keypad_setting (Driver *drvthis, char *keyname, char default_val /** * Initialize the driver. * \param drvthis Pointer to driver structure. - * \retval 0 Success. - * \retval <0 Error. + * \retval 0 Success. + * \retval <0 Error. */ MODULE_EXPORT int serialPOS_init (Driver *drvthis) @@ -403,7 +404,7 @@ serialPOS_close (Driver *drvthis) /** * Return the display width in characters. * \param drvthis Pointer to driver structure. - * \return Number of characters the display is wide. + * \return Number of characters the display is wide. */ MODULE_EXPORT int serialPOS_width (Driver *drvthis) @@ -417,7 +418,7 @@ serialPOS_width (Driver *drvthis) /** * Return the display height in characters. * \param drvthis Pointer to driver structure. - * \return Number of characters the display is high. + * \return Number of characters the display is high. */ MODULE_EXPORT int serialPOS_height (Driver *drvthis) @@ -428,20 +429,22 @@ serialPOS_height (Driver *drvthis) } -///////////////////////////////////////////////////////////////// -// Returns the maximum number of custom char slots (not how many -// are free at a moment), needed for bignum. -// +/** + * Get total number of custom characters available. + * \param drvthis Pointer to driver structure. + * \return Number of custom characters (always \c 0 ). + */ MODULE_EXPORT int serialPOS_get_free_chars (Driver *drvthis) { return 0; } + /** * Return the width of a character in pixels. * \param drvthis Pointer to driver structure. - * \return Number of pixel columns a character cell is wide. + * \return Number of pixel columns a character cell is wide. */ MODULE_EXPORT int serialPOS_cellwidth (Driver *drvthis) @@ -455,7 +458,7 @@ serialPOS_cellwidth (Driver *drvthis) /** * Return the height of a character in pixels. * \param drvthis Pointer to driver structure. - * \return Number of pixel lines a character cell is high. + * \return Number of pixel lines a character cell is high. */ MODULE_EXPORT int serialPOS_cellheight (Driver *drvthis) @@ -763,7 +766,7 @@ serialPOS_cursor_goto(Driver *drvthis, int x, int y) /** * Provide general information about the POS display. * \param drvthis Pointer to driver structure. - * \return Constant string with information. + * \return Constant string with information. */ MODULE_EXPORT const char * serialPOS_get_info (Driver *drvthis) diff --git a/server/drivers/ula200.c b/server/drivers/ula200.c index 5e27219..bcb8f0e 100644 --- a/server/drivers/ula200.c +++ b/server/drivers/ula200.c @@ -155,7 +155,7 @@ static char *default_key_map[MAX_KEY_MAP] = { "Up", "Down", "Left", "Right", "En /* KeyRing management */ #define KEYRINGSIZE 16 -typedef struct { +typedef struct ula200_keyring { unsigned char contents[KEYRINGSIZE]; int head; int tail; @@ -219,32 +219,23 @@ unsigned char GetKeyFromKeyRing(KeyRing *kr) #define SETCHAR 0x40 /* Only reachable with EXTREG clear */ -/////////////////////////////////////////////////////////////////////////////// -// private data types -// -typedef struct { - - // the handle for the USB FTDI library - struct ftdi_context ftdic; +/** private data for the \c ula200 driver */ +typedef struct ula200_private_data { + struct ftdi_context ftdic; /**< handle for the USB FTDI library */ // the width and the height (in number of characters) of the library - int width, height; + int width, height; - // The framebuffer and the framebuffer for the last contents (incr. update) - unsigned char *framebuf, *lcd_contents; + // The framebuffer and the framebuffer for the last contents (incr. update) + unsigned char *framebuf, *lcd_contents; - // first time => all is dirty - unsigned char all_dirty; + unsigned char all_dirty; /**< first time => all is dirty */ - // backlight (-1 = unset, 0 = off, 1 = on) - int backlight; + int backlight; /**< backlight: -1=unset, 0=off, 1=on */ - // the keyring - KeyRing keyring; - - // the keymap - char *key_map[MAX_KEY_MAP]; + KeyRing keyring; /**< input key ring */ + char *key_map[MAX_KEY_MAP]; /**< mapping of input keys */ } PrivateData; @@ -609,8 +600,8 @@ ula200_load_custom_chars(Driver *drvthis) /** * Initialize the driver. * \param drvthis Pointer to driver structure. - * \retval 0 Success. - * \retval <0 Error. + * \retval 0 Success. + * \retval <0 Error. */ MODULE_EXPORT int ula200_init(Driver *drvthis) @@ -764,7 +755,7 @@ ula200_close(Driver *drvthis) /** * Return the display width in characters. * \param drvthis Pointer to driver structure. - * \return Number of characters the display is wide. + * \return Number of characters the display is wide. */ MODULE_EXPORT int ula200_width (Driver *drvthis) @@ -777,7 +768,7 @@ ula200_width (Driver *drvthis) /** * Return the display height in characters. * \param drvthis Pointer to driver structure. - * \return Number of characters the display is high. + * \return Number of characters the display is high. */ MODULE_EXPORT int ula200_height (Driver *drvthis)