mirror of
https://github.com/esp-rs/esp-idf-hal.git
synced 2025-09-26 20:00:35 +00:00
Clippy (#484)
This commit is contained in:
parent
4f4478718e
commit
d3247c29c8
@ -137,7 +137,7 @@ impl From<Duration> for TickType {
|
||||
let sec_ms = duration.as_secs().saturating_mul(MS_PER_S);
|
||||
let subsec_ns: u64 = duration.subsec_nanos().into();
|
||||
// Convert to ms and round up. Not saturating. Cannot overflow.
|
||||
let subsec_ms = (subsec_ns + (NS_PER_MS - 1)) / NS_PER_MS;
|
||||
let subsec_ms = subsec_ns.div_ceil(NS_PER_MS);
|
||||
|
||||
TickType::new_millis(sec_ms.saturating_add(subsec_ms))
|
||||
}
|
||||
|
@ -616,7 +616,6 @@ impl<const N: usize> Default for FixedLengthSignal<N> {
|
||||
/// signal.push(Pulse::new(PinState::High, PulseTicks::new(10)));
|
||||
/// signal.push(Pulse::new(PinState::Low, PulseTicks::new(9)));
|
||||
/// ```
|
||||
|
||||
#[cfg(feature = "alloc")]
|
||||
#[derive(Clone, Default)]
|
||||
pub struct VariableLengthSignal {
|
||||
@ -735,7 +734,6 @@ mod driver {
|
||||
/// Use [`TxRmtDriver::start()`] or [`TxRmtDriver::start_blocking()`] to transmit pulses.
|
||||
///
|
||||
/// See the [rmt module][crate::rmt] for more information.
|
||||
|
||||
pub struct TxRmtDriver<'d> {
|
||||
channel: u8,
|
||||
_p: PhantomData<&'d mut ()>,
|
||||
@ -896,7 +894,6 @@ mod driver {
|
||||
/// are no time-gaps between successive transmissions where the perhipheral has to
|
||||
/// wait for items. This can cause weird behavior and can be counteracted with
|
||||
/// increasing [`Config::mem_block_num`] or making iteration more efficient.
|
||||
|
||||
pub fn start_iter_blocking<T>(&mut self, iter: T) -> Result<(), EspError>
|
||||
where
|
||||
T: Iterator<Item = Symbol> + Send,
|
||||
@ -1028,7 +1025,6 @@ mod driver {
|
||||
/// To uninstall the driver just drop it.
|
||||
///
|
||||
/// Internally this calls `rmt_config()` and `rmt_driver_install()`.
|
||||
|
||||
pub fn new<C: RmtChannel>(
|
||||
_channel: impl Peripheral<P = C> + 'd,
|
||||
pin: impl Peripheral<P = impl InputPin> + 'd,
|
||||
|
Loading…
x
Reference in New Issue
Block a user