Adding the rest of the matrix scanning modes

- Not tested yet
- Added bug fixes for the scanCol and scanRow methods
- Merged in the powered versions of scanCol and scanRow
- Added the scanDual, but still needs heavy testing
- The scanDual uses twice the memory per key, so it can only scan half
  as much compared to the other scan modes
This commit is contained in:
Jacob Alexander 2011-10-16 20:08:37 -07:00
parent ab9382acf3
commit aa77d5d8a4
3 changed files with 195 additions and 22 deletions

View file

@ -76,10 +76,17 @@ inline void scan_setup()
inline uint8_t scan_loop()
{
// Check count to see if the sample threshold may have been reached, otherwise collect more data
if ( scan_count++ < MAX_SAMPLES )
if ( scan_count < MAX_SAMPLES )
{
matrix_scan( (uint8_t*)matrix_pinout, KeyIndex_Array );
// scanDual requires 2 passes, and thus needs more memory per matrix_scan pass
#if scanMode == scanDual
scan_count += 2;
#else
scan_count++;
#endif
// Signal Main Detection Loop to continue scanning
return 0;
}