dolphin_deed.h 575 B

1234567891011121314151617181920212223
  1. #pragma once
  2. #include <stdint.h>
  3. /* Countable deed that affects icounter*/
  4. typedef enum {
  5. // iButton
  6. DolphinDeedIButtonRead,
  7. DolphinDeedIButtonWrite,
  8. DolphinDeedIButtonEmulate,
  9. // for debug
  10. DolphinDeedWrong,
  11. // Special value, do not use
  12. DolphinDeedMax
  13. } DolphinDeed;
  14. typedef struct {
  15. int32_t icounter; // how many icounter get by Deed
  16. uint32_t limit_value; // how many deeds in limit interval
  17. uint32_t limit_interval; // interval, in minutes
  18. } DolphinDeedWeight;
  19. const DolphinDeedWeight* dolphin_deed_weight(DolphinDeed deed);