summaryrefslogtreecommitdiff
path: root/i2c.h
diff options
context:
space:
mode:
authorroot <root@xena.domain.avtechpulse.com>2012-08-23 09:24:20 -0400
committerroot <root@xena.domain.avtechpulse.com>2012-08-23 09:24:20 -0400
commit8c3652a30c35847380e19397077e41362bdefcb6 (patch)
treeb59cacf814ba8d53284530a8107a0fca2320bbb2 /i2c.h
parenta453d3b91e5d947f4706c2c355948eda7a8f15d2 (diff)
added most commands to the parser, with supporting global vars
Diffstat (limited to 'i2c.h')
-rw-r--r--i2c.h28
1 files changed, 17 insertions, 11 deletions
diff --git a/i2c.h b/i2c.h
index c11d159..aa49abf 100644
--- a/i2c.h
+++ b/i2c.h
@@ -1,21 +1,27 @@
#include <glib.h>
#define PCF8574 0x20 /* secondary I2C peripheral device */
-#define Second_PW_Port 0 /* PCF8574 at three-bit address 0 is for dual PW board (1021D) */
-#define Second_Dly_Port 1 /* PCF8574 at three-bit address 1 is for dual delay board (AVX-DD-A3-PS-TC) */
-#define To_Self_Cal_Port 2 /* PCF8574 at three-bit address 2 is for self-cal PCB 226A */
-#define From_Self_Cal_Port 3 /* PCF8574 at three-bit address 3 is for self-cal PCB 226A */
+#define Second_PW_Port 0 /* PCF8574 at three-bit address 0 is for dual PW board (1021D) */
+#define Second_Dly_Port 1 /* PCF8574 at three-bit address 1 is for dual delay board (AVX-DD-A3-PS-TC) */
+#define To_Self_Cal_Port 2 /* PCF8574 at three-bit address 2 is for self-cal PCB 226A */
+#define From_Self_Cal_Port 3 /* PCF8574 at three-bit address 3 is for self-cal PCB 226A */
#define PCF8574A 0x38 /* Main I2C peripheral device */
-#define Button_Press_Port 0 /* PCF8574A at three-bit address 0 is for detecting button presses */
-#define LCD_Port 1 /* PCF8574A at three-bit address 1 is for LCD */
-#define Lower_Encoder_Port 2 /* PCF8574A at three-bit address 2 is for lower encoder counters */
-#define Upper_Encoder_Port 3 /* PCF8574A at three-bit address 3 is for upper encoder counter */
-#define Curr_Mon_LSB 4 /* PCF8574A at three-bit address 4 is for current monitor */
-#define Curr_Mon_MSB 5 /* PCF8574A at three-bit address 5 is for current monitor */
-#define rise_time_port 4 /* PCF8574A at three-bit address 4 is for rise time circuit in AVRQ */
+#define Button_Press_Port 0 /* PCF8574A at three-bit address 0 is for detecting button presses */
+#define LCD_Port 1 /* PCF8574A at three-bit address 1 is for LCD */
+#define Lower_Encoder_Port 2 /* PCF8574A at three-bit address 2 is for lower encoder counters */
+#define Upper_Encoder_Port 3 /* PCF8574A at three-bit address 3 is for upper encoder counter */
+#define Curr_Mon_LSB 4 /* PCF8574A at three-bit address 4 is for current monitor */
+#define Curr_Mon_MSB 5 /* PCF8574A at three-bit address 5 is for current monitor */
+#define rise_time_port 4 /* PCF8574A at three-bit address 4 is for rise time circuit in AVRQ */
/* 6 and 7 reserved for dual-channel current monitor */
+#define Overload_Input 64 /* mask for main overload input */
+#define Over_Temp 0x10 /* over-temperature */
+#define Over_Volt 0x20 /* over-voltage */
+#define Over_Other 0x40 /* over-other */
+
+
void I2C_Write(gulong address, guchar value);
guchar I2C_Read(gulong address);