Struct evegfx::low_level::LowLevel[][src]

pub struct LowLevel<M: Model, I: Interface> { /* fields omitted */ }

LowLevel is a low-level interface to EVE controllers which matches the primitive operations used in Programmers Guides for the various EVE controllers.

This is slightly higher-level than the Interface trait, providing size-specific memory accesses, but doesn't have any special knowledge about the memory map or command set of any particular EVE implementation.

This struct tracks a "cursor" for appending display list entries using the dl method. Use dl_reset to reset that cursor to the beginning of display list memory, which you'll typically (but not necessarily) do after writing REG_DLSWAP to swap the display list double buffer. LowLevel doesn't manage display list buffer swapping itself, only the cursor for the next dl call.

Implementations

impl<M: Model, I: Interface> LowLevel<M, I>[src]

pub fn new(interface: I) -> Self[src]

pub fn take_interface(self) -> I[src]

Consumes the LowLevel object and returns the interface it was originally created with.

pub fn borrow_interface<'a>(&'a mut self) -> &'a mut I[src]

pub fn wr8<R: HostAccessible>(&mut self, addr: Ptr<R>, v: u8) -> Result<(), I>[src]

pub fn wr16<R: HostAccessible>(&mut self, addr: Ptr<R>, v: u16) -> Result<(), I>[src]

pub fn wr32<R: HostAccessible>(&mut self, addr: Ptr<R>, v: u32) -> Result<(), I>[src]

pub fn wr8s<R: HostAccessible>(
    &mut self,
    addr: Ptr<R>,
    v: &[u8]
) -> Result<(), I>
[src]

pub fn rd8<R: HostAccessible>(&mut self, addr: Ptr<R>) -> Result<u8, I>[src]

pub fn rd16<R: HostAccessible>(&mut self, addr: Ptr<R>) -> Result<u16, I>[src]

pub fn rd32<R: HostAccessible>(&mut self, addr: Ptr<R>) -> Result<u32, I>[src]

pub fn rd8s<R: HostAccessible>(
    &mut self,
    addr: Ptr<R>,
    into: &mut [u8]
) -> Result<(), I>
[src]

pub fn main_mem_ptr(&self, offset: u32) -> Ptr<M::MainMem>[src]

pub fn reg_ptr(&self, reg: Register) -> Ptr<M::RegisterMem>[src]

pub fn host_command(&mut self, cmd: HostCmd, a0: u8, a1: u8) -> Result<(), I>[src]

pub fn dl_reset(&mut self)[src]

pub fn dl(&mut self, cmd: DLCmd) -> Result<(), I>[src]

Trait Implementations

impl<M, I> Builder for LowLevel<M, I> where
    M: Model,
    I: Interface
[src]

type Error = Error<I>

type Model = M

Auto Trait Implementations

impl<M, I> Send for LowLevel<M, I> where
    I: Send,
    M: Send,
    <M as Model>::DisplayListMem: Send
[src]

impl<M, I> Sync for LowLevel<M, I> where
    I: Sync,
    M: Sync,
    <M as Model>::DisplayListMem: Sync
[src]

impl<M, I> Unpin for LowLevel<M, I> where
    I: Unpin,
    M: Unpin,
    <M as Model>::DisplayListMem: Unpin
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.