summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan McGee <dpmcgee@gmail.com>2012-02-22 16:19:27 -0600
committerDan McGee <dpmcgee@gmail.com>2012-02-22 16:19:27 -0600
commit1b685b15bba25cdc5f79687f964b9bafc741fe41 (patch)
tree128a845e812cb40f207110c4fc5552b0de2d292e
parent2c56705afd46b871f1904f777b1fc3cc70a8a576 (diff)
downloadonkyocontrol-1b685b15bba25cdc5f79687f964b9bafc741fe41.tar.gz
onkyocontrol-1b685b15bba25cdc5f79687f964b9bafc741fe41.zip
Documentation updates
Signed-off-by: Dan McGee <dpmcgee@gmail.com>
-rw-r--r--command.c2
-rw-r--r--onkyo.c2
-rw-r--r--receiver.c5
3 files changed, 7 insertions, 2 deletions
diff --git a/command.c b/command.c
index 737c9c7..784b373 100644
--- a/command.c
+++ b/command.c
@@ -32,6 +32,7 @@ struct command;
typedef int (cmd_handler) (struct receiver *, const struct command *, char *);
+/** A specific command and associated handler function */
struct command {
unsigned long hash;
const char *name;
@@ -39,6 +40,7 @@ struct command {
cmd_handler *handler;
};
+/** A text to value mapping of code values, such as for inputs or modes */
struct code_map {
unsigned long hash;
const char *key;
diff --git a/onkyo.c b/onkyo.c
index 1cdba98..46b7974 100644
--- a/onkyo.c
+++ b/onkyo.c
@@ -45,6 +45,7 @@
#include "onkyo.h"
+/** A connection to a receiver and associated receive buffer */
struct conn {
int fd;
char *recv_buf;
@@ -733,7 +734,6 @@ static int process_input(struct conn *c)
/**
* Write a message to the currently connected clients.
- * @param rcvr the receiver this message is regarding
* @param msg the message to write, including trailing newline
* @return 0 on success, -1 on failure
*/
diff --git a/receiver.c b/receiver.c
index e33188b..b10222c 100644
--- a/receiver.c
+++ b/receiver.c
@@ -28,12 +28,15 @@
extern const char * const rcvr_err;
+/** A mapping of receiver status value to returned message */
struct status {
unsigned long hash;
const char *key;
const char *value;
};
+/** A mapping of receiver power status value to returned message as well as
+ * helping to internally track power on/off state */
struct power_status {
unsigned long hash;
const char *key;
@@ -520,7 +523,7 @@ static int parse_status(struct receiver *rcvr, int size, char *status)
* status depending on what zone was turned on or off.
* @param rcvr the receiver the message was received from
* @param zone the value 1, 2, or 3 corresponding to the zone
- * @param msg 1 for on, 0 for off
+ * @param value 1 for on, 0 for off
*/
static void update_power_status(struct receiver *rcvr, int zone, int value)
{