pub struct VS1053<BUS, CS, DC, REQ, DELAY> { /* private fields */ }Implementations§
Source§impl<BUS, CS, DC, REQ, DELAY> VS1053<BUS, CS, DC, REQ, DELAY>
impl<BUS, CS, DC, REQ, DELAY> VS1053<BUS, CS, DC, REQ, DELAY>
pub type Error = VS1053Error<<BUS as ErrorType>::Error, <CS as ErrorType>::Error, <DC as ErrorType>::Error>
pub fn new(spi: BUS, cs: CS, dc: DC, req: REQ, delay: DELAY) -> Self
Sourcepub fn get_data_request(&mut self) -> bool
pub fn get_data_request(&mut self) -> bool
can be used to external check if chip is ready to accept new data
pub fn init(&mut self) -> Result<(), Self::Error>
Sourcepub fn get_volume_raw(&mut self) -> Result<u16, Self::Error>
pub fn get_volume_raw(&mut self) -> Result<u16, Self::Error>
direct read of SCI_VOL register
Sourcepub fn set_volume_raw(&mut self, vol: u16) -> Result<(), Self::Error>
pub fn set_volume_raw(&mut self, vol: u16) -> Result<(), Self::Error>
direct write to SCI_VOL register can be used to turn audio output off
Sourcepub fn set_volume(&mut self, vol: u8) -> Result<(), Self::Error>
pub fn set_volume(&mut self, vol: u8) -> Result<(), Self::Error>
Set volume as % value. Both left and right. Input value is 0..100. 100 is the loudest.
pub fn soft_reset(&mut self) -> Result<(), Self::Error>
Sourcepub fn get_chip_connected(&mut self) -> Result<bool, Self::Error>
pub fn get_chip_connected(&mut self) -> Result<bool, Self::Error>
Test communication with chip
Sourcepub fn get_chip_version(&mut self) -> Result<u16, Self::Error>
pub fn get_chip_version(&mut self) -> Result<u16, Self::Error>
Get the Version Number for the VLSI chip from VLSI datasheet: 0 for VS1001, 1 for VS1011, 2 for VS1002, 3 for VS1003, 4 for VS1053 and VS8053, 5 for VS1033, 7 for VS1103, and 6 for VS1063.
Sourcepub fn set_mp3_mode_on(&mut self) -> Result<(), Self::Error>
pub fn set_mp3_mode_on(&mut self) -> Result<(), Self::Error>
Depends on board defaults and can be optional Calls soft_reset
pub fn set_stream_mode_on(&mut self) -> Result<(), Self::Error>
pub fn set_stream_mode_off(&mut self) -> Result<(), Self::Error>
Sourcepub fn load_default_patches(&mut self) -> Result<(), Self::Error>
pub fn load_default_patches(&mut self) -> Result<(), Self::Error>
Should only be called if chip version is 4
Trait Implementations§
Source§impl<BUS: Clone, CS: Clone, DC: Clone, REQ: Clone, DELAY: Clone> Clone for VS1053<BUS, CS, DC, REQ, DELAY>
impl<BUS: Clone, CS: Clone, DC: Clone, REQ: Clone, DELAY: Clone> Clone for VS1053<BUS, CS, DC, REQ, DELAY>
Source§impl<BUS: Debug, CS: Debug, DC: Debug, REQ: Debug, DELAY: Debug> Debug for VS1053<BUS, CS, DC, REQ, DELAY>
impl<BUS: Debug, CS: Debug, DC: Debug, REQ: Debug, DELAY: Debug> Debug for VS1053<BUS, CS, DC, REQ, DELAY>
impl<BUS: Copy, CS: Copy, DC: Copy, REQ: Copy, DELAY: Copy> Copy for VS1053<BUS, CS, DC, REQ, DELAY>
Auto Trait Implementations§
impl<BUS, CS, DC, REQ, DELAY> Freeze for VS1053<BUS, CS, DC, REQ, DELAY>
impl<BUS, CS, DC, REQ, DELAY> RefUnwindSafe for VS1053<BUS, CS, DC, REQ, DELAY>where
BUS: RefUnwindSafe,
CS: RefUnwindSafe,
DC: RefUnwindSafe,
REQ: RefUnwindSafe,
DELAY: RefUnwindSafe,
impl<BUS, CS, DC, REQ, DELAY> Send for VS1053<BUS, CS, DC, REQ, DELAY>
impl<BUS, CS, DC, REQ, DELAY> Sync for VS1053<BUS, CS, DC, REQ, DELAY>
impl<BUS, CS, DC, REQ, DELAY> Unpin for VS1053<BUS, CS, DC, REQ, DELAY>
impl<BUS, CS, DC, REQ, DELAY> UnwindSafe for VS1053<BUS, CS, DC, REQ, DELAY>
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