|
Internal Interface Wrap
API reference
|
RAII soft-CS: runs assert_fn on construction and deassert_fn on destruction (including early return / error paths).
More...
#include <SoftChipSelectGuard.h>
Public Member Functions | |
| SoftChipSelectGuard (AssertFn assert_fn, DeassertFn deassert_fn) noexcept | |
| ~SoftChipSelectGuard () noexcept | |
| SoftChipSelectGuard (const SoftChipSelectGuard &)=delete | |
| SoftChipSelectGuard & | operator= (const SoftChipSelectGuard &)=delete |
| SoftChipSelectGuard (SoftChipSelectGuard &&other) noexcept | |
| SoftChipSelectGuard & | operator= (SoftChipSelectGuard &&other) noexcept |
| void | Release () noexcept |
| Early deassert (idempotent). Destructor becomes a no-op. | |
| bool | OwnsCs () const noexcept |
Private Attributes | |
| DeassertFn | deassert_ |
| bool | armed_ |
RAII soft-CS: runs assert_fn on construction and deassert_fn on destruction (including early return / error paths).
| AssertFn | Callable void() |
| DeassertFn | Callable void() |
Typical STM32 soft-CS device usage (inside a bus lock):
|
inlinenoexcept |
|
inlinenoexcept |
|
delete |
|
inlinenoexcept |
|
delete |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Early deassert (idempotent). Destructor becomes a no-op.
|
private |
|
private |