#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 */
/* 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);
}
/* Send STX */
kfile_putc(POCKETBUS_STX, ctx->fd);
-
+
/* Send header */
pocketbus_write(ctx, &hdr, sizeof(hdr));
}
*
* \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
*/
typedef struct PocketBusHdr
{
- #define POCKETBUS_VER 1
+ #define POCKETBUS_VER 1
uint8_t ver; ///< packet version
pocketbus_addr_t addr; ///< slave address
} PocketBusHdr;
{
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;
* 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