X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fnet%2Fkeytag.h;h=0985a2071d950fd2fb3491e86902aeff0bf6c5aa;hb=1f39f34d8ed6d5641ee9c2bca0bfce7de283d73e;hp=541005ea694c9fdb969cce3b637098ef186e5d3d;hpb=791e167e053bdd9250d34a9a5ccae6ccde4d6679;p=bertos.git diff --git a/bertos/net/keytag.h b/bertos/net/keytag.h index 541005ea..0985a207 100644 --- a/bertos/net/keytag.h +++ b/bertos/net/keytag.h @@ -56,8 +56,6 @@ */ #define TAG_MAX_LEN 14 -#define TAG_SER_PORT 0 -#define TAG_SER_BAUDRATE 9600 /** * Max number of chars to print in the communication serial @@ -69,14 +67,14 @@ */ 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 */