* -->
*
* \author Andrea Grandi <andrea@develer.com>
+ * \author Daniele Basile <asterix@develer.com>
*
- * \brief Tag protocol (protocol).
+ * \brief KeyTAG parser.
+ *
+ * This module parse TAG message that come from comunication channel,
+ * and convert the tag value into string.
*
* TAG protocol is decribed in this way:
* <pre>
#include <cfg/log.h>
#include <cfg/macros.h>
-#include <kern/kfile.h>
+#include <io/kfile.h>
#include <string.h>
/**
*/
void keytag_poll(struct TagPacket *pkt)
{
- #warning __FILTER_NEXT_WARNING__
- #warning keytag_poll function is depreca use keytag_recv instead
uint8_t buf[CONFIG_TAG_MAX_LEN];
int len;
if ((len = keytag_recv(pkt, buf, sizeof(buf))) != EOF)
kfile_write(pkt->host, buf, len);
}
+/**
+ * Receive the tag message from channel, and if
+ * the tag is good put the converted string into given buffer.
+ * The fuction return the len of found tag string, otherwise EOF.
+ */
int keytag_recv(struct TagPacket *pkt, uint8_t *tag, size_t len)
{
int c;