#pragma once #include void sound_init(); void sound_poll(); /** 当前是否检测到声音(已按 SOUND_ACTIVE_HIGH 解释) */ bool sound_detected(); /** 原始引脚电平:true=HIGH */ bool sound_raw_high(); /** 累计触发次数(边沿,带消抖) */ uint32_t sound_event_count(); /** 最近一次触发后经过的 ms;未触发过为 UINT32_MAX */ uint32_t sound_ms_since_last(); void sound_reset_count();