Refactoring code. Redefined TagPacket struct and keytag_init to support the new imple...
[bertos.git] / bertos / net / keytag.h
index 541005ea694c9fdb969cce3b637098ef186e5d3d..b815a8b1b117328d770a347d55a5665d846887e0 100644 (file)
  */
 typedef struct TagPacket
 {
-       KFileSerial *tag_ser;           // Tag serial
-       KFileSerial *comm_ser;        // Communication serial
-       bool sync;                      // Status flag: true if we find an STX
-       uint16_t len;                   // Packet lenght
-       uint8_t buf[TAG_MAX_LEN];       // Reception buffer
+       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
+       uint8_t buf[TAG_MAX_LEN];       ///< Reception buffer
 } TagPacket;
 
-void keytag_init(struct TagPacket *pkt);
+void keytag_init(struct TagPacket *pkt, struct KFile *comm, struct KFile *tag);
 void keytag_poll(struct TagPacket *pkt);
 
 #endif /* NET_TAG_H */