eventUnit.h 634 B

123456789101112131415161718192021222324
  1. #ifndef __EVENTUNIT_H
  2. #define __EVENTUNIT_H
  3. #include <stdio.h>
  4. #include <stdint.h>
  5. #include <stdbool.h>
  6. #define EVENT_INDEX_MAX 32
  7. typedef struct
  8. {
  9. bool reload; //
  10. bool flag_1s; //
  11. uint32_t count; //
  12. uint32_t countSet; //
  13. }eventParams_ts;
  14. void eventDriver(void);
  15. void setEvent(uint32_t mask, bool reload, bool first, uint32_t timeOut_ms);
  16. void setEvent1s(uint32_t mask, bool reload, bool first, uint32_t timeOut_s);
  17. void event_post(uint32_t mask);
  18. void event_clear(uint32_t mask);
  19. uint32_t event_pend(void);
  20. uint32_t getEvent(uint32_t mask);
  21. #endif