/**
 ********************************************************************
 * @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);

#ifdef __cplusplus
}
#endif

#endif