diff options
author | Zach White <skullydazed@gmail.com> | 2021-01-08 11:21:27 -0800 |
---|---|---|
committer | Zach White <skullydazed@gmail.com> | 2021-01-08 11:21:27 -0800 |
commit | 667161620a2c96c8b286f40f557f5722c7f58f8a (patch) | |
tree | 86321f4d9e4c028c5cddc6a37fc4deaa83ca4887 /keyboards/massdrop/alt | |
parent | e2c7f893470465f986bd6849c18606be0f2b7842 (diff) | |
parent | 6d9b4c7b4f5de5631955e57b9706f90072971bcb (diff) | |
download | qmk_firmware-667161620a2c96c8b286f40f557f5722c7f58f8a.tar.gz qmk_firmware-667161620a2c96c8b286f40f557f5722c7f58f8a.zip |
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'keyboards/massdrop/alt')
-rw-r--r-- | keyboards/massdrop/alt/matrix.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/keyboards/massdrop/alt/matrix.c b/keyboards/massdrop/alt/matrix.c index 3141155712..f635f37f23 100644 --- a/keyboards/massdrop/alt/matrix.c +++ b/keyboards/massdrop/alt/matrix.c @@ -22,6 +22,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "clks.h" #include <string.h> +#ifndef MATRIX_IO_DELAY +# define MATRIX_IO_DELAY 1 +#endif + matrix_row_t mlatest[MATRIX_ROWS]; matrix_row_t mlast[MATRIX_ROWS]; matrix_row_t mdebounced[MATRIX_ROWS]; @@ -32,6 +36,8 @@ uint8_t col_ports[] = { MATRIX_COL_PORTS }; uint8_t col_pins[] = { MATRIX_COL_PINS }; uint32_t row_masks[2]; //NOTE: If more than PA PB used in the future, adjust code to accomodate +__attribute__((weak)) void matrix_io_delay(void) { wait_us(MATRIX_IO_DELAY); } + __attribute__ ((weak)) void matrix_init_kb(void) { matrix_init_user(); @@ -95,7 +101,7 @@ uint8_t matrix_scan(void) { PORT->Group[col_ports[col]].OUTSET.reg = 1 << col_pins[col]; //Set col output - wait_us(1); //Delay for output + matrix_io_delay(); //Delay for output scans[PA] = PORT->Group[PA].IN.reg & row_masks[PA]; //Read PA row pins data scans[PB] = PORT->Group[PB].IN.reg & row_masks[PB]; //Read PB row pins data |