refactor: Updated Struct reset

This commit is contained in:
Devoalda 2023-09-13 09:57:59 +08:00
parent 4330ec9108
commit 8b03fa6fcc
1 changed files with 2 additions and 2 deletions

View File

@ -73,8 +73,8 @@ btn_state_t get_btn_state () {
btn_state_t state = (btn_status.btn_pressed > btn_status.btn_released) ? btn_state_t state = (btn_status.btn_pressed > btn_status.btn_released) ?
PRESSED : RELEASED; PRESSED : RELEASED;
btn_status.btn_pressed = 0; // Reset btn_status
btn_status.btn_released = 0; btn_status = (struct btn_status) {0, 0};
return state; return state;
} }