next_usb: Fix pin config and add delay for PWR pin
experienced false reading during debug
This commit is contained in:
parent
ebb1449ede
commit
42b50dfd13
1 changed files with 2 additions and 1 deletions
|
|
@ -94,8 +94,9 @@ void matrix_init(void)
|
|||
NEXT_KBD_LED1_ON;
|
||||
|
||||
NEXT_KBD_PWR_DDR &= ~(1<<NEXT_KBD_PWR_BIT); // Power Button pin to input
|
||||
NEXT_KBD_PWR_PIN |= (1<<NEXT_KBD_PWR_BIT); // KBD_PWR pull up
|
||||
NEXT_KBD_PWR_PORT |= (1<<NEXT_KBD_PWR_BIT); // KBD_PWR pull up
|
||||
|
||||
_delay_us(1); // prevents from reading immediately after pin config
|
||||
power_state = NEXT_KBD_PWR_READ ? false : true;
|
||||
dprintf("Initial power button state: %b\n", power_state);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue