Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

stxetx.h File Reference


Detailed Description

Definition in file stxetx.h.

#include "buffer.h"
#include "stxetxconf.h"

Go to the source code of this file.

Defines

#define STX   0x02
#define ETX   0x03
#define STXETX_HEADERLENGTH   4
#define STXETX_TRAILERLENGTH   2
#define STXETX_STATUSOFFSET   1
#define STXETX_TYPEOFFSET   2
#define STXETX_LENGTHOFFSET   3
#define STXETX_DATAOFFSET   4
#define STXETX_CHECKSUMOFFSET   4
#define STXETX_NOETXSTXCHECKSUM   3

Functions

void stxetxInit (void(*dataout_func)(unsigned char data))
 Initialize STX/ETX packet protocol library.
void stxetxSend (unsigned char status, unsigned char type, unsigned char datalength, unsigned char *dataptr)
 Send/Create STX/ETX packet.
unsigned char stxetxProcess (cBuffer *rxBuffer)
 Process a buffer containing STX/ETX packets.
unsigned char stxetxGetRxPacketStatus (void)
 Returns the received packet's status.
unsigned char stxetxGetRxPacketType (void)
 Returns the received packet's type.
unsigned char stxetxGetRxPacketDatalength (void)
 Returns the received packet's datalength.
unsigned char * stxetxGetRxPacketData (void)
 Returns pointer to the received packet's data.


Generated on Sun Oct 29 03:41:08 2006 for Procyon AVRlib by  doxygen 1.4.2