This repository has been archived on 2024-05-05. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
UAV/yaokon/Core/Src/queue.h
2023-10-06 15:07:07 +08:00

38 lines
641 B
C

/*
*@文件:queue.h
*@作者:‘你遇了我’
*@time:2022/11/13
*@联系:QQ:321640253
*@描述:
*/
//
// Created by 86186 on 2022/11/13.
//
#ifndef LIST_QUEUE_H
#define LIST_QUEUE_H
#include "stdint.h"
#include "stdbool.h"
#include "stdlib.h"
#include "stdio.h"
#define Maxsize 20
typedef uint32_t quecuElemtype;
typedef struct{
quecuElemtype data[Maxsize];
int front,rear;
uint16_t size;
} SqQuecu;
void InitQuecu(SqQuecu *Q);
quecuElemtype deQueue(SqQuecu *Q);
bool enQueue(SqQuecu *Q,quecuElemtype e);
bool QueueEmpty(SqQuecu *Q);
// void DestroyQueue(SqQuecu *Q);
void DispQuecu(SqQuecu *Q);
#endif //LIST_QUEUE_H