0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #ifndef I2C_PCF8584_H
0014 #define I2C_PCF8584_H 1
0015
0016
0017 #define I2C_PCF_PIN 0x80
0018 #define I2C_PCF_ESO 0x40
0019 #define I2C_PCF_ES1 0x20
0020 #define I2C_PCF_ES2 0x10
0021 #define I2C_PCF_ENI 0x08
0022 #define I2C_PCF_STA 0x04
0023 #define I2C_PCF_STO 0x02
0024 #define I2C_PCF_ACK 0x01
0025
0026 #define I2C_PCF_START (I2C_PCF_PIN | I2C_PCF_ESO | I2C_PCF_STA | I2C_PCF_ACK)
0027 #define I2C_PCF_STOP (I2C_PCF_PIN | I2C_PCF_ESO | I2C_PCF_STO | I2C_PCF_ACK)
0028 #define I2C_PCF_REPSTART ( I2C_PCF_ESO | I2C_PCF_STA | I2C_PCF_ACK)
0029 #define I2C_PCF_IDLE (I2C_PCF_PIN | I2C_PCF_ESO | I2C_PCF_ACK)
0030
0031
0032
0033
0034 #define I2C_PCF_INI 0x40
0035 #define I2C_PCF_STS 0x20
0036 #define I2C_PCF_BER 0x10
0037 #define I2C_PCF_AD0 0x08
0038 #define I2C_PCF_LRB 0x08
0039 #define I2C_PCF_AAS 0x04
0040 #define I2C_PCF_LAB 0x02
0041 #define I2C_PCF_BB 0x01
0042
0043
0044 #define I2C_PCF_CLK3 0x00
0045 #define I2C_PCF_CLK443 0x10
0046 #define I2C_PCF_CLK6 0x14
0047 #define I2C_PCF_CLK 0x18
0048 #define I2C_PCF_CLK12 0x1c
0049
0050
0051 #define I2C_PCF_TRNS90 0x00
0052 #define I2C_PCF_TRNS45 0x01
0053 #define I2C_PCF_TRNS11 0x02
0054 #define I2C_PCF_TRNS15 0x03
0055
0056
0057
0058
0059
0060
0061 #define I2C_PCF_OWNADR 0
0062 #define I2C_PCF_INTREG I2C_PCF_ES2
0063 #define I2C_PCF_CLKREG I2C_PCF_ES1
0064
0065 #endif