embassy-executor to 0.3.2. Added a reset function to pwm_simple

This commit is contained in:
anton smeenk
2023-11-12 11:43:26 +01:00
parent 2ab596a484
commit bd70af0df1
3 changed files with 6 additions and 2 deletions

View File

@ -39,7 +39,7 @@ embassy-hal-internal = {version = "0.1.0", path = "../embassy-hal-internal", fea
embassy-embedded-hal = {version = "0.1.0", path = "../embassy-embedded-hal" }
embassy-net-driver = { version = "0.2.0", path = "../embassy-net-driver" }
embassy-usb-driver = {version = "0.1.0", path = "../embassy-usb-driver", optional = true }
embassy-executor = { version = "0.3.1", path = "../embassy-executor", optional = true }
embassy-executor = { version = "0.3.2", path = "../embassy-executor", optional = true }
embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = ["unproven"] }
embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-rc.1", optional = true}

View File

@ -125,6 +125,10 @@ impl<'d, T: CaptureCompare16bitInstance> SimplePwm<'d, T> {
self.inner.set_frequency(freq * multiplier);
}
pub fn reset(&mut self) {
self.inner.reset()
}
pub fn get_max_duty(&self) -> u16 {
self.inner.get_max_compare_value() + 1
}