[Core] Remove matrix_is_modified() and debounce_is_active() (#15349)

fix_template_bootmagic
Stefan Kerkmann 4 years ago committed by GitHub
parent a3e9b347ec
commit c1297ceb97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      keyboards/40percentclub/ut47/matrix.c
  2. 5
      keyboards/ai03/orbit/matrix.c
  3. 6
      keyboards/amj96/matrix.c
  4. 7
      keyboards/angel64/alpha/matrix.c
  5. 7
      keyboards/angel64/rev1/matrix.c
  6. 7
      keyboards/bpiphany/kitten_paw/matrix.c
  7. 7
      keyboards/bpiphany/pegasushoof/2013/matrix.c
  8. 7
      keyboards/converter/palm_usb/matrix.c
  9. 7
      keyboards/converter/sun_usb/matrix.c
  10. 4
      keyboards/converter/usb_usb/custom_matrix.cpp
  11. 8
      keyboards/dc01/arrow/matrix.c
  12. 8
      keyboards/dc01/left/matrix.c
  13. 8
      keyboards/dc01/numpad/matrix.c
  14. 8
      keyboards/dc01/right/matrix.c
  15. 6
      keyboards/dm9records/ergoinu/matrix.c
  16. 6
      keyboards/duck/jetfire/matrix.c
  17. 4
      keyboards/ergodox_stm32/matrix.c
  18. 5
      keyboards/ergotaco/matrix.c
  19. 5
      keyboards/gboards/gergoplex/matrix.c
  20. 5
      keyboards/georgi/matrix.c
  21. 5
      keyboards/gergo/matrix.c
  22. 8
      keyboards/handwired/dactyl/matrix.c
  23. 6
      keyboards/handwired/frenchdev/matrix.c
  24. 6
      keyboards/handwired/not_so_minidox/matrix.c
  25. 8
      keyboards/handwired/promethium/matrix.c
  26. 8
      keyboards/handwired/pterodactyl/matrix.c
  27. 6
      keyboards/helix/pico/matrix.c
  28. 6
      keyboards/helix/rev1/matrix.c
  29. 6
      keyboards/helix/rev2/matrix.c
  30. 9
      keyboards/hhkb/ansi/matrix.c
  31. 9
      keyboards/hhkb/jp/matrix.c
  32. 6
      keyboards/hid_liber/matrix.c
  33. 6
      keyboards/kinesis/alvicstep/matrix.c
  34. 6
      keyboards/meira/matrix.c
  35. 8
      keyboards/nek_type_a/matrix.c
  36. 7
      keyboards/redscarf_iiplus/verb/matrix.c
  37. 7
      keyboards/redscarf_iiplus/verc/matrix.c
  38. 7
      keyboards/redscarf_iiplus/verd/matrix.c
  39. 4
      keyboards/sirius/unigo66/custom_matrix.cpp
  40. 5
      keyboards/sixkeyboard/matrix.c
  41. 8
      keyboards/sx60/matrix.c
  42. 7
      keyboards/thedogkeyboard/matrix.c
  43. 6
      keyboards/yosino58/rev1/matrix.c
  44. 2
      quantum/debounce.h
  45. 1
      quantum/debounce/asym_eager_defer_pk.c
  46. 2
      quantum/debounce/none.c
  47. 2
      quantum/debounce/sym_defer_g.c
  48. 1
      quantum/debounce/sym_defer_pk.c
  49. 1
      quantum/debounce/sym_eager_pk.c
  50. 1
      quantum/debounce/sym_eager_pr.c
  51. 2
      quantum/matrix.h
  52. 6
      quantum/matrix_common.c

@ -104,12 +104,6 @@ uint8_t matrix_scan(void)
return 1;
}
bool matrix_is_modified(void)
{
if (debouncing) return false;
return true;
}
inline
bool matrix_is_on(uint8_t row, uint8_t col)
{

@ -83,11 +83,6 @@ inline uint8_t matrix_rows(void) { return MATRIX_ROWS; }
inline uint8_t matrix_cols(void) { return MATRIX_COLS; }
bool matrix_is_modified(void) {
if (debounce_active()) return false;
return true;
}
inline bool matrix_is_on(uint8_t row, uint8_t col) { return (matrix[row] & ((matrix_row_t)1 << col)); }
inline matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; }

