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

1 year ago
  1. #pragma ocne
  2. #include "cmsis_os.h"
  3. namespace iflytop {
  4. class ZQueue {
  5. private:
  6. int32_t m_num = 0;
  7. int32_t m_eachsize = 0;
  8. QueueHandle_t xQueue;
  9. public:
  10. void initialize(int32_t num, int32_t eachsize);
  11. void clear();
  12. bool send(uint8_t *data, size_t len, int32_t overtime);
  13. bool receive(uint8_t *data, size_t *len, int32_t overtime);
  14. bool isFull();
  15. bool isEmpty();
  16. };
  17. } // namespace iflytop