📄 buffer.h
字号:
#ifndef BUFFER_H
#define BUFFER_H
typedef struct struct_cBuffer
{
unsigned char *dataptr; ///< the physical memory address where the buffer is stored
unsigned short size; ///< the allocated size of the buffer
unsigned short datalength; ///< the length of the data currently in the buffer
unsigned short dataindex; ///< the index into the buffer where the data starts
} cBuffer;
void bufferInit(cBuffer* buffer, unsigned char *start, unsigned short size);
unsigned char bufferGetFromFront(cBuffer* buffer);
void bufferDumpFromFront(cBuffer* buffer, unsigned short numbytes);
unsigned char bufferGetAtIndex(cBuffer* buffer, unsigned short index);
unsigned char bufferAddToEnd(cBuffer* buffer, unsigned char data);
unsigned char bufferIsNotFull(cBuffer* buffer);
void bufferFlush(cBuffer* buffer);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -