File: vfc_i2c.h

package info (click to toggle)
kernel-source-sparc-2.2.1 2.2.1
  • links: PTS
  • area: main
  • in suites: slink
  • size: 62,800 kB
  • ctags: 188,320
  • sloc: ansic: 1,114,164; asm: 49,922; makefile: 8,272; sh: 1,831; perl: 1,584; tcl: 409; lisp: 218; cpp: 186; awk: 133; sed: 72
file content (44 lines) | stat: -rw-r--r-- 942 bytes parent folder | download | duplicates (23)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef _LINUX_VFC_I2C_H_
#define _LINUX_VFC_I2C_H_

/* control bits */
#define PIN  (0x80000000)
#define ESO  (0x40000000)
#define ES1  (0x20000000)
#define ES2  (0x10000000)
#define ENI  (0x08000000)
#define STA  (0x04000000)
#define STO  (0x02000000)
#define ACK  (0x01000000)

/* status bits */
#define STS  (0x20000000)
#define BER  (0x10000000)
#define LRB  (0x08000000)
#define AAS  (0x04000000)
#define LAB  (0x02000000)
#define BB   (0x01000000)

#define SEND_I2C_START (PIN | ESO | STA)
#define SEND_I2C_STOP (PIN | ESO | STO)
#define CLEAR_I2C_BUS (PIN | ESO | ACK)
#define NEGATIVE_ACK ((ESO) & ~ACK)

#define SELECT(a) (a)
#define S0 (PIN | ESO | ES1)
#define S0_OWN (PIN)
#define S2 (PIN | ES1)
#define S3 (PIN | ES2)

#define ENABLE_SERIAL (PIN | ESO)
#define DISABLE_SERIAL (PIN)
#define RESET (PIN)

#define XMIT_LAST_BYTE (1)
#define VFC_I2C_ACK_CHECK (1)
#define VFC_I2C_NO_ACK_CHECK (0)

#endif /* _LINUX_VFC_I2C_H_ */