pcf8583.h 866 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * linux/drivers/acorn/char/pcf8583.h
  3. *
  4. * Copyright (C) 2000 Russell King
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. */
  10. struct rtc_tm {
  11. unsigned char cs;
  12. unsigned char secs;
  13. unsigned char mins;
  14. unsigned char hours;
  15. unsigned char mday;
  16. unsigned char mon;
  17. unsigned char year_off;
  18. unsigned char wday;
  19. };
  20. struct mem {
  21. unsigned int loc;
  22. unsigned int nr;
  23. unsigned char *data;
  24. };
  25. #define RTC_GETDATETIME 0
  26. #define RTC_SETTIME 1
  27. #define RTC_SETDATETIME 2
  28. #define RTC_GETCTRL 3
  29. #define RTC_SETCTRL 4
  30. #define MEM_READ 5
  31. #define MEM_WRITE 6
  32. #define CTRL_STOP 0x80
  33. #define CTRL_HOLD 0x40
  34. #define CTRL_32KHZ 0x00
  35. #define CTRL_MASK 0x08
  36. #define CTRL_ALARMEN 0x04
  37. #define CTRL_ALARM 0x02
  38. #define CTRL_TIMER 0x01