]> git.donarmstrong.com Git - kiibohd-controller.git/blobdiff - Scan/MD1/matrix.h
Code cleanup
[kiibohd-controller.git] / Scan / MD1 / matrix.h
index 7241e0e896e50d71c495c149cec0152e763e503d..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>
 
 
 
@@ -58,6 +54,3 @@ GPIO_Pin Matrix_rows[] = { gpio(D,1), gpio(D,2), gpio(D,3), gpio(D,4), gpio(D,5)
 // Define type of scan matrix
 Config Matrix_type = Config_Pulldown;
 
-
-#endif // __MATRIX_H
-