Library for MAX7300 GPIO Expander

Dependents:   MAX14871_Shield

Files at this revision

API Documentation at this revision

Comitter:
j3
Date:
Thu Jul 23 21:25:52 2015 +0000
Parent:
2:fd2de5d21702
Child:
4:4ffbd5539b69
Commit message:
added () around defines

Changed in this revision

max7300.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/max7300.cpp	Sun Jul 19 01:40:10 2015 +0000
+++ b/max7300.cpp	Thu Jul 23 21:25:52 2015 +0000
@@ -47,17 +47,17 @@
 
 
 //configuration register bits
-#define MAX7300_S_BIT                   0x01
-#define MAX7300_M_BIT                   0x80
+#define MAX7300_S_BIT                   (0x01)
+#define MAX7300_M_BIT                   (0x80)
 
 //registers
-#define MAX7300_CONFIGURATION           0x04
-#define MAX7300_TRANSITION_DETECT_MASK  0x06
-#define MAX7300_PORT_CONFIGURATION      0x09
-#define MAX7300_PORT_ONLY_BASE_ADRS     0x20
+#define MAX7300_CONFIGURATION           (0x04)
+#define MAX7300_TRANSITION_DETECT_MASK  (0x06)
+#define MAX7300_PORT_CONFIGURATION      (0x09)
+#define MAX7300_PORT_ONLY_BASE_ADRS     (0x20)
 
 //helper for calclating register addresses in 8 port wide fxs
-#define MAX7300_8_PORTS_OFFSET          0x40
+#define MAX7300_8_PORTS_OFFSET          (0x40)
 
 
 //*********************************************************************