Files
btntest/include/button.h
DESKTOP-PUHFO60\dsx2016 280c5ea97c Fix tactile switch wiring: GPIO22 to GND, show live pin level.
Clarify 4-pin foot pairing and debounce for bare pushbutton.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-23 12:46:31 +08:00

13 lines
321 B
C
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#pragma once
#include <stdint.h>
void button_init();
/** 轮询:检测按下边沿,返回本周期是否有一次有效按下 */
bool button_poll_press();
uint32_t button_count();
void button_reset_count();
bool button_is_down();
/** 原始电平:1=HIGH,0=LOW(便于接线排查) */
int button_raw_level();