Skip to content

Commit

Permalink
p_buff
Browse files Browse the repository at this point in the history
  • Loading branch information
Chong Liu committed Jan 27, 2024
1 parent 919cd5a commit 8bcd50d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions F01_Common_Functions/inc/common_ring_buffer.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/*
* @FilePath : \Practice_LeetCode_C\F01_Common_Functions\inc\commonRingBuffer.h
* @FilePath : \Practice_LeetCode_C\F01_Common_Functions\inc\common_ring_buffer.h
* @Author : Chong Liu
* @CreateDate : 2023-10-21 14:22:20
* @LastEditors : Chong Liu
* @LastEditTime : 2024-01-18 23:14:08
* @LastEditTime : 2024-01-27 11:59:33
* =================================================================================
* Copyright (c) 2023 by Chong Liu, All Rights Reserved.
* =================================================================================
Expand All @@ -21,7 +21,7 @@
/* */
/**********************************************************************************/
typedef struct {
uint8_t *pBuff; /* Ring buffer array */
uint8_t *p_buff; /* Ring buffer array */
int16_t buffLen; /* Ring buffer length */
int16_t dataLen; /* Ring buffer data length */
int16_t dataIdx; /* Ring buffer data index */
Expand All @@ -32,7 +32,7 @@ typedef struct {
/* UTILITY FUNCTIONS */
/* */
/**********************************************************************************/
int16_t RingBuffer_Init(RingBuffer *pRing, uint8_t *pBuff, int16_t buffLen); /* Initialize a ring buffer */
int16_t RingBuffer_Init(RingBuffer *pRing, uint8_t *p_buff, int16_t buffLen); /* Initialize a ring buffer */
int16_t RingBuffer_AddByte(RingBuffer *pRing, uint8_t byte); /* Add a byte to the ring buffer */
int16_t RingBuffer_GetByte(RingBuffer *pRing, uint8_t *pByte); /* Get a byte from the ring buffer */

Expand Down
4 changes: 2 additions & 2 deletions F01_Common_Functions/src/common_ring_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,11 @@ void RingBuffer_Print(RingBuffer *pRing) {
* @description: 环形 buffer 初始化
* =================================================================================
* @param {RingBuffer} *pRing
* @param {uint8_t} *pBuff
* @param {uint8_t} *p_buff
* @param {int16_t} buffLen
* @return {int16_t}
*/
int16_t RingBuffer_Init(RingBuffer *pRing, uint8_t *pBuff, int16_t buffLen) {
int16_t RingBuffer_Init(RingBuffer *pRing, uint8_t *p_buff, int16_t buffLen) {
RETURN_ERR_IF(pRing == NULL);
RETURN_ERR_IF(pBuff == NULL);
RETURN_ERR_IF(buffLen <= 0);
Expand Down

0 comments on commit 8bcd50d

Please sign in to comment.