JZring.h
1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/**
********************************************************************
* @file JZring.h
* 环形缓冲区
*
*********************************************************************
*/
/* Define to prevent recursive inclusion 避免重定义 -------------------------------------*/
#ifndef JZ_RING_H
#define JZ_RING_H
/* Includes ------------------------------------------------------------------*/
#include "JZsdk_Base/JZsdk_Code/JZsdk_Code.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
typedef void* T_JZringHandle;
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
T_JZsdkReturnCode JZring_Init(T_JZringHandle *ring, U8_t *buffer, U32_t size);
T_JZsdkReturnCode JZring_Write(T_JZringHandle ring, const U8_t *data, U32_t size);
T_JZsdkReturnCode JZring_Read(T_JZringHandle ring, U8_t *data, U32_t size, U32_t *readSize);
T_JZsdkReturnCode JZring_GetDataCount(T_JZringHandle ring, U32_t *count);
T_JZsdkReturnCode JZring_Reset(T_JZringHandle ring);
T_JZsdkReturnCode JZring_DeInit(T_JZringHandle ring);
#ifdef __cplusplus
}
#endif
#endif