summaryrefslogtreecommitdiff
path: root/keyboard/onekey/matrix.c
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2013-11-28 16:02:29 +0900
committertmk <nobody@nowhere>2013-11-28 16:02:29 +0900
commitbc5b64d83259715667356770965a33aa620a8030 (patch)
tree074377caef4d838ac3890f39e9ff67f346aab506 /keyboard/onekey/matrix.c
parent4e36159be226e544dfebbe06b1955261951209a4 (diff)
parent0b9c0f6012a90eeb8cced9feccf3a65d8b4e5535 (diff)
Merge branch 'ps2_keyboard_fix'
Diffstat (limited to 'keyboard/onekey/matrix.c')
-rw-r--r--keyboard/onekey/matrix.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/keyboard/onekey/matrix.c b/keyboard/onekey/matrix.c
index a0a14ff821..29df868321 100644
--- a/keyboard/onekey/matrix.c
+++ b/keyboard/onekey/matrix.c
@@ -139,29 +139,29 @@ uint8_t matrix_key_count(void)
/* Column pin configuration
* col: 0
- * pin: D0
+ * pin: B0
*/
static void init_cols(void)
{
// Input with pull-up(DDR:0, PORT:1)
- DDRD &= ~(1<<0);
- PORTD |= (1<<0);
+ DDRB &= ~(1<<0);
+ PORTB |= (1<<0);
}
static matrix_row_t read_cols(void)
{
- return (PIND&(1<<0) ? 0 : (1<<0));
+ return (PINB&(1<<0) ? 0 : (1<<0));
}
/* Row pin configuration
* row: 0
- * pin: D1
+ * pin: B1
*/
static void unselect_rows(void)
{
// Hi-Z(DDR:0, PORT:0) to unselect
- DDRD &= ~0b00000010;
- PORTD &= ~0b00000010;
+ DDRB &= ~0b00000010;
+ PORTB &= ~0b00000010;
}
static void select_row(uint8_t row)
@@ -169,8 +169,8 @@ static void select_row(uint8_t row)
// Output low(DDR:1, PORT:0) to select
switch (row) {
case 0:
- DDRD |= (1<<1);
- PORTD &= ~(1<<1);
+ DDRB |= (1<<1);
+ PORTB &= ~(1<<1);
break;
}
}