PageRenderTime 12ms CodeModel.GetById 7ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/drivers/acorn/char/pcf8583.h

https://bitbucket.org/abioy/linux
C Header | 41 lines | 29 code | 3 blank | 9 comment | 0 complexity | cf305abb981c9de1ea406f55220d2938 MD5 | raw file
Possible License(s): CC-BY-SA-3.0, GPL-2.0, LGPL-2.0, AGPL-1.0
 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 */
10struct 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
21struct mem {
22	unsigned int	loc;
23	unsigned int	nr;
24	unsigned char	*data;
25};
26
27#define RTC_GETDATETIME	0
28#define RTC_SETTIME	1
29#define RTC_SETDATETIME	2
30#define RTC_GETCTRL	3
31#define RTC_SETCTRL	4
32#define MEM_READ	5
33#define MEM_WRITE	6
34
35#define CTRL_STOP	0x80
36#define CTRL_HOLD	0x40
37#define CTRL_32KHZ	0x00
38#define CTRL_MASK	0x08
39#define CTRL_ALARMEN	0x04
40#define CTRL_ALARM	0x02
41#define CTRL_TIMER	0x01