dolphin_deed.h 630 B

123456789101112131415161718192021222324
  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. int32_t butthurt; // how many icounter get by Deed
  17. uint32_t limit_value; // how many deeds in limit interval
  18. uint32_t limit_interval; // interval, in minutes
  19. } DolphinDeedWeight;
  20. const DolphinDeedWeight* dolphin_deed_weight(DolphinDeed deed);