This commit is contained in:
J. Nick Koston
2025-06-17 13:41:57 +02:00
parent e8547b16f6
commit 35bfc9f069

View File

@@ -16,7 +16,8 @@ class GPIOBinarySensorStore {
static void gpio_intr(GPIOBinarySensorStore *arg);
bool get_state() const {
InterruptLock lock;
// No lock needed: state_ is atomically updated by ISR
// Volatile ensures we read the latest value
return this->state_;
}