1
0

Fix bug of matrix scan

This commit is contained in:
Kai Ryu 2014-03-12 12:52:52 +09:00
父節點 cda0295e7e
當前提交 e96f00a0bf
共有 2 個檔案被更改,包括 3 行新增3 行删除

查看文件

@ -1,5 +1,5 @@
/*
Copyright 2012,2013 Jun Wako <wakojun@gmail.com>
Copyright 2014 Kai Ryu <kai1103@gmail.com>
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

查看文件

@ -149,7 +149,7 @@ static void init_cols(void)
*/
static matrix_row_t read_cols(void)
{
return PIND & ~(1<<PD7);
return ~PIND & ~(1<<PD7);
}
/* Row pin configuration
@ -174,7 +174,7 @@ static matrix_row_t read_cols(void)
*/
static void unselect_rows(void)
{
// Output low(DDR:1, PORT:0) to unselect
// Output high(DDR:1, PORT:1) to unselect
DDRB |= (1<<PB0);
PORTB |= (1<<PB0);
}