dcf77_util.h 429 B

1234567891011121314151617181920212223242526
  1. #ifndef __arha_dcf77util_h
  2. #define __arha_dcf77util_h
  3. #include <stdlib.h>
  4. #include <stdint.h>
  5. #include <stdbool.h>
  6. void set_dcf_message(
  7. uint8_t* dest,
  8. uint8_t minute,
  9. uint8_t hour,
  10. uint8_t day,
  11. uint8_t month,
  12. uint8_t year,
  13. uint8_t dow,
  14. bool dst,
  15. bool predst,
  16. bool abnormal,
  17. bool leap,
  18. uint16_t civbits);
  19. #ifndef BBIT
  20. #define BBIT(B, shift) (!!(B & (1 << shift)))
  21. #endif
  22. #endif