mqtt client release v1.1.0 ...
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* @Author: jiejie
|
||||
* @Github: https://github.com/jiejieTop
|
||||
* @Date: 2019-12-25 23:54:38
|
||||
* @LastEditTime: 2020-02-25 08:10:01
|
||||
* @LastEditTime: 2020-06-17 15:10:03
|
||||
* @Description: the code belongs to jiejie, please keep the author information and source code according to the license.
|
||||
*/
|
||||
#ifndef _FIFO_H_
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
#include "salof_defconfig.h"
|
||||
|
||||
#ifdef USE_LOG
|
||||
#ifdef SALOF_USING_LOG
|
||||
|
||||
#define FIFO_READ 0
|
||||
#define FIFO_WRITE 1
|
||||
@@ -18,8 +18,7 @@
|
||||
#define FIFO_MAX(a,b) (((a) > (b)) ? (a) : (b))
|
||||
#define FIFO_MIN(a,b) (((a) < (b)) ? (a) : (b))
|
||||
|
||||
struct fifo
|
||||
{
|
||||
struct salof_fifo {
|
||||
unsigned int size; /* fifo size */
|
||||
unsigned int in; /* data input pointer (in % size) */
|
||||
unsigned int out; /* data output pointer (out % size) */
|
||||
@@ -27,13 +26,13 @@ struct fifo
|
||||
salof_sem sem; /* sem */
|
||||
void *buff; /* data area */
|
||||
};
|
||||
typedef struct fifo * fifo_t;
|
||||
typedef struct salof_fifo * salof_fifo_t;
|
||||
|
||||
fifo_t fifo_create(unsigned int size);
|
||||
unsigned int fifo_write(fifo_t fifo, void *buff, unsigned int len, unsigned int timeout);
|
||||
unsigned int fifo_read(fifo_t fifo, void *buff, unsigned int len, unsigned int timeout);
|
||||
unsigned int fifo_read_able(fifo_t fifo);
|
||||
unsigned int fifo_write_able(fifo_t fifo);
|
||||
salof_fifo_t salof_fifo_create(unsigned int size);
|
||||
unsigned int salof_fifo_write(salof_fifo_t fifo, void *buff, unsigned int len, unsigned int timeout);
|
||||
unsigned int salof_fifo_read(salof_fifo_t fifo, void *buff, unsigned int len, unsigned int timeout);
|
||||
unsigned int salof_fifo_read_able(salof_fifo_t fifo);
|
||||
unsigned int salof_fifo_write_able(salof_fifo_t fifo);
|
||||
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user