Beginners: please read this post and this post before posting to the forum.
0 Members and 1 Guest are viewing this topic.
void bitbufInit (BitBuf *bitBuffer, unsigned char *start, unsigned short bytesize) initialize a buffer to start at a given address and have given size 00024 void bitbufInit(BitBuf* bitBuffer, unsigned char *start, unsigned short bytesize)00025 {00026 // set start pointer of the buffer00027 bitBuffer->dataptr = start;00028 bitBuffer->size = bytesize;00029 // initialize indexing and length00030 bitBuffer->dataindex = 0;00031 bitbufFlush(bitBuffer);00032 }
unsigned char theBuffer[256];BitBuf bitBuf;
bitbufInit(&bitBuf, theBuffer, sizeof(theBuffer));