Struct patch_svd::output::EnumeratedValues[][src]

pub struct EnumeratedValues {
    pub derived_from: Option<String>,
    pub name: Option<String>,
    pub header_enum_name: Option<String>,
    pub usage: Option<EnumeratedValuesUsage>,
    pub enumerated_value: Vec<EnumeratedValue>,
}

The concept of enumerated values creates a map between unsigned integers and an identifier string.

In addition, a description string can be associated with each entry in the map.

0 <-> disabled -> “The clock source clk0 is turned off.” 1 <-> enabled -> “The clock source clk1 is running.” 2 <-> reserved -> “Reserved values. Do not use.” 3 <-> reserved -> “Reserved values. Do not use.”

This information generates an enum in the device header file. The debugger may use this information to display the identifier string as well as the description. Just like symbolic constants making source code more readable, the system view in the debugger becomes more instructive. The detailed description can provide reference manual level details within the debugger.

Fields

derived_from: Option<String>

Makes a copy from a previously defined enumeratedValues section.

No modifications are allowed. An enumeratedValues entry is referenced by its name. If the name is not unique throughout the description, it needs to be further qualified by specifying the associated field, register, and peripheral as required.

name: Option<String>

Identifier for the whole enumeration section.

header_enum_name: Option<String>

Identifier for the enumeration section.

Overwrites the hierarchical enumeration type in the device header file. User is responsible for uniqueness across description.

usage: Option<EnumeratedValuesUsage>

This allows specifying two different enumerated values depending whether it is to be used for a read or a write access.

If not specified, the default value read-write is used.

enumerated_value: Vec<EnumeratedValue>

Describes a single entry in the enumeration.

The number of required items depends on the bit-width of the associated field.

Trait Implementations

impl Clone for EnumeratedValues[src]

impl Debug for EnumeratedValues[src]

impl<'de> Deserialize<'de> for EnumeratedValues[src]

impl Eq for EnumeratedValues[src]

impl PartialEq<EnumeratedValues> for EnumeratedValues[src]

impl StructuralEq for EnumeratedValues[src]

impl StructuralPartialEq for EnumeratedValues[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.