Lowered latency in button scan function

This commit is contained in:
Christoffer Martinsson 2023-08-25 09:38:49 +02:00
parent 2d787c02ec
commit 9218f0a6a1

View File

@ -62,10 +62,10 @@ impl<'a, const R: usize, const C: usize, const N: usize> ButtonMatrix<'a, R, C,
pub fn scan_matrix(&mut self, delay: &mut Delay) {
for col_index in 0..self.cols.len() {
self.cols[col_index].set_low().unwrap();
delay.delay_us(10);
delay.delay_us(1);
self.process_column(col_index);
self.cols[col_index].set_high().unwrap();
delay.delay_us(10);
delay.delay_us(1);
}
}