?? can_buffer.h
字號(hào):
/************************************************************************
*
* Freescale Semicondactor
* ALL RIGHTS RESERVED
* (c) Copyright 2004Freescale Semiconductor
*
*************************************************************************
*
* FILE NAME: can_buffer.h
*
* PURPOSE:
*
* AUTHOR(s): Igor Byeda
*
*************************************************************************/
#ifndef _CAN_BUFFER_H
#define _CAN_BUFFER_H
#include "sys_global.h"
/************************************************************************
* Ring Buffer internal data structure
*************************************************************************/
typedef struct
{
can_Message_t * pBuf;
uint32 nBufSize; // the size of the ring buffer
uint32 pRD; // the read pointer (local array index)
uint32 pWR; // the write pointer (local array index)
uint32 tmp; // temporary field to make functions 'thread safe'
uint32 tmp2; // temporary field to make functions 'thread safe'
} rb_obj_t;
/************************************************************************
* Function Prototypes
*************************************************************************/
rb_obj_t * rb_Create(uint32 bufSizeWanted);
void rb_Destroy(rb_obj_t * rb);
uint32 rb_get_FreeSpace(rb_obj_t * rb);
uint32 rb_get_DataToReadSize(rb_obj_t * rb);
uint32 rb_data_Write(rb_obj_t * rb, can_Message_t * pExtBuf, uint32 nExtLen);
uint32 rb_data_Read (rb_obj_t * rb, can_Message_t * pExtBuf, uint32 nExtLen);
can_Message_t * rb_data_WriteOneVirtual(rb_obj_t *);
can_Message_t * rb_data_ReadOneVirtual(rb_obj_t *);
uint32 rb_data_WriteOneBack(rb_obj_t *);
#endif /* _CAN_BUFFER_H */
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -