mirror of
https://github.com/esp-rs/esp-idf-hal.git
synced 2025-10-02 14:44:51 +00:00
Add high speed indicator
This commit is contained in:
parent
fefb4cfa6a
commit
127a903a53
@ -510,6 +510,7 @@ mod chip {
|
|||||||
/// All others support only low speed mode.
|
/// All others support only low speed mode.
|
||||||
pub trait SpeedMode: Send + Sync + 'static {
|
pub trait SpeedMode: Send + Sync + 'static {
|
||||||
const SPEED_MODE: ledc_mode_t;
|
const SPEED_MODE: ledc_mode_t;
|
||||||
|
const HIGH_SPEED: bool;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Low speed mode for the LED Control peripheral
|
/// Low speed mode for the LED Control peripheral
|
||||||
@ -517,6 +518,7 @@ mod chip {
|
|||||||
|
|
||||||
impl SpeedMode for LowSpeed {
|
impl SpeedMode for LowSpeed {
|
||||||
const SPEED_MODE: ledc_mode_t = ledc_mode_t_LEDC_LOW_SPEED_MODE;
|
const SPEED_MODE: ledc_mode_t = ledc_mode_t_LEDC_LOW_SPEED_MODE;
|
||||||
|
const HIGH_SPEED: bool = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(esp32)]
|
#[cfg(esp32)]
|
||||||
@ -526,6 +528,7 @@ mod chip {
|
|||||||
#[cfg(esp32)]
|
#[cfg(esp32)]
|
||||||
impl SpeedMode for HighSpeed {
|
impl SpeedMode for HighSpeed {
|
||||||
const SPEED_MODE: ledc_mode_t = ledc_mode_t_LEDC_HIGH_SPEED_MODE;
|
const SPEED_MODE: ledc_mode_t = ledc_mode_t_LEDC_HIGH_SPEED_MODE;
|
||||||
|
const HIGH_SPEED: bool = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// LED Control peripheral timer
|
/// LED Control peripheral timer
|
||||||
|
Loading…
x
Reference in New Issue
Block a user