]> git.donarmstrong.com Git - qmk_firmware.git/blobdiff - keyboards/duck/octagon/v1/matrix.c
Replace DEBOUNCING_DELAY (deprecated) with DEBOUNCE (#5997)
[qmk_firmware.git] / keyboards / duck / octagon / v1 / matrix.c
index 8555349943ce742fbae467e92b2c47625671d94e..a2bea865bc3a0807393396b41850581a643d1634 100644 (file)
@@ -22,7 +22,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include "print.h"
 #include "debug.h"
 
-static uint8_t debouncing = DEBOUNCING_DELAY;
+static uint8_t debouncing = DEBOUNCE;
 
 /* matrix state(1:on, 0:off) */
 static matrix_row_t matrix[MATRIX_ROWS];
@@ -84,7 +84,10 @@ uint8_t matrix_scan(void) {
       bool curr_bit = rows & (1<<row);
       if (prev_bit != curr_bit) {
         matrix_debouncing[row] ^= ((matrix_row_t)1<<col);
-        debouncing = DEBOUNCING_DELAY;
+        if (debouncing) {
+            dprint("bounce!: "); dprintf("%02X", debouncing); dprintln();
+        }
+        debouncing = DEBOUNCE;
       }
     }
     unselect_cols();