diff Scan/matrix/matrix_scan.c @ 308:ab4515606277

Fix whitespace Use a consistent standard - Tabs in front for indenting, spaces after for anything else. This way everything stays nice and lined up while also letting users change there prefered indent level. Most of the new files from Haata where already in this format.
author Rowan Decker <Smasher816@gmail.com>
date Sun, 08 Mar 2015 18:40:01 -0700
parents 0c5d1fe99302
children
line wrap: on
line diff
--- a/Scan/matrix/matrix_scan.c	Sun Mar 08 17:25:13 2015 -0700
+++ b/Scan/matrix/matrix_scan.c	Sun Mar 08 18:40:01 2015 -0700
@@ -39,7 +39,7 @@
 // ----- Macros -----
 
 // -- pinSetup Macros --
-#define REG_SET(reg)	reg |=  (1 << ( matrix[row*(MAX_ROW_SIZE+1)+col] % 10 ) ) // Modulo 10 for the define offset for each pin set 12 or 32 -> shift of 2
+#define REG_SET(reg)    reg |=  (1 << ( matrix[row*(MAX_ROW_SIZE+1)+col] % 10 ) ) // Modulo 10 for the define offset for each pin set 12 or 32 -> shift of 2
 #define REG_UNSET(reg)  reg &= ~(1 << ( matrix[row*(MAX_ROW_SIZE+1)+col] % 10 ) )
 
 #define PIN_SET(pin,scan,direction) \
@@ -57,7 +57,7 @@
 			case scanDual: \
 				REG_SET(port##pin); break; \
 			case scanCol_powrRow: REG_UNSET(ddr##pin); REG_UNSET(DDR##pin); \
-			                      REG_SET(port##pin);  REG_SET(PORT##pin); break; \
+		                              REG_SET(port##pin);  REG_SET(PORT##pin); break; \
 			case powrRow: break; \
 			case powrCol: REG_SET(ddr##pin);  REG_SET(DDR##pin); \
 			              REG_SET(port##pin); REG_SET(PORT##pin); break; \
@@ -72,9 +72,9 @@
 			case scanDual: \
 				REG_SET(port##pin); break; \
 			case scanCol_powrRow: REG_SET(ddr##pin);    REG_SET(DDR##pin); \
-			                      REG_UNSET(port##pin); REG_UNSET(PORT##pin); break; \
+					      REG_UNSET(port##pin); REG_UNSET(PORT##pin); break; \
 			case powrRow: REG_SET(ddr##pin);  REG_SET(DDR##pin); \
-			              REG_SET(port##pin); REG_SET(PORT##pin); break; \
+				      REG_SET(port##pin); REG_SET(PORT##pin); break; \
 			case powrCol: break; \
 			} \
 			break
@@ -261,7 +261,7 @@
 	if ( showDebug == 0 ) // Only show once
 	{
 		matrix_debugPins();
-	}
+	}	
 }
 
 // Scans the given matrix determined by the scanMode method
@@ -380,7 +380,7 @@
 	_delay_us( 1 );
 	col = 1;
 	row = 1;
-	for ( ; col < (MAX_ROW_SIZE+1); col++ ) for ( ; row < (MAX_COL_SIZE+1); row++ ) 
+	for ( ; col < (MAX_ROW_SIZE+1); col++ ) for ( ; row < (MAX_COL_SIZE+1); row++ )	
 	{
 		// Scan over the pins for each of the rows, and using the pin alias to determine which pin to set
 		// (e.g. / 10 is for the pin name (A,B,C,etc.) and % 10 is for the position of the pin (A1,A2,etc.))
@@ -404,4 +404,4 @@
 	}
 #endif
 }
- 
+