新建项目

This commit is contained in:
gitea committed 2023-04-29 09:09:12 +08:00
1 parent 5e2e890cfc
commit 633d9b872b
1351 files changed
+730564

No files matched your search

+40
View File
@@ -0,0 +1,40 @@
#pragma once
/*
* @Author: zhangpeng
* @Date: 2020-03-05 18:28:46
* @LastEditTime: 2020-03-05 20:11:27
* @LastEditors: zhangpeng
* @Description: New File
* @FilePath: \Firmware\user\fifo.h
* @Copyright (c) 2019-2021 ZhangYeJinZhi.Co.Ltd. All rights reserved.
*/
#ifndef _FIFO_H
#define _FIFO_H
#include <stdlib.h>
#include <string.h>
#define RECERIVRSIZE 6
typedef struct {
int length;
char data[256];
char type;
}data_t;
typedef struct {
int read;
int write;
int count;
char * data;
int max_count;// 最大多少个队列
}Fifo_t, *Fifo_p;
int FifoRead(Fifo_p fifo, char * buf, int length);
int FifoWrite(Fifo_p fifo, char *buf, int length);
void FifoInit(Fifo_p fifo, char * data, int max);
#endif/*_USARTBUF_H*/