diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 8de97350e..3581414f9 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -38,6 +38,15 @@ jobs:
- stm32f446
- stm32f469
- stm32f479
+ - stm32f722
+ - stm32f723
+ - stm32f730
+ - stm32f745
+ - stm32f746
+ - stm32f765
+ - stm32f767
+ - stm32f769
+
rust:
- stable
features:
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 2268655a8..d9fc00f0e 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -1,5 +1,5 @@
{
"rust-analyzer.check.allTargets": false,
"rust-analyzer.check.targets": "thumbv7em-none-eabihf",
- "rust-analyzer.cargo.features": ["defmt", "rtic1", "stm32f411"]
+ "rust-analyzer.cargo.features": ["defmt", "rtic1", "stm32f746"]
}
diff --git a/Cargo.toml b/Cargo.toml
index 6cb825d72..c2252fe17 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -69,6 +69,17 @@ micromath = { version = "2.1.0", optional = true }
package = "stm32f4-staging"
version = "0.16.0"
features = ["defmt", "atomics"]
+optional = true
+
+[dependencies.stm32f2]
+git = "https://github.com/stm32-rs/stm32-rs-nightlies"
+features = ["defmt", "atomics"]
+optional = true
+
+[dependencies.stm32f7]
+git = "https://github.com/stm32-rs/stm32-rs-nightlies"
+features = ["defmt", "atomics"]
+optional = true
[dependencies.time]
version = "0.3.14"
@@ -122,6 +133,74 @@ default-features = false
features = ["macros"]
[features]
+f2 = ["dep:stm32f2", "bb", "dma", "spi_v1", "uart_v2"]
+f4 = ["dep:stm32f4", "bb", "dma", "spi_v1", "uart_v2"]
+f7 = [
+ "dep:stm32f7",
+ "dep:micromath",
+ "dep:stm32-fmc",
+ "dma",
+ "spi_v2",
+ "uart_v3",
+]
+
+# F2
+
+stm32f215 = ["svd-f215"]
+stm32f217 = ["svd-f217"]
+
+svd-f215 = ["f2", "stm32f2?/stm32f215", "gpio-f217"]
+svd-f217 = ["f2", "stm32f2?/stm32f217", "gpio-f217"]
+
+
+gpio-f217 = [
+ "can1",
+ "can2",
+ "dcmi",
+ "eth",
+ "fsmc",
+ "gpioc",
+ "gpiod",
+ "gpioe",
+ "gpiof",
+ "gpiog",
+ "gpioh",
+ "gpioi",
+ "i2c2",
+ "i2c3",
+ "i2s",
+ "i2s2",
+ "i2s3",
+ "rtc",
+ "sdio",
+ "spi1",
+ "spi2",
+ "spi3",
+ "sys",
+ "tim1",
+ "tim10",
+ "tim11",
+ "tim12",
+ "tim13",
+ "tim14",
+ "tim2",
+ "tim3",
+ "tim4",
+ "tim5",
+ "tim8",
+ "tim9",
+ "uart4",
+ "uart5",
+ "usart1",
+ "usart2",
+ "usart3",
+ "usart6",
+ "otg-fs",
+ "otg-hs",
+]
+
+# F4
+
#! Use one of the supported STM32-serie related features:
#! `stm32f401`, `stm32f405`, `stm32f407`, `stm32f415`, `stm32f417`, `stm32f410`,
#! `stm32f411`, `stm32f412`, `stm32f413`, `stm32f423`, `stm32f427`, `stm32f429`,
@@ -129,89 +208,159 @@ features = ["macros"]
# Note: stm32f4 has only one feature for some very similar device families,
# so it's intended for e.g. stm32f405/415 to both enable stm32f4/stm32f405.
-stm32f401 = ["stm32f4/stm32f401", "gpio-f401"]
-stm32f405 = ["stm32f4/stm32f405", "gpio-f417"]
-stm32f407 = ["stm32f4/stm32f407", "gpio-f417"]
-stm32f415 = ["stm32f4/stm32f405", "gpio-f417", "cryp"]
-stm32f417 = ["stm32f4/stm32f407", "gpio-f417", "cryp"]
-stm32f410 = ["stm32f4/stm32f410", "gpio-f410"]
-stm32f411 = ["stm32f4/stm32f411", "gpio-f411"]
-stm32f412 = ["stm32f4/stm32f412", "gpio-f412"]
-stm32f413 = ["stm32f4/stm32f413", "gpio-f413"]
-stm32f423 = ["stm32f4/stm32f413", "gpio-f413", "aes"]
-stm32f427 = ["stm32f4/stm32f427", "gpio-f427", "fsmc"]
-stm32f429 = ["stm32f4/stm32f429", "gpio-f427", "fmc"]
-stm32f437 = ["stm32f4/stm32f427", "gpio-f427", "fsmc", "cryp"]
-stm32f439 = ["stm32f4/stm32f429", "gpio-f427", "fmc", "cryp"]
-stm32f446 = ["stm32f4/stm32f446", "gpio-f446"]
-stm32f469 = ["stm32f4/stm32f469", "gpio-f469"]
-stm32f479 = ["stm32f4/stm32f469", "gpio-f469", "cryp"]
+stm32f401 = ["svd-f401"]
+stm32f405 = ["svd-f405"]
+stm32f407 = ["svd-f407"]
+stm32f415 = ["svd-f405", "cryp"]
+stm32f417 = ["svd-f407", "cryp"]
+stm32f410 = ["svd-f410"]
+stm32f411 = ["svd-f411"]
+stm32f412 = ["svd-f412"]
+stm32f413 = ["svd-f413"]
+stm32f423 = ["svd-f413", "aes"]
+stm32f427 = ["svd-f427"]
+stm32f429 = ["svd-f429"]
+stm32f437 = ["svd-f427", "cryp"]
+stm32f439 = ["svd-f429", "cryp"]
+stm32f446 = ["svd-f446"]
+stm32f469 = ["svd-f469"]
+stm32f479 = ["svd-f469", "cryp"]
+
+svd-f401 = ["f4", "stm32f4?/stm32f401", "gpio-f401"]
+svd-f405 = ["f4", "stm32f4?/stm32f405", "gpio-f417"]
+svd-f407 = ["f4", "stm32f4?/stm32f407", "gpio-f417"]
+svd-f410 = ["f4", "stm32f4?/stm32f410", "gpio-f410"]
+svd-f411 = ["f4", "stm32f4?/stm32f411", "gpio-f411"]
+svd-f412 = ["f4", "stm32f4?/stm32f412", "gpio-f412"]
+svd-f413 = ["f4", "stm32f4?/stm32f413", "gpio-f413"]
+svd-f427 = ["f4", "stm32f4?/stm32f427", "gpio-f427", "fsmc"]
+svd-f429 = ["f4", "stm32f4?/stm32f429", "gpio-f427", "fmc"]
+svd-f446 = ["f4", "stm32f4?/stm32f446", "gpio-f446"]
+svd-f469 = ["f4", "stm32f4?/stm32f469", "gpio-f469"]
gpio-f401 = [
+ "gpioc",
"gpiod",
"gpioe",
+ "i2c2",
"i2c3",
- "otg-fs",
+ "i2s",
+ "i2s2",
+ "i2s2ext",
+ "i2s3",
+ "i2s3ext",
+ "rtc",
"sdio",
+ "spi1",
+ "spi2",
"spi3",
"spi4",
+ "sys",
"tim1",
+ "tim10",
+ "tim11",
"tim2",
"tim3",
"tim4",
"tim5",
"tim9",
- "tim10",
- "tim11",
+ "usart1",
+ "usart2",
+ "usart6",
]
gpio-f410 = [
- "dac",
"fmpi2c1",
+ "gpioc",
+ "i2c2",
+ "i2s",
+ "i2s1",
+ "i2s2",
+ "i2s5",
"lptim1",
+ "rtc",
+ "spi1",
+ "spi2",
"spi5",
+ "sys",
"tim1",
+ "tim11",
"tim5",
"tim6",
"tim9",
- "tim11",
+ "usart1",
+ "usart2",
+ "usart6",
]
gpio-f411 = [
+ "otg-fs",
+ "gpioc",
"gpiod",
- "gpioe", # "gpioi",
+ "gpioe",
+ "i2c2",
"i2c3",
- "otg-fs",
+ "i2s",
+ "i2s1",
+ "i2s2",
+ "i2s3",
+ "i2s4",
+ "i2s5",
+ "rtc",
"sdio",
+ "spi1",
+ "spi2",
+ "spi3",
+ "spi4",
+ "spi5",
+ "sys",
"tim1",
+ "tim10",
+ "tim11",
"tim2",
"tim3",
"tim4",
"tim5",
"tim9",
- "tim10",
- "tim11",
- "spi3",
- "spi4",
- "spi5",
+ "usart1",
+ "usart2",
+ "usart6",
+
]
gpio-f412 = [
- "gpiod",
- "gpioe",
- "gpiof",
- "gpiog",
+ "otg-fs",
+ "rng",
"can1",
"can2",
"dfsdm1",
"fmpi2c1",
"fsmc",
+ "gpioc",
+ "gpiod",
+ "gpioe",
+ "gpiof",
+ "gpiog",
+ "i2c2",
"i2c3",
+ "i2s",
+ "i2s1",
+ "i2s2",
+ "i2s3",
+ "i2s4",
+ "i2s5",
"quadspi",
- "otg-fs",
- "rng",
+ "rtc",
"sdio",
+ "spi1",
+ "spi2",
"spi3",
"spi4",
"spi5",
+ "sys",
"tim1",
+ "tim10",
+ "tim11",
+ "tim12",
+ "tim13",
+ "tim14",
"tim2",
"tim3",
"tim4",
@@ -220,37 +369,52 @@ gpio-f412 = [
"tim7",
"tim8",
"tim9",
- "tim10",
- "tim11",
- "tim12",
- "tim13",
- "tim14",
+ "usart1",
+ "usart2",
"usart3",
+ "usart6",
]
gpio-f413 = [
- "gpiod",
- "gpioe",
- "gpiof",
- "gpiog",
+ "otg-fs",
+ "rng",
+ "aes",
"can1",
"can2",
"can3",
- "dac",
"dfsdm1",
"dfsdm2",
- "fsmc",
"fmpi2c1",
+ "fsmc",
+ "gpioc",
+ "gpiod",
+ "gpioe",
+ "gpiof",
+ "gpiog",
+ "i2c2",
"i2c3",
+ "i2s",
+ "i2s1",
+ "i2s2",
+ "i2s3",
+ "i2s4",
+ "i2s5",
"lptim1",
"quadspi",
- "otg-fs",
- "rng",
+ "rtc",
"sai1",
"sdio",
+ "spi1",
+ "spi2",
"spi3",
"spi4",
"spi5",
+ "sys",
"tim1",
+ "tim10",
+ "tim11",
+ "tim12",
+ "tim13",
+ "tim14",
"tim2",
"tim3",
"tim4",
@@ -259,40 +423,51 @@ gpio-f413 = [
"tim7",
"tim8",
"tim9",
- "tim10",
- "tim11",
- "tim12",
- "tim13",
- "tim14",
- "usart3",
+ "uart10",
"uart4",
"uart5",
"uart7",
"uart8",
"uart9",
- "uart10",
+ "usart1",
+ "usart2",
+ "usart3",
+ "usart6",
]
gpio-f417 = [
- "gpiod",
- "gpioe",
- "gpiof",
- "gpiog",
- "gpioi",
"adc2",
"adc3",
+ "otg-fs",
+ "otg-hs",
+ "rng",
"can1",
"can2",
- "dac",
"dcmi",
- "eth",
- "fsmc",
+ "eth", #"fsmc",
+ "gpioc",
+ "gpiod",
+ "gpioe",
+ "gpiof",
+ "gpiog",
+ "gpioh",
+ "gpioi",
+ "i2c2",
"i2c3",
- "otg-fs",
- "otg-hs",
- "rng",
+ "i2s",
+ "i2s2",
+ "i2s3",
+ "rtc",
"sdio",
+ "spi1",
+ "spi2",
"spi3",
+ "sys",
"tim1",
+ "tim10",
+ "tim11",
+ "tim12",
+ "tim13",
+ "tim14",
"tim2",
"tim3",
"tim4",
@@ -301,43 +476,55 @@ gpio-f417 = [
"tim7",
"tim8",
"tim9",
- "tim10",
- "tim11",
- "tim12",
- "tim13",
- "tim14",
- "usart3",
"uart4",
"uart5",
+ "usart1",
+ "usart2",
+ "usart3",
+ "usart6",
]
gpio-f427 = [
+ "adc2",
+ "adc3",
+ "dma2d",
+ "otg-fs",
+ "otg-hs",
+ "rng",
+ "can1",
+ "can2",
+ "dcmi",
+ "eth",
+ "gpioc",
"gpiod",
"gpioe",
"gpiof",
"gpiog",
+ "gpioh",
"gpioi",
"gpioj",
"gpiok",
- "adc2",
- "adc3",
- "can1",
- "can2",
- "dac",
- "dcmi",
- "dma2d",
- "eth",
+ "i2c2",
"i2c3",
+ "i2s",
+ "i2s2",
+ "i2s3",
"ltdc",
- "otg-fs",
- "otg-hs",
- "rng",
+ "rtc",
"sai1",
"sdio",
+ "spi1",
+ "spi2",
"spi3",
"spi4",
"spi5",
"spi6",
+ "sys",
"tim1",
+ "tim10",
+ "tim11",
+ "tim12",
+ "tim13",
+ "tim14",
"tim2",
"tim3",
"tim4",
@@ -346,41 +533,114 @@ gpio-f427 = [
"tim7",
"tim8",
"tim9",
- "tim10",
- "tim11",
- "tim12",
- "tim13",
- "tim14",
- "usart3",
"uart4",
"uart5",
"uart7",
"uart8",
+ "usart1",
+ "usart2",
+ "usart3",
+ "usart6",
]
gpio-f446 = [
+ "adc2",
+ "adc3",
+ "otg-fs",
+ "otg-hs",
+ "can1",
+ "can2",
+ "dcmi",
+ "fmc",
+ "fmpi2c1",
+ "gpioc",
"gpiod",
"gpioe",
"gpiof",
"gpiog",
+ "i2c2",
+ "i2c3",
+ "i2s",
+ "i2s1",
+ "i2s2",
+ "i2s3",
+ "quadspi",
+ "rtc",
+ "sai1",
+ "sai2",
+ "spdifrx",
+ "spi1",
+ "spi2",
+ "spi3",
+ "spi4",
+ "sys",
+ "tim1",
+ "tim10",
+ "tim11",
+ "tim12",
+ "tim13",
+ "tim14",
+ "tim2",
+ "tim3",
+ "tim4",
+ "tim5",
+ "tim6",
+ "tim7",
+ "tim8",
+ "tim9",
+ "uart4",
+ "uart5",
+ "usart1",
+ "usart2",
+ "usart3",
+ "usart6",
+ "sdio",
+
+]
+gpio-f469 = [
"adc2",
"adc3",
+ "dma2d",
+ "otg-fs",
+ "otg-hs",
+ "rng",
"can1",
"can2",
- "dac",
"dcmi",
- "fmpi2c1",
+ "dsihost",
+ "eth",
"fmc",
+ "gpioc",
+ "gpiod",
+ "gpioe",
+ "gpiof",
+ "gpiog",
+ "gpioh",
+ "gpioi",
+ "gpioj",
+ "gpiok",
+ "i2c2",
"i2c3",
+ "i2s",
+ "i2s2",
+ "i2s3",
+ "ltdc",
"quadspi",
- "otg-fs",
- "otg-hs",
+ "rtc",
"sai1",
- "sai2",
"sdio",
+ "spi1",
+ "spi2",
"spi3",
"spi4",
- "spdifrx",
+ "spi5",
+ "spi6",
+ "sys",
"tim1",
+ "tim10",
+ "tim11",
+ "tim12",
+ "tim13",
+ "tim14",
"tim2",
"tim3",
"tim4",
@@ -389,66 +649,234 @@ gpio-f446 = [
"tim7",
"tim8",
"tim9",
+ "uart4",
+ "uart5",
+ "uart7",
+ "uart8",
+ "usart1",
+ "usart2",
+ "usart3",
+ "usart6",
+]
+
+# F7
+
+stm32f722 = ["svd-f7x2"]
+stm32f723 = ["svd-f7x3", "usb_hs_phy"]
+stm32f730 = ["svd-f730", "usb_hs_phy"]
+stm32f732 = ["svd-f7x2"]
+stm32f733 = ["svd-f7x3", "usb_hs_phy"]
+stm32f745 = ["svd-f745"]
+stm32f746 = ["svd-f7x6"]
+stm32f756 = ["svd-f7x6"]
+stm32f765 = ["svd-f765"]
+stm32f767 = ["svd-f7x7"]
+stm32f769 = ["svd-f7x9"]
+stm32f777 = ["svd-f7x7"]
+stm32f778 = ["svd-f7x9"]
+stm32f779 = ["svd-f7x9"]
+
+svd-f7x2 = ["f7", "stm32f7?/stm32f7x2", "gpio-f72x"]
+svd-f7x3 = ["f7", "stm32f7?/stm32f7x3", "gpio-f72x"]
+svd-f730 = ["f7", "stm32f7?/stm32f730", "gpio-f72x"]
+svd-f745 = ["f7", "stm32f7?/stm32f745", "gpio-f746"]
+svd-f7x6 = ["f7", "stm32f7?/stm32f7x6", "gpio-f746"]
+svd-f765 = ["f7", "stm32f7?/stm32f765", "gpio-f76x"]
+svd-f7x7 = ["f7", "stm32f7?/stm32f7x7", "gpio-f76x"]
+svd-f7x9 = ["f7", "stm32f7?/stm32f7x9", "gpio-f76x"]
+
+gpio-f72x = [
+ "adc2",
+ "adc3",
+ "aes",
+ "can1",
+ "fmc",
+ "gpioc",
+ "gpiod",
+ "gpioe",
+ "gpiof",
+ "gpiog",
+ "gpioh",
+ "gpioi",
+ "i2c2",
+ "i2c3",
+ "i2s",
+ "i2s1",
+ "i2s2",
+ "i2s3",
+ "lptim1",
+ "quadspi",
+ "rtc",
+ "sai1",
+ "sai2",
+ "sdmmc1",
+ "sdmmc2",
+ "spi1",
+ "spi2",
+ "spi3",
+ "spi4",
+ "spi5",
+ "sys",
+ "tim1",
"tim10",
"tim11",
"tim12",
"tim13",
"tim14",
- "usart3",
+ "tim2",
+ "tim3",
+ "tim4",
+ "tim5",
+ "tim8",
+ "tim9",
"uart4",
"uart5",
+ "uart7",
+ "uart8",
+ "usart1",
+ "usart2",
+ "usart3",
+ "usart6",
+ "otg-fs",
+ "otg-hs",
]
-gpio-f469 = [
+gpio-f746 = [
+ "adc2",
+ "adc3",
+ "dma2d",
+ "can1",
+ "can2",
+ "cryp",
+ "dcmi",
+ "eth",
+ "fmc",
+ "gpioc",
"gpiod",
"gpioe",
"gpiof",
"gpiog",
+ "gpioh",
"gpioi",
"gpioj",
"gpiok",
+ "hash",
+ "i2c2",
+ "i2c3",
+ "i2c4",
+ "i2s",
+ "i2s1",
+ "i2s2",
+ "i2s3",
+ "lptim1",
+ "ltdc",
+ "quadspi",
+ "rtc",
+ "sai1",
+ "sai2",
+ "sdmmc1",
+ "spdifrx",
+ "spi1",
+ "spi2",
+ "spi3",
+ "spi4",
+ "spi5",
+ "spi6",
+ "sys",
+ "tim1",
+ "tim10",
+ "tim11",
+ "tim12",
+ "tim13",
+ "tim14",
+ "tim2",
+ "tim3",
+ "tim4",
+ "tim5",
+ "tim8",
+ "tim9",
+ "uart4",
+ "uart5",
+ "uart7",
+ "uart8",
+ "usart1",
+ "usart2",
+ "usart3",
+ "usart6",
+ "otg-fs",
+ "otg-hs",
+]
+gpio-f76x = [
"adc2",
"adc3",
+ "dma2d",
"can1",
"can2",
- "dac",
- "dma2d",
+ "cryp",
+ "can3",
"dcmi",
+ "dfsdm1",
"dsihost",
"eth",
"fmc",
+ "gpioc",
+ "gpiod",
+ "gpioe",
+ "gpiof",
+ "gpiog",
+ "gpioh",
+ "gpioi",
+ "gpioj",
+ "gpiok",
+ "hash",
+ "i2c2",
"i2c3",
+ "i2c4",
+ "i2s",
+ "i2s1",
+ "i2s2",
+ "i2s3",
+ "lptim1",
"ltdc",
+ "mdios",
"quadspi",
- "otg-fs",
- "otg-hs",
- "rng",
+ "rtc",
"sai1",
- "sdio",
+ "sai2",
+ "sdmmc1",
+ "sdmmc2",
+ "spdifrx",
+ "spi1",
+ "spi2",
"spi3",
"spi4",
"spi5",
"spi6",
+ "sys",
"tim1",
+ "tim10",
+ "tim11",
+ "tim12",
+ "tim13",
+ "tim14",
"tim2",
"tim3",
"tim4",
"tim5",
- "tim6",
- "tim7",
"tim8",
"tim9",
- "tim10",
- "tim11",
- "tim12",
- "tim13",
- "tim14",
- "usart3",
"uart4",
"uart5",
"uart7",
"uart8",
+ "usart1",
+ "usart2",
+ "usart3",
+ "usart6",
+ "otg-fs",
+ "otg-hs",
]
+
## Support monotonic timers and other stuff that can be used by [RTICv1 framework](https://crates.io/crates/cortex-m-rtic)
rtic1 = ["dep:rtic-monotonic", "dep:systick-monotonic", "cortex-m-rtic"]
@@ -486,48 +914,112 @@ fsmc_lcd = ["dep:display-interface", "dep:display-interface-04"]
## SDIO peripheral support. See [sdio-host](https://crates.io/crates/sdio-host)
sdio-host = ["dep:sdio-host"]
+bb = []
+dma = []
+spi_v1 = []
+spi_v2 = []
+uart_v2 = []
+uart_v3 = []
+usb_hs_phy = []
dfsdm = []
sai = []
adc2 = []
adc3 = []
+adf1 = []
aes = []
can1 = []
can2 = []
can3 = []
cryp = []
+cm4 = []
+crs1 = []
+comp1 = []
+comp2 = []
+comp3 = []
+comp4 = []
+comp5 = []
+comp6 = []
+comp7 = []
+crs = []
dac = []
dcmi = []
+debug = []
dfsdm1 = ["dfsdm"]
dfsdm2 = ["dfsdm"]
dma2d = []
dsihost = []
+hash = []
eth = []
+fdcan1 = []
+fdcan2 = []
+fdcan3 = []
fmc = []
fsmc = []
fmpi2c1 = []
+gpioc = []
gpiod = []
gpioe = []
gpiof = []
gpiog = []
+gpioh = []
gpioi = []
gpioj = []
gpiok = []
+hdmi = []
+hrtim1 = []
+hspi1 = []
+i2c2 = []
i2c3 = []
+i2c4 = []
+i2c5 = []
+i2c6 = []
+i2s1 = []
+i2s2 = []
+i2s2ext = []
+i2s3 = []
+i2s3ext = []
+i2s4 = []
+i2s5 = []
+i2s6 = []
+ir = []
+lcd = []
lptim1 = []
+lptim2 = []
+lptim3 = []
+lptim4 = []
+lptim5 = []
+lpuart1 = []
+lpuart2 = []
ltdc = ["dep:micromath"]
+mdios = []
+mdf1 = []
quadspi = []
+octospi = []
+opamp2 = []
otg-fs = []
otg-hs = []
+pssi = []
+pwr = []
+rf = []
rng = []
+rtc = []
sai1 = ["sai"]
sai2 = ["sai"]
+sai3 = []
+sai4 = []
sdio = []
+sdmmc1 = []
+sdmmc2 = []
+spi1 = []
+spi2 = []
spi3 = []
spi4 = []
spi5 = []
spi6 = []
+sys = []
spdifrx = []
+swpmi1 = []
tim1 = []
tim2 = []
tim3 = []
@@ -542,13 +1034,39 @@ tim11 = []
tim12 = []
tim13 = []
tim14 = []
+tim15 = []
+tim16 = []
+tim17 = []
+tim19 = []
+tim20 = []
+tim21 = []
+tim22 = []
+tim23 = []
+tim24 = []
+timx = []
+ts = []
+tsc = []
+ucpd1 = []
+ucpd2 = []
+usart1 = []
+usart2 = []
usart3 = []
+usart4 = []
+usart5 = []
+usart6 = []
+usart7 = []
+usart8 = []
+usart10 = []
uart4 = []
uart5 = []
uart7 = []
uart8 = []
uart9 = []
uart10 = []
+usb = [] # "dep:stm32-usbd"
+v_ref = []
+
+disabled = []
[profile.dev]
debug = true
@@ -563,7 +1081,7 @@ opt-level = "s"
[[example]]
name = "analog-stopwatch-with-spi-ssd1306"
-required-features = ["spi4", "tim2", "gpioe", "gpiog"] # stm32f429
+required-features = ["f4", "spi4", "tim2", "gpioe", "gpiog"] # stm32f429
[[example]]
name = "blinky-timer-irq"
@@ -642,7 +1160,7 @@ required-features = ["rng"] # stm32f407
[[example]]
name = "rtc"
-required-features = []
+required-features = ["f4"]
[[example]]
name = "rtc_alarm"
@@ -716,6 +1234,10 @@ required-features = ["stm32f411"]
name = "uart-dma"
required-features = ["stm32f405"]
+[[example]]
+name = "spi_16"
+required-features = ["gpiod"]
+
[[example]]
name = "ssd1306-image"
required-features = [] # stm32f411
@@ -755,3 +1277,5 @@ required-features = ["otg-fs", "usb_fs"] # stm32f401
[[example]]
name = "ws2812-spi"
required-features = []
+version = "0.3.14"
+default-features = false
diff --git a/README.md b/README.md
index fe1f5c8ad..887b7e709 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,7 @@ stm32f4xx-hal
[![Continuous integration](https://github.com/stm32-rs/stm32f4xx-hal/workflows/Continuous%20integration/badge.svg)](https://github.com/stm32-rs/stm32f4xx-hal)
_stm32f4xx-hal_ contains a multi device hardware abstraction on top of the
-peripheral access API for the STMicro STM32F4 series microcontrollers. The
+peripheral access API for the STMicro STM32F2/F4/F7 series microcontrollers. The
selection of the MCU is done by feature gates, typically specified by board
support crates. Currently supported configurations are:
@@ -17,28 +17,50 @@ support crates. Currently supported configurations are:
+* stm32f215
+* stm32f217
+*
* stm32f401
* stm32f405
* stm32f407
+ |
+
* stm32f410
* stm32f411
* stm32f412
- |
-
* stm32f413
* stm32f415
* stm32f417
* stm32f423
-* stm32f427
-* stm32f429
|
+* stm32f427
+* stm32f429
* stm32f437
* stm32f439
* stm32f446
* stm32f469
* stm32f479
+ |
+
+* stm32f722
+* stm32f723
+* stm32f730
+* stm32f732
+* stm32f733
+* stm32f745
+* stm32f746
+ |
+
+* stm32f756
+* stm32f765
+* stm32f767
+* stm32f769
+* stm32f777
+* stm32f778
+* stm32f779
|
+
The idea behind this crate is to gloss over the slight differences in the
diff --git a/build.rs b/build.rs
index 8e25570ea..d09e16319 100644
--- a/build.rs
+++ b/build.rs
@@ -23,7 +23,9 @@ impl IteratorExt for T {
fn main() {
let _chip_name = match env::vars()
.map(|(a, _)| a)
- .filter(|x| x.starts_with("CARGO_FEATURE_STM32F4"))
+ .filter(|x| {
+ x.starts_with("CARGO_FEATURE_STM32F4") || x.starts_with("CARGO_FEATURE_STM32F7")
+ })
.get_one()
{
Ok(x) => x,
diff --git a/examples/spi_16.rs b/examples/spi_16.rs
new file mode 100644
index 000000000..fcd699793
--- /dev/null
+++ b/examples/spi_16.rs
@@ -0,0 +1,60 @@
+#![no_main]
+#![no_std]
+
+use panic_semihosting as _;
+
+use stm32f4xx_hal as hal;
+
+use hal::{
+ pac,
+ prelude::*,
+ spi::{NoMiso, Spi},
+};
+
+use cortex_m_rt::entry;
+
+#[entry]
+fn main() -> ! {
+ let p = pac::Peripherals::take().unwrap();
+
+ let rcc = p.RCC.constrain();
+ let clocks = rcc.cfgr.freeze();
+
+ let gpioa = p.GPIOA.split();
+ let gpioc = p.GPIOC.split();
+ let gpiod = p.GPIOD.split();
+
+ // Configure pin for button. This happens to be the pin for the USER button
+ // on the NUCLEO-F746ZG board.
+ let button = gpioc.pc13.into_floating_input();
+
+ // Prepare pins for SPI
+ let mut ncs = gpiod.pd14.into_push_pull_output();
+ let sck = gpioa.pa5;
+ let mosi = gpioa.pa7;
+
+ // Set NCS pin to high (disabled) initially
+ ncs.set_high();
+
+ // Initialize SPI
+ let mut spi = Spi::new(
+ p.SPI1,
+ (sck, NoMiso::new(), mosi),
+ embedded_hal::spi::MODE_0,
+ 250.kHz(),
+ &clocks,
+ )
+ .frame_size_16bit();
+
+ // Use a button to control output via the Maxim Integrated MAX5214 DAC.
+ loop {
+ let data = if button.is_high() { 0xffff } else { 0x0000 };
+
+ let word: u16 = (0b01 << 14) | // write-through mode
+ (data & 0x3fff); // data bits
+
+ ncs.set_low();
+ spi.write(&[word]).unwrap();
+ ncs.set_high();
+ }
+}
diff --git a/src/adc.rs b/src/adc.rs
index 024dca703..7f87a1b96 100644
--- a/src/adc.rs
+++ b/src/adc.rs
@@ -140,8 +140,16 @@ use crate::{
use core::fmt;
pub mod config;
+
+#[cfg(feature = "f2")]
+mod f2;
+
+#[cfg(feature = "f4")]
mod f4;
+#[cfg(feature = "f7")]
+mod f7;
+
/// Vref internal signal, used for calibration
pub struct Vref;
diff --git a/src/adc/f2.rs b/src/adc/f2.rs
new file mode 100644
index 000000000..8b1378917
--- /dev/null
+++ b/src/adc/f2.rs
@@ -0,0 +1 @@
+
diff --git a/src/adc/f4.rs b/src/adc/f4.rs
index f1d1cb1b0..87e56d145 100644
--- a/src/adc/f4.rs
+++ b/src/adc/f4.rs
@@ -12,7 +12,7 @@ adc_pins!(
gpio::PA7 => (ADC1, 7),
gpio::PB0 => (ADC1, 8),
gpio::PB1 => (ADC1, 9),
- Temperature => (ADC1, 16),
+ Temperature => (ADC1, 18),
Vbat => (ADC1, 18),
Vref => (ADC1, 17),
);
@@ -205,7 +205,7 @@ adc_pins!(
gpio::PA7 => (ADC1, 7),
gpio::PB0 => (ADC1, 8),
gpio::PB1 => (ADC1, 9),
- Temperature => (ADC1, 16),
+ Temperature => (ADC1, 18),
Vbat => (ADC1, 18),
Vref => (ADC1, 17),
);
diff --git a/src/adc/f7.rs b/src/adc/f7.rs
new file mode 100644
index 000000000..dbb92163a
--- /dev/null
+++ b/src/adc/f7.rs
@@ -0,0 +1,63 @@
+use super::*;
+
+// See "Datasheet - production data"
+// Pinouts and pin description (page 66..)
+adc_pins!(pac::ADC1,
+ gpio::PA0 => 0,
+ gpio::PA1 => 1,
+ gpio::PA2 => 2,
+ gpio::PA3 => 3,
+ gpio::PA4 => 4,
+ gpio::PA5 => 5,
+ gpio::PA6 => 6,
+ gpio::PA7 => 7,
+ gpio::PB0 => 8,
+ gpio::PB1 => 9,
+ gpio::PC0 => 10,
+ gpio::PC1 => 11,
+ gpio::PC2 => 12,
+ gpio::PC3 => 13,
+ gpio::PC4 => 14,
+ gpio::PC5 => 15,
+ Temperature => 18,
+ Vbat => 18,
+ Vref => 17,
+);
+
+adc_pins!(pac::ADC2,
+ gpio::PA0 => 0,
+ gpio::PA1 => 1,
+ gpio::PA2 => 2,
+ gpio::PA3 => 3,
+ gpio::PA4 => 4,
+ gpio::PA5 => 5,
+ gpio::PA6 => 6,
+ gpio::PA7 => 7,
+ gpio::PB0 => 8,
+ gpio::PB1 => 9,
+ gpio::PC0 => 10,
+ gpio::PC1 => 11,
+ gpio::PC2 => 12,
+ gpio::PC3 => 13,
+ gpio::PC4 => 14,
+ gpio::PC5 => 15,
+);
+
+adc_pins!(pac::ADC3,
+ gpio::PA0 => 0,
+ gpio::PA1 => 1,
+ gpio::PA2 => 2,
+ gpio::PA3 => 3,
+ gpio::PF6 => 4,
+ gpio::PF7 => 5,
+ gpio::PF8 => 6,
+ gpio::PF9 => 7,
+ gpio::PF10 => 8,
+ gpio::PF3 => 9,
+ gpio::PC0 => 10,
+ gpio::PC1 => 11,
+ gpio::PC2 => 12,
+ gpio::PC3 => 13,
+ gpio::PF4 => 14,
+ gpio::PF5 => 15,
+);
diff --git a/src/can.rs b/src/can.rs
index 44034f242..fd0c5a52f 100644
--- a/src/can.rs
+++ b/src/can.rs
@@ -2,7 +2,7 @@
//!
use crate::gpio::{self, NoPin};
-use crate::pac::{CAN1, CAN2};
+use crate::pac;
use crate::rcc;
pub trait Instance: crate::Sealed + rcc::Enable + rcc::Reset + gpio::alt::CanCommon {}
@@ -16,22 +16,22 @@ macro_rules! can {
}
// Implemented by all SPI instances
-can! { CAN1: Can1 }
-can! { CAN2: Can2 }
+can! { pac::CAN1: Can1 }
+#[cfg(feature = "can2")]
+can! { pac::CAN2: Can2 }
#[cfg(feature = "can3")]
-can! { crate::pac::CAN3: Can3 }
+can! { pac::CAN3: Can3 }
/// Pins and definitions for models with a third CAN peripheral
#[cfg(feature = "can3")]
mod can3 {
use super::*;
- use crate::pac::CAN3;
- unsafe impl bxcan::Instance for Can {
- const REGISTERS: *mut bxcan::RegisterBlock = CAN3::ptr() as *mut _;
+ unsafe impl bxcan::Instance for Can {
+ const REGISTERS: *mut bxcan::RegisterBlock = pac::CAN3::ptr() as *mut _;
}
- unsafe impl bxcan::FilterOwner for Can {
+ unsafe impl bxcan::FilterOwner for Can {
const NUM_FILTER_BANKS: u8 = 14;
}
}
@@ -110,16 +110,17 @@ impl Can {
}
}
-unsafe impl bxcan::Instance for Can {
- const REGISTERS: *mut bxcan::RegisterBlock = CAN1::ptr() as *mut _;
+unsafe impl bxcan::Instance for Can {
+ const REGISTERS: *mut bxcan::RegisterBlock = pac::CAN1::ptr() as *mut _;
}
-unsafe impl bxcan::Instance for Can {
- const REGISTERS: *mut bxcan::RegisterBlock = CAN2::ptr() as *mut _;
+#[cfg(feature = "can2")]
+unsafe impl bxcan::Instance for Can {
+ const REGISTERS: *mut bxcan::RegisterBlock = pac::CAN2::ptr() as *mut _;
}
-unsafe impl bxcan::FilterOwner for Can {
+unsafe impl bxcan::FilterOwner for Can {
const NUM_FILTER_BANKS: u8 = 28;
}
-unsafe impl bxcan::MasterInstance for Can {}
+unsafe impl bxcan::MasterInstance for Can {}
diff --git a/src/dma/traits.rs b/src/dma/traits.rs
index 96e9ef718..84e10d97b 100644
--- a/src/dma/traits.rs
+++ b/src/dma/traits.rs
@@ -282,6 +282,7 @@ pub unsafe trait PeriAddress {
}
// Convenience macro for implementing addresses on peripherals
+#[allow(unused)]
macro_rules! address {
($(($peripheral:ty, $register:ident, $size: ty)),+ $(,)*) => {
$(
@@ -296,6 +297,7 @@ macro_rules! address {
)+
};
}
+#[allow(unused)]
use address;
/// Type alias to a DMA RegisterBlock.
@@ -344,7 +346,23 @@ macro_rules! dma_map {
}
use dma_map;
+#[cfg(feature = "f2")]
+mod f2;
+#[allow(unused)]
+#[cfg(feature = "f2")]
+pub use f2::*;
+
+#[cfg(feature = "f4")]
mod f4;
+#[allow(unused)]
+#[cfg(feature = "f4")]
+pub use f4::*;
+
+#[cfg(feature = "f7")]
+mod f7;
+#[allow(unused)]
+#[cfg(feature = "f7")]
+pub use f7::*;
#[cfg(feature = "dfsdm")]
pub struct FLT {
diff --git a/src/dma/traits/f2.rs b/src/dma/traits/f2.rs
new file mode 100644
index 000000000..73e176ed0
--- /dev/null
+++ b/src/dma/traits/f2.rs
@@ -0,0 +1,119 @@
+use super::*;
+
+dma_map! {
+ (Stream0:0, pac::SPI3, [PeripheralToMemory]), //SPI3_RX
+ (Stream2:0, pac::SPI3, [PeripheralToMemory]), //SPI3_RX
+ (Stream3:0, pac::SPI2, [PeripheralToMemory]), //SPI2_RX
+ (Stream4:0, pac::SPI2, [MemoryToPeripheral]), //SPI2_TX
+ (Stream5:0, pac::SPI3, [MemoryToPeripheral]), //SPI3_TX
+ (Stream7:0, pac::SPI3, [MemoryToPeripheral]), //SPI3_TX
+
+ (Stream0:1, pac::I2C1, [PeripheralToMemory]), //I2C1_RX
+ (Stream2:1, timer::DMAR, [MemoryToPeripheral | PeripheralToMemory]), //TIM7_UP
+ (Stream4:1, timer::DMAR, [MemoryToPeripheral | PeripheralToMemory]), //TIM7_UP
+ (Stream5:1, pac::I2C1, [PeripheralToMemory]), //I2C1_RX
+ (Stream6:1, pac::I2C1, [MemoryToPeripheral]), //I2C1_TX
+ (Stream7:1, pac::I2C1, [MemoryToPeripheral]), //I2C1_TX
+
+ (Stream0:2, timer::CCR1, [MemoryToPeripheral | PeripheralToMemory]), //TIM4_CH1
+ (Stream3:2, timer::CCR2, [MemoryToPeripheral | PeripheralToMemory]), //TIM4_CH2
+ (Stream6:2, timer::DMAR, [MemoryToPeripheral | PeripheralToMemory]), //TIM4_UP
+ (Stream7:2, timer::CCR3, [MemoryToPeripheral | PeripheralToMemory]), //TIM4_CH3
+
+ (Stream1:3, timer::CCR3, [MemoryToPeripheral | PeripheralToMemory]), //TIM2_CH3
+ (Stream1:3, timer::DMAR, [MemoryToPeripheral | PeripheralToMemory]), //TIM2_UP
+ (Stream2:3, pac::I2C3, [PeripheralToMemory]), //I2C3_RX
+ (Stream4:3, pac::I2C3, [MemoryToPeripheral]), //I2C3_TX
+ (Stream5:3, timer::CCR1, [MemoryToPeripheral | PeripheralToMemory]), //TIM2_CH1
+ (Stream6:3, timer::CCR2, [MemoryToPeripheral | PeripheralToMemory]), //TIM2_CH2
+ (Stream6:3, timer::CCR4, [MemoryToPeripheral | PeripheralToMemory]), //TIM2_CH4
+ (Stream7:3, timer::CCR4, [MemoryToPeripheral | PeripheralToMemory]), //TIM2_CH4
+ (Stream7:3, timer::DMAR, [MemoryToPeripheral | PeripheralToMemory]), //TIM2_UP
+
+ (Stream0:4, pac::UART5, [PeripheralToMemory]), //UART5_RX
+ (Stream1:4, pac::USART3, [PeripheralToMemory]), //USART3_RX
+ (Stream2:4, pac::UART4, [PeripheralToMemory]), //UART4_RX
+ (Stream3:4, pac::USART3, [MemoryToPeripheral]), //USART3_TX
+ (Stream4:4, pac::UART4, [MemoryToPeripheral]), //UART4_TX
+ (Stream5:4, pac::USART2, [PeripheralToMemory]), //USART2_RX
+ (Stream6:4, pac::USART2, [MemoryToPeripheral]), //USART2_TX
+ (Stream7:4, pac::UART5, [MemoryToPeripheral]), //UART5_TX
+
+ (Stream2:5, timer::CCR4, [MemoryToPeripheral | PeripheralToMemory]), //TIM3_CH4
+ (Stream2:5, timer::DMAR, [MemoryToPeripheral | PeripheralToMemory]), //TIM3_UP
+ (Stream4:5, timer::CCR1, [MemoryToPeripheral | PeripheralToMemory]), //TIM3_CH1
+ (Stream4:5, timer::DMAR, [MemoryToPeripheral | PeripheralToMemory]), //TIM3_TRIG
+ (Stream5:5, timer::CCR2, [MemoryToPeripheral | PeripheralToMemory]), //TIM3_CH2
+ (Stream7:5, timer::CCR3, [MemoryToPeripheral | PeripheralToMemory]), //TIM3_CH3
+
+ (Stream0:6, timer::CCR3, [MemoryToPeripheral | PeripheralToMemory]), //TIM5_CH3/UP
+ (Stream0:6, timer::DMAR, [MemoryToPeripheral | PeripheralToMemory]), //TIM5_CH3/UP
+ (Stream1:6, timer::CCR4, [MemoryToPeripheral | PeripheralToMemory]), //TIM5_CH4/TRIG
+ (Stream1:6, timer::DMAR, [MemoryToPeripheral | PeripheralToMemory]), //TIM5_CH4/TRIG
+ (Stream2:6, timer::CCR1, [MemoryToPeripheral | PeripheralToMemory]), //TIM5_CH1
+ (Stream3:6, timer::CCR4, [MemoryToPeripheral | PeripheralToMemory]), //TIM5_CH4/TRIG
+ (Stream3:6, timer::DMAR, [MemoryToPeripheral | PeripheralToMemory]), //TIM5_TRIG
+ (Stream4:6, timer::CCR2, [MemoryToPeripheral | PeripheralToMemory]), //TIM5_CH2
+ (Stream6:6, timer::DMAR, [MemoryToPeripheral | PeripheralToMemory]), //TIM5_UP
+
+ (Stream1:7, timer::DMAR, [MemoryToPeripheral | PeripheralToMemory]), //TIM6_UP
+ (Stream2:7, pac::I2C2, [PeripheralToMemory]), //I2C2_RX
+ (Stream3:7, pac::I2C2, [PeripheralToMemory]), //I2C2_RX
+ (Stream4:7, pac::USART3, [MemoryToPeripheral]), //USART3_TX:DMA_CHANNEL_7
+ (Stream5:7, pac::DAC, [MemoryToPeripheral]), //DAC1
+ //(Stream6:7, pac::DAC2, [MemoryToPeripheral]), //DAC2
+ (Stream7:7, pac::I2C2, [MemoryToPeripheral]), //I2C2_TX
+
+ (Stream0:0, pac::ADC1, [PeripheralToMemory]), //ADC1
+ (Stream2:0, timer::CCR1, [MemoryToPeripheral | PeripheralToMemory]), //TIM8_CH1
+ (Stream2:0, timer::CCR2, [MemoryToPeripheral | PeripheralToMemory]), //TIM8_CH2
+ (Stream2:0, timer::CCR3, [MemoryToPeripheral | PeripheralToMemory]), //TIM8_CH3
+ (Stream4:0, pac::ADC1, [PeripheralToMemory]), //ADC1
+ (Stream6:0, timer::CCR1, [MemoryToPeripheral | PeripheralToMemory]), //TIM1_CH1
+ (Stream6:0, timer::CCR2, [MemoryToPeripheral | PeripheralToMemory]), //TIM1_CH2
+ (Stream6:0, timer::CCR3, [MemoryToPeripheral | PeripheralToMemory]), //TIM1_CH3
+
+ (Stream1:1, pac::DCMI, [PeripheralToMemory]), //DCMI
+ (Stream2:1, pac::ADC2, [PeripheralToMemory]), //ADC2
+ (Stream3:1, pac::ADC2, [PeripheralToMemory]), //ADC2
+ (Stream7:1, pac::DCMI, [PeripheralToMemory]), //DCMI
+
+ (Stream0:2, pac::ADC3, [PeripheralToMemory]), //ADC3
+ (Stream1:2, pac::ADC3, [PeripheralToMemory]), //ADC3
+ //(Stream7:2, pac::HASH_IN, [MemoryToPeripheral]), //HASH_IN
+ (Stream0:3, pac::SPI1, [PeripheralToMemory]), //SPI1_RX
+ (Stream2:3, pac::SPI1, [PeripheralToMemory]), //SPI1_RX
+ (Stream3:3, pac::SPI1, [MemoryToPeripheral]), //SPI1_TX
+ (Stream5:3, pac::SPI1, [MemoryToPeripheral]), //SPI1_TX
+
+ (Stream2:4, pac::USART1, [PeripheralToMemory]), //USART1_RX
+ (Stream3:4, pac::SDIO, [MemoryToPeripheral | PeripheralToMemory]), //SDIO
+ (Stream5:4, pac::USART1, [PeripheralToMemory]), //USART1_RX
+ (Stream6:4, pac::SDIO, [MemoryToPeripheral | PeripheralToMemory]), //SDIO
+ (Stream7:4, pac::USART1, [MemoryToPeripheral]), //USART1_TX
+
+ (Stream1:5, pac::USART6, [PeripheralToMemory]), //USART6_RX
+ (Stream2:5, pac::USART6, [PeripheralToMemory]), //USART6_RX
+ (Stream6:5, pac::USART6, [MemoryToPeripheral]), //USART6_TX
+ (Stream7:5, pac::USART6, [MemoryToPeripheral]), //USART6_TX
+ (Stream0:6, timer::DMAR, [MemoryToPeripheral | PeripheralToMemory]), //TIM1_TRIG
+ (Stream1:6, timer::CCR1, [MemoryToPeripheral | PeripheralToMemory]), //TIM1_CH1
+ (Stream2:6, timer::CCR2, [MemoryToPeripheral | PeripheralToMemory]), //TIM1_CH2
+ (Stream3:6, timer::CCR1, [MemoryToPeripheral | PeripheralToMemory]), //TIM1_CH1
+ (Stream4:6, timer::CCR4, [MemoryToPeripheral | PeripheralToMemory]), //TIM1_CH4/TRIG/COM
+ (Stream4:6, timer::DMAR, [MemoryToPeripheral | PeripheralToMemory]), //TIM1_CH4/TRIG/COM
+ (Stream5:6, timer::DMAR, [MemoryToPeripheral | PeripheralToMemory]), //TIM1_UP
+ (Stream6:6, timer::CCR3, [MemoryToPeripheral | PeripheralToMemory]), //TIM1_CH3
+ (Stream1:7, timer::DMAR, [MemoryToPeripheral | PeripheralToMemory]), //TIM8_UP
+ (Stream2:7, timer::CCR1, [MemoryToPeripheral | PeripheralToMemory]), //TIM8_CH1
+ (Stream3:7, timer::CCR2, [MemoryToPeripheral | PeripheralToMemory]), //TIM8_CH2
+ (Stream4:7, timer::CCR3, [MemoryToPeripheral | PeripheralToMemory]), //TIM8_CH3
+ (Stream7:7, timer::CCR4, [MemoryToPeripheral | PeripheralToMemory]), //TIM8_CH4
+ (Stream7:7, timer::DMAR, [MemoryToPeripheral | PeripheralToMemory]), //TIM8_TRIG/COM
+}
+
+#[cfg(feature = "cryp")]
+dma_map! {
+ (Stream5:2, pac::CRYP_OUT, [PeripheralToMemory]), //CRYP_OUT
+ (Stream6:2, pac::CRYP_IN, [MemoryToPeripheral]), //CRYP_IN
+}
diff --git a/src/dma/traits/f7.rs b/src/dma/traits/f7.rs
new file mode 100644
index 000000000..09670f445
--- /dev/null
+++ b/src/dma/traits/f7.rs
@@ -0,0 +1,225 @@
+use super::*;
+
+dma_map! {
+ (Stream0:0, pac::SPI3, [PeripheralToMemory]), //SPI3_RX
+ (Stream2:0, pac::SPI3, [PeripheralToMemory]), //SPI3_RX
+ (Stream3:0, pac::SPI2, [PeripheralToMemory]), //SPI2_RX
+ (Stream4:0, pac::SPI2, [MemoryToPeripheral]), //SPI2_TX
+ (Stream5:0, pac::SPI3, [MemoryToPeripheral]), //SPI3_TX
+ (Stream7:0, pac::SPI3, [MemoryToPeripheral]), //SPI3_TX
+
+ (Stream0:1, pac::I2C1, [PeripheralToMemory]), //I2C1_RX
+ (Stream1:1, pac::I2C3, [PeripheralToMemory]), //I2C3_RX
+ (Stream2:1, timer::DMAR, [MemoryToPeripheral | PeripheralToMemory]), //TIM7_UP
+ (Stream4:1, timer::DMAR, [MemoryToPeripheral | PeripheralToMemory]), //TIM7_UP
+ (Stream5:1, pac::I2C1, [PeripheralToMemory]), //I2C1_RX
+ (Stream6:1, pac::I2C1, [MemoryToPeripheral]), //I2C1_TX
+ (Stream7:1, pac::I2C1, [MemoryToPeripheral]), //I2C1_TX
+
+ (Stream0:2, timer::CCR1, [MemoryToPeripheral | PeripheralToMemory]), //TIM4_CH1
+ (Stream3:2, timer::CCR2, [MemoryToPeripheral | PeripheralToMemory]), //TIM4_CH2
+ (Stream6:2, timer::DMAR, [MemoryToPeripheral | PeripheralToMemory]), //TIM4_UP
+ (Stream7:2, timer::CCR3, [MemoryToPeripheral | PeripheralToMemory]), //TIM4_CH3
+
+ (Stream1:3, timer::CCR3, [MemoryToPeripheral | PeripheralToMemory]), //TIM2_CH3
+ (Stream1:3, timer::DMAR, [MemoryToPeripheral | PeripheralToMemory]), //TIM2_UP
+ (Stream2:3, pac::I2C3, [PeripheralToMemory]), //I2C3_RX
+ (Stream4:3, pac::I2C3, [MemoryToPeripheral]), //I2C3_TX
+ (Stream5:3, timer::CCR1, [MemoryToPeripheral | PeripheralToMemory]), //TIM2_CH1
+ (Stream6:3, timer::CCR2, [MemoryToPeripheral | PeripheralToMemory]), //TIM2_CH2
+ (Stream6:3, timer::CCR4, [MemoryToPeripheral | PeripheralToMemory]), //TIM2_CH4
+ (Stream7