Skip to content

Commit 8d60bd8

Browse files
committed
ext
1 parent 272bd53 commit 8d60bd8

File tree

16 files changed

+1282
-675
lines changed

16 files changed

+1282
-675
lines changed

.zed/settings.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"lsp": {
3+
"rust-analyzer": {
4+
"initialization_options": {
5+
"cargo": {
6+
"features": ["stm32g474"]
7+
},
8+
"check": {
9+
"allTargets": false,
10+
"targets": "thumbv7em-none-eabihf"
11+
}
12+
}
13+
}
14+
}
15+
}

Cargo.toml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ stm32-hrtim = { path = "." }
1111

1212
[dependencies]
1313
stm32f3 = { git = "https://github.com/stm32-rs/stm32-rs-nightlies", optional = true }
14-
stm32h7 = { git = "https://github.com/stm32-rs/stm32-rs-nightlies", features = ["critical-section"], optional = true }
14+
stm32h7 = { git = "https://github.com/stm32-rs/stm32-rs-nightlies", features = [
15+
"critical-section",
16+
], optional = true }
1517
stm32g4 = { version = "0.22.0", package = "stm32g4-staging", optional = true }
1618

1719
defmt = { version = "0.3.10", optional = true }
@@ -22,7 +24,7 @@ cortex-m = { version = "0.7.7", features = ["critical-section-single-core"] }
2224
defmt-rtt = "0.4.0"
2325
cortex-m-rt = "0.7.2"
2426
panic-probe = { version = "0.3.0", features = ["print-defmt"] }
25-
stm32g4xx-hal = { git = "https://github.com/usbalbin/stm32g4xx-hal", branch = "hrtim", features = ["defmt", "hrtim"] }
27+
#stm32g4xx-hal = { git = "https://github.com/usbalbin/stm32g4xx-hal", branch = "hrtim", features = ["defmt", "hrtim"] }
2628

2729
[features]
2830
default = []
@@ -46,8 +48,8 @@ stm32h753 = ["stm32h7/stm32h753", "hrtim_v1_1"]
4648
#stm32h755 = ["stm32h7/stm32h755", "hrtim_v1_1"]
4749
#stm32h757 = ["stm32h7/stm32h757", "hrtim_v1_1"]
4850

49-
stm32g474 = ["stm32g4/stm32g474", "stm32g4xx-hal/stm32g474", "hrtim_v2"]
50-
stm32g484 = ["stm32g4/stm32g484", "stm32g4xx-hal/stm32g484", "hrtim_v2"]
51+
stm32g474 = ["stm32g4/stm32g474", "hrtim_v2"]
52+
stm32g484 = ["stm32g4/stm32g484", "hrtim_v2"]
5153
defmt = ["dep:defmt", "fugit/defmt"]
5254

5355
# G4
@@ -95,4 +97,4 @@ path = "examples/stm32g4/hrtim.rs"
9597
[[example]]
9698
name = "stm32g4-master"
9799
required-features = ["stm32g4"]
98-
path = "examples/stm32g4/master.rs"
100+
path = "examples/stm32g4/master.rs"

examples/stm32g4/adc-trigger.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ use stm32g4xx_hal::{
1414
dma::{self, channel::DMAExt, config::DmaConfig, TransferExt},
1515
gpio::GpioExt,
1616
hrtim::{HrControltExt, HrPwmBuilderExt},
17+
pac::{CorePeripherals, Peripherals},
1718
pwr::PwrExt,
1819
rcc::{self, RccExt},
19-
stm32::{CorePeripherals, Peripherals},
2020
};
2121

2222
#[entry]

examples/stm32g4/capture-dma.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ use stm32g4xx_hal::{
1616
dma::{channel::DMAExt, config::DmaConfig, TransferExt},
1717
gpio::GpioExt,
1818
hrtim::{external_event::EevInputExt, HrControltExt, HrPwmBuilderExt},
19+
pac::Peripherals,
1920
pwr::PwrExt,
2021
rcc::{self, RccExt},
21-
stm32::Peripherals,
2222
};
2323

2424
#[entry]

examples/stm32g4/capture.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ use stm32_hrtim::{
1515
use stm32g4xx_hal::{
1616
gpio::GpioExt,
1717
hrtim::{external_event::EevInputExt, HrControltExt, HrPwmBuilderExt},
18+
pac::Peripherals,
1819
pwr::PwrExt,
1920
rcc::{self, RccExt},
20-
stm32::Peripherals,
2121
};
2222

2323
#[entry]

examples/stm32g4/eev-comp.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ use stm32g4xx_hal::{
1919
delay::SYSTDelayExt,
2020
gpio::{GpioExt, SignalEdge},
2121
hrtim::{external_event::EevInputExt, HrControltExt, HrPwmBuilderExt},
22+
pac::{CorePeripherals, Peripherals},
2223
pwr::PwrExt,
2324
rcc::{self, RccExt},
24-
stm32::{CorePeripherals, Peripherals},
2525
};
2626

2727
#[entry]

examples/stm32g4/eev.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ use stm32_hrtim::{
1616
use stm32g4xx_hal::{
1717
gpio::GpioExt,
1818
hrtim::{external_event::EevInputExt, HrControltExt, HrPwmBuilderExt},
19+
pac::Peripherals,
1920
pwr::PwrExt,
2021
rcc::{self, RccExt},
21-
stm32::Peripherals,
2222
};
2323

2424
#[entry]

examples/stm32g4/flt.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ use stm32g4xx_hal::{
1616
delay::{DelayExt, SYSTDelayExt},
1717
gpio::GpioExt,
1818
hrtim::{fault::FaultInput, HrControltExt, HrPwmBuilderExt},
19+
pac::{CorePeripherals, Peripherals},
1920
pwr::PwrExt,
2021
rcc::{self, RccExt},
21-
stm32::{CorePeripherals, Peripherals},
2222
time::ExtU32,
2323
};
2424

examples/stm32g4/hrtim.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,13 @@ use stm32_hrtim::{
88
Pscl4,
99
};
1010
use stm32g4xx_hal::{
11-
delay::{DelayExt, SYSTDelayExt}, gpio::GpioExt, hrtim::{HrControltExt, HrPwmBuilderExt}, pwr::PwrExt, rcc::{self, RccExt}, stm32::{CorePeripherals, Peripherals}, time::ExtU32
11+
delay::{DelayExt, SYSTDelayExt},
12+
gpio::GpioExt,
13+
hrtim::{HrControltExt, HrPwmBuilderExt},
14+
pac::{CorePeripherals, Peripherals},
15+
pwr::PwrExt,
16+
rcc::{self, RccExt},
17+
time::ExtU32,
1218
};
1319

1420
#[entry]

examples/stm32g4/master.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,13 @@ use stm32_hrtim::{
1010
HrParts, HrPwmAdvExt, HrTimerMode, MasterPreloadSource, PreloadSource, Pscl4,
1111
};
1212
use stm32g4xx_hal::{
13-
delay::{DelayExt, SYSTDelayExt}, gpio::GpioExt, hrtim::{HrControltExt, HrPwmBuilderExt}, pwr::PwrExt, rcc::{self, RccExt}, stm32::{CorePeripherals, Peripherals}, time::ExtU32
13+
delay::{DelayExt, SYSTDelayExt},
14+
gpio::GpioExt,
15+
hrtim::{HrControltExt, HrPwmBuilderExt},
16+
pac::{CorePeripherals, Peripherals},
17+
pwr::PwrExt,
18+
rcc::{self, RccExt},
19+
time::ExtU32,
1420
};
1521

1622
#[entry]

0 commit comments

Comments
 (0)