Struct esp32_hal::pulse_control::Channel4
source · [−]pub struct Channel4 { /* private fields */ }
Expand description
RX/TX Input/Output Channel
Implementations
Trait Implementations
sourceimpl OutputChannel for Channel4
impl OutputChannel for Channel4
sourcefn set_idle_output_level(&mut self, level: bool) -> &mut Channel4
fn set_idle_output_level(&mut self, level: bool) -> &mut Channel4
Set the logical level that the connected pin is pulled to while the channel is idle
sourcefn set_idle_output(&mut self, state: bool) -> &mut Channel4
fn set_idle_output(&mut self, state: bool) -> &mut Channel4
Enable/Disable the output while the channel is idle
sourcefn set_channel_divider(&mut self, divider: u8) -> &mut Channel4
fn set_channel_divider(&mut self, divider: u8) -> &mut Channel4
Set channel clock divider value
sourcefn set_carrier_modulation(&mut self, state: bool) -> &mut Channel4
fn set_carrier_modulation(&mut self, state: bool) -> &mut Channel4
Enable/Disable carrier modulation
sourcefn set_clock_source(&mut self, source: ClockSource) -> &mut Channel4
fn set_clock_source(&mut self, source: ClockSource) -> &mut Channel4
Set the clock source (for the ESP32-S2 and ESP32 this can be done on a channel level)
sourcefn assign_pin<RmtPin>(&mut self, pin: RmtPin) -> &mut Channel4where
RmtPin: OutputPin,
fn assign_pin<RmtPin>(&mut self, pin: RmtPin) -> &mut Channel4where
RmtPin: OutputPin,
Assign a pin that should be driven by this channel
sourcefn send_pulse_sequence<const N: usize>(
&mut self,
repeat_mode: RepeatMode,
sequence: &[PulseCode; N]
) -> Result<(), TransmissionError>
fn send_pulse_sequence<const N: usize>(
&mut self,
repeat_mode: RepeatMode,
sequence: &[PulseCode; N]
) -> Result<(), TransmissionError>
Send a pulse sequence in a blocking fashion
sourcefn send_pulse_sequence_raw<const N: usize>(
&mut self,
repeat_mode: RepeatMode,
sequence: &[u32; N]
) -> Result<(), TransmissionError>
fn send_pulse_sequence_raw<const N: usize>(
&mut self,
repeat_mode: RepeatMode,
sequence: &[u32; N]
) -> Result<(), TransmissionError>
Send a raw pulse sequence in a blocking fashion
In this function we expect the sequence
elements to be already
in the correct u32 format that is understood by the RMT.
Please refer to the reference manual or use the variant which
accepts PulseCode
objects instead.
We expect that the end marker is already part of the provided sequence and to be provided in all modes!
sourcefn stop_transmission(&self)
fn stop_transmission(&self)
Stop any ongoing (repetitive) transmission
This function needs to be called to stop sending when
previously a sequence was sent with RepeatMode::Forever
.
Auto Trait Implementations
impl RefUnwindSafe for Channel4
impl Send for Channel4
impl Sync for Channel4
impl Unpin for Channel4
impl UnwindSafe for Channel4
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more