31template <
typename AssertFn,
typename DeassertFn>
77template <
typename AssertFn,
typename DeassertFn>
79 AssertFn assert_fn, DeassertFn deassert_fn)
noexcept {
SoftChipSelectGuard< AssertFn, DeassertFn > MakeSoftChipSelectGuard(AssertFn assert_fn, DeassertFn deassert_fn) noexcept
Deduce guard type from assert/deassert callables.
Definition SoftChipSelectGuard.h:78
RAII soft-CS: runs assert_fn on construction and deassert_fn on destruction (including early return /...
Definition SoftChipSelectGuard.h:32
void Release() noexcept
Early deassert (idempotent). Destructor becomes a no-op.
Definition SoftChipSelectGuard.h:62
bool armed_
Definition SoftChipSelectGuard.h:73
SoftChipSelectGuard(SoftChipSelectGuard &&other) noexcept
Definition SoftChipSelectGuard.h:46
bool OwnsCs() const noexcept
Definition SoftChipSelectGuard.h:69
DeassertFn deassert_
Definition SoftChipSelectGuard.h:72
SoftChipSelectGuard & operator=(const SoftChipSelectGuard &)=delete
SoftChipSelectGuard(AssertFn assert_fn, DeassertFn deassert_fn) noexcept
Definition SoftChipSelectGuard.h:34
~SoftChipSelectGuard() noexcept
Definition SoftChipSelectGuard.h:39
SoftChipSelectGuard(const SoftChipSelectGuard &)=delete
SoftChipSelectGuard & operator=(SoftChipSelectGuard &&other) noexcept
Definition SoftChipSelectGuard.h:51