Skip to main content

RxChannelConfig

Struct RxChannelConfig 

Source
pub struct RxChannelConfig {
    pub clock_source: ClockSource,
    pub resolution: Hertz,
    pub memory_access: MemoryAccess,
    pub interrupt_priority: i32,
    pub invert_in: bool,
    pub io_loop_back: bool,
    pub allow_pd: bool,
    /* private fields */
}

Fields§

§clock_source: ClockSource

Selects the source clock for the RMT channel.

Note that, the selected clock is also used by other channels, which means the user should ensure this configuration is the same when allocating other channels, regardless of TX or RX. For the effect on the power consumption of different clock sources, please refer to the Power Management section.

§resolution: Hertz

Sets the resolution of the internal tick counter. The timing parameter of the RMT signal is calculated based on this tick.

§memory_access: MemoryAccess

Controls how the channel accesses memory.

§interrupt_priority: i32

Set the priority of the interrupt. If set to 0, then the driver will use a interrupt with low or medium priority (priority level may be one of 1, 2 or 3), otherwise use the priority indicated by RxChannelConfig::interrupt_priority.

Please pay attention that once the interrupt priority is set, it cannot be changed until the channel is dropped.

§invert_in: bool

Is used to decide whether to invert the incoming RMT signal.

§io_loop_back: bool

The signal output from the GPIO will be fed to the input path as well.

§allow_pd: bool

Configures if the driver allows the system to power down the peripheral in light sleep mode. Before entering sleep, the system will backup the RMT register context, which will be restored later when the system exit the sleep mode. Powering down the peripheral can save more power, but at the cost of more memory consumed to save the register context. It’s a tradeoff between power consumption and memory consumption. This configuration option relies on specific hardware feature, if you enable it on an unsupported chip, you will see error message like not able to power down in light sleep.

Trait Implementations§

Source§

impl Clone for RxChannelConfig

Source§

fn clone(&self) -> RxChannelConfig

Returns a duplicate of the value. Read more
1.0.0§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RxChannelConfig

Source§

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

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

impl Default for RxChannelConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl Freeze for RxChannelConfig

§

impl RefUnwindSafe for RxChannelConfig

§

impl Send for RxChannelConfig

§

impl Sync for RxChannelConfig

§

impl Unpin for RxChannelConfig

§

impl UnsafeUnpin for RxChannelConfig

§

impl UnwindSafe for RxChannelConfig

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

impl<T> CloneToUninit for T
where T: Clone,

§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

fn into(self) -> U

Calls U::from(self).

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

§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

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

§

type Error = Infallible

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

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

Performs the conversion.
§

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

§

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

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

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

Performs the conversion.