Add button counter test on GPIO22 with SoftSPI touch and LVGL.
Each press increments on-screen count; touch Reset clears. Flashable firmware/cyd package. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
10
include/button.h
Normal file
10
include/button.h
Normal file
@@ -0,0 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
void button_init();
|
||||
/** 轮询:检测按下边沿,返回本周期是否有一次有效按下 */
|
||||
bool button_poll_press();
|
||||
uint32_t button_count();
|
||||
void button_reset_count();
|
||||
bool button_is_down();
|
||||
Reference in New Issue
Block a user