pub struct PcmAmplitudes(/* private fields */);Available on crate feature
cgb only.Expand description
Packed PCM amplitudes (PCM12 / PCM34). Read-only.
| Bit | Field | Access | Meaning |
|---|---|---|---|
| 7-4 | high | RO | Upper channel’s amplitude (CH2 for PCM12, CH4 for PCM34). |
| 3-0 | low | RO | Lower channel’s amplitude (CH1 for PCM12, CH3 for PCM34). |
Implementations§
Source§impl PcmAmplitudes
impl PcmAmplitudes
Sourcepub const fn low(&self) -> u8
pub const fn low(&self) -> u8
Lower channel’s amplitude (CH1 for PCM12, CH3 for PCM34).
Bits: 0..4
Sourcepub const fn with_low_checked(self, value: u8) -> Result<Self, ()>
pub const fn with_low_checked(self, value: u8) -> Result<Self, ()>
Lower channel’s amplitude (CH1 for PCM12, CH3 for PCM34).
Bits: 0..4
Sourcepub const fn with_low(self, value: u8) -> Self
pub const fn with_low(self, value: u8) -> Self
Lower channel’s amplitude (CH1 for PCM12, CH3 for PCM34).
Bits: 0..4
Sourcepub const fn set_low(&mut self, value: u8)
pub const fn set_low(&mut self, value: u8)
Lower channel’s amplitude (CH1 for PCM12, CH3 for PCM34).
Bits: 0..4
Sourcepub const fn set_low_checked(&mut self, value: u8) -> Result<(), ()>
pub const fn set_low_checked(&mut self, value: u8) -> Result<(), ()>
Lower channel’s amplitude (CH1 for PCM12, CH3 for PCM34).
Bits: 0..4
Sourcepub const fn high(&self) -> u8
pub const fn high(&self) -> u8
Upper channel’s amplitude (CH2 for PCM12, CH4 for PCM34).
Bits: 4..8
Sourcepub const fn with_high_checked(self, value: u8) -> Result<Self, ()>
pub const fn with_high_checked(self, value: u8) -> Result<Self, ()>
Upper channel’s amplitude (CH2 for PCM12, CH4 for PCM34).
Bits: 4..8
Sourcepub const fn with_high(self, value: u8) -> Self
pub const fn with_high(self, value: u8) -> Self
Upper channel’s amplitude (CH2 for PCM12, CH4 for PCM34).
Bits: 4..8
Trait Implementations§
Source§impl Clone for PcmAmplitudes
impl Clone for PcmAmplitudes
Source§fn clone(&self) -> PcmAmplitudes
fn clone(&self) -> PcmAmplitudes
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PcmAmplitudes
Source§impl Debug for PcmAmplitudes
impl Debug for PcmAmplitudes
Source§impl Default for PcmAmplitudes
impl Default for PcmAmplitudes
impl Eq for PcmAmplitudes
Source§impl From<PcmAmplitudes> for u8
impl From<PcmAmplitudes> for u8
Source§fn from(v: PcmAmplitudes) -> Self
fn from(v: PcmAmplitudes) -> Self
Converts to this type from the input type.
Source§impl From<u8> for PcmAmplitudes
impl From<u8> for PcmAmplitudes
Source§impl PartialEq for PcmAmplitudes
impl PartialEq for PcmAmplitudes
impl StructuralPartialEq for PcmAmplitudes
Auto Trait Implementations§
impl BankSafe for PcmAmplitudes
impl Freeze for PcmAmplitudes
impl RefUnwindSafe for PcmAmplitudes
impl Send for PcmAmplitudes
impl Sync for PcmAmplitudes
impl Unpin for PcmAmplitudes
impl UnsafeUnpin for PcmAmplitudes
impl UnwindSafe for PcmAmplitudes
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