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§

source

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.

source

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.

source

fn address<T: ValueStore, U: CacheStore>( &self, device: &mut impl Device, store: &impl NodeStore, cx: &mut ValueCtxt<T, U> ) -> GenApiResult<i64>

source

fn length<T: ValueStore, U: CacheStore>( &self, device: &mut impl Device, store: &impl NodeStore, cx: &mut ValueCtxt<T, U> ) -> GenApiResult<i64>

Implementors§