X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=net%2Fkeytag.h;h=541005ea694c9fdb969cce3b637098ef186e5d3d;hb=HEAD;hp=ab87be21797458253a199bc9aa67b16f25ff971c;hpb=c46f98c91241a9459c2006235c614d998b7511ba;p=bertos.git diff --git a/net/keytag.h b/net/keytag.h deleted file mode 100644 index ab87be21..00000000 --- a/net/keytag.h +++ /dev/null @@ -1,81 +0,0 @@ -/** - * \file - * - * - * \author Andrea Grandi - * - * \brief Tag protocol. (interface). - */ - -#ifndef NET_KEYTAG_H -#define NET_KEYTAG_H - -/** - * Starting communication char (STX). - */ -#define TAG_STX 0x02 - -/** - * Ending communication char (ETX). - */ -#define TAG_ETX 0x03 - -/** - * Max buffer lenght - */ -#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 - */ -#define TAG_MAX_PRINT_CHARS 12 - -#include - -/** - * Structure of a Tag packet - */ -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 -} TagPacket; - -void keytag_init(struct TagPacket *pkt); -void keytag_poll(struct TagPacket *pkt); - -#endif /* NET_TAG_H */