X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Scan%2Fmatrix%2Fmatrix_scan.h;h=c89e216f0d61bf05a54352e006d51d3654061017;hb=5f262ea4b68a07e9b94ce0a49c0f7196e5f32b3b;hp=9492425a25080e6946da16111da1da933d307394;hpb=6557022f206483aea761e057b65dba500b5decee;p=kiibohd-controller.git diff --git a/Scan/matrix/matrix_scan.h b/Scan/matrix/matrix_scan.h index 9492425..c89e216 100644 --- a/Scan/matrix/matrix_scan.h +++ b/Scan/matrix/matrix_scan.h @@ -1,15 +1,15 @@ -/* Copyright (C) 2011 by Jacob Alexander - * +/* Copyright (C) 2011,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 * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: - * + * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -19,8 +19,7 @@ * THE SOFTWARE. */ -#ifndef __MATRIX_SCAN_H -#define __MATRIX_SCAN_H +#pragma once // ----- Includes ----- @@ -100,6 +99,14 @@ #define scanCol_powrRow 3 // Opposite of scanRow_powrCol #define scanDual 4 // Typical ~2KRO matrix +#define powrRow 5 // Matrix setup for powering a row, initially the row would be set low +#define powrCol 6 // Like powrRow but for columns + + +// ----- Direction ----- +#define columnSet 0 // PIN_SET_COL for PIN_SET +#define rowSet 1 // PIN_SET_ROW for PIN_SET + // ----- Variables ----- @@ -108,8 +115,6 @@ // ----- Functions ----- -void matrix_pinSetup( uint8_t *matrix ); +void matrix_pinSetup( uint8_t *matrix, uint8_t scanType ); void matrix_scan( uint8_t *matrix, uint8_t *detectArray ); -#endif // __MATRIX_SCAN_H -