Skip to content

Use types from esp_hal::time where appropriate #4832

@JurajSadel

Description

@JurajSadel

cc #4818 (comment)

  1. I guess this doesn't make sense to change as it already has requirements which have to be checked:

    /// Scan duplicate filtering list refresh period in seconds.
    ///
    /// Range: 0 - 1000 seconds
    scan_duplicate_refresh_period: u16,

  2. EspNowManager and EspNow:

    #[instability::unstable]
    pub fn set_wake_window(&self, wake_window: u16) -> Result<(), EspNowError> {
    check_error!({ esp_now_set_wake_window(wake_window) })
    }

  3. WifiCsiInfo:

    /// The local time in microseconds when this packet is received. It is precise only if modem
    /// sleep or light sleep is not enabled.
    pub fn timestamp(&self) -> u32 {
    unsafe { (*self.inner).rx_ctrl.timestamp() as u32 }
    }

  4. FineTimingMeasurementReportEntry has a bunch of functions:

    /// Gets the Round Trip Time (RTT) in picoseconds.
    pub fn rtt(&self) -> u32 {
    self.0.rtt
    }

    but this is in picoseconds and I'm afraid that using micros and math will ruin the recision here

  5. FineTimingMeasurementReport same as 4 but nanosecond:

    /// Get the raw round-trip time (RTT) in nanoseconds.
    pub fn rtt_raw(&self) -> u32 {
    self.0.rtt_raw
    }

I hope I didn't miss any other pub appearance. I think it doesn't make too much sense to do that for NON-pub API.

Metadata

Metadata

Assignees

Labels

package:esp-radioIssues related to the esp-wifi package

Type

No type

Projects

Status

Review

Relationships

None yet

Development

No branches or pull requests

Issue actions