You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
428 B
20 lines
428 B
#pragma once
|
|
#include "cmsis_os.h"
|
|
namespace iflytop {
|
|
class ZQueue {
|
|
private:
|
|
int32_t m_num = 0;
|
|
int32_t m_eachsize = 0;
|
|
QueueHandle_t xQueue;
|
|
|
|
public:
|
|
void initialize(int32_t num, int32_t eachsize);
|
|
void clear();
|
|
bool send(uint8_t *data, size_t len, int32_t overtime);
|
|
bool receive(uint8_t *data, size_t *len, int32_t overtime);
|
|
|
|
bool isFull();
|
|
bool isEmpty();
|
|
};
|
|
|
|
} // namespace iflytop
|