X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fnet%2Fkeytag.c;h=dac1a11cb963582899f621c89fd2d1fcbbbc3d11;hb=1a8a2b9b57118be3f52d1261ebefac3875e67bcf;hp=2376305a07424ebfb4cf2c733f2a9d18ad57b924;hpb=33a94063da7261ecced063b6e8a80c2c77567cd3;p=bertos.git diff --git a/bertos/net/keytag.c b/bertos/net/keytag.c index 2376305a..dac1a11c 100644 --- a/bertos/net/keytag.c +++ b/bertos/net/keytag.c @@ -31,8 +31,12 @@ * --> * * \author Andrea Grandi + * \author Daniele Basile * - * \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: *
@@ -51,7 +55,7 @@
 #include 
 #include 
 
-#include 
+#include 
 
 #include 
 /**
@@ -77,14 +81,17 @@ static void keytag_clearPkt(struct TagPacket *pkt)
  */
 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;