]> git.donarmstrong.com Git - kiibohd-controller.git/blobdiff - Scan/MD1/matrix.h
Code cleanup
[kiibohd-controller.git] / Scan / MD1 / matrix.h
index 948f7db8ef0f921f64d25fae99d0b8bb3ee4b156..10a15d75da18430c6bfa98d822edc182f372dbba 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2014 by Jacob Alexander
+/* Copyright (C) 2014-2015 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
  * THE SOFTWARE.
  */
 
-#ifndef __MATRIX_H
-#define __MATRIX_H
+#pragma once
 
-// ----- Macros -----
+// ----- Includes -----
 
-// Convenience Macros
-#define gpio( port, pin ) { Port_##port, Pin_##pin }
-#define Matrix_colsNum sizeof( Matrix_cols ) / sizeof( GPIO_Pin )
-#define Matrix_rowsNum sizeof( Matrix_rows ) / sizeof( GPIO_Pin )
-#define Matrix_maxKeys sizeof( Matrix_scanArray ) / sizeof( KeyState )
+// Project Includes
+#include <matrix_setup.h>
 
 
 
 // Rows (Sense)
 //  PTD1..7
 
-// Debounce threshold
-#define DEBOUNCE_THRESHOLD 32
-
 // Define Rows (Sense) and Columns (Strobes)
-GPIO_Pin Matrix_cols[] = { gpio(B,0), gpio(B,1), gpio(B,2), gpio(B,3), gpio(B,16), gpio(B,17), gpio(C,4), gpio(C,5) };
+GPIO_Pin Matrix_cols[] = { gpio(B,0), gpio(B,1), gpio(B,2), gpio(B,3), gpio(B,16), gpio(B,17), gpio(C,4), gpio(C,5), gpio(D,0) };
 GPIO_Pin Matrix_rows[] = { gpio(D,1), gpio(D,2), gpio(D,3), gpio(D,4), gpio(D,5), gpio(D,6), gpio(D,7) };
 
 // Define type of scan matrix
-Config Matrix_type = Config_Pullup;
-
-
-#endif // __MATRIX_H
+Config Matrix_type = Config_Pulldown;