mirror of
https://github.com/esp-rs/esp-idf-hal.git
synced 2025-09-28 04:41:02 +00:00
Clippy
This commit is contained in:
parent
9de95e1886
commit
098b77b076
@ -385,8 +385,8 @@ mod oneshot_legacy {
|
||||
}
|
||||
|
||||
#[cfg(all(esp32, esp_idf_version_major = "4"))]
|
||||
impl<'d> embedded_hal_0_2::adc::OneShot<super::ADC1, u16, crate::hall::HallSensor>
|
||||
for AdcDriver<'d, super::ADC1>
|
||||
impl embedded_hal_0_2::adc::OneShot<super::ADC1, u16, crate::hall::HallSensor>
|
||||
for AdcDriver<'_, super::ADC1>
|
||||
{
|
||||
type Error = EspError;
|
||||
|
||||
|
@ -33,6 +33,7 @@ const XTAL_TICK_PERIOD_NS: u32 = 1_000_000_000 / XTAL_CLK_FREQ;
|
||||
pub struct APBTickType(::core::ffi::c_int);
|
||||
impl From<Duration> for APBTickType {
|
||||
#[cfg(any(esp32, esp32s2))]
|
||||
#[allow(clippy::manual_div_ceil)]
|
||||
fn from(duration: Duration) -> Self {
|
||||
APBTickType(
|
||||
((duration.as_nanos() + APB_TICK_PERIOD_NS as u128 - 1) / APB_TICK_PERIOD_NS as u128)
|
||||
|
Loading…
x
Reference in New Issue
Block a user