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.

23 lines
409 B

2 years ago
  1. #pragma once
  2. #include <functional>
  3. #include <list>
  4. #include "basic/base.hpp"
  5. namespace iflytop {
  6. using namespace std;
  7. class ZIRQDispatcher {
  8. public:
  9. typedef function<void(zchip_tim_t *)> ontimirq_t;
  10. list<ontimirq_t> m_ontimirqs;
  11. public:
  12. static ZIRQDispatcher &instance();
  13. void regTimIrqListener(ontimirq_t listener);
  14. public:
  15. void _callOnTimIrq(zchip_tim_t *tim);
  16. };
  17. } // namespace iflytop