pub struct TxChannelConfig {
pub clock_source: ClockSource,
pub resolution: Hertz,
pub memory_access: MemoryAccess,
pub transaction_queue_depth: usize,
pub interrupt_priority: i32,
pub invert_out: bool,
pub io_loop_back: bool,
pub io_od_mode: bool,
pub allow_pd: bool,
/* private fields */
}Fields§
§clock_source: ClockSourceSelects 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: HertzSets the resolution of the internal tick counter. The timing parameter of the RMT signal is calculated based on this tick.
memory_access: MemoryAccessControls how the channel accesses memory.
transaction_queue_depth: usizeSets the depth of the internal transaction queue, the deeper the queue, the more transactions can be prepared in the backlog.
interrupt_priority: i32Set 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 TxChannelConfig::interrupt_priority.
Please pay attention that once the interrupt priority is set, it cannot be changed until the channel is dropped.
invert_out: boolIs used to decide whether to invert the RMT signal before sending it to the GPIO pad.
io_loop_back: boolThe signal output from the GPIO will be fed to the input path as well.
io_od_mode: boolConfigure the GPIO as open-drain mode.
allow_pd: boolConfigures 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 TxChannelConfig
impl Clone for TxChannelConfig
Source§fn clone(&self) -> TxChannelConfig
fn clone(&self) -> TxChannelConfig
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TxChannelConfig
impl Debug for TxChannelConfig
Auto Trait Implementations§
impl Freeze for TxChannelConfig
impl RefUnwindSafe for TxChannelConfig
impl Send for TxChannelConfig
impl Sync for TxChannelConfig
impl Unpin for TxChannelConfig
impl UnsafeUnpin for TxChannelConfig
impl UnwindSafe for TxChannelConfig
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)