Trait cameleon_genapi::interface::IRegister
source · pub trait IRegister {
// Required methods
fn read<T: ValueStore, U: CacheStore>(
&self,
buf: &mut [u8],
device: &mut impl Device,
store: &impl NodeStore,
cx: &mut ValueCtxt<T, U>
) -> GenApiResult<()>;
fn write<T: ValueStore, U: CacheStore>(
&self,
buf: &[u8],
device: &mut impl Device,
store: &impl NodeStore,
cx: &mut ValueCtxt<T, U>
) -> GenApiResult<()>;
fn address<T: ValueStore, U: CacheStore>(
&self,
device: &mut impl Device,
store: &impl NodeStore,
cx: &mut ValueCtxt<T, U>
) -> GenApiResult<i64>;
fn length<T: ValueStore, U: CacheStore>(
&self,
device: &mut impl Device,
store: &impl NodeStore,
cx: &mut ValueCtxt<T, U>
) -> GenApiResult<i64>;
}
Required Methods§
sourcefn read<T: ValueStore, U: CacheStore>(
&self,
buf: &mut [u8],
device: &mut impl Device,
store: &impl NodeStore,
cx: &mut ValueCtxt<T, U>
) -> GenApiResult<()>
fn read<T: ValueStore, U: CacheStore>( &self, buf: &mut [u8], device: &mut impl Device, store: &impl NodeStore, cx: &mut ValueCtxt<T, U> ) -> GenApiResult<()>
Read bytes from the register.
buf.len()
must be same as the register length returned from IRegister::length
.
sourcefn write<T: ValueStore, U: CacheStore>(
&self,
buf: &[u8],
device: &mut impl Device,
store: &impl NodeStore,
cx: &mut ValueCtxt<T, U>
) -> GenApiResult<()>
fn write<T: ValueStore, U: CacheStore>( &self, buf: &[u8], device: &mut impl Device, store: &impl NodeStore, cx: &mut ValueCtxt<T, U> ) -> GenApiResult<()>
Write bytes to the register.
buf.len()
must be same as the register length returned from IRegister::length
.