ds1603.h 509 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * Dallas Semiconductors 1603 RTC driver
  3. *
  4. * Brian Murphy <brian@murphy.dk>
  5. *
  6. */
  7. #ifndef __DS1603_H
  8. #define __DS1603_H
  9. struct ds_defs {
  10. volatile u32 *reg;
  11. volatile u32 *data_reg;
  12. u32 rst;
  13. u32 clk;
  14. u32 data;
  15. u32 data_read_shift;
  16. char data_reversed;
  17. u32 huge_delay;
  18. };
  19. extern struct ds_defs *ds1603;
  20. void ds1603_set_trimmer(unsigned int);
  21. void ds1603_enable(void);
  22. void ds1603_disable(void);
  23. void ds1603_init(struct ds_defs *);
  24. #define TRIMMER_DEFAULT 3
  25. #define TRIMMER_DISABLE_RTC 0
  26. #endif