aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob McWhirter <[email protected]>2021-05-06 16:38:53 -0400
committerBob McWhirter <[email protected]>2021-05-06 16:38:53 -0400
commit75fe03a7e674b6fcded5219da3541bd1b3607582 (patch)
tree6375511c4a85c8ea5d1781899caf8dd8d579cb26
parente8898b48f9053b1944bf2897df4132305661fc06 (diff)
Further clean-up and adjustments. Follow RM for FIPS.
-rw-r--r--embassy-stm32/gen.py2
-rw-r--r--embassy-stm32/src/pac/regs.rs6796
-rw-r--r--embassy-stm32/src/pac/stm32f405oe.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f405og.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f405rg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f405vg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f405zg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f407ie.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f407ig.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f407ve.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f407vg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f407ze.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f407zg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f410c8.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f410cb.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f410r8.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f410rb.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f410t8.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f410tb.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f412ce.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f412cg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f412re.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f412rg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f412ve.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f412vg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f412ze.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f412zg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f413cg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f413ch.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f413mg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f413mh.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f413rg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f413rh.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f413vg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f413vh.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f413zg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f413zh.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f415og.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f415rg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f415vg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f415zg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f417ie.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f417ig.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f417ve.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f417vg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f417ze.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f417zg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f423ch.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f423mh.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f423rh.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f423vh.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f423zh.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f427ag.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f427ai.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f427ig.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f427ii.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f427vg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f427vi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f427zg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f427zi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f429ag.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f429ai.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f429be.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f429bg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f429bi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f429ie.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f429ig.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f429ii.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f429ne.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f429ng.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f429ni.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f429ve.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f429vg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f429vi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f429ze.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f429zg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f429zi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f437ai.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f437ig.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f437ii.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f437vg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f437vi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f437zg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f437zi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f439ai.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f439bg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f439bi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f439ig.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f439ii.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f439ng.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f439ni.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f439vg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f439vi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f439zg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f439zi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f469ae.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f469ag.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f469ai.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f469be.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f469bg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f469bi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f469ie.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f469ig.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f469ii.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f469ne.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f469ng.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f469ni.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f469ve.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f469vg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f469vi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f469ze.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f469zg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f469zi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f479ag.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f479ai.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f479bg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f479bi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f479ig.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f479ii.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f479ng.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f479ni.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f479vg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f479vi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f479zg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f479zi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l412c8.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l412cb.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l412k8.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l412kb.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l412r8.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l412rb.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l412t8.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l412tb.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l422cb.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l422kb.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l422rb.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l422tb.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l431cb.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l431cc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l431kb.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l431kc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l431rb.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l431rc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l431vc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l432kb.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l432kc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l433cb.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l433cc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l433rb.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l433rc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l433vc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l442kc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l443cc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l443rc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l443vc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l451cc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l451ce.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l451rc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l451re.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l451vc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l451ve.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l452cc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l452ce.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l452rc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l452re.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l452vc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l452ve.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l462ce.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l462re.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l462ve.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l471qe.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l471qg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l471re.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l471rg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l471ve.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l471vg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l471ze.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l471zg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l475rc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l475re.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l475rg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l475vc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l475ve.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l475vg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l476je.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l476jg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l476me.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l476mg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l476qe.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l476qg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l476rc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l476re.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l476rg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l476vc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l476ve.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l476vg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l476ze.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l476zg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l485jc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l485je.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l486jg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l486qg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l486rg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l486vg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l486zg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l496ae.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l496ag.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l496qe.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l496qg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l496re.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l496rg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l496ve.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l496vg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l496wg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l496ze.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l496zg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4a6ag.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4a6qg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4a6rg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4a6vg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4a6zg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4p5ae.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4p5ag.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4p5ce.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4p5cg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4p5qe.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4p5qg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4p5re.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4p5rg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4p5ve.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4p5vg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4p5ze.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4p5zg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4q5ag.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4q5cg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4q5qg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4q5rg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4q5vg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4q5zg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4r5ag.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4r5ai.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4r5qg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4r5qi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4r5vg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4r5vi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4r5zg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4r5zi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4r7ai.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4r7vi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4r7zi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4r9ag.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4r9ai.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4r9vg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4r9vi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4r9zg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4r9zi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4s5ai.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4s5qi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4s5vi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4s5zi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4s7ai.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4s7vi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4s7zi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4s9ai.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4s9vi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4s9zi.rs2
-rw-r--r--embassy-stm32/src/rng.rs34
267 files changed, 3684 insertions, 3676 deletions
diff --git a/embassy-stm32/gen.py b/embassy-stm32/gen.py
index 6dbe951d1..89c40ad7d 100644
--- a/embassy-stm32/gen.py
+++ b/embassy-stm32/gen.py
@@ -131,7 +131,7 @@ for chip in chips.values():
131 f.write(f'impl_usart_pin!({name}, CkPin, {pin}, {func});') 131 f.write(f'impl_usart_pin!({name}, CkPin, {pin}, {func});')
132 132
133 if peri['block'] == 'rng_v1/RNG': 133 if peri['block'] == 'rng_v1/RNG':
134 f.write(f'impl_rng!();') 134 f.write(f'impl_rng!({name});')
135 135
136 for mod, version in peripheral_versions.items(): 136 for mod, version in peripheral_versions.items():
137 f.write(f'pub use regs::{mod}_{version} as {mod};') 137 f.write(f'pub use regs::{mod}_{version} as {mod};')
diff --git a/embassy-stm32/src/pac/regs.rs b/embassy-stm32/src/pac/regs.rs
index d34c8a69a..370d0c512 100644
--- a/embassy-stm32/src/pac/regs.rs
+++ b/embassy-stm32/src/pac/regs.rs
@@ -1,436 +1,299 @@
1#![no_std] 1#![no_std]
2#![doc = "Peripheral access API (generated using svd2rust v0.17.0 (507115a 2021-04-19))"] 2#![doc = "Peripheral access API (generated using svd2rust v0.17.0 (507115a 2021-04-19))"]
3pub mod dma_v2 { 3pub mod rng_v1 {
4 use crate::generic::*; 4 use crate::generic::*;
5 #[doc = "Stream cluster: S?CR, S?NDTR, S?M0AR, S?M1AR and S?FCR registers"] 5 #[doc = "Random number generator"]
6 #[derive(Copy, Clone)] 6 #[derive(Copy, Clone)]
7 pub struct St(pub *mut u8); 7 pub struct Rng(pub *mut u8);
8 unsafe impl Send for St {} 8 unsafe impl Send for Rng {}
9 unsafe impl Sync for St {} 9 unsafe impl Sync for Rng {}
10 impl St { 10 impl Rng {
11 #[doc = "stream x configuration register"] 11 #[doc = "control register"]
12 pub fn cr(self) -> Reg<regs::Cr, RW> { 12 pub fn cr(self) -> Reg<regs::Cr, RW> {
13 unsafe { Reg::from_ptr(self.0.add(0usize)) } 13 unsafe { Reg::from_ptr(self.0.add(0usize)) }
14 } 14 }
15 #[doc = "stream x number of data register"] 15 #[doc = "status register"]
16 pub fn ndtr(self) -> Reg<regs::Ndtr, RW> { 16 pub fn sr(self) -> Reg<regs::Sr, RW> {
17 unsafe { Reg::from_ptr(self.0.add(4usize)) } 17 unsafe { Reg::from_ptr(self.0.add(4usize)) }
18 } 18 }
19 #[doc = "stream x peripheral address register"] 19 #[doc = "data register"]
20 pub fn par(self) -> Reg<u32, RW> { 20 pub fn dr(self) -> Reg<u32, R> {
21 unsafe { Reg::from_ptr(self.0.add(8usize)) } 21 unsafe { Reg::from_ptr(self.0.add(8usize)) }
22 } 22 }
23 #[doc = "stream x memory 0 address register"]
24 pub fn m0ar(self) -> Reg<u32, RW> {
25 unsafe { Reg::from_ptr(self.0.add(12usize)) }
26 }
27 #[doc = "stream x memory 1 address register"]
28 pub fn m1ar(self) -> Reg<u32, RW> {
29 unsafe { Reg::from_ptr(self.0.add(16usize)) }
30 }
31 #[doc = "stream x FIFO control register"]
32 pub fn fcr(self) -> Reg<regs::Fcr, RW> {
33 unsafe { Reg::from_ptr(self.0.add(20usize)) }
34 }
35 }
36 #[doc = "DMA controller"]
37 #[derive(Copy, Clone)]
38 pub struct Dma(pub *mut u8);
39 unsafe impl Send for Dma {}
40 unsafe impl Sync for Dma {}
41 impl Dma {
42 #[doc = "low interrupt status register"]
43 pub fn isr(self, n: usize) -> Reg<regs::Isr, R> {
44 assert!(n < 2usize);
45 unsafe { Reg::from_ptr(self.0.add(0usize + n * 4usize)) }
46 }
47 #[doc = "low interrupt flag clear register"]
48 pub fn ifcr(self, n: usize) -> Reg<regs::Ifcr, W> {
49 assert!(n < 2usize);
50 unsafe { Reg::from_ptr(self.0.add(8usize + n * 4usize)) }
51 }
52 #[doc = "Stream cluster: S?CR, S?NDTR, S?M0AR, S?M1AR and S?FCR registers"]
53 pub fn st(self, n: usize) -> St {
54 assert!(n < 8usize);
55 unsafe { St(self.0.add(16usize + n * 24usize)) }
56 }
57 } 23 }
58 pub mod regs { 24 pub mod regs {
59 use crate::generic::*; 25 use crate::generic::*;
60 #[doc = "stream x FIFO control register"] 26 #[doc = "control register"]
61 #[repr(transparent)] 27 #[repr(transparent)]
62 #[derive(Copy, Clone, Eq, PartialEq)] 28 #[derive(Copy, Clone, Eq, PartialEq)]
63 pub struct Fcr(pub u32); 29 pub struct Cr(pub u32);
64 impl Fcr { 30 impl Cr {
65 #[doc = "FIFO threshold selection"] 31 #[doc = "Random number generator enable"]
66 pub const fn fth(&self) -> super::vals::Fth { 32 pub const fn rngen(&self) -> bool {
67 let val = (self.0 >> 0usize) & 0x03;
68 super::vals::Fth(val as u8)
69 }
70 #[doc = "FIFO threshold selection"]
71 pub fn set_fth(&mut self, val: super::vals::Fth) {
72 self.0 = (self.0 & !(0x03 << 0usize)) | (((val.0 as u32) & 0x03) << 0usize);
73 }
74 #[doc = "Direct mode disable"]
75 pub const fn dmdis(&self) -> super::vals::Dmdis {
76 let val = (self.0 >> 2usize) & 0x01; 33 let val = (self.0 >> 2usize) & 0x01;
77 super::vals::Dmdis(val as u8) 34 val != 0
78 }
79 #[doc = "Direct mode disable"]
80 pub fn set_dmdis(&mut self, val: super::vals::Dmdis) {
81 self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize);
82 }
83 #[doc = "FIFO status"]
84 pub const fn fs(&self) -> super::vals::Fs {
85 let val = (self.0 >> 3usize) & 0x07;
86 super::vals::Fs(val as u8)
87 } 35 }
88 #[doc = "FIFO status"] 36 #[doc = "Random number generator enable"]
89 pub fn set_fs(&mut self, val: super::vals::Fs) { 37 pub fn set_rngen(&mut self, val: bool) {
90 self.0 = (self.0 & !(0x07 << 3usize)) | (((val.0 as u32) & 0x07) << 3usize); 38 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
91 } 39 }
92 #[doc = "FIFO error interrupt enable"] 40 #[doc = "Interrupt enable"]
93 pub const fn feie(&self) -> bool { 41 pub const fn ie(&self) -> bool {
94 let val = (self.0 >> 7usize) & 0x01; 42 let val = (self.0 >> 3usize) & 0x01;
95 val != 0 43 val != 0
96 } 44 }
97 #[doc = "FIFO error interrupt enable"] 45 #[doc = "Interrupt enable"]
98 pub fn set_feie(&mut self, val: bool) { 46 pub fn set_ie(&mut self, val: bool) {
99 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); 47 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
100 } 48 }
101 } 49 }
102 impl Default for Fcr { 50 impl Default for Cr {
103 fn default() -> Fcr { 51 fn default() -> Cr {
104 Fcr(0) 52 Cr(0)
105 } 53 }
106 } 54 }
107 #[doc = "low interrupt status register"] 55 #[doc = "status register"]
108 #[repr(transparent)] 56 #[repr(transparent)]
109 #[derive(Copy, Clone, Eq, PartialEq)] 57 #[derive(Copy, Clone, Eq, PartialEq)]
110 pub struct Isr(pub u32); 58 pub struct Sr(pub u32);
111 impl Isr { 59 impl Sr {
112 #[doc = "Stream x FIFO error interrupt flag (x=3..0)"] 60 #[doc = "Data ready"]
113 pub fn feif(&self, n: usize) -> bool { 61 pub const fn drdy(&self) -> bool {
114 assert!(n < 4usize); 62 let val = (self.0 >> 0usize) & 0x01;
115 let offs = 0usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
116 let val = (self.0 >> offs) & 0x01;
117 val != 0 63 val != 0
118 } 64 }
119 #[doc = "Stream x FIFO error interrupt flag (x=3..0)"] 65 #[doc = "Data ready"]
120 pub fn set_feif(&mut self, n: usize, val: bool) { 66 pub fn set_drdy(&mut self, val: bool) {
121 assert!(n < 4usize); 67 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
122 let offs = 0usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
123 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
124 } 68 }
125 #[doc = "Stream x direct mode error interrupt flag (x=3..0)"] 69 #[doc = "Clock error current status"]
126 pub fn dmeif(&self, n: usize) -> bool { 70 pub const fn cecs(&self) -> bool {
127 assert!(n < 4usize); 71 let val = (self.0 >> 1usize) & 0x01;
128 let offs = 2usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
129 let val = (self.0 >> offs) & 0x01;
130 val != 0 72 val != 0
131 } 73 }
132 #[doc = "Stream x direct mode error interrupt flag (x=3..0)"] 74 #[doc = "Clock error current status"]
133 pub fn set_dmeif(&mut self, n: usize, val: bool) { 75 pub fn set_cecs(&mut self, val: bool) {
134 assert!(n < 4usize); 76 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
135 let offs = 2usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
136 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
137 } 77 }
138 #[doc = "Stream x transfer error interrupt flag (x=3..0)"] 78 #[doc = "Seed error current status"]
139 pub fn teif(&self, n: usize) -> bool { 79 pub const fn secs(&self) -> bool {
140 assert!(n < 4usize); 80 let val = (self.0 >> 2usize) & 0x01;
141 let offs = 3usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
142 let val = (self.0 >> offs) & 0x01;
143 val != 0 81 val != 0
144 } 82 }
145 #[doc = "Stream x transfer error interrupt flag (x=3..0)"] 83 #[doc = "Seed error current status"]
146 pub fn set_teif(&mut self, n: usize, val: bool) { 84 pub fn set_secs(&mut self, val: bool) {
147 assert!(n < 4usize); 85 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
148 let offs = 3usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
149 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
150 } 86 }
151 #[doc = "Stream x half transfer interrupt flag (x=3..0)"] 87 #[doc = "Clock error interrupt status"]
152 pub fn htif(&self, n: usize) -> bool { 88 pub const fn ceis(&self) -> bool {
153 assert!(n < 4usize); 89 let val = (self.0 >> 5usize) & 0x01;
154 let offs = 4usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
155 let val = (self.0 >> offs) & 0x01;
156 val != 0 90 val != 0
157 } 91 }
158 #[doc = "Stream x half transfer interrupt flag (x=3..0)"] 92 #[doc = "Clock error interrupt status"]
159 pub fn set_htif(&mut self, n: usize, val: bool) { 93 pub fn set_ceis(&mut self, val: bool) {
160 assert!(n < 4usize); 94 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
161 let offs = 4usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
162 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
163 } 95 }
164 #[doc = "Stream x transfer complete interrupt flag (x = 3..0)"] 96 #[doc = "Seed error interrupt status"]
165 pub fn tcif(&self, n: usize) -> bool { 97 pub const fn seis(&self) -> bool {
166 assert!(n < 4usize); 98 let val = (self.0 >> 6usize) & 0x01;
167 let offs = 5usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
168 let val = (self.0 >> offs) & 0x01;
169 val != 0 99 val != 0
170 } 100 }
171 #[doc = "Stream x transfer complete interrupt flag (x = 3..0)"] 101 #[doc = "Seed error interrupt status"]
172 pub fn set_tcif(&mut self, n: usize, val: bool) { 102 pub fn set_seis(&mut self, val: bool) {
173 assert!(n < 4usize); 103 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
174 let offs = 5usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
175 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
176 } 104 }
177 } 105 }
178 impl Default for Isr { 106 impl Default for Sr {
179 fn default() -> Isr { 107 fn default() -> Sr {
180 Isr(0) 108 Sr(0)
181 } 109 }
182 } 110 }
183 #[doc = "low interrupt flag clear register"] 111 }
112}
113pub mod gpio_v1 {
114 use crate::generic::*;
115 #[doc = "General purpose I/O"]
116 #[derive(Copy, Clone)]
117 pub struct Gpio(pub *mut u8);
118 unsafe impl Send for Gpio {}
119 unsafe impl Sync for Gpio {}
120 impl Gpio {
121 #[doc = "Port configuration register low (GPIOn_CRL)"]
122 pub fn cr(self, n: usize) -> Reg<regs::Cr, RW> {
123 assert!(n < 2usize);
124 unsafe { Reg::from_ptr(self.0.add(0usize + n * 4usize)) }
125 }
126 #[doc = "Port input data register (GPIOn_IDR)"]
127 pub fn idr(self) -> Reg<regs::Idr, R> {
128 unsafe { Reg::from_ptr(self.0.add(8usize)) }
129 }
130 #[doc = "Port output data register (GPIOn_ODR)"]
131 pub fn odr(self) -> Reg<regs::Odr, RW> {
132 unsafe { Reg::from_ptr(self.0.add(12usize)) }
133 }
134 #[doc = "Port bit set/reset register (GPIOn_BSRR)"]
135 pub fn bsrr(self) -> Reg<regs::Bsrr, W> {
136 unsafe { Reg::from_ptr(self.0.add(16usize)) }
137 }
138 #[doc = "Port bit reset register (GPIOn_BRR)"]
139 pub fn brr(self) -> Reg<regs::Brr, W> {
140 unsafe { Reg::from_ptr(self.0.add(20usize)) }
141 }
142 #[doc = "Port configuration lock register"]
143 pub fn lckr(self) -> Reg<regs::Lckr, RW> {
144 unsafe { Reg::from_ptr(self.0.add(24usize)) }
145 }
146 }
147 pub mod regs {
148 use crate::generic::*;
149 #[doc = "Port output data register (GPIOn_ODR)"]
184 #[repr(transparent)] 150 #[repr(transparent)]
185 #[derive(Copy, Clone, Eq, PartialEq)] 151 #[derive(Copy, Clone, Eq, PartialEq)]
186 pub struct Ifcr(pub u32); 152 pub struct Odr(pub u32);
187 impl Ifcr { 153 impl Odr {
188 #[doc = "Stream x clear FIFO error interrupt flag (x = 3..0)"] 154 #[doc = "Port output data"]
189 pub fn cfeif(&self, n: usize) -> bool { 155 pub fn odr(&self, n: usize) -> super::vals::Odr {
190 assert!(n < 4usize); 156 assert!(n < 16usize);
191 let offs = 0usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); 157 let offs = 0usize + n * 1usize;
192 let val = (self.0 >> offs) & 0x01; 158 let val = (self.0 >> offs) & 0x01;
193 val != 0 159 super::vals::Odr(val as u8)
194 } 160 }
195 #[doc = "Stream x clear FIFO error interrupt flag (x = 3..0)"] 161 #[doc = "Port output data"]
196 pub fn set_cfeif(&mut self, n: usize, val: bool) { 162 pub fn set_odr(&mut self, n: usize, val: super::vals::Odr) {
197 assert!(n < 4usize); 163 assert!(n < 16usize);
198 let offs = 0usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); 164 let offs = 0usize + n * 1usize;
199 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); 165 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs);
200 } 166 }
201 #[doc = "Stream x clear direct mode error interrupt flag (x = 3..0)"] 167 }
202 pub fn cdmeif(&self, n: usize) -> bool { 168 impl Default for Odr {
203 assert!(n < 4usize); 169 fn default() -> Odr {
204 let offs = 2usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); 170 Odr(0)
171 }
172 }
173 #[doc = "Port configuration lock register"]
174 #[repr(transparent)]
175 #[derive(Copy, Clone, Eq, PartialEq)]
176 pub struct Lckr(pub u32);
177 impl Lckr {
178 #[doc = "Port A Lock bit"]
179 pub fn lck(&self, n: usize) -> super::vals::Lck {
180 assert!(n < 16usize);
181 let offs = 0usize + n * 1usize;
205 let val = (self.0 >> offs) & 0x01; 182 let val = (self.0 >> offs) & 0x01;
206 val != 0 183 super::vals::Lck(val as u8)
207 } 184 }
208 #[doc = "Stream x clear direct mode error interrupt flag (x = 3..0)"] 185 #[doc = "Port A Lock bit"]
209 pub fn set_cdmeif(&mut self, n: usize, val: bool) { 186 pub fn set_lck(&mut self, n: usize, val: super::vals::Lck) {
210 assert!(n < 4usize); 187 assert!(n < 16usize);
211 let offs = 2usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); 188 let offs = 0usize + n * 1usize;
212 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); 189 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs);
213 } 190 }
214 #[doc = "Stream x clear transfer error interrupt flag (x = 3..0)"] 191 #[doc = "Lock key"]
215 pub fn cteif(&self, n: usize) -> bool { 192 pub const fn lckk(&self) -> super::vals::Lckk {
216 assert!(n < 4usize); 193 let val = (self.0 >> 16usize) & 0x01;
217 let offs = 3usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); 194 super::vals::Lckk(val as u8)
195 }
196 #[doc = "Lock key"]
197 pub fn set_lckk(&mut self, val: super::vals::Lckk) {
198 self.0 = (self.0 & !(0x01 << 16usize)) | (((val.0 as u32) & 0x01) << 16usize);
199 }
200 }
201 impl Default for Lckr {
202 fn default() -> Lckr {
203 Lckr(0)
204 }
205 }
206 #[doc = "Port bit set/reset register (GPIOn_BSRR)"]
207 #[repr(transparent)]
208 #[derive(Copy, Clone, Eq, PartialEq)]
209 pub struct Bsrr(pub u32);
210 impl Bsrr {
211 #[doc = "Set bit"]
212 pub fn bs(&self, n: usize) -> bool {
213 assert!(n < 16usize);
214 let offs = 0usize + n * 1usize;
218 let val = (self.0 >> offs) & 0x01; 215 let val = (self.0 >> offs) & 0x01;
219 val != 0 216 val != 0
220 } 217 }
221 #[doc = "Stream x clear transfer error interrupt flag (x = 3..0)"] 218 #[doc = "Set bit"]
222 pub fn set_cteif(&mut self, n: usize, val: bool) { 219 pub fn set_bs(&mut self, n: usize, val: bool) {
223 assert!(n < 4usize); 220 assert!(n < 16usize);
224 let offs = 3usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); 221 let offs = 0usize + n * 1usize;
225 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); 222 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
226 } 223 }
227 #[doc = "Stream x clear half transfer interrupt flag (x = 3..0)"] 224 #[doc = "Reset bit"]
228 pub fn chtif(&self, n: usize) -> bool { 225 pub fn br(&self, n: usize) -> bool {
229 assert!(n < 4usize); 226 assert!(n < 16usize);
230 let offs = 4usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); 227 let offs = 16usize + n * 1usize;
231 let val = (self.0 >> offs) & 0x01; 228 let val = (self.0 >> offs) & 0x01;
232 val != 0 229 val != 0
233 } 230 }
234 #[doc = "Stream x clear half transfer interrupt flag (x = 3..0)"] 231 #[doc = "Reset bit"]
235 pub fn set_chtif(&mut self, n: usize, val: bool) { 232 pub fn set_br(&mut self, n: usize, val: bool) {
236 assert!(n < 4usize); 233 assert!(n < 16usize);
237 let offs = 4usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); 234 let offs = 16usize + n * 1usize;
238 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); 235 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
239 } 236 }
240 #[doc = "Stream x clear transfer complete interrupt flag (x = 3..0)"] 237 }
241 pub fn ctcif(&self, n: usize) -> bool { 238 impl Default for Bsrr {
242 assert!(n < 4usize); 239 fn default() -> Bsrr {
243 let offs = 5usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); 240 Bsrr(0)
241 }
242 }
243 #[doc = "Port bit reset register (GPIOn_BRR)"]
244 #[repr(transparent)]
245 #[derive(Copy, Clone, Eq, PartialEq)]
246 pub struct Brr(pub u32);
247 impl Brr {
248 #[doc = "Reset bit"]
249 pub fn br(&self, n: usize) -> bool {
250 assert!(n < 16usize);
251 let offs = 0usize + n * 1usize;
244 let val = (self.0 >> offs) & 0x01; 252 let val = (self.0 >> offs) & 0x01;
245 val != 0 253 val != 0
246 } 254 }
247 #[doc = "Stream x clear transfer complete interrupt flag (x = 3..0)"] 255 #[doc = "Reset bit"]
248 pub fn set_ctcif(&mut self, n: usize, val: bool) { 256 pub fn set_br(&mut self, n: usize, val: bool) {
249 assert!(n < 4usize); 257 assert!(n < 16usize);
250 let offs = 5usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); 258 let offs = 0usize + n * 1usize;
251 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); 259 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
252 } 260 }
253 } 261 }
254 impl Default for Ifcr { 262 impl Default for Brr {
255 fn default() -> Ifcr { 263 fn default() -> Brr {
256 Ifcr(0) 264 Brr(0)
257 } 265 }
258 } 266 }
259 #[doc = "stream x configuration register"] 267 #[doc = "Port configuration register (GPIOn_CRx)"]
260 #[repr(transparent)] 268 #[repr(transparent)]
261 #[derive(Copy, Clone, Eq, PartialEq)] 269 #[derive(Copy, Clone, Eq, PartialEq)]
262 pub struct Cr(pub u32); 270 pub struct Cr(pub u32);
263 impl Cr { 271 impl Cr {
264 #[doc = "Stream enable / flag stream ready when read low"] 272 #[doc = "Port n mode bits"]
265 pub const fn en(&self) -> bool { 273 pub fn mode(&self, n: usize) -> super::vals::Mode {
266 let val = (self.0 >> 0usize) & 0x01; 274 assert!(n < 8usize);
267 val != 0 275 let offs = 0usize + n * 4usize;
268 } 276 let val = (self.0 >> offs) & 0x03;
269 #[doc = "Stream enable / flag stream ready when read low"] 277 super::vals::Mode(val as u8)
270 pub fn set_en(&mut self, val: bool) {
271 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
272 }
273 #[doc = "Direct mode error interrupt enable"]
274 pub const fn dmeie(&self) -> bool {
275 let val = (self.0 >> 1usize) & 0x01;
276 val != 0
277 }
278 #[doc = "Direct mode error interrupt enable"]
279 pub fn set_dmeie(&mut self, val: bool) {
280 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
281 }
282 #[doc = "Transfer error interrupt enable"]
283 pub const fn teie(&self) -> bool {
284 let val = (self.0 >> 2usize) & 0x01;
285 val != 0
286 }
287 #[doc = "Transfer error interrupt enable"]
288 pub fn set_teie(&mut self, val: bool) {
289 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
290 }
291 #[doc = "Half transfer interrupt enable"]
292 pub const fn htie(&self) -> bool {
293 let val = (self.0 >> 3usize) & 0x01;
294 val != 0
295 }
296 #[doc = "Half transfer interrupt enable"]
297 pub fn set_htie(&mut self, val: bool) {
298 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
299 }
300 #[doc = "Transfer complete interrupt enable"]
301 pub const fn tcie(&self) -> bool {
302 let val = (self.0 >> 4usize) & 0x01;
303 val != 0
304 }
305 #[doc = "Transfer complete interrupt enable"]
306 pub fn set_tcie(&mut self, val: bool) {
307 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
308 }
309 #[doc = "Peripheral flow controller"]
310 pub const fn pfctrl(&self) -> super::vals::Pfctrl {
311 let val = (self.0 >> 5usize) & 0x01;
312 super::vals::Pfctrl(val as u8)
313 }
314 #[doc = "Peripheral flow controller"]
315 pub fn set_pfctrl(&mut self, val: super::vals::Pfctrl) {
316 self.0 = (self.0 & !(0x01 << 5usize)) | (((val.0 as u32) & 0x01) << 5usize);
317 }
318 #[doc = "Data transfer direction"]
319 pub const fn dir(&self) -> super::vals::Dir {
320 let val = (self.0 >> 6usize) & 0x03;
321 super::vals::Dir(val as u8)
322 }
323 #[doc = "Data transfer direction"]
324 pub fn set_dir(&mut self, val: super::vals::Dir) {
325 self.0 = (self.0 & !(0x03 << 6usize)) | (((val.0 as u32) & 0x03) << 6usize);
326 }
327 #[doc = "Circular mode"]
328 pub const fn circ(&self) -> super::vals::Circ {
329 let val = (self.0 >> 8usize) & 0x01;
330 super::vals::Circ(val as u8)
331 }
332 #[doc = "Circular mode"]
333 pub fn set_circ(&mut self, val: super::vals::Circ) {
334 self.0 = (self.0 & !(0x01 << 8usize)) | (((val.0 as u32) & 0x01) << 8usize);
335 }
336 #[doc = "Peripheral increment mode"]
337 pub const fn pinc(&self) -> super::vals::Inc {
338 let val = (self.0 >> 9usize) & 0x01;
339 super::vals::Inc(val as u8)
340 }
341 #[doc = "Peripheral increment mode"]
342 pub fn set_pinc(&mut self, val: super::vals::Inc) {
343 self.0 = (self.0 & !(0x01 << 9usize)) | (((val.0 as u32) & 0x01) << 9usize);
344 }
345 #[doc = "Memory increment mode"]
346 pub const fn minc(&self) -> super::vals::Inc {
347 let val = (self.0 >> 10usize) & 0x01;
348 super::vals::Inc(val as u8)
349 }
350 #[doc = "Memory increment mode"]
351 pub fn set_minc(&mut self, val: super::vals::Inc) {
352 self.0 = (self.0 & !(0x01 << 10usize)) | (((val.0 as u32) & 0x01) << 10usize);
353 }
354 #[doc = "Peripheral data size"]
355 pub const fn psize(&self) -> super::vals::Size {
356 let val = (self.0 >> 11usize) & 0x03;
357 super::vals::Size(val as u8)
358 }
359 #[doc = "Peripheral data size"]
360 pub fn set_psize(&mut self, val: super::vals::Size) {
361 self.0 = (self.0 & !(0x03 << 11usize)) | (((val.0 as u32) & 0x03) << 11usize);
362 }
363 #[doc = "Memory data size"]
364 pub const fn msize(&self) -> super::vals::Size {
365 let val = (self.0 >> 13usize) & 0x03;
366 super::vals::Size(val as u8)
367 }
368 #[doc = "Memory data size"]
369 pub fn set_msize(&mut self, val: super::vals::Size) {
370 self.0 = (self.0 & !(0x03 << 13usize)) | (((val.0 as u32) & 0x03) << 13usize);
371 }
372 #[doc = "Peripheral increment offset size"]
373 pub const fn pincos(&self) -> super::vals::Pincos {
374 let val = (self.0 >> 15usize) & 0x01;
375 super::vals::Pincos(val as u8)
376 }
377 #[doc = "Peripheral increment offset size"]
378 pub fn set_pincos(&mut self, val: super::vals::Pincos) {
379 self.0 = (self.0 & !(0x01 << 15usize)) | (((val.0 as u32) & 0x01) << 15usize);
380 }
381 #[doc = "Priority level"]
382 pub const fn pl(&self) -> super::vals::Pl {
383 let val = (self.0 >> 16usize) & 0x03;
384 super::vals::Pl(val as u8)
385 }
386 #[doc = "Priority level"]
387 pub fn set_pl(&mut self, val: super::vals::Pl) {
388 self.0 = (self.0 & !(0x03 << 16usize)) | (((val.0 as u32) & 0x03) << 16usize);
389 }
390 #[doc = "Double buffer mode"]
391 pub const fn dbm(&self) -> super::vals::Dbm {
392 let val = (self.0 >> 18usize) & 0x01;
393 super::vals::Dbm(val as u8)
394 }
395 #[doc = "Double buffer mode"]
396 pub fn set_dbm(&mut self, val: super::vals::Dbm) {
397 self.0 = (self.0 & !(0x01 << 18usize)) | (((val.0 as u32) & 0x01) << 18usize);
398 }
399 #[doc = "Current target (only in double buffer mode)"]
400 pub const fn ct(&self) -> super::vals::Ct {
401 let val = (self.0 >> 19usize) & 0x01;
402 super::vals::Ct(val as u8)
403 }
404 #[doc = "Current target (only in double buffer mode)"]
405 pub fn set_ct(&mut self, val: super::vals::Ct) {
406 self.0 = (self.0 & !(0x01 << 19usize)) | (((val.0 as u32) & 0x01) << 19usize);
407 }
408 #[doc = "Peripheral burst transfer configuration"]
409 pub const fn pburst(&self) -> super::vals::Burst {
410 let val = (self.0 >> 21usize) & 0x03;
411 super::vals::Burst(val as u8)
412 }
413 #[doc = "Peripheral burst transfer configuration"]
414 pub fn set_pburst(&mut self, val: super::vals::Burst) {
415 self.0 = (self.0 & !(0x03 << 21usize)) | (((val.0 as u32) & 0x03) << 21usize);
416 }
417 #[doc = "Memory burst transfer configuration"]
418 pub const fn mburst(&self) -> super::vals::Burst {
419 let val = (self.0 >> 23usize) & 0x03;
420 super::vals::Burst(val as u8)
421 } 278 }
422 #[doc = "Memory burst transfer configuration"] 279 #[doc = "Port n mode bits"]
423 pub fn set_mburst(&mut self, val: super::vals::Burst) { 280 pub fn set_mode(&mut self, n: usize, val: super::vals::Mode) {
424 self.0 = (self.0 & !(0x03 << 23usize)) | (((val.0 as u32) & 0x03) << 23usize); 281 assert!(n < 8usize);
282 let offs = 0usize + n * 4usize;
283 self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs);
425 } 284 }
426 #[doc = "Channel selection"] 285 #[doc = "Port n configuration bits"]
427 pub const fn chsel(&self) -> u8 { 286 pub fn cnf(&self, n: usize) -> super::vals::Cnf {
428 let val = (self.0 >> 25usize) & 0x0f; 287 assert!(n < 8usize);
429 val as u8 288 let offs = 2usize + n * 4usize;
289 let val = (self.0 >> offs) & 0x03;
290 super::vals::Cnf(val as u8)
430 } 291 }
431 #[doc = "Channel selection"] 292 #[doc = "Port n configuration bits"]
432 pub fn set_chsel(&mut self, val: u8) { 293 pub fn set_cnf(&mut self, n: usize, val: super::vals::Cnf) {
433 self.0 = (self.0 & !(0x0f << 25usize)) | (((val as u32) & 0x0f) << 25usize); 294 assert!(n < 8usize);
295 let offs = 2usize + n * 4usize;
296 self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs);
434 } 297 }
435 } 298 }
436 impl Default for Cr { 299 impl Default for Cr {
@@ -438,24 +301,28 @@ pub mod dma_v2 {
438 Cr(0) 301 Cr(0)
439 } 302 }
440 } 303 }
441 #[doc = "stream x number of data register"] 304 #[doc = "Port input data register (GPIOn_IDR)"]
442 #[repr(transparent)] 305 #[repr(transparent)]
443 #[derive(Copy, Clone, Eq, PartialEq)] 306 #[derive(Copy, Clone, Eq, PartialEq)]
444 pub struct Ndtr(pub u32); 307 pub struct Idr(pub u32);
445 impl Ndtr { 308 impl Idr {
446 #[doc = "Number of data items to transfer"] 309 #[doc = "Port input data"]
447 pub const fn ndt(&self) -> u16 { 310 pub fn idr(&self, n: usize) -> super::vals::Idr {
448 let val = (self.0 >> 0usize) & 0xffff; 311 assert!(n < 16usize);
449 val as u16 312 let offs = 0usize + n * 1usize;
313 let val = (self.0 >> offs) & 0x01;
314 super::vals::Idr(val as u8)
450 } 315 }
451 #[doc = "Number of data items to transfer"] 316 #[doc = "Port input data"]
452 pub fn set_ndt(&mut self, val: u16) { 317 pub fn set_idr(&mut self, n: usize, val: super::vals::Idr) {
453 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); 318 assert!(n < 16usize);
319 let offs = 0usize + n * 1usize;
320 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs);
454 } 321 }
455 } 322 }
456 impl Default for Ndtr { 323 impl Default for Idr {
457 fn default() -> Ndtr { 324 fn default() -> Idr {
458 Ndtr(0) 325 Idr(0)
459 } 326 }
460 } 327 }
461 } 328 }
@@ -463,144 +330,83 @@ pub mod dma_v2 {
463 use crate::generic::*; 330 use crate::generic::*;
464 #[repr(transparent)] 331 #[repr(transparent)]
465 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 332 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
466 pub struct Ct(pub u8); 333 pub struct Lckk(pub u8);
467 impl Ct { 334 impl Lckk {
468 #[doc = "The current target memory is Memory 0"] 335 #[doc = "Port configuration lock key not active"]
469 pub const MEMORY0: Self = Self(0); 336 pub const NOTACTIVE: Self = Self(0);
470 #[doc = "The current target memory is Memory 1"] 337 #[doc = "Port configuration lock key active"]
471 pub const MEMORY1: Self = Self(0x01); 338 pub const ACTIVE: Self = Self(0x01);
472 }
473 #[repr(transparent)]
474 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
475 pub struct Pl(pub u8);
476 impl Pl {
477 #[doc = "Low"]
478 pub const LOW: Self = Self(0);
479 #[doc = "Medium"]
480 pub const MEDIUM: Self = Self(0x01);
481 #[doc = "High"]
482 pub const HIGH: Self = Self(0x02);
483 #[doc = "Very high"]
484 pub const VERYHIGH: Self = Self(0x03);
485 }
486 #[repr(transparent)]
487 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
488 pub struct Circ(pub u8);
489 impl Circ {
490 #[doc = "Circular mode disabled"]
491 pub const DISABLED: Self = Self(0);
492 #[doc = "Circular mode enabled"]
493 pub const ENABLED: Self = Self(0x01);
494 }
495 #[repr(transparent)]
496 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
497 pub struct Fs(pub u8);
498 impl Fs {
499 #[doc = "0 < fifo_level < 1/4"]
500 pub const QUARTER1: Self = Self(0);
501 #[doc = "1/4 <= fifo_level < 1/2"]
502 pub const QUARTER2: Self = Self(0x01);
503 #[doc = "1/2 <= fifo_level < 3/4"]
504 pub const QUARTER3: Self = Self(0x02);
505 #[doc = "3/4 <= fifo_level < full"]
506 pub const QUARTER4: Self = Self(0x03);
507 #[doc = "FIFO is empty"]
508 pub const EMPTY: Self = Self(0x04);
509 #[doc = "FIFO is full"]
510 pub const FULL: Self = Self(0x05);
511 }
512 #[repr(transparent)]
513 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
514 pub struct Size(pub u8);
515 impl Size {
516 #[doc = "Byte (8-bit)"]
517 pub const BITS8: Self = Self(0);
518 #[doc = "Half-word (16-bit)"]
519 pub const BITS16: Self = Self(0x01);
520 #[doc = "Word (32-bit)"]
521 pub const BITS32: Self = Self(0x02);
522 }
523 #[repr(transparent)]
524 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
525 pub struct Dmdis(pub u8);
526 impl Dmdis {
527 #[doc = "Direct mode is enabled"]
528 pub const ENABLED: Self = Self(0);
529 #[doc = "Direct mode is disabled"]
530 pub const DISABLED: Self = Self(0x01);
531 } 339 }
532 #[repr(transparent)] 340 #[repr(transparent)]
533 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 341 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
534 pub struct Burst(pub u8); 342 pub struct Mode(pub u8);
535 impl Burst { 343 impl Mode {
536 #[doc = "Single transfer"] 344 #[doc = "Input mode (reset state)"]
537 pub const SINGLE: Self = Self(0); 345 pub const INPUT: Self = Self(0);
538 #[doc = "Incremental burst of 4 beats"] 346 #[doc = "Output mode 10 MHz"]
539 pub const INCR4: Self = Self(0x01); 347 pub const OUTPUT: Self = Self(0x01);
540 #[doc = "Incremental burst of 8 beats"] 348 #[doc = "Output mode 2 MHz"]
541 pub const INCR8: Self = Self(0x02); 349 pub const OUTPUT2: Self = Self(0x02);
542 #[doc = "Incremental burst of 16 beats"] 350 #[doc = "Output mode 50 MHz"]
543 pub const INCR16: Self = Self(0x03); 351 pub const OUTPUT50: Self = Self(0x03);
544 } 352 }
545 #[repr(transparent)] 353 #[repr(transparent)]
546 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 354 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
547 pub struct Inc(pub u8); 355 pub struct Cnf(pub u8);
548 impl Inc { 356 impl Cnf {
549 #[doc = "Address pointer is fixed"] 357 #[doc = "Analog mode / Push-Pull mode"]
550 pub const FIXED: Self = Self(0); 358 pub const PUSHPULL: Self = Self(0);
551 #[doc = "Address pointer is incremented after each data transfer"] 359 #[doc = "Floating input (reset state) / Open Drain-Mode"]
552 pub const INCREMENTED: Self = Self(0x01); 360 pub const OPENDRAIN: Self = Self(0x01);
361 #[doc = "Input with pull-up/pull-down / Alternate Function Push-Pull Mode"]
362 pub const ALTPUSHPULL: Self = Self(0x02);
363 #[doc = "Alternate Function Open-Drain Mode"]
364 pub const ALTOPENDRAIN: Self = Self(0x03);
553 } 365 }
554 #[repr(transparent)] 366 #[repr(transparent)]
555 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 367 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
556 pub struct Dir(pub u8); 368 pub struct Brw(pub u8);
557 impl Dir { 369 impl Brw {
558 #[doc = "Peripheral-to-memory"] 370 #[doc = "No action on the corresponding ODx bit"]
559 pub const PERIPHERALTOMEMORY: Self = Self(0); 371 pub const NOACTION: Self = Self(0);
560 #[doc = "Memory-to-peripheral"] 372 #[doc = "Reset the ODx bit"]
561 pub const MEMORYTOPERIPHERAL: Self = Self(0x01); 373 pub const RESET: Self = Self(0x01);
562 #[doc = "Memory-to-memory"]
563 pub const MEMORYTOMEMORY: Self = Self(0x02);
564 } 374 }
565 #[repr(transparent)] 375 #[repr(transparent)]
566 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 376 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
567 pub struct Pfctrl(pub u8); 377 pub struct Odr(pub u8);
568 impl Pfctrl { 378 impl Odr {
569 #[doc = "The DMA is the flow controller"] 379 #[doc = "Set output to logic low"]
570 pub const DMA: Self = Self(0); 380 pub const LOW: Self = Self(0);
571 #[doc = "The peripheral is the flow controller"] 381 #[doc = "Set output to logic high"]
572 pub const PERIPHERAL: Self = Self(0x01); 382 pub const HIGH: Self = Self(0x01);
573 } 383 }
574 #[repr(transparent)] 384 #[repr(transparent)]
575 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 385 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
576 pub struct Fth(pub u8); 386 pub struct Idr(pub u8);
577 impl Fth { 387 impl Idr {
578 #[doc = "1/4 full FIFO"] 388 #[doc = "Input is logic low"]
579 pub const QUARTER: Self = Self(0); 389 pub const LOW: Self = Self(0);
580 #[doc = "1/2 full FIFO"] 390 #[doc = "Input is logic high"]
581 pub const HALF: Self = Self(0x01); 391 pub const HIGH: Self = Self(0x01);
582 #[doc = "3/4 full FIFO"]
583 pub const THREEQUARTERS: Self = Self(0x02);
584 #[doc = "Full FIFO"]
585 pub const FULL: Self = Self(0x03);
586 } 392 }
587 #[repr(transparent)] 393 #[repr(transparent)]
588 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 394 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
589 pub struct Dbm(pub u8); 395 pub struct Lck(pub u8);
590 impl Dbm { 396 impl Lck {
591 #[doc = "No buffer switching at the end of transfer"] 397 #[doc = "Port configuration not locked"]
592 pub const DISABLED: Self = Self(0); 398 pub const UNLOCKED: Self = Self(0);
593 #[doc = "Memory target switched at the end of the DMA transfer"] 399 #[doc = "Port configuration locked"]
594 pub const ENABLED: Self = Self(0x01); 400 pub const LOCKED: Self = Self(0x01);
595 } 401 }
596 #[repr(transparent)] 402 #[repr(transparent)]
597 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 403 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
598 pub struct Pincos(pub u8); 404 pub struct Bsw(pub u8);
599 impl Pincos { 405 impl Bsw {
600 #[doc = "The offset size for the peripheral address calculation is linked to the PSIZE"] 406 #[doc = "No action on the corresponding ODx bit"]
601 pub const PSIZE: Self = Self(0); 407 pub const NOACTION: Self = Self(0);
602 #[doc = "The offset size for the peripheral address calculation is fixed to 4 (32-bit alignment)"] 408 #[doc = "Sets the corresponding ODRx bit"]
603 pub const FIXED4: Self = Self(0x01); 409 pub const SET: Self = Self(0x01);
604 } 410 }
605 } 411 }
606} 412}
@@ -652,30 +458,6 @@ pub mod gpio_v2 {
652 } 458 }
653 pub mod regs { 459 pub mod regs {
654 use crate::generic::*; 460 use crate::generic::*;
655 #[doc = "GPIO port mode register"]
656 #[repr(transparent)]
657 #[derive(Copy, Clone, Eq, PartialEq)]
658 pub struct Moder(pub u32);
659 impl Moder {
660 #[doc = "Port x configuration bits (y = 0..15)"]
661 pub fn moder(&self, n: usize) -> super::vals::Moder {
662 assert!(n < 16usize);
663 let offs = 0usize + n * 2usize;
664 let val = (self.0 >> offs) & 0x03;
665 super::vals::Moder(val as u8)
666 }
667 #[doc = "Port x configuration bits (y = 0..15)"]
668 pub fn set_moder(&mut self, n: usize, val: super::vals::Moder) {
669 assert!(n < 16usize);
670 let offs = 0usize + n * 2usize;
671 self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs);
672 }
673 }
674 impl Default for Moder {
675 fn default() -> Moder {
676 Moder(0)
677 }
678 }
679 #[doc = "GPIO alternate function register"] 461 #[doc = "GPIO alternate function register"]
680 #[repr(transparent)] 462 #[repr(transparent)]
681 #[derive(Copy, Clone, Eq, PartialEq)] 463 #[derive(Copy, Clone, Eq, PartialEq)]
@@ -700,54 +482,6 @@ pub mod gpio_v2 {
700 Afr(0) 482 Afr(0)
701 } 483 }
702 } 484 }
703 #[doc = "GPIO port input data register"]
704 #[repr(transparent)]
705 #[derive(Copy, Clone, Eq, PartialEq)]
706 pub struct Idr(pub u32);
707 impl Idr {
708 #[doc = "Port input data (y = 0..15)"]
709 pub fn idr(&self, n: usize) -> super::vals::Idr {
710 assert!(n < 16usize);
711 let offs = 0usize + n * 1usize;
712 let val = (self.0 >> offs) & 0x01;
713 super::vals::Idr(val as u8)
714 }
715 #[doc = "Port input data (y = 0..15)"]
716 pub fn set_idr(&mut self, n: usize, val: super::vals::Idr) {
717 assert!(n < 16usize);
718 let offs = 0usize + n * 1usize;
719 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs);
720 }
721 }
722 impl Default for Idr {
723 fn default() -> Idr {
724 Idr(0)
725 }
726 }
727 #[doc = "GPIO port pull-up/pull-down register"]
728 #[repr(transparent)]
729 #[derive(Copy, Clone, Eq, PartialEq)]
730 pub struct Pupdr(pub u32);
731 impl Pupdr {
732 #[doc = "Port x configuration bits (y = 0..15)"]
733 pub fn pupdr(&self, n: usize) -> super::vals::Pupdr {
734 assert!(n < 16usize);
735 let offs = 0usize + n * 2usize;
736 let val = (self.0 >> offs) & 0x03;
737 super::vals::Pupdr(val as u8)
738 }
739 #[doc = "Port x configuration bits (y = 0..15)"]
740 pub fn set_pupdr(&mut self, n: usize, val: super::vals::Pupdr) {
741 assert!(n < 16usize);
742 let offs = 0usize + n * 2usize;
743 self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs);
744 }
745 }
746 impl Default for Pupdr {
747 fn default() -> Pupdr {
748 Pupdr(0)
749 }
750 }
751 #[doc = "GPIO port output data register"] 485 #[doc = "GPIO port output data register"]
752 #[repr(transparent)] 486 #[repr(transparent)]
753 #[derive(Copy, Clone, Eq, PartialEq)] 487 #[derive(Copy, Clone, Eq, PartialEq)]
@@ -796,6 +530,54 @@ pub mod gpio_v2 {
796 Otyper(0) 530 Otyper(0)
797 } 531 }
798 } 532 }
533 #[doc = "GPIO port pull-up/pull-down register"]
534 #[repr(transparent)]
535 #[derive(Copy, Clone, Eq, PartialEq)]
536 pub struct Pupdr(pub u32);
537 impl Pupdr {
538 #[doc = "Port x configuration bits (y = 0..15)"]
539 pub fn pupdr(&self, n: usize) -> super::vals::Pupdr {
540 assert!(n < 16usize);
541 let offs = 0usize + n * 2usize;
542 let val = (self.0 >> offs) & 0x03;
543 super::vals::Pupdr(val as u8)
544 }
545 #[doc = "Port x configuration bits (y = 0..15)"]
546 pub fn set_pupdr(&mut self, n: usize, val: super::vals::Pupdr) {
547 assert!(n < 16usize);
548 let offs = 0usize + n * 2usize;
549 self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs);
550 }
551 }
552 impl Default for Pupdr {
553 fn default() -> Pupdr {
554 Pupdr(0)
555 }
556 }
557 #[doc = "GPIO port output speed register"]
558 #[repr(transparent)]
559 #[derive(Copy, Clone, Eq, PartialEq)]
560 pub struct Ospeedr(pub u32);
561 impl Ospeedr {
562 #[doc = "Port x configuration bits (y = 0..15)"]
563 pub fn ospeedr(&self, n: usize) -> super::vals::Ospeedr {
564 assert!(n < 16usize);
565 let offs = 0usize + n * 2usize;
566 let val = (self.0 >> offs) & 0x03;
567 super::vals::Ospeedr(val as u8)
568 }
569 #[doc = "Port x configuration bits (y = 0..15)"]
570 pub fn set_ospeedr(&mut self, n: usize, val: super::vals::Ospeedr) {
571 assert!(n < 16usize);
572 let offs = 0usize + n * 2usize;
573 self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs);
574 }
575 }
576 impl Default for Ospeedr {
577 fn default() -> Ospeedr {
578 Ospeedr(0)
579 }
580 }
799 #[doc = "GPIO port configuration lock register"] 581 #[doc = "GPIO port configuration lock register"]
800 #[repr(transparent)] 582 #[repr(transparent)]
801 #[derive(Copy, Clone, Eq, PartialEq)] 583 #[derive(Copy, Clone, Eq, PartialEq)]
@@ -829,28 +611,28 @@ pub mod gpio_v2 {
829 Lckr(0) 611 Lckr(0)
830 } 612 }
831 } 613 }
832 #[doc = "GPIO port output speed register"] 614 #[doc = "GPIO port mode register"]
833 #[repr(transparent)] 615 #[repr(transparent)]
834 #[derive(Copy, Clone, Eq, PartialEq)] 616 #[derive(Copy, Clone, Eq, PartialEq)]
835 pub struct Ospeedr(pub u32); 617 pub struct Moder(pub u32);
836 impl Ospeedr { 618 impl Moder {
837 #[doc = "Port x configuration bits (y = 0..15)"] 619 #[doc = "Port x configuration bits (y = 0..15)"]
838 pub fn ospeedr(&self, n: usize) -> super::vals::Ospeedr { 620 pub fn moder(&self, n: usize) -> super::vals::Moder {
839 assert!(n < 16usize); 621 assert!(n < 16usize);
840 let offs = 0usize + n * 2usize; 622 let offs = 0usize + n * 2usize;
841 let val = (self.0 >> offs) & 0x03; 623 let val = (self.0 >> offs) & 0x03;
842 super::vals::Ospeedr(val as u8) 624 super::vals::Moder(val as u8)
843 } 625 }
844 #[doc = "Port x configuration bits (y = 0..15)"] 626 #[doc = "Port x configuration bits (y = 0..15)"]
845 pub fn set_ospeedr(&mut self, n: usize, val: super::vals::Ospeedr) { 627 pub fn set_moder(&mut self, n: usize, val: super::vals::Moder) {
846 assert!(n < 16usize); 628 assert!(n < 16usize);
847 let offs = 0usize + n * 2usize; 629 let offs = 0usize + n * 2usize;
848 self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs); 630 self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs);
849 } 631 }
850 } 632 }
851 impl Default for Ospeedr { 633 impl Default for Moder {
852 fn default() -> Ospeedr { 634 fn default() -> Moder {
853 Ospeedr(0) 635 Moder(0)
854 } 636 }
855 } 637 }
856 #[doc = "GPIO port bit set/reset register"] 638 #[doc = "GPIO port bit set/reset register"]
@@ -890,11 +672,91 @@ pub mod gpio_v2 {
890 Bsrr(0) 672 Bsrr(0)
891 } 673 }
892 } 674 }
675 #[doc = "GPIO port input data register"]
676 #[repr(transparent)]
677 #[derive(Copy, Clone, Eq, PartialEq)]
678 pub struct Idr(pub u32);
679 impl Idr {
680 #[doc = "Port input data (y = 0..15)"]
681 pub fn idr(&self, n: usize) -> super::vals::Idr {
682 assert!(n < 16usize);
683 let offs = 0usize + n * 1usize;
684 let val = (self.0 >> offs) & 0x01;
685 super::vals::Idr(val as u8)
686 }
687 #[doc = "Port input data (y = 0..15)"]
688 pub fn set_idr(&mut self, n: usize, val: super::vals::Idr) {
689 assert!(n < 16usize);
690 let offs = 0usize + n * 1usize;
691 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs);
692 }
693 }
694 impl Default for Idr {
695 fn default() -> Idr {
696 Idr(0)
697 }
698 }
893 } 699 }
894 pub mod vals { 700 pub mod vals {
895 use crate::generic::*; 701 use crate::generic::*;
896 #[repr(transparent)] 702 #[repr(transparent)]
897 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 703 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
704 pub struct Ot(pub u8);
705 impl Ot {
706 #[doc = "Output push-pull (reset state)"]
707 pub const PUSHPULL: Self = Self(0);
708 #[doc = "Output open-drain"]
709 pub const OPENDRAIN: Self = Self(0x01);
710 }
711 #[repr(transparent)]
712 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
713 pub struct Pupdr(pub u8);
714 impl Pupdr {
715 #[doc = "No pull-up, pull-down"]
716 pub const FLOATING: Self = Self(0);
717 #[doc = "Pull-up"]
718 pub const PULLUP: Self = Self(0x01);
719 #[doc = "Pull-down"]
720 pub const PULLDOWN: Self = Self(0x02);
721 }
722 #[repr(transparent)]
723 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
724 pub struct Bsw(pub u8);
725 impl Bsw {
726 #[doc = "Sets the corresponding ODRx bit"]
727 pub const SET: Self = Self(0x01);
728 }
729 #[repr(transparent)]
730 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
731 pub struct Moder(pub u8);
732 impl Moder {
733 #[doc = "Input mode (reset state)"]
734 pub const INPUT: Self = Self(0);
735 #[doc = "General purpose output mode"]
736 pub const OUTPUT: Self = Self(0x01);
737 #[doc = "Alternate function mode"]
738 pub const ALTERNATE: Self = Self(0x02);
739 #[doc = "Analog mode"]
740 pub const ANALOG: Self = Self(0x03);
741 }
742 #[repr(transparent)]
743 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
744 pub struct Idr(pub u8);
745 impl Idr {
746 #[doc = "Input is logic low"]
747 pub const LOW: Self = Self(0);
748 #[doc = "Input is logic high"]
749 pub const HIGH: Self = Self(0x01);
750 }
751 #[repr(transparent)]
752 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
753 pub struct Brw(pub u8);
754 impl Brw {
755 #[doc = "Resets the corresponding ODRx bit"]
756 pub const RESET: Self = Self(0x01);
757 }
758 #[repr(transparent)]
759 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
898 pub struct Lck(pub u8); 760 pub struct Lck(pub u8);
899 impl Lck { 761 impl Lck {
900 #[doc = "Port configuration not locked"] 762 #[doc = "Port configuration not locked"]
@@ -904,12 +766,12 @@ pub mod gpio_v2 {
904 } 766 }
905 #[repr(transparent)] 767 #[repr(transparent)]
906 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 768 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
907 pub struct Ot(pub u8); 769 pub struct Lckk(pub u8);
908 impl Ot { 770 impl Lckk {
909 #[doc = "Output push-pull (reset state)"] 771 #[doc = "Port configuration lock key not active"]
910 pub const PUSHPULL: Self = Self(0); 772 pub const NOTACTIVE: Self = Self(0);
911 #[doc = "Output open-drain"] 773 #[doc = "Port configuration lock key active"]
912 pub const OPENDRAIN: Self = Self(0x01); 774 pub const ACTIVE: Self = Self(0x01);
913 } 775 }
914 #[repr(transparent)] 776 #[repr(transparent)]
915 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 777 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
@@ -963,44 +825,6 @@ pub mod gpio_v2 {
963 } 825 }
964 #[repr(transparent)] 826 #[repr(transparent)]
965 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 827 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
966 pub struct Pupdr(pub u8);
967 impl Pupdr {
968 #[doc = "No pull-up, pull-down"]
969 pub const FLOATING: Self = Self(0);
970 #[doc = "Pull-up"]
971 pub const PULLUP: Self = Self(0x01);
972 #[doc = "Pull-down"]
973 pub const PULLDOWN: Self = Self(0x02);
974 }
975 #[repr(transparent)]
976 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
977 pub struct Bsw(pub u8);
978 impl Bsw {
979 #[doc = "Sets the corresponding ODRx bit"]
980 pub const SET: Self = Self(0x01);
981 }
982 #[repr(transparent)]
983 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
984 pub struct Brw(pub u8);
985 impl Brw {
986 #[doc = "Resets the corresponding ODRx bit"]
987 pub const RESET: Self = Self(0x01);
988 }
989 #[repr(transparent)]
990 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
991 pub struct Moder(pub u8);
992 impl Moder {
993 #[doc = "Input mode (reset state)"]
994 pub const INPUT: Self = Self(0);
995 #[doc = "General purpose output mode"]
996 pub const OUTPUT: Self = Self(0x01);
997 #[doc = "Alternate function mode"]
998 pub const ALTERNATE: Self = Self(0x02);
999 #[doc = "Analog mode"]
1000 pub const ANALOG: Self = Self(0x03);
1001 }
1002 #[repr(transparent)]
1003 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1004 pub struct Odr(pub u8); 828 pub struct Odr(pub u8);
1005 impl Odr { 829 impl Odr {
1006 #[doc = "Set output to logic low"] 830 #[doc = "Set output to logic low"]
@@ -1008,104 +832,350 @@ pub mod gpio_v2 {
1008 #[doc = "Set output to logic high"] 832 #[doc = "Set output to logic high"]
1009 pub const HIGH: Self = Self(0x01); 833 pub const HIGH: Self = Self(0x01);
1010 } 834 }
1011 #[repr(transparent)]
1012 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1013 pub struct Lckk(pub u8);
1014 impl Lckk {
1015 #[doc = "Port configuration lock key not active"]
1016 pub const NOTACTIVE: Self = Self(0);
1017 #[doc = "Port configuration lock key active"]
1018 pub const ACTIVE: Self = Self(0x01);
1019 }
1020 #[repr(transparent)]
1021 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1022 pub struct Idr(pub u8);
1023 impl Idr {
1024 #[doc = "Input is logic low"]
1025 pub const LOW: Self = Self(0);
1026 #[doc = "Input is logic high"]
1027 pub const HIGH: Self = Self(0x01);
1028 }
1029 } 835 }
1030} 836}
1031pub mod generic { 837pub mod syscfg_l4 {
1032 use core::marker::PhantomData; 838 use crate::generic::*;
1033 #[derive(Copy, Clone)] 839 #[doc = "System configuration controller"]
1034 pub struct RW;
1035 #[derive(Copy, Clone)]
1036 pub struct R;
1037 #[derive(Copy, Clone)]
1038 pub struct W;
1039 mod sealed {
1040 use super::*;
1041 pub trait Access {}
1042 impl Access for R {}
1043 impl Access for W {}
1044 impl Access for RW {}
1045 }
1046 pub trait Access: sealed::Access + Copy {}
1047 impl Access for R {}
1048 impl Access for W {}
1049 impl Access for RW {}
1050 pub trait Read: Access {}
1051 impl Read for RW {}
1052 impl Read for R {}
1053 pub trait Write: Access {}
1054 impl Write for RW {}
1055 impl Write for W {}
1056 #[derive(Copy, Clone)] 840 #[derive(Copy, Clone)]
1057 pub struct Reg<T: Copy, A: Access> { 841 pub struct Syscfg(pub *mut u8);
1058 ptr: *mut u8, 842 unsafe impl Send for Syscfg {}
1059 phantom: PhantomData<*mut (T, A)>, 843 unsafe impl Sync for Syscfg {}
844 impl Syscfg {
845 #[doc = "memory remap register"]
846 pub fn memrmp(self) -> Reg<regs::Memrmp, RW> {
847 unsafe { Reg::from_ptr(self.0.add(0usize)) }
848 }
849 #[doc = "configuration register 1"]
850 pub fn cfgr1(self) -> Reg<regs::Cfgr1, RW> {
851 unsafe { Reg::from_ptr(self.0.add(4usize)) }
852 }
853 #[doc = "external interrupt configuration register 1"]
854 pub fn exticr(self, n: usize) -> Reg<regs::Exticr, RW> {
855 assert!(n < 4usize);
856 unsafe { Reg::from_ptr(self.0.add(8usize + n * 4usize)) }
857 }
858 #[doc = "SCSR"]
859 pub fn scsr(self) -> Reg<regs::Scsr, RW> {
860 unsafe { Reg::from_ptr(self.0.add(24usize)) }
861 }
862 #[doc = "CFGR2"]
863 pub fn cfgr2(self) -> Reg<regs::Cfgr2, RW> {
864 unsafe { Reg::from_ptr(self.0.add(28usize)) }
865 }
866 #[doc = "SWPR"]
867 pub fn swpr(self) -> Reg<regs::Swpr, W> {
868 unsafe { Reg::from_ptr(self.0.add(32usize)) }
869 }
870 #[doc = "SKR"]
871 pub fn skr(self) -> Reg<regs::Skr, W> {
872 unsafe { Reg::from_ptr(self.0.add(36usize)) }
873 }
1060 } 874 }
1061 unsafe impl<T: Copy, A: Access> Send for Reg<T, A> {} 875 pub mod regs {
1062 unsafe impl<T: Copy, A: Access> Sync for Reg<T, A> {} 876 use crate::generic::*;
1063 impl<T: Copy, A: Access> Reg<T, A> { 877 #[doc = "SCSR"]
1064 pub fn from_ptr(ptr: *mut u8) -> Self { 878 #[repr(transparent)]
1065 Self { 879 #[derive(Copy, Clone, Eq, PartialEq)]
1066 ptr, 880 pub struct Scsr(pub u32);
1067 phantom: PhantomData, 881 impl Scsr {
882 #[doc = "SRAM2 Erase"]
883 pub const fn sram2er(&self) -> bool {
884 let val = (self.0 >> 0usize) & 0x01;
885 val != 0
886 }
887 #[doc = "SRAM2 Erase"]
888 pub fn set_sram2er(&mut self, val: bool) {
889 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
890 }
891 #[doc = "SRAM2 busy by erase operation"]
892 pub const fn sram2bsy(&self) -> bool {
893 let val = (self.0 >> 1usize) & 0x01;
894 val != 0
895 }
896 #[doc = "SRAM2 busy by erase operation"]
897 pub fn set_sram2bsy(&mut self, val: bool) {
898 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
1068 } 899 }
1069 } 900 }
1070 pub fn ptr(&self) -> *mut T { 901 impl Default for Scsr {
1071 self.ptr as _ 902 fn default() -> Scsr {
903 Scsr(0)
904 }
1072 } 905 }
1073 } 906 #[doc = "CFGR2"]
1074 impl<T: Copy, A: Read> Reg<T, A> { 907 #[repr(transparent)]
1075 pub unsafe fn read(&self) -> T { 908 #[derive(Copy, Clone, Eq, PartialEq)]
1076 (self.ptr as *mut T).read_volatile() 909 pub struct Cfgr2(pub u32);
910 impl Cfgr2 {
911 #[doc = "Cortex LOCKUP (Hardfault) output enable bit"]
912 pub const fn cll(&self) -> bool {
913 let val = (self.0 >> 0usize) & 0x01;
914 val != 0
915 }
916 #[doc = "Cortex LOCKUP (Hardfault) output enable bit"]
917 pub fn set_cll(&mut self, val: bool) {
918 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
919 }
920 #[doc = "SRAM2 parity lock bit"]
921 pub const fn spl(&self) -> bool {
922 let val = (self.0 >> 1usize) & 0x01;
923 val != 0
924 }
925 #[doc = "SRAM2 parity lock bit"]
926 pub fn set_spl(&mut self, val: bool) {
927 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
928 }
929 #[doc = "PVD lock enable bit"]
930 pub const fn pvdl(&self) -> bool {
931 let val = (self.0 >> 2usize) & 0x01;
932 val != 0
933 }
934 #[doc = "PVD lock enable bit"]
935 pub fn set_pvdl(&mut self, val: bool) {
936 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
937 }
938 #[doc = "ECC Lock"]
939 pub const fn eccl(&self) -> bool {
940 let val = (self.0 >> 3usize) & 0x01;
941 val != 0
942 }
943 #[doc = "ECC Lock"]
944 pub fn set_eccl(&mut self, val: bool) {
945 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
946 }
947 #[doc = "SRAM2 parity error flag"]
948 pub const fn spf(&self) -> bool {
949 let val = (self.0 >> 8usize) & 0x01;
950 val != 0
951 }
952 #[doc = "SRAM2 parity error flag"]
953 pub fn set_spf(&mut self, val: bool) {
954 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
955 }
1077 } 956 }
1078 } 957 impl Default for Cfgr2 {
1079 impl<T: Copy, A: Write> Reg<T, A> { 958 fn default() -> Cfgr2 {
1080 pub unsafe fn write_value(&self, val: T) { 959 Cfgr2(0)
1081 (self.ptr as *mut T).write_volatile(val) 960 }
1082 } 961 }
1083 } 962 #[doc = "configuration register 1"]
1084 impl<T: Default + Copy, A: Write> Reg<T, A> { 963 #[repr(transparent)]
1085 pub unsafe fn write<R>(&self, f: impl FnOnce(&mut T) -> R) -> R { 964 #[derive(Copy, Clone, Eq, PartialEq)]
1086 let mut val = Default::default(); 965 pub struct Cfgr1(pub u32);
1087 let res = f(&mut val); 966 impl Cfgr1 {
1088 self.write_value(val); 967 #[doc = "Firewall disable"]
1089 res 968 pub const fn fwdis(&self) -> bool {
969 let val = (self.0 >> 0usize) & 0x01;
970 val != 0
971 }
972 #[doc = "Firewall disable"]
973 pub fn set_fwdis(&mut self, val: bool) {
974 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
975 }
976 #[doc = "I/O analog switch voltage booster enable"]
977 pub const fn boosten(&self) -> bool {
978 let val = (self.0 >> 8usize) & 0x01;
979 val != 0
980 }
981 #[doc = "I/O analog switch voltage booster enable"]
982 pub fn set_boosten(&mut self, val: bool) {
983 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
984 }
985 #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB6"]
986 pub const fn i2c_pb6_fmp(&self) -> bool {
987 let val = (self.0 >> 16usize) & 0x01;
988 val != 0
989 }
990 #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB6"]
991 pub fn set_i2c_pb6_fmp(&mut self, val: bool) {
992 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
993 }
994 #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB7"]
995 pub const fn i2c_pb7_fmp(&self) -> bool {
996 let val = (self.0 >> 17usize) & 0x01;
997 val != 0
998 }
999 #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB7"]
1000 pub fn set_i2c_pb7_fmp(&mut self, val: bool) {
1001 self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize);
1002 }
1003 #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB8"]
1004 pub const fn i2c_pb8_fmp(&self) -> bool {
1005 let val = (self.0 >> 18usize) & 0x01;
1006 val != 0
1007 }
1008 #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB8"]
1009 pub fn set_i2c_pb8_fmp(&mut self, val: bool) {
1010 self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize);
1011 }
1012 #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB9"]
1013 pub const fn i2c_pb9_fmp(&self) -> bool {
1014 let val = (self.0 >> 19usize) & 0x01;
1015 val != 0
1016 }
1017 #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB9"]
1018 pub fn set_i2c_pb9_fmp(&mut self, val: bool) {
1019 self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize);
1020 }
1021 #[doc = "I2C1 Fast-mode Plus driving capability activation"]
1022 pub const fn i2c1_fmp(&self) -> bool {
1023 let val = (self.0 >> 20usize) & 0x01;
1024 val != 0
1025 }
1026 #[doc = "I2C1 Fast-mode Plus driving capability activation"]
1027 pub fn set_i2c1_fmp(&mut self, val: bool) {
1028 self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize);
1029 }
1030 #[doc = "I2C2 Fast-mode Plus driving capability activation"]
1031 pub const fn i2c2_fmp(&self) -> bool {
1032 let val = (self.0 >> 21usize) & 0x01;
1033 val != 0
1034 }
1035 #[doc = "I2C2 Fast-mode Plus driving capability activation"]
1036 pub fn set_i2c2_fmp(&mut self, val: bool) {
1037 self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize);
1038 }
1039 #[doc = "I2C3 Fast-mode Plus driving capability activation"]
1040 pub const fn i2c3_fmp(&self) -> bool {
1041 let val = (self.0 >> 22usize) & 0x01;
1042 val != 0
1043 }
1044 #[doc = "I2C3 Fast-mode Plus driving capability activation"]
1045 pub fn set_i2c3_fmp(&mut self, val: bool) {
1046 self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize);
1047 }
1048 #[doc = "Floating Point Unit interrupts enable bits"]
1049 pub const fn fpu_ie(&self) -> u8 {
1050 let val = (self.0 >> 26usize) & 0x3f;
1051 val as u8
1052 }
1053 #[doc = "Floating Point Unit interrupts enable bits"]
1054 pub fn set_fpu_ie(&mut self, val: u8) {
1055 self.0 = (self.0 & !(0x3f << 26usize)) | (((val as u32) & 0x3f) << 26usize);
1056 }
1090 } 1057 }
1091 } 1058 impl Default for Cfgr1 {
1092 impl<T: Copy, A: Read + Write> Reg<T, A> { 1059 fn default() -> Cfgr1 {
1093 pub unsafe fn modify<R>(&self, f: impl FnOnce(&mut T) -> R) -> R { 1060 Cfgr1(0)
1094 let mut val = self.read(); 1061 }
1095 let res = f(&mut val); 1062 }
1096 self.write_value(val); 1063 #[doc = "external interrupt configuration register 4"]
1097 res 1064 #[repr(transparent)]
1065 #[derive(Copy, Clone, Eq, PartialEq)]
1066 pub struct Exticr(pub u32);
1067 impl Exticr {
1068 #[doc = "EXTI12 configuration bits"]
1069 pub fn exti(&self, n: usize) -> u8 {
1070 assert!(n < 4usize);
1071 let offs = 0usize + n * 4usize;
1072 let val = (self.0 >> offs) & 0x0f;
1073 val as u8
1074 }
1075 #[doc = "EXTI12 configuration bits"]
1076 pub fn set_exti(&mut self, n: usize, val: u8) {
1077 assert!(n < 4usize);
1078 let offs = 0usize + n * 4usize;
1079 self.0 = (self.0 & !(0x0f << offs)) | (((val as u32) & 0x0f) << offs);
1080 }
1081 }
1082 impl Default for Exticr {
1083 fn default() -> Exticr {
1084 Exticr(0)
1085 }
1086 }
1087 #[doc = "SKR"]
1088 #[repr(transparent)]
1089 #[derive(Copy, Clone, Eq, PartialEq)]
1090 pub struct Skr(pub u32);
1091 impl Skr {
1092 #[doc = "SRAM2 write protection key for software erase"]
1093 pub const fn key(&self) -> u8 {
1094 let val = (self.0 >> 0usize) & 0xff;
1095 val as u8
1096 }
1097 #[doc = "SRAM2 write protection key for software erase"]
1098 pub fn set_key(&mut self, val: u8) {
1099 self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize);
1100 }
1101 }
1102 impl Default for Skr {
1103 fn default() -> Skr {
1104 Skr(0)
1105 }
1106 }
1107 #[doc = "memory remap register"]
1108 #[repr(transparent)]
1109 #[derive(Copy, Clone, Eq, PartialEq)]
1110 pub struct Memrmp(pub u32);
1111 impl Memrmp {
1112 #[doc = "Memory mapping selection"]
1113 pub const fn mem_mode(&self) -> u8 {
1114 let val = (self.0 >> 0usize) & 0x07;
1115 val as u8
1116 }
1117 #[doc = "Memory mapping selection"]
1118 pub fn set_mem_mode(&mut self, val: u8) {
1119 self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize);
1120 }
1121 #[doc = "QUADSPI memory mapping swap"]
1122 pub const fn qfs(&self) -> bool {
1123 let val = (self.0 >> 3usize) & 0x01;
1124 val != 0
1125 }
1126 #[doc = "QUADSPI memory mapping swap"]
1127 pub fn set_qfs(&mut self, val: bool) {
1128 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
1129 }
1130 #[doc = "Flash Bank mode selection"]
1131 pub const fn fb_mode(&self) -> bool {
1132 let val = (self.0 >> 8usize) & 0x01;
1133 val != 0
1134 }
1135 #[doc = "Flash Bank mode selection"]
1136 pub fn set_fb_mode(&mut self, val: bool) {
1137 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
1138 }
1139 }
1140 impl Default for Memrmp {
1141 fn default() -> Memrmp {
1142 Memrmp(0)
1143 }
1144 }
1145 #[doc = "SWPR"]
1146 #[repr(transparent)]
1147 #[derive(Copy, Clone, Eq, PartialEq)]
1148 pub struct Swpr(pub u32);
1149 impl Swpr {
1150 #[doc = "SRAWM2 write protection."]
1151 pub fn pwp(&self, n: usize) -> bool {
1152 assert!(n < 32usize);
1153 let offs = 0usize + n * 1usize;
1154 let val = (self.0 >> offs) & 0x01;
1155 val != 0
1156 }
1157 #[doc = "SRAWM2 write protection."]
1158 pub fn set_pwp(&mut self, n: usize, val: bool) {
1159 assert!(n < 32usize);
1160 let offs = 0usize + n * 1usize;
1161 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
1162 }
1163 }
1164 impl Default for Swpr {
1165 fn default() -> Swpr {
1166 Swpr(0)
1167 }
1098 } 1168 }
1099 } 1169 }
1100} 1170}
1101pub mod usart_v1 { 1171pub mod usart_v1 {
1102 use crate::generic::*; 1172 use crate::generic::*;
1103 #[doc = "Universal synchronous asynchronous receiver transmitter"] 1173 #[doc = "Universal asynchronous receiver transmitter"]
1104 #[derive(Copy, Clone)] 1174 #[derive(Copy, Clone)]
1105 pub struct Usart(pub *mut u8); 1175 pub struct Uart(pub *mut u8);
1106 unsafe impl Send for Usart {} 1176 unsafe impl Send for Uart {}
1107 unsafe impl Sync for Usart {} 1177 unsafe impl Sync for Uart {}
1108 impl Usart { 1178 impl Uart {
1109 #[doc = "Status register"] 1179 #[doc = "Status register"]
1110 pub fn sr(self) -> Reg<regs::Sr, RW> { 1180 pub fn sr(self) -> Reg<regs::Sr, RW> {
1111 unsafe { Reg::from_ptr(self.0.add(0usize)) } 1181 unsafe { Reg::from_ptr(self.0.add(0usize)) }
@@ -1123,24 +1193,20 @@ pub mod usart_v1 {
1123 unsafe { Reg::from_ptr(self.0.add(12usize)) } 1193 unsafe { Reg::from_ptr(self.0.add(12usize)) }
1124 } 1194 }
1125 #[doc = "Control register 2"] 1195 #[doc = "Control register 2"]
1126 pub fn cr2(self) -> Reg<regs::Cr2Usart, RW> { 1196 pub fn cr2(self) -> Reg<regs::Cr2, RW> {
1127 unsafe { Reg::from_ptr(self.0.add(16usize)) } 1197 unsafe { Reg::from_ptr(self.0.add(16usize)) }
1128 } 1198 }
1129 #[doc = "Control register 3"] 1199 #[doc = "Control register 3"]
1130 pub fn cr3(self) -> Reg<regs::Cr3Usart, RW> { 1200 pub fn cr3(self) -> Reg<regs::Cr3, RW> {
1131 unsafe { Reg::from_ptr(self.0.add(20usize)) } 1201 unsafe { Reg::from_ptr(self.0.add(20usize)) }
1132 } 1202 }
1133 #[doc = "Guard time and prescaler register"]
1134 pub fn gtpr(self) -> Reg<regs::Gtpr, RW> {
1135 unsafe { Reg::from_ptr(self.0.add(24usize)) }
1136 }
1137 } 1203 }
1138 #[doc = "Universal asynchronous receiver transmitter"] 1204 #[doc = "Universal synchronous asynchronous receiver transmitter"]
1139 #[derive(Copy, Clone)] 1205 #[derive(Copy, Clone)]
1140 pub struct Uart(pub *mut u8); 1206 pub struct Usart(pub *mut u8);
1141 unsafe impl Send for Uart {} 1207 unsafe impl Send for Usart {}
1142 unsafe impl Sync for Uart {} 1208 unsafe impl Sync for Usart {}
1143 impl Uart { 1209 impl Usart {
1144 #[doc = "Status register"] 1210 #[doc = "Status register"]
1145 pub fn sr(self) -> Reg<regs::Sr, RW> { 1211 pub fn sr(self) -> Reg<regs::Sr, RW> {
1146 unsafe { Reg::from_ptr(self.0.add(0usize)) } 1212 unsafe { Reg::from_ptr(self.0.add(0usize)) }
@@ -1158,24 +1224,28 @@ pub mod usart_v1 {
1158 unsafe { Reg::from_ptr(self.0.add(12usize)) } 1224 unsafe { Reg::from_ptr(self.0.add(12usize)) }
1159 } 1225 }
1160 #[doc = "Control register 2"] 1226 #[doc = "Control register 2"]
1161 pub fn cr2(self) -> Reg<regs::Cr2, RW> { 1227 pub fn cr2(self) -> Reg<regs::Cr2Usart, RW> {
1162 unsafe { Reg::from_ptr(self.0.add(16usize)) } 1228 unsafe { Reg::from_ptr(self.0.add(16usize)) }
1163 } 1229 }
1164 #[doc = "Control register 3"] 1230 #[doc = "Control register 3"]
1165 pub fn cr3(self) -> Reg<regs::Cr3, RW> { 1231 pub fn cr3(self) -> Reg<regs::Cr3Usart, RW> {
1166 unsafe { Reg::from_ptr(self.0.add(20usize)) } 1232 unsafe { Reg::from_ptr(self.0.add(20usize)) }
1167 } 1233 }
1234 #[doc = "Guard time and prescaler register"]
1235 pub fn gtpr(self) -> Reg<regs::Gtpr, RW> {
1236 unsafe { Reg::from_ptr(self.0.add(24usize)) }
1237 }
1168 } 1238 }
1169 pub mod vals { 1239 pub mod vals {
1170 use crate::generic::*; 1240 use crate::generic::*;
1171 #[repr(transparent)] 1241 #[repr(transparent)]
1172 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 1242 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1173 pub struct Irlp(pub u8); 1243 pub struct Ps(pub u8);
1174 impl Irlp { 1244 impl Ps {
1175 #[doc = "Normal mode"] 1245 #[doc = "Even parity"]
1176 pub const NORMAL: Self = Self(0); 1246 pub const EVEN: Self = Self(0);
1177 #[doc = "Low-power mode"] 1247 #[doc = "Odd parity"]
1178 pub const LOWPOWER: Self = Self(0x01); 1248 pub const ODD: Self = Self(0x01);
1179 } 1249 }
1180 #[repr(transparent)] 1250 #[repr(transparent)]
1181 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 1251 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
@@ -1188,6 +1258,37 @@ pub mod usart_v1 {
1188 } 1258 }
1189 #[repr(transparent)] 1259 #[repr(transparent)]
1190 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 1260 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1261 pub struct Sbk(pub u8);
1262 impl Sbk {
1263 #[doc = "No break character is transmitted"]
1264 pub const NOBREAK: Self = Self(0);
1265 #[doc = "Break character transmitted"]
1266 pub const BREAK: Self = Self(0x01);
1267 }
1268 #[repr(transparent)]
1269 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1270 pub struct Stop(pub u8);
1271 impl Stop {
1272 #[doc = "1 stop bit"]
1273 pub const STOP1: Self = Self(0);
1274 #[doc = "0.5 stop bits"]
1275 pub const STOP0P5: Self = Self(0x01);
1276 #[doc = "2 stop bits"]
1277 pub const STOP2: Self = Self(0x02);
1278 #[doc = "1.5 stop bits"]
1279 pub const STOP1P5: Self = Self(0x03);
1280 }
1281 #[repr(transparent)]
1282 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1283 pub struct Hdsel(pub u8);
1284 impl Hdsel {
1285 #[doc = "Half duplex mode is not selected"]
1286 pub const FULLDUPLEX: Self = Self(0);
1287 #[doc = "Half duplex mode is selected"]
1288 pub const HALFDUPLEX: Self = Self(0x01);
1289 }
1290 #[repr(transparent)]
1291 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1191 pub struct Wake(pub u8); 1292 pub struct Wake(pub u8);
1192 impl Wake { 1293 impl Wake {
1193 #[doc = "USART wakeup on idle line"] 1294 #[doc = "USART wakeup on idle line"]
@@ -1197,12 +1298,12 @@ pub mod usart_v1 {
1197 } 1298 }
1198 #[repr(transparent)] 1299 #[repr(transparent)]
1199 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 1300 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1200 pub struct Cpha(pub u8); 1301 pub struct Rwu(pub u8);
1201 impl Cpha { 1302 impl Rwu {
1202 #[doc = "The first clock transition is the first data capture edge"] 1303 #[doc = "Receiver in active mode"]
1203 pub const FIRST: Self = Self(0); 1304 pub const ACTIVE: Self = Self(0);
1204 #[doc = "The second clock transition is the first data capture edge"] 1305 #[doc = "Receiver in mute mode"]
1205 pub const SECOND: Self = Self(0x01); 1306 pub const MUTE: Self = Self(0x01);
1206 } 1307 }
1207 #[repr(transparent)] 1308 #[repr(transparent)]
1208 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 1309 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
@@ -1215,33 +1316,6 @@ pub mod usart_v1 {
1215 } 1316 }
1216 #[repr(transparent)] 1317 #[repr(transparent)]
1217 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 1318 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1218 pub struct Ps(pub u8);
1219 impl Ps {
1220 #[doc = "Even parity"]
1221 pub const EVEN: Self = Self(0);
1222 #[doc = "Odd parity"]
1223 pub const ODD: Self = Self(0x01);
1224 }
1225 #[repr(transparent)]
1226 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1227 pub struct Sbk(pub u8);
1228 impl Sbk {
1229 #[doc = "No break character is transmitted"]
1230 pub const NOBREAK: Self = Self(0);
1231 #[doc = "Break character transmitted"]
1232 pub const BREAK: Self = Self(0x01);
1233 }
1234 #[repr(transparent)]
1235 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1236 pub struct Hdsel(pub u8);
1237 impl Hdsel {
1238 #[doc = "Half duplex mode is not selected"]
1239 pub const FULLDUPLEX: Self = Self(0);
1240 #[doc = "Half duplex mode is selected"]
1241 pub const HALFDUPLEX: Self = Self(0x01);
1242 }
1243 #[repr(transparent)]
1244 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1245 pub struct Cpol(pub u8); 1319 pub struct Cpol(pub u8);
1246 impl Cpol { 1320 impl Cpol {
1247 #[doc = "Steady low value on CK pin outside transmission window"] 1321 #[doc = "Steady low value on CK pin outside transmission window"]
@@ -1251,25 +1325,21 @@ pub mod usart_v1 {
1251 } 1325 }
1252 #[repr(transparent)] 1326 #[repr(transparent)]
1253 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 1327 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1254 pub struct Rwu(pub u8); 1328 pub struct Cpha(pub u8);
1255 impl Rwu { 1329 impl Cpha {
1256 #[doc = "Receiver in active mode"] 1330 #[doc = "The first clock transition is the first data capture edge"]
1257 pub const ACTIVE: Self = Self(0); 1331 pub const FIRST: Self = Self(0);
1258 #[doc = "Receiver in mute mode"] 1332 #[doc = "The second clock transition is the first data capture edge"]
1259 pub const MUTE: Self = Self(0x01); 1333 pub const SECOND: Self = Self(0x01);
1260 } 1334 }
1261 #[repr(transparent)] 1335 #[repr(transparent)]
1262 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 1336 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1263 pub struct Stop(pub u8); 1337 pub struct Irlp(pub u8);
1264 impl Stop { 1338 impl Irlp {
1265 #[doc = "1 stop bit"] 1339 #[doc = "Normal mode"]
1266 pub const STOP1: Self = Self(0); 1340 pub const NORMAL: Self = Self(0);
1267 #[doc = "0.5 stop bits"] 1341 #[doc = "Low-power mode"]
1268 pub const STOP0P5: Self = Self(0x01); 1342 pub const LOWPOWER: Self = Self(0x01);
1269 #[doc = "2 stop bits"]
1270 pub const STOP2: Self = Self(0x02);
1271 #[doc = "1.5 stop bits"]
1272 pub const STOP1P5: Self = Self(0x03);
1273 } 1343 }
1274 } 1344 }
1275 pub mod regs { 1345 pub mod regs {
@@ -1277,217 +1347,6 @@ pub mod usart_v1 {
1277 #[doc = "Control register 3"] 1347 #[doc = "Control register 3"]
1278 #[repr(transparent)] 1348 #[repr(transparent)]
1279 #[derive(Copy, Clone, Eq, PartialEq)] 1349 #[derive(Copy, Clone, Eq, PartialEq)]
1280 pub struct Cr3Usart(pub u32);
1281 impl Cr3Usart {
1282 #[doc = "Error interrupt enable"]
1283 pub const fn eie(&self) -> bool {
1284 let val = (self.0 >> 0usize) & 0x01;
1285 val != 0
1286 }
1287 #[doc = "Error interrupt enable"]
1288 pub fn set_eie(&mut self, val: bool) {
1289 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
1290 }
1291 #[doc = "IrDA mode enable"]
1292 pub const fn iren(&self) -> bool {
1293 let val = (self.0 >> 1usize) & 0x01;
1294 val != 0
1295 }
1296 #[doc = "IrDA mode enable"]
1297 pub fn set_iren(&mut self, val: bool) {
1298 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
1299 }
1300 #[doc = "IrDA low-power"]
1301 pub const fn irlp(&self) -> super::vals::Irlp {
1302 let val = (self.0 >> 2usize) & 0x01;
1303 super::vals::Irlp(val as u8)
1304 }
1305 #[doc = "IrDA low-power"]
1306 pub fn set_irlp(&mut self, val: super::vals::Irlp) {
1307 self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize);
1308 }
1309 #[doc = "Half-duplex selection"]
1310 pub const fn hdsel(&self) -> super::vals::Hdsel {
1311 let val = (self.0 >> 3usize) & 0x01;
1312 super::vals::Hdsel(val as u8)
1313 }
1314 #[doc = "Half-duplex selection"]
1315 pub fn set_hdsel(&mut self, val: super::vals::Hdsel) {
1316 self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize);
1317 }
1318 #[doc = "Smartcard NACK enable"]
1319 pub const fn nack(&self) -> bool {
1320 let val = (self.0 >> 4usize) & 0x01;
1321 val != 0
1322 }
1323 #[doc = "Smartcard NACK enable"]
1324 pub fn set_nack(&mut self, val: bool) {
1325 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
1326 }
1327 #[doc = "Smartcard mode enable"]
1328 pub const fn scen(&self) -> bool {
1329 let val = (self.0 >> 5usize) & 0x01;
1330 val != 0
1331 }
1332 #[doc = "Smartcard mode enable"]
1333 pub fn set_scen(&mut self, val: bool) {
1334 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
1335 }
1336 #[doc = "DMA enable receiver"]
1337 pub const fn dmar(&self) -> bool {
1338 let val = (self.0 >> 6usize) & 0x01;
1339 val != 0
1340 }
1341 #[doc = "DMA enable receiver"]
1342 pub fn set_dmar(&mut self, val: bool) {
1343 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
1344 }
1345 #[doc = "DMA enable transmitter"]
1346 pub const fn dmat(&self) -> bool {
1347 let val = (self.0 >> 7usize) & 0x01;
1348 val != 0
1349 }
1350 #[doc = "DMA enable transmitter"]
1351 pub fn set_dmat(&mut self, val: bool) {
1352 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
1353 }
1354 #[doc = "RTS enable"]
1355 pub const fn rtse(&self) -> bool {
1356 let val = (self.0 >> 8usize) & 0x01;
1357 val != 0
1358 }
1359 #[doc = "RTS enable"]
1360 pub fn set_rtse(&mut self, val: bool) {
1361 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
1362 }
1363 #[doc = "CTS enable"]
1364 pub const fn ctse(&self) -> bool {
1365 let val = (self.0 >> 9usize) & 0x01;
1366 val != 0
1367 }
1368 #[doc = "CTS enable"]
1369 pub fn set_ctse(&mut self, val: bool) {
1370 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
1371 }
1372 #[doc = "CTS interrupt enable"]
1373 pub const fn ctsie(&self) -> bool {
1374 let val = (self.0 >> 10usize) & 0x01;
1375 val != 0
1376 }
1377 #[doc = "CTS interrupt enable"]
1378 pub fn set_ctsie(&mut self, val: bool) {
1379 self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize);
1380 }
1381 }
1382 impl Default for Cr3Usart {
1383 fn default() -> Cr3Usart {
1384 Cr3Usart(0)
1385 }
1386 }
1387 #[doc = "Status register"]
1388 #[repr(transparent)]
1389 #[derive(Copy, Clone, Eq, PartialEq)]
1390 pub struct SrUsart(pub u32);
1391 impl SrUsart {
1392 #[doc = "Parity error"]
1393 pub const fn pe(&self) -> bool {
1394 let val = (self.0 >> 0usize) & 0x01;
1395 val != 0
1396 }
1397 #[doc = "Parity error"]
1398 pub fn set_pe(&mut self, val: bool) {
1399 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
1400 }
1401 #[doc = "Framing error"]
1402 pub const fn fe(&self) -> bool {
1403 let val = (self.0 >> 1usize) & 0x01;
1404 val != 0
1405 }
1406 #[doc = "Framing error"]
1407 pub fn set_fe(&mut self, val: bool) {
1408 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
1409 }
1410 #[doc = "Noise error flag"]
1411 pub const fn ne(&self) -> bool {
1412 let val = (self.0 >> 2usize) & 0x01;
1413 val != 0
1414 }
1415 #[doc = "Noise error flag"]
1416 pub fn set_ne(&mut self, val: bool) {
1417 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
1418 }
1419 #[doc = "Overrun error"]
1420 pub const fn ore(&self) -> bool {
1421 let val = (self.0 >> 3usize) & 0x01;
1422 val != 0
1423 }
1424 #[doc = "Overrun error"]
1425 pub fn set_ore(&mut self, val: bool) {
1426 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
1427 }
1428 #[doc = "IDLE line detected"]
1429 pub const fn idle(&self) -> bool {
1430 let val = (self.0 >> 4usize) & 0x01;
1431 val != 0
1432 }
1433 #[doc = "IDLE line detected"]
1434 pub fn set_idle(&mut self, val: bool) {
1435 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
1436 }
1437 #[doc = "Read data register not empty"]
1438 pub const fn rxne(&self) -> bool {
1439 let val = (self.0 >> 5usize) & 0x01;
1440 val != 0
1441 }
1442 #[doc = "Read data register not empty"]
1443 pub fn set_rxne(&mut self, val: bool) {
1444 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
1445 }
1446 #[doc = "Transmission complete"]
1447 pub const fn tc(&self) -> bool {
1448 let val = (self.0 >> 6usize) & 0x01;
1449 val != 0
1450 }
1451 #[doc = "Transmission complete"]
1452 pub fn set_tc(&mut self, val: bool) {
1453 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
1454 }
1455 #[doc = "Transmit data register empty"]
1456 pub const fn txe(&self) -> bool {
1457 let val = (self.0 >> 7usize) & 0x01;
1458 val != 0
1459 }
1460 #[doc = "Transmit data register empty"]
1461 pub fn set_txe(&mut self, val: bool) {
1462 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
1463 }
1464 #[doc = "LIN break detection flag"]
1465 pub const fn lbd(&self) -> bool {
1466 let val = (self.0 >> 8usize) & 0x01;
1467 val != 0
1468 }
1469 #[doc = "LIN break detection flag"]
1470 pub fn set_lbd(&mut self, val: bool) {
1471 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
1472 }
1473 #[doc = "CTS flag"]
1474 pub const fn cts(&self) -> bool {
1475 let val = (self.0 >> 9usize) & 0x01;
1476 val != 0
1477 }
1478 #[doc = "CTS flag"]
1479 pub fn set_cts(&mut self, val: bool) {
1480 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
1481 }
1482 }
1483 impl Default for SrUsart {
1484 fn default() -> SrUsart {
1485 SrUsart(0)
1486 }
1487 }
1488 #[doc = "Control register 3"]
1489 #[repr(transparent)]
1490 #[derive(Copy, Clone, Eq, PartialEq)]
1491 pub struct Cr3(pub u32); 1350 pub struct Cr3(pub u32);
1492 impl Cr3 { 1351 impl Cr3 {
1493 #[doc = "Error interrupt enable"] 1352 #[doc = "Error interrupt enable"]
@@ -1606,147 +1465,6 @@ pub mod usart_v1 {
1606 Cr2(0) 1465 Cr2(0)
1607 } 1466 }
1608 } 1467 }
1609 #[doc = "Status register"]
1610 #[repr(transparent)]
1611 #[derive(Copy, Clone, Eq, PartialEq)]
1612 pub struct Sr(pub u32);
1613 impl Sr {
1614 #[doc = "Parity error"]
1615 pub const fn pe(&self) -> bool {
1616 let val = (self.0 >> 0usize) & 0x01;
1617 val != 0
1618 }
1619 #[doc = "Parity error"]
1620 pub fn set_pe(&mut self, val: bool) {
1621 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
1622 }
1623 #[doc = "Framing error"]
1624 pub const fn fe(&self) -> bool {
1625 let val = (self.0 >> 1usize) & 0x01;
1626 val != 0
1627 }
1628 #[doc = "Framing error"]
1629 pub fn set_fe(&mut self, val: bool) {
1630 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
1631 }
1632 #[doc = "Noise error flag"]
1633 pub const fn ne(&self) -> bool {
1634 let val = (self.0 >> 2usize) & 0x01;
1635 val != 0
1636 }
1637 #[doc = "Noise error flag"]
1638 pub fn set_ne(&mut self, val: bool) {
1639 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
1640 }
1641 #[doc = "Overrun error"]
1642 pub const fn ore(&self) -> bool {
1643 let val = (self.0 >> 3usize) & 0x01;
1644 val != 0
1645 }
1646 #[doc = "Overrun error"]
1647 pub fn set_ore(&mut self, val: bool) {
1648 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
1649 }
1650 #[doc = "IDLE line detected"]
1651 pub const fn idle(&self) -> bool {
1652 let val = (self.0 >> 4usize) & 0x01;
1653 val != 0
1654 }
1655 #[doc = "IDLE line detected"]
1656 pub fn set_idle(&mut self, val: bool) {
1657 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
1658 }
1659 #[doc = "Read data register not empty"]
1660 pub const fn rxne(&self) -> bool {
1661 let val = (self.0 >> 5usize) & 0x01;
1662 val != 0
1663 }
1664 #[doc = "Read data register not empty"]
1665 pub fn set_rxne(&mut self, val: bool) {
1666 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
1667 }
1668 #[doc = "Transmission complete"]
1669 pub const fn tc(&self) -> bool {
1670 let val = (self.0 >> 6usize) & 0x01;
1671 val != 0
1672 }
1673 #[doc = "Transmission complete"]
1674 pub fn set_tc(&mut self, val: bool) {
1675 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
1676 }
1677 #[doc = "Transmit data register empty"]
1678 pub const fn txe(&self) -> bool {
1679 let val = (self.0 >> 7usize) & 0x01;
1680 val != 0
1681 }
1682 #[doc = "Transmit data register empty"]
1683 pub fn set_txe(&mut self, val: bool) {
1684 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
1685 }
1686 #[doc = "LIN break detection flag"]
1687 pub const fn lbd(&self) -> bool {
1688 let val = (self.0 >> 8usize) & 0x01;
1689 val != 0
1690 }
1691 #[doc = "LIN break detection flag"]
1692 pub fn set_lbd(&mut self, val: bool) {
1693 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
1694 }
1695 }
1696 impl Default for Sr {
1697 fn default() -> Sr {
1698 Sr(0)
1699 }
1700 }
1701 #[doc = "Data register"]
1702 #[repr(transparent)]
1703 #[derive(Copy, Clone, Eq, PartialEq)]
1704 pub struct Dr(pub u32);
1705 impl Dr {
1706 #[doc = "Data value"]
1707 pub const fn dr(&self) -> u16 {
1708 let val = (self.0 >> 0usize) & 0x01ff;
1709 val as u16
1710 }
1711 #[doc = "Data value"]
1712 pub fn set_dr(&mut self, val: u16) {
1713 self.0 = (self.0 & !(0x01ff << 0usize)) | (((val as u32) & 0x01ff) << 0usize);
1714 }
1715 }
1716 impl Default for Dr {
1717 fn default() -> Dr {
1718 Dr(0)
1719 }
1720 }
1721 #[doc = "Baud rate register"]
1722 #[repr(transparent)]
1723 #[derive(Copy, Clone, Eq, PartialEq)]
1724 pub struct Brr(pub u32);
1725 impl Brr {
1726 #[doc = "fraction of USARTDIV"]
1727 pub const fn div_fraction(&self) -> u8 {
1728 let val = (self.0 >> 0usize) & 0x0f;
1729 val as u8
1730 }
1731 #[doc = "fraction of USARTDIV"]
1732 pub fn set_div_fraction(&mut self, val: u8) {
1733 self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize);
1734 }
1735 #[doc = "mantissa of USARTDIV"]
1736 pub const fn div_mantissa(&self) -> u16 {
1737 let val = (self.0 >> 4usize) & 0x0fff;
1738 val as u16
1739 }
1740 #[doc = "mantissa of USARTDIV"]
1741 pub fn set_div_mantissa(&mut self, val: u16) {
1742 self.0 = (self.0 & !(0x0fff << 4usize)) | (((val as u32) & 0x0fff) << 4usize);
1743 }
1744 }
1745 impl Default for Brr {
1746 fn default() -> Brr {
1747 Brr(0)
1748 }
1749 }
1750 #[doc = "Control register 2"] 1468 #[doc = "Control register 2"]
1751 #[repr(transparent)] 1469 #[repr(transparent)]
1752 #[derive(Copy, Clone, Eq, PartialEq)] 1470 #[derive(Copy, Clone, Eq, PartialEq)]
@@ -1868,6 +1586,98 @@ pub mod usart_v1 {
1868 Gtpr(0) 1586 Gtpr(0)
1869 } 1587 }
1870 } 1588 }
1589 #[doc = "Status register"]
1590 #[repr(transparent)]
1591 #[derive(Copy, Clone, Eq, PartialEq)]
1592 pub struct Sr(pub u32);
1593 impl Sr {
1594 #[doc = "Parity error"]
1595 pub const fn pe(&self) -> bool {
1596 let val = (self.0 >> 0usize) & 0x01;
1597 val != 0
1598 }
1599 #[doc = "Parity error"]
1600 pub fn set_pe(&mut self, val: bool) {
1601 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
1602 }
1603 #[doc = "Framing error"]
1604 pub const fn fe(&self) -> bool {
1605 let val = (self.0 >> 1usize) & 0x01;
1606 val != 0
1607 }
1608 #[doc = "Framing error"]
1609 pub fn set_fe(&mut self, val: bool) {
1610 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
1611 }
1612 #[doc = "Noise error flag"]
1613 pub const fn ne(&self) -> bool {
1614 let val = (self.0 >> 2usize) & 0x01;
1615 val != 0
1616 }
1617 #[doc = "Noise error flag"]
1618 pub fn set_ne(&mut self, val: bool) {
1619 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
1620 }
1621 #[doc = "Overrun error"]
1622 pub const fn ore(&self) -> bool {
1623 let val = (self.0 >> 3usize) & 0x01;
1624 val != 0
1625 }
1626 #[doc = "Overrun error"]
1627 pub fn set_ore(&mut self, val: bool) {
1628 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
1629 }
1630 #[doc = "IDLE line detected"]
1631 pub const fn idle(&self) -> bool {
1632 let val = (self.0 >> 4usize) & 0x01;
1633 val != 0
1634 }
1635 #[doc = "IDLE line detected"]
1636 pub fn set_idle(&mut self, val: bool) {
1637 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
1638 }
1639 #[doc = "Read data register not empty"]
1640 pub const fn rxne(&self) -> bool {
1641 let val = (self.0 >> 5usize) & 0x01;
1642 val != 0
1643 }
1644 #[doc = "Read data register not empty"]
1645 pub fn set_rxne(&mut self, val: bool) {
1646 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
1647 }
1648 #[doc = "Transmission complete"]
1649 pub const fn tc(&self) -> bool {
1650 let val = (self.0 >> 6usize) & 0x01;
1651 val != 0
1652 }
1653 #[doc = "Transmission complete"]
1654 pub fn set_tc(&mut self, val: bool) {
1655 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
1656 }
1657 #[doc = "Transmit data register empty"]
1658 pub const fn txe(&self) -> bool {
1659 let val = (self.0 >> 7usize) & 0x01;
1660 val != 0
1661 }
1662 #[doc = "Transmit data register empty"]
1663 pub fn set_txe(&mut self, val: bool) {
1664 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
1665 }
1666 #[doc = "LIN break detection flag"]
1667 pub const fn lbd(&self) -> bool {
1668 let val = (self.0 >> 8usize) & 0x01;
1669 val != 0
1670 }
1671 #[doc = "LIN break detection flag"]
1672 pub fn set_lbd(&mut self, val: bool) {
1673 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
1674 }
1675 }
1676 impl Default for Sr {
1677 fn default() -> Sr {
1678 Sr(0)
1679 }
1680 }
1871 #[doc = "Control register 1"] 1681 #[doc = "Control register 1"]
1872 #[repr(transparent)] 1682 #[repr(transparent)]
1873 #[derive(Copy, Clone, Eq, PartialEq)] 1683 #[derive(Copy, Clone, Eq, PartialEq)]
@@ -2005,465 +1815,438 @@ pub mod usart_v1 {
2005 Cr1(0) 1815 Cr1(0)
2006 } 1816 }
2007 } 1817 }
2008 } 1818 #[doc = "Baud rate register"]
2009}
2010pub mod dma_v1 {
2011 use crate::generic::*;
2012 #[doc = "Channel cluster: CCR?, CNDTR?, CPAR?, and CMAR? registers"]
2013 #[derive(Copy, Clone)]
2014 pub struct Ch(pub *mut u8);
2015 unsafe impl Send for Ch {}
2016 unsafe impl Sync for Ch {}
2017 impl Ch {
2018 #[doc = "DMA channel configuration register (DMA_CCR)"]
2019 pub fn cr(self) -> Reg<regs::Cr, RW> {
2020 unsafe { Reg::from_ptr(self.0.add(0usize)) }
2021 }
2022 #[doc = "DMA channel 1 number of data register"]
2023 pub fn ndtr(self) -> Reg<regs::Ndtr, RW> {
2024 unsafe { Reg::from_ptr(self.0.add(4usize)) }
2025 }
2026 #[doc = "DMA channel 1 peripheral address register"]
2027 pub fn par(self) -> Reg<u32, RW> {
2028 unsafe { Reg::from_ptr(self.0.add(8usize)) }
2029 }
2030 #[doc = "DMA channel 1 memory address register"]
2031 pub fn mar(self) -> Reg<u32, RW> {
2032 unsafe { Reg::from_ptr(self.0.add(12usize)) }
2033 }
2034 }
2035 #[doc = "DMA controller"]
2036 #[derive(Copy, Clone)]
2037 pub struct Dma(pub *mut u8);
2038 unsafe impl Send for Dma {}
2039 unsafe impl Sync for Dma {}
2040 impl Dma {
2041 #[doc = "DMA interrupt status register (DMA_ISR)"]
2042 pub fn isr(self) -> Reg<regs::Isr, R> {
2043 unsafe { Reg::from_ptr(self.0.add(0usize)) }
2044 }
2045 #[doc = "DMA interrupt flag clear register (DMA_IFCR)"]
2046 pub fn ifcr(self) -> Reg<regs::Ifcr, W> {
2047 unsafe { Reg::from_ptr(self.0.add(4usize)) }
2048 }
2049 #[doc = "Channel cluster: CCR?, CNDTR?, CPAR?, and CMAR? registers"]
2050 pub fn ch(self, n: usize) -> Ch {
2051 assert!(n < 7usize);
2052 unsafe { Ch(self.0.add(8usize + n * 20usize)) }
2053 }
2054 }
2055 pub mod vals {
2056 use crate::generic::*;
2057 #[repr(transparent)]
2058 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
2059 pub struct Size(pub u8);
2060 impl Size {
2061 #[doc = "8-bit size"]
2062 pub const BITS8: Self = Self(0);
2063 #[doc = "16-bit size"]
2064 pub const BITS16: Self = Self(0x01);
2065 #[doc = "32-bit size"]
2066 pub const BITS32: Self = Self(0x02);
2067 }
2068 #[repr(transparent)]
2069 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
2070 pub struct Circ(pub u8);
2071 impl Circ {
2072 #[doc = "Circular buffer disabled"]
2073 pub const DISABLED: Self = Self(0);
2074 #[doc = "Circular buffer enabled"]
2075 pub const ENABLED: Self = Self(0x01);
2076 }
2077 #[repr(transparent)]
2078 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
2079 pub struct Dir(pub u8);
2080 impl Dir {
2081 #[doc = "Read from peripheral"]
2082 pub const FROMPERIPHERAL: Self = Self(0);
2083 #[doc = "Read from memory"]
2084 pub const FROMMEMORY: Self = Self(0x01);
2085 }
2086 #[repr(transparent)]
2087 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
2088 pub struct Pl(pub u8);
2089 impl Pl {
2090 #[doc = "Low priority"]
2091 pub const LOW: Self = Self(0);
2092 #[doc = "Medium priority"]
2093 pub const MEDIUM: Self = Self(0x01);
2094 #[doc = "High priority"]
2095 pub const HIGH: Self = Self(0x02);
2096 #[doc = "Very high priority"]
2097 pub const VERYHIGH: Self = Self(0x03);
2098 }
2099 #[repr(transparent)]
2100 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
2101 pub struct Memmem(pub u8);
2102 impl Memmem {
2103 #[doc = "Memory to memory mode disabled"]
2104 pub const DISABLED: Self = Self(0);
2105 #[doc = "Memory to memory mode enabled"]
2106 pub const ENABLED: Self = Self(0x01);
2107 }
2108 #[repr(transparent)]
2109 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
2110 pub struct Inc(pub u8);
2111 impl Inc {
2112 #[doc = "Increment mode disabled"]
2113 pub const DISABLED: Self = Self(0);
2114 #[doc = "Increment mode enabled"]
2115 pub const ENABLED: Self = Self(0x01);
2116 }
2117 }
2118 pub mod regs {
2119 use crate::generic::*;
2120 #[doc = "DMA channel 1 number of data register"]
2121 #[repr(transparent)] 1819 #[repr(transparent)]
2122 #[derive(Copy, Clone, Eq, PartialEq)] 1820 #[derive(Copy, Clone, Eq, PartialEq)]
2123 pub struct Ndtr(pub u32); 1821 pub struct Brr(pub u32);
2124 impl Ndtr { 1822 impl Brr {
2125 #[doc = "Number of data to transfer"] 1823 #[doc = "fraction of USARTDIV"]
2126 pub const fn ndt(&self) -> u16 { 1824 pub const fn div_fraction(&self) -> u8 {
2127 let val = (self.0 >> 0usize) & 0xffff; 1825 let val = (self.0 >> 0usize) & 0x0f;
1826 val as u8
1827 }
1828 #[doc = "fraction of USARTDIV"]
1829 pub fn set_div_fraction(&mut self, val: u8) {
1830 self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize);
1831 }
1832 #[doc = "mantissa of USARTDIV"]
1833 pub const fn div_mantissa(&self) -> u16 {
1834 let val = (self.0 >> 4usize) & 0x0fff;
2128 val as u16 1835 val as u16
2129 } 1836 }
2130 #[doc = "Number of data to transfer"] 1837 #[doc = "mantissa of USARTDIV"]
2131 pub fn set_ndt(&mut self, val: u16) { 1838 pub fn set_div_mantissa(&mut self, val: u16) {
2132 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); 1839 self.0 = (self.0 & !(0x0fff << 4usize)) | (((val as u32) & 0x0fff) << 4usize);
2133 } 1840 }
2134 } 1841 }
2135 impl Default for Ndtr { 1842 impl Default for Brr {
2136 fn default() -> Ndtr { 1843 fn default() -> Brr {
2137 Ndtr(0) 1844 Brr(0)
2138 } 1845 }
2139 } 1846 }
2140 #[doc = "DMA interrupt flag clear register (DMA_IFCR)"] 1847 #[doc = "Status register"]
2141 #[repr(transparent)] 1848 #[repr(transparent)]
2142 #[derive(Copy, Clone, Eq, PartialEq)] 1849 #[derive(Copy, Clone, Eq, PartialEq)]
2143 pub struct Ifcr(pub u32); 1850 pub struct SrUsart(pub u32);
2144 impl Ifcr { 1851 impl SrUsart {
2145 #[doc = "Channel 1 Global interrupt clear"] 1852 #[doc = "Parity error"]
2146 pub fn cgif(&self, n: usize) -> bool { 1853 pub const fn pe(&self) -> bool {
2147 assert!(n < 7usize); 1854 let val = (self.0 >> 0usize) & 0x01;
2148 let offs = 0usize + n * 4usize;
2149 let val = (self.0 >> offs) & 0x01;
2150 val != 0 1855 val != 0
2151 } 1856 }
2152 #[doc = "Channel 1 Global interrupt clear"] 1857 #[doc = "Parity error"]
2153 pub fn set_cgif(&mut self, n: usize, val: bool) { 1858 pub fn set_pe(&mut self, val: bool) {
2154 assert!(n < 7usize); 1859 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
2155 let offs = 0usize + n * 4usize;
2156 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
2157 } 1860 }
2158 #[doc = "Channel 1 Transfer Complete clear"] 1861 #[doc = "Framing error"]
2159 pub fn ctcif(&self, n: usize) -> bool { 1862 pub const fn fe(&self) -> bool {
2160 assert!(n < 7usize); 1863 let val = (self.0 >> 1usize) & 0x01;
2161 let offs = 1usize + n * 4usize;
2162 let val = (self.0 >> offs) & 0x01;
2163 val != 0 1864 val != 0
2164 } 1865 }
2165 #[doc = "Channel 1 Transfer Complete clear"] 1866 #[doc = "Framing error"]
2166 pub fn set_ctcif(&mut self, n: usize, val: bool) { 1867 pub fn set_fe(&mut self, val: bool) {
2167 assert!(n < 7usize); 1868 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
2168 let offs = 1usize + n * 4usize;
2169 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
2170 } 1869 }
2171 #[doc = "Channel 1 Half Transfer clear"] 1870 #[doc = "Noise error flag"]
2172 pub fn chtif(&self, n: usize) -> bool { 1871 pub const fn ne(&self) -> bool {
2173 assert!(n < 7usize); 1872 let val = (self.0 >> 2usize) & 0x01;
2174 let offs = 2usize + n * 4usize;
2175 let val = (self.0 >> offs) & 0x01;
2176 val != 0 1873 val != 0
2177 } 1874 }
2178 #[doc = "Channel 1 Half Transfer clear"] 1875 #[doc = "Noise error flag"]
2179 pub fn set_chtif(&mut self, n: usize, val: bool) { 1876 pub fn set_ne(&mut self, val: bool) {
2180 assert!(n < 7usize); 1877 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
2181 let offs = 2usize + n * 4usize;
2182 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
2183 } 1878 }
2184 #[doc = "Channel 1 Transfer Error clear"] 1879 #[doc = "Overrun error"]
2185 pub fn cteif(&self, n: usize) -> bool { 1880 pub const fn ore(&self) -> bool {
2186 assert!(n < 7usize); 1881 let val = (self.0 >> 3usize) & 0x01;
2187 let offs = 3usize + n * 4usize;
2188 let val = (self.0 >> offs) & 0x01;
2189 val != 0 1882 val != 0
2190 } 1883 }
2191 #[doc = "Channel 1 Transfer Error clear"] 1884 #[doc = "Overrun error"]
2192 pub fn set_cteif(&mut self, n: usize, val: bool) { 1885 pub fn set_ore(&mut self, val: bool) {
2193 assert!(n < 7usize); 1886 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
2194 let offs = 3usize + n * 4usize;
2195 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
2196 } 1887 }
2197 } 1888 #[doc = "IDLE line detected"]
2198 impl Default for Ifcr { 1889 pub const fn idle(&self) -> bool {
2199 fn default() -> Ifcr { 1890 let val = (self.0 >> 4usize) & 0x01;
2200 Ifcr(0) 1891 val != 0
2201 } 1892 }
2202 } 1893 #[doc = "IDLE line detected"]
2203 #[doc = "DMA interrupt status register (DMA_ISR)"] 1894 pub fn set_idle(&mut self, val: bool) {
2204 #[repr(transparent)] 1895 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
2205 #[derive(Copy, Clone, Eq, PartialEq)] 1896 }
2206 pub struct Isr(pub u32); 1897 #[doc = "Read data register not empty"]
2207 impl Isr { 1898 pub const fn rxne(&self) -> bool {
2208 #[doc = "Channel 1 Global interrupt flag"] 1899 let val = (self.0 >> 5usize) & 0x01;
2209 pub fn gif(&self, n: usize) -> bool {
2210 assert!(n < 7usize);
2211 let offs = 0usize + n * 4usize;
2212 let val = (self.0 >> offs) & 0x01;
2213 val != 0 1900 val != 0
2214 } 1901 }
2215 #[doc = "Channel 1 Global interrupt flag"] 1902 #[doc = "Read data register not empty"]
2216 pub fn set_gif(&mut self, n: usize, val: bool) { 1903 pub fn set_rxne(&mut self, val: bool) {
2217 assert!(n < 7usize); 1904 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
2218 let offs = 0usize + n * 4usize;
2219 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
2220 } 1905 }
2221 #[doc = "Channel 1 Transfer Complete flag"] 1906 #[doc = "Transmission complete"]
2222 pub fn tcif(&self, n: usize) -> bool { 1907 pub const fn tc(&self) -> bool {
2223 assert!(n < 7usize); 1908 let val = (self.0 >> 6usize) & 0x01;
2224 let offs = 1usize + n * 4usize;
2225 let val = (self.0 >> offs) & 0x01;
2226 val != 0 1909 val != 0
2227 } 1910 }
2228 #[doc = "Channel 1 Transfer Complete flag"] 1911 #[doc = "Transmission complete"]
2229 pub fn set_tcif(&mut self, n: usize, val: bool) { 1912 pub fn set_tc(&mut self, val: bool) {
2230 assert!(n < 7usize); 1913 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
2231 let offs = 1usize + n * 4usize;
2232 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
2233 } 1914 }
2234 #[doc = "Channel 1 Half Transfer Complete flag"] 1915 #[doc = "Transmit data register empty"]
2235 pub fn htif(&self, n: usize) -> bool { 1916 pub const fn txe(&self) -> bool {
2236 assert!(n < 7usize); 1917 let val = (self.0 >> 7usize) & 0x01;
2237 let offs = 2usize + n * 4usize;
2238 let val = (self.0 >> offs) & 0x01;
2239 val != 0 1918 val != 0
2240 } 1919 }
2241 #[doc = "Channel 1 Half Transfer Complete flag"] 1920 #[doc = "Transmit data register empty"]
2242 pub fn set_htif(&mut self, n: usize, val: bool) { 1921 pub fn set_txe(&mut self, val: bool) {
2243 assert!(n < 7usize); 1922 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
2244 let offs = 2usize + n * 4usize;
2245 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
2246 } 1923 }
2247 #[doc = "Channel 1 Transfer Error flag"] 1924 #[doc = "LIN break detection flag"]
2248 pub fn teif(&self, n: usize) -> bool { 1925 pub const fn lbd(&self) -> bool {
2249 assert!(n < 7usize); 1926 let val = (self.0 >> 8usize) & 0x01;
2250 let offs = 3usize + n * 4usize;
2251 let val = (self.0 >> offs) & 0x01;
2252 val != 0 1927 val != 0
2253 } 1928 }
2254 #[doc = "Channel 1 Transfer Error flag"] 1929 #[doc = "LIN break detection flag"]
2255 pub fn set_teif(&mut self, n: usize, val: bool) { 1930 pub fn set_lbd(&mut self, val: bool) {
2256 assert!(n < 7usize); 1931 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
2257 let offs = 3usize + n * 4usize; 1932 }
2258 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); 1933 #[doc = "CTS flag"]
1934 pub const fn cts(&self) -> bool {
1935 let val = (self.0 >> 9usize) & 0x01;
1936 val != 0
1937 }
1938 #[doc = "CTS flag"]
1939 pub fn set_cts(&mut self, val: bool) {
1940 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
2259 } 1941 }
2260 } 1942 }
2261 impl Default for Isr { 1943 impl Default for SrUsart {
2262 fn default() -> Isr { 1944 fn default() -> SrUsart {
2263 Isr(0) 1945 SrUsart(0)
2264 } 1946 }
2265 } 1947 }
2266 #[doc = "DMA channel configuration register (DMA_CCR)"] 1948 #[doc = "Control register 3"]
2267 #[repr(transparent)] 1949 #[repr(transparent)]
2268 #[derive(Copy, Clone, Eq, PartialEq)] 1950 #[derive(Copy, Clone, Eq, PartialEq)]
2269 pub struct Cr(pub u32); 1951 pub struct Cr3Usart(pub u32);
2270 impl Cr { 1952 impl Cr3Usart {
2271 #[doc = "Channel enable"] 1953 #[doc = "Error interrupt enable"]
2272 pub const fn en(&self) -> bool { 1954 pub const fn eie(&self) -> bool {
2273 let val = (self.0 >> 0usize) & 0x01; 1955 let val = (self.0 >> 0usize) & 0x01;
2274 val != 0 1956 val != 0
2275 } 1957 }
2276 #[doc = "Channel enable"] 1958 #[doc = "Error interrupt enable"]
2277 pub fn set_en(&mut self, val: bool) { 1959 pub fn set_eie(&mut self, val: bool) {
2278 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 1960 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
2279 } 1961 }
2280 #[doc = "Transfer complete interrupt enable"] 1962 #[doc = "IrDA mode enable"]
2281 pub const fn tcie(&self) -> bool { 1963 pub const fn iren(&self) -> bool {
2282 let val = (self.0 >> 1usize) & 0x01; 1964 let val = (self.0 >> 1usize) & 0x01;
2283 val != 0 1965 val != 0
2284 } 1966 }
2285 #[doc = "Transfer complete interrupt enable"] 1967 #[doc = "IrDA mode enable"]
2286 pub fn set_tcie(&mut self, val: bool) { 1968 pub fn set_iren(&mut self, val: bool) {
2287 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); 1969 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
2288 } 1970 }
2289 #[doc = "Half Transfer interrupt enable"] 1971 #[doc = "IrDA low-power"]
2290 pub const fn htie(&self) -> bool { 1972 pub const fn irlp(&self) -> super::vals::Irlp {
2291 let val = (self.0 >> 2usize) & 0x01; 1973 let val = (self.0 >> 2usize) & 0x01;
2292 val != 0 1974 super::vals::Irlp(val as u8)
2293 } 1975 }
2294 #[doc = "Half Transfer interrupt enable"] 1976 #[doc = "IrDA low-power"]
2295 pub fn set_htie(&mut self, val: bool) { 1977 pub fn set_irlp(&mut self, val: super::vals::Irlp) {
2296 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); 1978 self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize);
2297 } 1979 }
2298 #[doc = "Transfer error interrupt enable"] 1980 #[doc = "Half-duplex selection"]
2299 pub const fn teie(&self) -> bool { 1981 pub const fn hdsel(&self) -> super::vals::Hdsel {
2300 let val = (self.0 >> 3usize) & 0x01; 1982 let val = (self.0 >> 3usize) & 0x01;
2301 val != 0 1983 super::vals::Hdsel(val as u8)
2302 } 1984 }
2303 #[doc = "Transfer error interrupt enable"] 1985 #[doc = "Half-duplex selection"]
2304 pub fn set_teie(&mut self, val: bool) { 1986 pub fn set_hdsel(&mut self, val: super::vals::Hdsel) {
2305 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); 1987 self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize);
2306 } 1988 }
2307 #[doc = "Data transfer direction"] 1989 #[doc = "Smartcard NACK enable"]
2308 pub const fn dir(&self) -> super::vals::Dir { 1990 pub const fn nack(&self) -> bool {
2309 let val = (self.0 >> 4usize) & 0x01; 1991 let val = (self.0 >> 4usize) & 0x01;
2310 super::vals::Dir(val as u8) 1992 val != 0
2311 } 1993 }
2312 #[doc = "Data transfer direction"] 1994 #[doc = "Smartcard NACK enable"]
2313 pub fn set_dir(&mut self, val: super::vals::Dir) { 1995 pub fn set_nack(&mut self, val: bool) {
2314 self.0 = (self.0 & !(0x01 << 4usize)) | (((val.0 as u32) & 0x01) << 4usize); 1996 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
2315 } 1997 }
2316 #[doc = "Circular mode"] 1998 #[doc = "Smartcard mode enable"]
2317 pub const fn circ(&self) -> super::vals::Circ { 1999 pub const fn scen(&self) -> bool {
2318 let val = (self.0 >> 5usize) & 0x01; 2000 let val = (self.0 >> 5usize) & 0x01;
2319 super::vals::Circ(val as u8) 2001 val != 0
2320 } 2002 }
2321 #[doc = "Circular mode"] 2003 #[doc = "Smartcard mode enable"]
2322 pub fn set_circ(&mut self, val: super::vals::Circ) { 2004 pub fn set_scen(&mut self, val: bool) {
2323 self.0 = (self.0 & !(0x01 << 5usize)) | (((val.0 as u32) & 0x01) << 5usize); 2005 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
2324 } 2006 }
2325 #[doc = "Peripheral increment mode"] 2007 #[doc = "DMA enable receiver"]
2326 pub const fn pinc(&self) -> super::vals::Inc { 2008 pub const fn dmar(&self) -> bool {
2327 let val = (self.0 >> 6usize) & 0x01; 2009 let val = (self.0 >> 6usize) & 0x01;
2328 super::vals::Inc(val as u8) 2010 val != 0
2329 } 2011 }
2330 #[doc = "Peripheral increment mode"] 2012 #[doc = "DMA enable receiver"]
2331 pub fn set_pinc(&mut self, val: super::vals::Inc) { 2013 pub fn set_dmar(&mut self, val: bool) {
2332 self.0 = (self.0 & !(0x01 << 6usize)) | (((val.0 as u32) & 0x01) << 6usize); 2014 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
2333 } 2015 }
2334 #[doc = "Memory increment mode"] 2016 #[doc = "DMA enable transmitter"]
2335 pub const fn minc(&self) -> super::vals::Inc { 2017 pub const fn dmat(&self) -> bool {
2336 let val = (self.0 >> 7usize) & 0x01; 2018 let val = (self.0 >> 7usize) & 0x01;
2337 super::vals::Inc(val as u8) 2019 val != 0
2338 } 2020 }
2339 #[doc = "Memory increment mode"] 2021 #[doc = "DMA enable transmitter"]
2340 pub fn set_minc(&mut self, val: super::vals::Inc) { 2022 pub fn set_dmat(&mut self, val: bool) {
2341 self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize); 2023 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
2342 } 2024 }
2343 #[doc = "Peripheral size"] 2025 #[doc = "RTS enable"]
2344 pub const fn psize(&self) -> super::vals::Size { 2026 pub const fn rtse(&self) -> bool {
2345 let val = (self.0 >> 8usize) & 0x03; 2027 let val = (self.0 >> 8usize) & 0x01;
2346 super::vals::Size(val as u8) 2028 val != 0
2347 } 2029 }
2348 #[doc = "Peripheral size"] 2030 #[doc = "RTS enable"]
2349 pub fn set_psize(&mut self, val: super::vals::Size) { 2031 pub fn set_rtse(&mut self, val: bool) {
2350 self.0 = (self.0 & !(0x03 << 8usize)) | (((val.0 as u32) & 0x03) << 8usize); 2032 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
2351 } 2033 }
2352 #[doc = "Memory size"] 2034 #[doc = "CTS enable"]
2353 pub const fn msize(&self) -> super::vals::Size { 2035 pub const fn ctse(&self) -> bool {
2354 let val = (self.0 >> 10usize) & 0x03; 2036 let val = (self.0 >> 9usize) & 0x01;
2355 super::vals::Size(val as u8) 2037 val != 0
2356 } 2038 }
2357 #[doc = "Memory size"] 2039 #[doc = "CTS enable"]
2358 pub fn set_msize(&mut self, val: super::vals::Size) { 2040 pub fn set_ctse(&mut self, val: bool) {
2359 self.0 = (self.0 & !(0x03 << 10usize)) | (((val.0 as u32) & 0x03) << 10usize); 2041 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
2360 } 2042 }
2361 #[doc = "Channel Priority level"] 2043 #[doc = "CTS interrupt enable"]
2362 pub const fn pl(&self) -> super::vals::Pl { 2044 pub const fn ctsie(&self) -> bool {
2363 let val = (self.0 >> 12usize) & 0x03; 2045 let val = (self.0 >> 10usize) & 0x01;
2364 super::vals::Pl(val as u8) 2046 val != 0
2365 } 2047 }
2366 #[doc = "Channel Priority level"] 2048 #[doc = "CTS interrupt enable"]
2367 pub fn set_pl(&mut self, val: super::vals::Pl) { 2049 pub fn set_ctsie(&mut self, val: bool) {
2368 self.0 = (self.0 & !(0x03 << 12usize)) | (((val.0 as u32) & 0x03) << 12usize); 2050 self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize);
2369 } 2051 }
2370 #[doc = "Memory to memory mode"] 2052 }
2371 pub const fn mem2mem(&self) -> super::vals::Memmem { 2053 impl Default for Cr3Usart {
2372 let val = (self.0 >> 14usize) & 0x01; 2054 fn default() -> Cr3Usart {
2373 super::vals::Memmem(val as u8) 2055 Cr3Usart(0)
2374 } 2056 }
2375 #[doc = "Memory to memory mode"] 2057 }
2376 pub fn set_mem2mem(&mut self, val: super::vals::Memmem) { 2058 #[doc = "Data register"]
2377 self.0 = (self.0 & !(0x01 << 14usize)) | (((val.0 as u32) & 0x01) << 14usize); 2059 #[repr(transparent)]
2060 #[derive(Copy, Clone, Eq, PartialEq)]
2061 pub struct Dr(pub u32);
2062 impl Dr {
2063 #[doc = "Data value"]
2064 pub const fn dr(&self) -> u16 {
2065 let val = (self.0 >> 0usize) & 0x01ff;
2066 val as u16
2067 }
2068 #[doc = "Data value"]
2069 pub fn set_dr(&mut self, val: u16) {
2070 self.0 = (self.0 & !(0x01ff << 0usize)) | (((val as u32) & 0x01ff) << 0usize);
2378 } 2071 }
2379 } 2072 }
2380 impl Default for Cr { 2073 impl Default for Dr {
2381 fn default() -> Cr { 2074 fn default() -> Dr {
2382 Cr(0) 2075 Dr(0)
2383 } 2076 }
2384 } 2077 }
2385 } 2078 }
2386} 2079}
2387pub mod timer_v1 { 2080pub mod syscfg_f4 {
2388 use crate::generic::*; 2081 use crate::generic::*;
2389 #[doc = "Advanced-timers"] 2082 #[doc = "System configuration controller"]
2390 #[derive(Copy, Clone)] 2083 #[derive(Copy, Clone)]
2391 pub struct TimAdv(pub *mut u8); 2084 pub struct Syscfg(pub *mut u8);
2392 unsafe impl Send for TimAdv {} 2085 unsafe impl Send for Syscfg {}
2393 unsafe impl Sync for TimAdv {} 2086 unsafe impl Sync for Syscfg {}
2394 impl TimAdv { 2087 impl Syscfg {
2395 #[doc = "control register 1"] 2088 #[doc = "memory remap register"]
2396 pub fn cr1(self) -> Reg<regs::Cr1Gp, RW> { 2089 pub fn memrm(self) -> Reg<regs::Memrm, RW> {
2397 unsafe { Reg::from_ptr(self.0.add(0usize)) } 2090 unsafe { Reg::from_ptr(self.0.add(0usize)) }
2398 } 2091 }
2399 #[doc = "control register 2"] 2092 #[doc = "peripheral mode configuration register"]
2400 pub fn cr2(self) -> Reg<regs::Cr2Adv, RW> { 2093 pub fn pmc(self) -> Reg<regs::Pmc, RW> {
2401 unsafe { Reg::from_ptr(self.0.add(4usize)) } 2094 unsafe { Reg::from_ptr(self.0.add(4usize)) }
2402 } 2095 }
2403 #[doc = "slave mode control register"] 2096 #[doc = "external interrupt configuration register"]
2404 pub fn smcr(self) -> Reg<regs::Smcr, RW> { 2097 pub fn exticr(self, n: usize) -> Reg<regs::Exticr, RW> {
2405 unsafe { Reg::from_ptr(self.0.add(8usize)) } 2098 assert!(n < 4usize);
2406 } 2099 unsafe { Reg::from_ptr(self.0.add(8usize + n * 4usize)) }
2407 #[doc = "DMA/Interrupt enable register"]
2408 pub fn dier(self) -> Reg<regs::DierAdv, RW> {
2409 unsafe { Reg::from_ptr(self.0.add(12usize)) }
2410 }
2411 #[doc = "status register"]
2412 pub fn sr(self) -> Reg<regs::SrAdv, RW> {
2413 unsafe { Reg::from_ptr(self.0.add(16usize)) }
2414 }
2415 #[doc = "event generation register"]
2416 pub fn egr(self) -> Reg<regs::EgrAdv, W> {
2417 unsafe { Reg::from_ptr(self.0.add(20usize)) }
2418 }
2419 #[doc = "capture/compare mode register 1 (input mode)"]
2420 pub fn ccmr_input(self, n: usize) -> Reg<regs::CcmrInput, RW> {
2421 assert!(n < 2usize);
2422 unsafe { Reg::from_ptr(self.0.add(24usize + n * 4usize)) }
2423 }
2424 #[doc = "capture/compare mode register 1 (output mode)"]
2425 pub fn ccmr_output(self, n: usize) -> Reg<regs::CcmrOutput, RW> {
2426 assert!(n < 2usize);
2427 unsafe { Reg::from_ptr(self.0.add(24usize + n * 4usize)) }
2428 } 2100 }
2429 #[doc = "capture/compare enable register"] 2101 #[doc = "Compensation cell control register"]
2430 pub fn ccer(self) -> Reg<regs::CcerAdv, RW> { 2102 pub fn cmpcr(self) -> Reg<regs::Cmpcr, R> {
2431 unsafe { Reg::from_ptr(self.0.add(32usize)) } 2103 unsafe { Reg::from_ptr(self.0.add(32usize)) }
2432 } 2104 }
2433 #[doc = "counter"] 2105 }
2434 pub fn cnt(self) -> Reg<regs::Cnt16, RW> { 2106 pub mod regs {
2435 unsafe { Reg::from_ptr(self.0.add(36usize)) } 2107 use crate::generic::*;
2108 #[doc = "external interrupt configuration register"]
2109 #[repr(transparent)]
2110 #[derive(Copy, Clone, Eq, PartialEq)]
2111 pub struct Exticr(pub u32);
2112 impl Exticr {
2113 #[doc = "EXTI x configuration"]
2114 pub fn exti(&self, n: usize) -> u8 {
2115 assert!(n < 4usize);
2116 let offs = 0usize + n * 4usize;
2117 let val = (self.0 >> offs) & 0x0f;
2118 val as u8
2119 }
2120 #[doc = "EXTI x configuration"]
2121 pub fn set_exti(&mut self, n: usize, val: u8) {
2122 assert!(n < 4usize);
2123 let offs = 0usize + n * 4usize;
2124 self.0 = (self.0 & !(0x0f << offs)) | (((val as u32) & 0x0f) << offs);
2125 }
2436 } 2126 }
2437 #[doc = "prescaler"] 2127 impl Default for Exticr {
2438 pub fn psc(self) -> Reg<regs::Psc, RW> { 2128 fn default() -> Exticr {
2439 unsafe { Reg::from_ptr(self.0.add(40usize)) } 2129 Exticr(0)
2130 }
2440 } 2131 }
2441 #[doc = "auto-reload register"] 2132 #[doc = "peripheral mode configuration register"]
2442 pub fn arr(self) -> Reg<regs::Arr16, RW> { 2133 #[repr(transparent)]
2443 unsafe { Reg::from_ptr(self.0.add(44usize)) } 2134 #[derive(Copy, Clone, Eq, PartialEq)]
2135 pub struct Pmc(pub u32);
2136 impl Pmc {
2137 #[doc = "ADC1DC2"]
2138 pub const fn adc1dc2(&self) -> bool {
2139 let val = (self.0 >> 16usize) & 0x01;
2140 val != 0
2141 }
2142 #[doc = "ADC1DC2"]
2143 pub fn set_adc1dc2(&mut self, val: bool) {
2144 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
2145 }
2146 #[doc = "ADC2DC2"]
2147 pub const fn adc2dc2(&self) -> bool {
2148 let val = (self.0 >> 17usize) & 0x01;
2149 val != 0
2150 }
2151 #[doc = "ADC2DC2"]
2152 pub fn set_adc2dc2(&mut self, val: bool) {
2153 self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize);
2154 }
2155 #[doc = "ADC3DC2"]
2156 pub const fn adc3dc2(&self) -> bool {
2157 let val = (self.0 >> 18usize) & 0x01;
2158 val != 0
2159 }
2160 #[doc = "ADC3DC2"]
2161 pub fn set_adc3dc2(&mut self, val: bool) {
2162 self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize);
2163 }
2164 #[doc = "Ethernet PHY interface selection"]
2165 pub const fn mii_rmii_sel(&self) -> bool {
2166 let val = (self.0 >> 23usize) & 0x01;
2167 val != 0
2168 }
2169 #[doc = "Ethernet PHY interface selection"]
2170 pub fn set_mii_rmii_sel(&mut self, val: bool) {
2171 self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize);
2172 }
2444 } 2173 }
2445 #[doc = "repetition counter register"] 2174 impl Default for Pmc {
2446 pub fn rcr(self) -> Reg<regs::Rcr, RW> { 2175 fn default() -> Pmc {
2447 unsafe { Reg::from_ptr(self.0.add(48usize)) } 2176 Pmc(0)
2177 }
2448 } 2178 }
2449 #[doc = "capture/compare register"] 2179 #[doc = "Compensation cell control register"]
2450 pub fn ccr(self, n: usize) -> Reg<regs::Ccr16, RW> { 2180 #[repr(transparent)]
2451 assert!(n < 4usize); 2181 #[derive(Copy, Clone, Eq, PartialEq)]
2452 unsafe { Reg::from_ptr(self.0.add(52usize + n * 4usize)) } 2182 pub struct Cmpcr(pub u32);
2183 impl Cmpcr {
2184 #[doc = "Compensation cell power-down"]
2185 pub const fn cmp_pd(&self) -> bool {
2186 let val = (self.0 >> 0usize) & 0x01;
2187 val != 0
2188 }
2189 #[doc = "Compensation cell power-down"]
2190 pub fn set_cmp_pd(&mut self, val: bool) {
2191 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
2192 }
2193 #[doc = "READY"]
2194 pub const fn ready(&self) -> bool {
2195 let val = (self.0 >> 8usize) & 0x01;
2196 val != 0
2197 }
2198 #[doc = "READY"]
2199 pub fn set_ready(&mut self, val: bool) {
2200 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
2201 }
2453 } 2202 }
2454 #[doc = "break and dead-time register"] 2203 impl Default for Cmpcr {
2455 pub fn bdtr(self) -> Reg<regs::Bdtr, RW> { 2204 fn default() -> Cmpcr {
2456 unsafe { Reg::from_ptr(self.0.add(68usize)) } 2205 Cmpcr(0)
2206 }
2457 } 2207 }
2458 #[doc = "DMA control register"] 2208 #[doc = "memory remap register"]
2459 pub fn dcr(self) -> Reg<regs::Dcr, RW> { 2209 #[repr(transparent)]
2460 unsafe { Reg::from_ptr(self.0.add(72usize)) } 2210 #[derive(Copy, Clone, Eq, PartialEq)]
2211 pub struct Memrm(pub u32);
2212 impl Memrm {
2213 #[doc = "Memory mapping selection"]
2214 pub const fn mem_mode(&self) -> u8 {
2215 let val = (self.0 >> 0usize) & 0x07;
2216 val as u8
2217 }
2218 #[doc = "Memory mapping selection"]
2219 pub fn set_mem_mode(&mut self, val: u8) {
2220 self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize);
2221 }
2222 #[doc = "Flash bank mode selection"]
2223 pub const fn fb_mode(&self) -> bool {
2224 let val = (self.0 >> 8usize) & 0x01;
2225 val != 0
2226 }
2227 #[doc = "Flash bank mode selection"]
2228 pub fn set_fb_mode(&mut self, val: bool) {
2229 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
2230 }
2231 #[doc = "FMC memory mapping swap"]
2232 pub const fn swp_fmc(&self) -> u8 {
2233 let val = (self.0 >> 10usize) & 0x03;
2234 val as u8
2235 }
2236 #[doc = "FMC memory mapping swap"]
2237 pub fn set_swp_fmc(&mut self, val: u8) {
2238 self.0 = (self.0 & !(0x03 << 10usize)) | (((val as u32) & 0x03) << 10usize);
2239 }
2461 } 2240 }
2462 #[doc = "DMA address for full transfer"] 2241 impl Default for Memrm {
2463 pub fn dmar(self) -> Reg<regs::Dmar, RW> { 2242 fn default() -> Memrm {
2464 unsafe { Reg::from_ptr(self.0.add(76usize)) } 2243 Memrm(0)
2244 }
2465 } 2245 }
2466 } 2246 }
2247}
2248pub mod timer_v1 {
2249 use crate::generic::*;
2467 #[doc = "Basic timer"] 2250 #[doc = "Basic timer"]
2468 #[derive(Copy, Clone)] 2251 #[derive(Copy, Clone)]
2469 pub struct TimBasic(pub *mut u8); 2252 pub struct TimBasic(pub *mut u8);
@@ -2573,6 +2356,84 @@ pub mod timer_v1 {
2573 unsafe { Reg::from_ptr(self.0.add(76usize)) } 2356 unsafe { Reg::from_ptr(self.0.add(76usize)) }
2574 } 2357 }
2575 } 2358 }
2359 #[doc = "Advanced-timers"]
2360 #[derive(Copy, Clone)]
2361 pub struct TimAdv(pub *mut u8);
2362 unsafe impl Send for TimAdv {}
2363 unsafe impl Sync for TimAdv {}
2364 impl TimAdv {
2365 #[doc = "control register 1"]
2366 pub fn cr1(self) -> Reg<regs::Cr1Gp, RW> {
2367 unsafe { Reg::from_ptr(self.0.add(0usize)) }
2368 }
2369 #[doc = "control register 2"]
2370 pub fn cr2(self) -> Reg<regs::Cr2Adv, RW> {
2371 unsafe { Reg::from_ptr(self.0.add(4usize)) }
2372 }
2373 #[doc = "slave mode control register"]
2374 pub fn smcr(self) -> Reg<regs::Smcr, RW> {
2375 unsafe { Reg::from_ptr(self.0.add(8usize)) }
2376 }
2377 #[doc = "DMA/Interrupt enable register"]
2378 pub fn dier(self) -> Reg<regs::DierAdv, RW> {
2379 unsafe { Reg::from_ptr(self.0.add(12usize)) }
2380 }
2381 #[doc = "status register"]
2382 pub fn sr(self) -> Reg<regs::SrAdv, RW> {
2383 unsafe { Reg::from_ptr(self.0.add(16usize)) }
2384 }
2385 #[doc = "event generation register"]
2386 pub fn egr(self) -> Reg<regs::EgrAdv, W> {
2387 unsafe { Reg::from_ptr(self.0.add(20usize)) }
2388 }
2389 #[doc = "capture/compare mode register 1 (input mode)"]
2390 pub fn ccmr_input(self, n: usize) -> Reg<regs::CcmrInput, RW> {
2391 assert!(n < 2usize);
2392 unsafe { Reg::from_ptr(self.0.add(24usize + n * 4usize)) }
2393 }
2394 #[doc = "capture/compare mode register 1 (output mode)"]
2395 pub fn ccmr_output(self, n: usize) -> Reg<regs::CcmrOutput, RW> {
2396 assert!(n < 2usize);
2397 unsafe { Reg::from_ptr(self.0.add(24usize + n * 4usize)) }
2398 }
2399 #[doc = "capture/compare enable register"]
2400 pub fn ccer(self) -> Reg<regs::CcerAdv, RW> {
2401 unsafe { Reg::from_ptr(self.0.add(32usize)) }
2402 }
2403 #[doc = "counter"]
2404 pub fn cnt(self) -> Reg<regs::Cnt16, RW> {
2405 unsafe { Reg::from_ptr(self.0.add(36usize)) }
2406 }
2407 #[doc = "prescaler"]
2408 pub fn psc(self) -> Reg<regs::Psc, RW> {
2409 unsafe { Reg::from_ptr(self.0.add(40usize)) }
2410 }
2411 #[doc = "auto-reload register"]
2412 pub fn arr(self) -> Reg<regs::Arr16, RW> {
2413 unsafe { Reg::from_ptr(self.0.add(44usize)) }
2414 }
2415 #[doc = "repetition counter register"]
2416 pub fn rcr(self) -> Reg<regs::Rcr, RW> {
2417 unsafe { Reg::from_ptr(self.0.add(48usize)) }
2418 }
2419 #[doc = "capture/compare register"]
2420 pub fn ccr(self, n: usize) -> Reg<regs::Ccr16, RW> {
2421 assert!(n < 4usize);
2422 unsafe { Reg::from_ptr(self.0.add(52usize + n * 4usize)) }
2423 }
2424 #[doc = "break and dead-time register"]
2425 pub fn bdtr(self) -> Reg<regs::Bdtr, RW> {
2426 unsafe { Reg::from_ptr(self.0.add(68usize)) }
2427 }
2428 #[doc = "DMA control register"]
2429 pub fn dcr(self) -> Reg<regs::Dcr, RW> {
2430 unsafe { Reg::from_ptr(self.0.add(72usize)) }
2431 }
2432 #[doc = "DMA address for full transfer"]
2433 pub fn dmar(self) -> Reg<regs::Dmar, RW> {
2434 unsafe { Reg::from_ptr(self.0.add(76usize)) }
2435 }
2436 }
2576 #[doc = "General purpose 16-bit timer"] 2437 #[doc = "General purpose 16-bit timer"]
2577 #[derive(Copy, Clone)] 2438 #[derive(Copy, Clone)]
2578 pub struct TimGp16(pub *mut u8); 2439 pub struct TimGp16(pub *mut u8);
@@ -2643,26 +2504,563 @@ pub mod timer_v1 {
2643 unsafe { Reg::from_ptr(self.0.add(76usize)) } 2504 unsafe { Reg::from_ptr(self.0.add(76usize)) }
2644 } 2505 }
2645 } 2506 }
2507 pub mod vals {
2508 use crate::generic::*;
2509 #[repr(transparent)]
2510 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
2511 pub struct CcmrOutputCcs(pub u8);
2512 impl CcmrOutputCcs {
2513 #[doc = "CCx channel is configured as output"]
2514 pub const OUTPUT: Self = Self(0);
2515 }
2516 #[repr(transparent)]
2517 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
2518 pub struct Arpe(pub u8);
2519 impl Arpe {
2520 #[doc = "TIMx_APRR register is not buffered"]
2521 pub const DISABLED: Self = Self(0);
2522 #[doc = "TIMx_APRR register is buffered"]
2523 pub const ENABLED: Self = Self(0x01);
2524 }
2525 #[repr(transparent)]
2526 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
2527 pub struct Etf(pub u8);
2528 impl Etf {
2529 #[doc = "No filter, sampling is done at fDTS"]
2530 pub const NOFILTER: Self = Self(0);
2531 #[doc = "fSAMPLING=fCK_INT, N=2"]
2532 pub const FCK_INT_N2: Self = Self(0x01);
2533 #[doc = "fSAMPLING=fCK_INT, N=4"]
2534 pub const FCK_INT_N4: Self = Self(0x02);
2535 #[doc = "fSAMPLING=fCK_INT, N=8"]
2536 pub const FCK_INT_N8: Self = Self(0x03);
2537 #[doc = "fSAMPLING=fDTS/2, N=6"]
2538 pub const FDTS_DIV2_N6: Self = Self(0x04);
2539 #[doc = "fSAMPLING=fDTS/2, N=8"]
2540 pub const FDTS_DIV2_N8: Self = Self(0x05);
2541 #[doc = "fSAMPLING=fDTS/4, N=6"]
2542 pub const FDTS_DIV4_N6: Self = Self(0x06);
2543 #[doc = "fSAMPLING=fDTS/4, N=8"]
2544 pub const FDTS_DIV4_N8: Self = Self(0x07);
2545 #[doc = "fSAMPLING=fDTS/8, N=6"]
2546 pub const FDTS_DIV8_N6: Self = Self(0x08);
2547 #[doc = "fSAMPLING=fDTS/8, N=8"]
2548 pub const FDTS_DIV8_N8: Self = Self(0x09);
2549 #[doc = "fSAMPLING=fDTS/16, N=5"]
2550 pub const FDTS_DIV16_N5: Self = Self(0x0a);
2551 #[doc = "fSAMPLING=fDTS/16, N=6"]
2552 pub const FDTS_DIV16_N6: Self = Self(0x0b);
2553 #[doc = "fSAMPLING=fDTS/16, N=8"]
2554 pub const FDTS_DIV16_N8: Self = Self(0x0c);
2555 #[doc = "fSAMPLING=fDTS/32, N=5"]
2556 pub const FDTS_DIV32_N5: Self = Self(0x0d);
2557 #[doc = "fSAMPLING=fDTS/32, N=6"]
2558 pub const FDTS_DIV32_N6: Self = Self(0x0e);
2559 #[doc = "fSAMPLING=fDTS/32, N=8"]
2560 pub const FDTS_DIV32_N8: Self = Self(0x0f);
2561 }
2562 #[repr(transparent)]
2563 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
2564 pub struct Urs(pub u8);
2565 impl Urs {
2566 #[doc = "Any of counter overflow/underflow, setting UG, or update through slave mode, generates an update interrupt or DMA request"]
2567 pub const ANYEVENT: Self = Self(0);
2568 #[doc = "Only counter overflow/underflow generates an update interrupt or DMA request"]
2569 pub const COUNTERONLY: Self = Self(0x01);
2570 }
2571 #[repr(transparent)]
2572 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
2573 pub struct Ocm(pub u8);
2574 impl Ocm {
2575 #[doc = "The comparison between the output compare register TIMx_CCRy and the counter TIMx_CNT has no effect on the outputs"]
2576 pub const FROZEN: Self = Self(0);
2577 #[doc = "Set channel to active level on match. OCyREF signal is forced high when the counter matches the capture/compare register"]
2578 pub const ACTIVEONMATCH: Self = Self(0x01);
2579 #[doc = "Set channel to inactive level on match. OCyREF signal is forced low when the counter matches the capture/compare register"]
2580 pub const INACTIVEONMATCH: Self = Self(0x02);
2581 #[doc = "OCyREF toggles when TIMx_CNT=TIMx_CCRy"]
2582 pub const TOGGLE: Self = Self(0x03);
2583 #[doc = "OCyREF is forced low"]
2584 pub const FORCEINACTIVE: Self = Self(0x04);
2585 #[doc = "OCyREF is forced high"]
2586 pub const FORCEACTIVE: Self = Self(0x05);
2587 #[doc = "In upcounting, channel is active as long as TIMx_CNT<TIMx_CCRy else inactive. In downcounting, channel is inactive as long as TIMx_CNT>TIMx_CCRy else active"]
2588 pub const PWMMODE1: Self = Self(0x06);
2589 #[doc = "Inversely to PwmMode1"]
2590 pub const PWMMODE2: Self = Self(0x07);
2591 }
2592 #[repr(transparent)]
2593 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
2594 pub struct Etp(pub u8);
2595 impl Etp {
2596 #[doc = "ETR is noninverted, active at high level or rising edge"]
2597 pub const NOTINVERTED: Self = Self(0);
2598 #[doc = "ETR is inverted, active at low level or falling edge"]
2599 pub const INVERTED: Self = Self(0x01);
2600 }
2601 #[repr(transparent)]
2602 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
2603 pub struct Ossr(pub u8);
2604 impl Ossr {
2605 #[doc = "When inactive, OC/OCN outputs are disabled"]
2606 pub const DISABLED: Self = Self(0);
2607 #[doc = "When inactive, OC/OCN outputs are enabled with their inactive level"]
2608 pub const IDLELEVEL: Self = Self(0x01);
2609 }
2610 #[repr(transparent)]
2611 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
2612 pub struct Ccds(pub u8);
2613 impl Ccds {
2614 #[doc = "CCx DMA request sent when CCx event occurs"]
2615 pub const ONCOMPARE: Self = Self(0);
2616 #[doc = "CCx DMA request sent when update event occurs"]
2617 pub const ONUPDATE: Self = Self(0x01);
2618 }
2619 #[repr(transparent)]
2620 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
2621 pub struct Sms(pub u8);
2622 impl Sms {
2623 #[doc = "Slave mode disabled - if CEN = ‘1 then the prescaler is clocked directly by the internal clock."]
2624 pub const DISABLED: Self = Self(0);
2625 #[doc = "Encoder mode 1 - Counter counts up/down on TI2FP1 edge depending on TI1FP2 level."]
2626 pub const ENCODER_MODE_1: Self = Self(0x01);
2627 #[doc = "Encoder mode 2 - Counter counts up/down on TI1FP2 edge depending on TI2FP1 level."]
2628 pub const ENCODER_MODE_2: Self = Self(0x02);
2629 #[doc = "Encoder mode 3 - Counter counts up/down on both TI1FP1 and TI2FP2 edges depending on the level of the other input."]
2630 pub const ENCODER_MODE_3: Self = Self(0x03);
2631 #[doc = "Reset Mode - Rising edge of the selected trigger input (TRGI) reinitializes the counter and generates an update of the registers."]
2632 pub const RESET_MODE: Self = Self(0x04);
2633 #[doc = "Gated Mode - The counter clock is enabled when the trigger input (TRGI) is high. The counter stops (but is not reset) as soon as the trigger becomes low. Both start and stop of the counter are controlled."]
2634 pub const GATED_MODE: Self = Self(0x05);
2635 #[doc = "Trigger Mode - The counter starts at a rising edge of the trigger TRGI (but it is not reset). Only the start of the counter is controlled."]
2636 pub const TRIGGER_MODE: Self = Self(0x06);
2637 #[doc = "External Clock Mode 1 - Rising edges of the selected trigger (TRGI) clock the counter."]
2638 pub const EXT_CLOCK_MODE: Self = Self(0x07);
2639 }
2640 #[repr(transparent)]
2641 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
2642 pub struct Ts(pub u8);
2643 impl Ts {
2644 #[doc = "Internal Trigger 0 (ITR0)"]
2645 pub const ITR0: Self = Self(0);
2646 #[doc = "Internal Trigger 1 (ITR1)"]
2647 pub const ITR1: Self = Self(0x01);
2648 #[doc = "Internal Trigger 2 (ITR2)"]
2649 pub const ITR2: Self = Self(0x02);
2650 #[doc = "TI1 Edge Detector (TI1F_ED)"]
2651 pub const TI1F_ED: Self = Self(0x04);
2652 #[doc = "Filtered Timer Input 1 (TI1FP1)"]
2653 pub const TI1FP1: Self = Self(0x05);
2654 #[doc = "Filtered Timer Input 2 (TI2FP2)"]
2655 pub const TI2FP2: Self = Self(0x06);
2656 #[doc = "External Trigger input (ETRF)"]
2657 pub const ETRF: Self = Self(0x07);
2658 }
2659 #[repr(transparent)]
2660 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
2661 pub struct Ece(pub u8);
2662 impl Ece {
2663 #[doc = "External clock mode 2 disabled"]
2664 pub const DISABLED: Self = Self(0);
2665 #[doc = "External clock mode 2 enabled. The counter is clocked by any active edge on the ETRF signal."]
2666 pub const ENABLED: Self = Self(0x01);
2667 }
2668 #[repr(transparent)]
2669 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
2670 pub struct Tis(pub u8);
2671 impl Tis {
2672 #[doc = "The TIMx_CH1 pin is connected to TI1 input"]
2673 pub const NORMAL: Self = Self(0);
2674 #[doc = "The TIMx_CH1, CH2, CH3 pins are connected to TI1 input"]
2675 pub const XOR: Self = Self(0x01);
2676 }
2677 #[repr(transparent)]
2678 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
2679 pub struct Opm(pub u8);
2680 impl Opm {
2681 #[doc = "Counter is not stopped at update event"]
2682 pub const DISABLED: Self = Self(0);
2683 #[doc = "Counter stops counting at the next update event (clearing the CEN bit)"]
2684 pub const ENABLED: Self = Self(0x01);
2685 }
2686 #[repr(transparent)]
2687 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
2688 pub struct Ossi(pub u8);
2689 impl Ossi {
2690 #[doc = "When inactive, OC/OCN outputs are disabled"]
2691 pub const DISABLED: Self = Self(0);
2692 #[doc = "When inactive, OC/OCN outputs are forced to idle level"]
2693 pub const IDLELEVEL: Self = Self(0x01);
2694 }
2695 #[repr(transparent)]
2696 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
2697 pub struct Ckd(pub u8);
2698 impl Ckd {
2699 #[doc = "t_DTS = t_CK_INT"]
2700 pub const DIV1: Self = Self(0);
2701 #[doc = "t_DTS = 2 × t_CK_INT"]
2702 pub const DIV2: Self = Self(0x01);
2703 #[doc = "t_DTS = 4 × t_CK_INT"]
2704 pub const DIV4: Self = Self(0x02);
2705 }
2706 #[repr(transparent)]
2707 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
2708 pub struct Ocpe(pub u8);
2709 impl Ocpe {
2710 #[doc = "Preload register on CCR2 disabled. New values written to CCR2 are taken into account immediately"]
2711 pub const DISABLED: Self = Self(0);
2712 #[doc = "Preload register on CCR2 enabled. Preload value is loaded into active register on each update event"]
2713 pub const ENABLED: Self = Self(0x01);
2714 }
2715 #[repr(transparent)]
2716 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
2717 pub struct Cms(pub u8);
2718 impl Cms {
2719 #[doc = "The counter counts up or down depending on the direction bit"]
2720 pub const EDGEALIGNED: Self = Self(0);
2721 #[doc = "The counter counts up and down alternatively. Output compare interrupt flags are set only when the counter is counting down."]
2722 pub const CENTERALIGNED1: Self = Self(0x01);
2723 #[doc = "The counter counts up and down alternatively. Output compare interrupt flags are set only when the counter is counting up."]
2724 pub const CENTERALIGNED2: Self = Self(0x02);
2725 #[doc = "The counter counts up and down alternatively. Output compare interrupt flags are set both when the counter is counting up or down."]
2726 pub const CENTERALIGNED3: Self = Self(0x03);
2727 }
2728 #[repr(transparent)]
2729 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
2730 pub struct Dir(pub u8);
2731 impl Dir {
2732 #[doc = "Counter used as upcounter"]
2733 pub const UP: Self = Self(0);
2734 #[doc = "Counter used as downcounter"]
2735 pub const DOWN: Self = Self(0x01);
2736 }
2737 #[repr(transparent)]
2738 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
2739 pub struct Mms(pub u8);
2740 impl Mms {
2741 #[doc = "The UG bit from the TIMx_EGR register is used as trigger output"]
2742 pub const RESET: Self = Self(0);
2743 #[doc = "The counter enable signal, CNT_EN, is used as trigger output"]
2744 pub const ENABLE: Self = Self(0x01);
2745 #[doc = "The update event is selected as trigger output"]
2746 pub const UPDATE: Self = Self(0x02);
2747 #[doc = "The trigger output send a positive pulse when the CC1IF flag it to be set, as soon as a capture or a compare match occurred"]
2748 pub const COMPAREPULSE: Self = Self(0x03);
2749 #[doc = "OC1REF signal is used as trigger output"]
2750 pub const COMPAREOC1: Self = Self(0x04);
2751 #[doc = "OC2REF signal is used as trigger output"]
2752 pub const COMPAREOC2: Self = Self(0x05);
2753 #[doc = "OC3REF signal is used as trigger output"]
2754 pub const COMPAREOC3: Self = Self(0x06);
2755 #[doc = "OC4REF signal is used as trigger output"]
2756 pub const COMPAREOC4: Self = Self(0x07);
2757 }
2758 #[repr(transparent)]
2759 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
2760 pub struct Msm(pub u8);
2761 impl Msm {
2762 #[doc = "No action"]
2763 pub const NOSYNC: Self = Self(0);
2764 #[doc = "The effect of an event on the trigger input (TRGI) is delayed to allow a perfect synchronization between the current timer and its slaves (through TRGO). It is useful if we want to synchronize several timers on a single external event."]
2765 pub const SYNC: Self = Self(0x01);
2766 }
2767 #[repr(transparent)]
2768 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
2769 pub struct Etps(pub u8);
2770 impl Etps {
2771 #[doc = "Prescaler OFF"]
2772 pub const DIV1: Self = Self(0);
2773 #[doc = "ETRP frequency divided by 2"]
2774 pub const DIV2: Self = Self(0x01);
2775 #[doc = "ETRP frequency divided by 4"]
2776 pub const DIV4: Self = Self(0x02);
2777 #[doc = "ETRP frequency divided by 8"]
2778 pub const DIV8: Self = Self(0x03);
2779 }
2780 #[repr(transparent)]
2781 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
2782 pub struct CcmrInputCcs(pub u8);
2783 impl CcmrInputCcs {
2784 #[doc = "CCx channel is configured as input, normal mapping: ICx mapped to TIx"]
2785 pub const TI4: Self = Self(0x01);
2786 #[doc = "CCx channel is configured as input, alternate mapping (switches 1 with 2, 3 with 4)"]
2787 pub const TI3: Self = Self(0x02);
2788 #[doc = "CCx channel is configured as input, ICx is mapped on TRC"]
2789 pub const TRC: Self = Self(0x03);
2790 }
2791 #[repr(transparent)]
2792 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
2793 pub struct Icf(pub u8);
2794 impl Icf {
2795 #[doc = "No filter, sampling is done at fDTS"]
2796 pub const NOFILTER: Self = Self(0);
2797 #[doc = "fSAMPLING=fCK_INT, N=2"]
2798 pub const FCK_INT_N2: Self = Self(0x01);
2799 #[doc = "fSAMPLING=fCK_INT, N=4"]
2800 pub const FCK_INT_N4: Self = Self(0x02);
2801 #[doc = "fSAMPLING=fCK_INT, N=8"]
2802 pub const FCK_INT_N8: Self = Self(0x03);
2803 #[doc = "fSAMPLING=fDTS/2, N=6"]
2804 pub const FDTS_DIV2_N6: Self = Self(0x04);
2805 #[doc = "fSAMPLING=fDTS/2, N=8"]
2806 pub const FDTS_DIV2_N8: Self = Self(0x05);
2807 #[doc = "fSAMPLING=fDTS/4, N=6"]
2808 pub const FDTS_DIV4_N6: Self = Self(0x06);
2809 #[doc = "fSAMPLING=fDTS/4, N=8"]
2810 pub const FDTS_DIV4_N8: Self = Self(0x07);
2811 #[doc = "fSAMPLING=fDTS/8, N=6"]
2812 pub const FDTS_DIV8_N6: Self = Self(0x08);
2813 #[doc = "fSAMPLING=fDTS/8, N=8"]
2814 pub const FDTS_DIV8_N8: Self = Self(0x09);
2815 #[doc = "fSAMPLING=fDTS/16, N=5"]
2816 pub const FDTS_DIV16_N5: Self = Self(0x0a);
2817 #[doc = "fSAMPLING=fDTS/16, N=6"]
2818 pub const FDTS_DIV16_N6: Self = Self(0x0b);
2819 #[doc = "fSAMPLING=fDTS/16, N=8"]
2820 pub const FDTS_DIV16_N8: Self = Self(0x0c);
2821 #[doc = "fSAMPLING=fDTS/32, N=5"]
2822 pub const FDTS_DIV32_N5: Self = Self(0x0d);
2823 #[doc = "fSAMPLING=fDTS/32, N=6"]
2824 pub const FDTS_DIV32_N6: Self = Self(0x0e);
2825 #[doc = "fSAMPLING=fDTS/32, N=8"]
2826 pub const FDTS_DIV32_N8: Self = Self(0x0f);
2827 }
2828 }
2646 pub mod regs { 2829 pub mod regs {
2647 use crate::generic::*; 2830 use crate::generic::*;
2648 #[doc = "repetition counter register"] 2831 #[doc = "DMA control register"]
2649 #[repr(transparent)] 2832 #[repr(transparent)]
2650 #[derive(Copy, Clone, Eq, PartialEq)] 2833 #[derive(Copy, Clone, Eq, PartialEq)]
2651 pub struct Rcr(pub u32); 2834 pub struct Dcr(pub u32);
2652 impl Rcr { 2835 impl Dcr {
2653 #[doc = "Repetition counter value"] 2836 #[doc = "DMA base address"]
2654 pub const fn rep(&self) -> u8 { 2837 pub const fn dba(&self) -> u8 {
2655 let val = (self.0 >> 0usize) & 0xff; 2838 let val = (self.0 >> 0usize) & 0x1f;
2656 val as u8 2839 val as u8
2657 } 2840 }
2658 #[doc = "Repetition counter value"] 2841 #[doc = "DMA base address"]
2659 pub fn set_rep(&mut self, val: u8) { 2842 pub fn set_dba(&mut self, val: u8) {
2660 self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); 2843 self.0 = (self.0 & !(0x1f << 0usize)) | (((val as u32) & 0x1f) << 0usize);
2844 }
2845 #[doc = "DMA burst length"]
2846 pub const fn dbl(&self) -> u8 {
2847 let val = (self.0 >> 8usize) & 0x1f;
2848 val as u8
2849 }
2850 #[doc = "DMA burst length"]
2851 pub fn set_dbl(&mut self, val: u8) {
2852 self.0 = (self.0 & !(0x1f << 8usize)) | (((val as u32) & 0x1f) << 8usize);
2661 } 2853 }
2662 } 2854 }
2663 impl Default for Rcr { 2855 impl Default for Dcr {
2664 fn default() -> Rcr { 2856 fn default() -> Dcr {
2665 Rcr(0) 2857 Dcr(0)
2858 }
2859 }
2860 #[doc = "counter"]
2861 #[repr(transparent)]
2862 #[derive(Copy, Clone, Eq, PartialEq)]
2863 pub struct Cnt16(pub u32);
2864 impl Cnt16 {
2865 #[doc = "counter value"]
2866 pub const fn cnt(&self) -> u16 {
2867 let val = (self.0 >> 0usize) & 0xffff;
2868 val as u16
2869 }
2870 #[doc = "counter value"]
2871 pub fn set_cnt(&mut self, val: u16) {
2872 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
2873 }
2874 }
2875 impl Default for Cnt16 {
2876 fn default() -> Cnt16 {
2877 Cnt16(0)
2878 }
2879 }
2880 #[doc = "capture/compare enable register"]
2881 #[repr(transparent)]
2882 #[derive(Copy, Clone, Eq, PartialEq)]
2883 pub struct CcerAdv(pub u32);
2884 impl CcerAdv {
2885 #[doc = "Capture/Compare 1 output enable"]
2886 pub fn cce(&self, n: usize) -> bool {
2887 assert!(n < 4usize);
2888 let offs = 0usize + n * 4usize;
2889 let val = (self.0 >> offs) & 0x01;
2890 val != 0
2891 }
2892 #[doc = "Capture/Compare 1 output enable"]
2893 pub fn set_cce(&mut self, n: usize, val: bool) {
2894 assert!(n < 4usize);
2895 let offs = 0usize + n * 4usize;
2896 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
2897 }
2898 #[doc = "Capture/Compare 1 output Polarity"]
2899 pub fn ccp(&self, n: usize) -> bool {
2900 assert!(n < 4usize);
2901 let offs = 1usize + n * 4usize;
2902 let val = (self.0 >> offs) & 0x01;
2903 val != 0
2904 }
2905 #[doc = "Capture/Compare 1 output Polarity"]
2906 pub fn set_ccp(&mut self, n: usize, val: bool) {
2907 assert!(n < 4usize);
2908 let offs = 1usize + n * 4usize;
2909 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
2910 }
2911 #[doc = "Capture/Compare 1 complementary output enable"]
2912 pub fn ccne(&self, n: usize) -> bool {
2913 assert!(n < 4usize);
2914 let offs = 2usize + n * 4usize;
2915 let val = (self.0 >> offs) & 0x01;
2916 val != 0
2917 }
2918 #[doc = "Capture/Compare 1 complementary output enable"]
2919 pub fn set_ccne(&mut self, n: usize, val: bool) {
2920 assert!(n < 4usize);
2921 let offs = 2usize + n * 4usize;
2922 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
2923 }
2924 #[doc = "Capture/Compare 1 output Polarity"]
2925 pub fn ccnp(&self, n: usize) -> bool {
2926 assert!(n < 4usize);
2927 let offs = 3usize + n * 4usize;
2928 let val = (self.0 >> offs) & 0x01;
2929 val != 0
2930 }
2931 #[doc = "Capture/Compare 1 output Polarity"]
2932 pub fn set_ccnp(&mut self, n: usize, val: bool) {
2933 assert!(n < 4usize);
2934 let offs = 3usize + n * 4usize;
2935 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
2936 }
2937 }
2938 impl Default for CcerAdv {
2939 fn default() -> CcerAdv {
2940 CcerAdv(0)
2941 }
2942 }
2943 #[doc = "auto-reload register"]
2944 #[repr(transparent)]
2945 #[derive(Copy, Clone, Eq, PartialEq)]
2946 pub struct Arr16(pub u32);
2947 impl Arr16 {
2948 #[doc = "Auto-reload value"]
2949 pub const fn arr(&self) -> u16 {
2950 let val = (self.0 >> 0usize) & 0xffff;
2951 val as u16
2952 }
2953 #[doc = "Auto-reload value"]
2954 pub fn set_arr(&mut self, val: u16) {
2955 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
2956 }
2957 }
2958 impl Default for Arr16 {
2959 fn default() -> Arr16 {
2960 Arr16(0)
2961 }
2962 }
2963 #[doc = "event generation register"]
2964 #[repr(transparent)]
2965 #[derive(Copy, Clone, Eq, PartialEq)]
2966 pub struct EgrBasic(pub u32);
2967 impl EgrBasic {
2968 #[doc = "Update generation"]
2969 pub const fn ug(&self) -> bool {
2970 let val = (self.0 >> 0usize) & 0x01;
2971 val != 0
2972 }
2973 #[doc = "Update generation"]
2974 pub fn set_ug(&mut self, val: bool) {
2975 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
2976 }
2977 }
2978 impl Default for EgrBasic {
2979 fn default() -> EgrBasic {
2980 EgrBasic(0)
2981 }
2982 }
2983 #[doc = "control register 1"]
2984 #[repr(transparent)]
2985 #[derive(Copy, Clone, Eq, PartialEq)]
2986 pub struct Cr1Gp(pub u32);
2987 impl Cr1Gp {
2988 #[doc = "Counter enable"]
2989 pub const fn cen(&self) -> bool {
2990 let val = (self.0 >> 0usize) & 0x01;
2991 val != 0
2992 }
2993 #[doc = "Counter enable"]
2994 pub fn set_cen(&mut self, val: bool) {
2995 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
2996 }
2997 #[doc = "Update disable"]
2998 pub const fn udis(&self) -> bool {
2999 let val = (self.0 >> 1usize) & 0x01;
3000 val != 0
3001 }
3002 #[doc = "Update disable"]
3003 pub fn set_udis(&mut self, val: bool) {
3004 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
3005 }
3006 #[doc = "Update request source"]
3007 pub const fn urs(&self) -> super::vals::Urs {
3008 let val = (self.0 >> 2usize) & 0x01;
3009 super::vals::Urs(val as u8)
3010 }
3011 #[doc = "Update request source"]
3012 pub fn set_urs(&mut self, val: super::vals::Urs) {
3013 self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize);
3014 }
3015 #[doc = "One-pulse mode"]
3016 pub const fn opm(&self) -> super::vals::Opm {
3017 let val = (self.0 >> 3usize) & 0x01;
3018 super::vals::Opm(val as u8)
3019 }
3020 #[doc = "One-pulse mode"]
3021 pub fn set_opm(&mut self, val: super::vals::Opm) {
3022 self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize);
3023 }
3024 #[doc = "Direction"]
3025 pub const fn dir(&self) -> super::vals::Dir {
3026 let val = (self.0 >> 4usize) & 0x01;
3027 super::vals::Dir(val as u8)
3028 }
3029 #[doc = "Direction"]
3030 pub fn set_dir(&mut self, val: super::vals::Dir) {
3031 self.0 = (self.0 & !(0x01 << 4usize)) | (((val.0 as u32) & 0x01) << 4usize);
3032 }
3033 #[doc = "Center-aligned mode selection"]
3034 pub const fn cms(&self) -> super::vals::Cms {
3035 let val = (self.0 >> 5usize) & 0x03;
3036 super::vals::Cms(val as u8)
3037 }
3038 #[doc = "Center-aligned mode selection"]
3039 pub fn set_cms(&mut self, val: super::vals::Cms) {
3040 self.0 = (self.0 & !(0x03 << 5usize)) | (((val.0 as u32) & 0x03) << 5usize);
3041 }
3042 #[doc = "Auto-reload preload enable"]
3043 pub const fn arpe(&self) -> super::vals::Arpe {
3044 let val = (self.0 >> 7usize) & 0x01;
3045 super::vals::Arpe(val as u8)
3046 }
3047 #[doc = "Auto-reload preload enable"]
3048 pub fn set_arpe(&mut self, val: super::vals::Arpe) {
3049 self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize);
3050 }
3051 #[doc = "Clock division"]
3052 pub const fn ckd(&self) -> super::vals::Ckd {
3053 let val = (self.0 >> 8usize) & 0x03;
3054 super::vals::Ckd(val as u8)
3055 }
3056 #[doc = "Clock division"]
3057 pub fn set_ckd(&mut self, val: super::vals::Ckd) {
3058 self.0 = (self.0 & !(0x03 << 8usize)) | (((val.0 as u32) & 0x03) << 8usize);
3059 }
3060 }
3061 impl Default for Cr1Gp {
3062 fn default() -> Cr1Gp {
3063 Cr1Gp(0)
2666 } 3064 }
2667 } 3065 }
2668 #[doc = "counter"] 3066 #[doc = "counter"]
@@ -2686,148 +3084,104 @@ pub mod timer_v1 {
2686 Cnt32(0) 3084 Cnt32(0)
2687 } 3085 }
2688 } 3086 }
2689 #[doc = "status register"] 3087 #[doc = "event generation register"]
2690 #[repr(transparent)] 3088 #[repr(transparent)]
2691 #[derive(Copy, Clone, Eq, PartialEq)] 3089 #[derive(Copy, Clone, Eq, PartialEq)]
2692 pub struct SrGp(pub u32); 3090 pub struct EgrGp(pub u32);
2693 impl SrGp { 3091 impl EgrGp {
2694 #[doc = "Update interrupt flag"] 3092 #[doc = "Update generation"]
2695 pub const fn uif(&self) -> bool { 3093 pub const fn ug(&self) -> bool {
2696 let val = (self.0 >> 0usize) & 0x01; 3094 let val = (self.0 >> 0usize) & 0x01;
2697 val != 0 3095 val != 0
2698 } 3096 }
2699 #[doc = "Update interrupt flag"] 3097 #[doc = "Update generation"]
2700 pub fn set_uif(&mut self, val: bool) { 3098 pub fn set_ug(&mut self, val: bool) {
2701 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 3099 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
2702 } 3100 }
2703 #[doc = "Capture/compare 1 interrupt flag"] 3101 #[doc = "Capture/compare 1 generation"]
2704 pub fn ccif(&self, n: usize) -> bool { 3102 pub fn ccg(&self, n: usize) -> bool {
2705 assert!(n < 4usize); 3103 assert!(n < 4usize);
2706 let offs = 1usize + n * 1usize; 3104 let offs = 1usize + n * 1usize;
2707 let val = (self.0 >> offs) & 0x01; 3105 let val = (self.0 >> offs) & 0x01;
2708 val != 0 3106 val != 0
2709 } 3107 }
2710 #[doc = "Capture/compare 1 interrupt flag"] 3108 #[doc = "Capture/compare 1 generation"]
2711 pub fn set_ccif(&mut self, n: usize, val: bool) { 3109 pub fn set_ccg(&mut self, n: usize, val: bool) {
2712 assert!(n < 4usize); 3110 assert!(n < 4usize);
2713 let offs = 1usize + n * 1usize; 3111 let offs = 1usize + n * 1usize;
2714 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); 3112 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
2715 } 3113 }
2716 #[doc = "COM interrupt flag"] 3114 #[doc = "Capture/Compare control update generation"]
2717 pub const fn comif(&self) -> bool { 3115 pub const fn comg(&self) -> bool {
2718 let val = (self.0 >> 5usize) & 0x01; 3116 let val = (self.0 >> 5usize) & 0x01;
2719 val != 0 3117 val != 0
2720 } 3118 }
2721 #[doc = "COM interrupt flag"] 3119 #[doc = "Capture/Compare control update generation"]
2722 pub fn set_comif(&mut self, val: bool) { 3120 pub fn set_comg(&mut self, val: bool) {
2723 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); 3121 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
2724 } 3122 }
2725 #[doc = "Trigger interrupt flag"] 3123 #[doc = "Trigger generation"]
2726 pub const fn tif(&self) -> bool { 3124 pub const fn tg(&self) -> bool {
2727 let val = (self.0 >> 6usize) & 0x01; 3125 let val = (self.0 >> 6usize) & 0x01;
2728 val != 0 3126 val != 0
2729 } 3127 }
2730 #[doc = "Trigger interrupt flag"] 3128 #[doc = "Trigger generation"]
2731 pub fn set_tif(&mut self, val: bool) { 3129 pub fn set_tg(&mut self, val: bool) {
2732 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); 3130 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
2733 } 3131 }
2734 #[doc = "Break interrupt flag"] 3132 #[doc = "Break generation"]
2735 pub const fn bif(&self) -> bool { 3133 pub const fn bg(&self) -> bool {
2736 let val = (self.0 >> 7usize) & 0x01; 3134 let val = (self.0 >> 7usize) & 0x01;
2737 val != 0 3135 val != 0
2738 } 3136 }
2739 #[doc = "Break interrupt flag"] 3137 #[doc = "Break generation"]
2740 pub fn set_bif(&mut self, val: bool) { 3138 pub fn set_bg(&mut self, val: bool) {
2741 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); 3139 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
2742 } 3140 }
2743 #[doc = "Capture/Compare 1 overcapture flag"]
2744 pub fn ccof(&self, n: usize) -> bool {
2745 assert!(n < 4usize);
2746 let offs = 9usize + n * 1usize;
2747 let val = (self.0 >> offs) & 0x01;
2748 val != 0
2749 }
2750 #[doc = "Capture/Compare 1 overcapture flag"]
2751 pub fn set_ccof(&mut self, n: usize, val: bool) {
2752 assert!(n < 4usize);
2753 let offs = 9usize + n * 1usize;
2754 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
2755 }
2756 } 3141 }
2757 impl Default for SrGp { 3142 impl Default for EgrGp {
2758 fn default() -> SrGp { 3143 fn default() -> EgrGp {
2759 SrGp(0) 3144 EgrGp(0)
2760 } 3145 }
2761 } 3146 }
2762 #[doc = "capture/compare mode register 1 (input mode)"] 3147 #[doc = "status register"]
2763 #[repr(transparent)] 3148 #[repr(transparent)]
2764 #[derive(Copy, Clone, Eq, PartialEq)] 3149 #[derive(Copy, Clone, Eq, PartialEq)]
2765 pub struct CcmrInput(pub u32); 3150 pub struct SrBasic(pub u32);
2766 impl CcmrInput { 3151 impl SrBasic {
2767 #[doc = "Capture/Compare 1 selection"] 3152 #[doc = "Update interrupt flag"]
2768 pub fn ccs(&self, n: usize) -> super::vals::CcmrInputCcs { 3153 pub const fn uif(&self) -> bool {
2769 assert!(n < 2usize); 3154 let val = (self.0 >> 0usize) & 0x01;
2770 let offs = 0usize + n * 8usize; 3155 val != 0
2771 let val = (self.0 >> offs) & 0x03;
2772 super::vals::CcmrInputCcs(val as u8)
2773 }
2774 #[doc = "Capture/Compare 1 selection"]
2775 pub fn set_ccs(&mut self, n: usize, val: super::vals::CcmrInputCcs) {
2776 assert!(n < 2usize);
2777 let offs = 0usize + n * 8usize;
2778 self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs);
2779 }
2780 #[doc = "Input capture 1 prescaler"]
2781 pub fn icpsc(&self, n: usize) -> u8 {
2782 assert!(n < 2usize);
2783 let offs = 2usize + n * 8usize;
2784 let val = (self.0 >> offs) & 0x03;
2785 val as u8
2786 }
2787 #[doc = "Input capture 1 prescaler"]
2788 pub fn set_icpsc(&mut self, n: usize, val: u8) {
2789 assert!(n < 2usize);
2790 let offs = 2usize + n * 8usize;
2791 self.0 = (self.0 & !(0x03 << offs)) | (((val as u32) & 0x03) << offs);
2792 }
2793 #[doc = "Input capture 1 filter"]
2794 pub fn icf(&self, n: usize) -> super::vals::Icf {
2795 assert!(n < 2usize);
2796 let offs = 4usize + n * 8usize;
2797 let val = (self.0 >> offs) & 0x0f;
2798 super::vals::Icf(val as u8)
2799 } 3156 }
2800 #[doc = "Input capture 1 filter"] 3157 #[doc = "Update interrupt flag"]
2801 pub fn set_icf(&mut self, n: usize, val: super::vals::Icf) { 3158 pub fn set_uif(&mut self, val: bool) {
2802 assert!(n < 2usize); 3159 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
2803 let offs = 4usize + n * 8usize;
2804 self.0 = (self.0 & !(0x0f << offs)) | (((val.0 as u32) & 0x0f) << offs);
2805 } 3160 }
2806 } 3161 }
2807 impl Default for CcmrInput { 3162 impl Default for SrBasic {
2808 fn default() -> CcmrInput { 3163 fn default() -> SrBasic {
2809 CcmrInput(0) 3164 SrBasic(0)
2810 } 3165 }
2811 } 3166 }
2812 #[doc = "capture/compare register 1"] 3167 #[doc = "repetition counter register"]
2813 #[repr(transparent)] 3168 #[repr(transparent)]
2814 #[derive(Copy, Clone, Eq, PartialEq)] 3169 #[derive(Copy, Clone, Eq, PartialEq)]
2815 pub struct Ccr32(pub u32); 3170 pub struct Rcr(pub u32);
2816 impl Ccr32 { 3171 impl Rcr {
2817 #[doc = "Capture/Compare 1 value"] 3172 #[doc = "Repetition counter value"]
2818 pub const fn ccr(&self) -> u32 { 3173 pub const fn rep(&self) -> u8 {
2819 let val = (self.0 >> 0usize) & 0xffff_ffff; 3174 let val = (self.0 >> 0usize) & 0xff;
2820 val as u32 3175 val as u8
2821 } 3176 }
2822 #[doc = "Capture/Compare 1 value"] 3177 #[doc = "Repetition counter value"]
2823 pub fn set_ccr(&mut self, val: u32) { 3178 pub fn set_rep(&mut self, val: u8) {
2824 self.0 = 3179 self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize);
2825 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
2826 } 3180 }
2827 } 3181 }
2828 impl Default for Ccr32 { 3182 impl Default for Rcr {
2829 fn default() -> Ccr32 { 3183 fn default() -> Rcr {
2830 Ccr32(0) 3184 Rcr(0)
2831 } 3185 }
2832 } 3186 }
2833 #[doc = "control register 2"] 3187 #[doc = "control register 2"]
@@ -2926,6 +3280,324 @@ pub mod timer_v1 {
2926 Cr2Adv(0) 3280 Cr2Adv(0)
2927 } 3281 }
2928 } 3282 }
3283 #[doc = "control register 2"]
3284 #[repr(transparent)]
3285 #[derive(Copy, Clone, Eq, PartialEq)]
3286 pub struct Cr2Gp(pub u32);
3287 impl Cr2Gp {
3288 #[doc = "Capture/compare DMA selection"]
3289 pub const fn ccds(&self) -> super::vals::Ccds {
3290 let val = (self.0 >> 3usize) & 0x01;
3291 super::vals::Ccds(val as u8)
3292 }
3293 #[doc = "Capture/compare DMA selection"]
3294 pub fn set_ccds(&mut self, val: super::vals::Ccds) {
3295 self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize);
3296 }
3297 #[doc = "Master mode selection"]
3298 pub const fn mms(&self) -> super::vals::Mms {
3299 let val = (self.0 >> 4usize) & 0x07;
3300 super::vals::Mms(val as u8)
3301 }
3302 #[doc = "Master mode selection"]
3303 pub fn set_mms(&mut self, val: super::vals::Mms) {
3304 self.0 = (self.0 & !(0x07 << 4usize)) | (((val.0 as u32) & 0x07) << 4usize);
3305 }
3306 #[doc = "TI1 selection"]
3307 pub const fn ti1s(&self) -> super::vals::Tis {
3308 let val = (self.0 >> 7usize) & 0x01;
3309 super::vals::Tis(val as u8)
3310 }
3311 #[doc = "TI1 selection"]
3312 pub fn set_ti1s(&mut self, val: super::vals::Tis) {
3313 self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize);
3314 }
3315 }
3316 impl Default for Cr2Gp {
3317 fn default() -> Cr2Gp {
3318 Cr2Gp(0)
3319 }
3320 }
3321 #[doc = "auto-reload register"]
3322 #[repr(transparent)]
3323 #[derive(Copy, Clone, Eq, PartialEq)]
3324 pub struct Arr32(pub u32);
3325 impl Arr32 {
3326 #[doc = "Auto-reload value"]
3327 pub const fn arr(&self) -> u32 {
3328 let val = (self.0 >> 0usize) & 0xffff_ffff;
3329 val as u32
3330 }
3331 #[doc = "Auto-reload value"]
3332 pub fn set_arr(&mut self, val: u32) {
3333 self.0 =
3334 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
3335 }
3336 }
3337 impl Default for Arr32 {
3338 fn default() -> Arr32 {
3339 Arr32(0)
3340 }
3341 }
3342 #[doc = "DMA/Interrupt enable register"]
3343 #[repr(transparent)]
3344 #[derive(Copy, Clone, Eq, PartialEq)]
3345 pub struct DierBasic(pub u32);
3346 impl DierBasic {
3347 #[doc = "Update interrupt enable"]
3348 pub const fn uie(&self) -> bool {
3349 let val = (self.0 >> 0usize) & 0x01;
3350 val != 0
3351 }
3352 #[doc = "Update interrupt enable"]
3353 pub fn set_uie(&mut self, val: bool) {
3354 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
3355 }
3356 #[doc = "Update DMA request enable"]
3357 pub const fn ude(&self) -> bool {
3358 let val = (self.0 >> 8usize) & 0x01;
3359 val != 0
3360 }
3361 #[doc = "Update DMA request enable"]
3362 pub fn set_ude(&mut self, val: bool) {
3363 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
3364 }
3365 }
3366 impl Default for DierBasic {
3367 fn default() -> DierBasic {
3368 DierBasic(0)
3369 }
3370 }
3371 #[doc = "break and dead-time register"]
3372 #[repr(transparent)]
3373 #[derive(Copy, Clone, Eq, PartialEq)]
3374 pub struct Bdtr(pub u32);
3375 impl Bdtr {
3376 #[doc = "Dead-time generator setup"]
3377 pub const fn dtg(&self) -> u8 {
3378 let val = (self.0 >> 0usize) & 0xff;
3379 val as u8
3380 }
3381 #[doc = "Dead-time generator setup"]
3382 pub fn set_dtg(&mut self, val: u8) {
3383 self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize);
3384 }
3385 #[doc = "Lock configuration"]
3386 pub const fn lock(&self) -> u8 {
3387 let val = (self.0 >> 8usize) & 0x03;
3388 val as u8
3389 }
3390 #[doc = "Lock configuration"]
3391 pub fn set_lock(&mut self, val: u8) {
3392 self.0 = (self.0 & !(0x03 << 8usize)) | (((val as u32) & 0x03) << 8usize);
3393 }
3394 #[doc = "Off-state selection for Idle mode"]
3395 pub const fn ossi(&self) -> super::vals::Ossi {
3396 let val = (self.0 >> 10usize) & 0x01;
3397 super::vals::Ossi(val as u8)
3398 }
3399 #[doc = "Off-state selection for Idle mode"]
3400 pub fn set_ossi(&mut self, val: super::vals::Ossi) {
3401 self.0 = (self.0 & !(0x01 << 10usize)) | (((val.0 as u32) & 0x01) << 10usize);
3402 }
3403 #[doc = "Off-state selection for Run mode"]
3404 pub const fn ossr(&self) -> super::vals::Ossr {
3405 let val = (self.0 >> 11usize) & 0x01;
3406 super::vals::Ossr(val as u8)
3407 }
3408 #[doc = "Off-state selection for Run mode"]
3409 pub fn set_ossr(&mut self, val: super::vals::Ossr) {
3410 self.0 = (self.0 & !(0x01 << 11usize)) | (((val.0 as u32) & 0x01) << 11usize);
3411 }
3412 #[doc = "Break enable"]
3413 pub const fn bke(&self) -> bool {
3414 let val = (self.0 >> 12usize) & 0x01;
3415 val != 0
3416 }
3417 #[doc = "Break enable"]
3418 pub fn set_bke(&mut self, val: bool) {
3419 self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize);
3420 }
3421 #[doc = "Break polarity"]
3422 pub const fn bkp(&self) -> bool {
3423 let val = (self.0 >> 13usize) & 0x01;
3424 val != 0
3425 }
3426 #[doc = "Break polarity"]
3427 pub fn set_bkp(&mut self, val: bool) {
3428 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize);
3429 }
3430 #[doc = "Automatic output enable"]
3431 pub const fn aoe(&self) -> bool {
3432 let val = (self.0 >> 14usize) & 0x01;
3433 val != 0
3434 }
3435 #[doc = "Automatic output enable"]
3436 pub fn set_aoe(&mut self, val: bool) {
3437 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize);
3438 }
3439 #[doc = "Main output enable"]
3440 pub const fn moe(&self) -> bool {
3441 let val = (self.0 >> 15usize) & 0x01;
3442 val != 0
3443 }
3444 #[doc = "Main output enable"]
3445 pub fn set_moe(&mut self, val: bool) {
3446 self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize);
3447 }
3448 }
3449 impl Default for Bdtr {
3450 fn default() -> Bdtr {
3451 Bdtr(0)
3452 }
3453 }
3454 #[doc = "DMA/Interrupt enable register"]
3455 #[repr(transparent)]
3456 #[derive(Copy, Clone, Eq, PartialEq)]
3457 pub struct DierGp(pub u32);
3458 impl DierGp {
3459 #[doc = "Update interrupt enable"]
3460 pub const fn uie(&self) -> bool {
3461 let val = (self.0 >> 0usize) & 0x01;
3462 val != 0
3463 }
3464 #[doc = "Update interrupt enable"]
3465 pub fn set_uie(&mut self, val: bool) {
3466 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
3467 }
3468 #[doc = "Capture/Compare 1 interrupt enable"]
3469 pub fn ccie(&self, n: usize) -> bool {
3470 assert!(n < 4usize);
3471 let offs = 1usize + n * 1usize;
3472 let val = (self.0 >> offs) & 0x01;
3473 val != 0
3474 }
3475 #[doc = "Capture/Compare 1 interrupt enable"]
3476 pub fn set_ccie(&mut self, n: usize, val: bool) {
3477 assert!(n < 4usize);
3478 let offs = 1usize + n * 1usize;
3479 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
3480 }
3481 #[doc = "Trigger interrupt enable"]
3482 pub const fn tie(&self) -> bool {
3483 let val = (self.0 >> 6usize) & 0x01;
3484 val != 0
3485 }
3486 #[doc = "Trigger interrupt enable"]
3487 pub fn set_tie(&mut self, val: bool) {
3488 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
3489 }
3490 #[doc = "Update DMA request enable"]
3491 pub const fn ude(&self) -> bool {
3492 let val = (self.0 >> 8usize) & 0x01;
3493 val != 0
3494 }
3495 #[doc = "Update DMA request enable"]
3496 pub fn set_ude(&mut self, val: bool) {
3497 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
3498 }
3499 #[doc = "Capture/Compare 1 DMA request enable"]
3500 pub fn ccde(&self, n: usize) -> bool {
3501 assert!(n < 4usize);
3502 let offs = 9usize + n * 1usize;
3503 let val = (self.0 >> offs) & 0x01;
3504 val != 0
3505 }
3506 #[doc = "Capture/Compare 1 DMA request enable"]
3507 pub fn set_ccde(&mut self, n: usize, val: bool) {
3508 assert!(n < 4usize);
3509 let offs = 9usize + n * 1usize;
3510 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
3511 }
3512 #[doc = "Trigger DMA request enable"]
3513 pub const fn tde(&self) -> bool {
3514 let val = (self.0 >> 14usize) & 0x01;
3515 val != 0
3516 }
3517 #[doc = "Trigger DMA request enable"]
3518 pub fn set_tde(&mut self, val: bool) {
3519 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize);
3520 }
3521 }
3522 impl Default for DierGp {
3523 fn default() -> DierGp {
3524 DierGp(0)
3525 }
3526 }
3527 #[doc = "slave mode control register"]
3528 #[repr(transparent)]
3529 #[derive(Copy, Clone, Eq, PartialEq)]
3530 pub struct Smcr(pub u32);
3531 impl Smcr {
3532 #[doc = "Slave mode selection"]
3533 pub const fn sms(&self) -> super::vals::Sms {
3534 let val = (self.0 >> 0usize) & 0x07;
3535 super::vals::Sms(val as u8)
3536 }
3537 #[doc = "Slave mode selection"]
3538 pub fn set_sms(&mut self, val: super::vals::Sms) {
3539 self.0 = (self.0 & !(0x07 << 0usize)) | (((val.0 as u32) & 0x07) << 0usize);
3540 }
3541 #[doc = "Trigger selection"]
3542 pub const fn ts(&self) -> super::vals::Ts {
3543 let val = (self.0 >> 4usize) & 0x07;
3544 super::vals::Ts(val as u8)
3545 }
3546 #[doc = "Trigger selection"]
3547 pub fn set_ts(&mut self, val: super::vals::Ts) {
3548 self.0 = (self.0 & !(0x07 << 4usize)) | (((val.0 as u32) & 0x07) << 4usize);
3549 }
3550 #[doc = "Master/Slave mode"]
3551 pub const fn msm(&self) -> super::vals::Msm {
3552 let val = (self.0 >> 7usize) & 0x01;
3553 super::vals::Msm(val as u8)
3554 }
3555 #[doc = "Master/Slave mode"]
3556 pub fn set_msm(&mut self, val: super::vals::Msm) {
3557 self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize);
3558 }
3559 #[doc = "External trigger filter"]
3560 pub const fn etf(&self) -> super::vals::Etf {
3561 let val = (self.0 >> 8usize) & 0x0f;
3562 super::vals::Etf(val as u8)
3563 }
3564 #[doc = "External trigger filter"]
3565 pub fn set_etf(&mut self, val: super::vals::Etf) {
3566 self.0 = (self.0 & !(0x0f << 8usize)) | (((val.0 as u32) & 0x0f) << 8usize);
3567 }
3568 #[doc = "External trigger prescaler"]
3569 pub const fn etps(&self) -> super::vals::Etps {
3570 let val = (self.0 >> 12usize) & 0x03;
3571 super::vals::Etps(val as u8)
3572 }
3573 #[doc = "External trigger prescaler"]
3574 pub fn set_etps(&mut self, val: super::vals::Etps) {
3575 self.0 = (self.0 & !(0x03 << 12usize)) | (((val.0 as u32) & 0x03) << 12usize);
3576 }
3577 #[doc = "External clock enable"]
3578 pub const fn ece(&self) -> super::vals::Ece {
3579 let val = (self.0 >> 14usize) & 0x01;
3580 super::vals::Ece(val as u8)
3581 }
3582 #[doc = "External clock enable"]
3583 pub fn set_ece(&mut self, val: super::vals::Ece) {
3584 self.0 = (self.0 & !(0x01 << 14usize)) | (((val.0 as u32) & 0x01) << 14usize);
3585 }
3586 #[doc = "External trigger polarity"]
3587 pub const fn etp(&self) -> super::vals::Etp {
3588 let val = (self.0 >> 15usize) & 0x01;
3589 super::vals::Etp(val as u8)
3590 }
3591 #[doc = "External trigger polarity"]
3592 pub fn set_etp(&mut self, val: super::vals::Etp) {
3593 self.0 = (self.0 & !(0x01 << 15usize)) | (((val.0 as u32) & 0x01) << 15usize);
3594 }
3595 }
3596 impl Default for Smcr {
3597 fn default() -> Smcr {
3598 Smcr(0)
3599 }
3600 }
2929 #[doc = "DMA/Interrupt enable register"] 3601 #[doc = "DMA/Interrupt enable register"]
2930 #[repr(transparent)] 3602 #[repr(transparent)]
2931 #[derive(Copy, Clone, Eq, PartialEq)] 3603 #[derive(Copy, Clone, Eq, PartialEq)]
@@ -3026,189 +3698,147 @@ pub mod timer_v1 {
3026 DierAdv(0) 3698 DierAdv(0)
3027 } 3699 }
3028 } 3700 }
3029 #[doc = "capture/compare enable register"] 3701 #[doc = "status register"]
3030 #[repr(transparent)] 3702 #[repr(transparent)]
3031 #[derive(Copy, Clone, Eq, PartialEq)] 3703 #[derive(Copy, Clone, Eq, PartialEq)]
3032 pub struct CcerAdv(pub u32); 3704 pub struct SrAdv(pub u32);
3033 impl CcerAdv { 3705 impl SrAdv {
3034 #[doc = "Capture/Compare 1 output enable"] 3706 #[doc = "Update interrupt flag"]
3035 pub fn cce(&self, n: usize) -> bool { 3707 pub const fn uif(&self) -> bool {
3036 assert!(n < 4usize); 3708 let val = (self.0 >> 0usize) & 0x01;
3037 let offs = 0usize + n * 4usize;
3038 let val = (self.0 >> offs) & 0x01;
3039 val != 0 3709 val != 0
3040 } 3710 }
3041 #[doc = "Capture/Compare 1 output enable"] 3711 #[doc = "Update interrupt flag"]
3042 pub fn set_cce(&mut self, n: usize, val: bool) { 3712 pub fn set_uif(&mut self, val: bool) {
3043 assert!(n < 4usize); 3713 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
3044 let offs = 0usize + n * 4usize;
3045 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
3046 } 3714 }
3047 #[doc = "Capture/Compare 1 output Polarity"] 3715 #[doc = "Capture/compare 1 interrupt flag"]
3048 pub fn ccp(&self, n: usize) -> bool { 3716 pub fn ccif(&self, n: usize) -> bool {
3049 assert!(n < 4usize); 3717 assert!(n < 4usize);
3050 let offs = 1usize + n * 4usize; 3718 let offs = 1usize + n * 1usize;
3051 let val = (self.0 >> offs) & 0x01; 3719 let val = (self.0 >> offs) & 0x01;
3052 val != 0 3720 val != 0
3053 } 3721 }
3054 #[doc = "Capture/Compare 1 output Polarity"] 3722 #[doc = "Capture/compare 1 interrupt flag"]
3055 pub fn set_ccp(&mut self, n: usize, val: bool) { 3723 pub fn set_ccif(&mut self, n: usize, val: bool) {
3056 assert!(n < 4usize); 3724 assert!(n < 4usize);
3057 let offs = 1usize + n * 4usize; 3725 let offs = 1usize + n * 1usize;
3058 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); 3726 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
3059 } 3727 }
3060 #[doc = "Capture/Compare 1 complementary output enable"] 3728 #[doc = "COM interrupt flag"]
3061 pub fn ccne(&self, n: usize) -> bool { 3729 pub const fn comif(&self) -> bool {
3062 assert!(n < 4usize); 3730 let val = (self.0 >> 5usize) & 0x01;
3063 let offs = 2usize + n * 4usize;
3064 let val = (self.0 >> offs) & 0x01;
3065 val != 0 3731 val != 0
3066 } 3732 }
3067 #[doc = "Capture/Compare 1 complementary output enable"] 3733 #[doc = "COM interrupt flag"]
3068 pub fn set_ccne(&mut self, n: usize, val: bool) { 3734 pub fn set_comif(&mut self, val: bool) {
3069 assert!(n < 4usize); 3735 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
3070 let offs = 2usize + n * 4usize;
3071 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
3072 } 3736 }
3073 #[doc = "Capture/Compare 1 output Polarity"] 3737 #[doc = "Trigger interrupt flag"]
3074 pub fn ccnp(&self, n: usize) -> bool { 3738 pub const fn tif(&self) -> bool {
3075 assert!(n < 4usize); 3739 let val = (self.0 >> 6usize) & 0x01;
3076 let offs = 3usize + n * 4usize;
3077 let val = (self.0 >> offs) & 0x01;
3078 val != 0 3740 val != 0
3079 } 3741 }
3080 #[doc = "Capture/Compare 1 output Polarity"] 3742 #[doc = "Trigger interrupt flag"]
3081 pub fn set_ccnp(&mut self, n: usize, val: bool) { 3743 pub fn set_tif(&mut self, val: bool) {
3082 assert!(n < 4usize); 3744 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
3083 let offs = 3usize + n * 4usize;
3084 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
3085 }
3086 }
3087 impl Default for CcerAdv {
3088 fn default() -> CcerAdv {
3089 CcerAdv(0)
3090 } 3745 }
3091 } 3746 #[doc = "Break interrupt flag"]
3092 #[doc = "DMA/Interrupt enable register"] 3747 pub const fn bif(&self) -> bool {
3093 #[repr(transparent)] 3748 let val = (self.0 >> 7usize) & 0x01;
3094 #[derive(Copy, Clone, Eq, PartialEq)]
3095 pub struct DierBasic(pub u32);
3096 impl DierBasic {
3097 #[doc = "Update interrupt enable"]
3098 pub const fn uie(&self) -> bool {
3099 let val = (self.0 >> 0usize) & 0x01;
3100 val != 0 3749 val != 0
3101 } 3750 }
3102 #[doc = "Update interrupt enable"] 3751 #[doc = "Break interrupt flag"]
3103 pub fn set_uie(&mut self, val: bool) { 3752 pub fn set_bif(&mut self, val: bool) {
3104 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 3753 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
3105 } 3754 }
3106 #[doc = "Update DMA request enable"] 3755 #[doc = "Capture/Compare 1 overcapture flag"]
3107 pub const fn ude(&self) -> bool { 3756 pub fn ccof(&self, n: usize) -> bool {
3108 let val = (self.0 >> 8usize) & 0x01; 3757 assert!(n < 4usize);
3758 let offs = 9usize + n * 1usize;
3759 let val = (self.0 >> offs) & 0x01;
3109 val != 0 3760 val != 0
3110 } 3761 }
3111 #[doc = "Update DMA request enable"] 3762 #[doc = "Capture/Compare 1 overcapture flag"]
3112 pub fn set_ude(&mut self, val: bool) { 3763 pub fn set_ccof(&mut self, n: usize, val: bool) {
3113 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); 3764 assert!(n < 4usize);
3765 let offs = 9usize + n * 1usize;
3766 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
3114 } 3767 }
3115 } 3768 }
3116 impl Default for DierBasic { 3769 impl Default for SrAdv {
3117 fn default() -> DierBasic { 3770 fn default() -> SrAdv {
3118 DierBasic(0) 3771 SrAdv(0)
3119 } 3772 }
3120 } 3773 }
3121 #[doc = "DMA address for full transfer"] 3774 #[doc = "prescaler"]
3122 #[repr(transparent)] 3775 #[repr(transparent)]
3123 #[derive(Copy, Clone, Eq, PartialEq)] 3776 #[derive(Copy, Clone, Eq, PartialEq)]
3124 pub struct Dmar(pub u32); 3777 pub struct Psc(pub u32);
3125 impl Dmar { 3778 impl Psc {
3126 #[doc = "DMA register for burst accesses"] 3779 #[doc = "Prescaler value"]
3127 pub const fn dmab(&self) -> u16 { 3780 pub const fn psc(&self) -> u16 {
3128 let val = (self.0 >> 0usize) & 0xffff; 3781 let val = (self.0 >> 0usize) & 0xffff;
3129 val as u16 3782 val as u16
3130 } 3783 }
3131 #[doc = "DMA register for burst accesses"] 3784 #[doc = "Prescaler value"]
3132 pub fn set_dmab(&mut self, val: u16) { 3785 pub fn set_psc(&mut self, val: u16) {
3133 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); 3786 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
3134 } 3787 }
3135 } 3788 }
3136 impl Default for Dmar { 3789 impl Default for Psc {
3137 fn default() -> Dmar { 3790 fn default() -> Psc {
3138 Dmar(0) 3791 Psc(0)
3139 } 3792 }
3140 } 3793 }
3141 #[doc = "DMA/Interrupt enable register"] 3794 #[doc = "capture/compare enable register"]
3142 #[repr(transparent)] 3795 #[repr(transparent)]
3143 #[derive(Copy, Clone, Eq, PartialEq)] 3796 #[derive(Copy, Clone, Eq, PartialEq)]
3144 pub struct DierGp(pub u32); 3797 pub struct CcerGp(pub u32);
3145 impl DierGp { 3798 impl CcerGp {
3146 #[doc = "Update interrupt enable"] 3799 #[doc = "Capture/Compare 1 output enable"]
3147 pub const fn uie(&self) -> bool { 3800 pub fn cce(&self, n: usize) -> bool {
3148 let val = (self.0 >> 0usize) & 0x01;
3149 val != 0
3150 }
3151 #[doc = "Update interrupt enable"]
3152 pub fn set_uie(&mut self, val: bool) {
3153 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
3154 }
3155 #[doc = "Capture/Compare 1 interrupt enable"]
3156 pub fn ccie(&self, n: usize) -> bool {
3157 assert!(n < 4usize); 3801 assert!(n < 4usize);
3158 let offs = 1usize + n * 1usize; 3802 let offs = 0usize + n * 4usize;
3159 let val = (self.0 >> offs) & 0x01; 3803 let val = (self.0 >> offs) & 0x01;
3160 val != 0 3804 val != 0
3161 } 3805 }
3162 #[doc = "Capture/Compare 1 interrupt enable"] 3806 #[doc = "Capture/Compare 1 output enable"]
3163 pub fn set_ccie(&mut self, n: usize, val: bool) { 3807 pub fn set_cce(&mut self, n: usize, val: bool) {
3164 assert!(n < 4usize); 3808 assert!(n < 4usize);
3165 let offs = 1usize + n * 1usize; 3809 let offs = 0usize + n * 4usize;
3166 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); 3810 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
3167 } 3811 }
3168 #[doc = "Trigger interrupt enable"] 3812 #[doc = "Capture/Compare 1 output Polarity"]
3169 pub const fn tie(&self) -> bool { 3813 pub fn ccp(&self, n: usize) -> bool {
3170 let val = (self.0 >> 6usize) & 0x01;
3171 val != 0
3172 }
3173 #[doc = "Trigger interrupt enable"]
3174 pub fn set_tie(&mut self, val: bool) {
3175 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
3176 }
3177 #[doc = "Update DMA request enable"]
3178 pub const fn ude(&self) -> bool {
3179 let val = (self.0 >> 8usize) & 0x01;
3180 val != 0
3181 }
3182 #[doc = "Update DMA request enable"]
3183 pub fn set_ude(&mut self, val: bool) {
3184 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
3185 }
3186 #[doc = "Capture/Compare 1 DMA request enable"]
3187 pub fn ccde(&self, n: usize) -> bool {
3188 assert!(n < 4usize); 3814 assert!(n < 4usize);
3189 let offs = 9usize + n * 1usize; 3815 let offs = 1usize + n * 4usize;
3190 let val = (self.0 >> offs) & 0x01; 3816 let val = (self.0 >> offs) & 0x01;
3191 val != 0 3817 val != 0
3192 } 3818 }
3193 #[doc = "Capture/Compare 1 DMA request enable"] 3819 #[doc = "Capture/Compare 1 output Polarity"]
3194 pub fn set_ccde(&mut self, n: usize, val: bool) { 3820 pub fn set_ccp(&mut self, n: usize, val: bool) {
3195 assert!(n < 4usize); 3821 assert!(n < 4usize);
3196 let offs = 9usize + n * 1usize; 3822 let offs = 1usize + n * 4usize;
3197 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); 3823 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
3198 } 3824 }
3199 #[doc = "Trigger DMA request enable"] 3825 #[doc = "Capture/Compare 1 output Polarity"]
3200 pub const fn tde(&self) -> bool { 3826 pub fn ccnp(&self, n: usize) -> bool {
3201 let val = (self.0 >> 14usize) & 0x01; 3827 assert!(n < 4usize);
3828 let offs = 3usize + n * 4usize;
3829 let val = (self.0 >> offs) & 0x01;
3202 val != 0 3830 val != 0
3203 } 3831 }
3204 #[doc = "Trigger DMA request enable"] 3832 #[doc = "Capture/Compare 1 output Polarity"]
3205 pub fn set_tde(&mut self, val: bool) { 3833 pub fn set_ccnp(&mut self, n: usize, val: bool) {
3206 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); 3834 assert!(n < 4usize);
3835 let offs = 3usize + n * 4usize;
3836 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
3207 } 3837 }
3208 } 3838 }
3209 impl Default for DierGp { 3839 impl Default for CcerGp {
3210 fn default() -> DierGp { 3840 fn default() -> CcerGp {
3211 DierGp(0) 3841 CcerGp(0)
3212 } 3842 }
3213 } 3843 }
3214 #[doc = "capture/compare mode register 2 (output mode)"] 3844 #[doc = "capture/compare mode register 2 (output mode)"]
@@ -3287,271 +3917,174 @@ pub mod timer_v1 {
3287 CcmrOutput(0) 3917 CcmrOutput(0)
3288 } 3918 }
3289 } 3919 }
3290 #[doc = "counter"] 3920 #[doc = "control register 2"]
3291 #[repr(transparent)]
3292 #[derive(Copy, Clone, Eq, PartialEq)]
3293 pub struct Cnt16(pub u32);
3294 impl Cnt16 {
3295 #[doc = "counter value"]
3296 pub const fn cnt(&self) -> u16 {
3297 let val = (self.0 >> 0usize) & 0xffff;
3298 val as u16
3299 }
3300 #[doc = "counter value"]
3301 pub fn set_cnt(&mut self, val: u16) {
3302 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
3303 }
3304 }
3305 impl Default for Cnt16 {
3306 fn default() -> Cnt16 {
3307 Cnt16(0)
3308 }
3309 }
3310 #[doc = "control register 1"]
3311 #[repr(transparent)] 3921 #[repr(transparent)]
3312 #[derive(Copy, Clone, Eq, PartialEq)] 3922 #[derive(Copy, Clone, Eq, PartialEq)]
3313 pub struct Cr1Gp(pub u32); 3923 pub struct Cr2Basic(pub u32);
3314 impl Cr1Gp { 3924 impl Cr2Basic {
3315 #[doc = "Counter enable"] 3925 #[doc = "Master mode selection"]
3316 pub const fn cen(&self) -> bool { 3926 pub const fn mms(&self) -> super::vals::Mms {
3317 let val = (self.0 >> 0usize) & 0x01; 3927 let val = (self.0 >> 4usize) & 0x07;
3318 val != 0 3928 super::vals::Mms(val as u8)
3319 }
3320 #[doc = "Counter enable"]
3321 pub fn set_cen(&mut self, val: bool) {
3322 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
3323 }
3324 #[doc = "Update disable"]
3325 pub const fn udis(&self) -> bool {
3326 let val = (self.0 >> 1usize) & 0x01;
3327 val != 0
3328 }
3329 #[doc = "Update disable"]
3330 pub fn set_udis(&mut self, val: bool) {
3331 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
3332 }
3333 #[doc = "Update request source"]
3334 pub const fn urs(&self) -> super::vals::Urs {
3335 let val = (self.0 >> 2usize) & 0x01;
3336 super::vals::Urs(val as u8)
3337 }
3338 #[doc = "Update request source"]
3339 pub fn set_urs(&mut self, val: super::vals::Urs) {
3340 self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize);
3341 }
3342 #[doc = "One-pulse mode"]
3343 pub const fn opm(&self) -> super::vals::Opm {
3344 let val = (self.0 >> 3usize) & 0x01;
3345 super::vals::Opm(val as u8)
3346 }
3347 #[doc = "One-pulse mode"]
3348 pub fn set_opm(&mut self, val: super::vals::Opm) {
3349 self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize);
3350 }
3351 #[doc = "Direction"]
3352 pub const fn dir(&self) -> super::vals::Dir {
3353 let val = (self.0 >> 4usize) & 0x01;
3354 super::vals::Dir(val as u8)
3355 }
3356 #[doc = "Direction"]
3357 pub fn set_dir(&mut self, val: super::vals::Dir) {
3358 self.0 = (self.0 & !(0x01 << 4usize)) | (((val.0 as u32) & 0x01) << 4usize);
3359 }
3360 #[doc = "Center-aligned mode selection"]
3361 pub const fn cms(&self) -> super::vals::Cms {
3362 let val = (self.0 >> 5usize) & 0x03;
3363 super::vals::Cms(val as u8)
3364 }
3365 #[doc = "Center-aligned mode selection"]
3366 pub fn set_cms(&mut self, val: super::vals::Cms) {
3367 self.0 = (self.0 & !(0x03 << 5usize)) | (((val.0 as u32) & 0x03) << 5usize);
3368 }
3369 #[doc = "Auto-reload preload enable"]
3370 pub const fn arpe(&self) -> super::vals::Arpe {
3371 let val = (self.0 >> 7usize) & 0x01;
3372 super::vals::Arpe(val as u8)
3373 }
3374 #[doc = "Auto-reload preload enable"]
3375 pub fn set_arpe(&mut self, val: super::vals::Arpe) {
3376 self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize);
3377 }
3378 #[doc = "Clock division"]
3379 pub const fn ckd(&self) -> super::vals::Ckd {
3380 let val = (self.0 >> 8usize) & 0x03;
3381 super::vals::Ckd(val as u8)
3382 } 3929 }
3383 #[doc = "Clock division"] 3930 #[doc = "Master mode selection"]
3384 pub fn set_ckd(&mut self, val: super::vals::Ckd) { 3931 pub fn set_mms(&mut self, val: super::vals::Mms) {
3385 self.0 = (self.0 & !(0x03 << 8usize)) | (((val.0 as u32) & 0x03) << 8usize); 3932 self.0 = (self.0 & !(0x07 << 4usize)) | (((val.0 as u32) & 0x07) << 4usize);
3386 } 3933 }
3387 } 3934 }
3388 impl Default for Cr1Gp { 3935 impl Default for Cr2Basic {
3389 fn default() -> Cr1Gp { 3936 fn default() -> Cr2Basic {
3390 Cr1Gp(0) 3937 Cr2Basic(0)
3391 } 3938 }
3392 } 3939 }
3393 #[doc = "auto-reload register"] 3940 #[doc = "DMA address for full transfer"]
3394 #[repr(transparent)] 3941 #[repr(transparent)]
3395 #[derive(Copy, Clone, Eq, PartialEq)] 3942 #[derive(Copy, Clone, Eq, PartialEq)]
3396 pub struct Arr32(pub u32); 3943 pub struct Dmar(pub u32);
3397 impl Arr32 { 3944 impl Dmar {
3398 #[doc = "Auto-reload value"] 3945 #[doc = "DMA register for burst accesses"]
3399 pub const fn arr(&self) -> u32 { 3946 pub const fn dmab(&self) -> u16 {
3400 let val = (self.0 >> 0usize) & 0xffff_ffff; 3947 let val = (self.0 >> 0usize) & 0xffff;
3401 val as u32 3948 val as u16
3402 } 3949 }
3403 #[doc = "Auto-reload value"] 3950 #[doc = "DMA register for burst accesses"]
3404 pub fn set_arr(&mut self, val: u32) { 3951 pub fn set_dmab(&mut self, val: u16) {
3405 self.0 = 3952 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
3406 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
3407 } 3953 }
3408 } 3954 }
3409 impl Default for Arr32 { 3955 impl Default for Dmar {
3410 fn default() -> Arr32 { 3956 fn default() -> Dmar {
3411 Arr32(0) 3957 Dmar(0)
3412 } 3958 }
3413 } 3959 }
3414 #[doc = "auto-reload register"] 3960 #[doc = "capture/compare register 1"]
3415 #[repr(transparent)] 3961 #[repr(transparent)]
3416 #[derive(Copy, Clone, Eq, PartialEq)] 3962 #[derive(Copy, Clone, Eq, PartialEq)]
3417 pub struct Arr16(pub u32); 3963 pub struct Ccr16(pub u32);
3418 impl Arr16 { 3964 impl Ccr16 {
3419 #[doc = "Auto-reload value"] 3965 #[doc = "Capture/Compare 1 value"]
3420 pub const fn arr(&self) -> u16 { 3966 pub const fn ccr(&self) -> u16 {
3421 let val = (self.0 >> 0usize) & 0xffff; 3967 let val = (self.0 >> 0usize) & 0xffff;
3422 val as u16 3968 val as u16
3423 } 3969 }
3424 #[doc = "Auto-reload value"] 3970 #[doc = "Capture/Compare 1 value"]
3425 pub fn set_arr(&mut self, val: u16) { 3971 pub fn set_ccr(&mut self, val: u16) {
3426 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); 3972 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
3427 } 3973 }
3428 } 3974 }
3429 impl Default for Arr16 { 3975 impl Default for Ccr16 {
3430 fn default() -> Arr16 { 3976 fn default() -> Ccr16 {
3431 Arr16(0) 3977 Ccr16(0)
3432 } 3978 }
3433 } 3979 }
3434 #[doc = "break and dead-time register"] 3980 #[doc = "capture/compare mode register 1 (input mode)"]
3435 #[repr(transparent)] 3981 #[repr(transparent)]
3436 #[derive(Copy, Clone, Eq, PartialEq)] 3982 #[derive(Copy, Clone, Eq, PartialEq)]
3437 pub struct Bdtr(pub u32); 3983 pub struct CcmrInput(pub u32);
3438 impl Bdtr { 3984 impl CcmrInput {
3439 #[doc = "Dead-time generator setup"] 3985 #[doc = "Capture/Compare 1 selection"]
3440 pub const fn dtg(&self) -> u8 { 3986 pub fn ccs(&self, n: usize) -> super::vals::CcmrInputCcs {
3441 let val = (self.0 >> 0usize) & 0xff; 3987 assert!(n < 2usize);
3442 val as u8 3988 let offs = 0usize + n * 8usize;
3989 let val = (self.0 >> offs) & 0x03;
3990 super::vals::CcmrInputCcs(val as u8)
3443 } 3991 }
3444 #[doc = "Dead-time generator setup"] 3992 #[doc = "Capture/Compare 1 selection"]
3445 pub fn set_dtg(&mut self, val: u8) { 3993 pub fn set_ccs(&mut self, n: usize, val: super::vals::CcmrInputCcs) {
3446 self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); 3994 assert!(n < 2usize);
3995 let offs = 0usize + n * 8usize;
3996 self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs);
3447 } 3997 }
3448 #[doc = "Lock configuration"] 3998 #[doc = "Input capture 1 prescaler"]
3449 pub const fn lock(&self) -> u8 { 3999 pub fn icpsc(&self, n: usize) -> u8 {
3450 let val = (self.0 >> 8usize) & 0x03; 4000 assert!(n < 2usize);
4001 let offs = 2usize + n * 8usize;
4002 let val = (self.0 >> offs) & 0x03;
3451 val as u8 4003 val as u8
3452 } 4004 }
3453 #[doc = "Lock configuration"] 4005 #[doc = "Input capture 1 prescaler"]
3454 pub fn set_lock(&mut self, val: u8) { 4006 pub fn set_icpsc(&mut self, n: usize, val: u8) {
3455 self.0 = (self.0 & !(0x03 << 8usize)) | (((val as u32) & 0x03) << 8usize); 4007 assert!(n < 2usize);
3456 } 4008 let offs = 2usize + n * 8usize;
3457 #[doc = "Off-state selection for Idle mode"] 4009 self.0 = (self.0 & !(0x03 << offs)) | (((val as u32) & 0x03) << offs);
3458 pub const fn ossi(&self) -> super::vals::Ossi {
3459 let val = (self.0 >> 10usize) & 0x01;
3460 super::vals::Ossi(val as u8)
3461 } 4010 }
3462 #[doc = "Off-state selection for Idle mode"] 4011 #[doc = "Input capture 1 filter"]
3463 pub fn set_ossi(&mut self, val: super::vals::Ossi) { 4012 pub fn icf(&self, n: usize) -> super::vals::Icf {
3464 self.0 = (self.0 & !(0x01 << 10usize)) | (((val.0 as u32) & 0x01) << 10usize); 4013 assert!(n < 2usize);
4014 let offs = 4usize + n * 8usize;
4015 let val = (self.0 >> offs) & 0x0f;
4016 super::vals::Icf(val as u8)
3465 } 4017 }
3466 #[doc = "Off-state selection for Run mode"] 4018 #[doc = "Input capture 1 filter"]
3467 pub const fn ossr(&self) -> super::vals::Ossr { 4019 pub fn set_icf(&mut self, n: usize, val: super::vals::Icf) {
3468 let val = (self.0 >> 11usize) & 0x01; 4020 assert!(n < 2usize);
3469 super::vals::Ossr(val as u8) 4021 let offs = 4usize + n * 8usize;
4022 self.0 = (self.0 & !(0x0f << offs)) | (((val.0 as u32) & 0x0f) << offs);
3470 } 4023 }
3471 #[doc = "Off-state selection for Run mode"] 4024 }
3472 pub fn set_ossr(&mut self, val: super::vals::Ossr) { 4025 impl Default for CcmrInput {
3473 self.0 = (self.0 & !(0x01 << 11usize)) | (((val.0 as u32) & 0x01) << 11usize); 4026 fn default() -> CcmrInput {
4027 CcmrInput(0)
3474 } 4028 }
3475 #[doc = "Break enable"] 4029 }
3476 pub const fn bke(&self) -> bool { 4030 #[doc = "event generation register"]
3477 let val = (self.0 >> 12usize) & 0x01; 4031 #[repr(transparent)]
4032 #[derive(Copy, Clone, Eq, PartialEq)]
4033 pub struct EgrAdv(pub u32);
4034 impl EgrAdv {
4035 #[doc = "Update generation"]
4036 pub const fn ug(&self) -> bool {
4037 let val = (self.0 >> 0usize) & 0x01;
3478 val != 0 4038 val != 0
3479 } 4039 }
3480 #[doc = "Break enable"] 4040 #[doc = "Update generation"]
3481 pub fn set_bke(&mut self, val: bool) { 4041 pub fn set_ug(&mut self, val: bool) {
3482 self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); 4042 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
3483 } 4043 }
3484 #[doc = "Break polarity"] 4044 #[doc = "Capture/compare 1 generation"]
3485 pub const fn bkp(&self) -> bool { 4045 pub fn ccg(&self, n: usize) -> bool {
3486 let val = (self.0 >> 13usize) & 0x01; 4046 assert!(n < 4usize);
4047 let offs = 1usize + n * 1usize;
4048 let val = (self.0 >> offs) & 0x01;
3487 val != 0 4049 val != 0
3488 } 4050 }
3489 #[doc = "Break polarity"] 4051 #[doc = "Capture/compare 1 generation"]
3490 pub fn set_bkp(&mut self, val: bool) { 4052 pub fn set_ccg(&mut self, n: usize, val: bool) {
3491 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); 4053 assert!(n < 4usize);
4054 let offs = 1usize + n * 1usize;
4055 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
3492 } 4056 }
3493 #[doc = "Automatic output enable"] 4057 #[doc = "Capture/Compare control update generation"]
3494 pub const fn aoe(&self) -> bool { 4058 pub const fn comg(&self) -> bool {
3495 let val = (self.0 >> 14usize) & 0x01; 4059 let val = (self.0 >> 5usize) & 0x01;
3496 val != 0 4060 val != 0
3497 } 4061 }
3498 #[doc = "Automatic output enable"] 4062 #[doc = "Capture/Compare control update generation"]
3499 pub fn set_aoe(&mut self, val: bool) { 4063 pub fn set_comg(&mut self, val: bool) {
3500 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); 4064 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
3501 } 4065 }
3502 #[doc = "Main output enable"] 4066 #[doc = "Trigger generation"]
3503 pub const fn moe(&self) -> bool { 4067 pub const fn tg(&self) -> bool {
3504 let val = (self.0 >> 15usize) & 0x01; 4068 let val = (self.0 >> 6usize) & 0x01;
3505 val != 0 4069 val != 0
3506 } 4070 }
3507 #[doc = "Main output enable"] 4071 #[doc = "Trigger generation"]
3508 pub fn set_moe(&mut self, val: bool) { 4072 pub fn set_tg(&mut self, val: bool) {
3509 self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); 4073 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
3510 }
3511 }
3512 impl Default for Bdtr {
3513 fn default() -> Bdtr {
3514 Bdtr(0)
3515 }
3516 }
3517 #[doc = "capture/compare register 1"]
3518 #[repr(transparent)]
3519 #[derive(Copy, Clone, Eq, PartialEq)]
3520 pub struct Ccr16(pub u32);
3521 impl Ccr16 {
3522 #[doc = "Capture/Compare 1 value"]
3523 pub const fn ccr(&self) -> u16 {
3524 let val = (self.0 >> 0usize) & 0xffff;
3525 val as u16
3526 }
3527 #[doc = "Capture/Compare 1 value"]
3528 pub fn set_ccr(&mut self, val: u16) {
3529 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
3530 }
3531 }
3532 impl Default for Ccr16 {
3533 fn default() -> Ccr16 {
3534 Ccr16(0)
3535 } 4074 }
3536 } 4075 #[doc = "Break generation"]
3537 #[doc = "prescaler"] 4076 pub const fn bg(&self) -> bool {
3538 #[repr(transparent)] 4077 let val = (self.0 >> 7usize) & 0x01;
3539 #[derive(Copy, Clone, Eq, PartialEq)] 4078 val != 0
3540 pub struct Psc(pub u32);
3541 impl Psc {
3542 #[doc = "Prescaler value"]
3543 pub const fn psc(&self) -> u16 {
3544 let val = (self.0 >> 0usize) & 0xffff;
3545 val as u16
3546 } 4079 }
3547 #[doc = "Prescaler value"] 4080 #[doc = "Break generation"]
3548 pub fn set_psc(&mut self, val: u16) { 4081 pub fn set_bg(&mut self, val: bool) {
3549 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); 4082 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
3550 } 4083 }
3551 } 4084 }
3552 impl Default for Psc { 4085 impl Default for EgrAdv {
3553 fn default() -> Psc { 4086 fn default() -> EgrAdv {
3554 Psc(0) 4087 EgrAdv(0)
3555 } 4088 }
3556 } 4089 }
3557 #[doc = "control register 1"] 4090 #[doc = "control register 1"]
@@ -3610,81 +4143,32 @@ pub mod timer_v1 {
3610 Cr1Basic(0) 4143 Cr1Basic(0)
3611 } 4144 }
3612 } 4145 }
3613 #[doc = "capture/compare enable register"] 4146 #[doc = "capture/compare register 1"]
3614 #[repr(transparent)]
3615 #[derive(Copy, Clone, Eq, PartialEq)]
3616 pub struct CcerGp(pub u32);
3617 impl CcerGp {
3618 #[doc = "Capture/Compare 1 output enable"]
3619 pub fn cce(&self, n: usize) -> bool {
3620 assert!(n < 4usize);
3621 let offs = 0usize + n * 4usize;
3622 let val = (self.0 >> offs) & 0x01;
3623 val != 0
3624 }
3625 #[doc = "Capture/Compare 1 output enable"]
3626 pub fn set_cce(&mut self, n: usize, val: bool) {
3627 assert!(n < 4usize);
3628 let offs = 0usize + n * 4usize;
3629 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
3630 }
3631 #[doc = "Capture/Compare 1 output Polarity"]
3632 pub fn ccp(&self, n: usize) -> bool {
3633 assert!(n < 4usize);
3634 let offs = 1usize + n * 4usize;
3635 let val = (self.0 >> offs) & 0x01;
3636 val != 0
3637 }
3638 #[doc = "Capture/Compare 1 output Polarity"]
3639 pub fn set_ccp(&mut self, n: usize, val: bool) {
3640 assert!(n < 4usize);
3641 let offs = 1usize + n * 4usize;
3642 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
3643 }
3644 #[doc = "Capture/Compare 1 output Polarity"]
3645 pub fn ccnp(&self, n: usize) -> bool {
3646 assert!(n < 4usize);
3647 let offs = 3usize + n * 4usize;
3648 let val = (self.0 >> offs) & 0x01;
3649 val != 0
3650 }
3651 #[doc = "Capture/Compare 1 output Polarity"]
3652 pub fn set_ccnp(&mut self, n: usize, val: bool) {
3653 assert!(n < 4usize);
3654 let offs = 3usize + n * 4usize;
3655 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
3656 }
3657 }
3658 impl Default for CcerGp {
3659 fn default() -> CcerGp {
3660 CcerGp(0)
3661 }
3662 }
3663 #[doc = "status register"]
3664 #[repr(transparent)] 4147 #[repr(transparent)]
3665 #[derive(Copy, Clone, Eq, PartialEq)] 4148 #[derive(Copy, Clone, Eq, PartialEq)]
3666 pub struct SrBasic(pub u32); 4149 pub struct Ccr32(pub u32);
3667 impl SrBasic { 4150 impl Ccr32 {
3668 #[doc = "Update interrupt flag"] 4151 #[doc = "Capture/Compare 1 value"]
3669 pub const fn uif(&self) -> bool { 4152 pub const fn ccr(&self) -> u32 {
3670 let val = (self.0 >> 0usize) & 0x01; 4153 let val = (self.0 >> 0usize) & 0xffff_ffff;
3671 val != 0 4154 val as u32
3672 } 4155 }
3673 #[doc = "Update interrupt flag"] 4156 #[doc = "Capture/Compare 1 value"]
3674 pub fn set_uif(&mut self, val: bool) { 4157 pub fn set_ccr(&mut self, val: u32) {
3675 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 4158 self.0 =
4159 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
3676 } 4160 }
3677 } 4161 }
3678 impl Default for SrBasic { 4162 impl Default for Ccr32 {
3679 fn default() -> SrBasic { 4163 fn default() -> Ccr32 {
3680 SrBasic(0) 4164 Ccr32(0)
3681 } 4165 }
3682 } 4166 }
3683 #[doc = "status register"] 4167 #[doc = "status register"]
3684 #[repr(transparent)] 4168 #[repr(transparent)]
3685 #[derive(Copy, Clone, Eq, PartialEq)] 4169 #[derive(Copy, Clone, Eq, PartialEq)]
3686 pub struct SrAdv(pub u32); 4170 pub struct SrGp(pub u32);
3687 impl SrAdv { 4171 impl SrGp {
3688 #[doc = "Update interrupt flag"] 4172 #[doc = "Update interrupt flag"]
3689 pub const fn uif(&self) -> bool { 4173 pub const fn uif(&self) -> bool {
3690 let val = (self.0 >> 0usize) & 0x01; 4174 let val = (self.0 >> 0usize) & 0x01;
@@ -3748,910 +4232,9 @@ pub mod timer_v1 {
3748 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); 4232 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
3749 } 4233 }
3750 } 4234 }
3751 impl Default for SrAdv { 4235 impl Default for SrGp {
3752 fn default() -> SrAdv { 4236 fn default() -> SrGp {
3753 SrAdv(0) 4237 SrGp(0)
3754 }
3755 }
3756 #[doc = "event generation register"]
3757 #[repr(transparent)]
3758 #[derive(Copy, Clone, Eq, PartialEq)]
3759 pub struct EgrGp(pub u32);
3760 impl EgrGp {
3761 #[doc = "Update generation"]
3762 pub const fn ug(&self) -> bool {
3763 let val = (self.0 >> 0usize) & 0x01;
3764 val != 0
3765 }
3766 #[doc = "Update generation"]
3767 pub fn set_ug(&mut self, val: bool) {
3768 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
3769 }
3770 #[doc = "Capture/compare 1 generation"]
3771 pub fn ccg(&self, n: usize) -> bool {
3772 assert!(n < 4usize);
3773 let offs = 1usize + n * 1usize;
3774 let val = (self.0 >> offs) & 0x01;
3775 val != 0
3776 }
3777 #[doc = "Capture/compare 1 generation"]
3778 pub fn set_ccg(&mut self, n: usize, val: bool) {
3779 assert!(n < 4usize);
3780 let offs = 1usize + n * 1usize;
3781 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
3782 }
3783 #[doc = "Capture/Compare control update generation"]
3784 pub const fn comg(&self) -> bool {
3785 let val = (self.0 >> 5usize) & 0x01;
3786 val != 0
3787 }
3788 #[doc = "Capture/Compare control update generation"]
3789 pub fn set_comg(&mut self, val: bool) {
3790 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
3791 }
3792 #[doc = "Trigger generation"]
3793 pub const fn tg(&self) -> bool {
3794 let val = (self.0 >> 6usize) & 0x01;
3795 val != 0
3796 }
3797 #[doc = "Trigger generation"]
3798 pub fn set_tg(&mut self, val: bool) {
3799 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
3800 }
3801 #[doc = "Break generation"]
3802 pub const fn bg(&self) -> bool {
3803 let val = (self.0 >> 7usize) & 0x01;
3804 val != 0
3805 }
3806 #[doc = "Break generation"]
3807 pub fn set_bg(&mut self, val: bool) {
3808 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
3809 }
3810 }
3811 impl Default for EgrGp {
3812 fn default() -> EgrGp {
3813 EgrGp(0)
3814 }
3815 }
3816 #[doc = "event generation register"]
3817 #[repr(transparent)]
3818 #[derive(Copy, Clone, Eq, PartialEq)]
3819 pub struct EgrAdv(pub u32);
3820 impl EgrAdv {
3821 #[doc = "Update generation"]
3822 pub const fn ug(&self) -> bool {
3823 let val = (self.0 >> 0usize) & 0x01;
3824 val != 0
3825 }
3826 #[doc = "Update generation"]
3827 pub fn set_ug(&mut self, val: bool) {
3828 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
3829 }
3830 #[doc = "Capture/compare 1 generation"]
3831 pub fn ccg(&self, n: usize) -> bool {
3832 assert!(n < 4usize);
3833 let offs = 1usize + n * 1usize;
3834 let val = (self.0 >> offs) & 0x01;
3835 val != 0
3836 }
3837 #[doc = "Capture/compare 1 generation"]
3838 pub fn set_ccg(&mut self, n: usize, val: bool) {
3839 assert!(n < 4usize);
3840 let offs = 1usize + n * 1usize;
3841 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
3842 }
3843 #[doc = "Capture/Compare control update generation"]
3844 pub const fn comg(&self) -> bool {
3845 let val = (self.0 >> 5usize) & 0x01;
3846 val != 0
3847 }
3848 #[doc = "Capture/Compare control update generation"]
3849 pub fn set_comg(&mut self, val: bool) {
3850 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
3851 }
3852 #[doc = "Trigger generation"]
3853 pub const fn tg(&self) -> bool {
3854 let val = (self.0 >> 6usize) & 0x01;
3855 val != 0
3856 }
3857 #[doc = "Trigger generation"]
3858 pub fn set_tg(&mut self, val: bool) {
3859 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
3860 }
3861 #[doc = "Break generation"]
3862 pub const fn bg(&self) -> bool {
3863 let val = (self.0 >> 7usize) & 0x01;
3864 val != 0
3865 }
3866 #[doc = "Break generation"]
3867 pub fn set_bg(&mut self, val: bool) {
3868 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
3869 }
3870 }
3871 impl Default for EgrAdv {
3872 fn default() -> EgrAdv {
3873 EgrAdv(0)
3874 }
3875 }
3876 #[doc = "event generation register"]
3877 #[repr(transparent)]
3878 #[derive(Copy, Clone, Eq, PartialEq)]
3879 pub struct EgrBasic(pub u32);
3880 impl EgrBasic {
3881 #[doc = "Update generation"]
3882 pub const fn ug(&self) -> bool {
3883 let val = (self.0 >> 0usize) & 0x01;
3884 val != 0
3885 }
3886 #[doc = "Update generation"]
3887 pub fn set_ug(&mut self, val: bool) {
3888 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
3889 }
3890 }
3891 impl Default for EgrBasic {
3892 fn default() -> EgrBasic {
3893 EgrBasic(0)
3894 }
3895 }
3896 #[doc = "DMA control register"]
3897 #[repr(transparent)]
3898 #[derive(Copy, Clone, Eq, PartialEq)]
3899 pub struct Dcr(pub u32);
3900 impl Dcr {
3901 #[doc = "DMA base address"]
3902 pub const fn dba(&self) -> u8 {
3903 let val = (self.0 >> 0usize) & 0x1f;
3904 val as u8
3905 }
3906 #[doc = "DMA base address"]
3907 pub fn set_dba(&mut self, val: u8) {
3908 self.0 = (self.0 & !(0x1f << 0usize)) | (((val as u32) & 0x1f) << 0usize);
3909 }
3910 #[doc = "DMA burst length"]
3911 pub const fn dbl(&self) -> u8 {
3912 let val = (self.0 >> 8usize) & 0x1f;
3913 val as u8
3914 }
3915 #[doc = "DMA burst length"]
3916 pub fn set_dbl(&mut self, val: u8) {
3917 self.0 = (self.0 & !(0x1f << 8usize)) | (((val as u32) & 0x1f) << 8usize);
3918 }
3919 }
3920 impl Default for Dcr {
3921 fn default() -> Dcr {
3922 Dcr(0)
3923 }
3924 }
3925 #[doc = "slave mode control register"]
3926 #[repr(transparent)]
3927 #[derive(Copy, Clone, Eq, PartialEq)]
3928 pub struct Smcr(pub u32);
3929 impl Smcr {
3930 #[doc = "Slave mode selection"]
3931 pub const fn sms(&self) -> super::vals::Sms {
3932 let val = (self.0 >> 0usize) & 0x07;
3933 super::vals::Sms(val as u8)
3934 }
3935 #[doc = "Slave mode selection"]
3936 pub fn set_sms(&mut self, val: super::vals::Sms) {
3937 self.0 = (self.0 & !(0x07 << 0usize)) | (((val.0 as u32) & 0x07) << 0usize);
3938 }
3939 #[doc = "Trigger selection"]
3940 pub const fn ts(&self) -> super::vals::Ts {
3941 let val = (self.0 >> 4usize) & 0x07;
3942 super::vals::Ts(val as u8)
3943 }
3944 #[doc = "Trigger selection"]
3945 pub fn set_ts(&mut self, val: super::vals::Ts) {
3946 self.0 = (self.0 & !(0x07 << 4usize)) | (((val.0 as u32) & 0x07) << 4usize);
3947 }
3948 #[doc = "Master/Slave mode"]
3949 pub const fn msm(&self) -> super::vals::Msm {
3950 let val = (self.0 >> 7usize) & 0x01;
3951 super::vals::Msm(val as u8)
3952 }
3953 #[doc = "Master/Slave mode"]
3954 pub fn set_msm(&mut self, val: super::vals::Msm) {
3955 self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize);
3956 }
3957 #[doc = "External trigger filter"]
3958 pub const fn etf(&self) -> super::vals::Etf {
3959 let val = (self.0 >> 8usize) & 0x0f;
3960 super::vals::Etf(val as u8)
3961 }
3962 #[doc = "External trigger filter"]
3963 pub fn set_etf(&mut self, val: super::vals::Etf) {
3964 self.0 = (self.0 & !(0x0f << 8usize)) | (((val.0 as u32) & 0x0f) << 8usize);
3965 }
3966 #[doc = "External trigger prescaler"]
3967 pub const fn etps(&self) -> super::vals::Etps {
3968 let val = (self.0 >> 12usize) & 0x03;
3969 super::vals::Etps(val as u8)
3970 }
3971 #[doc = "External trigger prescaler"]
3972 pub fn set_etps(&mut self, val: super::vals::Etps) {
3973 self.0 = (self.0 & !(0x03 << 12usize)) | (((val.0 as u32) & 0x03) << 12usize);
3974 }
3975 #[doc = "External clock enable"]
3976 pub const fn ece(&self) -> super::vals::Ece {
3977 let val = (self.0 >> 14usize) & 0x01;
3978 super::vals::Ece(val as u8)
3979 }
3980 #[doc = "External clock enable"]
3981 pub fn set_ece(&mut self, val: super::vals::Ece) {
3982 self.0 = (self.0 & !(0x01 << 14usize)) | (((val.0 as u32) & 0x01) << 14usize);
3983 }
3984 #[doc = "External trigger polarity"]
3985 pub const fn etp(&self) -> super::vals::Etp {
3986 let val = (self.0 >> 15usize) & 0x01;
3987 super::vals::Etp(val as u8)
3988 }
3989 #[doc = "External trigger polarity"]
3990 pub fn set_etp(&mut self, val: super::vals::Etp) {
3991 self.0 = (self.0 & !(0x01 << 15usize)) | (((val.0 as u32) & 0x01) << 15usize);
3992 }
3993 }
3994 impl Default for Smcr {
3995 fn default() -> Smcr {
3996 Smcr(0)
3997 }
3998 }
3999 #[doc = "control register 2"]
4000 #[repr(transparent)]
4001 #[derive(Copy, Clone, Eq, PartialEq)]
4002 pub struct Cr2Gp(pub u32);
4003 impl Cr2Gp {
4004 #[doc = "Capture/compare DMA selection"]
4005 pub const fn ccds(&self) -> super::vals::Ccds {
4006 let val = (self.0 >> 3usize) & 0x01;
4007 super::vals::Ccds(val as u8)
4008 }
4009 #[doc = "Capture/compare DMA selection"]
4010 pub fn set_ccds(&mut self, val: super::vals::Ccds) {
4011 self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize);
4012 }
4013 #[doc = "Master mode selection"]
4014 pub const fn mms(&self) -> super::vals::Mms {
4015 let val = (self.0 >> 4usize) & 0x07;
4016 super::vals::Mms(val as u8)
4017 }
4018 #[doc = "Master mode selection"]
4019 pub fn set_mms(&mut self, val: super::vals::Mms) {
4020 self.0 = (self.0 & !(0x07 << 4usize)) | (((val.0 as u32) & 0x07) << 4usize);
4021 }
4022 #[doc = "TI1 selection"]
4023 pub const fn ti1s(&self) -> super::vals::Tis {
4024 let val = (self.0 >> 7usize) & 0x01;
4025 super::vals::Tis(val as u8)
4026 }
4027 #[doc = "TI1 selection"]
4028 pub fn set_ti1s(&mut self, val: super::vals::Tis) {
4029 self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize);
4030 }
4031 }
4032 impl Default for Cr2Gp {
4033 fn default() -> Cr2Gp {
4034 Cr2Gp(0)
4035 }
4036 }
4037 #[doc = "control register 2"]
4038 #[repr(transparent)]
4039 #[derive(Copy, Clone, Eq, PartialEq)]
4040 pub struct Cr2Basic(pub u32);
4041 impl Cr2Basic {
4042 #[doc = "Master mode selection"]
4043 pub const fn mms(&self) -> super::vals::Mms {
4044 let val = (self.0 >> 4usize) & 0x07;
4045 super::vals::Mms(val as u8)
4046 }
4047 #[doc = "Master mode selection"]
4048 pub fn set_mms(&mut self, val: super::vals::Mms) {
4049 self.0 = (self.0 & !(0x07 << 4usize)) | (((val.0 as u32) & 0x07) << 4usize);
4050 }
4051 }
4052 impl Default for Cr2Basic {
4053 fn default() -> Cr2Basic {
4054 Cr2Basic(0)
4055 }
4056 }
4057 }
4058 pub mod vals {
4059 use crate::generic::*;
4060 #[repr(transparent)]
4061 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
4062 pub struct Etp(pub u8);
4063 impl Etp {
4064 #[doc = "ETR is noninverted, active at high level or rising edge"]
4065 pub const NOTINVERTED: Self = Self(0);
4066 #[doc = "ETR is inverted, active at low level or falling edge"]
4067 pub const INVERTED: Self = Self(0x01);
4068 }
4069 #[repr(transparent)]
4070 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
4071 pub struct Ocm(pub u8);
4072 impl Ocm {
4073 #[doc = "The comparison between the output compare register TIMx_CCRy and the counter TIMx_CNT has no effect on the outputs"]
4074 pub const FROZEN: Self = Self(0);
4075 #[doc = "Set channel to active level on match. OCyREF signal is forced high when the counter matches the capture/compare register"]
4076 pub const ACTIVEONMATCH: Self = Self(0x01);
4077 #[doc = "Set channel to inactive level on match. OCyREF signal is forced low when the counter matches the capture/compare register"]
4078 pub const INACTIVEONMATCH: Self = Self(0x02);
4079 #[doc = "OCyREF toggles when TIMx_CNT=TIMx_CCRy"]
4080 pub const TOGGLE: Self = Self(0x03);
4081 #[doc = "OCyREF is forced low"]
4082 pub const FORCEINACTIVE: Self = Self(0x04);
4083 #[doc = "OCyREF is forced high"]
4084 pub const FORCEACTIVE: Self = Self(0x05);
4085 #[doc = "In upcounting, channel is active as long as TIMx_CNT<TIMx_CCRy else inactive. In downcounting, channel is inactive as long as TIMx_CNT>TIMx_CCRy else active"]
4086 pub const PWMMODE1: Self = Self(0x06);
4087 #[doc = "Inversely to PwmMode1"]
4088 pub const PWMMODE2: Self = Self(0x07);
4089 }
4090 #[repr(transparent)]
4091 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
4092 pub struct Icf(pub u8);
4093 impl Icf {
4094 #[doc = "No filter, sampling is done at fDTS"]
4095 pub const NOFILTER: Self = Self(0);
4096 #[doc = "fSAMPLING=fCK_INT, N=2"]
4097 pub const FCK_INT_N2: Self = Self(0x01);
4098 #[doc = "fSAMPLING=fCK_INT, N=4"]
4099 pub const FCK_INT_N4: Self = Self(0x02);
4100 #[doc = "fSAMPLING=fCK_INT, N=8"]
4101 pub const FCK_INT_N8: Self = Self(0x03);
4102 #[doc = "fSAMPLING=fDTS/2, N=6"]
4103 pub const FDTS_DIV2_N6: Self = Self(0x04);
4104 #[doc = "fSAMPLING=fDTS/2, N=8"]
4105 pub const FDTS_DIV2_N8: Self = Self(0x05);
4106 #[doc = "fSAMPLING=fDTS/4, N=6"]
4107 pub const FDTS_DIV4_N6: Self = Self(0x06);
4108 #[doc = "fSAMPLING=fDTS/4, N=8"]
4109 pub const FDTS_DIV4_N8: Self = Self(0x07);
4110 #[doc = "fSAMPLING=fDTS/8, N=6"]
4111 pub const FDTS_DIV8_N6: Self = Self(0x08);
4112 #[doc = "fSAMPLING=fDTS/8, N=8"]
4113 pub const FDTS_DIV8_N8: Self = Self(0x09);
4114 #[doc = "fSAMPLING=fDTS/16, N=5"]
4115 pub const FDTS_DIV16_N5: Self = Self(0x0a);
4116 #[doc = "fSAMPLING=fDTS/16, N=6"]
4117 pub const FDTS_DIV16_N6: Self = Self(0x0b);
4118 #[doc = "fSAMPLING=fDTS/16, N=8"]
4119 pub const FDTS_DIV16_N8: Self = Self(0x0c);
4120 #[doc = "fSAMPLING=fDTS/32, N=5"]
4121 pub const FDTS_DIV32_N5: Self = Self(0x0d);
4122 #[doc = "fSAMPLING=fDTS/32, N=6"]
4123 pub const FDTS_DIV32_N6: Self = Self(0x0e);
4124 #[doc = "fSAMPLING=fDTS/32, N=8"]
4125 pub const FDTS_DIV32_N8: Self = Self(0x0f);
4126 }
4127 #[repr(transparent)]
4128 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
4129 pub struct Arpe(pub u8);
4130 impl Arpe {
4131 #[doc = "TIMx_APRR register is not buffered"]
4132 pub const DISABLED: Self = Self(0);
4133 #[doc = "TIMx_APRR register is buffered"]
4134 pub const ENABLED: Self = Self(0x01);
4135 }
4136 #[repr(transparent)]
4137 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
4138 pub struct Sms(pub u8);
4139 impl Sms {
4140 #[doc = "Slave mode disabled - if CEN = ‘1 then the prescaler is clocked directly by the internal clock."]
4141 pub const DISABLED: Self = Self(0);
4142 #[doc = "Encoder mode 1 - Counter counts up/down on TI2FP1 edge depending on TI1FP2 level."]
4143 pub const ENCODER_MODE_1: Self = Self(0x01);
4144 #[doc = "Encoder mode 2 - Counter counts up/down on TI1FP2 edge depending on TI2FP1 level."]
4145 pub const ENCODER_MODE_2: Self = Self(0x02);
4146 #[doc = "Encoder mode 3 - Counter counts up/down on both TI1FP1 and TI2FP2 edges depending on the level of the other input."]
4147 pub const ENCODER_MODE_3: Self = Self(0x03);
4148 #[doc = "Reset Mode - Rising edge of the selected trigger input (TRGI) reinitializes the counter and generates an update of the registers."]
4149 pub const RESET_MODE: Self = Self(0x04);
4150 #[doc = "Gated Mode - The counter clock is enabled when the trigger input (TRGI) is high. The counter stops (but is not reset) as soon as the trigger becomes low. Both start and stop of the counter are controlled."]
4151 pub const GATED_MODE: Self = Self(0x05);
4152 #[doc = "Trigger Mode - The counter starts at a rising edge of the trigger TRGI (but it is not reset). Only the start of the counter is controlled."]
4153 pub const TRIGGER_MODE: Self = Self(0x06);
4154 #[doc = "External Clock Mode 1 - Rising edges of the selected trigger (TRGI) clock the counter."]
4155 pub const EXT_CLOCK_MODE: Self = Self(0x07);
4156 }
4157 #[repr(transparent)]
4158 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
4159 pub struct Msm(pub u8);
4160 impl Msm {
4161 #[doc = "No action"]
4162 pub const NOSYNC: Self = Self(0);
4163 #[doc = "The effect of an event on the trigger input (TRGI) is delayed to allow a perfect synchronization between the current timer and its slaves (through TRGO). It is useful if we want to synchronize several timers on a single external event."]
4164 pub const SYNC: Self = Self(0x01);
4165 }
4166 #[repr(transparent)]
4167 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
4168 pub struct Dir(pub u8);
4169 impl Dir {
4170 #[doc = "Counter used as upcounter"]
4171 pub const UP: Self = Self(0);
4172 #[doc = "Counter used as downcounter"]
4173 pub const DOWN: Self = Self(0x01);
4174 }
4175 #[repr(transparent)]
4176 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
4177 pub struct Ckd(pub u8);
4178 impl Ckd {
4179 #[doc = "t_DTS = t_CK_INT"]
4180 pub const DIV1: Self = Self(0);
4181 #[doc = "t_DTS = 2 × t_CK_INT"]
4182 pub const DIV2: Self = Self(0x01);
4183 #[doc = "t_DTS = 4 × t_CK_INT"]
4184 pub const DIV4: Self = Self(0x02);
4185 }
4186 #[repr(transparent)]
4187 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
4188 pub struct Opm(pub u8);
4189 impl Opm {
4190 #[doc = "Counter is not stopped at update event"]
4191 pub const DISABLED: Self = Self(0);
4192 #[doc = "Counter stops counting at the next update event (clearing the CEN bit)"]
4193 pub const ENABLED: Self = Self(0x01);
4194 }
4195 #[repr(transparent)]
4196 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
4197 pub struct Ece(pub u8);
4198 impl Ece {
4199 #[doc = "External clock mode 2 disabled"]
4200 pub const DISABLED: Self = Self(0);
4201 #[doc = "External clock mode 2 enabled. The counter is clocked by any active edge on the ETRF signal."]
4202 pub const ENABLED: Self = Self(0x01);
4203 }
4204 #[repr(transparent)]
4205 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
4206 pub struct CcmrOutputCcs(pub u8);
4207 impl CcmrOutputCcs {
4208 #[doc = "CCx channel is configured as output"]
4209 pub const OUTPUT: Self = Self(0);
4210 }
4211 #[repr(transparent)]
4212 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
4213 pub struct Ossr(pub u8);
4214 impl Ossr {
4215 #[doc = "When inactive, OC/OCN outputs are disabled"]
4216 pub const DISABLED: Self = Self(0);
4217 #[doc = "When inactive, OC/OCN outputs are enabled with their inactive level"]
4218 pub const IDLELEVEL: Self = Self(0x01);
4219 }
4220 #[repr(transparent)]
4221 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
4222 pub struct CcmrInputCcs(pub u8);
4223 impl CcmrInputCcs {
4224 #[doc = "CCx channel is configured as input, normal mapping: ICx mapped to TIx"]
4225 pub const TI4: Self = Self(0x01);
4226 #[doc = "CCx channel is configured as input, alternate mapping (switches 1 with 2, 3 with 4)"]
4227 pub const TI3: Self = Self(0x02);
4228 #[doc = "CCx channel is configured as input, ICx is mapped on TRC"]
4229 pub const TRC: Self = Self(0x03);
4230 }
4231 #[repr(transparent)]
4232 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
4233 pub struct Mms(pub u8);
4234 impl Mms {
4235 #[doc = "The UG bit from the TIMx_EGR register is used as trigger output"]
4236 pub const RESET: Self = Self(0);
4237 #[doc = "The counter enable signal, CNT_EN, is used as trigger output"]
4238 pub const ENABLE: Self = Self(0x01);
4239 #[doc = "The update event is selected as trigger output"]
4240 pub const UPDATE: Self = Self(0x02);
4241 #[doc = "The trigger output send a positive pulse when the CC1IF flag it to be set, as soon as a capture or a compare match occurred"]
4242 pub const COMPAREPULSE: Self = Self(0x03);
4243 #[doc = "OC1REF signal is used as trigger output"]
4244 pub const COMPAREOC1: Self = Self(0x04);
4245 #[doc = "OC2REF signal is used as trigger output"]
4246 pub const COMPAREOC2: Self = Self(0x05);
4247 #[doc = "OC3REF signal is used as trigger output"]
4248 pub const COMPAREOC3: Self = Self(0x06);
4249 #[doc = "OC4REF signal is used as trigger output"]
4250 pub const COMPAREOC4: Self = Self(0x07);
4251 }
4252 #[repr(transparent)]
4253 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
4254 pub struct Ossi(pub u8);
4255 impl Ossi {
4256 #[doc = "When inactive, OC/OCN outputs are disabled"]
4257 pub const DISABLED: Self = Self(0);
4258 #[doc = "When inactive, OC/OCN outputs are forced to idle level"]
4259 pub const IDLELEVEL: Self = Self(0x01);
4260 }
4261 #[repr(transparent)]
4262 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
4263 pub struct Etf(pub u8);
4264 impl Etf {
4265 #[doc = "No filter, sampling is done at fDTS"]
4266 pub const NOFILTER: Self = Self(0);
4267 #[doc = "fSAMPLING=fCK_INT, N=2"]
4268 pub const FCK_INT_N2: Self = Self(0x01);
4269 #[doc = "fSAMPLING=fCK_INT, N=4"]
4270 pub const FCK_INT_N4: Self = Self(0x02);
4271 #[doc = "fSAMPLING=fCK_INT, N=8"]
4272 pub const FCK_INT_N8: Self = Self(0x03);
4273 #[doc = "fSAMPLING=fDTS/2, N=6"]
4274 pub const FDTS_DIV2_N6: Self = Self(0x04);
4275 #[doc = "fSAMPLING=fDTS/2, N=8"]
4276 pub const FDTS_DIV2_N8: Self = Self(0x05);
4277 #[doc = "fSAMPLING=fDTS/4, N=6"]
4278 pub const FDTS_DIV4_N6: Self = Self(0x06);
4279 #[doc = "fSAMPLING=fDTS/4, N=8"]
4280 pub const FDTS_DIV4_N8: Self = Self(0x07);
4281 #[doc = "fSAMPLING=fDTS/8, N=6"]
4282 pub const FDTS_DIV8_N6: Self = Self(0x08);
4283 #[doc = "fSAMPLING=fDTS/8, N=8"]
4284 pub const FDTS_DIV8_N8: Self = Self(0x09);
4285 #[doc = "fSAMPLING=fDTS/16, N=5"]
4286 pub const FDTS_DIV16_N5: Self = Self(0x0a);
4287 #[doc = "fSAMPLING=fDTS/16, N=6"]
4288 pub const FDTS_DIV16_N6: Self = Self(0x0b);
4289 #[doc = "fSAMPLING=fDTS/16, N=8"]
4290 pub const FDTS_DIV16_N8: Self = Self(0x0c);
4291 #[doc = "fSAMPLING=fDTS/32, N=5"]
4292 pub const FDTS_DIV32_N5: Self = Self(0x0d);
4293 #[doc = "fSAMPLING=fDTS/32, N=6"]
4294 pub const FDTS_DIV32_N6: Self = Self(0x0e);
4295 #[doc = "fSAMPLING=fDTS/32, N=8"]
4296 pub const FDTS_DIV32_N8: Self = Self(0x0f);
4297 }
4298 #[repr(transparent)]
4299 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
4300 pub struct Etps(pub u8);
4301 impl Etps {
4302 #[doc = "Prescaler OFF"]
4303 pub const DIV1: Self = Self(0);
4304 #[doc = "ETRP frequency divided by 2"]
4305 pub const DIV2: Self = Self(0x01);
4306 #[doc = "ETRP frequency divided by 4"]
4307 pub const DIV4: Self = Self(0x02);
4308 #[doc = "ETRP frequency divided by 8"]
4309 pub const DIV8: Self = Self(0x03);
4310 }
4311 #[repr(transparent)]
4312 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
4313 pub struct Ts(pub u8);
4314 impl Ts {
4315 #[doc = "Internal Trigger 0 (ITR0)"]
4316 pub const ITR0: Self = Self(0);
4317 #[doc = "Internal Trigger 1 (ITR1)"]
4318 pub const ITR1: Self = Self(0x01);
4319 #[doc = "Internal Trigger 2 (ITR2)"]
4320 pub const ITR2: Self = Self(0x02);
4321 #[doc = "TI1 Edge Detector (TI1F_ED)"]
4322 pub const TI1F_ED: Self = Self(0x04);
4323 #[doc = "Filtered Timer Input 1 (TI1FP1)"]
4324 pub const TI1FP1: Self = Self(0x05);
4325 #[doc = "Filtered Timer Input 2 (TI2FP2)"]
4326 pub const TI2FP2: Self = Self(0x06);
4327 #[doc = "External Trigger input (ETRF)"]
4328 pub const ETRF: Self = Self(0x07);
4329 }
4330 #[repr(transparent)]
4331 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
4332 pub struct Ccds(pub u8);
4333 impl Ccds {
4334 #[doc = "CCx DMA request sent when CCx event occurs"]
4335 pub const ONCOMPARE: Self = Self(0);
4336 #[doc = "CCx DMA request sent when update event occurs"]
4337 pub const ONUPDATE: Self = Self(0x01);
4338 }
4339 #[repr(transparent)]
4340 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
4341 pub struct Cms(pub u8);
4342 impl Cms {
4343 #[doc = "The counter counts up or down depending on the direction bit"]
4344 pub const EDGEALIGNED: Self = Self(0);
4345 #[doc = "The counter counts up and down alternatively. Output compare interrupt flags are set only when the counter is counting down."]
4346 pub const CENTERALIGNED1: Self = Self(0x01);
4347 #[doc = "The counter counts up and down alternatively. Output compare interrupt flags are set only when the counter is counting up."]
4348 pub const CENTERALIGNED2: Self = Self(0x02);
4349 #[doc = "The counter counts up and down alternatively. Output compare interrupt flags are set both when the counter is counting up or down."]
4350 pub const CENTERALIGNED3: Self = Self(0x03);
4351 }
4352 #[repr(transparent)]
4353 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
4354 pub struct Tis(pub u8);
4355 impl Tis {
4356 #[doc = "The TIMx_CH1 pin is connected to TI1 input"]
4357 pub const NORMAL: Self = Self(0);
4358 #[doc = "The TIMx_CH1, CH2, CH3 pins are connected to TI1 input"]
4359 pub const XOR: Self = Self(0x01);
4360 }
4361 #[repr(transparent)]
4362 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
4363 pub struct Ocpe(pub u8);
4364 impl Ocpe {
4365 #[doc = "Preload register on CCR2 disabled. New values written to CCR2 are taken into account immediately"]
4366 pub const DISABLED: Self = Self(0);
4367 #[doc = "Preload register on CCR2 enabled. Preload value is loaded into active register on each update event"]
4368 pub const ENABLED: Self = Self(0x01);
4369 }
4370 #[repr(transparent)]
4371 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
4372 pub struct Urs(pub u8);
4373 impl Urs {
4374 #[doc = "Any of counter overflow/underflow, setting UG, or update through slave mode, generates an update interrupt or DMA request"]
4375 pub const ANYEVENT: Self = Self(0);
4376 #[doc = "Only counter overflow/underflow generates an update interrupt or DMA request"]
4377 pub const COUNTERONLY: Self = Self(0x01);
4378 }
4379 }
4380}
4381pub mod syscfg_f4 {
4382 use crate::generic::*;
4383 #[doc = "System configuration controller"]
4384 #[derive(Copy, Clone)]
4385 pub struct Syscfg(pub *mut u8);
4386 unsafe impl Send for Syscfg {}
4387 unsafe impl Sync for Syscfg {}
4388 impl Syscfg {
4389 #[doc = "memory remap register"]
4390 pub fn memrm(self) -> Reg<regs::Memrm, RW> {
4391 unsafe { Reg::from_ptr(self.0.add(0usize)) }
4392 }
4393 #[doc = "peripheral mode configuration register"]
4394 pub fn pmc(self) -> Reg<regs::Pmc, RW> {
4395 unsafe { Reg::from_ptr(self.0.add(4usize)) }
4396 }
4397 #[doc = "external interrupt configuration register"]
4398 pub fn exticr(self, n: usize) -> Reg<regs::Exticr, RW> {
4399 assert!(n < 4usize);
4400 unsafe { Reg::from_ptr(self.0.add(8usize + n * 4usize)) }
4401 }
4402 #[doc = "Compensation cell control register"]
4403 pub fn cmpcr(self) -> Reg<regs::Cmpcr, R> {
4404 unsafe { Reg::from_ptr(self.0.add(32usize)) }
4405 }
4406 }
4407 pub mod regs {
4408 use crate::generic::*;
4409 #[doc = "external interrupt configuration register"]
4410 #[repr(transparent)]
4411 #[derive(Copy, Clone, Eq, PartialEq)]
4412 pub struct Exticr(pub u32);
4413 impl Exticr {
4414 #[doc = "EXTI x configuration"]
4415 pub fn exti(&self, n: usize) -> u8 {
4416 assert!(n < 4usize);
4417 let offs = 0usize + n * 4usize;
4418 let val = (self.0 >> offs) & 0x0f;
4419 val as u8
4420 }
4421 #[doc = "EXTI x configuration"]
4422 pub fn set_exti(&mut self, n: usize, val: u8) {
4423 assert!(n < 4usize);
4424 let offs = 0usize + n * 4usize;
4425 self.0 = (self.0 & !(0x0f << offs)) | (((val as u32) & 0x0f) << offs);
4426 }
4427 }
4428 impl Default for Exticr {
4429 fn default() -> Exticr {
4430 Exticr(0)
4431 }
4432 }
4433 #[doc = "Compensation cell control register"]
4434 #[repr(transparent)]
4435 #[derive(Copy, Clone, Eq, PartialEq)]
4436 pub struct Cmpcr(pub u32);
4437 impl Cmpcr {
4438 #[doc = "Compensation cell power-down"]
4439 pub const fn cmp_pd(&self) -> bool {
4440 let val = (self.0 >> 0usize) & 0x01;
4441 val != 0
4442 }
4443 #[doc = "Compensation cell power-down"]
4444 pub fn set_cmp_pd(&mut self, val: bool) {
4445 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
4446 }
4447 #[doc = "READY"]
4448 pub const fn ready(&self) -> bool {
4449 let val = (self.0 >> 8usize) & 0x01;
4450 val != 0
4451 }
4452 #[doc = "READY"]
4453 pub fn set_ready(&mut self, val: bool) {
4454 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
4455 }
4456 }
4457 impl Default for Cmpcr {
4458 fn default() -> Cmpcr {
4459 Cmpcr(0)
4460 }
4461 }
4462 #[doc = "memory remap register"]
4463 #[repr(transparent)]
4464 #[derive(Copy, Clone, Eq, PartialEq)]
4465 pub struct Memrm(pub u32);
4466 impl Memrm {
4467 #[doc = "Memory mapping selection"]
4468 pub const fn mem_mode(&self) -> u8 {
4469 let val = (self.0 >> 0usize) & 0x07;
4470 val as u8
4471 }
4472 #[doc = "Memory mapping selection"]
4473 pub fn set_mem_mode(&mut self, val: u8) {
4474 self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize);
4475 }
4476 #[doc = "Flash bank mode selection"]
4477 pub const fn fb_mode(&self) -> bool {
4478 let val = (self.0 >> 8usize) & 0x01;
4479 val != 0
4480 }
4481 #[doc = "Flash bank mode selection"]
4482 pub fn set_fb_mode(&mut self, val: bool) {
4483 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
4484 }
4485 #[doc = "FMC memory mapping swap"]
4486 pub const fn swp_fmc(&self) -> u8 {
4487 let val = (self.0 >> 10usize) & 0x03;
4488 val as u8
4489 }
4490 #[doc = "FMC memory mapping swap"]
4491 pub fn set_swp_fmc(&mut self, val: u8) {
4492 self.0 = (self.0 & !(0x03 << 10usize)) | (((val as u32) & 0x03) << 10usize);
4493 }
4494 }
4495 impl Default for Memrm {
4496 fn default() -> Memrm {
4497 Memrm(0)
4498 }
4499 }
4500 #[doc = "peripheral mode configuration register"]
4501 #[repr(transparent)]
4502 #[derive(Copy, Clone, Eq, PartialEq)]
4503 pub struct Pmc(pub u32);
4504 impl Pmc {
4505 #[doc = "ADC1DC2"]
4506 pub const fn adc1dc2(&self) -> bool {
4507 let val = (self.0 >> 16usize) & 0x01;
4508 val != 0
4509 }
4510 #[doc = "ADC1DC2"]
4511 pub fn set_adc1dc2(&mut self, val: bool) {
4512 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
4513 }
4514 #[doc = "ADC2DC2"]
4515 pub const fn adc2dc2(&self) -> bool {
4516 let val = (self.0 >> 17usize) & 0x01;
4517 val != 0
4518 }
4519 #[doc = "ADC2DC2"]
4520 pub fn set_adc2dc2(&mut self, val: bool) {
4521 self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize);
4522 }
4523 #[doc = "ADC3DC2"]
4524 pub const fn adc3dc2(&self) -> bool {
4525 let val = (self.0 >> 18usize) & 0x01;
4526 val != 0
4527 }
4528 #[doc = "ADC3DC2"]
4529 pub fn set_adc3dc2(&mut self, val: bool) {
4530 self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize);
4531 }
4532 #[doc = "Ethernet PHY interface selection"]
4533 pub const fn mii_rmii_sel(&self) -> bool {
4534 let val = (self.0 >> 23usize) & 0x01;
4535 val != 0
4536 }
4537 #[doc = "Ethernet PHY interface selection"]
4538 pub fn set_mii_rmii_sel(&mut self, val: bool) {
4539 self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize);
4540 }
4541 }
4542 impl Default for Pmc {
4543 fn default() -> Pmc {
4544 Pmc(0)
4545 }
4546 }
4547 }
4548}
4549pub mod rng_v1 {
4550 use crate::generic::*;
4551 #[doc = "Random number generator"]
4552 #[derive(Copy, Clone)]
4553 pub struct Rng(pub *mut u8);
4554 unsafe impl Send for Rng {}
4555 unsafe impl Sync for Rng {}
4556 impl Rng {
4557 #[doc = "control register"]
4558 pub fn cr(self) -> Reg<regs::Cr, RW> {
4559 unsafe { Reg::from_ptr(self.0.add(0usize)) }
4560 }
4561 #[doc = "status register"]
4562 pub fn sr(self) -> Reg<regs::Sr, RW> {
4563 unsafe { Reg::from_ptr(self.0.add(4usize)) }
4564 }
4565 #[doc = "data register"]
4566 pub fn dr(self) -> Reg<u32, R> {
4567 unsafe { Reg::from_ptr(self.0.add(8usize)) }
4568 }
4569 }
4570 pub mod regs {
4571 use crate::generic::*;
4572 #[doc = "control register"]
4573 #[repr(transparent)]
4574 #[derive(Copy, Clone, Eq, PartialEq)]
4575 pub struct Cr(pub u32);
4576 impl Cr {
4577 #[doc = "Random number generator enable"]
4578 pub const fn rngen(&self) -> bool {
4579 let val = (self.0 >> 2usize) & 0x01;
4580 val != 0
4581 }
4582 #[doc = "Random number generator enable"]
4583 pub fn set_rngen(&mut self, val: bool) {
4584 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
4585 }
4586 #[doc = "Interrupt enable"]
4587 pub const fn ie(&self) -> bool {
4588 let val = (self.0 >> 3usize) & 0x01;
4589 val != 0
4590 }
4591 #[doc = "Interrupt enable"]
4592 pub fn set_ie(&mut self, val: bool) {
4593 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
4594 }
4595 }
4596 impl Default for Cr {
4597 fn default() -> Cr {
4598 Cr(0)
4599 }
4600 }
4601 #[doc = "status register"]
4602 #[repr(transparent)]
4603 #[derive(Copy, Clone, Eq, PartialEq)]
4604 pub struct Sr(pub u32);
4605 impl Sr {
4606 #[doc = "Data ready"]
4607 pub const fn drdy(&self) -> bool {
4608 let val = (self.0 >> 0usize) & 0x01;
4609 val != 0
4610 }
4611 #[doc = "Data ready"]
4612 pub fn set_drdy(&mut self, val: bool) {
4613 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
4614 }
4615 #[doc = "Clock error current status"]
4616 pub const fn cecs(&self) -> bool {
4617 let val = (self.0 >> 1usize) & 0x01;
4618 val != 0
4619 }
4620 #[doc = "Clock error current status"]
4621 pub fn set_cecs(&mut self, val: bool) {
4622 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
4623 }
4624 #[doc = "Seed error current status"]
4625 pub const fn secs(&self) -> bool {
4626 let val = (self.0 >> 2usize) & 0x01;
4627 val != 0
4628 }
4629 #[doc = "Seed error current status"]
4630 pub fn set_secs(&mut self, val: bool) {
4631 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
4632 }
4633 #[doc = "Clock error interrupt status"]
4634 pub const fn ceis(&self) -> bool {
4635 let val = (self.0 >> 5usize) & 0x01;
4636 val != 0
4637 }
4638 #[doc = "Clock error interrupt status"]
4639 pub fn set_ceis(&mut self, val: bool) {
4640 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
4641 }
4642 #[doc = "Seed error interrupt status"]
4643 pub const fn seis(&self) -> bool {
4644 let val = (self.0 >> 6usize) & 0x01;
4645 val != 0
4646 }
4647 #[doc = "Seed error interrupt status"]
4648 pub fn set_seis(&mut self, val: bool) {
4649 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
4650 }
4651 }
4652 impl Default for Sr {
4653 fn default() -> Sr {
4654 Sr(0)
4655 } 4238 }
4656 } 4239 }
4657 } 4240 }
@@ -4715,30 +4298,6 @@ pub mod exti_v1 {
4715 Imr(0) 4298 Imr(0)
4716 } 4299 }
4717 } 4300 }
4718 #[doc = "Event mask register (EXTI_EMR)"]
4719 #[repr(transparent)]
4720 #[derive(Copy, Clone, Eq, PartialEq)]
4721 pub struct Emr(pub u32);
4722 impl Emr {
4723 #[doc = "Event Mask on line 0"]
4724 pub fn mr(&self, n: usize) -> super::vals::Mr {
4725 assert!(n < 23usize);
4726 let offs = 0usize + n * 1usize;
4727 let val = (self.0 >> offs) & 0x01;
4728 super::vals::Mr(val as u8)
4729 }
4730 #[doc = "Event Mask on line 0"]
4731 pub fn set_mr(&mut self, n: usize, val: super::vals::Mr) {
4732 assert!(n < 23usize);
4733 let offs = 0usize + n * 1usize;
4734 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs);
4735 }
4736 }
4737 impl Default for Emr {
4738 fn default() -> Emr {
4739 Emr(0)
4740 }
4741 }
4742 #[doc = "Falling Trigger selection register (EXTI_FTSR)"] 4301 #[doc = "Falling Trigger selection register (EXTI_FTSR)"]
4743 #[repr(transparent)] 4302 #[repr(transparent)]
4744 #[derive(Copy, Clone, Eq, PartialEq)] 4303 #[derive(Copy, Clone, Eq, PartialEq)]
@@ -4811,6 +4370,30 @@ pub mod exti_v1 {
4811 Pr(0) 4370 Pr(0)
4812 } 4371 }
4813 } 4372 }
4373 #[doc = "Event mask register (EXTI_EMR)"]
4374 #[repr(transparent)]
4375 #[derive(Copy, Clone, Eq, PartialEq)]
4376 pub struct Emr(pub u32);
4377 impl Emr {
4378 #[doc = "Event Mask on line 0"]
4379 pub fn mr(&self, n: usize) -> super::vals::Mr {
4380 assert!(n < 23usize);
4381 let offs = 0usize + n * 1usize;
4382 let val = (self.0 >> offs) & 0x01;
4383 super::vals::Mr(val as u8)
4384 }
4385 #[doc = "Event Mask on line 0"]
4386 pub fn set_mr(&mut self, n: usize, val: super::vals::Mr) {
4387 assert!(n < 23usize);
4388 let offs = 0usize + n * 1usize;
4389 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs);
4390 }
4391 }
4392 impl Default for Emr {
4393 fn default() -> Emr {
4394 Emr(0)
4395 }
4396 }
4814 #[doc = "Rising Trigger selection register (EXTI_RTSR)"] 4397 #[doc = "Rising Trigger selection register (EXTI_RTSR)"]
4815 #[repr(transparent)] 4398 #[repr(transparent)]
4816 #[derive(Copy, Clone, Eq, PartialEq)] 4399 #[derive(Copy, Clone, Eq, PartialEq)]
@@ -4840,20 +4423,6 @@ pub mod exti_v1 {
4840 use crate::generic::*; 4423 use crate::generic::*;
4841 #[repr(transparent)] 4424 #[repr(transparent)]
4842 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 4425 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
4843 pub struct Swierw(pub u8);
4844 impl Swierw {
4845 #[doc = "Generates an interrupt request"]
4846 pub const PEND: Self = Self(0x01);
4847 }
4848 #[repr(transparent)]
4849 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
4850 pub struct Prw(pub u8);
4851 impl Prw {
4852 #[doc = "Clears pending bit"]
4853 pub const CLEAR: Self = Self(0x01);
4854 }
4855 #[repr(transparent)]
4856 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
4857 pub struct Mr(pub u8); 4426 pub struct Mr(pub u8);
4858 impl Mr { 4427 impl Mr {
4859 #[doc = "Interrupt request line is masked"] 4428 #[doc = "Interrupt request line is masked"]
@@ -4879,74 +4448,488 @@ pub mod exti_v1 {
4879 #[doc = "Selected trigger request occurred"] 4448 #[doc = "Selected trigger request occurred"]
4880 pub const PENDING: Self = Self(0x01); 4449 pub const PENDING: Self = Self(0x01);
4881 } 4450 }
4451 #[repr(transparent)]
4452 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
4453 pub struct Swierw(pub u8);
4454 impl Swierw {
4455 #[doc = "Generates an interrupt request"]
4456 pub const PEND: Self = Self(0x01);
4457 }
4458 #[repr(transparent)]
4459 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
4460 pub struct Prw(pub u8);
4461 impl Prw {
4462 #[doc = "Clears pending bit"]
4463 pub const CLEAR: Self = Self(0x01);
4464 }
4882 } 4465 }
4883} 4466}
4884pub mod gpio_v1 { 4467pub mod generic {
4468 use core::marker::PhantomData;
4469 #[derive(Copy, Clone)]
4470 pub struct RW;
4471 #[derive(Copy, Clone)]
4472 pub struct R;
4473 #[derive(Copy, Clone)]
4474 pub struct W;
4475 mod sealed {
4476 use super::*;
4477 pub trait Access {}
4478 impl Access for R {}
4479 impl Access for W {}
4480 impl Access for RW {}
4481 }
4482 pub trait Access: sealed::Access + Copy {}
4483 impl Access for R {}
4484 impl Access for W {}
4485 impl Access for RW {}
4486 pub trait Read: Access {}
4487 impl Read for RW {}
4488 impl Read for R {}
4489 pub trait Write: Access {}
4490 impl Write for RW {}
4491 impl Write for W {}
4492 #[derive(Copy, Clone)]
4493 pub struct Reg<T: Copy, A: Access> {
4494 ptr: *mut u8,
4495 phantom: PhantomData<*mut (T, A)>,
4496 }
4497 unsafe impl<T: Copy, A: Access> Send for Reg<T, A> {}
4498 unsafe impl<T: Copy, A: Access> Sync for Reg<T, A> {}
4499 impl<T: Copy, A: Access> Reg<T, A> {
4500 pub fn from_ptr(ptr: *mut u8) -> Self {
4501 Self {
4502 ptr,
4503 phantom: PhantomData,
4504 }
4505 }
4506 pub fn ptr(&self) -> *mut T {
4507 self.ptr as _
4508 }
4509 }
4510 impl<T: Copy, A: Read> Reg<T, A> {
4511 pub unsafe fn read(&self) -> T {
4512 (self.ptr as *mut T).read_volatile()
4513 }
4514 }
4515 impl<T: Copy, A: Write> Reg<T, A> {
4516 pub unsafe fn write_value(&self, val: T) {
4517 (self.ptr as *mut T).write_volatile(val)
4518 }
4519 }
4520 impl<T: Default + Copy, A: Write> Reg<T, A> {
4521 pub unsafe fn write<R>(&self, f: impl FnOnce(&mut T) -> R) -> R {
4522 let mut val = Default::default();
4523 let res = f(&mut val);
4524 self.write_value(val);
4525 res
4526 }
4527 }
4528 impl<T: Copy, A: Read + Write> Reg<T, A> {
4529 pub unsafe fn modify<R>(&self, f: impl FnOnce(&mut T) -> R) -> R {
4530 let mut val = self.read();
4531 let res = f(&mut val);
4532 self.write_value(val);
4533 res
4534 }
4535 }
4536}
4537pub mod dma_v2 {
4885 use crate::generic::*; 4538 use crate::generic::*;
4886 #[doc = "General purpose I/O"] 4539 #[doc = "DMA controller"]
4887 #[derive(Copy, Clone)] 4540 #[derive(Copy, Clone)]
4888 pub struct Gpio(pub *mut u8); 4541 pub struct Dma(pub *mut u8);
4889 unsafe impl Send for Gpio {} 4542 unsafe impl Send for Dma {}
4890 unsafe impl Sync for Gpio {} 4543 unsafe impl Sync for Dma {}
4891 impl Gpio { 4544 impl Dma {
4892 #[doc = "Port configuration register low (GPIOn_CRL)"] 4545 #[doc = "low interrupt status register"]
4893 pub fn cr(self, n: usize) -> Reg<regs::Cr, RW> { 4546 pub fn isr(self, n: usize) -> Reg<regs::Isr, R> {
4894 assert!(n < 2usize); 4547 assert!(n < 2usize);
4895 unsafe { Reg::from_ptr(self.0.add(0usize + n * 4usize)) } 4548 unsafe { Reg::from_ptr(self.0.add(0usize + n * 4usize)) }
4896 } 4549 }
4897 #[doc = "Port input data register (GPIOn_IDR)"] 4550 #[doc = "low interrupt flag clear register"]
4898 pub fn idr(self) -> Reg<regs::Idr, R> { 4551 pub fn ifcr(self, n: usize) -> Reg<regs::Ifcr, W> {
4552 assert!(n < 2usize);
4553 unsafe { Reg::from_ptr(self.0.add(8usize + n * 4usize)) }
4554 }
4555 #[doc = "Stream cluster: S?CR, S?NDTR, S?M0AR, S?M1AR and S?FCR registers"]
4556 pub fn st(self, n: usize) -> St {
4557 assert!(n < 8usize);
4558 unsafe { St(self.0.add(16usize + n * 24usize)) }
4559 }
4560 }
4561 #[doc = "Stream cluster: S?CR, S?NDTR, S?M0AR, S?M1AR and S?FCR registers"]
4562 #[derive(Copy, Clone)]
4563 pub struct St(pub *mut u8);
4564 unsafe impl Send for St {}
4565 unsafe impl Sync for St {}
4566 impl St {
4567 #[doc = "stream x configuration register"]
4568 pub fn cr(self) -> Reg<regs::Cr, RW> {
4569 unsafe { Reg::from_ptr(self.0.add(0usize)) }
4570 }
4571 #[doc = "stream x number of data register"]
4572 pub fn ndtr(self) -> Reg<regs::Ndtr, RW> {
4573 unsafe { Reg::from_ptr(self.0.add(4usize)) }
4574 }
4575 #[doc = "stream x peripheral address register"]
4576 pub fn par(self) -> Reg<u32, RW> {
4899 unsafe { Reg::from_ptr(self.0.add(8usize)) } 4577 unsafe { Reg::from_ptr(self.0.add(8usize)) }
4900 } 4578 }
4901 #[doc = "Port output data register (GPIOn_ODR)"] 4579 #[doc = "stream x memory 0 address register"]
4902 pub fn odr(self) -> Reg<regs::Odr, RW> { 4580 pub fn m0ar(self) -> Reg<u32, RW> {
4903 unsafe { Reg::from_ptr(self.0.add(12usize)) } 4581 unsafe { Reg::from_ptr(self.0.add(12usize)) }
4904 } 4582 }
4905 #[doc = "Port bit set/reset register (GPIOn_BSRR)"] 4583 #[doc = "stream x memory 1 address register"]
4906 pub fn bsrr(self) -> Reg<regs::Bsrr, W> { 4584 pub fn m1ar(self) -> Reg<u32, RW> {
4907 unsafe { Reg::from_ptr(self.0.add(16usize)) } 4585 unsafe { Reg::from_ptr(self.0.add(16usize)) }
4908 } 4586 }
4909 #[doc = "Port bit reset register (GPIOn_BRR)"] 4587 #[doc = "stream x FIFO control register"]
4910 pub fn brr(self) -> Reg<regs::Brr, W> { 4588 pub fn fcr(self) -> Reg<regs::Fcr, RW> {
4911 unsafe { Reg::from_ptr(self.0.add(20usize)) } 4589 unsafe { Reg::from_ptr(self.0.add(20usize)) }
4912 } 4590 }
4913 #[doc = "Port configuration lock register"] 4591 }
4914 pub fn lckr(self) -> Reg<regs::Lckr, RW> { 4592 pub mod vals {
4915 unsafe { Reg::from_ptr(self.0.add(24usize)) } 4593 use crate::generic::*;
4594 #[repr(transparent)]
4595 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
4596 pub struct Inc(pub u8);
4597 impl Inc {
4598 #[doc = "Address pointer is fixed"]
4599 pub const FIXED: Self = Self(0);
4600 #[doc = "Address pointer is incremented after each data transfer"]
4601 pub const INCREMENTED: Self = Self(0x01);
4602 }
4603 #[repr(transparent)]
4604 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
4605 pub struct Dbm(pub u8);
4606 impl Dbm {
4607 #[doc = "No buffer switching at the end of transfer"]
4608 pub const DISABLED: Self = Self(0);
4609 #[doc = "Memory target switched at the end of the DMA transfer"]
4610 pub const ENABLED: Self = Self(0x01);
4611 }
4612 #[repr(transparent)]
4613 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
4614 pub struct Pfctrl(pub u8);
4615 impl Pfctrl {
4616 #[doc = "The DMA is the flow controller"]
4617 pub const DMA: Self = Self(0);
4618 #[doc = "The peripheral is the flow controller"]
4619 pub const PERIPHERAL: Self = Self(0x01);
4620 }
4621 #[repr(transparent)]
4622 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
4623 pub struct Pl(pub u8);
4624 impl Pl {
4625 #[doc = "Low"]
4626 pub const LOW: Self = Self(0);
4627 #[doc = "Medium"]
4628 pub const MEDIUM: Self = Self(0x01);
4629 #[doc = "High"]
4630 pub const HIGH: Self = Self(0x02);
4631 #[doc = "Very high"]
4632 pub const VERYHIGH: Self = Self(0x03);
4633 }
4634 #[repr(transparent)]
4635 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
4636 pub struct Fth(pub u8);
4637 impl Fth {
4638 #[doc = "1/4 full FIFO"]
4639 pub const QUARTER: Self = Self(0);
4640 #[doc = "1/2 full FIFO"]
4641 pub const HALF: Self = Self(0x01);
4642 #[doc = "3/4 full FIFO"]
4643 pub const THREEQUARTERS: Self = Self(0x02);
4644 #[doc = "Full FIFO"]
4645 pub const FULL: Self = Self(0x03);
4646 }
4647 #[repr(transparent)]
4648 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
4649 pub struct Burst(pub u8);
4650 impl Burst {
4651 #[doc = "Single transfer"]
4652 pub const SINGLE: Self = Self(0);
4653 #[doc = "Incremental burst of 4 beats"]
4654 pub const INCR4: Self = Self(0x01);
4655 #[doc = "Incremental burst of 8 beats"]
4656 pub const INCR8: Self = Self(0x02);
4657 #[doc = "Incremental burst of 16 beats"]
4658 pub const INCR16: Self = Self(0x03);
4659 }
4660 #[repr(transparent)]
4661 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
4662 pub struct Dmdis(pub u8);
4663 impl Dmdis {
4664 #[doc = "Direct mode is enabled"]
4665 pub const ENABLED: Self = Self(0);
4666 #[doc = "Direct mode is disabled"]
4667 pub const DISABLED: Self = Self(0x01);
4668 }
4669 #[repr(transparent)]
4670 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
4671 pub struct Dir(pub u8);
4672 impl Dir {
4673 #[doc = "Peripheral-to-memory"]
4674 pub const PERIPHERALTOMEMORY: Self = Self(0);
4675 #[doc = "Memory-to-peripheral"]
4676 pub const MEMORYTOPERIPHERAL: Self = Self(0x01);
4677 #[doc = "Memory-to-memory"]
4678 pub const MEMORYTOMEMORY: Self = Self(0x02);
4679 }
4680 #[repr(transparent)]
4681 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
4682 pub struct Pincos(pub u8);
4683 impl Pincos {
4684 #[doc = "The offset size for the peripheral address calculation is linked to the PSIZE"]
4685 pub const PSIZE: Self = Self(0);
4686 #[doc = "The offset size for the peripheral address calculation is fixed to 4 (32-bit alignment)"]
4687 pub const FIXED4: Self = Self(0x01);
4688 }
4689 #[repr(transparent)]
4690 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
4691 pub struct Size(pub u8);
4692 impl Size {
4693 #[doc = "Byte (8-bit)"]
4694 pub const BITS8: Self = Self(0);
4695 #[doc = "Half-word (16-bit)"]
4696 pub const BITS16: Self = Self(0x01);
4697 #[doc = "Word (32-bit)"]
4698 pub const BITS32: Self = Self(0x02);
4699 }
4700 #[repr(transparent)]
4701 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
4702 pub struct Ct(pub u8);
4703 impl Ct {
4704 #[doc = "The current target memory is Memory 0"]
4705 pub const MEMORY0: Self = Self(0);
4706 #[doc = "The current target memory is Memory 1"]
4707 pub const MEMORY1: Self = Self(0x01);
4708 }
4709 #[repr(transparent)]
4710 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
4711 pub struct Fs(pub u8);
4712 impl Fs {
4713 #[doc = "0 < fifo_level < 1/4"]
4714 pub const QUARTER1: Self = Self(0);
4715 #[doc = "1/4 <= fifo_level < 1/2"]
4716 pub const QUARTER2: Self = Self(0x01);
4717 #[doc = "1/2 <= fifo_level < 3/4"]
4718 pub const QUARTER3: Self = Self(0x02);
4719 #[doc = "3/4 <= fifo_level < full"]
4720 pub const QUARTER4: Self = Self(0x03);
4721 #[doc = "FIFO is empty"]
4722 pub const EMPTY: Self = Self(0x04);
4723 #[doc = "FIFO is full"]
4724 pub const FULL: Self = Self(0x05);
4725 }
4726 #[repr(transparent)]
4727 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
4728 pub struct Circ(pub u8);
4729 impl Circ {
4730 #[doc = "Circular mode disabled"]
4731 pub const DISABLED: Self = Self(0);
4732 #[doc = "Circular mode enabled"]
4733 pub const ENABLED: Self = Self(0x01);
4916 } 4734 }
4917 } 4735 }
4918 pub mod regs { 4736 pub mod regs {
4919 use crate::generic::*; 4737 use crate::generic::*;
4920 #[doc = "Port configuration register (GPIOn_CRx)"] 4738 #[doc = "stream x number of data register"]
4739 #[repr(transparent)]
4740 #[derive(Copy, Clone, Eq, PartialEq)]
4741 pub struct Ndtr(pub u32);
4742 impl Ndtr {
4743 #[doc = "Number of data items to transfer"]
4744 pub const fn ndt(&self) -> u16 {
4745 let val = (self.0 >> 0usize) & 0xffff;
4746 val as u16
4747 }
4748 #[doc = "Number of data items to transfer"]
4749 pub fn set_ndt(&mut self, val: u16) {
4750 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
4751 }
4752 }
4753 impl Default for Ndtr {
4754 fn default() -> Ndtr {
4755 Ndtr(0)
4756 }
4757 }
4758 #[doc = "stream x configuration register"]
4921 #[repr(transparent)] 4759 #[repr(transparent)]
4922 #[derive(Copy, Clone, Eq, PartialEq)] 4760 #[derive(Copy, Clone, Eq, PartialEq)]
4923 pub struct Cr(pub u32); 4761 pub struct Cr(pub u32);
4924 impl Cr { 4762 impl Cr {
4925 #[doc = "Port n mode bits"] 4763 #[doc = "Stream enable / flag stream ready when read low"]
4926 pub fn mode(&self, n: usize) -> super::vals::Mode { 4764 pub const fn en(&self) -> bool {
4927 assert!(n < 8usize); 4765 let val = (self.0 >> 0usize) & 0x01;
4928 let offs = 0usize + n * 4usize; 4766 val != 0
4929 let val = (self.0 >> offs) & 0x03;
4930 super::vals::Mode(val as u8)
4931 } 4767 }
4932 #[doc = "Port n mode bits"] 4768 #[doc = "Stream enable / flag stream ready when read low"]
4933 pub fn set_mode(&mut self, n: usize, val: super::vals::Mode) { 4769 pub fn set_en(&mut self, val: bool) {
4934 assert!(n < 8usize); 4770 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
4935 let offs = 0usize + n * 4usize;
4936 self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs);
4937 } 4771 }
4938 #[doc = "Port n configuration bits"] 4772 #[doc = "Direct mode error interrupt enable"]
4939 pub fn cnf(&self, n: usize) -> super::vals::Cnf { 4773 pub const fn dmeie(&self) -> bool {
4940 assert!(n < 8usize); 4774 let val = (self.0 >> 1usize) & 0x01;
4941 let offs = 2usize + n * 4usize; 4775 val != 0
4942 let val = (self.0 >> offs) & 0x03;
4943 super::vals::Cnf(val as u8)
4944 } 4776 }
4945 #[doc = "Port n configuration bits"] 4777 #[doc = "Direct mode error interrupt enable"]
4946 pub fn set_cnf(&mut self, n: usize, val: super::vals::Cnf) { 4778 pub fn set_dmeie(&mut self, val: bool) {
4947 assert!(n < 8usize); 4779 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
4948 let offs = 2usize + n * 4usize; 4780 }
4949 self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs); 4781 #[doc = "Transfer error interrupt enable"]
4782 pub const fn teie(&self) -> bool {
4783 let val = (self.0 >> 2usize) & 0x01;
4784 val != 0
4785 }
4786 #[doc = "Transfer error interrupt enable"]
4787 pub fn set_teie(&mut self, val: bool) {
4788 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
4789 }
4790 #[doc = "Half transfer interrupt enable"]
4791 pub const fn htie(&self) -> bool {
4792 let val = (self.0 >> 3usize) & 0x01;
4793 val != 0
4794 }
4795 #[doc = "Half transfer interrupt enable"]
4796 pub fn set_htie(&mut self, val: bool) {
4797 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
4798 }
4799 #[doc = "Transfer complete interrupt enable"]
4800 pub const fn tcie(&self) -> bool {
4801 let val = (self.0 >> 4usize) & 0x01;
4802 val != 0
4803 }
4804 #[doc = "Transfer complete interrupt enable"]
4805 pub fn set_tcie(&mut self, val: bool) {
4806 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
4807 }
4808 #[doc = "Peripheral flow controller"]
4809 pub const fn pfctrl(&self) -> super::vals::Pfctrl {
4810 let val = (self.0 >> 5usize) & 0x01;
4811 super::vals::Pfctrl(val as u8)
4812 }
4813 #[doc = "Peripheral flow controller"]
4814 pub fn set_pfctrl(&mut self, val: super::vals::Pfctrl) {
4815 self.0 = (self.0 & !(0x01 << 5usize)) | (((val.0 as u32) & 0x01) << 5usize);
4816 }
4817 #[doc = "Data transfer direction"]
4818 pub const fn dir(&self) -> super::vals::Dir {
4819 let val = (self.0 >> 6usize) & 0x03;
4820 super::vals::Dir(val as u8)
4821 }
4822 #[doc = "Data transfer direction"]
4823 pub fn set_dir(&mut self, val: super::vals::Dir) {
4824 self.0 = (self.0 & !(0x03 << 6usize)) | (((val.0 as u32) & 0x03) << 6usize);
4825 }
4826 #[doc = "Circular mode"]
4827 pub const fn circ(&self) -> super::vals::Circ {
4828 let val = (self.0 >> 8usize) & 0x01;
4829 super::vals::Circ(val as u8)
4830 }
4831 #[doc = "Circular mode"]
4832 pub fn set_circ(&mut self, val: super::vals::Circ) {
4833 self.0 = (self.0 & !(0x01 << 8usize)) | (((val.0 as u32) & 0x01) << 8usize);
4834 }
4835 #[doc = "Peripheral increment mode"]
4836 pub const fn pinc(&self) -> super::vals::Inc {
4837 let val = (self.0 >> 9usize) & 0x01;
4838 super::vals::Inc(val as u8)
4839 }
4840 #[doc = "Peripheral increment mode"]
4841 pub fn set_pinc(&mut self, val: super::vals::Inc) {
4842 self.0 = (self.0 & !(0x01 << 9usize)) | (((val.0 as u32) & 0x01) << 9usize);
4843 }
4844 #[doc = "Memory increment mode"]
4845 pub const fn minc(&self) -> super::vals::Inc {
4846 let val = (self.0 >> 10usize) & 0x01;
4847 super::vals::Inc(val as u8)
4848 }
4849 #[doc = "Memory increment mode"]
4850 pub fn set_minc(&mut self, val: super::vals::Inc) {
4851 self.0 = (self.0 & !(0x01 << 10usize)) | (((val.0 as u32) & 0x01) << 10usize);
4852 }
4853 #[doc = "Peripheral data size"]
4854 pub const fn psize(&self) -> super::vals::Size {
4855 let val = (self.0 >> 11usize) & 0x03;
4856 super::vals::Size(val as u8)
4857 }
4858 #[doc = "Peripheral data size"]
4859 pub fn set_psize(&mut self, val: super::vals::Size) {
4860 self.0 = (self.0 & !(0x03 << 11usize)) | (((val.0 as u32) & 0x03) << 11usize);
4861 }
4862 #[doc = "Memory data size"]
4863 pub const fn msize(&self) -> super::vals::Size {
4864 let val = (self.0 >> 13usize) & 0x03;
4865 super::vals::Size(val as u8)
4866 }
4867 #[doc = "Memory data size"]
4868 pub fn set_msize(&mut self, val: super::vals::Size) {
4869 self.0 = (self.0 & !(0x03 << 13usize)) | (((val.0 as u32) & 0x03) << 13usize);
4870 }
4871 #[doc = "Peripheral increment offset size"]
4872 pub const fn pincos(&self) -> super::vals::Pincos {
4873 let val = (self.0 >> 15usize) & 0x01;
4874 super::vals::Pincos(val as u8)
4875 }
4876 #[doc = "Peripheral increment offset size"]
4877 pub fn set_pincos(&mut self, val: super::vals::Pincos) {
4878 self.0 = (self.0 & !(0x01 << 15usize)) | (((val.0 as u32) & 0x01) << 15usize);
4879 }
4880 #[doc = "Priority level"]
4881 pub const fn pl(&self) -> super::vals::Pl {
4882 let val = (self.0 >> 16usize) & 0x03;
4883 super::vals::Pl(val as u8)
4884 }
4885 #[doc = "Priority level"]
4886 pub fn set_pl(&mut self, val: super::vals::Pl) {
4887 self.0 = (self.0 & !(0x03 << 16usize)) | (((val.0 as u32) & 0x03) << 16usize);
4888 }
4889 #[doc = "Double buffer mode"]
4890 pub const fn dbm(&self) -> super::vals::Dbm {
4891 let val = (self.0 >> 18usize) & 0x01;
4892 super::vals::Dbm(val as u8)
4893 }
4894 #[doc = "Double buffer mode"]
4895 pub fn set_dbm(&mut self, val: super::vals::Dbm) {
4896 self.0 = (self.0 & !(0x01 << 18usize)) | (((val.0 as u32) & 0x01) << 18usize);
4897 }
4898 #[doc = "Current target (only in double buffer mode)"]
4899 pub const fn ct(&self) -> super::vals::Ct {
4900 let val = (self.0 >> 19usize) & 0x01;
4901 super::vals::Ct(val as u8)
4902 }
4903 #[doc = "Current target (only in double buffer mode)"]
4904 pub fn set_ct(&mut self, val: super::vals::Ct) {
4905 self.0 = (self.0 & !(0x01 << 19usize)) | (((val.0 as u32) & 0x01) << 19usize);
4906 }
4907 #[doc = "Peripheral burst transfer configuration"]
4908 pub const fn pburst(&self) -> super::vals::Burst {
4909 let val = (self.0 >> 21usize) & 0x03;
4910 super::vals::Burst(val as u8)
4911 }
4912 #[doc = "Peripheral burst transfer configuration"]
4913 pub fn set_pburst(&mut self, val: super::vals::Burst) {
4914 self.0 = (self.0 & !(0x03 << 21usize)) | (((val.0 as u32) & 0x03) << 21usize);
4915 }
4916 #[doc = "Memory burst transfer configuration"]
4917 pub const fn mburst(&self) -> super::vals::Burst {
4918 let val = (self.0 >> 23usize) & 0x03;
4919 super::vals::Burst(val as u8)
4920 }
4921 #[doc = "Memory burst transfer configuration"]
4922 pub fn set_mburst(&mut self, val: super::vals::Burst) {
4923 self.0 = (self.0 & !(0x03 << 23usize)) | (((val.0 as u32) & 0x03) << 23usize);
4924 }
4925 #[doc = "Channel selection"]
4926 pub const fn chsel(&self) -> u8 {
4927 let val = (self.0 >> 25usize) & 0x0f;
4928 val as u8
4929 }
4930 #[doc = "Channel selection"]
4931 pub fn set_chsel(&mut self, val: u8) {
4932 self.0 = (self.0 & !(0x0f << 25usize)) | (((val as u32) & 0x0f) << 25usize);
4950 } 4933 }
4951 } 4934 }
4952 impl Default for Cr { 4935 impl Default for Cr {
@@ -4954,564 +4937,581 @@ pub mod gpio_v1 {
4954 Cr(0) 4937 Cr(0)
4955 } 4938 }
4956 } 4939 }
4957 #[doc = "Port output data register (GPIOn_ODR)"] 4940 #[doc = "stream x FIFO control register"]
4958 #[repr(transparent)] 4941 #[repr(transparent)]
4959 #[derive(Copy, Clone, Eq, PartialEq)] 4942 #[derive(Copy, Clone, Eq, PartialEq)]
4960 pub struct Odr(pub u32); 4943 pub struct Fcr(pub u32);
4961 impl Odr { 4944 impl Fcr {
4962 #[doc = "Port output data"] 4945 #[doc = "FIFO threshold selection"]
4963 pub fn odr(&self, n: usize) -> super::vals::Odr { 4946 pub const fn fth(&self) -> super::vals::Fth {
4964 assert!(n < 16usize); 4947 let val = (self.0 >> 0usize) & 0x03;
4965 let offs = 0usize + n * 1usize; 4948 super::vals::Fth(val as u8)
4966 let val = (self.0 >> offs) & 0x01;
4967 super::vals::Odr(val as u8)
4968 } 4949 }
4969 #[doc = "Port output data"] 4950 #[doc = "FIFO threshold selection"]
4970 pub fn set_odr(&mut self, n: usize, val: super::vals::Odr) { 4951 pub fn set_fth(&mut self, val: super::vals::Fth) {
4971 assert!(n < 16usize); 4952 self.0 = (self.0 & !(0x03 << 0usize)) | (((val.0 as u32) & 0x03) << 0usize);
4972 let offs = 0usize + n * 1usize; 4953 }
4973 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); 4954 #[doc = "Direct mode disable"]
4955 pub const fn dmdis(&self) -> super::vals::Dmdis {
4956 let val = (self.0 >> 2usize) & 0x01;
4957 super::vals::Dmdis(val as u8)
4958 }
4959 #[doc = "Direct mode disable"]
4960 pub fn set_dmdis(&mut self, val: super::vals::Dmdis) {
4961 self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize);
4962 }
4963 #[doc = "FIFO status"]
4964 pub const fn fs(&self) -> super::vals::Fs {
4965 let val = (self.0 >> 3usize) & 0x07;
4966 super::vals::Fs(val as u8)
4967 }
4968 #[doc = "FIFO status"]
4969 pub fn set_fs(&mut self, val: super::vals::Fs) {
4970 self.0 = (self.0 & !(0x07 << 3usize)) | (((val.0 as u32) & 0x07) << 3usize);
4971 }
4972 #[doc = "FIFO error interrupt enable"]
4973 pub const fn feie(&self) -> bool {
4974 let val = (self.0 >> 7usize) & 0x01;
4975 val != 0
4976 }
4977 #[doc = "FIFO error interrupt enable"]
4978 pub fn set_feie(&mut self, val: bool) {
4979 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
4974 } 4980 }
4975 } 4981 }
4976 impl Default for Odr { 4982 impl Default for Fcr {
4977 fn default() -> Odr { 4983 fn default() -> Fcr {
4978 Odr(0) 4984 Fcr(0)
4979 } 4985 }
4980 } 4986 }
4981 #[doc = "Port configuration lock register"] 4987 #[doc = "low interrupt flag clear register"]
4982 #[repr(transparent)] 4988 #[repr(transparent)]
4983 #[derive(Copy, Clone, Eq, PartialEq)] 4989 #[derive(Copy, Clone, Eq, PartialEq)]
4984 pub struct Lckr(pub u32); 4990 pub struct Ifcr(pub u32);
4985 impl Lckr { 4991 impl Ifcr {
4986 #[doc = "Port A Lock bit"] 4992 #[doc = "Stream x clear FIFO error interrupt flag (x = 3..0)"]
4987 pub fn lck(&self, n: usize) -> super::vals::Lck { 4993 pub fn cfeif(&self, n: usize) -> bool {
4988 assert!(n < 16usize); 4994 assert!(n < 4usize);
4989 let offs = 0usize + n * 1usize; 4995 let offs = 0usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
4990 let val = (self.0 >> offs) & 0x01; 4996 let val = (self.0 >> offs) & 0x01;
4991 super::vals::Lck(val as u8) 4997 val != 0
4992 } 4998 }
4993 #[doc = "Port A Lock bit"] 4999 #[doc = "Stream x clear FIFO error interrupt flag (x = 3..0)"]
4994 pub fn set_lck(&mut self, n: usize, val: super::vals::Lck) { 5000 pub fn set_cfeif(&mut self, n: usize, val: bool) {
4995 assert!(n < 16usize); 5001 assert!(n < 4usize);
4996 let offs = 0usize + n * 1usize; 5002 let offs = 0usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
4997 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); 5003 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
4998 } 5004 }
4999 #[doc = "Lock key"] 5005 #[doc = "Stream x clear direct mode error interrupt flag (x = 3..0)"]
5000 pub const fn lckk(&self) -> super::vals::Lckk { 5006 pub fn cdmeif(&self, n: usize) -> bool {
5001 let val = (self.0 >> 16usize) & 0x01; 5007 assert!(n < 4usize);
5002 super::vals::Lckk(val as u8) 5008 let offs = 2usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
5009 let val = (self.0 >> offs) & 0x01;
5010 val != 0
5003 } 5011 }
5004 #[doc = "Lock key"] 5012 #[doc = "Stream x clear direct mode error interrupt flag (x = 3..0)"]
5005 pub fn set_lckk(&mut self, val: super::vals::Lckk) { 5013 pub fn set_cdmeif(&mut self, n: usize, val: bool) {
5006 self.0 = (self.0 & !(0x01 << 16usize)) | (((val.0 as u32) & 0x01) << 16usize); 5014 assert!(n < 4usize);
5015 let offs = 2usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
5016 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
5007 } 5017 }
5008 } 5018 #[doc = "Stream x clear transfer error interrupt flag (x = 3..0)"]
5009 impl Default for Lckr { 5019 pub fn cteif(&self, n: usize) -> bool {
5010 fn default() -> Lckr { 5020 assert!(n < 4usize);
5011 Lckr(0) 5021 let offs = 3usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
5022 let val = (self.0 >> offs) & 0x01;
5023 val != 0
5012 } 5024 }
5013 } 5025 #[doc = "Stream x clear transfer error interrupt flag (x = 3..0)"]
5014 #[doc = "Port bit reset register (GPIOn_BRR)"] 5026 pub fn set_cteif(&mut self, n: usize, val: bool) {
5015 #[repr(transparent)] 5027 assert!(n < 4usize);
5016 #[derive(Copy, Clone, Eq, PartialEq)] 5028 let offs = 3usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
5017 pub struct Brr(pub u32); 5029 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
5018 impl Brr { 5030 }
5019 #[doc = "Reset bit"] 5031 #[doc = "Stream x clear half transfer interrupt flag (x = 3..0)"]
5020 pub fn br(&self, n: usize) -> bool { 5032 pub fn chtif(&self, n: usize) -> bool {
5021 assert!(n < 16usize); 5033 assert!(n < 4usize);
5022 let offs = 0usize + n * 1usize; 5034 let offs = 4usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
5023 let val = (self.0 >> offs) & 0x01; 5035 let val = (self.0 >> offs) & 0x01;
5024 val != 0 5036 val != 0
5025 } 5037 }
5026 #[doc = "Reset bit"] 5038 #[doc = "Stream x clear half transfer interrupt flag (x = 3..0)"]
5027 pub fn set_br(&mut self, n: usize, val: bool) { 5039 pub fn set_chtif(&mut self, n: usize, val: bool) {
5028 assert!(n < 16usize); 5040 assert!(n < 4usize);
5029 let offs = 0usize + n * 1usize; 5041 let offs = 4usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
5042 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
5043 }
5044 #[doc = "Stream x clear transfer complete interrupt flag (x = 3..0)"]
5045 pub fn ctcif(&self, n: usize) -> bool {
5046 assert!(n < 4usize);
5047 let offs = 5usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
5048 let val = (self.0 >> offs) & 0x01;
5049 val != 0
5050 }
5051 #[doc = "Stream x clear transfer complete interrupt flag (x = 3..0)"]
5052 pub fn set_ctcif(&mut self, n: usize, val: bool) {
5053 assert!(n < 4usize);
5054 let offs = 5usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
5030 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); 5055 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
5031 } 5056 }
5032 } 5057 }
5033 impl Default for Brr { 5058 impl Default for Ifcr {
5034 fn default() -> Brr { 5059 fn default() -> Ifcr {
5035 Brr(0) 5060 Ifcr(0)
5036 } 5061 }
5037 } 5062 }
5038 #[doc = "Port input data register (GPIOn_IDR)"] 5063 #[doc = "low interrupt status register"]
5039 #[repr(transparent)] 5064 #[repr(transparent)]
5040 #[derive(Copy, Clone, Eq, PartialEq)] 5065 #[derive(Copy, Clone, Eq, PartialEq)]
5041 pub struct Idr(pub u32); 5066 pub struct Isr(pub u32);
5042 impl Idr { 5067 impl Isr {
5043 #[doc = "Port input data"] 5068 #[doc = "Stream x FIFO error interrupt flag (x=3..0)"]
5044 pub fn idr(&self, n: usize) -> super::vals::Idr { 5069 pub fn feif(&self, n: usize) -> bool {
5045 assert!(n < 16usize); 5070 assert!(n < 4usize);
5046 let offs = 0usize + n * 1usize; 5071 let offs = 0usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
5047 let val = (self.0 >> offs) & 0x01; 5072 let val = (self.0 >> offs) & 0x01;
5048 super::vals::Idr(val as u8) 5073 val != 0
5049 } 5074 }
5050 #[doc = "Port input data"] 5075 #[doc = "Stream x FIFO error interrupt flag (x=3..0)"]
5051 pub fn set_idr(&mut self, n: usize, val: super::vals::Idr) { 5076 pub fn set_feif(&mut self, n: usize, val: bool) {
5052 assert!(n < 16usize); 5077 assert!(n < 4usize);
5053 let offs = 0usize + n * 1usize; 5078 let offs = 0usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
5054 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); 5079 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
5055 } 5080 }
5056 } 5081 #[doc = "Stream x direct mode error interrupt flag (x=3..0)"]
5057 impl Default for Idr { 5082 pub fn dmeif(&self, n: usize) -> bool {
5058 fn default() -> Idr { 5083 assert!(n < 4usize);
5059 Idr(0) 5084 let offs = 2usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
5085 let val = (self.0 >> offs) & 0x01;
5086 val != 0
5060 } 5087 }
5061 } 5088 #[doc = "Stream x direct mode error interrupt flag (x=3..0)"]
5062 #[doc = "Port bit set/reset register (GPIOn_BSRR)"] 5089 pub fn set_dmeif(&mut self, n: usize, val: bool) {
5063 #[repr(transparent)] 5090 assert!(n < 4usize);
5064 #[derive(Copy, Clone, Eq, PartialEq)] 5091 let offs = 2usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
5065 pub struct Bsrr(pub u32); 5092 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
5066 impl Bsrr { 5093 }
5067 #[doc = "Set bit"] 5094 #[doc = "Stream x transfer error interrupt flag (x=3..0)"]
5068 pub fn bs(&self, n: usize) -> bool { 5095 pub fn teif(&self, n: usize) -> bool {
5069 assert!(n < 16usize); 5096 assert!(n < 4usize);
5070 let offs = 0usize + n * 1usize; 5097 let offs = 3usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
5071 let val = (self.0 >> offs) & 0x01; 5098 let val = (self.0 >> offs) & 0x01;
5072 val != 0 5099 val != 0
5073 } 5100 }
5074 #[doc = "Set bit"] 5101 #[doc = "Stream x transfer error interrupt flag (x=3..0)"]
5075 pub fn set_bs(&mut self, n: usize, val: bool) { 5102 pub fn set_teif(&mut self, n: usize, val: bool) {
5076 assert!(n < 16usize); 5103 assert!(n < 4usize);
5077 let offs = 0usize + n * 1usize; 5104 let offs = 3usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
5078 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); 5105 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
5079 } 5106 }
5080 #[doc = "Reset bit"] 5107 #[doc = "Stream x half transfer interrupt flag (x=3..0)"]
5081 pub fn br(&self, n: usize) -> bool { 5108 pub fn htif(&self, n: usize) -> bool {
5082 assert!(n < 16usize); 5109 assert!(n < 4usize);
5083 let offs = 16usize + n * 1usize; 5110 let offs = 4usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
5084 let val = (self.0 >> offs) & 0x01; 5111 let val = (self.0 >> offs) & 0x01;
5085 val != 0 5112 val != 0
5086 } 5113 }
5087 #[doc = "Reset bit"] 5114 #[doc = "Stream x half transfer interrupt flag (x=3..0)"]
5088 pub fn set_br(&mut self, n: usize, val: bool) { 5115 pub fn set_htif(&mut self, n: usize, val: bool) {
5089 assert!(n < 16usize); 5116 assert!(n < 4usize);
5090 let offs = 16usize + n * 1usize; 5117 let offs = 4usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
5091 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); 5118 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
5092 } 5119 }
5093 } 5120 #[doc = "Stream x transfer complete interrupt flag (x = 3..0)"]
5094 impl Default for Bsrr { 5121 pub fn tcif(&self, n: usize) -> bool {
5095 fn default() -> Bsrr { 5122 assert!(n < 4usize);
5096 Bsrr(0) 5123 let offs = 5usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
5124 let val = (self.0 >> offs) & 0x01;
5125 val != 0
5126 }
5127 #[doc = "Stream x transfer complete interrupt flag (x = 3..0)"]
5128 pub fn set_tcif(&mut self, n: usize, val: bool) {
5129 assert!(n < 4usize);
5130 let offs = 5usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
5131 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
5097 } 5132 }
5098 } 5133 }
5099 } 5134 impl Default for Isr {
5100 pub mod vals { 5135 fn default() -> Isr {
5101 use crate::generic::*; 5136 Isr(0)
5102 #[repr(transparent)] 5137 }
5103 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5104 pub struct Lck(pub u8);
5105 impl Lck {
5106 #[doc = "Port configuration not locked"]
5107 pub const UNLOCKED: Self = Self(0);
5108 #[doc = "Port configuration locked"]
5109 pub const LOCKED: Self = Self(0x01);
5110 }
5111 #[repr(transparent)]
5112 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5113 pub struct Cnf(pub u8);
5114 impl Cnf {
5115 #[doc = "Analog mode / Push-Pull mode"]
5116 pub const PUSHPULL: Self = Self(0);
5117 #[doc = "Floating input (reset state) / Open Drain-Mode"]
5118 pub const OPENDRAIN: Self = Self(0x01);
5119 #[doc = "Input with pull-up/pull-down / Alternate Function Push-Pull Mode"]
5120 pub const ALTPUSHPULL: Self = Self(0x02);
5121 #[doc = "Alternate Function Open-Drain Mode"]
5122 pub const ALTOPENDRAIN: Self = Self(0x03);
5123 }
5124 #[repr(transparent)]
5125 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5126 pub struct Odr(pub u8);
5127 impl Odr {
5128 #[doc = "Set output to logic low"]
5129 pub const LOW: Self = Self(0);
5130 #[doc = "Set output to logic high"]
5131 pub const HIGH: Self = Self(0x01);
5132 }
5133 #[repr(transparent)]
5134 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5135 pub struct Mode(pub u8);
5136 impl Mode {
5137 #[doc = "Input mode (reset state)"]
5138 pub const INPUT: Self = Self(0);
5139 #[doc = "Output mode 10 MHz"]
5140 pub const OUTPUT: Self = Self(0x01);
5141 #[doc = "Output mode 2 MHz"]
5142 pub const OUTPUT2: Self = Self(0x02);
5143 #[doc = "Output mode 50 MHz"]
5144 pub const OUTPUT50: Self = Self(0x03);
5145 }
5146 #[repr(transparent)]
5147 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5148 pub struct Lckk(pub u8);
5149 impl Lckk {
5150 #[doc = "Port configuration lock key not active"]
5151 pub const NOTACTIVE: Self = Self(0);
5152 #[doc = "Port configuration lock key active"]
5153 pub const ACTIVE: Self = Self(0x01);
5154 }
5155 #[repr(transparent)]
5156 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5157 pub struct Brw(pub u8);
5158 impl Brw {
5159 #[doc = "No action on the corresponding ODx bit"]
5160 pub const NOACTION: Self = Self(0);
5161 #[doc = "Reset the ODx bit"]
5162 pub const RESET: Self = Self(0x01);
5163 }
5164 #[repr(transparent)]
5165 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5166 pub struct Idr(pub u8);
5167 impl Idr {
5168 #[doc = "Input is logic low"]
5169 pub const LOW: Self = Self(0);
5170 #[doc = "Input is logic high"]
5171 pub const HIGH: Self = Self(0x01);
5172 }
5173 #[repr(transparent)]
5174 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5175 pub struct Bsw(pub u8);
5176 impl Bsw {
5177 #[doc = "No action on the corresponding ODx bit"]
5178 pub const NOACTION: Self = Self(0);
5179 #[doc = "Sets the corresponding ODRx bit"]
5180 pub const SET: Self = Self(0x01);
5181 } 5138 }
5182 } 5139 }
5183} 5140}
5184pub mod syscfg_l4 { 5141pub mod dma_v1 {
5185 use crate::generic::*; 5142 use crate::generic::*;
5186 #[doc = "System configuration controller"] 5143 #[doc = "DMA controller"]
5187 #[derive(Copy, Clone)] 5144 #[derive(Copy, Clone)]
5188 pub struct Syscfg(pub *mut u8); 5145 pub struct Dma(pub *mut u8);
5189 unsafe impl Send for Syscfg {} 5146 unsafe impl Send for Dma {}
5190 unsafe impl Sync for Syscfg {} 5147 unsafe impl Sync for Dma {}
5191 impl Syscfg { 5148 impl Dma {
5192 #[doc = "memory remap register"] 5149 #[doc = "DMA interrupt status register (DMA_ISR)"]
5193 pub fn memrmp(self) -> Reg<regs::Memrmp, RW> { 5150 pub fn isr(self) -> Reg<regs::Isr, R> {
5194 unsafe { Reg::from_ptr(self.0.add(0usize)) } 5151 unsafe { Reg::from_ptr(self.0.add(0usize)) }
5195 } 5152 }
5196 #[doc = "configuration register 1"] 5153 #[doc = "DMA interrupt flag clear register (DMA_IFCR)"]
5197 pub fn cfgr1(self) -> Reg<regs::Cfgr1, RW> { 5154 pub fn ifcr(self) -> Reg<regs::Ifcr, W> {
5198 unsafe { Reg::from_ptr(self.0.add(4usize)) } 5155 unsafe { Reg::from_ptr(self.0.add(4usize)) }
5199 } 5156 }
5200 #[doc = "external interrupt configuration register 1"] 5157 #[doc = "Channel cluster: CCR?, CNDTR?, CPAR?, and CMAR? registers"]
5201 pub fn exticr(self, n: usize) -> Reg<regs::Exticr, RW> { 5158 pub fn ch(self, n: usize) -> Ch {
5202 assert!(n < 4usize); 5159 assert!(n < 7usize);
5203 unsafe { Reg::from_ptr(self.0.add(8usize + n * 4usize)) } 5160 unsafe { Ch(self.0.add(8usize + n * 20usize)) }
5204 } 5161 }
5205 #[doc = "SCSR"] 5162 }
5206 pub fn scsr(self) -> Reg<regs::Scsr, RW> { 5163 #[doc = "Channel cluster: CCR?, CNDTR?, CPAR?, and CMAR? registers"]
5207 unsafe { Reg::from_ptr(self.0.add(24usize)) } 5164 #[derive(Copy, Clone)]
5165 pub struct Ch(pub *mut u8);
5166 unsafe impl Send for Ch {}
5167 unsafe impl Sync for Ch {}
5168 impl Ch {
5169 #[doc = "DMA channel configuration register (DMA_CCR)"]
5170 pub fn cr(self) -> Reg<regs::Cr, RW> {
5171 unsafe { Reg::from_ptr(self.0.add(0usize)) }
5208 } 5172 }
5209 #[doc = "CFGR2"] 5173 #[doc = "DMA channel 1 number of data register"]
5210 pub fn cfgr2(self) -> Reg<regs::Cfgr2, RW> { 5174 pub fn ndtr(self) -> Reg<regs::Ndtr, RW> {
5211 unsafe { Reg::from_ptr(self.0.add(28usize)) } 5175 unsafe { Reg::from_ptr(self.0.add(4usize)) }
5212 } 5176 }
5213 #[doc = "SWPR"] 5177 #[doc = "DMA channel 1 peripheral address register"]
5214 pub fn swpr(self) -> Reg<regs::Swpr, W> { 5178 pub fn par(self) -> Reg<u32, RW> {
5215 unsafe { Reg::from_ptr(self.0.add(32usize)) } 5179 unsafe { Reg::from_ptr(self.0.add(8usize)) }
5216 } 5180 }
5217 #[doc = "SKR"] 5181 #[doc = "DMA channel 1 memory address register"]
5218 pub fn skr(self) -> Reg<regs::Skr, W> { 5182 pub fn mar(self) -> Reg<u32, RW> {
5219 unsafe { Reg::from_ptr(self.0.add(36usize)) } 5183 unsafe { Reg::from_ptr(self.0.add(12usize)) }
5220 } 5184 }
5221 } 5185 }
5222 pub mod regs { 5186 pub mod regs {
5223 use crate::generic::*; 5187 use crate::generic::*;
5224 #[doc = "configuration register 1"] 5188 #[doc = "DMA channel 1 number of data register"]
5225 #[repr(transparent)] 5189 #[repr(transparent)]
5226 #[derive(Copy, Clone, Eq, PartialEq)] 5190 #[derive(Copy, Clone, Eq, PartialEq)]
5227 pub struct Cfgr1(pub u32); 5191 pub struct Ndtr(pub u32);
5228 impl Cfgr1 { 5192 impl Ndtr {
5229 #[doc = "Firewall disable"] 5193 #[doc = "Number of data to transfer"]
5230 pub const fn fwdis(&self) -> bool { 5194 pub const fn ndt(&self) -> u16 {
5195 let val = (self.0 >> 0usize) & 0xffff;
5196 val as u16
5197 }
5198 #[doc = "Number of data to transfer"]
5199 pub fn set_ndt(&mut self, val: u16) {
5200 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
5201 }
5202 }
5203 impl Default for Ndtr {
5204 fn default() -> Ndtr {
5205 Ndtr(0)
5206 }
5207 }
5208 #[doc = "DMA channel configuration register (DMA_CCR)"]
5209 #[repr(transparent)]
5210 #[derive(Copy, Clone, Eq, PartialEq)]
5211 pub struct Cr(pub u32);
5212 impl Cr {
5213 #[doc = "Channel enable"]
5214 pub const fn en(&self) -> bool {
5231 let val = (self.0 >> 0usize) & 0x01; 5215 let val = (self.0 >> 0usize) & 0x01;
5232 val != 0 5216 val != 0
5233 } 5217 }
5234 #[doc = "Firewall disable"] 5218 #[doc = "Channel enable"]
5235 pub fn set_fwdis(&mut self, val: bool) { 5219 pub fn set_en(&mut self, val: bool) {
5236 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 5220 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
5237 } 5221 }
5238 #[doc = "I/O analog switch voltage booster enable"] 5222 #[doc = "Transfer complete interrupt enable"]
5239 pub const fn boosten(&self) -> bool { 5223 pub const fn tcie(&self) -> bool {
5240 let val = (self.0 >> 8usize) & 0x01; 5224 let val = (self.0 >> 1usize) & 0x01;
5241 val != 0 5225 val != 0
5242 } 5226 }
5243 #[doc = "I/O analog switch voltage booster enable"] 5227 #[doc = "Transfer complete interrupt enable"]
5244 pub fn set_boosten(&mut self, val: bool) { 5228 pub fn set_tcie(&mut self, val: bool) {
5245 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); 5229 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
5246 } 5230 }
5247 #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB6"] 5231 #[doc = "Half Transfer interrupt enable"]
5248 pub const fn i2c_pb6_fmp(&self) -> bool { 5232 pub const fn htie(&self) -> bool {
5249 let val = (self.0 >> 16usize) & 0x01; 5233 let val = (self.0 >> 2usize) & 0x01;
5250 val != 0 5234 val != 0
5251 } 5235 }
5252 #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB6"] 5236 #[doc = "Half Transfer interrupt enable"]
5253 pub fn set_i2c_pb6_fmp(&mut self, val: bool) { 5237 pub fn set_htie(&mut self, val: bool) {
5254 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); 5238 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
5255 } 5239 }
5256 #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB7"] 5240 #[doc = "Transfer error interrupt enable"]
5257 pub const fn i2c_pb7_fmp(&self) -> bool { 5241 pub const fn teie(&self) -> bool {
5258 let val = (self.0 >> 17usize) & 0x01; 5242 let val = (self.0 >> 3usize) & 0x01;
5259 val != 0 5243 val != 0
5260 } 5244 }
5261 #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB7"] 5245 #[doc = "Transfer error interrupt enable"]
5262 pub fn set_i2c_pb7_fmp(&mut self, val: bool) { 5246 pub fn set_teie(&mut self, val: bool) {
5263 self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); 5247 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
5264 } 5248 }
5265 #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB8"] 5249 #[doc = "Data transfer direction"]
5266 pub const fn i2c_pb8_fmp(&self) -> bool { 5250 pub const fn dir(&self) -> super::vals::Dir {
5267 let val = (self.0 >> 18usize) & 0x01; 5251 let val = (self.0 >> 4usize) & 0x01;
5268 val != 0 5252 super::vals::Dir(val as u8)
5269 } 5253 }
5270 #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB8"] 5254 #[doc = "Data transfer direction"]
5271 pub fn set_i2c_pb8_fmp(&mut self, val: bool) { 5255 pub fn set_dir(&mut self, val: super::vals::Dir) {
5272 self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); 5256 self.0 = (self.0 & !(0x01 << 4usize)) | (((val.0 as u32) & 0x01) << 4usize);
5273 } 5257 }
5274 #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB9"] 5258 #[doc = "Circular mode"]
5275 pub const fn i2c_pb9_fmp(&self) -> bool { 5259 pub const fn circ(&self) -> super::vals::Circ {
5276 let val = (self.0 >> 19usize) & 0x01; 5260 let val = (self.0 >> 5usize) & 0x01;
5277 val != 0 5261 super::vals::Circ(val as u8)
5278 } 5262 }
5279 #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB9"] 5263 #[doc = "Circular mode"]
5280 pub fn set_i2c_pb9_fmp(&mut self, val: bool) { 5264 pub fn set_circ(&mut self, val: super::vals::Circ) {
5281 self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize); 5265 self.0 = (self.0 & !(0x01 << 5usize)) | (((val.0 as u32) & 0x01) << 5usize);
5282 } 5266 }
5283 #[doc = "I2C1 Fast-mode Plus driving capability activation"] 5267 #[doc = "Peripheral increment mode"]
5284 pub const fn i2c1_fmp(&self) -> bool { 5268 pub const fn pinc(&self) -> super::vals::Inc {
5285 let val = (self.0 >> 20usize) & 0x01; 5269 let val = (self.0 >> 6usize) & 0x01;
5286 val != 0 5270 super::vals::Inc(val as u8)
5287 } 5271 }
5288 #[doc = "I2C1 Fast-mode Plus driving capability activation"] 5272 #[doc = "Peripheral increment mode"]
5289 pub fn set_i2c1_fmp(&mut self, val: bool) { 5273 pub fn set_pinc(&mut self, val: super::vals::Inc) {
5290 self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize); 5274 self.0 = (self.0 & !(0x01 << 6usize)) | (((val.0 as u32) & 0x01) << 6usize);
5291 } 5275 }
5292 #[doc = "I2C2 Fast-mode Plus driving capability activation"] 5276 #[doc = "Memory increment mode"]
5293 pub const fn i2c2_fmp(&self) -> bool { 5277 pub const fn minc(&self) -> super::vals::Inc {
5294 let val = (self.0 >> 21usize) & 0x01; 5278 let val = (self.0 >> 7usize) & 0x01;
5295 val != 0 5279 super::vals::Inc(val as u8)
5296 } 5280 }
5297 #[doc = "I2C2 Fast-mode Plus driving capability activation"] 5281 #[doc = "Memory increment mode"]
5298 pub fn set_i2c2_fmp(&mut self, val: bool) { 5282 pub fn set_minc(&mut self, val: super::vals::Inc) {
5299 self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize); 5283 self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize);
5300 } 5284 }
5301 #[doc = "I2C3 Fast-mode Plus driving capability activation"] 5285 #[doc = "Peripheral size"]
5302 pub const fn i2c3_fmp(&self) -> bool { 5286 pub const fn psize(&self) -> super::vals::Size {
5303 let val = (self.0 >> 22usize) & 0x01; 5287 let val = (self.0 >> 8usize) & 0x03;
5304 val != 0 5288 super::vals::Size(val as u8)
5305 } 5289 }
5306 #[doc = "I2C3 Fast-mode Plus driving capability activation"] 5290 #[doc = "Peripheral size"]
5307 pub fn set_i2c3_fmp(&mut self, val: bool) { 5291 pub fn set_psize(&mut self, val: super::vals::Size) {
5308 self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize); 5292 self.0 = (self.0 & !(0x03 << 8usize)) | (((val.0 as u32) & 0x03) << 8usize);
5309 } 5293 }
5310 #[doc = "Floating Point Unit interrupts enable bits"] 5294 #[doc = "Memory size"]
5311 pub const fn fpu_ie(&self) -> u8 { 5295 pub const fn msize(&self) -> super::vals::Size {
5312 let val = (self.0 >> 26usize) & 0x3f; 5296 let val = (self.0 >> 10usize) & 0x03;
5313 val as u8 5297 super::vals::Size(val as u8)
5314 } 5298 }
5315 #[doc = "Floating Point Unit interrupts enable bits"] 5299 #[doc = "Memory size"]
5316 pub fn set_fpu_ie(&mut self, val: u8) { 5300 pub fn set_msize(&mut self, val: super::vals::Size) {
5317 self.0 = (self.0 & !(0x3f << 26usize)) | (((val as u32) & 0x3f) << 26usize); 5301 self.0 = (self.0 & !(0x03 << 10usize)) | (((val.0 as u32) & 0x03) << 10usize);
5302 }
5303 #[doc = "Channel Priority level"]
5304 pub const fn pl(&self) -> super::vals::Pl {
5305 let val = (self.0 >> 12usize) & 0x03;
5306 super::vals::Pl(val as u8)
5307 }
5308 #[doc = "Channel Priority level"]
5309 pub fn set_pl(&mut self, val: super::vals::Pl) {
5310 self.0 = (self.0 & !(0x03 << 12usize)) | (((val.0 as u32) & 0x03) << 12usize);
5311 }
5312 #[doc = "Memory to memory mode"]
5313 pub const fn mem2mem(&self) -> super::vals::Memmem {
5314 let val = (self.0 >> 14usize) & 0x01;
5315 super::vals::Memmem(val as u8)
5316 }
5317 #[doc = "Memory to memory mode"]
5318 pub fn set_mem2mem(&mut self, val: super::vals::Memmem) {
5319 self.0 = (self.0 & !(0x01 << 14usize)) | (((val.0 as u32) & 0x01) << 14usize);
5318 } 5320 }
5319 } 5321 }
5320 impl Default for Cfgr1 { 5322 impl Default for Cr {
5321 fn default() -> Cfgr1 { 5323 fn default() -> Cr {
5322 Cfgr1(0) 5324 Cr(0)
5323 } 5325 }
5324 } 5326 }
5325 #[doc = "CFGR2"] 5327 #[doc = "DMA interrupt status register (DMA_ISR)"]
5326 #[repr(transparent)] 5328 #[repr(transparent)]
5327 #[derive(Copy, Clone, Eq, PartialEq)] 5329 #[derive(Copy, Clone, Eq, PartialEq)]
5328 pub struct Cfgr2(pub u32); 5330 pub struct Isr(pub u32);
5329 impl Cfgr2 { 5331 impl Isr {
5330 #[doc = "Cortex LOCKUP (Hardfault) output enable bit"] 5332 #[doc = "Channel 1 Global interrupt flag"]
5331 pub const fn cll(&self) -> bool { 5333 pub fn gif(&self, n: usize) -> bool {
5332 let val = (self.0 >> 0usize) & 0x01; 5334 assert!(n < 7usize);
5333 val != 0 5335 let offs = 0usize + n * 4usize;
5334 } 5336 let val = (self.0 >> offs) & 0x01;
5335 #[doc = "Cortex LOCKUP (Hardfault) output enable bit"]
5336 pub fn set_cll(&mut self, val: bool) {
5337 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
5338 }
5339 #[doc = "SRAM2 parity lock bit"]
5340 pub const fn spl(&self) -> bool {
5341 let val = (self.0 >> 1usize) & 0x01;
5342 val != 0 5337 val != 0
5343 } 5338 }
5344 #[doc = "SRAM2 parity lock bit"] 5339 #[doc = "Channel 1 Global interrupt flag"]
5345 pub fn set_spl(&mut self, val: bool) { 5340 pub fn set_gif(&mut self, n: usize, val: bool) {
5346 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); 5341 assert!(n < 7usize);
5342 let offs = 0usize + n * 4usize;
5343 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
5347 } 5344 }
5348 #[doc = "PVD lock enable bit"] 5345 #[doc = "Channel 1 Transfer Complete flag"]
5349 pub const fn pvdl(&self) -> bool { 5346 pub fn tcif(&self, n: usize) -> bool {
5350 let val = (self.0 >> 2usize) & 0x01; 5347 assert!(n < 7usize);
5348 let offs = 1usize + n * 4usize;
5349 let val = (self.0 >> offs) & 0x01;
5351 val != 0 5350 val != 0
5352 } 5351 }
5353 #[doc = "PVD lock enable bit"] 5352 #[doc = "Channel 1 Transfer Complete flag"]
5354 pub fn set_pvdl(&mut self, val: bool) { 5353 pub fn set_tcif(&mut self, n: usize, val: bool) {
5355 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); 5354 assert!(n < 7usize);
5355 let offs = 1usize + n * 4usize;
5356 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
5356 } 5357 }
5357 #[doc = "ECC Lock"] 5358 #[doc = "Channel 1 Half Transfer Complete flag"]
5358 pub const fn eccl(&self) -> bool { 5359 pub fn htif(&self, n: usize) -> bool {
5359 let val = (self.0 >> 3usize) & 0x01; 5360 assert!(n < 7usize);
5361 let offs = 2usize + n * 4usize;
5362 let val = (self.0 >> offs) & 0x01;
5360 val != 0 5363 val != 0
5361 } 5364 }
5362 #[doc = "ECC Lock"] 5365 #[doc = "Channel 1 Half Transfer Complete flag"]
5363 pub fn set_eccl(&mut self, val: bool) { 5366 pub fn set_htif(&mut self, n: usize, val: bool) {
5364 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); 5367 assert!(n < 7usize);
5368 let offs = 2usize + n * 4usize;
5369 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
5365 } 5370 }
5366 #[doc = "SRAM2 parity error flag"] 5371 #[doc = "Channel 1 Transfer Error flag"]
5367 pub const fn spf(&self) -> bool { 5372 pub fn teif(&self, n: usize) -> bool {
5368 let val = (self.0 >> 8usize) & 0x01; 5373 assert!(n < 7usize);
5374 let offs = 3usize + n * 4usize;
5375 let val = (self.0 >> offs) & 0x01;
5369 val != 0 5376 val != 0
5370 } 5377 }
5371 #[doc = "SRAM2 parity error flag"] 5378 #[doc = "Channel 1 Transfer Error flag"]
5372 pub fn set_spf(&mut self, val: bool) { 5379 pub fn set_teif(&mut self, n: usize, val: bool) {
5373 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); 5380 assert!(n < 7usize);
5381 let offs = 3usize + n * 4usize;
5382 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
5374 } 5383 }
5375 } 5384 }
5376 impl Default for Cfgr2 { 5385 impl Default for Isr {
5377 fn default() -> Cfgr2 { 5386 fn default() -> Isr {
5378 Cfgr2(0) 5387 Isr(0)
5379 } 5388 }
5380 } 5389 }
5381 #[doc = "SWPR"] 5390 #[doc = "DMA interrupt flag clear register (DMA_IFCR)"]
5382 #[repr(transparent)] 5391 #[repr(transparent)]
5383 #[derive(Copy, Clone, Eq, PartialEq)] 5392 #[derive(Copy, Clone, Eq, PartialEq)]
5384 pub struct Swpr(pub u32); 5393 pub struct Ifcr(pub u32);
5385 impl Swpr { 5394 impl Ifcr {
5386 #[doc = "SRAWM2 write protection."] 5395 #[doc = "Channel 1 Global interrupt clear"]
5387 pub fn pwp(&self, n: usize) -> bool { 5396 pub fn cgif(&self, n: usize) -> bool {
5388 assert!(n < 32usize); 5397 assert!(n < 7usize);
5389 let offs = 0usize + n * 1usize; 5398 let offs = 0usize + n * 4usize;
5390 let val = (self.0 >> offs) & 0x01; 5399 let val = (self.0 >> offs) & 0x01;
5391 val != 0 5400 val != 0
5392 } 5401 }
5393 #[doc = "SRAWM2 write protection."] 5402 #[doc = "Channel 1 Global interrupt clear"]
5394 pub fn set_pwp(&mut self, n: usize, val: bool) { 5403 pub fn set_cgif(&mut self, n: usize, val: bool) {
5395 assert!(n < 32usize); 5404 assert!(n < 7usize);
5396 let offs = 0usize + n * 1usize; 5405 let offs = 0usize + n * 4usize;
5397 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); 5406 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
5398 } 5407 }
5399 } 5408 #[doc = "Channel 1 Transfer Complete clear"]
5400 impl Default for Swpr { 5409 pub fn ctcif(&self, n: usize) -> bool {
5401 fn default() -> Swpr { 5410 assert!(n < 7usize);
5402 Swpr(0) 5411 let offs = 1usize + n * 4usize;
5412 let val = (self.0 >> offs) & 0x01;
5413 val != 0
5403 } 5414 }
5404 } 5415 #[doc = "Channel 1 Transfer Complete clear"]
5405 #[doc = "SCSR"] 5416 pub fn set_ctcif(&mut self, n: usize, val: bool) {
5406 #[repr(transparent)] 5417 assert!(n < 7usize);
5407 #[derive(Copy, Clone, Eq, PartialEq)] 5418 let offs = 1usize + n * 4usize;
5408 pub struct Scsr(pub u32); 5419 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
5409 impl Scsr { 5420 }
5410 #[doc = "SRAM2 Erase"] 5421 #[doc = "Channel 1 Half Transfer clear"]
5411 pub const fn sram2er(&self) -> bool { 5422 pub fn chtif(&self, n: usize) -> bool {
5412 let val = (self.0 >> 0usize) & 0x01; 5423 assert!(n < 7usize);
5424 let offs = 2usize + n * 4usize;
5425 let val = (self.0 >> offs) & 0x01;
5413 val != 0 5426 val != 0
5414 } 5427 }
5415 #[doc = "SRAM2 Erase"] 5428 #[doc = "Channel 1 Half Transfer clear"]
5416 pub fn set_sram2er(&mut self, val: bool) { 5429 pub fn set_chtif(&mut self, n: usize, val: bool) {
5417 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 5430 assert!(n < 7usize);
5431 let offs = 2usize + n * 4usize;
5432 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
5418 } 5433 }
5419 #[doc = "SRAM2 busy by erase operation"] 5434 #[doc = "Channel 1 Transfer Error clear"]
5420 pub const fn sram2bsy(&self) -> bool { 5435 pub fn cteif(&self, n: usize) -> bool {
5421 let val = (self.0 >> 1usize) & 0x01; 5436 assert!(n < 7usize);
5437 let offs = 3usize + n * 4usize;
5438 let val = (self.0 >> offs) & 0x01;
5422 val != 0 5439 val != 0
5423 } 5440 }
5424 #[doc = "SRAM2 busy by erase operation"] 5441 #[doc = "Channel 1 Transfer Error clear"]
5425 pub fn set_sram2bsy(&mut self, val: bool) { 5442 pub fn set_cteif(&mut self, n: usize, val: bool) {
5426 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); 5443 assert!(n < 7usize);
5444 let offs = 3usize + n * 4usize;
5445 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
5427 } 5446 }
5428 } 5447 }
5429 impl Default for Scsr { 5448 impl Default for Ifcr {
5430 fn default() -> Scsr { 5449 fn default() -> Ifcr {
5431 Scsr(0) 5450 Ifcr(0)
5432 } 5451 }
5433 } 5452 }
5434 #[doc = "external interrupt configuration register 4"] 5453 }
5454 pub mod vals {
5455 use crate::generic::*;
5435 #[repr(transparent)] 5456 #[repr(transparent)]
5436 #[derive(Copy, Clone, Eq, PartialEq)] 5457 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5437 pub struct Exticr(pub u32); 5458 pub struct Dir(pub u8);
5438 impl Exticr { 5459 impl Dir {
5439 #[doc = "EXTI12 configuration bits"] 5460 #[doc = "Read from peripheral"]
5440 pub fn exti(&self, n: usize) -> u8 { 5461 pub const FROMPERIPHERAL: Self = Self(0);
5441 assert!(n < 4usize); 5462 #[doc = "Read from memory"]
5442 let offs = 0usize + n * 4usize; 5463 pub const FROMMEMORY: Self = Self(0x01);
5443 let val = (self.0 >> offs) & 0x0f;
5444 val as u8
5445 }
5446 #[doc = "EXTI12 configuration bits"]
5447 pub fn set_exti(&mut self, n: usize, val: u8) {
5448 assert!(n < 4usize);
5449 let offs = 0usize + n * 4usize;
5450 self.0 = (self.0 & !(0x0f << offs)) | (((val as u32) & 0x0f) << offs);
5451 }
5452 } 5464 }
5453 impl Default for Exticr { 5465 #[repr(transparent)]
5454 fn default() -> Exticr { 5466 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5455 Exticr(0) 5467 pub struct Inc(pub u8);
5456 } 5468 impl Inc {
5469 #[doc = "Increment mode disabled"]
5470 pub const DISABLED: Self = Self(0);
5471 #[doc = "Increment mode enabled"]
5472 pub const ENABLED: Self = Self(0x01);
5457 } 5473 }
5458 #[doc = "memory remap register"]
5459 #[repr(transparent)] 5474 #[repr(transparent)]
5460 #[derive(Copy, Clone, Eq, PartialEq)] 5475 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5461 pub struct Memrmp(pub u32); 5476 pub struct Memmem(pub u8);
5462 impl Memrmp { 5477 impl Memmem {
5463 #[doc = "Memory mapping selection"] 5478 #[doc = "Memory to memory mode disabled"]
5464 pub const fn mem_mode(&self) -> u8 { 5479 pub const DISABLED: Self = Self(0);
5465 let val = (self.0 >> 0usize) & 0x07; 5480 #[doc = "Memory to memory mode enabled"]
5466 val as u8 5481 pub const ENABLED: Self = Self(0x01);
5467 }
5468 #[doc = "Memory mapping selection"]
5469 pub fn set_mem_mode(&mut self, val: u8) {
5470 self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize);
5471 }
5472 #[doc = "QUADSPI memory mapping swap"]
5473 pub const fn qfs(&self) -> bool {
5474 let val = (self.0 >> 3usize) & 0x01;
5475 val != 0
5476 }
5477 #[doc = "QUADSPI memory mapping swap"]
5478 pub fn set_qfs(&mut self, val: bool) {
5479 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
5480 }
5481 #[doc = "Flash Bank mode selection"]
5482 pub const fn fb_mode(&self) -> bool {
5483 let val = (self.0 >> 8usize) & 0x01;
5484 val != 0
5485 }
5486 #[doc = "Flash Bank mode selection"]
5487 pub fn set_fb_mode(&mut self, val: bool) {
5488 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
5489 }
5490 } 5482 }
5491 impl Default for Memrmp { 5483 #[repr(transparent)]
5492 fn default() -> Memrmp { 5484 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5493 Memrmp(0) 5485 pub struct Size(pub u8);
5494 } 5486 impl Size {
5487 #[doc = "8-bit size"]
5488 pub const BITS8: Self = Self(0);
5489 #[doc = "16-bit size"]
5490 pub const BITS16: Self = Self(0x01);
5491 #[doc = "32-bit size"]
5492 pub const BITS32: Self = Self(0x02);
5495 } 5493 }
5496 #[doc = "SKR"]
5497 #[repr(transparent)] 5494 #[repr(transparent)]
5498 #[derive(Copy, Clone, Eq, PartialEq)] 5495 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5499 pub struct Skr(pub u32); 5496 pub struct Pl(pub u8);
5500 impl Skr { 5497 impl Pl {
5501 #[doc = "SRAM2 write protection key for software erase"] 5498 #[doc = "Low priority"]
5502 pub const fn key(&self) -> u8 { 5499 pub const LOW: Self = Self(0);
5503 let val = (self.0 >> 0usize) & 0xff; 5500 #[doc = "Medium priority"]
5504 val as u8 5501 pub const MEDIUM: Self = Self(0x01);
5505 } 5502 #[doc = "High priority"]
5506 #[doc = "SRAM2 write protection key for software erase"] 5503 pub const HIGH: Self = Self(0x02);
5507 pub fn set_key(&mut self, val: u8) { 5504 #[doc = "Very high priority"]
5508 self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); 5505 pub const VERYHIGH: Self = Self(0x03);
5509 }
5510 } 5506 }
5511 impl Default for Skr { 5507 #[repr(transparent)]
5512 fn default() -> Skr { 5508 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5513 Skr(0) 5509 pub struct Circ(pub u8);
5514 } 5510 impl Circ {
5511 #[doc = "Circular buffer disabled"]
5512 pub const DISABLED: Self = Self(0);
5513 #[doc = "Circular buffer enabled"]
5514 pub const ENABLED: Self = Self(0x01);
5515 } 5515 }
5516 } 5516 }
5517} 5517}
diff --git a/embassy-stm32/src/pac/stm32f405oe.rs b/embassy-stm32/src/pac/stm32f405oe.rs
index cd1b5efdb..55def9b77 100644
--- a/embassy-stm32/src/pac/stm32f405oe.rs
+++ b/embassy-stm32/src/pac/stm32f405oe.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
165pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 165pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
166impl_usart!(USART1); 166impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f405og.rs b/embassy-stm32/src/pac/stm32f405og.rs
index cd1b5efdb..55def9b77 100644
--- a/embassy-stm32/src/pac/stm32f405og.rs
+++ b/embassy-stm32/src/pac/stm32f405og.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
165pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 165pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
166impl_usart!(USART1); 166impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f405rg.rs b/embassy-stm32/src/pac/stm32f405rg.rs
index cd1b5efdb..55def9b77 100644
--- a/embassy-stm32/src/pac/stm32f405rg.rs
+++ b/embassy-stm32/src/pac/stm32f405rg.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
165pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 165pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
166impl_usart!(USART1); 166impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f405vg.rs b/embassy-stm32/src/pac/stm32f405vg.rs
index cd1b5efdb..55def9b77 100644
--- a/embassy-stm32/src/pac/stm32f405vg.rs
+++ b/embassy-stm32/src/pac/stm32f405vg.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
165pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 165pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
166impl_usart!(USART1); 166impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f405zg.rs b/embassy-stm32/src/pac/stm32f405zg.rs
index cd1b5efdb..55def9b77 100644
--- a/embassy-stm32/src/pac/stm32f405zg.rs
+++ b/embassy-stm32/src/pac/stm32f405zg.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
165pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 165pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
166impl_usart!(USART1); 166impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f407ie.rs b/embassy-stm32/src/pac/stm32f407ie.rs
index cd9ac846d..d54d54fe8 100644
--- a/embassy-stm32/src/pac/stm32f407ie.rs
+++ b/embassy-stm32/src/pac/stm32f407ie.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
165pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 165pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
166impl_usart!(USART1); 166impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f407ig.rs b/embassy-stm32/src/pac/stm32f407ig.rs
index cd9ac846d..d54d54fe8 100644
--- a/embassy-stm32/src/pac/stm32f407ig.rs
+++ b/embassy-stm32/src/pac/stm32f407ig.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
165pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 165pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
166impl_usart!(USART1); 166impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f407ve.rs b/embassy-stm32/src/pac/stm32f407ve.rs
index cd9ac846d..d54d54fe8 100644
--- a/embassy-stm32/src/pac/stm32f407ve.rs
+++ b/embassy-stm32/src/pac/stm32f407ve.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
165pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 165pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
166impl_usart!(USART1); 166impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f407vg.rs b/embassy-stm32/src/pac/stm32f407vg.rs
index cd9ac846d..d54d54fe8 100644
--- a/embassy-stm32/src/pac/stm32f407vg.rs
+++ b/embassy-stm32/src/pac/stm32f407vg.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
165pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 165pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
166impl_usart!(USART1); 166impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f407ze.rs b/embassy-stm32/src/pac/stm32f407ze.rs
index cd9ac846d..d54d54fe8 100644
--- a/embassy-stm32/src/pac/stm32f407ze.rs
+++ b/embassy-stm32/src/pac/stm32f407ze.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
165pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 165pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
166impl_usart!(USART1); 166impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f407zg.rs b/embassy-stm32/src/pac/stm32f407zg.rs
index cd9ac846d..d54d54fe8 100644
--- a/embassy-stm32/src/pac/stm32f407zg.rs
+++ b/embassy-stm32/src/pac/stm32f407zg.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
165pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 165pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
166impl_usart!(USART1); 166impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f410c8.rs b/embassy-stm32/src/pac/stm32f410c8.rs
index a5c8a6b64..c5eb48a7f 100644
--- a/embassy-stm32/src/pac/stm32f410c8.rs
+++ b/embassy-stm32/src/pac/stm32f410c8.rs
@@ -75,7 +75,7 @@ pub const GPIOB: gpio::Gpio = gpio::Gpio(0x40020400 as _);
75pub const GPIOC: gpio::Gpio = gpio::Gpio(0x40020800 as _); 75pub const GPIOC: gpio::Gpio = gpio::Gpio(0x40020800 as _);
76pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _); 76pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _);
77pub const RNG: rng::Rng = rng::Rng(0x40080000 as _); 77pub const RNG: rng::Rng = rng::Rng(0x40080000 as _);
78impl_rng!(); 78impl_rng!(RNG);
79pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 79pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
80pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 80pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
81impl_usart!(USART1); 81impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f410cb.rs b/embassy-stm32/src/pac/stm32f410cb.rs
index a5c8a6b64..c5eb48a7f 100644
--- a/embassy-stm32/src/pac/stm32f410cb.rs
+++ b/embassy-stm32/src/pac/stm32f410cb.rs
@@ -75,7 +75,7 @@ pub const GPIOB: gpio::Gpio = gpio::Gpio(0x40020400 as _);
75pub const GPIOC: gpio::Gpio = gpio::Gpio(0x40020800 as _); 75pub const GPIOC: gpio::Gpio = gpio::Gpio(0x40020800 as _);
76pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _); 76pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _);
77pub const RNG: rng::Rng = rng::Rng(0x40080000 as _); 77pub const RNG: rng::Rng = rng::Rng(0x40080000 as _);
78impl_rng!(); 78impl_rng!(RNG);
79pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 79pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
80pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 80pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
81impl_usart!(USART1); 81impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f410r8.rs b/embassy-stm32/src/pac/stm32f410r8.rs
index a5c8a6b64..c5eb48a7f 100644
--- a/embassy-stm32/src/pac/stm32f410r8.rs
+++ b/embassy-stm32/src/pac/stm32f410r8.rs
@@ -75,7 +75,7 @@ pub const GPIOB: gpio::Gpio = gpio::Gpio(0x40020400 as _);
75pub const GPIOC: gpio::Gpio = gpio::Gpio(0x40020800 as _); 75pub const GPIOC: gpio::Gpio = gpio::Gpio(0x40020800 as _);
76pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _); 76pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _);
77pub const RNG: rng::Rng = rng::Rng(0x40080000 as _); 77pub const RNG: rng::Rng = rng::Rng(0x40080000 as _);
78impl_rng!(); 78impl_rng!(RNG);
79pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 79pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
80pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 80pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
81impl_usart!(USART1); 81impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f410rb.rs b/embassy-stm32/src/pac/stm32f410rb.rs
index a5c8a6b64..c5eb48a7f 100644
--- a/embassy-stm32/src/pac/stm32f410rb.rs
+++ b/embassy-stm32/src/pac/stm32f410rb.rs
@@ -75,7 +75,7 @@ pub const GPIOB: gpio::Gpio = gpio::Gpio(0x40020400 as _);
75pub const GPIOC: gpio::Gpio = gpio::Gpio(0x40020800 as _); 75pub const GPIOC: gpio::Gpio = gpio::Gpio(0x40020800 as _);
76pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _); 76pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _);
77pub const RNG: rng::Rng = rng::Rng(0x40080000 as _); 77pub const RNG: rng::Rng = rng::Rng(0x40080000 as _);
78impl_rng!(); 78impl_rng!(RNG);
79pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 79pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
80pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 80pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
81impl_usart!(USART1); 81impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f410t8.rs b/embassy-stm32/src/pac/stm32f410t8.rs
index 0b82a79c7..1eb28b9fc 100644
--- a/embassy-stm32/src/pac/stm32f410t8.rs
+++ b/embassy-stm32/src/pac/stm32f410t8.rs
@@ -75,7 +75,7 @@ pub const GPIOB: gpio::Gpio = gpio::Gpio(0x40020400 as _);
75pub const GPIOC: gpio::Gpio = gpio::Gpio(0x40020800 as _); 75pub const GPIOC: gpio::Gpio = gpio::Gpio(0x40020800 as _);
76pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _); 76pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _);
77pub const RNG: rng::Rng = rng::Rng(0x40080000 as _); 77pub const RNG: rng::Rng = rng::Rng(0x40080000 as _);
78impl_rng!(); 78impl_rng!(RNG);
79pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 79pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
80pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 80pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
81impl_usart!(USART1); 81impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f410tb.rs b/embassy-stm32/src/pac/stm32f410tb.rs
index 0b82a79c7..1eb28b9fc 100644
--- a/embassy-stm32/src/pac/stm32f410tb.rs
+++ b/embassy-stm32/src/pac/stm32f410tb.rs
@@ -75,7 +75,7 @@ pub const GPIOB: gpio::Gpio = gpio::Gpio(0x40020400 as _);
75pub const GPIOC: gpio::Gpio = gpio::Gpio(0x40020800 as _); 75pub const GPIOC: gpio::Gpio = gpio::Gpio(0x40020800 as _);
76pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _); 76pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _);
77pub const RNG: rng::Rng = rng::Rng(0x40080000 as _); 77pub const RNG: rng::Rng = rng::Rng(0x40080000 as _);
78impl_rng!(); 78impl_rng!(RNG);
79pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 79pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
80pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 80pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
81impl_usart!(USART1); 81impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f412ce.rs b/embassy-stm32/src/pac/stm32f412ce.rs
index 71c50ac96..0684b55da 100644
--- a/embassy-stm32/src/pac/stm32f412ce.rs
+++ b/embassy-stm32/src/pac/stm32f412ce.rs
@@ -75,7 +75,7 @@ pub const GPIOB: gpio::Gpio = gpio::Gpio(0x40020400 as _);
75pub const GPIOC: gpio::Gpio = gpio::Gpio(0x40020800 as _); 75pub const GPIOC: gpio::Gpio = gpio::Gpio(0x40020800 as _);
76pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _); 76pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _);
77pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 77pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
78impl_rng!(); 78impl_rng!(RNG);
79pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 79pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
80pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 80pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
81impl_usart!(USART1); 81impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f412cg.rs b/embassy-stm32/src/pac/stm32f412cg.rs
index 71c50ac96..0684b55da 100644
--- a/embassy-stm32/src/pac/stm32f412cg.rs
+++ b/embassy-stm32/src/pac/stm32f412cg.rs
@@ -75,7 +75,7 @@ pub const GPIOB: gpio::Gpio = gpio::Gpio(0x40020400 as _);
75pub const GPIOC: gpio::Gpio = gpio::Gpio(0x40020800 as _); 75pub const GPIOC: gpio::Gpio = gpio::Gpio(0x40020800 as _);
76pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _); 76pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _);
77pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 77pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
78impl_rng!(); 78impl_rng!(RNG);
79pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 79pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
80pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 80pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
81impl_usart!(USART1); 81impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f412re.rs b/embassy-stm32/src/pac/stm32f412re.rs
index 54ae3a02b..1c1d5221d 100644
--- a/embassy-stm32/src/pac/stm32f412re.rs
+++ b/embassy-stm32/src/pac/stm32f412re.rs
@@ -92,7 +92,7 @@ pub const GPIOC: gpio::Gpio = gpio::Gpio(0x40020800 as _);
92pub const GPIOD: gpio::Gpio = gpio::Gpio(0x40020c00 as _); 92pub const GPIOD: gpio::Gpio = gpio::Gpio(0x40020c00 as _);
93pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _); 93pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _);
94pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 94pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
95impl_rng!(); 95impl_rng!(RNG);
96pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 96pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
97pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 97pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
98impl_usart!(USART1); 98impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f412rg.rs b/embassy-stm32/src/pac/stm32f412rg.rs
index 54ae3a02b..1c1d5221d 100644
--- a/embassy-stm32/src/pac/stm32f412rg.rs
+++ b/embassy-stm32/src/pac/stm32f412rg.rs
@@ -92,7 +92,7 @@ pub const GPIOC: gpio::Gpio = gpio::Gpio(0x40020800 as _);
92pub const GPIOD: gpio::Gpio = gpio::Gpio(0x40020c00 as _); 92pub const GPIOD: gpio::Gpio = gpio::Gpio(0x40020c00 as _);
93pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _); 93pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _);
94pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 94pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
95impl_rng!(); 95impl_rng!(RNG);
96pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 96pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
97pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 97pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
98impl_usart!(USART1); 98impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f412ve.rs b/embassy-stm32/src/pac/stm32f412ve.rs
index d6e4e116a..b45a90fad 100644
--- a/embassy-stm32/src/pac/stm32f412ve.rs
+++ b/embassy-stm32/src/pac/stm32f412ve.rs
@@ -143,7 +143,7 @@ pub const GPIOF: gpio::Gpio = gpio::Gpio(0x40021400 as _);
143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _); 143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _);
144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _); 144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _);
145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
146impl_rng!(); 146impl_rng!(RNG);
147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
148pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 148pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
149impl_usart!(USART1); 149impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f412vg.rs b/embassy-stm32/src/pac/stm32f412vg.rs
index d6e4e116a..b45a90fad 100644
--- a/embassy-stm32/src/pac/stm32f412vg.rs
+++ b/embassy-stm32/src/pac/stm32f412vg.rs
@@ -143,7 +143,7 @@ pub const GPIOF: gpio::Gpio = gpio::Gpio(0x40021400 as _);
143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _); 143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _);
144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _); 144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _);
145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
146impl_rng!(); 146impl_rng!(RNG);
147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
148pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 148pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
149impl_usart!(USART1); 149impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f412ze.rs b/embassy-stm32/src/pac/stm32f412ze.rs
index d6e4e116a..b45a90fad 100644
--- a/embassy-stm32/src/pac/stm32f412ze.rs
+++ b/embassy-stm32/src/pac/stm32f412ze.rs
@@ -143,7 +143,7 @@ pub const GPIOF: gpio::Gpio = gpio::Gpio(0x40021400 as _);
143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _); 143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _);
144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _); 144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _);
145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
146impl_rng!(); 146impl_rng!(RNG);
147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
148pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 148pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
149impl_usart!(USART1); 149impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f412zg.rs b/embassy-stm32/src/pac/stm32f412zg.rs
index d6e4e116a..b45a90fad 100644
--- a/embassy-stm32/src/pac/stm32f412zg.rs
+++ b/embassy-stm32/src/pac/stm32f412zg.rs
@@ -143,7 +143,7 @@ pub const GPIOF: gpio::Gpio = gpio::Gpio(0x40021400 as _);
143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _); 143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _);
144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _); 144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _);
145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
146impl_rng!(); 146impl_rng!(RNG);
147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
148pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 148pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
149impl_usart!(USART1); 149impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f413cg.rs b/embassy-stm32/src/pac/stm32f413cg.rs
index fe503b506..3ac805c97 100644
--- a/embassy-stm32/src/pac/stm32f413cg.rs
+++ b/embassy-stm32/src/pac/stm32f413cg.rs
@@ -143,7 +143,7 @@ pub const GPIOF: gpio::Gpio = gpio::Gpio(0x40021400 as _);
143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _); 143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _);
144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _); 144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _);
145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
146impl_rng!(); 146impl_rng!(RNG);
147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
148pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 148pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
149impl_usart!(USART1); 149impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f413ch.rs b/embassy-stm32/src/pac/stm32f413ch.rs
index fe503b506..3ac805c97 100644
--- a/embassy-stm32/src/pac/stm32f413ch.rs
+++ b/embassy-stm32/src/pac/stm32f413ch.rs
@@ -143,7 +143,7 @@ pub const GPIOF: gpio::Gpio = gpio::Gpio(0x40021400 as _);
143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _); 143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _);
144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _); 144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _);
145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
146impl_rng!(); 146impl_rng!(RNG);
147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
148pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 148pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
149impl_usart!(USART1); 149impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f413mg.rs b/embassy-stm32/src/pac/stm32f413mg.rs
index 81fe90c18..d841d79f5 100644
--- a/embassy-stm32/src/pac/stm32f413mg.rs
+++ b/embassy-stm32/src/pac/stm32f413mg.rs
@@ -143,7 +143,7 @@ pub const GPIOF: gpio::Gpio = gpio::Gpio(0x40021400 as _);
143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _); 143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _);
144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _); 144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _);
145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
146impl_rng!(); 146impl_rng!(RNG);
147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
148pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 148pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
149impl_usart!(USART1); 149impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f413mh.rs b/embassy-stm32/src/pac/stm32f413mh.rs
index 81fe90c18..d841d79f5 100644
--- a/embassy-stm32/src/pac/stm32f413mh.rs
+++ b/embassy-stm32/src/pac/stm32f413mh.rs
@@ -143,7 +143,7 @@ pub const GPIOF: gpio::Gpio = gpio::Gpio(0x40021400 as _);
143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _); 143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _);
144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _); 144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _);
145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
146impl_rng!(); 146impl_rng!(RNG);
147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
148pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 148pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
149impl_usart!(USART1); 149impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f413rg.rs b/embassy-stm32/src/pac/stm32f413rg.rs
index 81fe90c18..d841d79f5 100644
--- a/embassy-stm32/src/pac/stm32f413rg.rs
+++ b/embassy-stm32/src/pac/stm32f413rg.rs
@@ -143,7 +143,7 @@ pub const GPIOF: gpio::Gpio = gpio::Gpio(0x40021400 as _);
143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _); 143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _);
144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _); 144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _);
145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
146impl_rng!(); 146impl_rng!(RNG);
147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
148pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 148pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
149impl_usart!(USART1); 149impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f413rh.rs b/embassy-stm32/src/pac/stm32f413rh.rs
index 81fe90c18..d841d79f5 100644
--- a/embassy-stm32/src/pac/stm32f413rh.rs
+++ b/embassy-stm32/src/pac/stm32f413rh.rs
@@ -143,7 +143,7 @@ pub const GPIOF: gpio::Gpio = gpio::Gpio(0x40021400 as _);
143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _); 143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _);
144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _); 144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _);
145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
146impl_rng!(); 146impl_rng!(RNG);
147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
148pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 148pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
149impl_usart!(USART1); 149impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f413vg.rs b/embassy-stm32/src/pac/stm32f413vg.rs
index 81fe90c18..d841d79f5 100644
--- a/embassy-stm32/src/pac/stm32f413vg.rs
+++ b/embassy-stm32/src/pac/stm32f413vg.rs
@@ -143,7 +143,7 @@ pub const GPIOF: gpio::Gpio = gpio::Gpio(0x40021400 as _);
143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _); 143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _);
144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _); 144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _);
145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
146impl_rng!(); 146impl_rng!(RNG);
147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
148pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 148pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
149impl_usart!(USART1); 149impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f413vh.rs b/embassy-stm32/src/pac/stm32f413vh.rs
index 81fe90c18..d841d79f5 100644
--- a/embassy-stm32/src/pac/stm32f413vh.rs
+++ b/embassy-stm32/src/pac/stm32f413vh.rs
@@ -143,7 +143,7 @@ pub const GPIOF: gpio::Gpio = gpio::Gpio(0x40021400 as _);
143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _); 143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _);
144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _); 144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _);
145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
146impl_rng!(); 146impl_rng!(RNG);
147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
148pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 148pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
149impl_usart!(USART1); 149impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f413zg.rs b/embassy-stm32/src/pac/stm32f413zg.rs
index 81fe90c18..d841d79f5 100644
--- a/embassy-stm32/src/pac/stm32f413zg.rs
+++ b/embassy-stm32/src/pac/stm32f413zg.rs
@@ -143,7 +143,7 @@ pub const GPIOF: gpio::Gpio = gpio::Gpio(0x40021400 as _);
143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _); 143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _);
144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _); 144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _);
145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
146impl_rng!(); 146impl_rng!(RNG);
147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
148pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 148pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
149impl_usart!(USART1); 149impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f413zh.rs b/embassy-stm32/src/pac/stm32f413zh.rs
index 81fe90c18..d841d79f5 100644
--- a/embassy-stm32/src/pac/stm32f413zh.rs
+++ b/embassy-stm32/src/pac/stm32f413zh.rs
@@ -143,7 +143,7 @@ pub const GPIOF: gpio::Gpio = gpio::Gpio(0x40021400 as _);
143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _); 143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _);
144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _); 144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _);
145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
146impl_rng!(); 146impl_rng!(RNG);
147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
148pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 148pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
149impl_usart!(USART1); 149impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f415og.rs b/embassy-stm32/src/pac/stm32f415og.rs
index 7b3b9554d..df71f8770 100644
--- a/embassy-stm32/src/pac/stm32f415og.rs
+++ b/embassy-stm32/src/pac/stm32f415og.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
165pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 165pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
166impl_usart!(USART1); 166impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f415rg.rs b/embassy-stm32/src/pac/stm32f415rg.rs
index 7b3b9554d..df71f8770 100644
--- a/embassy-stm32/src/pac/stm32f415rg.rs
+++ b/embassy-stm32/src/pac/stm32f415rg.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
165pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 165pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
166impl_usart!(USART1); 166impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f415vg.rs b/embassy-stm32/src/pac/stm32f415vg.rs
index 7b3b9554d..df71f8770 100644
--- a/embassy-stm32/src/pac/stm32f415vg.rs
+++ b/embassy-stm32/src/pac/stm32f415vg.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
165pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 165pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
166impl_usart!(USART1); 166impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f415zg.rs b/embassy-stm32/src/pac/stm32f415zg.rs
index 7b3b9554d..df71f8770 100644
--- a/embassy-stm32/src/pac/stm32f415zg.rs
+++ b/embassy-stm32/src/pac/stm32f415zg.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
165pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 165pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
166impl_usart!(USART1); 166impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f417ie.rs b/embassy-stm32/src/pac/stm32f417ie.rs
index ed84cd007..2e802e9e9 100644
--- a/embassy-stm32/src/pac/stm32f417ie.rs
+++ b/embassy-stm32/src/pac/stm32f417ie.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
165pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 165pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
166impl_usart!(USART1); 166impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f417ig.rs b/embassy-stm32/src/pac/stm32f417ig.rs
index ed84cd007..2e802e9e9 100644
--- a/embassy-stm32/src/pac/stm32f417ig.rs
+++ b/embassy-stm32/src/pac/stm32f417ig.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
165pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 165pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
166impl_usart!(USART1); 166impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f417ve.rs b/embassy-stm32/src/pac/stm32f417ve.rs
index ed84cd007..2e802e9e9 100644
--- a/embassy-stm32/src/pac/stm32f417ve.rs
+++ b/embassy-stm32/src/pac/stm32f417ve.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
165pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 165pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
166impl_usart!(USART1); 166impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f417vg.rs b/embassy-stm32/src/pac/stm32f417vg.rs
index ed84cd007..2e802e9e9 100644
--- a/embassy-stm32/src/pac/stm32f417vg.rs
+++ b/embassy-stm32/src/pac/stm32f417vg.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
165pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 165pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
166impl_usart!(USART1); 166impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f417ze.rs b/embassy-stm32/src/pac/stm32f417ze.rs
index ed84cd007..2e802e9e9 100644
--- a/embassy-stm32/src/pac/stm32f417ze.rs
+++ b/embassy-stm32/src/pac/stm32f417ze.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
165pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 165pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
166impl_usart!(USART1); 166impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f417zg.rs b/embassy-stm32/src/pac/stm32f417zg.rs
index ed84cd007..2e802e9e9 100644
--- a/embassy-stm32/src/pac/stm32f417zg.rs
+++ b/embassy-stm32/src/pac/stm32f417zg.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
165pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 165pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
166impl_usart!(USART1); 166impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f423ch.rs b/embassy-stm32/src/pac/stm32f423ch.rs
index f2d37b514..3dd033251 100644
--- a/embassy-stm32/src/pac/stm32f423ch.rs
+++ b/embassy-stm32/src/pac/stm32f423ch.rs
@@ -143,7 +143,7 @@ pub const GPIOF: gpio::Gpio = gpio::Gpio(0x40021400 as _);
143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _); 143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _);
144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _); 144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _);
145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
146impl_rng!(); 146impl_rng!(RNG);
147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
148pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 148pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
149impl_usart!(USART1); 149impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f423mh.rs b/embassy-stm32/src/pac/stm32f423mh.rs
index ab5370902..0e844e7db 100644
--- a/embassy-stm32/src/pac/stm32f423mh.rs
+++ b/embassy-stm32/src/pac/stm32f423mh.rs
@@ -143,7 +143,7 @@ pub const GPIOF: gpio::Gpio = gpio::Gpio(0x40021400 as _);
143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _); 143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _);
144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _); 144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _);
145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
146impl_rng!(); 146impl_rng!(RNG);
147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
148pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 148pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
149impl_usart!(USART1); 149impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f423rh.rs b/embassy-stm32/src/pac/stm32f423rh.rs
index ab5370902..0e844e7db 100644
--- a/embassy-stm32/src/pac/stm32f423rh.rs
+++ b/embassy-stm32/src/pac/stm32f423rh.rs
@@ -143,7 +143,7 @@ pub const GPIOF: gpio::Gpio = gpio::Gpio(0x40021400 as _);
143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _); 143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _);
144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _); 144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _);
145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
146impl_rng!(); 146impl_rng!(RNG);
147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
148pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 148pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
149impl_usart!(USART1); 149impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f423vh.rs b/embassy-stm32/src/pac/stm32f423vh.rs
index ab5370902..0e844e7db 100644
--- a/embassy-stm32/src/pac/stm32f423vh.rs
+++ b/embassy-stm32/src/pac/stm32f423vh.rs
@@ -143,7 +143,7 @@ pub const GPIOF: gpio::Gpio = gpio::Gpio(0x40021400 as _);
143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _); 143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _);
144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _); 144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _);
145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
146impl_rng!(); 146impl_rng!(RNG);
147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
148pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 148pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
149impl_usart!(USART1); 149impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f423zh.rs b/embassy-stm32/src/pac/stm32f423zh.rs
index ab5370902..0e844e7db 100644
--- a/embassy-stm32/src/pac/stm32f423zh.rs
+++ b/embassy-stm32/src/pac/stm32f423zh.rs
@@ -143,7 +143,7 @@ pub const GPIOF: gpio::Gpio = gpio::Gpio(0x40021400 as _);
143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _); 143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x40021800 as _);
144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _); 144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x40021c00 as _);
145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
146impl_rng!(); 146impl_rng!(RNG);
147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
148pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 148pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
149impl_usart!(USART1); 149impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f427ag.rs b/embassy-stm32/src/pac/stm32f427ag.rs
index 25ef303f2..36a117c12 100644
--- a/embassy-stm32/src/pac/stm32f427ag.rs
+++ b/embassy-stm32/src/pac/stm32f427ag.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f427ai.rs b/embassy-stm32/src/pac/stm32f427ai.rs
index 25ef303f2..36a117c12 100644
--- a/embassy-stm32/src/pac/stm32f427ai.rs
+++ b/embassy-stm32/src/pac/stm32f427ai.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f427ig.rs b/embassy-stm32/src/pac/stm32f427ig.rs
index 25ef303f2..36a117c12 100644
--- a/embassy-stm32/src/pac/stm32f427ig.rs
+++ b/embassy-stm32/src/pac/stm32f427ig.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f427ii.rs b/embassy-stm32/src/pac/stm32f427ii.rs
index 25ef303f2..36a117c12 100644
--- a/embassy-stm32/src/pac/stm32f427ii.rs
+++ b/embassy-stm32/src/pac/stm32f427ii.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f427vg.rs b/embassy-stm32/src/pac/stm32f427vg.rs
index 25ef303f2..36a117c12 100644
--- a/embassy-stm32/src/pac/stm32f427vg.rs
+++ b/embassy-stm32/src/pac/stm32f427vg.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f427vi.rs b/embassy-stm32/src/pac/stm32f427vi.rs
index 25ef303f2..36a117c12 100644
--- a/embassy-stm32/src/pac/stm32f427vi.rs
+++ b/embassy-stm32/src/pac/stm32f427vi.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f427zg.rs b/embassy-stm32/src/pac/stm32f427zg.rs
index 25ef303f2..36a117c12 100644
--- a/embassy-stm32/src/pac/stm32f427zg.rs
+++ b/embassy-stm32/src/pac/stm32f427zg.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f427zi.rs b/embassy-stm32/src/pac/stm32f427zi.rs
index 25ef303f2..36a117c12 100644
--- a/embassy-stm32/src/pac/stm32f427zi.rs
+++ b/embassy-stm32/src/pac/stm32f427zi.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f429ag.rs b/embassy-stm32/src/pac/stm32f429ag.rs
index 92d69e1ee..2e314d2f3 100644
--- a/embassy-stm32/src/pac/stm32f429ag.rs
+++ b/embassy-stm32/src/pac/stm32f429ag.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f429ai.rs b/embassy-stm32/src/pac/stm32f429ai.rs
index 92d69e1ee..2e314d2f3 100644
--- a/embassy-stm32/src/pac/stm32f429ai.rs
+++ b/embassy-stm32/src/pac/stm32f429ai.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f429be.rs b/embassy-stm32/src/pac/stm32f429be.rs
index 92d69e1ee..2e314d2f3 100644
--- a/embassy-stm32/src/pac/stm32f429be.rs
+++ b/embassy-stm32/src/pac/stm32f429be.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f429bg.rs b/embassy-stm32/src/pac/stm32f429bg.rs
index 92d69e1ee..2e314d2f3 100644
--- a/embassy-stm32/src/pac/stm32f429bg.rs
+++ b/embassy-stm32/src/pac/stm32f429bg.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f429bi.rs b/embassy-stm32/src/pac/stm32f429bi.rs
index 92d69e1ee..2e314d2f3 100644
--- a/embassy-stm32/src/pac/stm32f429bi.rs
+++ b/embassy-stm32/src/pac/stm32f429bi.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f429ie.rs b/embassy-stm32/src/pac/stm32f429ie.rs
index 92d69e1ee..2e314d2f3 100644
--- a/embassy-stm32/src/pac/stm32f429ie.rs
+++ b/embassy-stm32/src/pac/stm32f429ie.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f429ig.rs b/embassy-stm32/src/pac/stm32f429ig.rs
index 92d69e1ee..2e314d2f3 100644
--- a/embassy-stm32/src/pac/stm32f429ig.rs
+++ b/embassy-stm32/src/pac/stm32f429ig.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f429ii.rs b/embassy-stm32/src/pac/stm32f429ii.rs
index 92d69e1ee..2e314d2f3 100644
--- a/embassy-stm32/src/pac/stm32f429ii.rs
+++ b/embassy-stm32/src/pac/stm32f429ii.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f429ne.rs b/embassy-stm32/src/pac/stm32f429ne.rs
index 92d69e1ee..2e314d2f3 100644
--- a/embassy-stm32/src/pac/stm32f429ne.rs
+++ b/embassy-stm32/src/pac/stm32f429ne.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f429ng.rs b/embassy-stm32/src/pac/stm32f429ng.rs
index 92d69e1ee..2e314d2f3 100644
--- a/embassy-stm32/src/pac/stm32f429ng.rs
+++ b/embassy-stm32/src/pac/stm32f429ng.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f429ni.rs b/embassy-stm32/src/pac/stm32f429ni.rs
index 92d69e1ee..2e314d2f3 100644
--- a/embassy-stm32/src/pac/stm32f429ni.rs
+++ b/embassy-stm32/src/pac/stm32f429ni.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f429ve.rs b/embassy-stm32/src/pac/stm32f429ve.rs
index 92d69e1ee..2e314d2f3 100644
--- a/embassy-stm32/src/pac/stm32f429ve.rs
+++ b/embassy-stm32/src/pac/stm32f429ve.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f429vg.rs b/embassy-stm32/src/pac/stm32f429vg.rs
index 92d69e1ee..2e314d2f3 100644
--- a/embassy-stm32/src/pac/stm32f429vg.rs
+++ b/embassy-stm32/src/pac/stm32f429vg.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f429vi.rs b/embassy-stm32/src/pac/stm32f429vi.rs
index 92d69e1ee..2e314d2f3 100644
--- a/embassy-stm32/src/pac/stm32f429vi.rs
+++ b/embassy-stm32/src/pac/stm32f429vi.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f429ze.rs b/embassy-stm32/src/pac/stm32f429ze.rs
index 92d69e1ee..2e314d2f3 100644
--- a/embassy-stm32/src/pac/stm32f429ze.rs
+++ b/embassy-stm32/src/pac/stm32f429ze.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f429zg.rs b/embassy-stm32/src/pac/stm32f429zg.rs
index 92d69e1ee..2e314d2f3 100644
--- a/embassy-stm32/src/pac/stm32f429zg.rs
+++ b/embassy-stm32/src/pac/stm32f429zg.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f429zi.rs b/embassy-stm32/src/pac/stm32f429zi.rs
index 92d69e1ee..2e314d2f3 100644
--- a/embassy-stm32/src/pac/stm32f429zi.rs
+++ b/embassy-stm32/src/pac/stm32f429zi.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f437ai.rs b/embassy-stm32/src/pac/stm32f437ai.rs
index bd699f405..a0f5e14ea 100644
--- a/embassy-stm32/src/pac/stm32f437ai.rs
+++ b/embassy-stm32/src/pac/stm32f437ai.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f437ig.rs b/embassy-stm32/src/pac/stm32f437ig.rs
index bd699f405..a0f5e14ea 100644
--- a/embassy-stm32/src/pac/stm32f437ig.rs
+++ b/embassy-stm32/src/pac/stm32f437ig.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f437ii.rs b/embassy-stm32/src/pac/stm32f437ii.rs
index bd699f405..a0f5e14ea 100644
--- a/embassy-stm32/src/pac/stm32f437ii.rs
+++ b/embassy-stm32/src/pac/stm32f437ii.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f437vg.rs b/embassy-stm32/src/pac/stm32f437vg.rs
index bd699f405..a0f5e14ea 100644
--- a/embassy-stm32/src/pac/stm32f437vg.rs
+++ b/embassy-stm32/src/pac/stm32f437vg.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f437vi.rs b/embassy-stm32/src/pac/stm32f437vi.rs
index bd699f405..a0f5e14ea 100644
--- a/embassy-stm32/src/pac/stm32f437vi.rs
+++ b/embassy-stm32/src/pac/stm32f437vi.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f437zg.rs b/embassy-stm32/src/pac/stm32f437zg.rs
index bd699f405..a0f5e14ea 100644
--- a/embassy-stm32/src/pac/stm32f437zg.rs
+++ b/embassy-stm32/src/pac/stm32f437zg.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f437zi.rs b/embassy-stm32/src/pac/stm32f437zi.rs
index bd699f405..a0f5e14ea 100644
--- a/embassy-stm32/src/pac/stm32f437zi.rs
+++ b/embassy-stm32/src/pac/stm32f437zi.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f439ai.rs b/embassy-stm32/src/pac/stm32f439ai.rs
index ba416f544..80e31cb15 100644
--- a/embassy-stm32/src/pac/stm32f439ai.rs
+++ b/embassy-stm32/src/pac/stm32f439ai.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f439bg.rs b/embassy-stm32/src/pac/stm32f439bg.rs
index ba416f544..80e31cb15 100644
--- a/embassy-stm32/src/pac/stm32f439bg.rs
+++ b/embassy-stm32/src/pac/stm32f439bg.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f439bi.rs b/embassy-stm32/src/pac/stm32f439bi.rs
index ba416f544..80e31cb15 100644
--- a/embassy-stm32/src/pac/stm32f439bi.rs
+++ b/embassy-stm32/src/pac/stm32f439bi.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f439ig.rs b/embassy-stm32/src/pac/stm32f439ig.rs
index ba416f544..80e31cb15 100644
--- a/embassy-stm32/src/pac/stm32f439ig.rs
+++ b/embassy-stm32/src/pac/stm32f439ig.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f439ii.rs b/embassy-stm32/src/pac/stm32f439ii.rs
index ba416f544..80e31cb15 100644
--- a/embassy-stm32/src/pac/stm32f439ii.rs
+++ b/embassy-stm32/src/pac/stm32f439ii.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f439ng.rs b/embassy-stm32/src/pac/stm32f439ng.rs
index ba416f544..80e31cb15 100644
--- a/embassy-stm32/src/pac/stm32f439ng.rs
+++ b/embassy-stm32/src/pac/stm32f439ng.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f439ni.rs b/embassy-stm32/src/pac/stm32f439ni.rs
index ba416f544..80e31cb15 100644
--- a/embassy-stm32/src/pac/stm32f439ni.rs
+++ b/embassy-stm32/src/pac/stm32f439ni.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f439vg.rs b/embassy-stm32/src/pac/stm32f439vg.rs
index ba416f544..80e31cb15 100644
--- a/embassy-stm32/src/pac/stm32f439vg.rs
+++ b/embassy-stm32/src/pac/stm32f439vg.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f439vi.rs b/embassy-stm32/src/pac/stm32f439vi.rs
index ba416f544..80e31cb15 100644
--- a/embassy-stm32/src/pac/stm32f439vi.rs
+++ b/embassy-stm32/src/pac/stm32f439vi.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f439zg.rs b/embassy-stm32/src/pac/stm32f439zg.rs
index ba416f544..80e31cb15 100644
--- a/embassy-stm32/src/pac/stm32f439zg.rs
+++ b/embassy-stm32/src/pac/stm32f439zg.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f439zi.rs b/embassy-stm32/src/pac/stm32f439zi.rs
index ba416f544..80e31cb15 100644
--- a/embassy-stm32/src/pac/stm32f439zi.rs
+++ b/embassy-stm32/src/pac/stm32f439zi.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f469ae.rs b/embassy-stm32/src/pac/stm32f469ae.rs
index da697dcd9..77d327564 100644
--- a/embassy-stm32/src/pac/stm32f469ae.rs
+++ b/embassy-stm32/src/pac/stm32f469ae.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f469ag.rs b/embassy-stm32/src/pac/stm32f469ag.rs
index da697dcd9..77d327564 100644
--- a/embassy-stm32/src/pac/stm32f469ag.rs
+++ b/embassy-stm32/src/pac/stm32f469ag.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f469ai.rs b/embassy-stm32/src/pac/stm32f469ai.rs
index da697dcd9..77d327564 100644
--- a/embassy-stm32/src/pac/stm32f469ai.rs
+++ b/embassy-stm32/src/pac/stm32f469ai.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f469be.rs b/embassy-stm32/src/pac/stm32f469be.rs
index da697dcd9..77d327564 100644
--- a/embassy-stm32/src/pac/stm32f469be.rs
+++ b/embassy-stm32/src/pac/stm32f469be.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f469bg.rs b/embassy-stm32/src/pac/stm32f469bg.rs
index da697dcd9..77d327564 100644
--- a/embassy-stm32/src/pac/stm32f469bg.rs
+++ b/embassy-stm32/src/pac/stm32f469bg.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f469bi.rs b/embassy-stm32/src/pac/stm32f469bi.rs
index da697dcd9..77d327564 100644
--- a/embassy-stm32/src/pac/stm32f469bi.rs
+++ b/embassy-stm32/src/pac/stm32f469bi.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f469ie.rs b/embassy-stm32/src/pac/stm32f469ie.rs
index da697dcd9..77d327564 100644
--- a/embassy-stm32/src/pac/stm32f469ie.rs
+++ b/embassy-stm32/src/pac/stm32f469ie.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f469ig.rs b/embassy-stm32/src/pac/stm32f469ig.rs
index da697dcd9..77d327564 100644
--- a/embassy-stm32/src/pac/stm32f469ig.rs
+++ b/embassy-stm32/src/pac/stm32f469ig.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f469ii.rs b/embassy-stm32/src/pac/stm32f469ii.rs
index da697dcd9..77d327564 100644
--- a/embassy-stm32/src/pac/stm32f469ii.rs
+++ b/embassy-stm32/src/pac/stm32f469ii.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f469ne.rs b/embassy-stm32/src/pac/stm32f469ne.rs
index da697dcd9..77d327564 100644
--- a/embassy-stm32/src/pac/stm32f469ne.rs
+++ b/embassy-stm32/src/pac/stm32f469ne.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f469ng.rs b/embassy-stm32/src/pac/stm32f469ng.rs
index da697dcd9..77d327564 100644
--- a/embassy-stm32/src/pac/stm32f469ng.rs
+++ b/embassy-stm32/src/pac/stm32f469ng.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f469ni.rs b/embassy-stm32/src/pac/stm32f469ni.rs
index da697dcd9..77d327564 100644
--- a/embassy-stm32/src/pac/stm32f469ni.rs
+++ b/embassy-stm32/src/pac/stm32f469ni.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f469ve.rs b/embassy-stm32/src/pac/stm32f469ve.rs
index da697dcd9..77d327564 100644
--- a/embassy-stm32/src/pac/stm32f469ve.rs
+++ b/embassy-stm32/src/pac/stm32f469ve.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f469vg.rs b/embassy-stm32/src/pac/stm32f469vg.rs
index da697dcd9..77d327564 100644
--- a/embassy-stm32/src/pac/stm32f469vg.rs
+++ b/embassy-stm32/src/pac/stm32f469vg.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f469vi.rs b/embassy-stm32/src/pac/stm32f469vi.rs
index da697dcd9..77d327564 100644
--- a/embassy-stm32/src/pac/stm32f469vi.rs
+++ b/embassy-stm32/src/pac/stm32f469vi.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f469ze.rs b/embassy-stm32/src/pac/stm32f469ze.rs
index da697dcd9..77d327564 100644
--- a/embassy-stm32/src/pac/stm32f469ze.rs
+++ b/embassy-stm32/src/pac/stm32f469ze.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f469zg.rs b/embassy-stm32/src/pac/stm32f469zg.rs
index da697dcd9..77d327564 100644
--- a/embassy-stm32/src/pac/stm32f469zg.rs
+++ b/embassy-stm32/src/pac/stm32f469zg.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f469zi.rs b/embassy-stm32/src/pac/stm32f469zi.rs
index da697dcd9..77d327564 100644
--- a/embassy-stm32/src/pac/stm32f469zi.rs
+++ b/embassy-stm32/src/pac/stm32f469zi.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f479ag.rs b/embassy-stm32/src/pac/stm32f479ag.rs
index ac43a1fb5..47f8e0ffd 100644
--- a/embassy-stm32/src/pac/stm32f479ag.rs
+++ b/embassy-stm32/src/pac/stm32f479ag.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f479ai.rs b/embassy-stm32/src/pac/stm32f479ai.rs
index ac43a1fb5..47f8e0ffd 100644
--- a/embassy-stm32/src/pac/stm32f479ai.rs
+++ b/embassy-stm32/src/pac/stm32f479ai.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f479bg.rs b/embassy-stm32/src/pac/stm32f479bg.rs
index ac43a1fb5..47f8e0ffd 100644
--- a/embassy-stm32/src/pac/stm32f479bg.rs
+++ b/embassy-stm32/src/pac/stm32f479bg.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f479bi.rs b/embassy-stm32/src/pac/stm32f479bi.rs
index ac43a1fb5..47f8e0ffd 100644
--- a/embassy-stm32/src/pac/stm32f479bi.rs
+++ b/embassy-stm32/src/pac/stm32f479bi.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f479ig.rs b/embassy-stm32/src/pac/stm32f479ig.rs
index ac43a1fb5..47f8e0ffd 100644
--- a/embassy-stm32/src/pac/stm32f479ig.rs
+++ b/embassy-stm32/src/pac/stm32f479ig.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f479ii.rs b/embassy-stm32/src/pac/stm32f479ii.rs
index ac43a1fb5..47f8e0ffd 100644
--- a/embassy-stm32/src/pac/stm32f479ii.rs
+++ b/embassy-stm32/src/pac/stm32f479ii.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f479ng.rs b/embassy-stm32/src/pac/stm32f479ng.rs
index ac43a1fb5..47f8e0ffd 100644
--- a/embassy-stm32/src/pac/stm32f479ng.rs
+++ b/embassy-stm32/src/pac/stm32f479ng.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f479ni.rs b/embassy-stm32/src/pac/stm32f479ni.rs
index ac43a1fb5..47f8e0ffd 100644
--- a/embassy-stm32/src/pac/stm32f479ni.rs
+++ b/embassy-stm32/src/pac/stm32f479ni.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f479vg.rs b/embassy-stm32/src/pac/stm32f479vg.rs
index ac43a1fb5..47f8e0ffd 100644
--- a/embassy-stm32/src/pac/stm32f479vg.rs
+++ b/embassy-stm32/src/pac/stm32f479vg.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f479vi.rs b/embassy-stm32/src/pac/stm32f479vi.rs
index ac43a1fb5..47f8e0ffd 100644
--- a/embassy-stm32/src/pac/stm32f479vi.rs
+++ b/embassy-stm32/src/pac/stm32f479vi.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f479zg.rs b/embassy-stm32/src/pac/stm32f479zg.rs
index ac43a1fb5..47f8e0ffd 100644
--- a/embassy-stm32/src/pac/stm32f479zg.rs
+++ b/embassy-stm32/src/pac/stm32f479zg.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f479zi.rs b/embassy-stm32/src/pac/stm32f479zi.rs
index ac43a1fb5..47f8e0ffd 100644
--- a/embassy-stm32/src/pac/stm32f479zi.rs
+++ b/embassy-stm32/src/pac/stm32f479zi.rs
@@ -194,7 +194,7 @@ pub const GPIOI: gpio::Gpio = gpio::Gpio(0x40022000 as _);
194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _); 194pub const GPIOJ: gpio::Gpio = gpio::Gpio(0x40022400 as _);
195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _); 195pub const GPIOK: gpio::Gpio = gpio::Gpio(0x40022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
197impl_rng!(); 197impl_rng!(RNG);
198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 198pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 199pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
200impl_usart!(USART1); 200impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l412c8.rs b/embassy-stm32/src/pac/stm32l412c8.rs
index a32d8283d..1976a7823 100644
--- a/embassy-stm32/src/pac/stm32l412c8.rs
+++ b/embassy-stm32/src/pac/stm32l412c8.rs
@@ -92,7 +92,7 @@ pub const GPIOC: gpio::Gpio = gpio::Gpio(0x48000800 as _);
92pub const GPIOD: gpio::Gpio = gpio::Gpio(0x48000c00 as _); 92pub const GPIOD: gpio::Gpio = gpio::Gpio(0x48000c00 as _);
93pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 93pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
94pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 94pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
95impl_rng!(); 95impl_rng!(RNG);
96pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 96pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
97pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 97pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
98pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 98pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l412cb.rs b/embassy-stm32/src/pac/stm32l412cb.rs
index a32d8283d..1976a7823 100644
--- a/embassy-stm32/src/pac/stm32l412cb.rs
+++ b/embassy-stm32/src/pac/stm32l412cb.rs
@@ -92,7 +92,7 @@ pub const GPIOC: gpio::Gpio = gpio::Gpio(0x48000800 as _);
92pub const GPIOD: gpio::Gpio = gpio::Gpio(0x48000c00 as _); 92pub const GPIOD: gpio::Gpio = gpio::Gpio(0x48000c00 as _);
93pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 93pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
94pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 94pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
95impl_rng!(); 95impl_rng!(RNG);
96pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 96pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
97pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 97pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
98pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 98pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l412k8.rs b/embassy-stm32/src/pac/stm32l412k8.rs
index 19c45508a..884b1ef0e 100644
--- a/embassy-stm32/src/pac/stm32l412k8.rs
+++ b/embassy-stm32/src/pac/stm32l412k8.rs
@@ -92,7 +92,7 @@ pub const GPIOC: gpio::Gpio = gpio::Gpio(0x48000800 as _);
92pub const GPIOD: gpio::Gpio = gpio::Gpio(0x48000c00 as _); 92pub const GPIOD: gpio::Gpio = gpio::Gpio(0x48000c00 as _);
93pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 93pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
94pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 94pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
95impl_rng!(); 95impl_rng!(RNG);
96pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 96pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
97pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 97pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
98pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 98pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l412kb.rs b/embassy-stm32/src/pac/stm32l412kb.rs
index 19c45508a..884b1ef0e 100644
--- a/embassy-stm32/src/pac/stm32l412kb.rs
+++ b/embassy-stm32/src/pac/stm32l412kb.rs
@@ -92,7 +92,7 @@ pub const GPIOC: gpio::Gpio = gpio::Gpio(0x48000800 as _);
92pub const GPIOD: gpio::Gpio = gpio::Gpio(0x48000c00 as _); 92pub const GPIOD: gpio::Gpio = gpio::Gpio(0x48000c00 as _);
93pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 93pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
94pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 94pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
95impl_rng!(); 95impl_rng!(RNG);
96pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 96pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
97pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 97pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
98pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 98pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l412r8.rs b/embassy-stm32/src/pac/stm32l412r8.rs
index a32d8283d..1976a7823 100644
--- a/embassy-stm32/src/pac/stm32l412r8.rs
+++ b/embassy-stm32/src/pac/stm32l412r8.rs
@@ -92,7 +92,7 @@ pub const GPIOC: gpio::Gpio = gpio::Gpio(0x48000800 as _);
92pub const GPIOD: gpio::Gpio = gpio::Gpio(0x48000c00 as _); 92pub const GPIOD: gpio::Gpio = gpio::Gpio(0x48000c00 as _);
93pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 93pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
94pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 94pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
95impl_rng!(); 95impl_rng!(RNG);
96pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 96pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
97pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 97pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
98pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 98pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l412rb.rs b/embassy-stm32/src/pac/stm32l412rb.rs
index a32d8283d..1976a7823 100644
--- a/embassy-stm32/src/pac/stm32l412rb.rs
+++ b/embassy-stm32/src/pac/stm32l412rb.rs
@@ -92,7 +92,7 @@ pub const GPIOC: gpio::Gpio = gpio::Gpio(0x48000800 as _);
92pub const GPIOD: gpio::Gpio = gpio::Gpio(0x48000c00 as _); 92pub const GPIOD: gpio::Gpio = gpio::Gpio(0x48000c00 as _);
93pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 93pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
94pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 94pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
95impl_rng!(); 95impl_rng!(RNG);
96pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 96pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
97pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 97pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
98pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 98pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l412t8.rs b/embassy-stm32/src/pac/stm32l412t8.rs
index 19c45508a..884b1ef0e 100644
--- a/embassy-stm32/src/pac/stm32l412t8.rs
+++ b/embassy-stm32/src/pac/stm32l412t8.rs
@@ -92,7 +92,7 @@ pub const GPIOC: gpio::Gpio = gpio::Gpio(0x48000800 as _);
92pub const GPIOD: gpio::Gpio = gpio::Gpio(0x48000c00 as _); 92pub const GPIOD: gpio::Gpio = gpio::Gpio(0x48000c00 as _);
93pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 93pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
94pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 94pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
95impl_rng!(); 95impl_rng!(RNG);
96pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 96pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
97pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 97pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
98pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 98pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l412tb.rs b/embassy-stm32/src/pac/stm32l412tb.rs
index 19c45508a..884b1ef0e 100644
--- a/embassy-stm32/src/pac/stm32l412tb.rs
+++ b/embassy-stm32/src/pac/stm32l412tb.rs
@@ -92,7 +92,7 @@ pub const GPIOC: gpio::Gpio = gpio::Gpio(0x48000800 as _);
92pub const GPIOD: gpio::Gpio = gpio::Gpio(0x48000c00 as _); 92pub const GPIOD: gpio::Gpio = gpio::Gpio(0x48000c00 as _);
93pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 93pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
94pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 94pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
95impl_rng!(); 95impl_rng!(RNG);
96pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 96pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
97pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 97pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
98pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 98pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l422cb.rs b/embassy-stm32/src/pac/stm32l422cb.rs
index d56ce2c60..7b50a7139 100644
--- a/embassy-stm32/src/pac/stm32l422cb.rs
+++ b/embassy-stm32/src/pac/stm32l422cb.rs
@@ -92,7 +92,7 @@ pub const GPIOC: gpio::Gpio = gpio::Gpio(0x48000800 as _);
92pub const GPIOD: gpio::Gpio = gpio::Gpio(0x48000c00 as _); 92pub const GPIOD: gpio::Gpio = gpio::Gpio(0x48000c00 as _);
93pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 93pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
94pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 94pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
95impl_rng!(); 95impl_rng!(RNG);
96pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 96pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
97pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 97pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
98pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 98pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l422kb.rs b/embassy-stm32/src/pac/stm32l422kb.rs
index 60ad006d5..92021a645 100644
--- a/embassy-stm32/src/pac/stm32l422kb.rs
+++ b/embassy-stm32/src/pac/stm32l422kb.rs
@@ -92,7 +92,7 @@ pub const GPIOC: gpio::Gpio = gpio::Gpio(0x48000800 as _);
92pub const GPIOD: gpio::Gpio = gpio::Gpio(0x48000c00 as _); 92pub const GPIOD: gpio::Gpio = gpio::Gpio(0x48000c00 as _);
93pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 93pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
94pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 94pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
95impl_rng!(); 95impl_rng!(RNG);
96pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 96pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
97pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 97pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
98pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 98pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l422rb.rs b/embassy-stm32/src/pac/stm32l422rb.rs
index d56ce2c60..7b50a7139 100644
--- a/embassy-stm32/src/pac/stm32l422rb.rs
+++ b/embassy-stm32/src/pac/stm32l422rb.rs
@@ -92,7 +92,7 @@ pub const GPIOC: gpio::Gpio = gpio::Gpio(0x48000800 as _);
92pub const GPIOD: gpio::Gpio = gpio::Gpio(0x48000c00 as _); 92pub const GPIOD: gpio::Gpio = gpio::Gpio(0x48000c00 as _);
93pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 93pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
94pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 94pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
95impl_rng!(); 95impl_rng!(RNG);
96pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 96pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
97pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 97pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
98pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 98pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l422tb.rs b/embassy-stm32/src/pac/stm32l422tb.rs
index 60ad006d5..92021a645 100644
--- a/embassy-stm32/src/pac/stm32l422tb.rs
+++ b/embassy-stm32/src/pac/stm32l422tb.rs
@@ -92,7 +92,7 @@ pub const GPIOC: gpio::Gpio = gpio::Gpio(0x48000800 as _);
92pub const GPIOD: gpio::Gpio = gpio::Gpio(0x48000c00 as _); 92pub const GPIOD: gpio::Gpio = gpio::Gpio(0x48000c00 as _);
93pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 93pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
94pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 94pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
95impl_rng!(); 95impl_rng!(RNG);
96pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 96pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
97pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 97pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
98pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 98pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l431cb.rs b/embassy-stm32/src/pac/stm32l431cb.rs
index 607dda955..c3951c751 100644
--- a/embassy-stm32/src/pac/stm32l431cb.rs
+++ b/embassy-stm32/src/pac/stm32l431cb.rs
@@ -109,7 +109,7 @@ pub const GPIOD: gpio::Gpio = gpio::Gpio(0x48000c00 as _);
109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _); 109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _);
110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
112impl_rng!(); 112impl_rng!(RNG);
113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l431cc.rs b/embassy-stm32/src/pac/stm32l431cc.rs
index 607dda955..c3951c751 100644
--- a/embassy-stm32/src/pac/stm32l431cc.rs
+++ b/embassy-stm32/src/pac/stm32l431cc.rs
@@ -109,7 +109,7 @@ pub const GPIOD: gpio::Gpio = gpio::Gpio(0x48000c00 as _);
109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _); 109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _);
110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
112impl_rng!(); 112impl_rng!(RNG);
113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l431kb.rs b/embassy-stm32/src/pac/stm32l431kb.rs
index 5e239a669..7d974d49d 100644
--- a/embassy-stm32/src/pac/stm32l431kb.rs
+++ b/embassy-stm32/src/pac/stm32l431kb.rs
@@ -109,7 +109,7 @@ pub const GPIOD: gpio::Gpio = gpio::Gpio(0x48000c00 as _);
109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _); 109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _);
110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
112impl_rng!(); 112impl_rng!(RNG);
113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l431kc.rs b/embassy-stm32/src/pac/stm32l431kc.rs
index 5e239a669..7d974d49d 100644
--- a/embassy-stm32/src/pac/stm32l431kc.rs
+++ b/embassy-stm32/src/pac/stm32l431kc.rs
@@ -109,7 +109,7 @@ pub const GPIOD: gpio::Gpio = gpio::Gpio(0x48000c00 as _);
109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _); 109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _);
110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
112impl_rng!(); 112impl_rng!(RNG);
113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l431rb.rs b/embassy-stm32/src/pac/stm32l431rb.rs
index 607dda955..c3951c751 100644
--- a/embassy-stm32/src/pac/stm32l431rb.rs
+++ b/embassy-stm32/src/pac/stm32l431rb.rs
@@ -109,7 +109,7 @@ pub const GPIOD: gpio::Gpio = gpio::Gpio(0x48000c00 as _);
109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _); 109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _);
110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
112impl_rng!(); 112impl_rng!(RNG);
113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l431rc.rs b/embassy-stm32/src/pac/stm32l431rc.rs
index 607dda955..c3951c751 100644
--- a/embassy-stm32/src/pac/stm32l431rc.rs
+++ b/embassy-stm32/src/pac/stm32l431rc.rs
@@ -109,7 +109,7 @@ pub const GPIOD: gpio::Gpio = gpio::Gpio(0x48000c00 as _);
109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _); 109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _);
110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
112impl_rng!(); 112impl_rng!(RNG);
113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l431vc.rs b/embassy-stm32/src/pac/stm32l431vc.rs
index 607dda955..c3951c751 100644
--- a/embassy-stm32/src/pac/stm32l431vc.rs
+++ b/embassy-stm32/src/pac/stm32l431vc.rs
@@ -109,7 +109,7 @@ pub const GPIOD: gpio::Gpio = gpio::Gpio(0x48000c00 as _);
109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _); 109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _);
110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
112impl_rng!(); 112impl_rng!(RNG);
113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l432kb.rs b/embassy-stm32/src/pac/stm32l432kb.rs
index 62b022c86..e0e534faa 100644
--- a/embassy-stm32/src/pac/stm32l432kb.rs
+++ b/embassy-stm32/src/pac/stm32l432kb.rs
@@ -75,7 +75,7 @@ pub const GPIOB: gpio::Gpio = gpio::Gpio(0x48000400 as _);
75pub const GPIOC: gpio::Gpio = gpio::Gpio(0x48000800 as _); 75pub const GPIOC: gpio::Gpio = gpio::Gpio(0x48000800 as _);
76pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 76pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
77pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 77pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
78impl_rng!(); 78impl_rng!(RNG);
79pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 79pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
80pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 80pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
81pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 81pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l432kc.rs b/embassy-stm32/src/pac/stm32l432kc.rs
index 62b022c86..e0e534faa 100644
--- a/embassy-stm32/src/pac/stm32l432kc.rs
+++ b/embassy-stm32/src/pac/stm32l432kc.rs
@@ -75,7 +75,7 @@ pub const GPIOB: gpio::Gpio = gpio::Gpio(0x48000400 as _);
75pub const GPIOC: gpio::Gpio = gpio::Gpio(0x48000800 as _); 75pub const GPIOC: gpio::Gpio = gpio::Gpio(0x48000800 as _);
76pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 76pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
77pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 77pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
78impl_rng!(); 78impl_rng!(RNG);
79pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 79pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
80pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 80pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
81pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 81pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l433cb.rs b/embassy-stm32/src/pac/stm32l433cb.rs
index 2de328aaa..5e10d9721 100644
--- a/embassy-stm32/src/pac/stm32l433cb.rs
+++ b/embassy-stm32/src/pac/stm32l433cb.rs
@@ -109,7 +109,7 @@ pub const GPIOD: gpio::Gpio = gpio::Gpio(0x48000c00 as _);
109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _); 109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _);
110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
112impl_rng!(); 112impl_rng!(RNG);
113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l433cc.rs b/embassy-stm32/src/pac/stm32l433cc.rs
index 2de328aaa..5e10d9721 100644
--- a/embassy-stm32/src/pac/stm32l433cc.rs
+++ b/embassy-stm32/src/pac/stm32l433cc.rs
@@ -109,7 +109,7 @@ pub const GPIOD: gpio::Gpio = gpio::Gpio(0x48000c00 as _);
109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _); 109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _);
110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
112impl_rng!(); 112impl_rng!(RNG);
113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l433rb.rs b/embassy-stm32/src/pac/stm32l433rb.rs
index 2de328aaa..5e10d9721 100644
--- a/embassy-stm32/src/pac/stm32l433rb.rs
+++ b/embassy-stm32/src/pac/stm32l433rb.rs
@@ -109,7 +109,7 @@ pub const GPIOD: gpio::Gpio = gpio::Gpio(0x48000c00 as _);
109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _); 109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _);
110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
112impl_rng!(); 112impl_rng!(RNG);
113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l433rc.rs b/embassy-stm32/src/pac/stm32l433rc.rs
index 2de328aaa..5e10d9721 100644
--- a/embassy-stm32/src/pac/stm32l433rc.rs
+++ b/embassy-stm32/src/pac/stm32l433rc.rs
@@ -109,7 +109,7 @@ pub const GPIOD: gpio::Gpio = gpio::Gpio(0x48000c00 as _);
109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _); 109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _);
110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
112impl_rng!(); 112impl_rng!(RNG);
113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l433vc.rs b/embassy-stm32/src/pac/stm32l433vc.rs
index 2de328aaa..5e10d9721 100644
--- a/embassy-stm32/src/pac/stm32l433vc.rs
+++ b/embassy-stm32/src/pac/stm32l433vc.rs
@@ -109,7 +109,7 @@ pub const GPIOD: gpio::Gpio = gpio::Gpio(0x48000c00 as _);
109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _); 109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _);
110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
112impl_rng!(); 112impl_rng!(RNG);
113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l442kc.rs b/embassy-stm32/src/pac/stm32l442kc.rs
index e6f1bd93e..2f1bead4c 100644
--- a/embassy-stm32/src/pac/stm32l442kc.rs
+++ b/embassy-stm32/src/pac/stm32l442kc.rs
@@ -75,7 +75,7 @@ pub const GPIOB: gpio::Gpio = gpio::Gpio(0x48000400 as _);
75pub const GPIOC: gpio::Gpio = gpio::Gpio(0x48000800 as _); 75pub const GPIOC: gpio::Gpio = gpio::Gpio(0x48000800 as _);
76pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 76pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
77pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 77pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
78impl_rng!(); 78impl_rng!(RNG);
79pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 79pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
80pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 80pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
81pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 81pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l443cc.rs b/embassy-stm32/src/pac/stm32l443cc.rs
index 3bff6dc0b..e1860a9de 100644
--- a/embassy-stm32/src/pac/stm32l443cc.rs
+++ b/embassy-stm32/src/pac/stm32l443cc.rs
@@ -109,7 +109,7 @@ pub const GPIOD: gpio::Gpio = gpio::Gpio(0x48000c00 as _);
109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _); 109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _);
110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
112impl_rng!(); 112impl_rng!(RNG);
113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l443rc.rs b/embassy-stm32/src/pac/stm32l443rc.rs
index 3bff6dc0b..e1860a9de 100644
--- a/embassy-stm32/src/pac/stm32l443rc.rs
+++ b/embassy-stm32/src/pac/stm32l443rc.rs
@@ -109,7 +109,7 @@ pub const GPIOD: gpio::Gpio = gpio::Gpio(0x48000c00 as _);
109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _); 109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _);
110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
112impl_rng!(); 112impl_rng!(RNG);
113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l443vc.rs b/embassy-stm32/src/pac/stm32l443vc.rs
index 3bff6dc0b..e1860a9de 100644
--- a/embassy-stm32/src/pac/stm32l443vc.rs
+++ b/embassy-stm32/src/pac/stm32l443vc.rs
@@ -109,7 +109,7 @@ pub const GPIOD: gpio::Gpio = gpio::Gpio(0x48000c00 as _);
109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _); 109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _);
110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
112impl_rng!(); 112impl_rng!(RNG);
113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l451cc.rs b/embassy-stm32/src/pac/stm32l451cc.rs
index ebe371279..29565d76d 100644
--- a/embassy-stm32/src/pac/stm32l451cc.rs
+++ b/embassy-stm32/src/pac/stm32l451cc.rs
@@ -109,7 +109,7 @@ pub const GPIOD: gpio::Gpio = gpio::Gpio(0x48000c00 as _);
109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _); 109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _);
110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
112impl_rng!(); 112impl_rng!(RNG);
113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l451ce.rs b/embassy-stm32/src/pac/stm32l451ce.rs
index ebe371279..29565d76d 100644
--- a/embassy-stm32/src/pac/stm32l451ce.rs
+++ b/embassy-stm32/src/pac/stm32l451ce.rs
@@ -109,7 +109,7 @@ pub const GPIOD: gpio::Gpio = gpio::Gpio(0x48000c00 as _);
109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _); 109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _);
110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
112impl_rng!(); 112impl_rng!(RNG);
113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l451rc.rs b/embassy-stm32/src/pac/stm32l451rc.rs
index ebe371279..29565d76d 100644
--- a/embassy-stm32/src/pac/stm32l451rc.rs
+++ b/embassy-stm32/src/pac/stm32l451rc.rs
@@ -109,7 +109,7 @@ pub const GPIOD: gpio::Gpio = gpio::Gpio(0x48000c00 as _);
109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _); 109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _);
110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
112impl_rng!(); 112impl_rng!(RNG);
113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l451re.rs b/embassy-stm32/src/pac/stm32l451re.rs
index ebe371279..29565d76d 100644
--- a/embassy-stm32/src/pac/stm32l451re.rs
+++ b/embassy-stm32/src/pac/stm32l451re.rs
@@ -109,7 +109,7 @@ pub const GPIOD: gpio::Gpio = gpio::Gpio(0x48000c00 as _);
109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _); 109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _);
110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
112impl_rng!(); 112impl_rng!(RNG);
113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l451vc.rs b/embassy-stm32/src/pac/stm32l451vc.rs
index ebe371279..29565d76d 100644
--- a/embassy-stm32/src/pac/stm32l451vc.rs
+++ b/embassy-stm32/src/pac/stm32l451vc.rs
@@ -109,7 +109,7 @@ pub const GPIOD: gpio::Gpio = gpio::Gpio(0x48000c00 as _);
109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _); 109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _);
110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
112impl_rng!(); 112impl_rng!(RNG);
113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l451ve.rs b/embassy-stm32/src/pac/stm32l451ve.rs
index ebe371279..29565d76d 100644
--- a/embassy-stm32/src/pac/stm32l451ve.rs
+++ b/embassy-stm32/src/pac/stm32l451ve.rs
@@ -109,7 +109,7 @@ pub const GPIOD: gpio::Gpio = gpio::Gpio(0x48000c00 as _);
109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _); 109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _);
110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
112impl_rng!(); 112impl_rng!(RNG);
113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l452cc.rs b/embassy-stm32/src/pac/stm32l452cc.rs
index 9d55b6f78..e6faacf14 100644
--- a/embassy-stm32/src/pac/stm32l452cc.rs
+++ b/embassy-stm32/src/pac/stm32l452cc.rs
@@ -109,7 +109,7 @@ pub const GPIOD: gpio::Gpio = gpio::Gpio(0x48000c00 as _);
109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _); 109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _);
110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
112impl_rng!(); 112impl_rng!(RNG);
113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l452ce.rs b/embassy-stm32/src/pac/stm32l452ce.rs
index 9d55b6f78..e6faacf14 100644
--- a/embassy-stm32/src/pac/stm32l452ce.rs
+++ b/embassy-stm32/src/pac/stm32l452ce.rs
@@ -109,7 +109,7 @@ pub const GPIOD: gpio::Gpio = gpio::Gpio(0x48000c00 as _);
109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _); 109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _);
110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
112impl_rng!(); 112impl_rng!(RNG);
113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l452rc.rs b/embassy-stm32/src/pac/stm32l452rc.rs
index 9d55b6f78..e6faacf14 100644
--- a/embassy-stm32/src/pac/stm32l452rc.rs
+++ b/embassy-stm32/src/pac/stm32l452rc.rs
@@ -109,7 +109,7 @@ pub const GPIOD: gpio::Gpio = gpio::Gpio(0x48000c00 as _);
109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _); 109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _);
110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
112impl_rng!(); 112impl_rng!(RNG);
113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l452re.rs b/embassy-stm32/src/pac/stm32l452re.rs
index 9d55b6f78..e6faacf14 100644
--- a/embassy-stm32/src/pac/stm32l452re.rs
+++ b/embassy-stm32/src/pac/stm32l452re.rs
@@ -109,7 +109,7 @@ pub const GPIOD: gpio::Gpio = gpio::Gpio(0x48000c00 as _);
109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _); 109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _);
110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
112impl_rng!(); 112impl_rng!(RNG);
113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l452vc.rs b/embassy-stm32/src/pac/stm32l452vc.rs
index 9d55b6f78..e6faacf14 100644
--- a/embassy-stm32/src/pac/stm32l452vc.rs
+++ b/embassy-stm32/src/pac/stm32l452vc.rs
@@ -109,7 +109,7 @@ pub const GPIOD: gpio::Gpio = gpio::Gpio(0x48000c00 as _);
109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _); 109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _);
110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
112impl_rng!(); 112impl_rng!(RNG);
113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l452ve.rs b/embassy-stm32/src/pac/stm32l452ve.rs
index 9d55b6f78..e6faacf14 100644
--- a/embassy-stm32/src/pac/stm32l452ve.rs
+++ b/embassy-stm32/src/pac/stm32l452ve.rs
@@ -109,7 +109,7 @@ pub const GPIOD: gpio::Gpio = gpio::Gpio(0x48000c00 as _);
109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _); 109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _);
110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
112impl_rng!(); 112impl_rng!(RNG);
113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l462ce.rs b/embassy-stm32/src/pac/stm32l462ce.rs
index d9f0ea312..374f5bd5a 100644
--- a/embassy-stm32/src/pac/stm32l462ce.rs
+++ b/embassy-stm32/src/pac/stm32l462ce.rs
@@ -109,7 +109,7 @@ pub const GPIOD: gpio::Gpio = gpio::Gpio(0x48000c00 as _);
109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _); 109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _);
110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
112impl_rng!(); 112impl_rng!(RNG);
113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l462re.rs b/embassy-stm32/src/pac/stm32l462re.rs
index d9f0ea312..374f5bd5a 100644
--- a/embassy-stm32/src/pac/stm32l462re.rs
+++ b/embassy-stm32/src/pac/stm32l462re.rs
@@ -109,7 +109,7 @@ pub const GPIOD: gpio::Gpio = gpio::Gpio(0x48000c00 as _);
109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _); 109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _);
110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
112impl_rng!(); 112impl_rng!(RNG);
113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l462ve.rs b/embassy-stm32/src/pac/stm32l462ve.rs
index d9f0ea312..374f5bd5a 100644
--- a/embassy-stm32/src/pac/stm32l462ve.rs
+++ b/embassy-stm32/src/pac/stm32l462ve.rs
@@ -109,7 +109,7 @@ pub const GPIOD: gpio::Gpio = gpio::Gpio(0x48000c00 as _);
109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _); 109pub const GPIOE: gpio::Gpio = gpio::Gpio(0x48001000 as _);
110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 110pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 111pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
112impl_rng!(); 112impl_rng!(RNG);
113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 113pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 114pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 115pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l471qe.rs b/embassy-stm32/src/pac/stm32l471qe.rs
index ad091268c..1d4b4e8b5 100644
--- a/embassy-stm32/src/pac/stm32l471qe.rs
+++ b/embassy-stm32/src/pac/stm32l471qe.rs
@@ -143,7 +143,7 @@ pub const GPIOF: gpio::Gpio = gpio::Gpio(0x48001400 as _);
143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _); 143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
146impl_rng!(); 146impl_rng!(RNG);
147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l471qg.rs b/embassy-stm32/src/pac/stm32l471qg.rs
index ad091268c..1d4b4e8b5 100644
--- a/embassy-stm32/src/pac/stm32l471qg.rs
+++ b/embassy-stm32/src/pac/stm32l471qg.rs
@@ -143,7 +143,7 @@ pub const GPIOF: gpio::Gpio = gpio::Gpio(0x48001400 as _);
143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _); 143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
146impl_rng!(); 146impl_rng!(RNG);
147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l471re.rs b/embassy-stm32/src/pac/stm32l471re.rs
index ad091268c..1d4b4e8b5 100644
--- a/embassy-stm32/src/pac/stm32l471re.rs
+++ b/embassy-stm32/src/pac/stm32l471re.rs
@@ -143,7 +143,7 @@ pub const GPIOF: gpio::Gpio = gpio::Gpio(0x48001400 as _);
143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _); 143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
146impl_rng!(); 146impl_rng!(RNG);
147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l471rg.rs b/embassy-stm32/src/pac/stm32l471rg.rs
index ad091268c..1d4b4e8b5 100644
--- a/embassy-stm32/src/pac/stm32l471rg.rs
+++ b/embassy-stm32/src/pac/stm32l471rg.rs
@@ -143,7 +143,7 @@ pub const GPIOF: gpio::Gpio = gpio::Gpio(0x48001400 as _);
143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _); 143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
146impl_rng!(); 146impl_rng!(RNG);
147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l471ve.rs b/embassy-stm32/src/pac/stm32l471ve.rs
index ad091268c..1d4b4e8b5 100644
--- a/embassy-stm32/src/pac/stm32l471ve.rs
+++ b/embassy-stm32/src/pac/stm32l471ve.rs
@@ -143,7 +143,7 @@ pub const GPIOF: gpio::Gpio = gpio::Gpio(0x48001400 as _);
143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _); 143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
146impl_rng!(); 146impl_rng!(RNG);
147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l471vg.rs b/embassy-stm32/src/pac/stm32l471vg.rs
index ad091268c..1d4b4e8b5 100644
--- a/embassy-stm32/src/pac/stm32l471vg.rs
+++ b/embassy-stm32/src/pac/stm32l471vg.rs
@@ -143,7 +143,7 @@ pub const GPIOF: gpio::Gpio = gpio::Gpio(0x48001400 as _);
143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _); 143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
146impl_rng!(); 146impl_rng!(RNG);
147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l471ze.rs b/embassy-stm32/src/pac/stm32l471ze.rs
index ad091268c..1d4b4e8b5 100644
--- a/embassy-stm32/src/pac/stm32l471ze.rs
+++ b/embassy-stm32/src/pac/stm32l471ze.rs
@@ -143,7 +143,7 @@ pub const GPIOF: gpio::Gpio = gpio::Gpio(0x48001400 as _);
143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _); 143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
146impl_rng!(); 146impl_rng!(RNG);
147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l471zg.rs b/embassy-stm32/src/pac/stm32l471zg.rs
index ad091268c..1d4b4e8b5 100644
--- a/embassy-stm32/src/pac/stm32l471zg.rs
+++ b/embassy-stm32/src/pac/stm32l471zg.rs
@@ -143,7 +143,7 @@ pub const GPIOF: gpio::Gpio = gpio::Gpio(0x48001400 as _);
143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _); 143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
146impl_rng!(); 146impl_rng!(RNG);
147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l475rc.rs b/embassy-stm32/src/pac/stm32l475rc.rs
index 7f016e2e2..7d5fbfb85 100644
--- a/embassy-stm32/src/pac/stm32l475rc.rs
+++ b/embassy-stm32/src/pac/stm32l475rc.rs
@@ -143,7 +143,7 @@ pub const GPIOF: gpio::Gpio = gpio::Gpio(0x48001400 as _);
143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _); 143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
146impl_rng!(); 146impl_rng!(RNG);
147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l475re.rs b/embassy-stm32/src/pac/stm32l475re.rs
index 7f016e2e2..7d5fbfb85 100644
--- a/embassy-stm32/src/pac/stm32l475re.rs
+++ b/embassy-stm32/src/pac/stm32l475re.rs
@@ -143,7 +143,7 @@ pub const GPIOF: gpio::Gpio = gpio::Gpio(0x48001400 as _);
143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _); 143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
146impl_rng!(); 146impl_rng!(RNG);
147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l475rg.rs b/embassy-stm32/src/pac/stm32l475rg.rs
index 7f016e2e2..7d5fbfb85 100644
--- a/embassy-stm32/src/pac/stm32l475rg.rs
+++ b/embassy-stm32/src/pac/stm32l475rg.rs
@@ -143,7 +143,7 @@ pub const GPIOF: gpio::Gpio = gpio::Gpio(0x48001400 as _);
143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _); 143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
146impl_rng!(); 146impl_rng!(RNG);
147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l475vc.rs b/embassy-stm32/src/pac/stm32l475vc.rs
index 7f016e2e2..7d5fbfb85 100644
--- a/embassy-stm32/src/pac/stm32l475vc.rs
+++ b/embassy-stm32/src/pac/stm32l475vc.rs
@@ -143,7 +143,7 @@ pub const GPIOF: gpio::Gpio = gpio::Gpio(0x48001400 as _);
143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _); 143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
146impl_rng!(); 146impl_rng!(RNG);
147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l475ve.rs b/embassy-stm32/src/pac/stm32l475ve.rs
index 7f016e2e2..7d5fbfb85 100644
--- a/embassy-stm32/src/pac/stm32l475ve.rs
+++ b/embassy-stm32/src/pac/stm32l475ve.rs
@@ -143,7 +143,7 @@ pub const GPIOF: gpio::Gpio = gpio::Gpio(0x48001400 as _);
143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _); 143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
146impl_rng!(); 146impl_rng!(RNG);
147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l475vg.rs b/embassy-stm32/src/pac/stm32l475vg.rs
index 7f016e2e2..7d5fbfb85 100644
--- a/embassy-stm32/src/pac/stm32l475vg.rs
+++ b/embassy-stm32/src/pac/stm32l475vg.rs
@@ -143,7 +143,7 @@ pub const GPIOF: gpio::Gpio = gpio::Gpio(0x48001400 as _);
143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _); 143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
146impl_rng!(); 146impl_rng!(RNG);
147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l476je.rs b/embassy-stm32/src/pac/stm32l476je.rs
index 342acacfb..2f2bb90b3 100644
--- a/embassy-stm32/src/pac/stm32l476je.rs
+++ b/embassy-stm32/src/pac/stm32l476je.rs
@@ -143,7 +143,7 @@ pub const GPIOF: gpio::Gpio = gpio::Gpio(0x48001400 as _);
143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _); 143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
146impl_rng!(); 146impl_rng!(RNG);
147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l476jg.rs b/embassy-stm32/src/pac/stm32l476jg.rs
index 342acacfb..2f2bb90b3 100644
--- a/embassy-stm32/src/pac/stm32l476jg.rs
+++ b/embassy-stm32/src/pac/stm32l476jg.rs
@@ -143,7 +143,7 @@ pub const GPIOF: gpio::Gpio = gpio::Gpio(0x48001400 as _);
143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _); 143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
146impl_rng!(); 146impl_rng!(RNG);
147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l476me.rs b/embassy-stm32/src/pac/stm32l476me.rs
index 342acacfb..2f2bb90b3 100644
--- a/embassy-stm32/src/pac/stm32l476me.rs
+++ b/embassy-stm32/src/pac/stm32l476me.rs
@@ -143,7 +143,7 @@ pub const GPIOF: gpio::Gpio = gpio::Gpio(0x48001400 as _);
143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _); 143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
146impl_rng!(); 146impl_rng!(RNG);
147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l476mg.rs b/embassy-stm32/src/pac/stm32l476mg.rs
index 342acacfb..2f2bb90b3 100644
--- a/embassy-stm32/src/pac/stm32l476mg.rs
+++ b/embassy-stm32/src/pac/stm32l476mg.rs
@@ -143,7 +143,7 @@ pub const GPIOF: gpio::Gpio = gpio::Gpio(0x48001400 as _);
143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _); 143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
146impl_rng!(); 146impl_rng!(RNG);
147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l476qe.rs b/embassy-stm32/src/pac/stm32l476qe.rs
index 342acacfb..2f2bb90b3 100644
--- a/embassy-stm32/src/pac/stm32l476qe.rs
+++ b/embassy-stm32/src/pac/stm32l476qe.rs
@@ -143,7 +143,7 @@ pub const GPIOF: gpio::Gpio = gpio::Gpio(0x48001400 as _);
143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _); 143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
146impl_rng!(); 146impl_rng!(RNG);
147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l476qg.rs b/embassy-stm32/src/pac/stm32l476qg.rs
index 342acacfb..2f2bb90b3 100644
--- a/embassy-stm32/src/pac/stm32l476qg.rs
+++ b/embassy-stm32/src/pac/stm32l476qg.rs
@@ -143,7 +143,7 @@ pub const GPIOF: gpio::Gpio = gpio::Gpio(0x48001400 as _);
143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _); 143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
146impl_rng!(); 146impl_rng!(RNG);
147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l476rc.rs b/embassy-stm32/src/pac/stm32l476rc.rs
index 342acacfb..2f2bb90b3 100644
--- a/embassy-stm32/src/pac/stm32l476rc.rs
+++ b/embassy-stm32/src/pac/stm32l476rc.rs
@@ -143,7 +143,7 @@ pub const GPIOF: gpio::Gpio = gpio::Gpio(0x48001400 as _);
143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _); 143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
146impl_rng!(); 146impl_rng!(RNG);
147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l476re.rs b/embassy-stm32/src/pac/stm32l476re.rs
index 342acacfb..2f2bb90b3 100644
--- a/embassy-stm32/src/pac/stm32l476re.rs
+++ b/embassy-stm32/src/pac/stm32l476re.rs
@@ -143,7 +143,7 @@ pub const GPIOF: gpio::Gpio = gpio::Gpio(0x48001400 as _);
143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _); 143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
146impl_rng!(); 146impl_rng!(RNG);
147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l476rg.rs b/embassy-stm32/src/pac/stm32l476rg.rs
index 342acacfb..2f2bb90b3 100644
--- a/embassy-stm32/src/pac/stm32l476rg.rs
+++ b/embassy-stm32/src/pac/stm32l476rg.rs
@@ -143,7 +143,7 @@ pub const GPIOF: gpio::Gpio = gpio::Gpio(0x48001400 as _);
143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _); 143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
146impl_rng!(); 146impl_rng!(RNG);
147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l476vc.rs b/embassy-stm32/src/pac/stm32l476vc.rs
index 342acacfb..2f2bb90b3 100644
--- a/embassy-stm32/src/pac/stm32l476vc.rs
+++ b/embassy-stm32/src/pac/stm32l476vc.rs
@@ -143,7 +143,7 @@ pub const GPIOF: gpio::Gpio = gpio::Gpio(0x48001400 as _);
143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _); 143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
146impl_rng!(); 146impl_rng!(RNG);
147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l476ve.rs b/embassy-stm32/src/pac/stm32l476ve.rs
index 342acacfb..2f2bb90b3 100644
--- a/embassy-stm32/src/pac/stm32l476ve.rs
+++ b/embassy-stm32/src/pac/stm32l476ve.rs
@@ -143,7 +143,7 @@ pub const GPIOF: gpio::Gpio = gpio::Gpio(0x48001400 as _);
143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _); 143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
146impl_rng!(); 146impl_rng!(RNG);
147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l476vg.rs b/embassy-stm32/src/pac/stm32l476vg.rs
index 342acacfb..2f2bb90b3 100644
--- a/embassy-stm32/src/pac/stm32l476vg.rs
+++ b/embassy-stm32/src/pac/stm32l476vg.rs
@@ -143,7 +143,7 @@ pub const GPIOF: gpio::Gpio = gpio::Gpio(0x48001400 as _);
143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _); 143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
146impl_rng!(); 146impl_rng!(RNG);
147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l476ze.rs b/embassy-stm32/src/pac/stm32l476ze.rs
index 342acacfb..2f2bb90b3 100644
--- a/embassy-stm32/src/pac/stm32l476ze.rs
+++ b/embassy-stm32/src/pac/stm32l476ze.rs
@@ -143,7 +143,7 @@ pub const GPIOF: gpio::Gpio = gpio::Gpio(0x48001400 as _);
143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _); 143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
146impl_rng!(); 146impl_rng!(RNG);
147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l476zg.rs b/embassy-stm32/src/pac/stm32l476zg.rs
index 342acacfb..2f2bb90b3 100644
--- a/embassy-stm32/src/pac/stm32l476zg.rs
+++ b/embassy-stm32/src/pac/stm32l476zg.rs
@@ -143,7 +143,7 @@ pub const GPIOF: gpio::Gpio = gpio::Gpio(0x48001400 as _);
143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _); 143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
146impl_rng!(); 146impl_rng!(RNG);
147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l485jc.rs b/embassy-stm32/src/pac/stm32l485jc.rs
index 28186ee2f..cdd6b31d8 100644
--- a/embassy-stm32/src/pac/stm32l485jc.rs
+++ b/embassy-stm32/src/pac/stm32l485jc.rs
@@ -143,7 +143,7 @@ pub const GPIOF: gpio::Gpio = gpio::Gpio(0x48001400 as _);
143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _); 143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
146impl_rng!(); 146impl_rng!(RNG);
147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l485je.rs b/embassy-stm32/src/pac/stm32l485je.rs
index 28186ee2f..cdd6b31d8 100644
--- a/embassy-stm32/src/pac/stm32l485je.rs
+++ b/embassy-stm32/src/pac/stm32l485je.rs
@@ -143,7 +143,7 @@ pub const GPIOF: gpio::Gpio = gpio::Gpio(0x48001400 as _);
143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _); 143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
146impl_rng!(); 146impl_rng!(RNG);
147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l486jg.rs b/embassy-stm32/src/pac/stm32l486jg.rs
index b98617afb..aad81718f 100644
--- a/embassy-stm32/src/pac/stm32l486jg.rs
+++ b/embassy-stm32/src/pac/stm32l486jg.rs
@@ -143,7 +143,7 @@ pub const GPIOF: gpio::Gpio = gpio::Gpio(0x48001400 as _);
143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _); 143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
146impl_rng!(); 146impl_rng!(RNG);
147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l486qg.rs b/embassy-stm32/src/pac/stm32l486qg.rs
index b98617afb..aad81718f 100644
--- a/embassy-stm32/src/pac/stm32l486qg.rs
+++ b/embassy-stm32/src/pac/stm32l486qg.rs
@@ -143,7 +143,7 @@ pub const GPIOF: gpio::Gpio = gpio::Gpio(0x48001400 as _);
143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _); 143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
146impl_rng!(); 146impl_rng!(RNG);
147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l486rg.rs b/embassy-stm32/src/pac/stm32l486rg.rs
index b98617afb..aad81718f 100644
--- a/embassy-stm32/src/pac/stm32l486rg.rs
+++ b/embassy-stm32/src/pac/stm32l486rg.rs
@@ -143,7 +143,7 @@ pub const GPIOF: gpio::Gpio = gpio::Gpio(0x48001400 as _);
143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _); 143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
146impl_rng!(); 146impl_rng!(RNG);
147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l486vg.rs b/embassy-stm32/src/pac/stm32l486vg.rs
index b98617afb..aad81718f 100644
--- a/embassy-stm32/src/pac/stm32l486vg.rs
+++ b/embassy-stm32/src/pac/stm32l486vg.rs
@@ -143,7 +143,7 @@ pub const GPIOF: gpio::Gpio = gpio::Gpio(0x48001400 as _);
143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _); 143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
146impl_rng!(); 146impl_rng!(RNG);
147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l486zg.rs b/embassy-stm32/src/pac/stm32l486zg.rs
index b98617afb..aad81718f 100644
--- a/embassy-stm32/src/pac/stm32l486zg.rs
+++ b/embassy-stm32/src/pac/stm32l486zg.rs
@@ -143,7 +143,7 @@ pub const GPIOF: gpio::Gpio = gpio::Gpio(0x48001400 as _);
143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _); 143pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 144pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 145pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
146impl_rng!(); 146impl_rng!(RNG);
147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 147pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 148pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 149pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l496ae.rs b/embassy-stm32/src/pac/stm32l496ae.rs
index 50209fa20..b47a6359e 100644
--- a/embassy-stm32/src/pac/stm32l496ae.rs
+++ b/embassy-stm32/src/pac/stm32l496ae.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 165pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
166pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 166pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l496ag.rs b/embassy-stm32/src/pac/stm32l496ag.rs
index 50209fa20..b47a6359e 100644
--- a/embassy-stm32/src/pac/stm32l496ag.rs
+++ b/embassy-stm32/src/pac/stm32l496ag.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 165pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
166pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 166pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l496qe.rs b/embassy-stm32/src/pac/stm32l496qe.rs
index 50209fa20..b47a6359e 100644
--- a/embassy-stm32/src/pac/stm32l496qe.rs
+++ b/embassy-stm32/src/pac/stm32l496qe.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 165pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
166pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 166pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l496qg.rs b/embassy-stm32/src/pac/stm32l496qg.rs
index 50209fa20..b47a6359e 100644
--- a/embassy-stm32/src/pac/stm32l496qg.rs
+++ b/embassy-stm32/src/pac/stm32l496qg.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 165pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
166pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 166pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l496re.rs b/embassy-stm32/src/pac/stm32l496re.rs
index 50209fa20..b47a6359e 100644
--- a/embassy-stm32/src/pac/stm32l496re.rs
+++ b/embassy-stm32/src/pac/stm32l496re.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 165pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
166pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 166pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l496rg.rs b/embassy-stm32/src/pac/stm32l496rg.rs
index 50209fa20..b47a6359e 100644
--- a/embassy-stm32/src/pac/stm32l496rg.rs
+++ b/embassy-stm32/src/pac/stm32l496rg.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 165pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
166pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 166pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l496ve.rs b/embassy-stm32/src/pac/stm32l496ve.rs
index 50209fa20..b47a6359e 100644
--- a/embassy-stm32/src/pac/stm32l496ve.rs
+++ b/embassy-stm32/src/pac/stm32l496ve.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 165pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
166pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 166pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l496vg.rs b/embassy-stm32/src/pac/stm32l496vg.rs
index 50209fa20..b47a6359e 100644
--- a/embassy-stm32/src/pac/stm32l496vg.rs
+++ b/embassy-stm32/src/pac/stm32l496vg.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 165pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
166pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 166pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l496wg.rs b/embassy-stm32/src/pac/stm32l496wg.rs
index 50209fa20..b47a6359e 100644
--- a/embassy-stm32/src/pac/stm32l496wg.rs
+++ b/embassy-stm32/src/pac/stm32l496wg.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 165pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
166pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 166pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l496ze.rs b/embassy-stm32/src/pac/stm32l496ze.rs
index 50209fa20..b47a6359e 100644
--- a/embassy-stm32/src/pac/stm32l496ze.rs
+++ b/embassy-stm32/src/pac/stm32l496ze.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 165pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
166pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 166pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l496zg.rs b/embassy-stm32/src/pac/stm32l496zg.rs
index 50209fa20..b47a6359e 100644
--- a/embassy-stm32/src/pac/stm32l496zg.rs
+++ b/embassy-stm32/src/pac/stm32l496zg.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 165pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
166pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 166pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l4a6ag.rs b/embassy-stm32/src/pac/stm32l4a6ag.rs
index d3ee277f0..bb345cad9 100644
--- a/embassy-stm32/src/pac/stm32l4a6ag.rs
+++ b/embassy-stm32/src/pac/stm32l4a6ag.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 165pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
166pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 166pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l4a6qg.rs b/embassy-stm32/src/pac/stm32l4a6qg.rs
index d3ee277f0..bb345cad9 100644
--- a/embassy-stm32/src/pac/stm32l4a6qg.rs
+++ b/embassy-stm32/src/pac/stm32l4a6qg.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 165pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
166pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 166pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l4a6rg.rs b/embassy-stm32/src/pac/stm32l4a6rg.rs
index d3ee277f0..bb345cad9 100644
--- a/embassy-stm32/src/pac/stm32l4a6rg.rs
+++ b/embassy-stm32/src/pac/stm32l4a6rg.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 165pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
166pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 166pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l4a6vg.rs b/embassy-stm32/src/pac/stm32l4a6vg.rs
index d3ee277f0..bb345cad9 100644
--- a/embassy-stm32/src/pac/stm32l4a6vg.rs
+++ b/embassy-stm32/src/pac/stm32l4a6vg.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 165pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
166pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 166pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l4a6zg.rs b/embassy-stm32/src/pac/stm32l4a6zg.rs
index d3ee277f0..bb345cad9 100644
--- a/embassy-stm32/src/pac/stm32l4a6zg.rs
+++ b/embassy-stm32/src/pac/stm32l4a6zg.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 165pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
166pub const USART2: usart::Usart = usart::Usart(0x40004400 as _); 166pub const USART2: usart::Usart = usart::Usart(0x40004400 as _);
diff --git a/embassy-stm32/src/pac/stm32l4p5ae.rs b/embassy-stm32/src/pac/stm32l4p5ae.rs
index b8c08080a..e057a6852 100644
--- a/embassy-stm32/src/pac/stm32l4p5ae.rs
+++ b/embassy-stm32/src/pac/stm32l4p5ae.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub use regs::exti_v1 as exti; 165pub use regs::exti_v1 as exti;
166pub use regs::gpio_v2 as gpio; 166pub use regs::gpio_v2 as gpio;
diff --git a/embassy-stm32/src/pac/stm32l4p5ag.rs b/embassy-stm32/src/pac/stm32l4p5ag.rs
index b8c08080a..e057a6852 100644
--- a/embassy-stm32/src/pac/stm32l4p5ag.rs
+++ b/embassy-stm32/src/pac/stm32l4p5ag.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub use regs::exti_v1 as exti; 165pub use regs::exti_v1 as exti;
166pub use regs::gpio_v2 as gpio; 166pub use regs::gpio_v2 as gpio;
diff --git a/embassy-stm32/src/pac/stm32l4p5ce.rs b/embassy-stm32/src/pac/stm32l4p5ce.rs
index b8c08080a..e057a6852 100644
--- a/embassy-stm32/src/pac/stm32l4p5ce.rs
+++ b/embassy-stm32/src/pac/stm32l4p5ce.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub use regs::exti_v1 as exti; 165pub use regs::exti_v1 as exti;
166pub use regs::gpio_v2 as gpio; 166pub use regs::gpio_v2 as gpio;
diff --git a/embassy-stm32/src/pac/stm32l4p5cg.rs b/embassy-stm32/src/pac/stm32l4p5cg.rs
index b8c08080a..e057a6852 100644
--- a/embassy-stm32/src/pac/stm32l4p5cg.rs
+++ b/embassy-stm32/src/pac/stm32l4p5cg.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub use regs::exti_v1 as exti; 165pub use regs::exti_v1 as exti;
166pub use regs::gpio_v2 as gpio; 166pub use regs::gpio_v2 as gpio;
diff --git a/embassy-stm32/src/pac/stm32l4p5qe.rs b/embassy-stm32/src/pac/stm32l4p5qe.rs
index b8c08080a..e057a6852 100644
--- a/embassy-stm32/src/pac/stm32l4p5qe.rs
+++ b/embassy-stm32/src/pac/stm32l4p5qe.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub use regs::exti_v1 as exti; 165pub use regs::exti_v1 as exti;
166pub use regs::gpio_v2 as gpio; 166pub use regs::gpio_v2 as gpio;
diff --git a/embassy-stm32/src/pac/stm32l4p5qg.rs b/embassy-stm32/src/pac/stm32l4p5qg.rs
index b8c08080a..e057a6852 100644
--- a/embassy-stm32/src/pac/stm32l4p5qg.rs
+++ b/embassy-stm32/src/pac/stm32l4p5qg.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub use regs::exti_v1 as exti; 165pub use regs::exti_v1 as exti;
166pub use regs::gpio_v2 as gpio; 166pub use regs::gpio_v2 as gpio;
diff --git a/embassy-stm32/src/pac/stm32l4p5re.rs b/embassy-stm32/src/pac/stm32l4p5re.rs
index b8c08080a..e057a6852 100644
--- a/embassy-stm32/src/pac/stm32l4p5re.rs
+++ b/embassy-stm32/src/pac/stm32l4p5re.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub use regs::exti_v1 as exti; 165pub use regs::exti_v1 as exti;
166pub use regs::gpio_v2 as gpio; 166pub use regs::gpio_v2 as gpio;
diff --git a/embassy-stm32/src/pac/stm32l4p5rg.rs b/embassy-stm32/src/pac/stm32l4p5rg.rs
index b8c08080a..e057a6852 100644
--- a/embassy-stm32/src/pac/stm32l4p5rg.rs
+++ b/embassy-stm32/src/pac/stm32l4p5rg.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub use regs::exti_v1 as exti; 165pub use regs::exti_v1 as exti;
166pub use regs::gpio_v2 as gpio; 166pub use regs::gpio_v2 as gpio;
diff --git a/embassy-stm32/src/pac/stm32l4p5ve.rs b/embassy-stm32/src/pac/stm32l4p5ve.rs
index b8c08080a..e057a6852 100644
--- a/embassy-stm32/src/pac/stm32l4p5ve.rs
+++ b/embassy-stm32/src/pac/stm32l4p5ve.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub use regs::exti_v1 as exti; 165pub use regs::exti_v1 as exti;
166pub use regs::gpio_v2 as gpio; 166pub use regs::gpio_v2 as gpio;
diff --git a/embassy-stm32/src/pac/stm32l4p5vg.rs b/embassy-stm32/src/pac/stm32l4p5vg.rs
index b8c08080a..e057a6852 100644
--- a/embassy-stm32/src/pac/stm32l4p5vg.rs
+++ b/embassy-stm32/src/pac/stm32l4p5vg.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub use regs::exti_v1 as exti; 165pub use regs::exti_v1 as exti;
166pub use regs::gpio_v2 as gpio; 166pub use regs::gpio_v2 as gpio;
diff --git a/embassy-stm32/src/pac/stm32l4p5ze.rs b/embassy-stm32/src/pac/stm32l4p5ze.rs
index b8c08080a..e057a6852 100644
--- a/embassy-stm32/src/pac/stm32l4p5ze.rs
+++ b/embassy-stm32/src/pac/stm32l4p5ze.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub use regs::exti_v1 as exti; 165pub use regs::exti_v1 as exti;
166pub use regs::gpio_v2 as gpio; 166pub use regs::gpio_v2 as gpio;
diff --git a/embassy-stm32/src/pac/stm32l4p5zg.rs b/embassy-stm32/src/pac/stm32l4p5zg.rs
index b8c08080a..e057a6852 100644
--- a/embassy-stm32/src/pac/stm32l4p5zg.rs
+++ b/embassy-stm32/src/pac/stm32l4p5zg.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub use regs::exti_v1 as exti; 165pub use regs::exti_v1 as exti;
166pub use regs::gpio_v2 as gpio; 166pub use regs::gpio_v2 as gpio;
diff --git a/embassy-stm32/src/pac/stm32l4q5ag.rs b/embassy-stm32/src/pac/stm32l4q5ag.rs
index 02f751f10..7dcc4d6c6 100644
--- a/embassy-stm32/src/pac/stm32l4q5ag.rs
+++ b/embassy-stm32/src/pac/stm32l4q5ag.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub use regs::exti_v1 as exti; 165pub use regs::exti_v1 as exti;
166pub use regs::gpio_v2 as gpio; 166pub use regs::gpio_v2 as gpio;
diff --git a/embassy-stm32/src/pac/stm32l4q5cg.rs b/embassy-stm32/src/pac/stm32l4q5cg.rs
index 02f751f10..7dcc4d6c6 100644
--- a/embassy-stm32/src/pac/stm32l4q5cg.rs
+++ b/embassy-stm32/src/pac/stm32l4q5cg.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub use regs::exti_v1 as exti; 165pub use regs::exti_v1 as exti;
166pub use regs::gpio_v2 as gpio; 166pub use regs::gpio_v2 as gpio;
diff --git a/embassy-stm32/src/pac/stm32l4q5qg.rs b/embassy-stm32/src/pac/stm32l4q5qg.rs
index 02f751f10..7dcc4d6c6 100644
--- a/embassy-stm32/src/pac/stm32l4q5qg.rs
+++ b/embassy-stm32/src/pac/stm32l4q5qg.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub use regs::exti_v1 as exti; 165pub use regs::exti_v1 as exti;
166pub use regs::gpio_v2 as gpio; 166pub use regs::gpio_v2 as gpio;
diff --git a/embassy-stm32/src/pac/stm32l4q5rg.rs b/embassy-stm32/src/pac/stm32l4q5rg.rs
index 02f751f10..7dcc4d6c6 100644
--- a/embassy-stm32/src/pac/stm32l4q5rg.rs
+++ b/embassy-stm32/src/pac/stm32l4q5rg.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub use regs::exti_v1 as exti; 165pub use regs::exti_v1 as exti;
166pub use regs::gpio_v2 as gpio; 166pub use regs::gpio_v2 as gpio;
diff --git a/embassy-stm32/src/pac/stm32l4q5vg.rs b/embassy-stm32/src/pac/stm32l4q5vg.rs
index 02f751f10..7dcc4d6c6 100644
--- a/embassy-stm32/src/pac/stm32l4q5vg.rs
+++ b/embassy-stm32/src/pac/stm32l4q5vg.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub use regs::exti_v1 as exti; 165pub use regs::exti_v1 as exti;
166pub use regs::gpio_v2 as gpio; 166pub use regs::gpio_v2 as gpio;
diff --git a/embassy-stm32/src/pac/stm32l4q5zg.rs b/embassy-stm32/src/pac/stm32l4q5zg.rs
index 02f751f10..7dcc4d6c6 100644
--- a/embassy-stm32/src/pac/stm32l4q5zg.rs
+++ b/embassy-stm32/src/pac/stm32l4q5zg.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub use regs::exti_v1 as exti; 165pub use regs::exti_v1 as exti;
166pub use regs::gpio_v2 as gpio; 166pub use regs::gpio_v2 as gpio;
diff --git a/embassy-stm32/src/pac/stm32l4r5ag.rs b/embassy-stm32/src/pac/stm32l4r5ag.rs
index 6641e15eb..a9edcc96f 100644
--- a/embassy-stm32/src/pac/stm32l4r5ag.rs
+++ b/embassy-stm32/src/pac/stm32l4r5ag.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub use regs::exti_v1 as exti; 165pub use regs::exti_v1 as exti;
166pub use regs::gpio_v2 as gpio; 166pub use regs::gpio_v2 as gpio;
diff --git a/embassy-stm32/src/pac/stm32l4r5ai.rs b/embassy-stm32/src/pac/stm32l4r5ai.rs
index 6641e15eb..a9edcc96f 100644
--- a/embassy-stm32/src/pac/stm32l4r5ai.rs
+++ b/embassy-stm32/src/pac/stm32l4r5ai.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub use regs::exti_v1 as exti; 165pub use regs::exti_v1 as exti;
166pub use regs::gpio_v2 as gpio; 166pub use regs::gpio_v2 as gpio;
diff --git a/embassy-stm32/src/pac/stm32l4r5qg.rs b/embassy-stm32/src/pac/stm32l4r5qg.rs
index 6641e15eb..a9edcc96f 100644
--- a/embassy-stm32/src/pac/stm32l4r5qg.rs
+++ b/embassy-stm32/src/pac/stm32l4r5qg.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub use regs::exti_v1 as exti; 165pub use regs::exti_v1 as exti;
166pub use regs::gpio_v2 as gpio; 166pub use regs::gpio_v2 as gpio;
diff --git a/embassy-stm32/src/pac/stm32l4r5qi.rs b/embassy-stm32/src/pac/stm32l4r5qi.rs
index 6641e15eb..a9edcc96f 100644
--- a/embassy-stm32/src/pac/stm32l4r5qi.rs
+++ b/embassy-stm32/src/pac/stm32l4r5qi.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub use regs::exti_v1 as exti; 165pub use regs::exti_v1 as exti;
166pub use regs::gpio_v2 as gpio; 166pub use regs::gpio_v2 as gpio;
diff --git a/embassy-stm32/src/pac/stm32l4r5vg.rs b/embassy-stm32/src/pac/stm32l4r5vg.rs
index 6641e15eb..a9edcc96f 100644
--- a/embassy-stm32/src/pac/stm32l4r5vg.rs
+++ b/embassy-stm32/src/pac/stm32l4r5vg.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub use regs::exti_v1 as exti; 165pub use regs::exti_v1 as exti;
166pub use regs::gpio_v2 as gpio; 166pub use regs::gpio_v2 as gpio;
diff --git a/embassy-stm32/src/pac/stm32l4r5vi.rs b/embassy-stm32/src/pac/stm32l4r5vi.rs
index 6641e15eb..a9edcc96f 100644
--- a/embassy-stm32/src/pac/stm32l4r5vi.rs
+++ b/embassy-stm32/src/pac/stm32l4r5vi.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub use regs::exti_v1 as exti; 165pub use regs::exti_v1 as exti;
166pub use regs::gpio_v2 as gpio; 166pub use regs::gpio_v2 as gpio;
diff --git a/embassy-stm32/src/pac/stm32l4r5zg.rs b/embassy-stm32/src/pac/stm32l4r5zg.rs
index 6641e15eb..a9edcc96f 100644
--- a/embassy-stm32/src/pac/stm32l4r5zg.rs
+++ b/embassy-stm32/src/pac/stm32l4r5zg.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub use regs::exti_v1 as exti; 165pub use regs::exti_v1 as exti;
166pub use regs::gpio_v2 as gpio; 166pub use regs::gpio_v2 as gpio;
diff --git a/embassy-stm32/src/pac/stm32l4r5zi.rs b/embassy-stm32/src/pac/stm32l4r5zi.rs
index 6641e15eb..a9edcc96f 100644
--- a/embassy-stm32/src/pac/stm32l4r5zi.rs
+++ b/embassy-stm32/src/pac/stm32l4r5zi.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub use regs::exti_v1 as exti; 165pub use regs::exti_v1 as exti;
166pub use regs::gpio_v2 as gpio; 166pub use regs::gpio_v2 as gpio;
diff --git a/embassy-stm32/src/pac/stm32l4r7ai.rs b/embassy-stm32/src/pac/stm32l4r7ai.rs
index 7c318ec41..7118408a7 100644
--- a/embassy-stm32/src/pac/stm32l4r7ai.rs
+++ b/embassy-stm32/src/pac/stm32l4r7ai.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub use regs::exti_v1 as exti; 165pub use regs::exti_v1 as exti;
166pub use regs::gpio_v2 as gpio; 166pub use regs::gpio_v2 as gpio;
diff --git a/embassy-stm32/src/pac/stm32l4r7vi.rs b/embassy-stm32/src/pac/stm32l4r7vi.rs
index 7c318ec41..7118408a7 100644
--- a/embassy-stm32/src/pac/stm32l4r7vi.rs
+++ b/embassy-stm32/src/pac/stm32l4r7vi.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub use regs::exti_v1 as exti; 165pub use regs::exti_v1 as exti;
166pub use regs::gpio_v2 as gpio; 166pub use regs::gpio_v2 as gpio;
diff --git a/embassy-stm32/src/pac/stm32l4r7zi.rs b/embassy-stm32/src/pac/stm32l4r7zi.rs
index 7c318ec41..7118408a7 100644
--- a/embassy-stm32/src/pac/stm32l4r7zi.rs
+++ b/embassy-stm32/src/pac/stm32l4r7zi.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub use regs::exti_v1 as exti; 165pub use regs::exti_v1 as exti;
166pub use regs::gpio_v2 as gpio; 166pub use regs::gpio_v2 as gpio;
diff --git a/embassy-stm32/src/pac/stm32l4r9ag.rs b/embassy-stm32/src/pac/stm32l4r9ag.rs
index dec66c515..f2636f3dc 100644
--- a/embassy-stm32/src/pac/stm32l4r9ag.rs
+++ b/embassy-stm32/src/pac/stm32l4r9ag.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub use regs::exti_v1 as exti; 165pub use regs::exti_v1 as exti;
166pub use regs::gpio_v2 as gpio; 166pub use regs::gpio_v2 as gpio;
diff --git a/embassy-stm32/src/pac/stm32l4r9ai.rs b/embassy-stm32/src/pac/stm32l4r9ai.rs
index dec66c515..f2636f3dc 100644
--- a/embassy-stm32/src/pac/stm32l4r9ai.rs
+++ b/embassy-stm32/src/pac/stm32l4r9ai.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub use regs::exti_v1 as exti; 165pub use regs::exti_v1 as exti;
166pub use regs::gpio_v2 as gpio; 166pub use regs::gpio_v2 as gpio;
diff --git a/embassy-stm32/src/pac/stm32l4r9vg.rs b/embassy-stm32/src/pac/stm32l4r9vg.rs
index dec66c515..f2636f3dc 100644
--- a/embassy-stm32/src/pac/stm32l4r9vg.rs
+++ b/embassy-stm32/src/pac/stm32l4r9vg.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub use regs::exti_v1 as exti; 165pub use regs::exti_v1 as exti;
166pub use regs::gpio_v2 as gpio; 166pub use regs::gpio_v2 as gpio;
diff --git a/embassy-stm32/src/pac/stm32l4r9vi.rs b/embassy-stm32/src/pac/stm32l4r9vi.rs
index dec66c515..f2636f3dc 100644
--- a/embassy-stm32/src/pac/stm32l4r9vi.rs
+++ b/embassy-stm32/src/pac/stm32l4r9vi.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub use regs::exti_v1 as exti; 165pub use regs::exti_v1 as exti;
166pub use regs::gpio_v2 as gpio; 166pub use regs::gpio_v2 as gpio;
diff --git a/embassy-stm32/src/pac/stm32l4r9zg.rs b/embassy-stm32/src/pac/stm32l4r9zg.rs
index dec66c515..f2636f3dc 100644
--- a/embassy-stm32/src/pac/stm32l4r9zg.rs
+++ b/embassy-stm32/src/pac/stm32l4r9zg.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub use regs::exti_v1 as exti; 165pub use regs::exti_v1 as exti;
166pub use regs::gpio_v2 as gpio; 166pub use regs::gpio_v2 as gpio;
diff --git a/embassy-stm32/src/pac/stm32l4r9zi.rs b/embassy-stm32/src/pac/stm32l4r9zi.rs
index dec66c515..f2636f3dc 100644
--- a/embassy-stm32/src/pac/stm32l4r9zi.rs
+++ b/embassy-stm32/src/pac/stm32l4r9zi.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub use regs::exti_v1 as exti; 165pub use regs::exti_v1 as exti;
166pub use regs::gpio_v2 as gpio; 166pub use regs::gpio_v2 as gpio;
diff --git a/embassy-stm32/src/pac/stm32l4s5ai.rs b/embassy-stm32/src/pac/stm32l4s5ai.rs
index 06f30e8fd..a86c017f6 100644
--- a/embassy-stm32/src/pac/stm32l4s5ai.rs
+++ b/embassy-stm32/src/pac/stm32l4s5ai.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub use regs::exti_v1 as exti; 165pub use regs::exti_v1 as exti;
166pub use regs::gpio_v2 as gpio; 166pub use regs::gpio_v2 as gpio;
diff --git a/embassy-stm32/src/pac/stm32l4s5qi.rs b/embassy-stm32/src/pac/stm32l4s5qi.rs
index 06f30e8fd..a86c017f6 100644
--- a/embassy-stm32/src/pac/stm32l4s5qi.rs
+++ b/embassy-stm32/src/pac/stm32l4s5qi.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub use regs::exti_v1 as exti; 165pub use regs::exti_v1 as exti;
166pub use regs::gpio_v2 as gpio; 166pub use regs::gpio_v2 as gpio;
diff --git a/embassy-stm32/src/pac/stm32l4s5vi.rs b/embassy-stm32/src/pac/stm32l4s5vi.rs
index 06f30e8fd..a86c017f6 100644
--- a/embassy-stm32/src/pac/stm32l4s5vi.rs
+++ b/embassy-stm32/src/pac/stm32l4s5vi.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub use regs::exti_v1 as exti; 165pub use regs::exti_v1 as exti;
166pub use regs::gpio_v2 as gpio; 166pub use regs::gpio_v2 as gpio;
diff --git a/embassy-stm32/src/pac/stm32l4s5zi.rs b/embassy-stm32/src/pac/stm32l4s5zi.rs
index 06f30e8fd..a86c017f6 100644
--- a/embassy-stm32/src/pac/stm32l4s5zi.rs
+++ b/embassy-stm32/src/pac/stm32l4s5zi.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub use regs::exti_v1 as exti; 165pub use regs::exti_v1 as exti;
166pub use regs::gpio_v2 as gpio; 166pub use regs::gpio_v2 as gpio;
diff --git a/embassy-stm32/src/pac/stm32l4s7ai.rs b/embassy-stm32/src/pac/stm32l4s7ai.rs
index 55843121d..fbba75ae2 100644
--- a/embassy-stm32/src/pac/stm32l4s7ai.rs
+++ b/embassy-stm32/src/pac/stm32l4s7ai.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub use regs::exti_v1 as exti; 165pub use regs::exti_v1 as exti;
166pub use regs::gpio_v2 as gpio; 166pub use regs::gpio_v2 as gpio;
diff --git a/embassy-stm32/src/pac/stm32l4s7vi.rs b/embassy-stm32/src/pac/stm32l4s7vi.rs
index 55843121d..fbba75ae2 100644
--- a/embassy-stm32/src/pac/stm32l4s7vi.rs
+++ b/embassy-stm32/src/pac/stm32l4s7vi.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub use regs::exti_v1 as exti; 165pub use regs::exti_v1 as exti;
166pub use regs::gpio_v2 as gpio; 166pub use regs::gpio_v2 as gpio;
diff --git a/embassy-stm32/src/pac/stm32l4s7zi.rs b/embassy-stm32/src/pac/stm32l4s7zi.rs
index 55843121d..fbba75ae2 100644
--- a/embassy-stm32/src/pac/stm32l4s7zi.rs
+++ b/embassy-stm32/src/pac/stm32l4s7zi.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub use regs::exti_v1 as exti; 165pub use regs::exti_v1 as exti;
166pub use regs::gpio_v2 as gpio; 166pub use regs::gpio_v2 as gpio;
diff --git a/embassy-stm32/src/pac/stm32l4s9ai.rs b/embassy-stm32/src/pac/stm32l4s9ai.rs
index 57715fbfa..c19cf10d7 100644
--- a/embassy-stm32/src/pac/stm32l4s9ai.rs
+++ b/embassy-stm32/src/pac/stm32l4s9ai.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub use regs::exti_v1 as exti; 165pub use regs::exti_v1 as exti;
166pub use regs::gpio_v2 as gpio; 166pub use regs::gpio_v2 as gpio;
diff --git a/embassy-stm32/src/pac/stm32l4s9vi.rs b/embassy-stm32/src/pac/stm32l4s9vi.rs
index 57715fbfa..c19cf10d7 100644
--- a/embassy-stm32/src/pac/stm32l4s9vi.rs
+++ b/embassy-stm32/src/pac/stm32l4s9vi.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub use regs::exti_v1 as exti; 165pub use regs::exti_v1 as exti;
166pub use regs::gpio_v2 as gpio; 166pub use regs::gpio_v2 as gpio;
diff --git a/embassy-stm32/src/pac/stm32l4s9zi.rs b/embassy-stm32/src/pac/stm32l4s9zi.rs
index 57715fbfa..c19cf10d7 100644
--- a/embassy-stm32/src/pac/stm32l4s9zi.rs
+++ b/embassy-stm32/src/pac/stm32l4s9zi.rs
@@ -160,7 +160,7 @@ pub const GPIOG: gpio::Gpio = gpio::Gpio(0x48001800 as _);
160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _); 160pub const GPIOH: gpio::Gpio = gpio::Gpio(0x48001c00 as _);
161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _); 161pub const GPIOI: gpio::Gpio = gpio::Gpio(0x48002000 as _);
162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 162pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
163impl_rng!(); 163impl_rng!(RNG);
164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
165pub use regs::exti_v1 as exti; 165pub use regs::exti_v1 as exti;
166pub use regs::gpio_v2 as gpio; 166pub use regs::gpio_v2 as gpio;
diff --git a/embassy-stm32/src/rng.rs b/embassy-stm32/src/rng.rs
index 1e7cce01b..9eedcb17d 100644
--- a/embassy-stm32/src/rng.rs
+++ b/embassy-stm32/src/rng.rs
@@ -29,7 +29,24 @@ pub struct Random<T: Instance> {
29impl<T: Instance> Random<T> { 29impl<T: Instance> Random<T> {
30 pub fn new(inner: impl Unborrow<Target=T>) -> Self { 30 pub fn new(inner: impl Unborrow<Target=T>) -> Self {
31 unborrow!(inner); 31 unborrow!(inner);
32 Self { inner } 32 let mut random = Self { inner };
33 random.reset();
34 random
35 }
36
37 pub fn reset(&mut self) {
38 unsafe {
39 T::regs().cr().modify(|reg| {
40 reg.set_rngen(true);
41 reg.set_ie(true);
42 });
43 T::regs().sr().modify(|reg| {
44 reg.set_seis(false);
45 reg.set_ceis(false);
46 });
47 }
48 // Reference manual says to discard the first.
49 let _ = self.next_u32();
33 } 50 }
34} 51}
35 52
@@ -87,7 +104,6 @@ impl<T: Instance> traits::rng::Rng for Random<T> {
87 reg.set_rngen(true); 104 reg.set_rngen(true);
88 }); 105 });
89 } 106 }
90
91 async move { 107 async move {
92 for chunk in dest.chunks_mut(4) { 108 for chunk in dest.chunks_mut(4) {
93 poll_fn(|cx| { 109 poll_fn(|cx| {
@@ -103,18 +119,10 @@ impl<T: Instance> traits::rng::Rng for Random<T> {
103 if bits.drdy() { 119 if bits.drdy() {
104 Poll::Ready(Ok(())) 120 Poll::Ready(Ok(()))
105 } else if bits.seis() { 121 } else if bits.seis() {
106 unsafe { 122 self.reset();
107 T::regs().sr().modify(|reg| {
108 reg.set_seis(false);
109 });
110 }
111 Poll::Ready(Err(Error::SeedError)) 123 Poll::Ready(Err(Error::SeedError))
112 } else if bits.ceis() { 124 } else if bits.ceis() {
113 unsafe { 125 self.reset();
114 T::regs().sr().modify(|reg| {
115 reg.set_ceis(false);
116 });
117 }
118 Poll::Ready(Err(Error::ClockError)) 126 Poll::Ready(Err(Error::ClockError))
119 } else { 127 } else {
120 Poll::Pending 128 Poll::Pending
@@ -141,7 +149,7 @@ pub(crate) mod sealed {
141pub trait Instance: sealed::Instance {} 149pub trait Instance: sealed::Instance {}
142 150
143macro_rules! impl_rng { 151macro_rules! impl_rng {
144 () => { 152 ($inst:ident) => {
145 impl crate::rng::sealed::Instance for peripherals::RNG { 153 impl crate::rng::sealed::Instance for peripherals::RNG {
146 fn regs() -> crate::pac::chip::rng::Rng { 154 fn regs() -> crate::pac::chip::rng::Rng {
147 crate::pac::RNG 155 crate::pac::RNG