Crate embedded_shadow

Crate embedded_shadow 

Source
Expand description

A no_std, no-alloc shadow register table for embedded systems.

This crate provides efficient shadow register management with dirty tracking, suitable for memory-mapped I/O, peripheral register caching, and state synchronization between application and hardware layers.

§Features

  • Zero heap allocation - All storage statically allocated
  • Block-based dirty tracking - Efficiently track modifications
  • Dual access patterns - Host (application) and Kernel (hardware) views
  • Flexible policies - Customizable access control and persistence
  • Transactional writes - Optional staging with commit/rollback

§Example

use embedded_shadow::prelude::*;
 
let storage = ShadowStorageBuilder::new()
    .total_size::<1024>()
    .block_size::<64>()
    .block_count::<16>()
    .default_access()
    .no_persist()
    .build();

Re-exports§

pub use builder::ShadowStorageBuilder;
pub use error::ShadowError;
pub use persist::NoPersist;
pub use persist::PersistTrigger;
pub use policy::AccessPolicy;
pub use policy::AllowAllPolicy;
pub use policy::NoPersistPolicy;
pub use policy::PersistPolicy;
pub use staged::PatchStagingBuffer;
pub use storage::ShadowStorage;
pub use types::StagingBuffer;
pub use view::HostView;

Modules§

builder
error
helpers
persist
policy
prelude
shadow
staged
storage
table
types
view