pub struct SunxiRsb {
regs: MmioRegion,
clock_freq: u32,
power_state: PowerState,
children: Vec<BusChild>,
}Fields§
§regs: MmioRegion§clock_freq: u32§power_state: PowerState§children: Vec<BusChild>Implementations§
Source§impl SunxiRsb
impl SunxiRsb
Sourcepub fn set_clock_freq(&mut self, freq: u32)
pub fn set_clock_freq(&mut self, freq: u32)
Sets clock freq.
Sourcefn soft_reset(&self)
fn soft_reset(&self)
Performs the soft reset operation.
Sourcefn wait_transfer_complete(&self) -> Result<u32, BusError>
fn wait_transfer_complete(&self) -> Result<u32, BusError>
Performs the wait transfer complete operation.
Sourcefn start_transfer(&self)
fn start_transfer(&self)
Starts transfer.
Sourcepub fn set_runtime_address(
&self,
hwaddr: u16,
rtaddr: u8,
) -> Result<(), BusError>
pub fn set_runtime_address( &self, hwaddr: u16, rtaddr: u8, ) -> Result<(), BusError>
Sets runtime address.
Sourcepub fn init_device_mode(&self) -> Result<(), BusError>
pub fn init_device_mode(&self) -> Result<(), BusError>
Initializes device mode.
Sourcepub fn write8(&self, rtaddr: u8, reg: u8, val: u8) -> Result<(), BusError>
pub fn write8(&self, rtaddr: u8, reg: u8, val: u8) -> Result<(), BusError>
Performs the write8 operation.
Sourcepub fn read16(&self, rtaddr: u8, reg: u8) -> Result<u16, BusError>
pub fn read16(&self, rtaddr: u8, reg: u8) -> Result<u16, BusError>
Performs the read16 operation.
Trait Implementations§
Source§impl BusDriver for SunxiRsb
impl BusDriver for SunxiRsb
Source§fn compatible(&self) -> &[&str]
fn compatible(&self) -> &[&str]
Performs the compatible operation.
Source§fn as_firewall(&self) -> Option<&dyn FirewallController>
fn as_firewall(&self) -> Option<&dyn FirewallController>
Returns the optional [
FirewallController] capability, if any. Read moreSource§fn probe(&self) -> bool
fn probe(&self) -> bool
Returns
true if the driver believes the hardware is present. Read moreSource§fn error_count(&self) -> u64
fn error_count(&self) -> u64
Performs the error count operation.
Source§fn handle_irq(&mut self) -> bool
fn handle_irq(&mut self) -> bool
Handles irq.
Auto Trait Implementations§
impl Freeze for SunxiRsb
impl RefUnwindSafe for SunxiRsb
impl Send for SunxiRsb
impl Sync for SunxiRsb
impl Unpin for SunxiRsb
impl UnsafeUnpin for SunxiRsb
impl UnwindSafe for SunxiRsb
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more