eventUnit.h 511 B

12345678910111213141516171819202122
  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. uint32_t count; //
  11. uint32_t countSet; //
  12. }eventParams_ts;
  13. void eventDriver(void);
  14. void setEvent(uint32_t mask, bool reload, uint32_t timeOut_ms);
  15. void event_post(uint32_t mask);
  16. void event_clear(uint32_t mask);
  17. uint32_t event_pend(void);
  18. uint32_t getEvent(uint32_t mask);
  19. #endif