diff options
| -rwxr-xr-x | ci.sh | 1 | ||||
| -rw-r--r-- | embassy-stm32/build.rs | 2 | ||||
| -rw-r--r-- | embassy-stm32/src/hrtim/mod.rs | 18 | ||||
| -rw-r--r-- | embassy-stm32/src/lib.rs | 2 |
4 files changed, 22 insertions, 1 deletions
| @@ -88,6 +88,7 @@ cargo batch \ | |||
| 88 | --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv8m.main-none-eabihf --features nightly,stm32l552ze,defmt,exti,time-driver-any,unstable-traits \ | 88 | --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv8m.main-none-eabihf --features nightly,stm32l552ze,defmt,exti,time-driver-any,unstable-traits \ |
| 89 | --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv6m-none-eabi --features nightly,stm32wl54jc-cm0p,defmt,exti,time-driver-any,unstable-traits \ | 89 | --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv6m-none-eabi --features nightly,stm32wl54jc-cm0p,defmt,exti,time-driver-any,unstable-traits \ |
| 90 | --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features nightly,stm32wle5jb,defmt,exti,time-driver-any,unstable-traits \ | 90 | --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features nightly,stm32wle5jb,defmt,exti,time-driver-any,unstable-traits \ |
| 91 | --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features nightly,stm32g474pe,defmt,exti,time-driver-any,unstable-traits \ | ||
| 91 | --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7m-none-eabi --features nightly,stm32f107vc,defmt,exti,time-driver-any,unstable-traits \ | 92 | --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7m-none-eabi --features nightly,stm32f107vc,defmt,exti,time-driver-any,unstable-traits \ |
| 92 | --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7m-none-eabi --features nightly,stm32f103re,defmt,exti,time-driver-any,unstable-traits \ | 93 | --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7m-none-eabi --features nightly,stm32f103re,defmt,exti,time-driver-any,unstable-traits \ |
| 93 | --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7m-none-eabi --features nightly,stm32f100c4,defmt,exti,time-driver-any,unstable-traits \ | 94 | --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7m-none-eabi --features nightly,stm32f100c4,defmt,exti,time-driver-any,unstable-traits \ |
diff --git a/embassy-stm32/build.rs b/embassy-stm32/build.rs index 9b3caefd5..30d4d7b0b 100644 --- a/embassy-stm32/build.rs +++ b/embassy-stm32/build.rs | |||
| @@ -597,6 +597,8 @@ fn main() { | |||
| 597 | (("hrtim", "CHD2"), quote!(crate::hrtim::ChannelDComplementaryPin)), | 597 | (("hrtim", "CHD2"), quote!(crate::hrtim::ChannelDComplementaryPin)), |
| 598 | (("hrtim", "CHE1"), quote!(crate::hrtim::ChannelEPin)), | 598 | (("hrtim", "CHE1"), quote!(crate::hrtim::ChannelEPin)), |
| 599 | (("hrtim", "CHE2"), quote!(crate::hrtim::ChannelEComplementaryPin)), | 599 | (("hrtim", "CHE2"), quote!(crate::hrtim::ChannelEComplementaryPin)), |
| 600 | (("hrtim", "CHF1"), quote!(crate::hrtim::ChannelFPin)), | ||
| 601 | (("hrtim", "CHF2"), quote!(crate::hrtim::ChannelFComplementaryPin)), | ||
| 600 | (("sdmmc", "CK"), quote!(crate::sdmmc::CkPin)), | 602 | (("sdmmc", "CK"), quote!(crate::sdmmc::CkPin)), |
| 601 | (("sdmmc", "CMD"), quote!(crate::sdmmc::CmdPin)), | 603 | (("sdmmc", "CMD"), quote!(crate::sdmmc::CmdPin)), |
| 602 | (("sdmmc", "D0"), quote!(crate::sdmmc::D0Pin)), | 604 | (("sdmmc", "D0"), quote!(crate::sdmmc::D0Pin)), |
diff --git a/embassy-stm32/src/hrtim/mod.rs b/embassy-stm32/src/hrtim/mod.rs index a930ff73f..31c488144 100644 --- a/embassy-stm32/src/hrtim/mod.rs +++ b/embassy-stm32/src/hrtim/mod.rs | |||
| @@ -18,6 +18,8 @@ pub enum Source { | |||
| 18 | ChC, | 18 | ChC, |
| 19 | ChD, | 19 | ChD, |
| 20 | ChE, | 20 | ChE, |
| 21 | #[cfg(hrtim_v2)] | ||
| 22 | ChF, | ||
| 21 | } | 23 | } |
| 22 | 24 | ||
| 23 | pub struct BurstController<T: Instance> { | 25 | pub struct BurstController<T: Instance> { |
| @@ -41,6 +43,10 @@ pub struct ChD<T: Instance> { | |||
| 41 | pub struct ChE<T: Instance> { | 43 | pub struct ChE<T: Instance> { |
| 42 | phantom: PhantomData<T>, | 44 | phantom: PhantomData<T>, |
| 43 | } | 45 | } |
| 46 | #[cfg(hrtim_v2)] | ||
| 47 | pub struct ChF<T: Instance> { | ||
| 48 | phantom: PhantomData<T>, | ||
| 49 | } | ||
| 44 | 50 | ||
| 45 | mod sealed { | 51 | mod sealed { |
| 46 | use super::Instance; | 52 | use super::Instance; |
| @@ -110,6 +116,8 @@ advanced_channel_impl!(new_chb, ChB, 1, ChannelBPin, ChannelBComplementaryPin); | |||
| 110 | advanced_channel_impl!(new_chc, ChC, 2, ChannelCPin, ChannelCComplementaryPin); | 116 | advanced_channel_impl!(new_chc, ChC, 2, ChannelCPin, ChannelCComplementaryPin); |
| 111 | advanced_channel_impl!(new_chd, ChD, 3, ChannelDPin, ChannelDComplementaryPin); | 117 | advanced_channel_impl!(new_chd, ChD, 3, ChannelDPin, ChannelDComplementaryPin); |
| 112 | advanced_channel_impl!(new_che, ChE, 4, ChannelEPin, ChannelEComplementaryPin); | 118 | advanced_channel_impl!(new_che, ChE, 4, ChannelEPin, ChannelEComplementaryPin); |
| 119 | #[cfg(hrtim_v2)] | ||
| 120 | advanced_channel_impl!(new_chf, ChF, 5, ChannelFPin, ChannelFComplementaryPin); | ||
| 113 | 121 | ||
| 114 | /// Struct used to divide a high resolution timer into multiple channels | 122 | /// Struct used to divide a high resolution timer into multiple channels |
| 115 | pub struct AdvancedPwm<'d, T: Instance> { | 123 | pub struct AdvancedPwm<'d, T: Instance> { |
| @@ -121,6 +129,8 @@ pub struct AdvancedPwm<'d, T: Instance> { | |||
| 121 | pub ch_c: ChC<T>, | 129 | pub ch_c: ChC<T>, |
| 122 | pub ch_d: ChD<T>, | 130 | pub ch_d: ChD<T>, |
| 123 | pub ch_e: ChE<T>, | 131 | pub ch_e: ChE<T>, |
| 132 | #[cfg(hrtim_v2)] | ||
| 133 | pub ch_f: ChF<T>, | ||
| 124 | } | 134 | } |
| 125 | 135 | ||
| 126 | impl<'d, T: Instance> AdvancedPwm<'d, T> { | 136 | impl<'d, T: Instance> AdvancedPwm<'d, T> { |
| @@ -136,6 +146,8 @@ impl<'d, T: Instance> AdvancedPwm<'d, T> { | |||
| 136 | _chdn: Option<ComplementaryPwmPin<'d, T, ChD<T>>>, | 146 | _chdn: Option<ComplementaryPwmPin<'d, T, ChD<T>>>, |
| 137 | _che: Option<PwmPin<'d, T, ChE<T>>>, | 147 | _che: Option<PwmPin<'d, T, ChE<T>>>, |
| 138 | _chen: Option<ComplementaryPwmPin<'d, T, ChE<T>>>, | 148 | _chen: Option<ComplementaryPwmPin<'d, T, ChE<T>>>, |
| 149 | #[cfg(hrtim_v2)] _chf: Option<PwmPin<'d, T, ChF<T>>>, | ||
| 150 | #[cfg(hrtim_v2)] _chfn: Option<ComplementaryPwmPin<'d, T, ChF<T>>>, | ||
| 139 | ) -> Self { | 151 | ) -> Self { |
| 140 | Self::new_inner(tim) | 152 | Self::new_inner(tim) |
| 141 | } | 153 | } |
| @@ -167,6 +179,8 @@ impl<'d, T: Instance> AdvancedPwm<'d, T> { | |||
| 167 | ch_c: ChC { phantom: PhantomData }, | 179 | ch_c: ChC { phantom: PhantomData }, |
| 168 | ch_d: ChD { phantom: PhantomData }, | 180 | ch_d: ChD { phantom: PhantomData }, |
| 169 | ch_e: ChE { phantom: PhantomData }, | 181 | ch_e: ChE { phantom: PhantomData }, |
| 182 | #[cfg(hrtim_v2)] | ||
| 183 | ch_f: ChF { phantom: PhantomData }, | ||
| 170 | } | 184 | } |
| 171 | } | 185 | } |
| 172 | } | 186 | } |
| @@ -407,3 +421,7 @@ pin_trait!(ChannelDPin, Instance); | |||
| 407 | pin_trait!(ChannelDComplementaryPin, Instance); | 421 | pin_trait!(ChannelDComplementaryPin, Instance); |
| 408 | pin_trait!(ChannelEPin, Instance); | 422 | pin_trait!(ChannelEPin, Instance); |
| 409 | pin_trait!(ChannelEComplementaryPin, Instance); | 423 | pin_trait!(ChannelEComplementaryPin, Instance); |
| 424 | #[cfg(hrtim_v2)] | ||
| 425 | pin_trait!(ChannelFPin, Instance); | ||
| 426 | #[cfg(hrtim_v2)] | ||
| 427 | pin_trait!(ChannelFComplementaryPin, Instance); | ||
diff --git a/embassy-stm32/src/lib.rs b/embassy-stm32/src/lib.rs index 34220fbf5..fb0279dcf 100644 --- a/embassy-stm32/src/lib.rs +++ b/embassy-stm32/src/lib.rs | |||
| @@ -39,7 +39,7 @@ pub mod exti; | |||
| 39 | pub mod flash; | 39 | pub mod flash; |
| 40 | #[cfg(fmc)] | 40 | #[cfg(fmc)] |
| 41 | pub mod fmc; | 41 | pub mod fmc; |
| 42 | #[cfg(hrtim_v1)] | 42 | #[cfg(hrtim)] |
| 43 | pub mod hrtim; | 43 | pub mod hrtim; |
| 44 | #[cfg(i2c)] | 44 | #[cfg(i2c)] |
| 45 | pub mod i2c; | 45 | pub mod i2c; |
