buffer.h
来自「在AVR 平台下的控制代码,通过CAN控制」· C头文件 代码 · 共 26 行
H
26 行
/**
* @defgroup TDAPI_UTIL_FIFO FIFO Management
*
* @{
*/
/** The header of the FIFO buffer. */
typedef struct FifoStruct
{
Byte ucHead; /**< Head index */
Byte ucTail; /**< Tail index */
Byte ucSize; /**< Buffer size */
Byte ucData[1]; /**< the first byte of the buffer */
} FifoStruct;
typedef FifoStruct * FifoHandle;
#define tdInitFIFO(gpFIFOBuffer, cLength) (tdInitFIFO2(gpFIFOBuffer, cLength), (FifoHandle)gpFIFOBuffer)
void tdInitFIFO2(Byte * gpFIFOBuffer, Byte cLength);
Bool tdGetFIFO(FifoHandle fh, Byte * apData);
Bool tdSetFIFO(FifoHandle fh, Byte ucData) ;
void tdClearFIFO(FifoHandle fh) ;
Bool tdFIFOIsEmpty(FifoHandle fh) ;
Bool tdFIFOIsFull(FifoHandle fh) ;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?