Fix comments and add wizard info.
authorasterix <asterix@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 9 Feb 2009 13:51:21 +0000 (13:51 +0000)
committerasterix <asterix@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 9 Feb 2009 13:51:21 +0000 (13:51 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2331 38d2e660-2303-0410-9eaa-f027e97ec537

bertos/cfg/cfg_pocketbus.h
bertos/net/pocketbus.c
bertos/net/pocketbus.h
bertos/net/pocketcmd.h

index f3f5fbcace8f6cda120bdb0cbb3a7e5b141ea167..47dfce889a1b314a36118b119b426c87ecb61dbc 100644 (file)
@@ -40,7 +40,7 @@
 #ifndef CFG_POCKETBUS_H
 #define CFG_POCKETBUS_H
 
-/// Buffer len for pockebus protocol.
+/// Buffer len for pockebus protocol. $WIZARD = { "type" : "int", "min" : "0" }
 #define CONFIG_POCKETBUS_BUFLEN     128
 
 #endif /* CFG_POCKETBUS_H */
index fb50a278cf1f7bcd6948ca657fab779aa51b75fd..a9cb4727c162362e7f594a702c5853e0c350a756 100644 (file)
@@ -98,7 +98,7 @@ void pocketbus_putchar(struct PocketBusCtx *ctx, uint8_t c)
        /* Escape characters with special meaning */
        if (c == POCKETBUS_ESC || c == POCKETBUS_STX || c == POCKETBUS_ETX)
                kfile_putc(POCKETBUS_ESC, ctx->fd);
-       
+
        kfile_putc(c, ctx->fd);
 }
 
@@ -115,7 +115,7 @@ void pocketbus_begin(struct PocketBusCtx *ctx, pocketbus_addr_t addr)
 
        /* Send STX */
        kfile_putc(POCKETBUS_STX, ctx->fd);
-       
+
        /* Send header */
        pocketbus_write(ctx, &hdr, sizeof(hdr));
 }
index ed970cd94ec8ef9f64e78edbaab27f886dbf9b9c..7e1317d7995bc2d285c03a8451c04ba40bc8334d 100644 (file)
  *
  * \author Francesco Sacchi <batt@develer.com>
  *
- * \brief pocketBus protocol interface.
+ * \brief Basical functions to use pocketBus protocol.
+ *
+ * $WIZARD_MODULE = {
+ * "name" : "pocketbus",
+ * "depends" : ["rotating_hash", "kfile"],
+ * "configuration" : "bertos/cfg/cfg_pocketbus.h"
+ * }
  */
 
 #ifndef NET_POCKETBUS_H
@@ -76,7 +82,7 @@ typedef uint16_t pocketbus_addr_t;
  */
 typedef struct PocketBusHdr
 {
-       #define POCKETBUS_VER 1 
+       #define POCKETBUS_VER 1
        uint8_t ver;   ///< packet version
        pocketbus_addr_t addr; ///< slave address
 } PocketBusHdr;
@@ -102,7 +108,7 @@ typedef struct PocketMsg
 {
        struct PocketBusCtx *ctx; ///< pocketBus message context
        pocketbus_addr_t addr;    ///< address for received packet
-       pocketbus_len_t len;      ///< payload length 
+       pocketbus_len_t len;      ///< payload length
        const uint8_t *payload;   ///< payload data
 } PocketMsg;
 
index 9f92b00bb0c7a2c6b0e2fcba8ace4d5a59162b48..7cbc98bfd1f2a44a0eb70d09d705bbe1e0ebf96e 100644 (file)
  * Copyright 2007 Develer S.r.l. (http://www.develer.com/)
  * -->
  *
- * \brief pocketBus protocol command layer interface.
+ * \brief PocketBus command abstraction layer.
  *
  * \version $Id: pocketcmd.h 20030 2007-12-04 16:16:09Z batt $
  *
  * \author Francesco Sacchi <batt@develer.com>
  *
+ * $WIZARD_MODULE = {
+ * "name" : "pocketcmd",
+ * "depends" : ["timer", "pocketbus"],
+ * "configuration" : ""
+ * }
  */
 
 #ifndef NET_POCKETCMD_H