Struct devices::pci::ac97_regs::Ac97FunctionRegs
source · pub struct Ac97FunctionRegs {
pub bdbar: u32,
pub civ: u8,
pub lvi: u8,
pub sr: u16,
pub picb: u16,
pub piv: u8,
pub cr: u8,
}
Expand description
Registers for individual audio functions. Each audio function in Ac97 gets a set of these registers.
Fields§
§bdbar: u32
§civ: u8
§lvi: u8
§sr: u16
§picb: u16
§piv: u8
§cr: u8
Implementations§
source§impl Ac97FunctionRegs
impl Ac97FunctionRegs
sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new set of function registers, these can be used for the capture, playback, or microphone functions.
sourcepub fn do_reset(&mut self)
pub fn do_reset(&mut self)
Reset all the registers to the PoR defaults. sr
should be updated by update_sr
.
sourcepub fn atomic_status_regs(&self) -> u32
pub fn atomic_status_regs(&self) -> u32
Read register 4, 5, and 6 as one 32 bit word. According to the ICH spec, reading these three with one 32 bit access is allowed.
sourcepub fn int_mask(&self) -> u16
pub fn int_mask(&self) -> u16
Returns the mask for enabled interrupts. The returned mask represents the bits in the status register that should trigger and interrupt.
sourcepub fn move_to_next_buffer(&mut self)
pub fn move_to_next_buffer(&mut self)
Sets the current buffer to the next buffer by updating CIV to PIV, and updates related fields.
Trait Implementations§
source§impl Clone for Ac97FunctionRegs
impl Clone for Ac97FunctionRegs
source§fn clone(&self) -> Ac97FunctionRegs
fn clone(&self) -> Ac97FunctionRegs
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Default for Ac97FunctionRegs
impl Default for Ac97FunctionRegs
source§fn default() -> Ac97FunctionRegs
fn default() -> Ac97FunctionRegs
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for Ac97FunctionRegs
impl Send for Ac97FunctionRegs
impl Sync for Ac97FunctionRegs
impl Unpin for Ac97FunctionRegs
impl UnwindSafe for Ac97FunctionRegs
Blanket Implementations§
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.