X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fnet%2Fkeytag.h;h=2a2c5fbfe1ef3fed4bc35eae19e59547b5fe89ab;hb=4922192a646356b0be73508d946dd619ffe3a5e1;hp=375b490e9e32325243451495a897422828898a7e;hpb=4c1f21207a513ed836c86143b550092bae866084;p=bertos.git diff --git a/bertos/net/keytag.h b/bertos/net/keytag.h index 375b490e..2a2c5fbf 100644 --- a/bertos/net/keytag.h +++ b/bertos/net/keytag.h @@ -45,7 +45,7 @@ #include -#include +#include /** @@ -56,11 +56,13 @@ typedef struct TagPacket KFile *tag; ///< Tag communication channel KFile *host; ///< Host communication channel bool sync; ///< Status flag: true if we find an STX - uint16_t len; ///< Packet lenght + size_t len; ///< Packet lenght uint8_t buf[CONFIG_TAG_MAX_LEN]; ///< Reception buffer } TagPacket; void keytag_init(struct TagPacket *pkt, struct KFile *comm, struct KFile *tag); +int keytag_recv(struct TagPacket *pkt, uint8_t *tag, size_t len); + void keytag_poll(struct TagPacket *pkt); #endif /* NET_TAG_H */