pub fn debounce_bit(
prev_out: bool,
curr_in: bool,
counter: u8,
hold_count: u8,
) -> (bool, u8)Expand description
Debounce mask: require a stable hold_count frames before accepting changes.
prev_out: previous debounced output bitcurr_in: current raw input bitcounter: internal frame counter (call-site keeps one per bit) Returns: (new_out_bit, new_counter)