Skip to main content

FieldSetValue

Enum FieldSetValue 

Source
pub enum FieldSetValue {
Show 14 variants Raw(Raw), Mode(Mode), Status(Status), Bass(Bass), Clockf(Clockf), DecodeTime(DecodeTime), Audata(Audata), Wram(Wram), WramAddr(WramAddr), Hdat0(Hdat0), Hdat1(Hdat1), AiAddr(AiAddr), Vol(Vol), AiCtrl(AiCtrl),
}
Expand description

Enum containing all possible field set types

Variants§

§

Raw(Raw)

Access any register to read or write a custom value.

This is especially useful when uploading plugins as they are specified in register address + value to write format.

§

Mode(Mode)

The SCI_MODE register - controls various aspects of operation of the VS1003

§

Status(Status)

The SCI_STATUS register

§

Bass(Bass)

Bass enhancer settings

§

Clockf(Clockf)

Register responsible for controlling the clock settings

§

DecodeTime(DecodeTime)

The current decode time in full seconds.

The user may change the value of this register. In that case the new value should be written twice.

§

Audata(Audata)

Contains information about the sample rate and number of channels.

Can be written to overwrite the information.

§

Wram(Wram)

Wram is used to upload application programs and data to instruction and data RAMs. The start address must be initialized by writing to WramAddr prior to the first write/read of Wram. As 16 bits of data can be transferred with one Wram write/read, and the instruction word is 32 bits long, two consecutive writes/reads are needed for each instruction word. The byte order is big-endian (i.e. most significant words first). After each full-word write/read, the internal pointer is autoincremented.

§

WramAddr(WramAddr)

WramAddr is used to set the program address for following Wram writes/reads. Address offset of 0 is used for X, 0x4000 for Y, and 0x8000 for instruction memory. Peripheral registers can also be accessed

§

Hdat0(Hdat0)

Value depends on decoded file type and running application. Check the datasheet for details.

§

Hdat1(Hdat1)

Value depends on decoded file type and running application. Check the datasheet for details.

§

AiAddr(AiAddr)

AiAddr indicates the start address of the application code written earlier with WramAddr and Wram registers. If no application code is used, this register should not be initialized, or it should be initialized to zero. For more details, see Application Notes for VS10XX.

§

Vol(Vol)

Volume control.

Setting both channels to 255 will activate analog powerdown mode.

§

AiCtrl(AiCtrl)

For communication with user’s application on the VS1003

Trait Implementations§

Source§

impl Debug for FieldSetValue

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<AiAddr> for FieldSetValue

Source§

fn from(val: AiAddr) -> Self

Converts to this type from the input type.
Source§

impl From<AiCtrl> for FieldSetValue

Source§

fn from(val: AiCtrl) -> Self

Converts to this type from the input type.
Source§

impl From<Audata> for FieldSetValue

Source§

fn from(val: Audata) -> Self

Converts to this type from the input type.
Source§

impl From<Bass> for FieldSetValue

Source§

fn from(val: Bass) -> Self

Converts to this type from the input type.
Source§

impl From<Clockf> for FieldSetValue

Source§

fn from(val: Clockf) -> Self

Converts to this type from the input type.
Source§

impl From<DecodeTime> for FieldSetValue

Source§

fn from(val: DecodeTime) -> Self

Converts to this type from the input type.
Source§

impl From<Hdat0> for FieldSetValue

Source§

fn from(val: Hdat0) -> Self

Converts to this type from the input type.
Source§

impl From<Hdat1> for FieldSetValue

Source§

fn from(val: Hdat1) -> Self

Converts to this type from the input type.
Source§

impl From<Mode> for FieldSetValue

Source§

fn from(val: Mode) -> Self

Converts to this type from the input type.
Source§

impl From<Raw> for FieldSetValue

Source§

fn from(val: Raw) -> Self

Converts to this type from the input type.
Source§

impl From<Status> for FieldSetValue

Source§

fn from(val: Status) -> Self

Converts to this type from the input type.
Source§

impl From<Vol> for FieldSetValue

Source§

fn from(val: Vol) -> Self

Converts to this type from the input type.
Source§

impl From<Wram> for FieldSetValue

Source§

fn from(val: Wram) -> Self

Converts to this type from the input type.
Source§

impl From<WramAddr> for FieldSetValue

Source§

fn from(val: WramAddr) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.