Use shorter SPDX-License-Identifier

This commit is contained in:
フィルターペーパー 2025-07-26 07:46:40 +08:00
parent 54ece6abfa
commit bf6064d888
6 changed files with 39 additions and 105 deletions

View File

@ -1,27 +1,11 @@
/* // Copyright 2017 Alex Ong <the.onga@gmail.com>
* Copyright 2017 Alex Ong <the.onga@gmail.com> // Copyright 2020 Andrei Purdea <andrei@purdea.ro>
* Copyright 2020 Andrei Purdea <andrei@purdea.ro> // Copyright 2021 Simon Arlott
* Copyright 2021 Simon Arlott // SPDX-License-Identifier: GPL-2.0-or-later
* //
* This program is free software: you can redistribute it and/or modify // Asymetric per-key algorithm. After pressing a key, it immediately changes state,
* it under the terms of the GNU General Public License as published by // with no further inputs accepted until DEBOUNCE milliseconds have occurred. After
* the Free Software Foundation, either version 2 of the License, or // releasing a key, that state is pushed after no changes occur for DEBOUNCE milliseconds.
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
Asymetric per-key algorithm. After pressing a key, it immediately changes state,
with no further inputs accepted until DEBOUNCE milliseconds have occurred. After
releasing a key, that state is pushed after no changes occur for DEBOUNCE milliseconds.
*/
#include "debounce.h" #include "debounce.h"
#include "timer.h" #include "timer.h"

View File

@ -1,22 +1,10 @@
/* // Copyright 2017 Alex Ong<the.onga@gmail.com>
Copyright 2017 Alex Ong<the.onga@gmail.com> // Copyright 2021 Simon Arlott
Copyright 2021 Simon Arlott // SPDX-License-Identifier: GPL-2.0-or-later
This program is free software: you can redistribute it and/or modify //
it under the terms of the GNU General Public License as published by // Basic global debounce algorithm. Used in 99% of keyboards at time of implementation
the Free Software Foundation, either version 2 of the License, or // When no state changes have occured for DEBOUNCE milliseconds, we push the state.
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
Basic global debounce algorithm. Used in 99% of keyboards at time of implementation
When no state changes have occured for DEBOUNCE milliseconds, we push the state.
*/
#include "debounce.h" #include "debounce.h"
#include "timer.h" #include "timer.h"
#include <string.h> #include <string.h>

View File

@ -1,23 +1,10 @@
/* // Copyright 2017 Alex Ong<the.onga@gmail.com>
Copyright 2017 Alex Ong<the.onga@gmail.com> // Copyright 2020 Andrei Purdea<andrei@purdea.ro>
Copyright 2020 Andrei Purdea<andrei@purdea.ro> // Copyright 2021 Simon Arlott
Copyright 2021 Simon Arlott // SPDX-License-Identifier: GPL-2.0-or-later
This program is free software: you can redistribute it and/or modify //
it under the terms of the GNU General Public License as published by // Basic symmetric per-key algorithm. Uses an 8-bit counter per key.
the Free Software Foundation, either version 2 of the License, or // When no state changes have occured for DEBOUNCE milliseconds, we push the state.
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
Basic symmetric per-key algorithm. Uses an 8-bit counter per key.
When no state changes have occured for DEBOUNCE milliseconds, we push the state.
*/
#include "debounce.h" #include "debounce.h"
#include "timer.h" #include "timer.h"

View File

@ -1,23 +1,11 @@
/* // Copyright 2017 Alex Ong<the.onga@gmail.com>
Copyright 2017 Alex Ong<the.onga@gmail.com> // Copyright 2020 Andrei Purdea<andrei@purdea.ro>
Copyright 2020 Andrei Purdea<andrei@purdea.ro> // Copyright 2021 Simon Arlott
Copyright 2021 Simon Arlott // Copyright @filterpaper
This program is free software: you can redistribute it and/or modify // SPDX-License-Identifier: GPL-2.0-or-later
it under the terms of the GNU General Public License as published by //
the Free Software Foundation, either version 2 of the License, or // Basic symmetric per-row algorithm. Uses an 8-bit counter per row.
(at your option) any later version. // When no state changes have occured for DEBOUNCE milliseconds, we push the state.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
Basic symmetric per-row algorithm. Uses an 8-bit counter per row.
When no state changes have occured for DEBOUNCE milliseconds, we push the state.
*/
#include "debounce.h" #include "debounce.h"
#include "timer.h" #include "timer.h"

View File

@ -87,9 +87,9 @@ bool debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool
/** /**
* @brief Updates per-key debounce counters and determines if matrix needs updating. * @brief Updates per-key debounce counters and determines if matrix needs updating.
* *
* Iterates through each key in the matrix and checks its debounce counter. * Iterates through each key in the matrix and checks its debounce counter. If the debounce
* If the debounce period has elapsed for a key, the counter is reset and the matrix is marked for update. * period has elapsed, the counter is reset and the matrix is marked for update. Otherwise,
* Otherwise, the counter is decremented by the elapsed time and marked for further updates if needed. * the counter is decremented by the elapsed time and marked for further updates if needed.
* *
* @param elapsed_time The time elapsed since the last debounce update, in milliseconds. * @param elapsed_time The time elapsed since the last debounce update, in milliseconds.
*/ */

View File

@ -1,23 +1,10 @@
/* // Copyright 2017 Alex Ong<the.onga@gmail.com>
Copyright 2019 Alex Ong<the.onga@gmail.com> // Copyright 2021 Simon Arlott
Copyright 2021 Simon Arlott // SPDX-License-Identifier: GPL-2.0-or-later
This program is free software: you can redistribute it and/or modify //
it under the terms of the GNU General Public License as published by // Basic per-row algorithm. Uses an 8-bit counter per key.
the Free Software Foundation, either version 2 of the License, or // After pressing a key, it immediately changes state, and sets a counter.
(at your option) any later version. // No further inputs are accepted until DEBOUNCE milliseconds have occurred.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
Basic per-row algorithm. Uses an 8-bit counter per row.
After pressing a key, it immediately changes state, and sets a counter.
No further inputs are accepted until DEBOUNCE milliseconds have occurred.
*/
#include "debounce.h" #include "debounce.h"
#include "timer.h" #include "timer.h"