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.

30 lines
381 B

1 year ago
  1. #pragma once
  2. extern "C" {
  3. #include "cmsis_os.h"
  4. }
  5. namespace iflytop {
  6. using namespace std;
  7. class zmutex {
  8. public:
  9. SemaphoreHandle_t recursiveMutex;
  10. public:
  11. zmutex();
  12. ~zmutex();
  13. void init();
  14. bool isInit();
  15. void lock();
  16. void unlock();
  17. };
  18. class zlock_guard {
  19. zmutex& m_mutex;
  20. public:
  21. zlock_guard(zmutex& mutex);
  22. ~zlock_guard();
  23. };
  24. } // namespace iflytop