stm32/hrtim: add example impl.

This commit is contained in:
xoviat
2023-06-27 20:30:58 -05:00
parent 348019e37f
commit 3252eaa060
8 changed files with 129 additions and 1 deletions

View File

@ -52,7 +52,7 @@ pub struct ComplementaryPwmPin<'d, Perip, Channel> {
macro_rules! advanced_channel_impl {
($new_chx:ident, $channel:tt, $ch_num:expr, $pin_trait:ident, $complementary_pin_trait:ident) => {
impl<'d, Perip: AdvancedCaptureCompare16bitInstance> PwmPin<'d, Perip, $channel<Perip>> {
pub fn $new_chx(pin: impl Peripheral<P = impl $complementary_pin_trait<Perip>> + 'd) -> Self {
pub fn $new_chx(pin: impl Peripheral<P = impl $pin_trait<Perip>> + 'd) -> Self {
into_ref!(pin);
critical_section::with(|_| {
pin.set_low();