ProtoCore v1.0.16
Deterministic, zero-heap network stack for embedded targets
Loading...
Searching...
No Matches
PresenceCore Struct Reference

Debounced, hold-extended state of one active-high presence pin. Pure: it decides. More...

#include <rcwl0516.h>

Public Attributes

uint32_t debounce_ms
 a level must hold this long before it is believed.
 
uint32_t hold_ms
 presence persists this long past the last believed-HIGH sample.
 
uint32_t raw_since_ms
 when the raw pin level last changed.
 
uint32_t last_high_ms
 when the believed level was last HIGH.
 
uint8_t raw
 last raw pin level as sampled (0/1).
 
uint8_t stable
 believed level, after debouncing (0/1).
 
uint8_t present
 presence output (0/1) - stable, extended by hold_ms.
 
uint8_t changed
 set when present flipped; cleared by protocore_presence_take_event.
 

Detailed Description

Debounced, hold-extended state of one active-high presence pin. Pure: it decides.

Definition at line 70 of file rcwl0516.h.

Member Data Documentation

◆ debounce_ms

uint32_t PresenceCore::debounce_ms

a level must hold this long before it is believed.

Definition at line 72 of file rcwl0516.h.

◆ hold_ms

uint32_t PresenceCore::hold_ms

presence persists this long past the last believed-HIGH sample.

Definition at line 73 of file rcwl0516.h.

◆ raw_since_ms

uint32_t PresenceCore::raw_since_ms

when the raw pin level last changed.

Definition at line 74 of file rcwl0516.h.

◆ last_high_ms

uint32_t PresenceCore::last_high_ms

when the believed level was last HIGH.

Definition at line 75 of file rcwl0516.h.

◆ raw

uint8_t PresenceCore::raw

last raw pin level as sampled (0/1).

Definition at line 76 of file rcwl0516.h.

◆ stable

uint8_t PresenceCore::stable

believed level, after debouncing (0/1).

Definition at line 77 of file rcwl0516.h.

◆ present

uint8_t PresenceCore::present

presence output (0/1) - stable, extended by hold_ms.

Definition at line 78 of file rcwl0516.h.

◆ changed

uint8_t PresenceCore::changed

set when present flipped; cleared by protocore_presence_take_event.

Definition at line 79 of file rcwl0516.h.


The documentation for this struct was generated from the following file: