diff Scan/MatrixARM/matrix_scan.c @ 424:0d1cc6ec4af7

Merge branch 'master' of github.com:kiibohd/controller
author CryHam <cryham@gmail.com>
date Tue, 01 Mar 2016 19:40:00 +0100
parents be6b57c5b438 23a1868b4ac2
children 7bc4c6249dff
line wrap: on
line diff
--- a/Scan/MatrixARM/matrix_scan.c	Tue Mar 01 19:38:43 2016 +0100
+++ b/Scan/MatrixARM/matrix_scan.c	Tue Mar 01 19:40:00 2016 +0100
@@ -1,4 +1,4 @@
-/* Copyright (C) 2014-2015 by Jacob Alexander
+/* Copyright (C) 2014-2016 by Jacob Alexander
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
@@ -452,7 +452,7 @@
 
 
 	// Matrix ghosting check and elimination
-	// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 
+	// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
 #ifdef GHOSTING_MATRIX
 	// strobe = column, sense = row
 
@@ -489,7 +489,7 @@
 		row_use[row] = used;
 		row_ghost[row] = 0;  // clear
 	}
-	
+
 	// Check if matrix has ghost
 	// Happens when key is pressed and some other key is pressed in same row and another in same column
 	//print("  G ");
@@ -518,10 +518,10 @@
 			uint8_t key = Matrix_colsNum * row + col;
 			KeyState *state = &Matrix_scanArray[ key ];
 			KeyGhost *st = &Matrix_ghostArray[ key ];
-			
+
 			// col or row is ghosting (crossed)
 			uint8_t ghost = (col_ghost[col] > 0 || row_ghost[row] > 0) ? 1 : 0;
-			
+
 			st->prev = st->cur;  // previous
 			// save state if no ghost or outside ghosted area
 			if ( ghost == 0 )
@@ -529,16 +529,16 @@
 			// final
 			// use saved state if ghosting, or current if not
 			st->cur = ghost > 0 ? st->saved : state->curState;
-			
+
 			//  Send keystate to macro module
-			KeyPosition k = !st->cur 
+			KeyPosition k = !st->cur
 				? (!st->prev ? KeyState_Off : KeyState_Release)
 				: ( st->prev ? KeyState_Hold : KeyState_Press);
 			Macro_keyState( key, k );
 		}
 	}
 #endif
-	// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 
+	// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
 
 
 	// State Table Output Debug
@@ -587,6 +587,15 @@
 }
 
 
+// Called by parent scan module whenever the available current changes
+// current - mA
+void Matrix_currentChange( unsigned int current )
+{
+	// TODO - Any potential power savings?
+}
+
+
+
 // ----- CLI Command Functions -----
 
 void cliFunc_matrixDebug ( char* args )