@ -108,12 +108,6 @@ uint8_t matrix_scan(void)
return 1;
}
bool matrix_is_modified(void)
{
if (debouncing) return false;
return true;
}
inline
bool matrix_is_on(uint8_t row, uint8_t col)
{

@ -90,13 +90,6 @@ uint8_t matrix_cols(void) {
return MATRIX_COLS;
}
//Deprecated.
bool matrix_is_modified(void)
{
if (debounce_active()) return false;
return true;
}
inline
bool matrix_is_on(uint8_t row, uint8_t col)
{

@ -90,13 +90,6 @@ uint8_t matrix_cols(void) {
return MATRIX_COLS;
}
//Deprecated.
bool matrix_is_modified(void)
{
if (debounce_active()) return false;
return true;
}
inline
bool matrix_is_on(uint8_t row, uint8_t col)
{

@ -117,13 +117,6 @@ uint8_t matrix_scan(void) {
return 1;
}
bool matrix_is_modified(void) {
if (debouncing)
return false;
else
return true;
}
inline bool matrix_is_on(uint8_t row, uint8_t col) {
return (matrix[row] & ((matrix_row_t)1<<col));
}

@ -110,13 +110,6 @@ uint8_t matrix_scan(void)
return 1;
}
bool matrix_is_modified(void)
{
if (debouncing)
return false;
return true;
}
inline
bool matrix_is_on(uint8_t row, uint8_t col)
{

@ -58,8 +58,6 @@ static uint16_t disconnect_counter = 0;
#define COL(code) ((code & COL_MASK) )
#define KEYUP(code) ((code & KEY_MASK) >>7 )
static bool is_modified = false;
__attribute__ ((weak))
void matrix_init_kb(void) {
matrix_init_user();
@ -354,11 +352,6 @@ uint8_t matrix_scan(void)
return code;
}
bool matrix_is_modified(void)
{
return is_modified;
}
inline
bool matrix_has_ghost(void)
{

@ -38,8 +38,6 @@ static uint8_t matrix[MATRIX_ROWS];
#define ROW(code) ((code>>3)&0xF)
#define COL(code) (code&0x07)
static bool is_modified = false;
__attribute__ ((weak))
void matrix_init_kb(void) {
matrix_init_user();
@ -154,11 +152,6 @@ uint8_t matrix_scan(void)
return code;
}
bool matrix_is_modified(void)
{
return is_modified;
}
inline
bool matrix_has_ghost(void)
{

@ -192,10 +192,6 @@ extern "C"
return 1;
}
bool matrix_is_modified(void) {
return matrix_is_mod;
}
bool matrix_is_on(uint8_t row, uint8_t col) {
uint8_t code = CODE(row, col);

@ -205,14 +205,6 @@ uint8_t matrix_scan(void)
return 1;
}
bool matrix_is_modified(void)
{
#if (DEBOUNCE > 0)
if (debouncing) return false;
#endif
return true;
}
inline
bool matrix_is_on(uint8_t row, uint8_t col)
{

@ -230,14 +230,6 @@ if (i2c_transaction(SLAVE_I2C_ADDRESS_NUMPAD, 0x1FFFF, 11)) {
return 1;
}
bool matrix_is_modified(void)
{
#if (DEBOUNCE > 0)
if (debouncing) return false;
#endif
return true;
}
inline
bool matrix_is_on(uint8_t row, uint8_t col)
{

@ -205,14 +205,6 @@ uint8_t matrix_scan(void)
return 1;
}
bool matrix_is_modified(void)
{
#if (DEBOUNCE > 0)
if (debouncing) return false;
#endif
return true;
}
inline
bool matrix_is_on(uint8_t row, uint8_t col)
{

@ -206,14 +206,6 @@ uint8_t matrix_scan(void)
return 1;
}
bool matrix_is_modified(void)
{
#if (DEBOUNCE > 0)
if (debouncing) return false;
#endif
return true;
}
inline
bool matrix_is_on(uint8_t row, uint8_t col)
{

@ -223,12 +223,6 @@ void matrix_slave_scan(void) {
}
}
bool matrix_is_modified(void)
{
if (debouncing) return false;
return true;
}
inline
bool matrix_is_on(uint8_t row, uint8_t col)
{

@ -116,12 +116,6 @@ uint8_t matrix_scan(void)
return 1;
}
bool matrix_is_modified(void)
{
if (debouncing) return false;
return true;
}
inline
bool matrix_is_on(uint8_t row, uint8_t col)
{

@ -119,10 +119,6 @@ uint8_t matrix_scan(void) {
return 0;
}
bool matrix_is_modified(void) {
return true;
}
inline
bool matrix_is_on(uint8_t row, uint8_t col) {
return (matrix[row] & (1 << col));

@ -199,11 +199,6 @@ uint8_t matrix_scan(void)
return 1;
}
bool matrix_is_modified(void) // deprecated and evidently not called.
{
return true;
}
inline
bool matrix_is_on(uint8_t row, uint8_t col)
{

@ -152,11 +152,6 @@ uint8_t matrix_scan(void) {
return 1;
}
bool matrix_is_modified(void) // deprecated and evidently not called.
{
return true;
}
inline bool matrix_is_on(uint8_t row, uint8_t col) { return (matrix[row] & ((matrix_row_t)1 << col)); }
inline matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; }

@ -220,11 +220,6 @@ uint8_t matrix_scan(void)
return 1;
}
bool matrix_is_modified(void) // deprecated and evidently not called.
{
return true;
}
inline
bool matrix_is_on(uint8_t row, uint8_t col)
{

@ -273,11 +273,6 @@ uint8_t matrix_scan(void) {
return 1;
}
bool matrix_is_modified(void) // deprecated and evidently not called.
{
return true;
}
inline bool matrix_is_on(uint8_t row, uint8_t col) { return (matrix[row] & ((matrix_row_t)1 << col)); }
inline matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; }

@ -281,14 +281,6 @@ uint8_t matrix_scan(void)
return 1;
}
bool matrix_is_modified(void) // deprecated and evidently not called.
{
#if (DEBOUNCE > 0)
if (debouncing) return false;
#endif
return true;
}
inline
bool matrix_is_on(uint8_t row, uint8_t col)
{

@ -174,12 +174,6 @@ uint8_t matrix_scan(void)
return 1;
}
bool matrix_is_modified(void)
{
if (debouncing) return false;
return true;
}
inline
bool matrix_is_on(uint8_t row, uint8_t col)
{

@ -239,12 +239,6 @@ void matrix_slave_scan(void) {
#endif
}
bool matrix_is_modified(void)
{
if (debouncing) return false;
return true;
}
inline
bool matrix_is_on(uint8_t row, uint8_t col)
{

@ -148,14 +148,6 @@ uint8_t matrix_scan(void)
return 1;
}
bool matrix_is_modified(void)
{
#if (DEBOUNCE > 0)
if (debouncing) return false;
#endif
return true;
}
inline
bool matrix_is_on(uint8_t row, uint8_t col)

@ -282,14 +282,6 @@ uint8_t matrix_scan(void)
return 1;
}
bool matrix_is_modified(void) // deprecated and evidently not called.
{
#if (DEBOUNCE > 0)
if (debouncing) return false;
#endif
return true;
}
inline
bool matrix_is_on(uint8_t row, uint8_t col)
{

@ -273,12 +273,6 @@ void matrix_slave_scan(void) {
#endif
}
bool matrix_is_modified(void)
{
if (debouncing) return false;
return true;
}
inline
bool matrix_is_on(uint8_t row, uint8_t col)
{

@ -239,12 +239,6 @@ void matrix_slave_scan(void) {
#endif
}
bool matrix_is_modified(void)
{
if (debouncing) return false;
return true;
}
inline
bool matrix_is_on(uint8_t row, uint8_t col)
{

@ -287,12 +287,6 @@ void matrix_slave_scan(void) {
#endif
}
bool matrix_is_modified(void)
{
if (debouncing) return false;
return true;
}
inline
bool matrix_is_on(uint8_t row, uint8_t col)
{

@ -163,15 +163,6 @@ uint8_t matrix_scan(void)
return 1;
}
bool matrix_is_modified(void)
{
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
if (matrix[i] != matrix_prev[i])
return true;
}
return false;
}
inline
bool matrix_has_ghost(void)
{

@ -164,15 +164,6 @@ uint8_t matrix_scan(void)
return 1;
}
bool matrix_is_modified(void)
{
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
if (matrix[i] != matrix_prev[i])
return true;
}
return false;
}
inline
bool matrix_has_ghost(void)
{

@ -218,12 +218,6 @@ uint8_t matrix_scan(void)
return 1;
}
bool matrix_is_modified(void)
{
// NOTE: no longer used
return true;
}
inline
bool matrix_has_ghost(void)
{

@ -136,12 +136,6 @@ uint8_t matrix_scan(void)
return 1;
}
bool matrix_is_modified(void)
{
if (debouncing) return false;
return true;
}
inline
bool matrix_is_on(uint8_t row, uint8_t col)
{

@ -161,12 +161,6 @@ uint8_t matrix_scan(void)
return ret;
}
bool matrix_is_modified(void)
{
if (debouncing) return false;
return true;
}
inline
bool matrix_is_on(uint8_t row, uint8_t col)
{

@ -205,14 +205,6 @@ uint8_t matrix_scan(void)
return 1;
}
bool matrix_is_modified(void)
{
#if (DEBOUNCE > 0)
if (debouncing) return false;
#endif
return true;
}
inline
bool matrix_is_on(uint8_t row, uint8_t col)
{

@ -94,13 +94,6 @@ uint8_t matrix_cols(void) {
return MATRIX_COLS;
}
//Deprecated.
bool matrix_is_modified(void)
{
if (debounce_active()) return false;
return true;
}
inline
bool matrix_is_on(uint8_t row, uint8_t col)
{

@ -94,13 +94,6 @@ uint8_t matrix_cols(void) {
return MATRIX_COLS;
}
//Deprecated.
bool matrix_is_modified(void)
{
if (debounce_active()) return false;
return true;
}
inline
bool matrix_is_on(uint8_t row, uint8_t col)
{

@ -94,13 +94,6 @@ uint8_t matrix_cols(void) {
return MATRIX_COLS;
}
//Deprecated.
bool matrix_is_modified(void)
{
if (debounce_active()) return false;
return true;
}
inline
bool matrix_is_on(uint8_t row, uint8_t col)
{

@ -172,10 +172,6 @@ extern "C"
return 1;
}
bool matrix_is_modified(void) {
return matrix_is_mod;
}
bool matrix_is_on(uint8_t row, uint8_t col) {
uint8_t code = CODE(row, col);

@ -114,11 +114,6 @@ uint8_t matrix_scan(void)
return 1;
}
bool matrix_is_modified(void)
{
return true;
}
inline
bool matrix_is_on(uint8_t row, uint8_t col)
{

@ -172,14 +172,6 @@ uint8_t matrix_scan(void)
return 1;
}
bool matrix_is_modified(void)
{
#if (DEBOUNCE > 0)
if (debouncing) return false;
#endif
return true;
}
inline
bool matrix_is_on(uint8_t row, uint8_t col)
{

@ -90,13 +90,6 @@ uint8_t matrix_cols(void) {
return MATRIX_COLS;
}
//Deprecated.
bool matrix_is_modified(void)
{
if (debounce_active()) return false;
return true;
}
inline
bool matrix_is_on(uint8_t row, uint8_t col)
{

@ -289,12 +289,6 @@ void matrix_slave_scan(void) {
#endif
}
bool matrix_is_modified(void)
{
if (debouncing) return false;
return true;
}
inline
bool matrix_is_on(uint8_t row, uint8_t col)
{

@ -6,8 +6,6 @@
// changed is true if raw has changed since the last call
void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed);
bool debounce_active(void);
void debounce_init(uint8_t num_rows);
void debounce_free(void);

@ -165,7 +165,6 @@ static void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], ui
}
}
bool debounce_active(void) { return true; }
#else
# include "none.c"
#endif

@ -26,6 +26,4 @@ void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool
}
}
bool debounce_active(void) { return false; }
void debounce_free(void) {}

@ -44,8 +44,6 @@ void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool
}
}
bool debounce_active(void) { return debouncing; }
void debounce_free(void) {}
#else // no debouncing.
# include "none.c"

@ -134,7 +134,6 @@ static void start_debounce_counters(matrix_row_t raw[], matrix_row_t cooked[], u
}
}
bool debounce_active(void) { return true; }
#else
# include "none.c"
#endif

@ -140,7 +140,6 @@ static void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], ui
}
}
bool debounce_active(void) { return true; }
#else
# include "none.c"
#endif

@ -132,7 +132,6 @@ static void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], ui
}
}
bool debounce_active(void) { return true; }
#else
# include "none.c"
#endif

@ -46,8 +46,6 @@ void matrix_setup(void);
void matrix_init(void);
/* scan all key states on matrix */
uint8_t matrix_scan(void);
/* whether modified from previous scan. used after matrix_scan. */
bool matrix_is_modified(void) __attribute__((deprecated));
/* whether a switch is on */
bool matrix_is_on(uint8_t row, uint8_t col);
/* matrix state on row */

@ -45,12 +45,6 @@ inline matrix_row_t matrix_get_row(uint8_t row) {
#endif
}
// Deprecated.
bool matrix_is_modified(void) {
if (debounce_active()) return false;
return true;
}
#if (MATRIX_COLS <= 8)
# define print_matrix_header() print("\nr/c 01234567\n")
# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row))

Loading…
Cancel
Save