Module esp_idf_hal::units

source ·
Expand description

Units of measurement implementation for times and frequencies.

It provides type safety, easy conversion and limited arithmetic support.

Usage

let frequency_mhz_1 = MegaHertz(10),
let frequency_mhz_2 = 10.MHz(),
let frequency_khz_1: KiloHertz = frequency_mhz_1.into(),
let frequency_khz_2 = KiloHertz::from(frequency_mhz_2),
let frequency_khz_3 = frequency_khz_1 + 10.MHz().into(),
let frequency_hz_1 = 1.Hz() + frequency_khz_3.into(),

Structs

Traits

Type Definitions