]> rtime.felk.cvut.cz Git - lincan.git/blob - embedded/arch/generic/defines/ads1x46.h
Update of system-less architecture and board support code to actual uLAN.sf.net version.
[lincan.git] / embedded / arch / generic / defines / ads1x46.h
1 #ifndef _ADS1X46_H
2 #define _ADS1X46_H
3
4 #define ADS_REG_BCS             0x00
5 #define RBCS1                   (1<<7)
6 #define RBCS0                   (1<<6)
7
8 #define ADS_REG_VBIAS           0x01
9 #define RVBIAS1                 (1<<1)
10 #define RVBIAS0                 (1<<0)
11
12 #define ADS_REG_MUX1            0x02
13 #define RCLKSTAT                (1<<7)
14 #define RMUXCAL2                (1<<2)
15 #define RMUXCAL1                (1<<1)
16 #define RMUXCAL0                (1<<0)
17
18 #define ADS_REG_SYS0            0x03
19 #define RPGA2                   (1<<6)
20 #define RPGA1                   (1<<5)
21 #define RPGA0                   (1<<4)
22 #define RDR3                    (1<<3)
23 #define RDR2                    (1<<2)
24 #define RDR1                    (1<<1)
25 #define RDR0                    (1<<0)
26
27 #define ADS_REG_OFC0            0x04
28 #define ADS_REG_OFC1            0x05
29 #define ADS_REG_OFC2            0x06
30 #define ADS_REG_FSC0            0x07
31 #define ADS_REG_FSC1            0x08
32 #define ADS_REG_FSC2            0x09
33 #define ADS_REG_ID              0x0A
34 #define RDRDY_MODE              (1<<3)
35
36 #define ADS_CMD_WAKEUP          0x00
37 #define ADS_CMD_SLEEP           0x02
38 #define ADS_CMD_SYNC            0x04
39 #define ADS_CMD_RESET           0x06
40 #define ADS_CMD_PO_INIT         0x0E
41 #define ADS_CMD_NOP             0xFF
42
43 #define ADS_CMD_RDATA           0x12
44 #define ADS_CMD_RDATAC          0x14
45 #define ADS_CMD_SDATAC          0x16
46
47 #define ADS_CMD_RREG            0x20
48 #define ADS_CMD_WREG            0x40
49
50 #define ADS_CMD_SYSOCAL         0x60
51 #define ADS_CMD_SYSGCAL         0x61
52 #define ADS_CMD_SELFCAL         0x62
53
54
55 #endif /* _ADS1X46_H */
56