43#ifndef PROTOCORE_RCWL0516_H
44#define PROTOCORE_RCWL0516_H
58#ifndef PC_RCWL0516_HOLD_MS
59#define PC_RCWL0516_HOLD_MS 2000
63#ifndef PC_RCWL0516_DEBOUNCE_MS
64#define PC_RCWL0516_DEBOUNCE_MS 50
76 uint32_t raw_since_ms;
77 uint32_t last_high_ms;
93void pc_presence_core_init(PresenceCore *c, uint32_t debounce_ms, uint32_t hold_ms, uint32_t now);
103bool pc_presence_core_update(PresenceCore *c,
bool pin_high, uint32_t now);
106bool pc_presence_core_get(
const PresenceCore *c);
113bool pc_presence_take_event(PresenceCore *c);
120void pc_rcwl0516_core_init(PresenceCore *c, uint32_t now);
127bool pc_rcwl0516_begin(
int out_pin);
130bool pc_rcwl0516_poll();
133bool pc_rcwl0516_present();
User-facing configuration for ProtoCore.