Doxygen-ize
This commit is contained in:
+19
-19
@@ -1,5 +1,5 @@
|
|||||||
/** \file server/drivers/irmanin.c
|
/** \file server/drivers/irmanin.c
|
||||||
* LCDd \c irman input driver fora the IrMan IR remote control.
|
* LCDd \c irman input driver for the IrMan IR remote control.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* irmanin.c - test/demo of LIBIR's to interface with lcdproc (LCDd) */
|
/* irmanin.c - test/demo of LIBIR's to interface with lcdproc (LCDd) */
|
||||||
@@ -47,26 +47,20 @@ CodeMap codemap[] = {
|
|||||||
{ NULL, NULL }
|
{ NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////
|
|
||||||
////////////////////// Base "class" to derive from ///////////////////////
|
|
||||||
//////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
|
/* vars for the server core */
|
||||||
MODULE_EXPORT char *api_version = API_VERSION;
|
MODULE_EXPORT char *api_version = API_VERSION;
|
||||||
MODULE_EXPORT int stay_in_foreground = 0;
|
MODULE_EXPORT int stay_in_foreground = 0;
|
||||||
MODULE_EXPORT int supports_multiple = 0;
|
MODULE_EXPORT int supports_multiple = 0;
|
||||||
MODULE_EXPORT char *symbol_prefix = "irmanin_";
|
MODULE_EXPORT char *symbol_prefix = "irmanin_";
|
||||||
|
|
||||||
//void sigterm(int sig)
|
|
||||||
//{
|
|
||||||
// ir_free_commands();
|
|
||||||
// ir_finish();
|
|
||||||
// raise(sig);
|
|
||||||
//}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
/**
|
||||||
// init() should set up any device-specific stuff, and
|
* Initialize the driver.
|
||||||
// point all the function pointers.
|
* \param drvthis Pointer to driver structure.
|
||||||
|
* \retval 0 Success.
|
||||||
|
* \retval <0 Error.
|
||||||
|
*/
|
||||||
MODULE_EXPORT int
|
MODULE_EXPORT int
|
||||||
irmanin_init (Driver *drvthis)
|
irmanin_init (Driver *drvthis)
|
||||||
{
|
{
|
||||||
@@ -141,6 +135,11 @@ irmanin_init (Driver *drvthis)
|
|||||||
return 1; // return success
|
return 1; // return success
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Close the driver (do necessary clean-up).
|
||||||
|
* \param drvthis Pointer to driver structure.
|
||||||
|
*/
|
||||||
MODULE_EXPORT void
|
MODULE_EXPORT void
|
||||||
irmanin_close (Driver *drvthis)
|
irmanin_close (Driver *drvthis)
|
||||||
{
|
{
|
||||||
@@ -154,11 +153,12 @@ irmanin_close (Driver *drvthis)
|
|||||||
ir_finish();
|
ir_finish();
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
/**
|
||||||
// Tries to read a LCDproc character string from an input device...
|
* Get key from the device.
|
||||||
//
|
* \param drvthis Pointer to driver structure.
|
||||||
// Return NULL for "nothing available".
|
* \return String representation of the key;
|
||||||
//
|
* \c NULL if nothing available / unmapped key.
|
||||||
|
*/
|
||||||
MODULE_EXPORT const char *
|
MODULE_EXPORT const char *
|
||||||
irmanin_get_key (Driver *drvthis)
|
irmanin_get_key (Driver *drvthis)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,16 +1,17 @@
|
|||||||
#ifndef LCD_IRMANIN__H
|
#ifndef LCD_IRMANIN__H
|
||||||
#define LCD_IRMANIN_H
|
#define LCD_IRMANIN_H
|
||||||
|
|
||||||
|
/** mapping between IrMan code names and LCDd key names */
|
||||||
typedef struct _codemap {
|
typedef struct _codemap {
|
||||||
const char *irman;
|
const char *irman; /**< IrMan code name */
|
||||||
const char *lcdproc;
|
const char *lcdproc; /**< LCDpüroc key name */
|
||||||
} CodeMap;
|
} CodeMap;
|
||||||
|
|
||||||
/** private data for the \c irman driver */
|
/** private data for the \c irman driver */
|
||||||
typedef struct irmanin_private_data {
|
typedef struct irmanin_private_data {
|
||||||
char device[256];
|
char device[256]; /**< IrMan device name */
|
||||||
char config[256];
|
char config[256]; /**< IrMan config file */
|
||||||
char *portname;
|
char *portname; /**< IrMan port name */
|
||||||
} PrivateData;
|
} PrivateData;
|
||||||
|
|
||||||
MODULE_EXPORT int irmanin_init (Driver *drvthis);
|
MODULE_EXPORT int irmanin_init (Driver *drvthis);
|
||||||
|
|||||||
+21
-13
@@ -51,21 +51,25 @@
|
|||||||
|
|
||||||
/** private data for the \c lirc driver */
|
/** private data for the \c lirc driver */
|
||||||
typedef struct lircin_private_data {
|
typedef struct lircin_private_data {
|
||||||
char *lircrc;
|
char *lircrc; /**< path/name of the LIRC config file */
|
||||||
char *prog;
|
char *prog; /**< program identifier in LIRC config file */
|
||||||
int lircin_fd;
|
int lircin_fd; /**< LIRC socket file handle */
|
||||||
struct lirc_config *lircin_irconfig;
|
struct lirc_config *lircin_irconfig; /**< LIRC config */
|
||||||
} PrivateData;
|
} PrivateData;
|
||||||
|
|
||||||
|
|
||||||
|
/* vars for the server core */
|
||||||
MODULE_EXPORT char *api_version = API_VERSION;
|
MODULE_EXPORT char *api_version = API_VERSION;
|
||||||
MODULE_EXPORT int stay_in_foreground = 0;
|
MODULE_EXPORT int stay_in_foreground = 0;
|
||||||
MODULE_EXPORT int supports_multiple = 0;
|
MODULE_EXPORT int supports_multiple = 0;
|
||||||
MODULE_EXPORT char *symbol_prefix = "lircin_";
|
MODULE_EXPORT char *symbol_prefix = "lircin_";
|
||||||
|
|
||||||
/***********************************************************
|
|
||||||
* init() should set up any device-specific stuff, and
|
/**
|
||||||
* point all the function pointers.
|
* Initialize the driver.
|
||||||
|
* \param drvthis Pointer to driver structure.
|
||||||
|
* \retval 0 Success.
|
||||||
|
* \retval <0 Error.
|
||||||
*/
|
*/
|
||||||
MODULE_EXPORT int
|
MODULE_EXPORT int
|
||||||
lircin_init (Driver *drvthis)
|
lircin_init (Driver *drvthis)
|
||||||
@@ -155,8 +159,10 @@ lircin_init (Driver *drvthis)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*********************************************************************
|
|
||||||
* Closes the device
|
/**
|
||||||
|
* Close the driver (do necessary clean-up).
|
||||||
|
* \param drvthis Pointer to driver structure.
|
||||||
*/
|
*/
|
||||||
MODULE_EXPORT void
|
MODULE_EXPORT void
|
||||||
lircin_close (Driver *drvthis)
|
lircin_close (Driver *drvthis)
|
||||||
@@ -187,10 +193,12 @@ lircin_close (Driver *drvthis)
|
|||||||
drvthis->store_private_ptr(drvthis, NULL);
|
drvthis->store_private_ptr(drvthis, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*********************************************************************
|
|
||||||
* Tries to read a character from an input device...
|
/**
|
||||||
*
|
* Get key from the device.
|
||||||
* Return NULL for "nothing available".
|
* \param drvthis Pointer to driver structure.
|
||||||
|
* \return String representation of the key;
|
||||||
|
* \c NULL if nothing available / unmapped key.
|
||||||
*/
|
*/
|
||||||
MODULE_EXPORT const char *
|
MODULE_EXPORT const char *
|
||||||
lircin_get_key (Driver *drvthis)
|
lircin_get_key (Driver *drvthis)
|
||||||
|
|||||||
Reference in New Issue
Block a user