X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Scan%2FMD1%2Fmatrix.h;h=10a15d75da18430c6bfa98d822edc182f372dbba;hb=5f262ea4b68a07e9b94ce0a49c0f7196e5f32b3b;hp=948f7db8ef0f921f64d25fae99d0b8bb3ee4b156;hpb=d6345c307fa4c64deb3f293fe91760f05c928120;p=kiibohd-controller.git diff --git a/Scan/MD1/matrix.h b/Scan/MD1/matrix.h index 948f7db..10a15d7 100644 --- a/Scan/MD1/matrix.h +++ b/Scan/MD1/matrix.h @@ -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 @@ -19,16 +19,12 @@ * 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 @@ -51,16 +47,10 @@ // 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;