|
Internal Interface Wrap
API reference
|
RAII soft chip-select (assert on construct, deassert on destroy). More...
#include <utility>Go to the source code of this file.
Classes | |
| class | SoftChipSelectGuard< AssertFn, DeassertFn > |
RAII soft-CS: runs assert_fn on construction and deassert_fn on destruction (including early return / error paths). More... | |
Functions | |
| template<typename AssertFn , typename DeassertFn > | |
| SoftChipSelectGuard< AssertFn, DeassertFn > | MakeSoftChipSelectGuard (AssertFn assert_fn, DeassertFn deassert_fn) noexcept |
| Deduce guard type from assert/deassert callables. | |
RAII soft chip-select (assert on construct, deassert on destroy).
Use around a single SPI frame (or an intentional multi-byte burst that must stay under one CS assertion). Pair with a bus mutex held for the whole mode + FIFO + transfer window — this guard only owns the CS pin edges.
|
noexcept |
Deduce guard type from assert/deassert callables.