aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2021-05-15 00:48:32 +0200
committerGitHub <[email protected]>2021-05-15 00:48:32 +0200
commitee869efcb58fa951e3dd377926b83c6b15cde716 (patch)
tree0526f5832e5383d924d79cce32364b988fb57af6
parentc4294d97ff137cb98e4bb3efc8be1c18919bfbc6 (diff)
parent28533cfc77e47148122df868ac13132dbfc0740f (diff)
Merge pull request #171 from bobmcwhirter/spi_checkpoint
Spi checkpoint
-rw-r--r--embassy-stm32-examples/src/bin/spi.rs72
-rw-r--r--embassy-stm32/Cargo.toml387
-rw-r--r--embassy-stm32/gen.py17
-rw-r--r--embassy-stm32/src/gpio.rs10
-rw-r--r--embassy-stm32/src/lib.rs6
-rw-r--r--embassy-stm32/src/pac/regs.rs12494
-rw-r--r--embassy-stm32/src/pac/stm32f401cb.rs29
-rw-r--r--embassy-stm32/src/pac/stm32f401cc.rs29
-rw-r--r--embassy-stm32/src/pac/stm32f401cd.rs29
-rw-r--r--embassy-stm32/src/pac/stm32f401ce.rs29
-rw-r--r--embassy-stm32/src/pac/stm32f401rb.rs29
-rw-r--r--embassy-stm32/src/pac/stm32f401rc.rs29
-rw-r--r--embassy-stm32/src/pac/stm32f401rd.rs29
-rw-r--r--embassy-stm32/src/pac/stm32f401re.rs29
-rw-r--r--embassy-stm32/src/pac/stm32f401vb.rs37
-rw-r--r--embassy-stm32/src/pac/stm32f401vc.rs37
-rw-r--r--embassy-stm32/src/pac/stm32f401vd.rs37
-rw-r--r--embassy-stm32/src/pac/stm32f401ve.rs37
-rw-r--r--embassy-stm32/src/pac/stm32f405oe.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f405og.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f405rg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f405vg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f405zg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f407ie.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f407ig.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f407ve.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f407vg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f407ze.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f407zg.rs32
-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/stm32f411cc.rs55
-rw-r--r--embassy-stm32/src/pac/stm32f411ce.rs55
-rw-r--r--embassy-stm32/src/pac/stm32f411rc.rs55
-rw-r--r--embassy-stm32/src/pac/stm32f411re.rs55
-rw-r--r--embassy-stm32/src/pac/stm32f411vc.rs55
-rw-r--r--embassy-stm32/src/pac/stm32f411ve.rs55
-rw-r--r--embassy-stm32/src/pac/stm32f412ce.rs44
-rw-r--r--embassy-stm32/src/pac/stm32f412cg.rs44
-rw-r--r--embassy-stm32/src/pac/stm32f412re.rs45
-rw-r--r--embassy-stm32/src/pac/stm32f412rg.rs45
-rw-r--r--embassy-stm32/src/pac/stm32f412ve.rs57
-rw-r--r--embassy-stm32/src/pac/stm32f412vg.rs57
-rw-r--r--embassy-stm32/src/pac/stm32f412ze.rs57
-rw-r--r--embassy-stm32/src/pac/stm32f412zg.rs57
-rw-r--r--embassy-stm32/src/pac/stm32f413cg.rs59
-rw-r--r--embassy-stm32/src/pac/stm32f413ch.rs59
-rw-r--r--embassy-stm32/src/pac/stm32f413mg.rs60
-rw-r--r--embassy-stm32/src/pac/stm32f413mh.rs60
-rw-r--r--embassy-stm32/src/pac/stm32f413rg.rs60
-rw-r--r--embassy-stm32/src/pac/stm32f413rh.rs60
-rw-r--r--embassy-stm32/src/pac/stm32f413vg.rs60
-rw-r--r--embassy-stm32/src/pac/stm32f413vh.rs60
-rw-r--r--embassy-stm32/src/pac/stm32f413zg.rs60
-rw-r--r--embassy-stm32/src/pac/stm32f413zh.rs60
-rw-r--r--embassy-stm32/src/pac/stm32f415og.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f415rg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f415vg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f415zg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f417ie.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f417ig.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f417ve.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f417vg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f417ze.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f417zg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f423ch.rs59
-rw-r--r--embassy-stm32/src/pac/stm32f423mh.rs60
-rw-r--r--embassy-stm32/src/pac/stm32f423rh.rs60
-rw-r--r--embassy-stm32/src/pac/stm32f423vh.rs60
-rw-r--r--embassy-stm32/src/pac/stm32f423zh.rs60
-rw-r--r--embassy-stm32/src/pac/stm32f427ag.rs50
-rw-r--r--embassy-stm32/src/pac/stm32f427ai.rs50
-rw-r--r--embassy-stm32/src/pac/stm32f427ig.rs55
-rw-r--r--embassy-stm32/src/pac/stm32f427ii.rs55
-rw-r--r--embassy-stm32/src/pac/stm32f427vg.rs42
-rw-r--r--embassy-stm32/src/pac/stm32f427vi.rs42
-rw-r--r--embassy-stm32/src/pac/stm32f427zg.rs55
-rw-r--r--embassy-stm32/src/pac/stm32f427zi.rs55
-rw-r--r--embassy-stm32/src/pac/stm32f429ag.rs50
-rw-r--r--embassy-stm32/src/pac/stm32f429ai.rs50
-rw-r--r--embassy-stm32/src/pac/stm32f429be.rs55
-rw-r--r--embassy-stm32/src/pac/stm32f429bg.rs55
-rw-r--r--embassy-stm32/src/pac/stm32f429bi.rs55
-rw-r--r--embassy-stm32/src/pac/stm32f429ie.rs55
-rw-r--r--embassy-stm32/src/pac/stm32f429ig.rs55
-rw-r--r--embassy-stm32/src/pac/stm32f429ii.rs55
-rw-r--r--embassy-stm32/src/pac/stm32f429ne.rs55
-rw-r--r--embassy-stm32/src/pac/stm32f429ng.rs55
-rw-r--r--embassy-stm32/src/pac/stm32f429ni.rs55
-rw-r--r--embassy-stm32/src/pac/stm32f429ve.rs42
-rw-r--r--embassy-stm32/src/pac/stm32f429vg.rs42
-rw-r--r--embassy-stm32/src/pac/stm32f429vi.rs42
-rw-r--r--embassy-stm32/src/pac/stm32f429ze.rs55
-rw-r--r--embassy-stm32/src/pac/stm32f429zg.rs55
-rw-r--r--embassy-stm32/src/pac/stm32f429zi.rs55
-rw-r--r--embassy-stm32/src/pac/stm32f437ai.rs50
-rw-r--r--embassy-stm32/src/pac/stm32f437ig.rs55
-rw-r--r--embassy-stm32/src/pac/stm32f437ii.rs55
-rw-r--r--embassy-stm32/src/pac/stm32f437vg.rs42
-rw-r--r--embassy-stm32/src/pac/stm32f437vi.rs42
-rw-r--r--embassy-stm32/src/pac/stm32f437zg.rs55
-rw-r--r--embassy-stm32/src/pac/stm32f437zi.rs55
-rw-r--r--embassy-stm32/src/pac/stm32f439ai.rs50
-rw-r--r--embassy-stm32/src/pac/stm32f439bg.rs55
-rw-r--r--embassy-stm32/src/pac/stm32f439bi.rs55
-rw-r--r--embassy-stm32/src/pac/stm32f439ig.rs55
-rw-r--r--embassy-stm32/src/pac/stm32f439ii.rs55
-rw-r--r--embassy-stm32/src/pac/stm32f439ng.rs55
-rw-r--r--embassy-stm32/src/pac/stm32f439ni.rs55
-rw-r--r--embassy-stm32/src/pac/stm32f439vg.rs42
-rw-r--r--embassy-stm32/src/pac/stm32f439vi.rs42
-rw-r--r--embassy-stm32/src/pac/stm32f439zg.rs55
-rw-r--r--embassy-stm32/src/pac/stm32f439zi.rs55
-rw-r--r--embassy-stm32/src/pac/stm32f446mc.rs48
-rw-r--r--embassy-stm32/src/pac/stm32f446me.rs48
-rw-r--r--embassy-stm32/src/pac/stm32f446rc.rs36
-rw-r--r--embassy-stm32/src/pac/stm32f446re.rs36
-rw-r--r--embassy-stm32/src/pac/stm32f446vc.rs48
-rw-r--r--embassy-stm32/src/pac/stm32f446ve.rs48
-rw-r--r--embassy-stm32/src/pac/stm32f446zc.rs48
-rw-r--r--embassy-stm32/src/pac/stm32f446ze.rs48
-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.rs38
-rw-r--r--embassy-stm32/src/pac/stm32l431cc.rs38
-rw-r--r--embassy-stm32/src/pac/stm32l431kb.rs27
-rw-r--r--embassy-stm32/src/pac/stm32l431kc.rs27
-rw-r--r--embassy-stm32/src/pac/stm32l431rb.rs38
-rw-r--r--embassy-stm32/src/pac/stm32l431rc.rs38
-rw-r--r--embassy-stm32/src/pac/stm32l431vc.rs38
-rw-r--r--embassy-stm32/src/pac/stm32l432kb.rs25
-rw-r--r--embassy-stm32/src/pac/stm32l432kc.rs25
-rw-r--r--embassy-stm32/src/pac/stm32l433cb.rs38
-rw-r--r--embassy-stm32/src/pac/stm32l433cc.rs38
-rw-r--r--embassy-stm32/src/pac/stm32l433rb.rs38
-rw-r--r--embassy-stm32/src/pac/stm32l433rc.rs38
-rw-r--r--embassy-stm32/src/pac/stm32l433vc.rs38
-rw-r--r--embassy-stm32/src/pac/stm32l442kc.rs25
-rw-r--r--embassy-stm32/src/pac/stm32l443cc.rs38
-rw-r--r--embassy-stm32/src/pac/stm32l443rc.rs38
-rw-r--r--embassy-stm32/src/pac/stm32l443vc.rs38
-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.rs50
-rw-r--r--embassy-stm32/src/pac/stm32l496ag.rs50
-rw-r--r--embassy-stm32/src/pac/stm32l496qe.rs50
-rw-r--r--embassy-stm32/src/pac/stm32l496qg.rs50
-rw-r--r--embassy-stm32/src/pac/stm32l496re.rs50
-rw-r--r--embassy-stm32/src/pac/stm32l496rg.rs50
-rw-r--r--embassy-stm32/src/pac/stm32l496ve.rs50
-rw-r--r--embassy-stm32/src/pac/stm32l496vg.rs50
-rw-r--r--embassy-stm32/src/pac/stm32l496wg.rs50
-rw-r--r--embassy-stm32/src/pac/stm32l496ze.rs50
-rw-r--r--embassy-stm32/src/pac/stm32l496zg.rs50
-rw-r--r--embassy-stm32/src/pac/stm32l4a6ag.rs50
-rw-r--r--embassy-stm32/src/pac/stm32l4a6qg.rs50
-rw-r--r--embassy-stm32/src/pac/stm32l4a6rg.rs50
-rw-r--r--embassy-stm32/src/pac/stm32l4a6vg.rs50
-rw-r--r--embassy-stm32/src/pac/stm32l4a6zg.rs50
-rw-r--r--embassy-stm32/src/pac/stm32l4p5ae.rs51
-rw-r--r--embassy-stm32/src/pac/stm32l4p5ag.rs51
-rw-r--r--embassy-stm32/src/pac/stm32l4p5ce.rs51
-rw-r--r--embassy-stm32/src/pac/stm32l4p5cg.rs51
-rw-r--r--embassy-stm32/src/pac/stm32l4p5qe.rs51
-rw-r--r--embassy-stm32/src/pac/stm32l4p5qg.rs51
-rw-r--r--embassy-stm32/src/pac/stm32l4p5re.rs51
-rw-r--r--embassy-stm32/src/pac/stm32l4p5rg.rs51
-rw-r--r--embassy-stm32/src/pac/stm32l4p5ve.rs51
-rw-r--r--embassy-stm32/src/pac/stm32l4p5vg.rs51
-rw-r--r--embassy-stm32/src/pac/stm32l4p5ze.rs51
-rw-r--r--embassy-stm32/src/pac/stm32l4p5zg.rs51
-rw-r--r--embassy-stm32/src/pac/stm32l4q5ag.rs51
-rw-r--r--embassy-stm32/src/pac/stm32l4q5cg.rs51
-rw-r--r--embassy-stm32/src/pac/stm32l4q5qg.rs51
-rw-r--r--embassy-stm32/src/pac/stm32l4q5rg.rs51
-rw-r--r--embassy-stm32/src/pac/stm32l4q5vg.rs51
-rw-r--r--embassy-stm32/src/pac/stm32l4q5zg.rs51
-rw-r--r--embassy-stm32/src/pac/stm32l4r5ag.rs51
-rw-r--r--embassy-stm32/src/pac/stm32l4r5ai.rs51
-rw-r--r--embassy-stm32/src/pac/stm32l4r5qg.rs51
-rw-r--r--embassy-stm32/src/pac/stm32l4r5qi.rs51
-rw-r--r--embassy-stm32/src/pac/stm32l4r5vg.rs51
-rw-r--r--embassy-stm32/src/pac/stm32l4r5vi.rs51
-rw-r--r--embassy-stm32/src/pac/stm32l4r5zg.rs51
-rw-r--r--embassy-stm32/src/pac/stm32l4r5zi.rs51
-rw-r--r--embassy-stm32/src/pac/stm32l4r7ai.rs51
-rw-r--r--embassy-stm32/src/pac/stm32l4r7vi.rs51
-rw-r--r--embassy-stm32/src/pac/stm32l4r7zi.rs51
-rw-r--r--embassy-stm32/src/pac/stm32l4r9ag.rs51
-rw-r--r--embassy-stm32/src/pac/stm32l4r9ai.rs51
-rw-r--r--embassy-stm32/src/pac/stm32l4r9vg.rs51
-rw-r--r--embassy-stm32/src/pac/stm32l4r9vi.rs51
-rw-r--r--embassy-stm32/src/pac/stm32l4r9zg.rs51
-rw-r--r--embassy-stm32/src/pac/stm32l4r9zi.rs51
-rw-r--r--embassy-stm32/src/pac/stm32l4s5ai.rs51
-rw-r--r--embassy-stm32/src/pac/stm32l4s5qi.rs51
-rw-r--r--embassy-stm32/src/pac/stm32l4s5vi.rs51
-rw-r--r--embassy-stm32/src/pac/stm32l4s5zi.rs51
-rw-r--r--embassy-stm32/src/pac/stm32l4s7ai.rs51
-rw-r--r--embassy-stm32/src/pac/stm32l4s7vi.rs51
-rw-r--r--embassy-stm32/src/pac/stm32l4s7zi.rs51
-rw-r--r--embassy-stm32/src/pac/stm32l4s9ai.rs51
-rw-r--r--embassy-stm32/src/pac/stm32l4s9vi.rs51
-rw-r--r--embassy-stm32/src/pac/stm32l4s9zi.rs51
-rw-r--r--embassy-stm32/src/rng.rs33
-rw-r--r--embassy-stm32/src/spi/mod.rs101
-rw-r--r--embassy-stm32/src/spi/spi_v1.rs291
-rw-r--r--embassy-stm32/src/spi/spi_v2.rs294
-rw-r--r--embassy-stm32/src/time.rs126
m---------embassy-stm32/stm32-data0
302 files changed, 16095 insertions, 6913 deletions
diff --git a/embassy-stm32-examples/src/bin/spi.rs b/embassy-stm32-examples/src/bin/spi.rs
new file mode 100644
index 000000000..59ba09583
--- /dev/null
+++ b/embassy-stm32-examples/src/bin/spi.rs
@@ -0,0 +1,72 @@
1#![no_std]
2#![no_main]
3#![feature(trait_alias)]
4#![feature(min_type_alias_impl_trait)]
5#![feature(impl_trait_in_bindings)]
6#![feature(type_alias_impl_trait)]
7
8#[path = "../example_common.rs"]
9mod example_common;
10
11use embassy_stm32::gpio::{Input, Level, Output, Pull};
12use embedded_hal::digital::v2::{InputPin, OutputPin};
13use example_common::*;
14
15use cortex_m_rt::entry;
16use stm32f4::stm32f429 as pac;
17//use stm32l4::stm32l4x5 as pac;
18use embassy_stm32::spi::{ByteOrder, Config, Spi, MODE_0};
19use embassy_stm32::time::Hertz;
20use embedded_hal::blocking::spi::Transfer;
21
22#[entry]
23fn main() -> ! {
24 info!("Hello World, dude!");
25
26 let pp = pac::Peripherals::take().unwrap();
27
28 pp.DBGMCU.cr.modify(|_, w| {
29 w.dbg_sleep().set_bit();
30 w.dbg_standby().set_bit();
31 w.dbg_stop().set_bit()
32 });
33 pp.RCC.ahb1enr.modify(|_, w| w.dma1en().set_bit());
34
35 pp.RCC.apb1enr.modify(|_, w| {
36 w.spi3en().enabled();
37 w
38 });
39
40 pp.RCC.ahb1enr.modify(|_, w| {
41 w.gpioaen().enabled();
42 w.gpioben().enabled();
43 w.gpiocen().enabled();
44 w.gpioden().enabled();
45 w.gpioeen().enabled();
46 w.gpiofen().enabled();
47 w
48 });
49
50 let rc = pp.RCC.cfgr.read().sws().bits();
51 let p = embassy_stm32::init(Default::default());
52
53 let mut spi = Spi::new(
54 Hertz(16_000_000),
55 p.SPI3,
56 p.PC10,
57 p.PC12,
58 p.PC11,
59 Hertz(1_000_000),
60 Config::default(),
61 );
62
63 let mut cs = Output::new(p.PE0, Level::High);
64
65 loop {
66 let mut buf = [0x0A; 4];
67 cs.set_low();
68 spi.transfer(&mut buf);
69 cs.set_high();
70 info!("xfer {=[u8]:x}", buf);
71 }
72}
diff --git a/embassy-stm32/Cargo.toml b/embassy-stm32/Cargo.toml
index 7d4bee298..f4f5b0852 100644
--- a/embassy-stm32/Cargo.toml
+++ b/embassy-stm32/Cargo.toml
@@ -28,125 +28,125 @@ defmt-warn = [ ]
28defmt-error = [ ] 28defmt-error = [ ]
29 29
30# BEGIN GENERATED FEATURES 30# BEGIN GENERATED FEATURES
31stm32f401cb = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 31stm32f401cb = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
32stm32f401cc = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 32stm32f401cc = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
33stm32f401cd = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 33stm32f401cd = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
34stm32f401ce = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 34stm32f401ce = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
35stm32f401rb = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 35stm32f401rb = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
36stm32f401rc = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 36stm32f401rc = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
37stm32f401rd = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 37stm32f401rd = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
38stm32f401re = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 38stm32f401re = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
39stm32f401vb = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 39stm32f401vb = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
40stm32f401vc = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 40stm32f401vc = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
41stm32f401vd = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 41stm32f401vd = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
42stm32f401ve = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 42stm32f401ve = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
43stm32f405oe = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 43stm32f405oe = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
44stm32f405og = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 44stm32f405og = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
45stm32f405rg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 45stm32f405rg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
46stm32f405vg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 46stm32f405vg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
47stm32f405zg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 47stm32f405zg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
48stm32f407ie = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 48stm32f407ie = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
49stm32f407ig = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 49stm32f407ig = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
50stm32f407ve = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 50stm32f407ve = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
51stm32f407vg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 51stm32f407vg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
52stm32f407ze = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 52stm32f407ze = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
53stm32f407zg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 53stm32f407zg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
54stm32f410c8 = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 54stm32f410c8 = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
55stm32f410cb = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 55stm32f410cb = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
56stm32f410r8 = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 56stm32f410r8 = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
57stm32f410rb = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 57stm32f410rb = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
58stm32f410t8 = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 58stm32f410t8 = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
59stm32f410tb = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 59stm32f410tb = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
60stm32f411cc = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 60stm32f411cc = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
61stm32f411ce = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 61stm32f411ce = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
62stm32f411rc = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 62stm32f411rc = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
63stm32f411re = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 63stm32f411re = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
64stm32f411vc = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 64stm32f411vc = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
65stm32f411ve = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 65stm32f411ve = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
66stm32f412ce = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 66stm32f412ce = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
67stm32f412cg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 67stm32f412cg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
68stm32f412re = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 68stm32f412re = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
69stm32f412rg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 69stm32f412rg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
70stm32f412ve = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 70stm32f412ve = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
71stm32f412vg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 71stm32f412vg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
72stm32f412ze = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 72stm32f412ze = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
73stm32f412zg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 73stm32f412zg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
74stm32f413cg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 74stm32f413cg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
75stm32f413ch = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 75stm32f413ch = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
76stm32f413mg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 76stm32f413mg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
77stm32f413mh = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 77stm32f413mh = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
78stm32f413rg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 78stm32f413rg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
79stm32f413rh = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 79stm32f413rh = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
80stm32f413vg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 80stm32f413vg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
81stm32f413vh = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 81stm32f413vh = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
82stm32f413zg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 82stm32f413zg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
83stm32f413zh = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 83stm32f413zh = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
84stm32f415og = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 84stm32f415og = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
85stm32f415rg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 85stm32f415rg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
86stm32f415vg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 86stm32f415vg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
87stm32f415zg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 87stm32f415zg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
88stm32f417ie = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 88stm32f417ie = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
89stm32f417ig = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 89stm32f417ig = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
90stm32f417ve = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 90stm32f417ve = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
91stm32f417vg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 91stm32f417vg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
92stm32f417ze = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 92stm32f417ze = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
93stm32f417zg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 93stm32f417zg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
94stm32f423ch = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 94stm32f423ch = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
95stm32f423mh = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 95stm32f423mh = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
96stm32f423rh = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 96stm32f423rh = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
97stm32f423vh = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 97stm32f423vh = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
98stm32f423zh = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 98stm32f423zh = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
99stm32f427ag = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 99stm32f427ag = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
100stm32f427ai = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 100stm32f427ai = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
101stm32f427ig = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 101stm32f427ig = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
102stm32f427ii = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 102stm32f427ii = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
103stm32f427vg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 103stm32f427vg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
104stm32f427vi = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 104stm32f427vi = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
105stm32f427zg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 105stm32f427zg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
106stm32f427zi = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 106stm32f427zi = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
107stm32f429ag = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 107stm32f429ag = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
108stm32f429ai = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 108stm32f429ai = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
109stm32f429be = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 109stm32f429be = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
110stm32f429bg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 110stm32f429bg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
111stm32f429bi = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 111stm32f429bi = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
112stm32f429ie = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 112stm32f429ie = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
113stm32f429ig = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 113stm32f429ig = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
114stm32f429ii = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 114stm32f429ii = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
115stm32f429ne = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 115stm32f429ne = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
116stm32f429ng = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 116stm32f429ng = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
117stm32f429ni = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 117stm32f429ni = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
118stm32f429ve = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 118stm32f429ve = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
119stm32f429vg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 119stm32f429vg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
120stm32f429vi = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 120stm32f429vi = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
121stm32f429ze = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 121stm32f429ze = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
122stm32f429zg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 122stm32f429zg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
123stm32f429zi = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 123stm32f429zi = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
124stm32f437ai = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 124stm32f437ai = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
125stm32f437ig = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 125stm32f437ig = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
126stm32f437ii = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 126stm32f437ii = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
127stm32f437vg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 127stm32f437vg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
128stm32f437vi = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 128stm32f437vi = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
129stm32f437zg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 129stm32f437zg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
130stm32f437zi = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 130stm32f437zi = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
131stm32f439ai = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 131stm32f439ai = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
132stm32f439bg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 132stm32f439bg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
133stm32f439bi = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 133stm32f439bi = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
134stm32f439ig = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 134stm32f439ig = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
135stm32f439ii = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 135stm32f439ii = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
136stm32f439ng = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 136stm32f439ng = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
137stm32f439ni = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 137stm32f439ni = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
138stm32f439vg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 138stm32f439vg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
139stm32f439vi = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 139stm32f439vi = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
140stm32f439zg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 140stm32f439zg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
141stm32f439zi = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 141stm32f439zi = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
142stm32f446mc = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 142stm32f446mc = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
143stm32f446me = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 143stm32f446me = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
144stm32f446rc = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 144stm32f446rc = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
145stm32f446re = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 145stm32f446re = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
146stm32f446vc = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 146stm32f446vc = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
147stm32f446ve = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 147stm32f446ve = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
148stm32f446zc = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 148stm32f446zc = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
149stm32f446ze = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 149stm32f446ze = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
150stm32f469ae = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 150stm32f469ae = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
151stm32f469ag = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 151stm32f469ag = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
152stm32f469ai = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] 152stm32f469ai = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
@@ -189,24 +189,24 @@ stm32l422cb = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_r
189stm32l422kb = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",] 189stm32l422kb = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",]
190stm32l422rb = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",] 190stm32l422rb = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",]
191stm32l422tb = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",] 191stm32l422tb = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",]
192stm32l431cb = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",] 192stm32l431cb = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",]
193stm32l431cc = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",] 193stm32l431cc = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",]
194stm32l431kb = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",] 194stm32l431kb = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",]
195stm32l431kc = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",] 195stm32l431kc = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",]
196stm32l431rb = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",] 196stm32l431rb = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",]
197stm32l431rc = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",] 197stm32l431rc = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",]
198stm32l431vc = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",] 198stm32l431vc = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",]
199stm32l432kb = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",] 199stm32l432kb = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",]
200stm32l432kc = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",] 200stm32l432kc = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",]
201stm32l433cb = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",] 201stm32l433cb = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",]
202stm32l433cc = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",] 202stm32l433cc = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",]
203stm32l433rb = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",] 203stm32l433rb = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",]
204stm32l433rc = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",] 204stm32l433rc = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",]
205stm32l433vc = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",] 205stm32l433vc = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",]
206stm32l442kc = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",] 206stm32l442kc = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",]
207stm32l443cc = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",] 207stm32l443cc = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",]
208stm32l443rc = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",] 208stm32l443rc = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",]
209stm32l443vc = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",] 209stm32l443vc = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",]
210stm32l451cc = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",] 210stm32l451cc = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",]
211stm32l451ce = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",] 211stm32l451ce = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",]
212stm32l451rc = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",] 212stm32l451rc = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",]
@@ -257,67 +257,67 @@ stm32l486qg = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_r
257stm32l486rg = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",] 257stm32l486rg = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",]
258stm32l486vg = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",] 258stm32l486vg = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",]
259stm32l486zg = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",] 259stm32l486zg = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",]
260stm32l496ae = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",] 260stm32l496ae = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",]
261stm32l496ag = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",] 261stm32l496ag = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",]
262stm32l496qe = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",] 262stm32l496qe = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",]
263stm32l496qg = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",] 263stm32l496qg = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",]
264stm32l496re = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",] 264stm32l496re = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",]
265stm32l496rg = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",] 265stm32l496rg = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",]
266stm32l496ve = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",] 266stm32l496ve = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",]
267stm32l496vg = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",] 267stm32l496vg = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",]
268stm32l496wg = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",] 268stm32l496wg = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",]
269stm32l496ze = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",] 269stm32l496ze = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",]
270stm32l496zg = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",] 270stm32l496zg = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",]
271stm32l4a6ag = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",] 271stm32l4a6ag = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",]
272stm32l4a6qg = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",] 272stm32l4a6qg = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",]
273stm32l4a6rg = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",] 273stm32l4a6rg = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",]
274stm32l4a6vg = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",] 274stm32l4a6vg = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",]
275stm32l4a6zg = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",] 275stm32l4a6zg = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4", "_syscfg", "_syscfg_l4", "_usart", "_usart_v2",]
276stm32l4p5ae = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4p", "_syscfg", "_syscfg_l4",] 276stm32l4p5ae = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4p", "_syscfg", "_syscfg_l4",]
277stm32l4p5ag = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4p", "_syscfg", "_syscfg_l4",] 277stm32l4p5ag = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4p", "_syscfg", "_syscfg_l4",]
278stm32l4p5ce = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4p", "_syscfg", "_syscfg_l4",] 278stm32l4p5ce = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4p", "_syscfg", "_syscfg_l4",]
279stm32l4p5cg = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4p", "_syscfg", "_syscfg_l4",] 279stm32l4p5cg = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4p", "_syscfg", "_syscfg_l4",]
280stm32l4p5qe = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4p", "_syscfg", "_syscfg_l4",] 280stm32l4p5qe = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4p", "_syscfg", "_syscfg_l4",]
281stm32l4p5qg = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4p", "_syscfg", "_syscfg_l4",] 281stm32l4p5qg = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4p", "_syscfg", "_syscfg_l4",]
282stm32l4p5re = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4p", "_syscfg", "_syscfg_l4",] 282stm32l4p5re = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4p", "_syscfg", "_syscfg_l4",]
283stm32l4p5rg = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4p", "_syscfg", "_syscfg_l4",] 283stm32l4p5rg = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4p", "_syscfg", "_syscfg_l4",]
284stm32l4p5ve = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4p", "_syscfg", "_syscfg_l4",] 284stm32l4p5ve = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4p", "_syscfg", "_syscfg_l4",]
285stm32l4p5vg = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4p", "_syscfg", "_syscfg_l4",] 285stm32l4p5vg = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4p", "_syscfg", "_syscfg_l4",]
286stm32l4p5ze = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4p", "_syscfg", "_syscfg_l4",] 286stm32l4p5ze = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4p", "_syscfg", "_syscfg_l4",]
287stm32l4p5zg = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4p", "_syscfg", "_syscfg_l4",] 287stm32l4p5zg = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4p", "_syscfg", "_syscfg_l4",]
288stm32l4q5ag = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4p", "_syscfg", "_syscfg_l4",] 288stm32l4q5ag = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4p", "_syscfg", "_syscfg_l4",]
289stm32l4q5cg = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4p", "_syscfg", "_syscfg_l4",] 289stm32l4q5cg = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4p", "_syscfg", "_syscfg_l4",]
290stm32l4q5qg = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4p", "_syscfg", "_syscfg_l4",] 290stm32l4q5qg = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4p", "_syscfg", "_syscfg_l4",]
291stm32l4q5rg = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4p", "_syscfg", "_syscfg_l4",] 291stm32l4q5rg = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4p", "_syscfg", "_syscfg_l4",]
292stm32l4q5vg = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4p", "_syscfg", "_syscfg_l4",] 292stm32l4q5vg = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4p", "_syscfg", "_syscfg_l4",]
293stm32l4q5zg = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4p", "_syscfg", "_syscfg_l4",] 293stm32l4q5zg = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4p", "_syscfg", "_syscfg_l4",]
294stm32l4r5ag = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4p", "_syscfg", "_syscfg_l4",] 294stm32l4r5ag = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4p", "_syscfg", "_syscfg_l4",]
295stm32l4r5ai = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4p", "_syscfg", "_syscfg_l4",] 295stm32l4r5ai = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4p", "_syscfg", "_syscfg_l4",]
296stm32l4r5qg = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4p", "_syscfg", "_syscfg_l4",] 296stm32l4r5qg = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4p", "_syscfg", "_syscfg_l4",]
297stm32l4r5qi = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4p", "_syscfg", "_syscfg_l4",] 297stm32l4r5qi = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4p", "_syscfg", "_syscfg_l4",]
298stm32l4r5vg = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4p", "_syscfg", "_syscfg_l4",] 298stm32l4r5vg = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4p", "_syscfg", "_syscfg_l4",]
299stm32l4r5vi = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4p", "_syscfg", "_syscfg_l4",] 299stm32l4r5vi = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4p", "_syscfg", "_syscfg_l4",]
300stm32l4r5zg = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4p", "_syscfg", "_syscfg_l4",] 300stm32l4r5zg = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4p", "_syscfg", "_syscfg_l4",]
301stm32l4r5zi = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4p", "_syscfg", "_syscfg_l4",] 301stm32l4r5zi = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4p", "_syscfg", "_syscfg_l4",]
302stm32l4r7ai = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4p", "_syscfg", "_syscfg_l4",] 302stm32l4r7ai = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4p", "_syscfg", "_syscfg_l4",]
303stm32l4r7vi = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4p", "_syscfg", "_syscfg_l4",] 303stm32l4r7vi = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4p", "_syscfg", "_syscfg_l4",]
304stm32l4r7zi = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4p", "_syscfg", "_syscfg_l4",] 304stm32l4r7zi = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4p", "_syscfg", "_syscfg_l4",]
305stm32l4r9ag = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4p", "_syscfg", "_syscfg_l4",] 305stm32l4r9ag = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4p", "_syscfg", "_syscfg_l4",]
306stm32l4r9ai = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4p", "_syscfg", "_syscfg_l4",] 306stm32l4r9ai = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4p", "_syscfg", "_syscfg_l4",]
307stm32l4r9vg = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4p", "_syscfg", "_syscfg_l4",] 307stm32l4r9vg = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4p", "_syscfg", "_syscfg_l4",]
308stm32l4r9vi = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4p", "_syscfg", "_syscfg_l4",] 308stm32l4r9vi = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4p", "_syscfg", "_syscfg_l4",]
309stm32l4r9zg = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4p", "_syscfg", "_syscfg_l4",] 309stm32l4r9zg = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4p", "_syscfg", "_syscfg_l4",]
310stm32l4r9zi = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4p", "_syscfg", "_syscfg_l4",] 310stm32l4r9zi = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4p", "_syscfg", "_syscfg_l4",]
311stm32l4s5ai = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4p", "_syscfg", "_syscfg_l4",] 311stm32l4s5ai = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4p", "_syscfg", "_syscfg_l4",]
312stm32l4s5qi = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4p", "_syscfg", "_syscfg_l4",] 312stm32l4s5qi = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4p", "_syscfg", "_syscfg_l4",]
313stm32l4s5vi = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4p", "_syscfg", "_syscfg_l4",] 313stm32l4s5vi = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4p", "_syscfg", "_syscfg_l4",]
314stm32l4s5zi = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4p", "_syscfg", "_syscfg_l4",] 314stm32l4s5zi = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4p", "_syscfg", "_syscfg_l4",]
315stm32l4s7ai = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4p", "_syscfg", "_syscfg_l4",] 315stm32l4s7ai = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4p", "_syscfg", "_syscfg_l4",]
316stm32l4s7vi = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4p", "_syscfg", "_syscfg_l4",] 316stm32l4s7vi = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4p", "_syscfg", "_syscfg_l4",]
317stm32l4s7zi = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4p", "_syscfg", "_syscfg_l4",] 317stm32l4s7zi = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4p", "_syscfg", "_syscfg_l4",]
318stm32l4s9ai = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4p", "_syscfg", "_syscfg_l4",] 318stm32l4s9ai = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4p", "_syscfg", "_syscfg_l4",]
319stm32l4s9vi = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4p", "_syscfg", "_syscfg_l4",] 319stm32l4s9vi = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4p", "_syscfg", "_syscfg_l4",]
320stm32l4s9zi = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32l4p", "_syscfg", "_syscfg_l4",] 320stm32l4s9zi = [ "_dma", "_dma_v1", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v2", "_stm32l4p", "_syscfg", "_syscfg_l4",]
321_dma = [] 321_dma = []
322_dma_v1 = [] 322_dma_v1 = []
323_dma_v2 = [] 323_dma_v2 = []
@@ -327,6 +327,9 @@ _gpio = []
327_gpio_v2 = [] 327_gpio_v2 = []
328_rng = [ "rand_core",] 328_rng = [ "rand_core",]
329_rng_v1 = [] 329_rng_v1 = []
330_spi = []
331_spi_v1 = []
332_spi_v2 = []
330_stm32f4 = [] 333_stm32f4 = []
331_stm32l4 = [] 334_stm32l4 = []
332_stm32l4p = [] 335_stm32l4p = []
diff --git a/embassy-stm32/gen.py b/embassy-stm32/gen.py
index ce4bdc1df..056d66ec1 100644
--- a/embassy-stm32/gen.py
+++ b/embassy-stm32/gen.py
@@ -113,7 +113,22 @@ for chip in chips.values():
113 f.write(f'impl_usart_pin!({name}, CkPin, {pin}, {func});') 113 f.write(f'impl_usart_pin!({name}, CkPin, {pin}, {func});')
114 114
115 if block_mod == 'rng': 115 if block_mod == 'rng':
116 f.write(f'impl_rng!({name});') 116 if 'RNG' in chip['interrupts']:
117 f.write(f'impl_rng!({name}, RNG);')
118 else:
119 f.write(f'impl_rng!({name}, HASH_RNG);')
120
121 if block_mod == 'spi':
122 clock = peri['clock']
123 f.write(f'impl_spi!({name}, {clock});')
124 for pin, funcs in af.items():
125 if pin in pins:
126 if func := funcs.get(f'{name}_SCK'):
127 f.write(f'impl_spi_pin!({name}, SckPin, {pin}, {func});')
128 if func := funcs.get(f'{name}_MOSI'):
129 f.write(f'impl_spi_pin!({name}, MosiPin, {pin}, {func});')
130 if func := funcs.get(f'{name}_MISO'):
131 f.write(f'impl_spi_pin!({name}, MisoPin, {pin}, {func});')
117 132
118 if block_mod == 'gpio': 133 if block_mod == 'gpio':
119 custom_singletons = True 134 custom_singletons = True
diff --git a/embassy-stm32/src/gpio.rs b/embassy-stm32/src/gpio.rs
index 85c573a87..350918e84 100644
--- a/embassy-stm32/src/gpio.rs
+++ b/embassy-stm32/src/gpio.rs
@@ -228,6 +228,16 @@ impl AnyPin {
228 pub unsafe fn steal(pin_port: u8) -> Self { 228 pub unsafe fn steal(pin_port: u8) -> Self {
229 Self { pin_port } 229 Self { pin_port }
230 } 230 }
231
232 #[inline]
233 fn _port(&self) -> u8 {
234 self.pin_port / 16
235 }
236
237 #[inline]
238 pub fn block(&self) -> gpio::Gpio {
239 pac::GPIO(self._port() as _)
240 }
231} 241}
232 242
233impl_unborrow!(AnyPin); 243impl_unborrow!(AnyPin);
diff --git a/embassy-stm32/src/lib.rs b/embassy-stm32/src/lib.rs
index 3ec6013a5..82a739385 100644
--- a/embassy-stm32/src/lib.rs
+++ b/embassy-stm32/src/lib.rs
@@ -17,12 +17,18 @@ pub mod exti;
17pub mod gpio; 17pub mod gpio;
18#[cfg(feature = "_rng")] 18#[cfg(feature = "_rng")]
19pub mod rng; 19pub mod rng;
20#[cfg(feature = "_spi")]
21pub mod spi;
20#[cfg(feature = "_usart")] 22#[cfg(feature = "_usart")]
21pub mod usart; 23pub mod usart;
22 24
23// This must go LAST so that it sees the `impl_foo!` macros 25// This must go LAST so that it sees the `impl_foo!` macros
24mod pac; 26mod pac;
27pub mod time;
28
29pub use embassy_macros;
25pub use embassy_macros::interrupt; 30pub use embassy_macros::interrupt;
31pub use embassy_macros::interrupt as irq;
26pub use pac::{interrupt, peripherals, Peripherals}; 32pub use pac::{interrupt, peripherals, Peripherals};
27 33
28// workaround for svd2rust-generated code using `use crate::generic::*;` 34// workaround for svd2rust-generated code using `use crate::generic::*;`
diff --git a/embassy-stm32/src/pac/regs.rs b/embassy-stm32/src/pac/regs.rs
index 38ce5981f..1adb6ca05 100644
--- a/embassy-stm32/src/pac/regs.rs
+++ b/embassy-stm32/src/pac/regs.rs
@@ -1,218 +1,461 @@
1#![no_std] 1#![no_std]
2#![doc = "Peripheral access API (generated using svd2rust v0.17.0 (22741fa 2021-04-20))"] 2#![doc = "Peripheral access API (generated using svd2rust v0.17.0 (22741fa 2021-04-20))"]
3pub mod gpio_v1 { 3pub mod dma_v2 {
4 use crate::generic::*; 4 use crate::generic::*;
5 #[doc = "General purpose I/O"] 5 #[doc = "Stream cluster: S?CR, S?NDTR, S?M0AR, S?M1AR and S?FCR registers"]
6 #[derive(Copy, Clone)] 6 #[derive(Copy, Clone)]
7 pub struct Gpio(pub *mut u8); 7 pub struct St(pub *mut u8);
8 unsafe impl Send for Gpio {} 8 unsafe impl Send for St {}
9 unsafe impl Sync for Gpio {} 9 unsafe impl Sync for St {}
10 impl Gpio { 10 impl St {
11 #[doc = "Port configuration register low (GPIOn_CRL)"] 11 #[doc = "stream x configuration register"]
12 pub fn cr(self, n: usize) -> Reg<regs::Cr, RW> { 12 pub fn cr(self) -> Reg<regs::Cr, RW> {
13 assert!(n < 2usize); 13 unsafe { Reg::from_ptr(self.0.add(0usize)) }
14 unsafe { Reg::from_ptr(self.0.add(0usize + n * 4usize)) }
15 } 14 }
16 #[doc = "Port input data register (GPIOn_IDR)"] 15 #[doc = "stream x number of data register"]
17 pub fn idr(self) -> Reg<regs::Idr, R> { 16 pub fn ndtr(self) -> Reg<regs::Ndtr, RW> {
17 unsafe { Reg::from_ptr(self.0.add(4usize)) }
18 }
19 #[doc = "stream x peripheral address register"]
20 pub fn par(self) -> Reg<u32, RW> {
18 unsafe { Reg::from_ptr(self.0.add(8usize)) } 21 unsafe { Reg::from_ptr(self.0.add(8usize)) }
19 } 22 }
20 #[doc = "Port output data register (GPIOn_ODR)"] 23 #[doc = "stream x memory 0 address register"]
21 pub fn odr(self) -> Reg<regs::Odr, RW> { 24 pub fn m0ar(self) -> Reg<u32, RW> {
22 unsafe { Reg::from_ptr(self.0.add(12usize)) } 25 unsafe { Reg::from_ptr(self.0.add(12usize)) }
23 } 26 }
24 #[doc = "Port bit set/reset register (GPIOn_BSRR)"] 27 #[doc = "stream x memory 1 address register"]
25 pub fn bsrr(self) -> Reg<regs::Bsrr, W> { 28 pub fn m1ar(self) -> Reg<u32, RW> {
26 unsafe { Reg::from_ptr(self.0.add(16usize)) } 29 unsafe { Reg::from_ptr(self.0.add(16usize)) }
27 } 30 }
28 #[doc = "Port bit reset register (GPIOn_BRR)"] 31 #[doc = "stream x FIFO control register"]
29 pub fn brr(self) -> Reg<regs::Brr, W> { 32 pub fn fcr(self) -> Reg<regs::Fcr, RW> {
30 unsafe { Reg::from_ptr(self.0.add(20usize)) } 33 unsafe { Reg::from_ptr(self.0.add(20usize)) }
31 } 34 }
32 #[doc = "Port configuration lock register"] 35 }
33 pub fn lckr(self) -> Reg<regs::Lckr, RW> { 36 #[doc = "DMA controller"]
34 unsafe { Reg::from_ptr(self.0.add(24usize)) } 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)) }
35 } 56 }
36 } 57 }
37 pub mod regs { 58 pub mod regs {
38 use crate::generic::*; 59 use crate::generic::*;
39 #[doc = "Port configuration register (GPIOn_CRx)"] 60 #[doc = "stream x number of data register"]
40 #[repr(transparent)] 61 #[repr(transparent)]
41 #[derive(Copy, Clone, Eq, PartialEq)] 62 #[derive(Copy, Clone, Eq, PartialEq)]
42 pub struct Cr(pub u32); 63 pub struct Ndtr(pub u32);
43 impl Cr { 64 impl Ndtr {
44 #[doc = "Port n mode bits"] 65 #[doc = "Number of data items to transfer"]
45 pub fn mode(&self, n: usize) -> super::vals::Mode { 66 pub const fn ndt(&self) -> u16 {
46 assert!(n < 8usize); 67 let val = (self.0 >> 0usize) & 0xffff;
47 let offs = 0usize + n * 4usize; 68 val as u16
48 let val = (self.0 >> offs) & 0x03;
49 super::vals::Mode(val as u8)
50 }
51 #[doc = "Port n mode bits"]
52 pub fn set_mode(&mut self, n: usize, val: super::vals::Mode) {
53 assert!(n < 8usize);
54 let offs = 0usize + n * 4usize;
55 self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs);
56 }
57 #[doc = "Port n configuration bits"]
58 pub fn cnf(&self, n: usize) -> super::vals::Cnf {
59 assert!(n < 8usize);
60 let offs = 2usize + n * 4usize;
61 let val = (self.0 >> offs) & 0x03;
62 super::vals::Cnf(val as u8)
63 } 69 }
64 #[doc = "Port n configuration bits"] 70 #[doc = "Number of data items to transfer"]
65 pub fn set_cnf(&mut self, n: usize, val: super::vals::Cnf) { 71 pub fn set_ndt(&mut self, val: u16) {
66 assert!(n < 8usize); 72 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
67 let offs = 2usize + n * 4usize;
68 self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs);
69 } 73 }
70 } 74 }
71 impl Default for Cr { 75 impl Default for Ndtr {
72 fn default() -> Cr { 76 fn default() -> Ndtr {
73 Cr(0) 77 Ndtr(0)
74 } 78 }
75 } 79 }
76 #[doc = "Port bit set/reset register (GPIOn_BSRR)"] 80 #[doc = "low interrupt flag clear register"]
77 #[repr(transparent)] 81 #[repr(transparent)]
78 #[derive(Copy, Clone, Eq, PartialEq)] 82 #[derive(Copy, Clone, Eq, PartialEq)]
79 pub struct Bsrr(pub u32); 83 pub struct Ifcr(pub u32);
80 impl Bsrr { 84 impl Ifcr {
81 #[doc = "Set bit"] 85 #[doc = "Stream x clear FIFO error interrupt flag (x = 3..0)"]
82 pub fn bs(&self, n: usize) -> bool { 86 pub fn cfeif(&self, n: usize) -> bool {
83 assert!(n < 16usize); 87 assert!(n < 4usize);
84 let offs = 0usize + n * 1usize; 88 let offs = 0usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
85 let val = (self.0 >> offs) & 0x01; 89 let val = (self.0 >> offs) & 0x01;
86 val != 0 90 val != 0
87 } 91 }
88 #[doc = "Set bit"] 92 #[doc = "Stream x clear FIFO error interrupt flag (x = 3..0)"]
89 pub fn set_bs(&mut self, n: usize, val: bool) { 93 pub fn set_cfeif(&mut self, n: usize, val: bool) {
90 assert!(n < 16usize); 94 assert!(n < 4usize);
91 let offs = 0usize + n * 1usize; 95 let offs = 0usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
92 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); 96 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
93 } 97 }
94 #[doc = "Reset bit"] 98 #[doc = "Stream x clear direct mode error interrupt flag (x = 3..0)"]
95 pub fn br(&self, n: usize) -> bool { 99 pub fn cdmeif(&self, n: usize) -> bool {
96 assert!(n < 16usize); 100 assert!(n < 4usize);
97 let offs = 16usize + n * 1usize; 101 let offs = 2usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
98 let val = (self.0 >> offs) & 0x01; 102 let val = (self.0 >> offs) & 0x01;
99 val != 0 103 val != 0
100 } 104 }
101 #[doc = "Reset bit"] 105 #[doc = "Stream x clear direct mode error interrupt flag (x = 3..0)"]
102 pub fn set_br(&mut self, n: usize, val: bool) { 106 pub fn set_cdmeif(&mut self, n: usize, val: bool) {
103 assert!(n < 16usize); 107 assert!(n < 4usize);
104 let offs = 16usize + n * 1usize; 108 let offs = 2usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
105 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); 109 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
106 } 110 }
107 } 111 #[doc = "Stream x clear transfer error interrupt flag (x = 3..0)"]
108 impl Default for Bsrr { 112 pub fn cteif(&self, n: usize) -> bool {
109 fn default() -> Bsrr { 113 assert!(n < 4usize);
110 Bsrr(0) 114 let offs = 3usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
115 let val = (self.0 >> offs) & 0x01;
116 val != 0
111 } 117 }
112 } 118 #[doc = "Stream x clear transfer error interrupt flag (x = 3..0)"]
113 #[doc = "Port input data register (GPIOn_IDR)"] 119 pub fn set_cteif(&mut self, n: usize, val: bool) {
114 #[repr(transparent)] 120 assert!(n < 4usize);
115 #[derive(Copy, Clone, Eq, PartialEq)] 121 let offs = 3usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
116 pub struct Idr(pub u32); 122 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
117 impl Idr { 123 }
118 #[doc = "Port input data"] 124 #[doc = "Stream x clear half transfer interrupt flag (x = 3..0)"]
119 pub fn idr(&self, n: usize) -> super::vals::Idr { 125 pub fn chtif(&self, n: usize) -> bool {
120 assert!(n < 16usize); 126 assert!(n < 4usize);
121 let offs = 0usize + n * 1usize; 127 let offs = 4usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
122 let val = (self.0 >> offs) & 0x01; 128 let val = (self.0 >> offs) & 0x01;
123 super::vals::Idr(val as u8) 129 val != 0
124 } 130 }
125 #[doc = "Port input data"] 131 #[doc = "Stream x clear half transfer interrupt flag (x = 3..0)"]
126 pub fn set_idr(&mut self, n: usize, val: super::vals::Idr) { 132 pub fn set_chtif(&mut self, n: usize, val: bool) {
127 assert!(n < 16usize); 133 assert!(n < 4usize);
128 let offs = 0usize + n * 1usize; 134 let offs = 4usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
129 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); 135 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
136 }
137 #[doc = "Stream x clear transfer complete interrupt flag (x = 3..0)"]
138 pub fn ctcif(&self, n: usize) -> bool {
139 assert!(n < 4usize);
140 let offs = 5usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
141 let val = (self.0 >> offs) & 0x01;
142 val != 0
143 }
144 #[doc = "Stream x clear transfer complete interrupt flag (x = 3..0)"]
145 pub fn set_ctcif(&mut self, n: usize, val: bool) {
146 assert!(n < 4usize);
147 let offs = 5usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
148 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
130 } 149 }
131 } 150 }
132 impl Default for Idr { 151 impl Default for Ifcr {
133 fn default() -> Idr { 152 fn default() -> Ifcr {
134 Idr(0) 153 Ifcr(0)
135 } 154 }
136 } 155 }
137 #[doc = "Port bit reset register (GPIOn_BRR)"] 156 #[doc = "low interrupt status register"]
138 #[repr(transparent)] 157 #[repr(transparent)]
139 #[derive(Copy, Clone, Eq, PartialEq)] 158 #[derive(Copy, Clone, Eq, PartialEq)]
140 pub struct Brr(pub u32); 159 pub struct Isr(pub u32);
141 impl Brr { 160 impl Isr {
142 #[doc = "Reset bit"] 161 #[doc = "Stream x FIFO error interrupt flag (x=3..0)"]
143 pub fn br(&self, n: usize) -> bool { 162 pub fn feif(&self, n: usize) -> bool {
144 assert!(n < 16usize); 163 assert!(n < 4usize);
145 let offs = 0usize + n * 1usize; 164 let offs = 0usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
146 let val = (self.0 >> offs) & 0x01; 165 let val = (self.0 >> offs) & 0x01;
147 val != 0 166 val != 0
148 } 167 }
149 #[doc = "Reset bit"] 168 #[doc = "Stream x FIFO error interrupt flag (x=3..0)"]
150 pub fn set_br(&mut self, n: usize, val: bool) { 169 pub fn set_feif(&mut self, n: usize, val: bool) {
151 assert!(n < 16usize); 170 assert!(n < 4usize);
152 let offs = 0usize + n * 1usize; 171 let offs = 0usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
172 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
173 }
174 #[doc = "Stream x direct mode error interrupt flag (x=3..0)"]
175 pub fn dmeif(&self, n: usize) -> bool {
176 assert!(n < 4usize);
177 let offs = 2usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
178 let val = (self.0 >> offs) & 0x01;
179 val != 0
180 }
181 #[doc = "Stream x direct mode error interrupt flag (x=3..0)"]
182 pub fn set_dmeif(&mut self, n: usize, val: bool) {
183 assert!(n < 4usize);
184 let offs = 2usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
185 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
186 }
187 #[doc = "Stream x transfer error interrupt flag (x=3..0)"]
188 pub fn teif(&self, n: usize) -> bool {
189 assert!(n < 4usize);
190 let offs = 3usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
191 let val = (self.0 >> offs) & 0x01;
192 val != 0
193 }
194 #[doc = "Stream x transfer error interrupt flag (x=3..0)"]
195 pub fn set_teif(&mut self, n: usize, val: bool) {
196 assert!(n < 4usize);
197 let offs = 3usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
198 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
199 }
200 #[doc = "Stream x half transfer interrupt flag (x=3..0)"]
201 pub fn htif(&self, n: usize) -> bool {
202 assert!(n < 4usize);
203 let offs = 4usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
204 let val = (self.0 >> offs) & 0x01;
205 val != 0
206 }
207 #[doc = "Stream x half transfer interrupt flag (x=3..0)"]
208 pub fn set_htif(&mut self, n: usize, val: bool) {
209 assert!(n < 4usize);
210 let offs = 4usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
211 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
212 }
213 #[doc = "Stream x transfer complete interrupt flag (x = 3..0)"]
214 pub fn tcif(&self, n: usize) -> bool {
215 assert!(n < 4usize);
216 let offs = 5usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
217 let val = (self.0 >> offs) & 0x01;
218 val != 0
219 }
220 #[doc = "Stream x transfer complete interrupt flag (x = 3..0)"]
221 pub fn set_tcif(&mut self, n: usize, val: bool) {
222 assert!(n < 4usize);
223 let offs = 5usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
153 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); 224 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
154 } 225 }
155 } 226 }
156 impl Default for Brr { 227 impl Default for Isr {
157 fn default() -> Brr { 228 fn default() -> Isr {
158 Brr(0) 229 Isr(0)
159 } 230 }
160 } 231 }
161 #[doc = "Port output data register (GPIOn_ODR)"] 232 #[doc = "stream x configuration register"]
162 #[repr(transparent)] 233 #[repr(transparent)]
163 #[derive(Copy, Clone, Eq, PartialEq)] 234 #[derive(Copy, Clone, Eq, PartialEq)]
164 pub struct Odr(pub u32); 235 pub struct Cr(pub u32);
165 impl Odr { 236 impl Cr {
166 #[doc = "Port output data"] 237 #[doc = "Stream enable / flag stream ready when read low"]
167 pub fn odr(&self, n: usize) -> super::vals::Odr { 238 pub const fn en(&self) -> bool {
168 assert!(n < 16usize); 239 let val = (self.0 >> 0usize) & 0x01;
169 let offs = 0usize + n * 1usize; 240 val != 0
170 let val = (self.0 >> offs) & 0x01;
171 super::vals::Odr(val as u8)
172 } 241 }
173 #[doc = "Port output data"] 242 #[doc = "Stream enable / flag stream ready when read low"]
174 pub fn set_odr(&mut self, n: usize, val: super::vals::Odr) { 243 pub fn set_en(&mut self, val: bool) {
175 assert!(n < 16usize); 244 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
176 let offs = 0usize + n * 1usize; 245 }
177 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); 246 #[doc = "Direct mode error interrupt enable"]
247 pub const fn dmeie(&self) -> bool {
248 let val = (self.0 >> 1usize) & 0x01;
249 val != 0
250 }
251 #[doc = "Direct mode error interrupt enable"]
252 pub fn set_dmeie(&mut self, val: bool) {
253 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
254 }
255 #[doc = "Transfer error interrupt enable"]
256 pub const fn teie(&self) -> bool {
257 let val = (self.0 >> 2usize) & 0x01;
258 val != 0
259 }
260 #[doc = "Transfer error interrupt enable"]
261 pub fn set_teie(&mut self, val: bool) {
262 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
263 }
264 #[doc = "Half transfer interrupt enable"]
265 pub const fn htie(&self) -> bool {
266 let val = (self.0 >> 3usize) & 0x01;
267 val != 0
268 }
269 #[doc = "Half transfer interrupt enable"]
270 pub fn set_htie(&mut self, val: bool) {
271 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
272 }
273 #[doc = "Transfer complete interrupt enable"]
274 pub const fn tcie(&self) -> bool {
275 let val = (self.0 >> 4usize) & 0x01;
276 val != 0
277 }
278 #[doc = "Transfer complete interrupt enable"]
279 pub fn set_tcie(&mut self, val: bool) {
280 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
281 }
282 #[doc = "Peripheral flow controller"]
283 pub const fn pfctrl(&self) -> super::vals::Pfctrl {
284 let val = (self.0 >> 5usize) & 0x01;
285 super::vals::Pfctrl(val as u8)
286 }
287 #[doc = "Peripheral flow controller"]
288 pub fn set_pfctrl(&mut self, val: super::vals::Pfctrl) {
289 self.0 = (self.0 & !(0x01 << 5usize)) | (((val.0 as u32) & 0x01) << 5usize);
290 }
291 #[doc = "Data transfer direction"]
292 pub const fn dir(&self) -> super::vals::Dir {
293 let val = (self.0 >> 6usize) & 0x03;
294 super::vals::Dir(val as u8)
295 }
296 #[doc = "Data transfer direction"]
297 pub fn set_dir(&mut self, val: super::vals::Dir) {
298 self.0 = (self.0 & !(0x03 << 6usize)) | (((val.0 as u32) & 0x03) << 6usize);
299 }
300 #[doc = "Circular mode"]
301 pub const fn circ(&self) -> super::vals::Circ {
302 let val = (self.0 >> 8usize) & 0x01;
303 super::vals::Circ(val as u8)
304 }
305 #[doc = "Circular mode"]
306 pub fn set_circ(&mut self, val: super::vals::Circ) {
307 self.0 = (self.0 & !(0x01 << 8usize)) | (((val.0 as u32) & 0x01) << 8usize);
308 }
309 #[doc = "Peripheral increment mode"]
310 pub const fn pinc(&self) -> super::vals::Inc {
311 let val = (self.0 >> 9usize) & 0x01;
312 super::vals::Inc(val as u8)
313 }
314 #[doc = "Peripheral increment mode"]
315 pub fn set_pinc(&mut self, val: super::vals::Inc) {
316 self.0 = (self.0 & !(0x01 << 9usize)) | (((val.0 as u32) & 0x01) << 9usize);
317 }
318 #[doc = "Memory increment mode"]
319 pub const fn minc(&self) -> super::vals::Inc {
320 let val = (self.0 >> 10usize) & 0x01;
321 super::vals::Inc(val as u8)
322 }
323 #[doc = "Memory increment mode"]
324 pub fn set_minc(&mut self, val: super::vals::Inc) {
325 self.0 = (self.0 & !(0x01 << 10usize)) | (((val.0 as u32) & 0x01) << 10usize);
326 }
327 #[doc = "Peripheral data size"]
328 pub const fn psize(&self) -> super::vals::Size {
329 let val = (self.0 >> 11usize) & 0x03;
330 super::vals::Size(val as u8)
331 }
332 #[doc = "Peripheral data size"]
333 pub fn set_psize(&mut self, val: super::vals::Size) {
334 self.0 = (self.0 & !(0x03 << 11usize)) | (((val.0 as u32) & 0x03) << 11usize);
335 }
336 #[doc = "Memory data size"]
337 pub const fn msize(&self) -> super::vals::Size {
338 let val = (self.0 >> 13usize) & 0x03;
339 super::vals::Size(val as u8)
340 }
341 #[doc = "Memory data size"]
342 pub fn set_msize(&mut self, val: super::vals::Size) {
343 self.0 = (self.0 & !(0x03 << 13usize)) | (((val.0 as u32) & 0x03) << 13usize);
344 }
345 #[doc = "Peripheral increment offset size"]
346 pub const fn pincos(&self) -> super::vals::Pincos {
347 let val = (self.0 >> 15usize) & 0x01;
348 super::vals::Pincos(val as u8)
349 }
350 #[doc = "Peripheral increment offset size"]
351 pub fn set_pincos(&mut self, val: super::vals::Pincos) {
352 self.0 = (self.0 & !(0x01 << 15usize)) | (((val.0 as u32) & 0x01) << 15usize);
353 }
354 #[doc = "Priority level"]
355 pub const fn pl(&self) -> super::vals::Pl {
356 let val = (self.0 >> 16usize) & 0x03;
357 super::vals::Pl(val as u8)
358 }
359 #[doc = "Priority level"]
360 pub fn set_pl(&mut self, val: super::vals::Pl) {
361 self.0 = (self.0 & !(0x03 << 16usize)) | (((val.0 as u32) & 0x03) << 16usize);
362 }
363 #[doc = "Double buffer mode"]
364 pub const fn dbm(&self) -> super::vals::Dbm {
365 let val = (self.0 >> 18usize) & 0x01;
366 super::vals::Dbm(val as u8)
367 }
368 #[doc = "Double buffer mode"]
369 pub fn set_dbm(&mut self, val: super::vals::Dbm) {
370 self.0 = (self.0 & !(0x01 << 18usize)) | (((val.0 as u32) & 0x01) << 18usize);
371 }
372 #[doc = "Current target (only in double buffer mode)"]
373 pub const fn ct(&self) -> super::vals::Ct {
374 let val = (self.0 >> 19usize) & 0x01;
375 super::vals::Ct(val as u8)
376 }
377 #[doc = "Current target (only in double buffer mode)"]
378 pub fn set_ct(&mut self, val: super::vals::Ct) {
379 self.0 = (self.0 & !(0x01 << 19usize)) | (((val.0 as u32) & 0x01) << 19usize);
380 }
381 #[doc = "Peripheral burst transfer configuration"]
382 pub const fn pburst(&self) -> super::vals::Burst {
383 let val = (self.0 >> 21usize) & 0x03;
384 super::vals::Burst(val as u8)
385 }
386 #[doc = "Peripheral burst transfer configuration"]
387 pub fn set_pburst(&mut self, val: super::vals::Burst) {
388 self.0 = (self.0 & !(0x03 << 21usize)) | (((val.0 as u32) & 0x03) << 21usize);
389 }
390 #[doc = "Memory burst transfer configuration"]
391 pub const fn mburst(&self) -> super::vals::Burst {
392 let val = (self.0 >> 23usize) & 0x03;
393 super::vals::Burst(val as u8)
394 }
395 #[doc = "Memory burst transfer configuration"]
396 pub fn set_mburst(&mut self, val: super::vals::Burst) {
397 self.0 = (self.0 & !(0x03 << 23usize)) | (((val.0 as u32) & 0x03) << 23usize);
398 }
399 #[doc = "Channel selection"]
400 pub const fn chsel(&self) -> u8 {
401 let val = (self.0 >> 25usize) & 0x0f;
402 val as u8
403 }
404 #[doc = "Channel selection"]
405 pub fn set_chsel(&mut self, val: u8) {
406 self.0 = (self.0 & !(0x0f << 25usize)) | (((val as u32) & 0x0f) << 25usize);
178 } 407 }
179 } 408 }
180 impl Default for Odr { 409 impl Default for Cr {
181 fn default() -> Odr { 410 fn default() -> Cr {
182 Odr(0) 411 Cr(0)
183 } 412 }
184 } 413 }
185 #[doc = "Port configuration lock register"] 414 #[doc = "stream x FIFO control register"]
186 #[repr(transparent)] 415 #[repr(transparent)]
187 #[derive(Copy, Clone, Eq, PartialEq)] 416 #[derive(Copy, Clone, Eq, PartialEq)]
188 pub struct Lckr(pub u32); 417 pub struct Fcr(pub u32);
189 impl Lckr { 418 impl Fcr {
190 #[doc = "Port A Lock bit"] 419 #[doc = "FIFO threshold selection"]
191 pub fn lck(&self, n: usize) -> super::vals::Lck { 420 pub const fn fth(&self) -> super::vals::Fth {
192 assert!(n < 16usize); 421 let val = (self.0 >> 0usize) & 0x03;
193 let offs = 0usize + n * 1usize; 422 super::vals::Fth(val as u8)
194 let val = (self.0 >> offs) & 0x01;
195 super::vals::Lck(val as u8)
196 } 423 }
197 #[doc = "Port A Lock bit"] 424 #[doc = "FIFO threshold selection"]
198 pub fn set_lck(&mut self, n: usize, val: super::vals::Lck) { 425 pub fn set_fth(&mut self, val: super::vals::Fth) {
199 assert!(n < 16usize); 426 self.0 = (self.0 & !(0x03 << 0usize)) | (((val.0 as u32) & 0x03) << 0usize);
200 let offs = 0usize + n * 1usize;
201 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs);
202 } 427 }
203 #[doc = "Lock key"] 428 #[doc = "Direct mode disable"]
204 pub const fn lckk(&self) -> super::vals::Lckk { 429 pub const fn dmdis(&self) -> super::vals::Dmdis {
205 let val = (self.0 >> 16usize) & 0x01; 430 let val = (self.0 >> 2usize) & 0x01;
206 super::vals::Lckk(val as u8) 431 super::vals::Dmdis(val as u8)
207 } 432 }
208 #[doc = "Lock key"] 433 #[doc = "Direct mode disable"]
209 pub fn set_lckk(&mut self, val: super::vals::Lckk) { 434 pub fn set_dmdis(&mut self, val: super::vals::Dmdis) {
210 self.0 = (self.0 & !(0x01 << 16usize)) | (((val.0 as u32) & 0x01) << 16usize); 435 self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize);
436 }
437 #[doc = "FIFO status"]
438 pub const fn fs(&self) -> super::vals::Fs {
439 let val = (self.0 >> 3usize) & 0x07;
440 super::vals::Fs(val as u8)
441 }
442 #[doc = "FIFO status"]
443 pub fn set_fs(&mut self, val: super::vals::Fs) {
444 self.0 = (self.0 & !(0x07 << 3usize)) | (((val.0 as u32) & 0x07) << 3usize);
445 }
446 #[doc = "FIFO error interrupt enable"]
447 pub const fn feie(&self) -> bool {
448 let val = (self.0 >> 7usize) & 0x01;
449 val != 0
450 }
451 #[doc = "FIFO error interrupt enable"]
452 pub fn set_feie(&mut self, val: bool) {
453 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
211 } 454 }
212 } 455 }
213 impl Default for Lckr { 456 impl Default for Fcr {
214 fn default() -> Lckr { 457 fn default() -> Fcr {
215 Lckr(0) 458 Fcr(0)
216 } 459 }
217 } 460 }
218 } 461 }
@@ -220,87 +463,148 @@ pub mod gpio_v1 {
220 use crate::generic::*; 463 use crate::generic::*;
221 #[repr(transparent)] 464 #[repr(transparent)]
222 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 465 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
223 pub struct Bsw(pub u8); 466 pub struct Pl(pub u8);
224 impl Bsw { 467 impl Pl {
225 #[doc = "No action on the corresponding ODx bit"] 468 #[doc = "Low"]
226 pub const NOACTION: Self = Self(0); 469 pub const LOW: Self = Self(0);
227 #[doc = "Sets the corresponding ODRx bit"] 470 #[doc = "Medium"]
228 pub const SET: Self = Self(0x01); 471 pub const MEDIUM: Self = Self(0x01);
472 #[doc = "High"]
473 pub const HIGH: Self = Self(0x02);
474 #[doc = "Very high"]
475 pub const VERYHIGH: Self = Self(0x03);
229 } 476 }
230 #[repr(transparent)] 477 #[repr(transparent)]
231 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 478 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
232 pub struct Lckk(pub u8); 479 pub struct Dir(pub u8);
233 impl Lckk { 480 impl Dir {
234 #[doc = "Port configuration lock key not active"] 481 #[doc = "Peripheral-to-memory"]
235 pub const NOTACTIVE: Self = Self(0); 482 pub const PERIPHERALTOMEMORY: Self = Self(0);
236 #[doc = "Port configuration lock key active"] 483 #[doc = "Memory-to-peripheral"]
237 pub const ACTIVE: Self = Self(0x01); 484 pub const MEMORYTOPERIPHERAL: Self = Self(0x01);
485 #[doc = "Memory-to-memory"]
486 pub const MEMORYTOMEMORY: Self = Self(0x02);
238 } 487 }
239 #[repr(transparent)] 488 #[repr(transparent)]
240 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 489 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
241 pub struct Odr(pub u8); 490 pub struct Pincos(pub u8);
242 impl Odr { 491 impl Pincos {
243 #[doc = "Set output to logic low"] 492 #[doc = "The offset size for the peripheral address calculation is linked to the PSIZE"]
244 pub const LOW: Self = Self(0); 493 pub const PSIZE: Self = Self(0);
245 #[doc = "Set output to logic high"] 494 #[doc = "The offset size for the peripheral address calculation is fixed to 4 (32-bit alignment)"]
246 pub const HIGH: Self = Self(0x01); 495 pub const FIXED4: Self = Self(0x01);
247 } 496 }
248 #[repr(transparent)] 497 #[repr(transparent)]
249 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 498 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
250 pub struct Idr(pub u8); 499 pub struct Burst(pub u8);
251 impl Idr { 500 impl Burst {
252 #[doc = "Input is logic low"] 501 #[doc = "Single transfer"]
253 pub const LOW: Self = Self(0); 502 pub const SINGLE: Self = Self(0);
254 #[doc = "Input is logic high"] 503 #[doc = "Incremental burst of 4 beats"]
255 pub const HIGH: Self = Self(0x01); 504 pub const INCR4: Self = Self(0x01);
505 #[doc = "Incremental burst of 8 beats"]
506 pub const INCR8: Self = Self(0x02);
507 #[doc = "Incremental burst of 16 beats"]
508 pub const INCR16: Self = Self(0x03);
256 } 509 }
257 #[repr(transparent)] 510 #[repr(transparent)]
258 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 511 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
259 pub struct Mode(pub u8); 512 pub struct Size(pub u8);
260 impl Mode { 513 impl Size {
261 #[doc = "Input mode (reset state)"] 514 #[doc = "Byte (8-bit)"]
262 pub const INPUT: Self = Self(0); 515 pub const BITS8: Self = Self(0);
263 #[doc = "Output mode 10 MHz"] 516 #[doc = "Half-word (16-bit)"]
264 pub const OUTPUT: Self = Self(0x01); 517 pub const BITS16: Self = Self(0x01);
265 #[doc = "Output mode 2 MHz"] 518 #[doc = "Word (32-bit)"]
266 pub const OUTPUT2: Self = Self(0x02); 519 pub const BITS32: Self = Self(0x02);
267 #[doc = "Output mode 50 MHz"]
268 pub const OUTPUT50: Self = Self(0x03);
269 } 520 }
270 #[repr(transparent)] 521 #[repr(transparent)]
271 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 522 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
272 pub struct Lck(pub u8); 523 pub struct Inc(pub u8);
273 impl Lck { 524 impl Inc {
274 #[doc = "Port configuration not locked"] 525 #[doc = "Address pointer is fixed"]
275 pub const UNLOCKED: Self = Self(0); 526 pub const FIXED: Self = Self(0);
276 #[doc = "Port configuration locked"] 527 #[doc = "Address pointer is incremented after each data transfer"]
277 pub const LOCKED: Self = Self(0x01); 528 pub const INCREMENTED: Self = Self(0x01);
278 } 529 }
279 #[repr(transparent)] 530 #[repr(transparent)]
280 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 531 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
281 pub struct Cnf(pub u8); 532 pub struct Circ(pub u8);
282 impl Cnf { 533 impl Circ {
283 #[doc = "Analog mode / Push-Pull mode"] 534 #[doc = "Circular mode disabled"]
284 pub const PUSHPULL: Self = Self(0); 535 pub const DISABLED: Self = Self(0);
285 #[doc = "Floating input (reset state) / Open Drain-Mode"] 536 #[doc = "Circular mode enabled"]
286 pub const OPENDRAIN: Self = Self(0x01); 537 pub const ENABLED: Self = Self(0x01);
287 #[doc = "Input with pull-up/pull-down / Alternate Function Push-Pull Mode"]
288 pub const ALTPUSHPULL: Self = Self(0x02);
289 #[doc = "Alternate Function Open-Drain Mode"]
290 pub const ALTOPENDRAIN: Self = Self(0x03);
291 } 538 }
292 #[repr(transparent)] 539 #[repr(transparent)]
293 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 540 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
294 pub struct Brw(pub u8); 541 pub struct Dmdis(pub u8);
295 impl Brw { 542 impl Dmdis {
296 #[doc = "No action on the corresponding ODx bit"] 543 #[doc = "Direct mode is enabled"]
297 pub const NOACTION: Self = Self(0); 544 pub const ENABLED: Self = Self(0);
298 #[doc = "Reset the ODx bit"] 545 #[doc = "Direct mode is disabled"]
299 pub const RESET: Self = Self(0x01); 546 pub const DISABLED: Self = Self(0x01);
547 }
548 #[repr(transparent)]
549 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
550 pub struct Fs(pub u8);
551 impl Fs {
552 #[doc = "0 < fifo_level < 1/4"]
553 pub const QUARTER1: Self = Self(0);
554 #[doc = "1/4 <= fifo_level < 1/2"]
555 pub const QUARTER2: Self = Self(0x01);
556 #[doc = "1/2 <= fifo_level < 3/4"]
557 pub const QUARTER3: Self = Self(0x02);
558 #[doc = "3/4 <= fifo_level < full"]
559 pub const QUARTER4: Self = Self(0x03);
560 #[doc = "FIFO is empty"]
561 pub const EMPTY: Self = Self(0x04);
562 #[doc = "FIFO is full"]
563 pub const FULL: Self = Self(0x05);
564 }
565 #[repr(transparent)]
566 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
567 pub struct Dbm(pub u8);
568 impl Dbm {
569 #[doc = "No buffer switching at the end of transfer"]
570 pub const DISABLED: Self = Self(0);
571 #[doc = "Memory target switched at the end of the DMA transfer"]
572 pub const ENABLED: Self = Self(0x01);
573 }
574 #[repr(transparent)]
575 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
576 pub struct Fth(pub u8);
577 impl Fth {
578 #[doc = "1/4 full FIFO"]
579 pub const QUARTER: Self = Self(0);
580 #[doc = "1/2 full FIFO"]
581 pub const HALF: 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 }
587 #[repr(transparent)]
588 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
589 pub struct Ct(pub u8);
590 impl Ct {
591 #[doc = "The current target memory is Memory 0"]
592 pub const MEMORY0: Self = Self(0);
593 #[doc = "The current target memory is Memory 1"]
594 pub const MEMORY1: Self = Self(0x01);
595 }
596 #[repr(transparent)]
597 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
598 pub struct Pfctrl(pub u8);
599 impl Pfctrl {
600 #[doc = "The DMA is the flow controller"]
601 pub const DMA: Self = Self(0);
602 #[doc = "The peripheral is the flow controller"]
603 pub const PERIPHERAL: Self = Self(0x01);
300 } 604 }
301 } 605 }
302} 606}
303pub mod syscfg_f4 { 607pub mod syscfg_h7 {
304 use crate::generic::*; 608 use crate::generic::*;
305 #[doc = "System configuration controller"] 609 #[doc = "System configuration controller"]
306 #[derive(Copy, Clone)] 610 #[derive(Copy, Clone)]
@@ -308,413 +612,864 @@ pub mod syscfg_f4 {
308 unsafe impl Send for Syscfg {} 612 unsafe impl Send for Syscfg {}
309 unsafe impl Sync for Syscfg {} 613 unsafe impl Sync for Syscfg {}
310 impl Syscfg { 614 impl Syscfg {
311 #[doc = "memory remap register"]
312 pub fn memrm(self) -> Reg<regs::Memrm, RW> {
313 unsafe { Reg::from_ptr(self.0.add(0usize)) }
314 }
315 #[doc = "peripheral mode configuration register"] 615 #[doc = "peripheral mode configuration register"]
316 pub fn pmc(self) -> Reg<regs::Pmc, RW> { 616 pub fn pmcr(self) -> Reg<regs::Pmcr, RW> {
317 unsafe { Reg::from_ptr(self.0.add(4usize)) } 617 unsafe { Reg::from_ptr(self.0.add(4usize)) }
318 } 618 }
319 #[doc = "external interrupt configuration register"] 619 #[doc = "external interrupt configuration register 1"]
320 pub fn exticr(self, n: usize) -> Reg<regs::Exticr, RW> { 620 pub fn exticr(self, n: usize) -> Reg<regs::Exticr, RW> {
321 assert!(n < 4usize); 621 assert!(n < 4usize);
322 unsafe { Reg::from_ptr(self.0.add(8usize + n * 4usize)) } 622 unsafe { Reg::from_ptr(self.0.add(8usize + n * 4usize)) }
323 } 623 }
324 #[doc = "Compensation cell control register"] 624 #[doc = "compensation cell control/status register"]
325 pub fn cmpcr(self) -> Reg<regs::Cmpcr, R> { 625 pub fn cccsr(self) -> Reg<regs::Cccsr, RW> {
326 unsafe { Reg::from_ptr(self.0.add(32usize)) } 626 unsafe { Reg::from_ptr(self.0.add(32usize)) }
327 } 627 }
628 #[doc = "SYSCFG compensation cell value register"]
629 pub fn ccvr(self) -> Reg<regs::Ccvr, R> {
630 unsafe { Reg::from_ptr(self.0.add(36usize)) }
631 }
632 #[doc = "SYSCFG compensation cell code register"]
633 pub fn cccr(self) -> Reg<regs::Cccr, RW> {
634 unsafe { Reg::from_ptr(self.0.add(40usize)) }
635 }
636 #[doc = "SYSCFG power control register"]
637 pub fn pwrcr(self) -> Reg<regs::Pwrcr, RW> {
638 unsafe { Reg::from_ptr(self.0.add(44usize)) }
639 }
640 #[doc = "SYSCFG package register"]
641 pub fn pkgr(self) -> Reg<regs::Pkgr, R> {
642 unsafe { Reg::from_ptr(self.0.add(292usize)) }
643 }
644 #[doc = "SYSCFG user register 0"]
645 pub fn ur0(self) -> Reg<regs::Ur0, R> {
646 unsafe { Reg::from_ptr(self.0.add(768usize)) }
647 }
648 #[doc = "SYSCFG user register 2"]
649 pub fn ur2(self) -> Reg<regs::Ur2, RW> {
650 unsafe { Reg::from_ptr(self.0.add(776usize)) }
651 }
652 #[doc = "SYSCFG user register 3"]
653 pub fn ur3(self) -> Reg<regs::Ur3, RW> {
654 unsafe { Reg::from_ptr(self.0.add(780usize)) }
655 }
656 #[doc = "SYSCFG user register 4"]
657 pub fn ur4(self) -> Reg<regs::Ur4, R> {
658 unsafe { Reg::from_ptr(self.0.add(784usize)) }
659 }
660 #[doc = "SYSCFG user register 5"]
661 pub fn ur5(self) -> Reg<regs::Ur5, R> {
662 unsafe { Reg::from_ptr(self.0.add(788usize)) }
663 }
664 #[doc = "SYSCFG user register 6"]
665 pub fn ur6(self) -> Reg<regs::Ur6, R> {
666 unsafe { Reg::from_ptr(self.0.add(792usize)) }
667 }
668 #[doc = "SYSCFG user register 7"]
669 pub fn ur7(self) -> Reg<regs::Ur7, R> {
670 unsafe { Reg::from_ptr(self.0.add(796usize)) }
671 }
672 #[doc = "SYSCFG user register 8"]
673 pub fn ur8(self) -> Reg<regs::Ur8, R> {
674 unsafe { Reg::from_ptr(self.0.add(800usize)) }
675 }
676 #[doc = "SYSCFG user register 9"]
677 pub fn ur9(self) -> Reg<regs::Ur9, R> {
678 unsafe { Reg::from_ptr(self.0.add(804usize)) }
679 }
680 #[doc = "SYSCFG user register 10"]
681 pub fn ur10(self) -> Reg<regs::Ur10, R> {
682 unsafe { Reg::from_ptr(self.0.add(808usize)) }
683 }
684 #[doc = "SYSCFG user register 11"]
685 pub fn ur11(self) -> Reg<regs::Ur11, R> {
686 unsafe { Reg::from_ptr(self.0.add(812usize)) }
687 }
688 #[doc = "SYSCFG user register 12"]
689 pub fn ur12(self) -> Reg<regs::Ur12, R> {
690 unsafe { Reg::from_ptr(self.0.add(816usize)) }
691 }
692 #[doc = "SYSCFG user register 13"]
693 pub fn ur13(self) -> Reg<regs::Ur13, R> {
694 unsafe { Reg::from_ptr(self.0.add(820usize)) }
695 }
696 #[doc = "SYSCFG user register 14"]
697 pub fn ur14(self) -> Reg<regs::Ur14, RW> {
698 unsafe { Reg::from_ptr(self.0.add(824usize)) }
699 }
700 #[doc = "SYSCFG user register 15"]
701 pub fn ur15(self) -> Reg<regs::Ur15, R> {
702 unsafe { Reg::from_ptr(self.0.add(828usize)) }
703 }
704 #[doc = "SYSCFG user register 16"]
705 pub fn ur16(self) -> Reg<regs::Ur16, R> {
706 unsafe { Reg::from_ptr(self.0.add(832usize)) }
707 }
708 #[doc = "SYSCFG user register 17"]
709 pub fn ur17(self) -> Reg<regs::Ur17, R> {
710 unsafe { Reg::from_ptr(self.0.add(836usize)) }
711 }
328 } 712 }
329 pub mod regs { 713 pub mod regs {
330 use crate::generic::*; 714 use crate::generic::*;
331 #[doc = "memory remap register"] 715 #[doc = "SYSCFG user register 7"]
332 #[repr(transparent)] 716 #[repr(transparent)]
333 #[derive(Copy, Clone, Eq, PartialEq)] 717 #[derive(Copy, Clone, Eq, PartialEq)]
334 pub struct Memrm(pub u32); 718 pub struct Ur7(pub u32);
335 impl Memrm { 719 impl Ur7 {
336 #[doc = "Memory mapping selection"] 720 #[doc = "Secured area start address for bank 1"]
337 pub const fn mem_mode(&self) -> u8 { 721 pub const fn sa_beg_1(&self) -> u16 {
338 let val = (self.0 >> 0usize) & 0x07; 722 let val = (self.0 >> 0usize) & 0x0fff;
723 val as u16
724 }
725 #[doc = "Secured area start address for bank 1"]
726 pub fn set_sa_beg_1(&mut self, val: u16) {
727 self.0 = (self.0 & !(0x0fff << 0usize)) | (((val as u32) & 0x0fff) << 0usize);
728 }
729 #[doc = "Secured area end address for bank 1"]
730 pub const fn sa_end_1(&self) -> u16 {
731 let val = (self.0 >> 16usize) & 0x0fff;
732 val as u16
733 }
734 #[doc = "Secured area end address for bank 1"]
735 pub fn set_sa_end_1(&mut self, val: u16) {
736 self.0 = (self.0 & !(0x0fff << 16usize)) | (((val as u32) & 0x0fff) << 16usize);
737 }
738 }
739 impl Default for Ur7 {
740 fn default() -> Ur7 {
741 Ur7(0)
742 }
743 }
744 #[doc = "SYSCFG user register 0"]
745 #[repr(transparent)]
746 #[derive(Copy, Clone, Eq, PartialEq)]
747 pub struct Ur0(pub u32);
748 impl Ur0 {
749 #[doc = "Bank Swap"]
750 pub const fn bks(&self) -> bool {
751 let val = (self.0 >> 0usize) & 0x01;
752 val != 0
753 }
754 #[doc = "Bank Swap"]
755 pub fn set_bks(&mut self, val: bool) {
756 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
757 }
758 #[doc = "Readout protection"]
759 pub const fn rdp(&self) -> u8 {
760 let val = (self.0 >> 16usize) & 0xff;
339 val as u8 761 val as u8
340 } 762 }
341 #[doc = "Memory mapping selection"] 763 #[doc = "Readout protection"]
342 pub fn set_mem_mode(&mut self, val: u8) { 764 pub fn set_rdp(&mut self, val: u8) {
343 self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); 765 self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize);
344 } 766 }
345 #[doc = "Flash bank mode selection"] 767 }
346 pub const fn fb_mode(&self) -> bool { 768 impl Default for Ur0 {
347 let val = (self.0 >> 8usize) & 0x01; 769 fn default() -> Ur0 {
770 Ur0(0)
771 }
772 }
773 #[doc = "SYSCFG user register 13"]
774 #[repr(transparent)]
775 #[derive(Copy, Clone, Eq, PartialEq)]
776 pub struct Ur13(pub u32);
777 impl Ur13 {
778 #[doc = "Secured DTCM RAM Size"]
779 pub const fn sdrs(&self) -> u8 {
780 let val = (self.0 >> 0usize) & 0x03;
781 val as u8
782 }
783 #[doc = "Secured DTCM RAM Size"]
784 pub fn set_sdrs(&mut self, val: u8) {
785 self.0 = (self.0 & !(0x03 << 0usize)) | (((val as u32) & 0x03) << 0usize);
786 }
787 #[doc = "D1 Standby reset"]
788 pub const fn d1sbrst(&self) -> bool {
789 let val = (self.0 >> 16usize) & 0x01;
348 val != 0 790 val != 0
349 } 791 }
350 #[doc = "Flash bank mode selection"] 792 #[doc = "D1 Standby reset"]
351 pub fn set_fb_mode(&mut self, val: bool) { 793 pub fn set_d1sbrst(&mut self, val: bool) {
352 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); 794 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
353 } 795 }
354 #[doc = "FMC memory mapping swap"] 796 }
355 pub const fn swp_fmc(&self) -> u8 { 797 impl Default for Ur13 {
356 let val = (self.0 >> 10usize) & 0x03; 798 fn default() -> Ur13 {
799 Ur13(0)
800 }
801 }
802 #[doc = "SYSCFG user register 12"]
803 #[repr(transparent)]
804 #[derive(Copy, Clone, Eq, PartialEq)]
805 pub struct Ur12(pub u32);
806 impl Ur12 {
807 #[doc = "Secure mode"]
808 pub const fn secure(&self) -> bool {
809 let val = (self.0 >> 16usize) & 0x01;
810 val != 0
811 }
812 #[doc = "Secure mode"]
813 pub fn set_secure(&mut self, val: bool) {
814 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
815 }
816 }
817 impl Default for Ur12 {
818 fn default() -> Ur12 {
819 Ur12(0)
820 }
821 }
822 #[doc = "SYSCFG power control register"]
823 #[repr(transparent)]
824 #[derive(Copy, Clone, Eq, PartialEq)]
825 pub struct Pwrcr(pub u32);
826 impl Pwrcr {
827 #[doc = "Overdrive enable"]
828 pub const fn oden(&self) -> u8 {
829 let val = (self.0 >> 0usize) & 0x0f;
357 val as u8 830 val as u8
358 } 831 }
359 #[doc = "FMC memory mapping swap"] 832 #[doc = "Overdrive enable"]
360 pub fn set_swp_fmc(&mut self, val: u8) { 833 pub fn set_oden(&mut self, val: u8) {
361 self.0 = (self.0 & !(0x03 << 10usize)) | (((val as u32) & 0x03) << 10usize); 834 self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize);
362 } 835 }
363 } 836 }
364 impl Default for Memrm { 837 impl Default for Pwrcr {
365 fn default() -> Memrm { 838 fn default() -> Pwrcr {
366 Memrm(0) 839 Pwrcr(0)
367 } 840 }
368 } 841 }
369 #[doc = "Compensation cell control register"] 842 #[doc = "SYSCFG user register 16"]
370 #[repr(transparent)] 843 #[repr(transparent)]
371 #[derive(Copy, Clone, Eq, PartialEq)] 844 #[derive(Copy, Clone, Eq, PartialEq)]
372 pub struct Cmpcr(pub u32); 845 pub struct Ur16(pub u32);
373 impl Cmpcr { 846 impl Ur16 {
374 #[doc = "Compensation cell power-down"] 847 #[doc = "Freeze independent watchdog in Stop mode"]
375 pub const fn cmp_pd(&self) -> bool { 848 pub const fn fziwdgstp(&self) -> bool {
376 let val = (self.0 >> 0usize) & 0x01; 849 let val = (self.0 >> 0usize) & 0x01;
377 val != 0 850 val != 0
378 } 851 }
379 #[doc = "Compensation cell power-down"] 852 #[doc = "Freeze independent watchdog in Stop mode"]
380 pub fn set_cmp_pd(&mut self, val: bool) { 853 pub fn set_fziwdgstp(&mut self, val: bool) {
381 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 854 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
382 } 855 }
383 #[doc = "READY"] 856 #[doc = "Private key programmed"]
384 pub const fn ready(&self) -> bool { 857 pub const fn pkp(&self) -> bool {
385 let val = (self.0 >> 8usize) & 0x01; 858 let val = (self.0 >> 16usize) & 0x01;
386 val != 0 859 val != 0
387 } 860 }
388 #[doc = "READY"] 861 #[doc = "Private key programmed"]
389 pub fn set_ready(&mut self, val: bool) { 862 pub fn set_pkp(&mut self, val: bool) {
390 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); 863 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
391 } 864 }
392 } 865 }
393 impl Default for Cmpcr { 866 impl Default for Ur16 {
394 fn default() -> Cmpcr { 867 fn default() -> Ur16 {
395 Cmpcr(0) 868 Ur16(0)
396 } 869 }
397 } 870 }
398 #[doc = "peripheral mode configuration register"] 871 #[doc = "SYSCFG user register 5"]
399 #[repr(transparent)] 872 #[repr(transparent)]
400 #[derive(Copy, Clone, Eq, PartialEq)] 873 #[derive(Copy, Clone, Eq, PartialEq)]
401 pub struct Pmc(pub u32); 874 pub struct Ur5(pub u32);
402 impl Pmc { 875 impl Ur5 {
403 #[doc = "ADC1DC2"] 876 #[doc = "Mass erase secured area disabled for bank 1"]
404 pub const fn adc1dc2(&self) -> bool { 877 pub const fn mesad_1(&self) -> bool {
878 let val = (self.0 >> 0usize) & 0x01;
879 val != 0
880 }
881 #[doc = "Mass erase secured area disabled for bank 1"]
882 pub fn set_mesad_1(&mut self, val: bool) {
883 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
884 }
885 #[doc = "Write protection for flash bank 1"]
886 pub const fn wrpn_1(&self) -> u8 {
887 let val = (self.0 >> 16usize) & 0xff;
888 val as u8
889 }
890 #[doc = "Write protection for flash bank 1"]
891 pub fn set_wrpn_1(&mut self, val: u8) {
892 self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize);
893 }
894 }
895 impl Default for Ur5 {
896 fn default() -> Ur5 {
897 Ur5(0)
898 }
899 }
900 #[doc = "SYSCFG user register 8"]
901 #[repr(transparent)]
902 #[derive(Copy, Clone, Eq, PartialEq)]
903 pub struct Ur8(pub u32);
904 impl Ur8 {
905 #[doc = "Mass erase protected area disabled for bank 2"]
906 pub const fn mepad_2(&self) -> bool {
907 let val = (self.0 >> 0usize) & 0x01;
908 val != 0
909 }
910 #[doc = "Mass erase protected area disabled for bank 2"]
911 pub fn set_mepad_2(&mut self, val: bool) {
912 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
913 }
914 #[doc = "Mass erase secured area disabled for bank 2"]
915 pub const fn mesad_2(&self) -> bool {
405 let val = (self.0 >> 16usize) & 0x01; 916 let val = (self.0 >> 16usize) & 0x01;
406 val != 0 917 val != 0
407 } 918 }
408 #[doc = "ADC1DC2"] 919 #[doc = "Mass erase secured area disabled for bank 2"]
409 pub fn set_adc1dc2(&mut self, val: bool) { 920 pub fn set_mesad_2(&mut self, val: bool) {
410 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); 921 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
411 } 922 }
412 #[doc = "ADC2DC2"] 923 }
413 pub const fn adc2dc2(&self) -> bool { 924 impl Default for Ur8 {
414 let val = (self.0 >> 17usize) & 0x01; 925 fn default() -> Ur8 {
415 val != 0 926 Ur8(0)
416 } 927 }
417 #[doc = "ADC2DC2"] 928 }
418 pub fn set_adc2dc2(&mut self, val: bool) { 929 #[doc = "SYSCFG user register 11"]
419 self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); 930 #[repr(transparent)]
931 #[derive(Copy, Clone, Eq, PartialEq)]
932 pub struct Ur11(pub u32);
933 impl Ur11 {
934 #[doc = "Secured area end address for bank 2"]
935 pub const fn sa_end_2(&self) -> u16 {
936 let val = (self.0 >> 0usize) & 0x0fff;
937 val as u16
420 } 938 }
421 #[doc = "ADC3DC2"] 939 #[doc = "Secured area end address for bank 2"]
422 pub const fn adc3dc2(&self) -> bool { 940 pub fn set_sa_end_2(&mut self, val: u16) {
423 let val = (self.0 >> 18usize) & 0x01; 941 self.0 = (self.0 & !(0x0fff << 0usize)) | (((val as u32) & 0x0fff) << 0usize);
942 }
943 #[doc = "Independent Watchdog 1 mode"]
944 pub const fn iwdg1m(&self) -> bool {
945 let val = (self.0 >> 16usize) & 0x01;
424 val != 0 946 val != 0
425 } 947 }
426 #[doc = "ADC3DC2"] 948 #[doc = "Independent Watchdog 1 mode"]
427 pub fn set_adc3dc2(&mut self, val: bool) { 949 pub fn set_iwdg1m(&mut self, val: bool) {
428 self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); 950 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
429 } 951 }
430 #[doc = "Ethernet PHY interface selection"] 952 }
431 pub const fn mii_rmii_sel(&self) -> bool { 953 impl Default for Ur11 {
432 let val = (self.0 >> 23usize) & 0x01; 954 fn default() -> Ur11 {
955 Ur11(0)
956 }
957 }
958 #[doc = "SYSCFG user register 4"]
959 #[repr(transparent)]
960 #[derive(Copy, Clone, Eq, PartialEq)]
961 pub struct Ur4(pub u32);
962 impl Ur4 {
963 #[doc = "Mass Erase Protected Area Disabled for bank 1"]
964 pub const fn mepad_1(&self) -> bool {
965 let val = (self.0 >> 16usize) & 0x01;
433 val != 0 966 val != 0
434 } 967 }
435 #[doc = "Ethernet PHY interface selection"] 968 #[doc = "Mass Erase Protected Area Disabled for bank 1"]
436 pub fn set_mii_rmii_sel(&mut self, val: bool) { 969 pub fn set_mepad_1(&mut self, val: bool) {
437 self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize); 970 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
438 } 971 }
439 } 972 }
440 impl Default for Pmc { 973 impl Default for Ur4 {
441 fn default() -> Pmc { 974 fn default() -> Ur4 {
442 Pmc(0) 975 Ur4(0)
443 } 976 }
444 } 977 }
445 #[doc = "external interrupt configuration register"] 978 #[doc = "peripheral mode configuration register"]
446 #[repr(transparent)] 979 #[repr(transparent)]
447 #[derive(Copy, Clone, Eq, PartialEq)] 980 #[derive(Copy, Clone, Eq, PartialEq)]
448 pub struct Exticr(pub u32); 981 pub struct Pmcr(pub u32);
449 impl Exticr { 982 impl Pmcr {
450 #[doc = "EXTI x configuration"] 983 #[doc = "I2C1 Fm+"]
451 pub fn exti(&self, n: usize) -> u8 { 984 pub const fn i2c1fmp(&self) -> bool {
452 assert!(n < 4usize); 985 let val = (self.0 >> 0usize) & 0x01;
453 let offs = 0usize + n * 4usize; 986 val != 0
454 let val = (self.0 >> offs) & 0x0f; 987 }
988 #[doc = "I2C1 Fm+"]
989 pub fn set_i2c1fmp(&mut self, val: bool) {
990 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
991 }
992 #[doc = "I2C2 Fm+"]
993 pub const fn i2c2fmp(&self) -> bool {
994 let val = (self.0 >> 1usize) & 0x01;
995 val != 0
996 }
997 #[doc = "I2C2 Fm+"]
998 pub fn set_i2c2fmp(&mut self, val: bool) {
999 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
1000 }
1001 #[doc = "I2C3 Fm+"]
1002 pub const fn i2c3fmp(&self) -> bool {
1003 let val = (self.0 >> 2usize) & 0x01;
1004 val != 0
1005 }
1006 #[doc = "I2C3 Fm+"]
1007 pub fn set_i2c3fmp(&mut self, val: bool) {
1008 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
1009 }
1010 #[doc = "I2C4 Fm+"]
1011 pub const fn i2c4fmp(&self) -> bool {
1012 let val = (self.0 >> 3usize) & 0x01;
1013 val != 0
1014 }
1015 #[doc = "I2C4 Fm+"]
1016 pub fn set_i2c4fmp(&mut self, val: bool) {
1017 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
1018 }
1019 #[doc = "PB(6) Fm+"]
1020 pub const fn pb6fmp(&self) -> bool {
1021 let val = (self.0 >> 4usize) & 0x01;
1022 val != 0
1023 }
1024 #[doc = "PB(6) Fm+"]
1025 pub fn set_pb6fmp(&mut self, val: bool) {
1026 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
1027 }
1028 #[doc = "PB(7) Fast Mode Plus"]
1029 pub const fn pb7fmp(&self) -> bool {
1030 let val = (self.0 >> 5usize) & 0x01;
1031 val != 0
1032 }
1033 #[doc = "PB(7) Fast Mode Plus"]
1034 pub fn set_pb7fmp(&mut self, val: bool) {
1035 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
1036 }
1037 #[doc = "PB(8) Fast Mode Plus"]
1038 pub const fn pb8fmp(&self) -> bool {
1039 let val = (self.0 >> 6usize) & 0x01;
1040 val != 0
1041 }
1042 #[doc = "PB(8) Fast Mode Plus"]
1043 pub fn set_pb8fmp(&mut self, val: bool) {
1044 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
1045 }
1046 #[doc = "PB(9) Fm+"]
1047 pub const fn pb9fmp(&self) -> bool {
1048 let val = (self.0 >> 7usize) & 0x01;
1049 val != 0
1050 }
1051 #[doc = "PB(9) Fm+"]
1052 pub fn set_pb9fmp(&mut self, val: bool) {
1053 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
1054 }
1055 #[doc = "Booster Enable"]
1056 pub const fn booste(&self) -> bool {
1057 let val = (self.0 >> 8usize) & 0x01;
1058 val != 0
1059 }
1060 #[doc = "Booster Enable"]
1061 pub fn set_booste(&mut self, val: bool) {
1062 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
1063 }
1064 #[doc = "Analog switch supply voltage selection"]
1065 pub const fn boostvddsel(&self) -> bool {
1066 let val = (self.0 >> 9usize) & 0x01;
1067 val != 0
1068 }
1069 #[doc = "Analog switch supply voltage selection"]
1070 pub fn set_boostvddsel(&mut self, val: bool) {
1071 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
1072 }
1073 #[doc = "Ethernet PHY Interface Selection"]
1074 pub const fn epis(&self) -> u8 {
1075 let val = (self.0 >> 21usize) & 0x07;
455 val as u8 1076 val as u8
456 } 1077 }
457 #[doc = "EXTI x configuration"] 1078 #[doc = "Ethernet PHY Interface Selection"]
458 pub fn set_exti(&mut self, n: usize, val: u8) { 1079 pub fn set_epis(&mut self, val: u8) {
459 assert!(n < 4usize); 1080 self.0 = (self.0 & !(0x07 << 21usize)) | (((val as u32) & 0x07) << 21usize);
460 let offs = 0usize + n * 4usize; 1081 }
461 self.0 = (self.0 & !(0x0f << offs)) | (((val as u32) & 0x0f) << offs); 1082 #[doc = "PA0 Switch Open"]
1083 pub const fn pa0so(&self) -> bool {
1084 let val = (self.0 >> 24usize) & 0x01;
1085 val != 0
1086 }
1087 #[doc = "PA0 Switch Open"]
1088 pub fn set_pa0so(&mut self, val: bool) {
1089 self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize);
1090 }
1091 #[doc = "PA1 Switch Open"]
1092 pub const fn pa1so(&self) -> bool {
1093 let val = (self.0 >> 25usize) & 0x01;
1094 val != 0
1095 }
1096 #[doc = "PA1 Switch Open"]
1097 pub fn set_pa1so(&mut self, val: bool) {
1098 self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize);
1099 }
1100 #[doc = "PC2 Switch Open"]
1101 pub const fn pc2so(&self) -> bool {
1102 let val = (self.0 >> 26usize) & 0x01;
1103 val != 0
1104 }
1105 #[doc = "PC2 Switch Open"]
1106 pub fn set_pc2so(&mut self, val: bool) {
1107 self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize);
1108 }
1109 #[doc = "PC3 Switch Open"]
1110 pub const fn pc3so(&self) -> bool {
1111 let val = (self.0 >> 27usize) & 0x01;
1112 val != 0
1113 }
1114 #[doc = "PC3 Switch Open"]
1115 pub fn set_pc3so(&mut self, val: bool) {
1116 self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize);
462 } 1117 }
463 } 1118 }
464 impl Default for Exticr { 1119 impl Default for Pmcr {
465 fn default() -> Exticr { 1120 fn default() -> Pmcr {
466 Exticr(0) 1121 Pmcr(0)
467 } 1122 }
468 } 1123 }
469 } 1124 #[doc = "SYSCFG user register 10"]
470} 1125 #[repr(transparent)]
471pub mod exti_v1 { 1126 #[derive(Copy, Clone, Eq, PartialEq)]
472 use crate::generic::*; 1127 pub struct Ur10(pub u32);
473 #[doc = "External interrupt/event controller"] 1128 impl Ur10 {
474 #[derive(Copy, Clone)] 1129 #[doc = "Protected area end address for bank 2"]
475 pub struct Exti(pub *mut u8); 1130 pub const fn pa_end_2(&self) -> u16 {
476 unsafe impl Send for Exti {} 1131 let val = (self.0 >> 0usize) & 0x0fff;
477 unsafe impl Sync for Exti {} 1132 val as u16
478 impl Exti { 1133 }
479 #[doc = "Interrupt mask register (EXTI_IMR)"] 1134 #[doc = "Protected area end address for bank 2"]
480 pub fn imr(self) -> Reg<regs::Imr, RW> { 1135 pub fn set_pa_end_2(&mut self, val: u16) {
481 unsafe { Reg::from_ptr(self.0.add(0usize)) } 1136 self.0 = (self.0 & !(0x0fff << 0usize)) | (((val as u32) & 0x0fff) << 0usize);
1137 }
1138 #[doc = "Secured area start address for bank 2"]
1139 pub const fn sa_beg_2(&self) -> u16 {
1140 let val = (self.0 >> 16usize) & 0x0fff;
1141 val as u16
1142 }
1143 #[doc = "Secured area start address for bank 2"]
1144 pub fn set_sa_beg_2(&mut self, val: u16) {
1145 self.0 = (self.0 & !(0x0fff << 16usize)) | (((val as u32) & 0x0fff) << 16usize);
1146 }
482 } 1147 }
483 #[doc = "Event mask register (EXTI_EMR)"] 1148 impl Default for Ur10 {
484 pub fn emr(self) -> Reg<regs::Emr, RW> { 1149 fn default() -> Ur10 {
485 unsafe { Reg::from_ptr(self.0.add(4usize)) } 1150 Ur10(0)
1151 }
486 } 1152 }
487 #[doc = "Rising Trigger selection register (EXTI_RTSR)"] 1153 #[doc = "SYSCFG user register 3"]
488 pub fn rtsr(self) -> Reg<regs::Rtsr, RW> { 1154 #[repr(transparent)]
489 unsafe { Reg::from_ptr(self.0.add(8usize)) } 1155 #[derive(Copy, Clone, Eq, PartialEq)]
1156 pub struct Ur3(pub u32);
1157 impl Ur3 {
1158 #[doc = "Boot Address 1"]
1159 pub const fn boot_add1(&self) -> u16 {
1160 let val = (self.0 >> 16usize) & 0xffff;
1161 val as u16
1162 }
1163 #[doc = "Boot Address 1"]
1164 pub fn set_boot_add1(&mut self, val: u16) {
1165 self.0 = (self.0 & !(0xffff << 16usize)) | (((val as u32) & 0xffff) << 16usize);
1166 }
490 } 1167 }
491 #[doc = "Falling Trigger selection register (EXTI_FTSR)"] 1168 impl Default for Ur3 {
492 pub fn ftsr(self) -> Reg<regs::Ftsr, RW> { 1169 fn default() -> Ur3 {
493 unsafe { Reg::from_ptr(self.0.add(12usize)) } 1170 Ur3(0)
1171 }
494 } 1172 }
495 #[doc = "Software interrupt event register (EXTI_SWIER)"] 1173 #[doc = "SYSCFG user register 15"]
496 pub fn swier(self) -> Reg<regs::Swier, RW> { 1174 #[repr(transparent)]
497 unsafe { Reg::from_ptr(self.0.add(16usize)) } 1175 #[derive(Copy, Clone, Eq, PartialEq)]
1176 pub struct Ur15(pub u32);
1177 impl Ur15 {
1178 #[doc = "Freeze independent watchdog in Standby mode"]
1179 pub const fn fziwdgstb(&self) -> bool {
1180 let val = (self.0 >> 16usize) & 0x01;
1181 val != 0
1182 }
1183 #[doc = "Freeze independent watchdog in Standby mode"]
1184 pub fn set_fziwdgstb(&mut self, val: bool) {
1185 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
1186 }
498 } 1187 }
499 #[doc = "Pending register (EXTI_PR)"] 1188 impl Default for Ur15 {
500 pub fn pr(self) -> Reg<regs::Pr, RW> { 1189 fn default() -> Ur15 {
501 unsafe { Reg::from_ptr(self.0.add(20usize)) } 1190 Ur15(0)
1191 }
502 } 1192 }
503 } 1193 #[doc = "SYSCFG compensation cell value register"]
504 pub mod regs {
505 use crate::generic::*;
506 #[doc = "Falling Trigger selection register (EXTI_FTSR)"]
507 #[repr(transparent)] 1194 #[repr(transparent)]
508 #[derive(Copy, Clone, Eq, PartialEq)] 1195 #[derive(Copy, Clone, Eq, PartialEq)]
509 pub struct Ftsr(pub u32); 1196 pub struct Ccvr(pub u32);
510 impl Ftsr { 1197 impl Ccvr {
511 #[doc = "Falling trigger event configuration of line 0"] 1198 #[doc = "NMOS compensation value"]
512 pub fn tr(&self, n: usize) -> super::vals::Tr { 1199 pub const fn ncv(&self) -> u8 {
513 assert!(n < 23usize); 1200 let val = (self.0 >> 0usize) & 0x0f;
514 let offs = 0usize + n * 1usize; 1201 val as u8
515 let val = (self.0 >> offs) & 0x01;
516 super::vals::Tr(val as u8)
517 } 1202 }
518 #[doc = "Falling trigger event configuration of line 0"] 1203 #[doc = "NMOS compensation value"]
519 pub fn set_tr(&mut self, n: usize, val: super::vals::Tr) { 1204 pub fn set_ncv(&mut self, val: u8) {
520 assert!(n < 23usize); 1205 self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize);
521 let offs = 0usize + n * 1usize; 1206 }
522 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); 1207 #[doc = "PMOS compensation value"]
1208 pub const fn pcv(&self) -> u8 {
1209 let val = (self.0 >> 4usize) & 0x0f;
1210 val as u8
1211 }
1212 #[doc = "PMOS compensation value"]
1213 pub fn set_pcv(&mut self, val: u8) {
1214 self.0 = (self.0 & !(0x0f << 4usize)) | (((val as u32) & 0x0f) << 4usize);
523 } 1215 }
524 } 1216 }
525 impl Default for Ftsr { 1217 impl Default for Ccvr {
526 fn default() -> Ftsr { 1218 fn default() -> Ccvr {
527 Ftsr(0) 1219 Ccvr(0)
528 } 1220 }
529 } 1221 }
530 #[doc = "Event mask register (EXTI_EMR)"] 1222 #[doc = "SYSCFG user register 9"]
531 #[repr(transparent)] 1223 #[repr(transparent)]
532 #[derive(Copy, Clone, Eq, PartialEq)] 1224 #[derive(Copy, Clone, Eq, PartialEq)]
533 pub struct Emr(pub u32); 1225 pub struct Ur9(pub u32);
534 impl Emr { 1226 impl Ur9 {
535 #[doc = "Event Mask on line 0"] 1227 #[doc = "Write protection for flash bank 2"]
536 pub fn mr(&self, n: usize) -> super::vals::Mr { 1228 pub const fn wrpn_2(&self) -> u8 {
537 assert!(n < 23usize); 1229 let val = (self.0 >> 0usize) & 0xff;
538 let offs = 0usize + n * 1usize; 1230 val as u8
539 let val = (self.0 >> offs) & 0x01;
540 super::vals::Mr(val as u8)
541 } 1231 }
542 #[doc = "Event Mask on line 0"] 1232 #[doc = "Write protection for flash bank 2"]
543 pub fn set_mr(&mut self, n: usize, val: super::vals::Mr) { 1233 pub fn set_wrpn_2(&mut self, val: u8) {
544 assert!(n < 23usize); 1234 self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize);
545 let offs = 0usize + n * 1usize; 1235 }
546 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); 1236 #[doc = "Protected area start address for bank 2"]
1237 pub const fn pa_beg_2(&self) -> u16 {
1238 let val = (self.0 >> 16usize) & 0x0fff;
1239 val as u16
1240 }
1241 #[doc = "Protected area start address for bank 2"]
1242 pub fn set_pa_beg_2(&mut self, val: u16) {
1243 self.0 = (self.0 & !(0x0fff << 16usize)) | (((val as u32) & 0x0fff) << 16usize);
547 } 1244 }
548 } 1245 }
549 impl Default for Emr { 1246 impl Default for Ur9 {
550 fn default() -> Emr { 1247 fn default() -> Ur9 {
551 Emr(0) 1248 Ur9(0)
552 } 1249 }
553 } 1250 }
554 #[doc = "Software interrupt event register (EXTI_SWIER)"] 1251 #[doc = "SYSCFG user register 17"]
555 #[repr(transparent)] 1252 #[repr(transparent)]
556 #[derive(Copy, Clone, Eq, PartialEq)] 1253 #[derive(Copy, Clone, Eq, PartialEq)]
557 pub struct Swier(pub u32); 1254 pub struct Ur17(pub u32);
558 impl Swier { 1255 impl Ur17 {
559 #[doc = "Software Interrupt on line 0"] 1256 #[doc = "I/O high speed / low voltage"]
560 pub fn swier(&self, n: usize) -> bool { 1257 pub const fn io_hslv(&self) -> bool {
561 assert!(n < 23usize); 1258 let val = (self.0 >> 0usize) & 0x01;
562 let offs = 0usize + n * 1usize;
563 let val = (self.0 >> offs) & 0x01;
564 val != 0 1259 val != 0
565 } 1260 }
566 #[doc = "Software Interrupt on line 0"] 1261 #[doc = "I/O high speed / low voltage"]
567 pub fn set_swier(&mut self, n: usize, val: bool) { 1262 pub fn set_io_hslv(&mut self, val: bool) {
568 assert!(n < 23usize); 1263 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
569 let offs = 0usize + n * 1usize;
570 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
571 } 1264 }
572 } 1265 }
573 impl Default for Swier { 1266 impl Default for Ur17 {
574 fn default() -> Swier { 1267 fn default() -> Ur17 {
575 Swier(0) 1268 Ur17(0)
576 } 1269 }
577 } 1270 }
578 #[doc = "Rising Trigger selection register (EXTI_RTSR)"] 1271 #[doc = "SYSCFG user register 6"]
579 #[repr(transparent)] 1272 #[repr(transparent)]
580 #[derive(Copy, Clone, Eq, PartialEq)] 1273 #[derive(Copy, Clone, Eq, PartialEq)]
581 pub struct Rtsr(pub u32); 1274 pub struct Ur6(pub u32);
582 impl Rtsr { 1275 impl Ur6 {
583 #[doc = "Rising trigger event configuration of line 0"] 1276 #[doc = "Protected area start address for bank 1"]
584 pub fn tr(&self, n: usize) -> super::vals::Tr { 1277 pub const fn pa_beg_1(&self) -> u16 {
585 assert!(n < 23usize); 1278 let val = (self.0 >> 0usize) & 0x0fff;
586 let offs = 0usize + n * 1usize; 1279 val as u16
587 let val = (self.0 >> offs) & 0x01;
588 super::vals::Tr(val as u8)
589 } 1280 }
590 #[doc = "Rising trigger event configuration of line 0"] 1281 #[doc = "Protected area start address for bank 1"]
591 pub fn set_tr(&mut self, n: usize, val: super::vals::Tr) { 1282 pub fn set_pa_beg_1(&mut self, val: u16) {
592 assert!(n < 23usize); 1283 self.0 = (self.0 & !(0x0fff << 0usize)) | (((val as u32) & 0x0fff) << 0usize);
593 let offs = 0usize + n * 1usize; 1284 }
594 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); 1285 #[doc = "Protected area end address for bank 1"]
1286 pub const fn pa_end_1(&self) -> u16 {
1287 let val = (self.0 >> 16usize) & 0x0fff;
1288 val as u16
1289 }
1290 #[doc = "Protected area end address for bank 1"]
1291 pub fn set_pa_end_1(&mut self, val: u16) {
1292 self.0 = (self.0 & !(0x0fff << 16usize)) | (((val as u32) & 0x0fff) << 16usize);
595 } 1293 }
596 } 1294 }
597 impl Default for Rtsr { 1295 impl Default for Ur6 {
598 fn default() -> Rtsr { 1296 fn default() -> Ur6 {
599 Rtsr(0) 1297 Ur6(0)
600 } 1298 }
601 } 1299 }
602 #[doc = "Interrupt mask register (EXTI_IMR)"] 1300 #[doc = "compensation cell control/status register"]
603 #[repr(transparent)] 1301 #[repr(transparent)]
604 #[derive(Copy, Clone, Eq, PartialEq)] 1302 #[derive(Copy, Clone, Eq, PartialEq)]
605 pub struct Imr(pub u32); 1303 pub struct Cccsr(pub u32);
606 impl Imr { 1304 impl Cccsr {
607 #[doc = "Interrupt Mask on line 0"] 1305 #[doc = "enable"]
608 pub fn mr(&self, n: usize) -> super::vals::Mr { 1306 pub const fn en(&self) -> bool {
609 assert!(n < 23usize); 1307 let val = (self.0 >> 0usize) & 0x01;
610 let offs = 0usize + n * 1usize; 1308 val != 0
611 let val = (self.0 >> offs) & 0x01;
612 super::vals::Mr(val as u8)
613 } 1309 }
614 #[doc = "Interrupt Mask on line 0"] 1310 #[doc = "enable"]
615 pub fn set_mr(&mut self, n: usize, val: super::vals::Mr) { 1311 pub fn set_en(&mut self, val: bool) {
616 assert!(n < 23usize); 1312 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
617 let offs = 0usize + n * 1usize; 1313 }
618 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); 1314 #[doc = "Code selection"]
1315 pub const fn cs(&self) -> bool {
1316 let val = (self.0 >> 1usize) & 0x01;
1317 val != 0
1318 }
1319 #[doc = "Code selection"]
1320 pub fn set_cs(&mut self, val: bool) {
1321 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
1322 }
1323 #[doc = "Compensation cell ready flag"]
1324 pub const fn ready(&self) -> bool {
1325 let val = (self.0 >> 8usize) & 0x01;
1326 val != 0
1327 }
1328 #[doc = "Compensation cell ready flag"]
1329 pub fn set_ready(&mut self, val: bool) {
1330 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
1331 }
1332 #[doc = "High-speed at low-voltage"]
1333 pub const fn hslv(&self) -> bool {
1334 let val = (self.0 >> 16usize) & 0x01;
1335 val != 0
1336 }
1337 #[doc = "High-speed at low-voltage"]
1338 pub fn set_hslv(&mut self, val: bool) {
1339 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
619 } 1340 }
620 } 1341 }
621 impl Default for Imr { 1342 impl Default for Cccsr {
622 fn default() -> Imr { 1343 fn default() -> Cccsr {
623 Imr(0) 1344 Cccsr(0)
624 } 1345 }
625 } 1346 }
626 #[doc = "Pending register (EXTI_PR)"] 1347 #[doc = "SYSCFG package register"]
627 #[repr(transparent)] 1348 #[repr(transparent)]
628 #[derive(Copy, Clone, Eq, PartialEq)] 1349 #[derive(Copy, Clone, Eq, PartialEq)]
629 pub struct Pr(pub u32); 1350 pub struct Pkgr(pub u32);
630 impl Pr { 1351 impl Pkgr {
631 #[doc = "Pending bit 0"] 1352 #[doc = "Package"]
632 pub fn pr(&self, n: usize) -> bool { 1353 pub const fn pkg(&self) -> u8 {
633 assert!(n < 23usize); 1354 let val = (self.0 >> 0usize) & 0x0f;
634 let offs = 0usize + n * 1usize; 1355 val as u8
635 let val = (self.0 >> offs) & 0x01;
636 val != 0
637 } 1356 }
638 #[doc = "Pending bit 0"] 1357 #[doc = "Package"]
639 pub fn set_pr(&mut self, n: usize, val: bool) { 1358 pub fn set_pkg(&mut self, val: u8) {
640 assert!(n < 23usize); 1359 self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize);
641 let offs = 0usize + n * 1usize;
642 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
643 } 1360 }
644 } 1361 }
645 impl Default for Pr { 1362 impl Default for Pkgr {
646 fn default() -> Pr { 1363 fn default() -> Pkgr {
647 Pr(0) 1364 Pkgr(0)
648 } 1365 }
649 } 1366 }
650 } 1367 #[doc = "external interrupt configuration register 2"]
651 pub mod vals {
652 use crate::generic::*;
653 #[repr(transparent)] 1368 #[repr(transparent)]
654 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 1369 #[derive(Copy, Clone, Eq, PartialEq)]
655 pub struct Mr(pub u8); 1370 pub struct Exticr(pub u32);
656 impl Mr { 1371 impl Exticr {
657 #[doc = "Interrupt request line is masked"] 1372 #[doc = "EXTI x configuration (x = 4 to 7)"]
658 pub const MASKED: Self = Self(0); 1373 pub fn exti(&self, n: usize) -> u8 {
659 #[doc = "Interrupt request line is unmasked"] 1374 assert!(n < 4usize);
660 pub const UNMASKED: Self = Self(0x01); 1375 let offs = 0usize + n * 4usize;
1376 let val = (self.0 >> offs) & 0x0f;
1377 val as u8
1378 }
1379 #[doc = "EXTI x configuration (x = 4 to 7)"]
1380 pub fn set_exti(&mut self, n: usize, val: u8) {
1381 assert!(n < 4usize);
1382 let offs = 0usize + n * 4usize;
1383 self.0 = (self.0 & !(0x0f << offs)) | (((val as u32) & 0x0f) << offs);
1384 }
661 } 1385 }
662 #[repr(transparent)] 1386 impl Default for Exticr {
663 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 1387 fn default() -> Exticr {
664 pub struct Prw(pub u8); 1388 Exticr(0)
665 impl Prw { 1389 }
666 #[doc = "Clears pending bit"]
667 pub const CLEAR: Self = Self(0x01);
668 } 1390 }
1391 #[doc = "SYSCFG user register 2"]
669 #[repr(transparent)] 1392 #[repr(transparent)]
670 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 1393 #[derive(Copy, Clone, Eq, PartialEq)]
671 pub struct Swierw(pub u8); 1394 pub struct Ur2(pub u32);
672 impl Swierw { 1395 impl Ur2 {
673 #[doc = "Generates an interrupt request"] 1396 #[doc = "BOR_LVL Brownout Reset Threshold Level"]
674 pub const PEND: Self = Self(0x01); 1397 pub const fn borh(&self) -> u8 {
1398 let val = (self.0 >> 0usize) & 0x03;
1399 val as u8
1400 }
1401 #[doc = "BOR_LVL Brownout Reset Threshold Level"]
1402 pub fn set_borh(&mut self, val: u8) {
1403 self.0 = (self.0 & !(0x03 << 0usize)) | (((val as u32) & 0x03) << 0usize);
1404 }
1405 #[doc = "Boot Address 0"]
1406 pub const fn boot_add0(&self) -> u16 {
1407 let val = (self.0 >> 16usize) & 0xffff;
1408 val as u16
1409 }
1410 #[doc = "Boot Address 0"]
1411 pub fn set_boot_add0(&mut self, val: u16) {
1412 self.0 = (self.0 & !(0xffff << 16usize)) | (((val as u32) & 0xffff) << 16usize);
1413 }
1414 }
1415 impl Default for Ur2 {
1416 fn default() -> Ur2 {
1417 Ur2(0)
1418 }
675 } 1419 }
1420 #[doc = "SYSCFG user register 14"]
676 #[repr(transparent)] 1421 #[repr(transparent)]
677 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 1422 #[derive(Copy, Clone, Eq, PartialEq)]
678 pub struct Tr(pub u8); 1423 pub struct Ur14(pub u32);
679 impl Tr { 1424 impl Ur14 {
680 #[doc = "Falling edge trigger is disabled"] 1425 #[doc = "D1 Stop Reset"]
681 pub const DISABLED: Self = Self(0); 1426 pub const fn d1stprst(&self) -> bool {
682 #[doc = "Falling edge trigger is enabled"] 1427 let val = (self.0 >> 0usize) & 0x01;
683 pub const ENABLED: Self = Self(0x01); 1428 val != 0
1429 }
1430 #[doc = "D1 Stop Reset"]
1431 pub fn set_d1stprst(&mut self, val: bool) {
1432 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
1433 }
684 } 1434 }
1435 impl Default for Ur14 {
1436 fn default() -> Ur14 {
1437 Ur14(0)
1438 }
1439 }
1440 #[doc = "SYSCFG compensation cell code register"]
685 #[repr(transparent)] 1441 #[repr(transparent)]
686 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 1442 #[derive(Copy, Clone, Eq, PartialEq)]
687 pub struct Prr(pub u8); 1443 pub struct Cccr(pub u32);
688 impl Prr { 1444 impl Cccr {
689 #[doc = "No trigger request occurred"] 1445 #[doc = "NMOS compensation code"]
690 pub const NOTPENDING: Self = Self(0); 1446 pub const fn ncc(&self) -> u8 {
691 #[doc = "Selected trigger request occurred"] 1447 let val = (self.0 >> 0usize) & 0x0f;
692 pub const PENDING: Self = Self(0x01); 1448 val as u8
1449 }
1450 #[doc = "NMOS compensation code"]
1451 pub fn set_ncc(&mut self, val: u8) {
1452 self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize);
1453 }
1454 #[doc = "PMOS compensation code"]
1455 pub const fn pcc(&self) -> u8 {
1456 let val = (self.0 >> 4usize) & 0x0f;
1457 val as u8
1458 }
1459 #[doc = "PMOS compensation code"]
1460 pub fn set_pcc(&mut self, val: u8) {
1461 self.0 = (self.0 & !(0x0f << 4usize)) | (((val as u32) & 0x0f) << 4usize);
1462 }
1463 }
1464 impl Default for Cccr {
1465 fn default() -> Cccr {
1466 Cccr(0)
1467 }
693 } 1468 }
694 } 1469 }
695} 1470}
696pub mod dma_v1 { 1471pub mod dma_v1 {
697 use crate::generic::*; 1472 use crate::generic::*;
698 #[doc = "DMA controller"]
699 #[derive(Copy, Clone)]
700 pub struct Dma(pub *mut u8);
701 unsafe impl Send for Dma {}
702 unsafe impl Sync for Dma {}
703 impl Dma {
704 #[doc = "DMA interrupt status register (DMA_ISR)"]
705 pub fn isr(self) -> Reg<regs::Isr, R> {
706 unsafe { Reg::from_ptr(self.0.add(0usize)) }
707 }
708 #[doc = "DMA interrupt flag clear register (DMA_IFCR)"]
709 pub fn ifcr(self) -> Reg<regs::Ifcr, W> {
710 unsafe { Reg::from_ptr(self.0.add(4usize)) }
711 }
712 #[doc = "Channel cluster: CCR?, CNDTR?, CPAR?, and CMAR? registers"]
713 pub fn ch(self, n: usize) -> Ch {
714 assert!(n < 7usize);
715 unsafe { Ch(self.0.add(8usize + n * 20usize)) }
716 }
717 }
718 #[doc = "Channel cluster: CCR?, CNDTR?, CPAR?, and CMAR? registers"] 1473 #[doc = "Channel cluster: CCR?, CNDTR?, CPAR?, and CMAR? registers"]
719 #[derive(Copy, Clone)] 1474 #[derive(Copy, Clone)]
720 pub struct Ch(pub *mut u8); 1475 pub struct Ch(pub *mut u8);
@@ -738,195 +1493,152 @@ pub mod dma_v1 {
738 unsafe { Reg::from_ptr(self.0.add(12usize)) } 1493 unsafe { Reg::from_ptr(self.0.add(12usize)) }
739 } 1494 }
740 } 1495 }
741 pub mod vals { 1496 #[doc = "DMA controller"]
742 use crate::generic::*; 1497 #[derive(Copy, Clone)]
743 #[repr(transparent)] 1498 pub struct Dma(pub *mut u8);
744 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 1499 unsafe impl Send for Dma {}
745 pub struct Pl(pub u8); 1500 unsafe impl Sync for Dma {}
746 impl Pl { 1501 impl Dma {
747 #[doc = "Low priority"] 1502 #[doc = "DMA interrupt status register (DMA_ISR)"]
748 pub const LOW: Self = Self(0); 1503 pub fn isr(self) -> Reg<regs::Isr, R> {
749 #[doc = "Medium priority"] 1504 unsafe { Reg::from_ptr(self.0.add(0usize)) }
750 pub const MEDIUM: Self = Self(0x01);
751 #[doc = "High priority"]
752 pub const HIGH: Self = Self(0x02);
753 #[doc = "Very high priority"]
754 pub const VERYHIGH: Self = Self(0x03);
755 }
756 #[repr(transparent)]
757 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
758 pub struct Circ(pub u8);
759 impl Circ {
760 #[doc = "Circular buffer disabled"]
761 pub const DISABLED: Self = Self(0);
762 #[doc = "Circular buffer enabled"]
763 pub const ENABLED: Self = Self(0x01);
764 }
765 #[repr(transparent)]
766 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
767 pub struct Inc(pub u8);
768 impl Inc {
769 #[doc = "Increment mode disabled"]
770 pub const DISABLED: Self = Self(0);
771 #[doc = "Increment mode enabled"]
772 pub const ENABLED: Self = Self(0x01);
773 }
774 #[repr(transparent)]
775 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
776 pub struct Size(pub u8);
777 impl Size {
778 #[doc = "8-bit size"]
779 pub const BITS8: Self = Self(0);
780 #[doc = "16-bit size"]
781 pub const BITS16: Self = Self(0x01);
782 #[doc = "32-bit size"]
783 pub const BITS32: Self = Self(0x02);
784 } 1505 }
785 #[repr(transparent)] 1506 #[doc = "DMA interrupt flag clear register (DMA_IFCR)"]
786 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 1507 pub fn ifcr(self) -> Reg<regs::Ifcr, W> {
787 pub struct Memmem(pub u8); 1508 unsafe { Reg::from_ptr(self.0.add(4usize)) }
788 impl Memmem {
789 #[doc = "Memory to memory mode disabled"]
790 pub const DISABLED: Self = Self(0);
791 #[doc = "Memory to memory mode enabled"]
792 pub const ENABLED: Self = Self(0x01);
793 } 1509 }
794 #[repr(transparent)] 1510 #[doc = "Channel cluster: CCR?, CNDTR?, CPAR?, and CMAR? registers"]
795 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 1511 pub fn ch(self, n: usize) -> Ch {
796 pub struct Dir(pub u8); 1512 assert!(n < 7usize);
797 impl Dir { 1513 unsafe { Ch(self.0.add(8usize + n * 20usize)) }
798 #[doc = "Read from peripheral"]
799 pub const FROMPERIPHERAL: Self = Self(0);
800 #[doc = "Read from memory"]
801 pub const FROMMEMORY: Self = Self(0x01);
802 } 1514 }
803 } 1515 }
804 pub mod regs { 1516 pub mod regs {
805 use crate::generic::*; 1517 use crate::generic::*;
806 #[doc = "DMA interrupt status register (DMA_ISR)"] 1518 #[doc = "DMA interrupt flag clear register (DMA_IFCR)"]
807 #[repr(transparent)] 1519 #[repr(transparent)]
808 #[derive(Copy, Clone, Eq, PartialEq)] 1520 #[derive(Copy, Clone, Eq, PartialEq)]
809 pub struct Isr(pub u32); 1521 pub struct Ifcr(pub u32);
810 impl Isr { 1522 impl Ifcr {
811 #[doc = "Channel 1 Global interrupt flag"] 1523 #[doc = "Channel 1 Global interrupt clear"]
812 pub fn gif(&self, n: usize) -> bool { 1524 pub fn cgif(&self, n: usize) -> bool {
813 assert!(n < 7usize); 1525 assert!(n < 7usize);
814 let offs = 0usize + n * 4usize; 1526 let offs = 0usize + n * 4usize;
815 let val = (self.0 >> offs) & 0x01; 1527 let val = (self.0 >> offs) & 0x01;
816 val != 0 1528 val != 0
817 } 1529 }
818 #[doc = "Channel 1 Global interrupt flag"] 1530 #[doc = "Channel 1 Global interrupt clear"]
819 pub fn set_gif(&mut self, n: usize, val: bool) { 1531 pub fn set_cgif(&mut self, n: usize, val: bool) {
820 assert!(n < 7usize); 1532 assert!(n < 7usize);
821 let offs = 0usize + n * 4usize; 1533 let offs = 0usize + n * 4usize;
822 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); 1534 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
823 } 1535 }
824 #[doc = "Channel 1 Transfer Complete flag"] 1536 #[doc = "Channel 1 Transfer Complete clear"]
825 pub fn tcif(&self, n: usize) -> bool { 1537 pub fn ctcif(&self, n: usize) -> bool {
826 assert!(n < 7usize); 1538 assert!(n < 7usize);
827 let offs = 1usize + n * 4usize; 1539 let offs = 1usize + n * 4usize;
828 let val = (self.0 >> offs) & 0x01; 1540 let val = (self.0 >> offs) & 0x01;
829 val != 0 1541 val != 0
830 } 1542 }
831 #[doc = "Channel 1 Transfer Complete flag"] 1543 #[doc = "Channel 1 Transfer Complete clear"]
832 pub fn set_tcif(&mut self, n: usize, val: bool) { 1544 pub fn set_ctcif(&mut self, n: usize, val: bool) {
833 assert!(n < 7usize); 1545 assert!(n < 7usize);
834 let offs = 1usize + n * 4usize; 1546 let offs = 1usize + n * 4usize;
835 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); 1547 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
836 } 1548 }
837 #[doc = "Channel 1 Half Transfer Complete flag"] 1549 #[doc = "Channel 1 Half Transfer clear"]
838 pub fn htif(&self, n: usize) -> bool { 1550 pub fn chtif(&self, n: usize) -> bool {
839 assert!(n < 7usize); 1551 assert!(n < 7usize);
840 let offs = 2usize + n * 4usize; 1552 let offs = 2usize + n * 4usize;
841 let val = (self.0 >> offs) & 0x01; 1553 let val = (self.0 >> offs) & 0x01;
842 val != 0 1554 val != 0
843 } 1555 }
844 #[doc = "Channel 1 Half Transfer Complete flag"] 1556 #[doc = "Channel 1 Half Transfer clear"]
845 pub fn set_htif(&mut self, n: usize, val: bool) { 1557 pub fn set_chtif(&mut self, n: usize, val: bool) {
846 assert!(n < 7usize); 1558 assert!(n < 7usize);
847 let offs = 2usize + n * 4usize; 1559 let offs = 2usize + n * 4usize;
848 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); 1560 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
849 } 1561 }
850 #[doc = "Channel 1 Transfer Error flag"] 1562 #[doc = "Channel 1 Transfer Error clear"]
851 pub fn teif(&self, n: usize) -> bool { 1563 pub fn cteif(&self, n: usize) -> bool {
852 assert!(n < 7usize); 1564 assert!(n < 7usize);
853 let offs = 3usize + n * 4usize; 1565 let offs = 3usize + n * 4usize;
854 let val = (self.0 >> offs) & 0x01; 1566 let val = (self.0 >> offs) & 0x01;
855 val != 0 1567 val != 0
856 } 1568 }
857 #[doc = "Channel 1 Transfer Error flag"] 1569 #[doc = "Channel 1 Transfer Error clear"]
858 pub fn set_teif(&mut self, n: usize, val: bool) { 1570 pub fn set_cteif(&mut self, n: usize, val: bool) {
859 assert!(n < 7usize); 1571 assert!(n < 7usize);
860 let offs = 3usize + n * 4usize; 1572 let offs = 3usize + n * 4usize;
861 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); 1573 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
862 } 1574 }
863 } 1575 }
864 impl Default for Isr { 1576 impl Default for Ifcr {
865 fn default() -> Isr { 1577 fn default() -> Ifcr {
866 Isr(0) 1578 Ifcr(0)
867 } 1579 }
868 } 1580 }
869 #[doc = "DMA interrupt flag clear register (DMA_IFCR)"] 1581 #[doc = "DMA interrupt status register (DMA_ISR)"]
870 #[repr(transparent)] 1582 #[repr(transparent)]
871 #[derive(Copy, Clone, Eq, PartialEq)] 1583 #[derive(Copy, Clone, Eq, PartialEq)]
872 pub struct Ifcr(pub u32); 1584 pub struct Isr(pub u32);
873 impl Ifcr { 1585 impl Isr {
874 #[doc = "Channel 1 Global interrupt clear"] 1586 #[doc = "Channel 1 Global interrupt flag"]
875 pub fn cgif(&self, n: usize) -> bool { 1587 pub fn gif(&self, n: usize) -> bool {
876 assert!(n < 7usize); 1588 assert!(n < 7usize);
877 let offs = 0usize + n * 4usize; 1589 let offs = 0usize + n * 4usize;
878 let val = (self.0 >> offs) & 0x01; 1590 let val = (self.0 >> offs) & 0x01;
879 val != 0 1591 val != 0
880 } 1592 }
881 #[doc = "Channel 1 Global interrupt clear"] 1593 #[doc = "Channel 1 Global interrupt flag"]
882 pub fn set_cgif(&mut self, n: usize, val: bool) { 1594 pub fn set_gif(&mut self, n: usize, val: bool) {
883 assert!(n < 7usize); 1595 assert!(n < 7usize);
884 let offs = 0usize + n * 4usize; 1596 let offs = 0usize + n * 4usize;
885 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); 1597 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
886 } 1598 }
887 #[doc = "Channel 1 Transfer Complete clear"] 1599 #[doc = "Channel 1 Transfer Complete flag"]
888 pub fn ctcif(&self, n: usize) -> bool { 1600 pub fn tcif(&self, n: usize) -> bool {
889 assert!(n < 7usize); 1601 assert!(n < 7usize);
890 let offs = 1usize + n * 4usize; 1602 let offs = 1usize + n * 4usize;
891 let val = (self.0 >> offs) & 0x01; 1603 let val = (self.0 >> offs) & 0x01;
892 val != 0 1604 val != 0
893 } 1605 }
894 #[doc = "Channel 1 Transfer Complete clear"] 1606 #[doc = "Channel 1 Transfer Complete flag"]
895 pub fn set_ctcif(&mut self, n: usize, val: bool) { 1607 pub fn set_tcif(&mut self, n: usize, val: bool) {
896 assert!(n < 7usize); 1608 assert!(n < 7usize);
897 let offs = 1usize + n * 4usize; 1609 let offs = 1usize + n * 4usize;
898 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); 1610 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
899 } 1611 }
900 #[doc = "Channel 1 Half Transfer clear"] 1612 #[doc = "Channel 1 Half Transfer Complete flag"]
901 pub fn chtif(&self, n: usize) -> bool { 1613 pub fn htif(&self, n: usize) -> bool {
902 assert!(n < 7usize); 1614 assert!(n < 7usize);
903 let offs = 2usize + n * 4usize; 1615 let offs = 2usize + n * 4usize;
904 let val = (self.0 >> offs) & 0x01; 1616 let val = (self.0 >> offs) & 0x01;
905 val != 0 1617 val != 0
906 } 1618 }
907 #[doc = "Channel 1 Half Transfer clear"] 1619 #[doc = "Channel 1 Half Transfer Complete flag"]
908 pub fn set_chtif(&mut self, n: usize, val: bool) { 1620 pub fn set_htif(&mut self, n: usize, val: bool) {
909 assert!(n < 7usize); 1621 assert!(n < 7usize);
910 let offs = 2usize + n * 4usize; 1622 let offs = 2usize + n * 4usize;
911 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); 1623 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
912 } 1624 }
913 #[doc = "Channel 1 Transfer Error clear"] 1625 #[doc = "Channel 1 Transfer Error flag"]
914 pub fn cteif(&self, n: usize) -> bool { 1626 pub fn teif(&self, n: usize) -> bool {
915 assert!(n < 7usize); 1627 assert!(n < 7usize);
916 let offs = 3usize + n * 4usize; 1628 let offs = 3usize + n * 4usize;
917 let val = (self.0 >> offs) & 0x01; 1629 let val = (self.0 >> offs) & 0x01;
918 val != 0 1630 val != 0
919 } 1631 }
920 #[doc = "Channel 1 Transfer Error clear"] 1632 #[doc = "Channel 1 Transfer Error flag"]
921 pub fn set_cteif(&mut self, n: usize, val: bool) { 1633 pub fn set_teif(&mut self, n: usize, val: bool) {
922 assert!(n < 7usize); 1634 assert!(n < 7usize);
923 let offs = 3usize + n * 4usize; 1635 let offs = 3usize + n * 4usize;
924 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); 1636 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
925 } 1637 }
926 } 1638 }
927 impl Default for Ifcr { 1639 impl Default for Isr {
928 fn default() -> Ifcr { 1640 fn default() -> Isr {
929 Ifcr(0) 1641 Isr(0)
930 } 1642 }
931 } 1643 }
932 #[doc = "DMA channel 1 number of data register"] 1644 #[doc = "DMA channel 1 number of data register"]
@@ -1069,2240 +1781,2487 @@ pub mod dma_v1 {
1069 } 1781 }
1070 } 1782 }
1071 } 1783 }
1784 pub mod vals {
1785 use crate::generic::*;
1786 #[repr(transparent)]
1787 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1788 pub struct Size(pub u8);
1789 impl Size {
1790 #[doc = "8-bit size"]
1791 pub const BITS8: Self = Self(0);
1792 #[doc = "16-bit size"]
1793 pub const BITS16: Self = Self(0x01);
1794 #[doc = "32-bit size"]
1795 pub const BITS32: Self = Self(0x02);
1796 }
1797 #[repr(transparent)]
1798 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1799 pub struct Inc(pub u8);
1800 impl Inc {
1801 #[doc = "Increment mode disabled"]
1802 pub const DISABLED: Self = Self(0);
1803 #[doc = "Increment mode enabled"]
1804 pub const ENABLED: Self = Self(0x01);
1805 }
1806 #[repr(transparent)]
1807 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1808 pub struct Dir(pub u8);
1809 impl Dir {
1810 #[doc = "Read from peripheral"]
1811 pub const FROMPERIPHERAL: Self = Self(0);
1812 #[doc = "Read from memory"]
1813 pub const FROMMEMORY: Self = Self(0x01);
1814 }
1815 #[repr(transparent)]
1816 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1817 pub struct Memmem(pub u8);
1818 impl Memmem {
1819 #[doc = "Memory to memory mode disabled"]
1820 pub const DISABLED: Self = Self(0);
1821 #[doc = "Memory to memory mode enabled"]
1822 pub const ENABLED: Self = Self(0x01);
1823 }
1824 #[repr(transparent)]
1825 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1826 pub struct Circ(pub u8);
1827 impl Circ {
1828 #[doc = "Circular buffer disabled"]
1829 pub const DISABLED: Self = Self(0);
1830 #[doc = "Circular buffer enabled"]
1831 pub const ENABLED: Self = Self(0x01);
1832 }
1833 #[repr(transparent)]
1834 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1835 pub struct Pl(pub u8);
1836 impl Pl {
1837 #[doc = "Low priority"]
1838 pub const LOW: Self = Self(0);
1839 #[doc = "Medium priority"]
1840 pub const MEDIUM: Self = Self(0x01);
1841 #[doc = "High priority"]
1842 pub const HIGH: Self = Self(0x02);
1843 #[doc = "Very high priority"]
1844 pub const VERYHIGH: Self = Self(0x03);
1845 }
1846 }
1072} 1847}
1073pub mod generic { 1848pub mod timer_v1 {
1074 use core::marker::PhantomData; 1849 use crate::generic::*;
1075 #[derive(Copy, Clone)] 1850 #[doc = "General purpose 16-bit timer"]
1076 pub struct RW;
1077 #[derive(Copy, Clone)]
1078 pub struct R;
1079 #[derive(Copy, Clone)] 1851 #[derive(Copy, Clone)]
1080 pub struct W; 1852 pub struct TimGp16(pub *mut u8);
1081 mod sealed { 1853 unsafe impl Send for TimGp16 {}
1082 use super::*; 1854 unsafe impl Sync for TimGp16 {}
1083 pub trait Access {} 1855 impl TimGp16 {
1084 impl Access for R {} 1856 #[doc = "control register 1"]
1085 impl Access for W {} 1857 pub fn cr1(self) -> Reg<regs::Cr1Gp, RW> {
1086 impl Access for RW {} 1858 unsafe { Reg::from_ptr(self.0.add(0usize)) }
1859 }
1860 #[doc = "control register 2"]
1861 pub fn cr2(self) -> Reg<regs::Cr2Gp, RW> {
1862 unsafe { Reg::from_ptr(self.0.add(4usize)) }
1863 }
1864 #[doc = "slave mode control register"]
1865 pub fn smcr(self) -> Reg<regs::Smcr, RW> {
1866 unsafe { Reg::from_ptr(self.0.add(8usize)) }
1867 }
1868 #[doc = "DMA/Interrupt enable register"]
1869 pub fn dier(self) -> Reg<regs::DierGp, RW> {
1870 unsafe { Reg::from_ptr(self.0.add(12usize)) }
1871 }
1872 #[doc = "status register"]
1873 pub fn sr(self) -> Reg<regs::SrGp, RW> {
1874 unsafe { Reg::from_ptr(self.0.add(16usize)) }
1875 }
1876 #[doc = "event generation register"]
1877 pub fn egr(self) -> Reg<regs::EgrGp, W> {
1878 unsafe { Reg::from_ptr(self.0.add(20usize)) }
1879 }
1880 #[doc = "capture/compare mode register 1 (input mode)"]
1881 pub fn ccmr_input(self, n: usize) -> Reg<regs::CcmrInput, RW> {
1882 assert!(n < 2usize);
1883 unsafe { Reg::from_ptr(self.0.add(24usize + n * 4usize)) }
1884 }
1885 #[doc = "capture/compare mode register 1 (output mode)"]
1886 pub fn ccmr_output(self, n: usize) -> Reg<regs::CcmrOutput, RW> {
1887 assert!(n < 2usize);
1888 unsafe { Reg::from_ptr(self.0.add(24usize + n * 4usize)) }
1889 }
1890 #[doc = "capture/compare enable register"]
1891 pub fn ccer(self) -> Reg<regs::CcerGp, RW> {
1892 unsafe { Reg::from_ptr(self.0.add(32usize)) }
1893 }
1894 #[doc = "counter"]
1895 pub fn cnt(self) -> Reg<regs::Cnt16, RW> {
1896 unsafe { Reg::from_ptr(self.0.add(36usize)) }
1897 }
1898 #[doc = "prescaler"]
1899 pub fn psc(self) -> Reg<regs::Psc, RW> {
1900 unsafe { Reg::from_ptr(self.0.add(40usize)) }
1901 }
1902 #[doc = "auto-reload register"]
1903 pub fn arr(self) -> Reg<regs::Arr16, RW> {
1904 unsafe { Reg::from_ptr(self.0.add(44usize)) }
1905 }
1906 #[doc = "capture/compare register"]
1907 pub fn ccr(self, n: usize) -> Reg<regs::Ccr16, RW> {
1908 assert!(n < 4usize);
1909 unsafe { Reg::from_ptr(self.0.add(52usize + n * 4usize)) }
1910 }
1911 #[doc = "DMA control register"]
1912 pub fn dcr(self) -> Reg<regs::Dcr, RW> {
1913 unsafe { Reg::from_ptr(self.0.add(72usize)) }
1914 }
1915 #[doc = "DMA address for full transfer"]
1916 pub fn dmar(self) -> Reg<regs::Dmar, RW> {
1917 unsafe { Reg::from_ptr(self.0.add(76usize)) }
1918 }
1087 } 1919 }
1088 pub trait Access: sealed::Access + Copy {} 1920 #[doc = "General purpose 32-bit timer"]
1089 impl Access for R {}
1090 impl Access for W {}
1091 impl Access for RW {}
1092 pub trait Read: Access {}
1093 impl Read for RW {}
1094 impl Read for R {}
1095 pub trait Write: Access {}
1096 impl Write for RW {}
1097 impl Write for W {}
1098 #[derive(Copy, Clone)] 1921 #[derive(Copy, Clone)]
1099 pub struct Reg<T: Copy, A: Access> { 1922 pub struct TimGp32(pub *mut u8);
1100 ptr: *mut u8, 1923 unsafe impl Send for TimGp32 {}
1101 phantom: PhantomData<*mut (T, A)>, 1924 unsafe impl Sync for TimGp32 {}
1102 } 1925 impl TimGp32 {
1103 unsafe impl<T: Copy, A: Access> Send for Reg<T, A> {} 1926 #[doc = "control register 1"]
1104 unsafe impl<T: Copy, A: Access> Sync for Reg<T, A> {} 1927 pub fn cr1(self) -> Reg<regs::Cr1Gp, RW> {
1105 impl<T: Copy, A: Access> Reg<T, A> { 1928 unsafe { Reg::from_ptr(self.0.add(0usize)) }
1106 pub fn from_ptr(ptr: *mut u8) -> Self {
1107 Self {
1108 ptr,
1109 phantom: PhantomData,
1110 }
1111 } 1929 }
1112 pub fn ptr(&self) -> *mut T { 1930 #[doc = "control register 2"]
1113 self.ptr as _ 1931 pub fn cr2(self) -> Reg<regs::Cr2Gp, RW> {
1932 unsafe { Reg::from_ptr(self.0.add(4usize)) }
1114 } 1933 }
1115 } 1934 #[doc = "slave mode control register"]
1116 impl<T: Copy, A: Read> Reg<T, A> { 1935 pub fn smcr(self) -> Reg<regs::Smcr, RW> {
1117 pub unsafe fn read(&self) -> T { 1936 unsafe { Reg::from_ptr(self.0.add(8usize)) }
1118 (self.ptr as *mut T).read_volatile()
1119 } 1937 }
1120 } 1938 #[doc = "DMA/Interrupt enable register"]
1121 impl<T: Copy, A: Write> Reg<T, A> { 1939 pub fn dier(self) -> Reg<regs::DierGp, RW> {
1122 pub unsafe fn write_value(&self, val: T) { 1940 unsafe { Reg::from_ptr(self.0.add(12usize)) }
1123 (self.ptr as *mut T).write_volatile(val)
1124 } 1941 }
1125 } 1942 #[doc = "status register"]
1126 impl<T: Default + Copy, A: Write> Reg<T, A> { 1943 pub fn sr(self) -> Reg<regs::SrGp, RW> {
1127 pub unsafe fn write<R>(&self, f: impl FnOnce(&mut T) -> R) -> R { 1944 unsafe { Reg::from_ptr(self.0.add(16usize)) }
1128 let mut val = Default::default(); 1945 }
1129 let res = f(&mut val); 1946 #[doc = "event generation register"]
1130 self.write_value(val); 1947 pub fn egr(self) -> Reg<regs::EgrGp, W> {
1131 res 1948 unsafe { Reg::from_ptr(self.0.add(20usize)) }
1949 }
1950 #[doc = "capture/compare mode register 1 (input mode)"]
1951 pub fn ccmr_input(self, n: usize) -> Reg<regs::CcmrInput, RW> {
1952 assert!(n < 2usize);
1953 unsafe { Reg::from_ptr(self.0.add(24usize + n * 4usize)) }
1954 }
1955 #[doc = "capture/compare mode register 1 (output mode)"]
1956 pub fn ccmr_output(self, n: usize) -> Reg<regs::CcmrOutput, RW> {
1957 assert!(n < 2usize);
1958 unsafe { Reg::from_ptr(self.0.add(24usize + n * 4usize)) }
1959 }
1960 #[doc = "capture/compare enable register"]
1961 pub fn ccer(self) -> Reg<regs::CcerGp, RW> {
1962 unsafe { Reg::from_ptr(self.0.add(32usize)) }
1963 }
1964 #[doc = "counter"]
1965 pub fn cnt(self) -> Reg<regs::Cnt32, RW> {
1966 unsafe { Reg::from_ptr(self.0.add(36usize)) }
1967 }
1968 #[doc = "prescaler"]
1969 pub fn psc(self) -> Reg<regs::Psc, RW> {
1970 unsafe { Reg::from_ptr(self.0.add(40usize)) }
1971 }
1972 #[doc = "auto-reload register"]
1973 pub fn arr(self) -> Reg<regs::Arr32, RW> {
1974 unsafe { Reg::from_ptr(self.0.add(44usize)) }
1975 }
1976 #[doc = "capture/compare register"]
1977 pub fn ccr(self, n: usize) -> Reg<regs::Ccr32, RW> {
1978 assert!(n < 4usize);
1979 unsafe { Reg::from_ptr(self.0.add(52usize + n * 4usize)) }
1980 }
1981 #[doc = "DMA control register"]
1982 pub fn dcr(self) -> Reg<regs::Dcr, RW> {
1983 unsafe { Reg::from_ptr(self.0.add(72usize)) }
1984 }
1985 #[doc = "DMA address for full transfer"]
1986 pub fn dmar(self) -> Reg<regs::Dmar, RW> {
1987 unsafe { Reg::from_ptr(self.0.add(76usize)) }
1132 } 1988 }
1133 } 1989 }
1134 impl<T: Copy, A: Read + Write> Reg<T, A> { 1990 #[doc = "Basic timer"]
1135 pub unsafe fn modify<R>(&self, f: impl FnOnce(&mut T) -> R) -> R { 1991 #[derive(Copy, Clone)]
1136 let mut val = self.read(); 1992 pub struct TimBasic(pub *mut u8);
1137 let res = f(&mut val); 1993 unsafe impl Send for TimBasic {}
1138 self.write_value(val); 1994 unsafe impl Sync for TimBasic {}
1139 res 1995 impl TimBasic {
1996 #[doc = "control register 1"]
1997 pub fn cr1(self) -> Reg<regs::Cr1Basic, RW> {
1998 unsafe { Reg::from_ptr(self.0.add(0usize)) }
1999 }
2000 #[doc = "control register 2"]
2001 pub fn cr2(self) -> Reg<regs::Cr2Basic, RW> {
2002 unsafe { Reg::from_ptr(self.0.add(4usize)) }
2003 }
2004 #[doc = "DMA/Interrupt enable register"]
2005 pub fn dier(self) -> Reg<regs::DierBasic, RW> {
2006 unsafe { Reg::from_ptr(self.0.add(12usize)) }
2007 }
2008 #[doc = "status register"]
2009 pub fn sr(self) -> Reg<regs::SrBasic, RW> {
2010 unsafe { Reg::from_ptr(self.0.add(16usize)) }
2011 }
2012 #[doc = "event generation register"]
2013 pub fn egr(self) -> Reg<regs::EgrBasic, W> {
2014 unsafe { Reg::from_ptr(self.0.add(20usize)) }
2015 }
2016 #[doc = "counter"]
2017 pub fn cnt(self) -> Reg<regs::Cnt16, RW> {
2018 unsafe { Reg::from_ptr(self.0.add(36usize)) }
2019 }
2020 #[doc = "prescaler"]
2021 pub fn psc(self) -> Reg<regs::Psc, RW> {
2022 unsafe { Reg::from_ptr(self.0.add(40usize)) }
2023 }
2024 #[doc = "auto-reload register"]
2025 pub fn arr(self) -> Reg<regs::Arr16, RW> {
2026 unsafe { Reg::from_ptr(self.0.add(44usize)) }
1140 } 2027 }
1141 } 2028 }
1142} 2029 #[doc = "Advanced-timers"]
1143pub mod syscfg_l4 {
1144 use crate::generic::*;
1145 #[doc = "System configuration controller"]
1146 #[derive(Copy, Clone)] 2030 #[derive(Copy, Clone)]
1147 pub struct Syscfg(pub *mut u8); 2031 pub struct TimAdv(pub *mut u8);
1148 unsafe impl Send for Syscfg {} 2032 unsafe impl Send for TimAdv {}
1149 unsafe impl Sync for Syscfg {} 2033 unsafe impl Sync for TimAdv {}
1150 impl Syscfg { 2034 impl TimAdv {
1151 #[doc = "memory remap register"] 2035 #[doc = "control register 1"]
1152 pub fn memrmp(self) -> Reg<regs::Memrmp, RW> { 2036 pub fn cr1(self) -> Reg<regs::Cr1Gp, RW> {
1153 unsafe { Reg::from_ptr(self.0.add(0usize)) } 2037 unsafe { Reg::from_ptr(self.0.add(0usize)) }
1154 } 2038 }
1155 #[doc = "configuration register 1"] 2039 #[doc = "control register 2"]
1156 pub fn cfgr1(self) -> Reg<regs::Cfgr1, RW> { 2040 pub fn cr2(self) -> Reg<regs::Cr2Adv, RW> {
1157 unsafe { Reg::from_ptr(self.0.add(4usize)) } 2041 unsafe { Reg::from_ptr(self.0.add(4usize)) }
1158 } 2042 }
1159 #[doc = "external interrupt configuration register 1"] 2043 #[doc = "slave mode control register"]
1160 pub fn exticr(self, n: usize) -> Reg<regs::Exticr, RW> { 2044 pub fn smcr(self) -> Reg<regs::Smcr, RW> {
1161 assert!(n < 4usize); 2045 unsafe { Reg::from_ptr(self.0.add(8usize)) }
1162 unsafe { Reg::from_ptr(self.0.add(8usize + n * 4usize)) }
1163 } 2046 }
1164 #[doc = "SCSR"] 2047 #[doc = "DMA/Interrupt enable register"]
1165 pub fn scsr(self) -> Reg<regs::Scsr, RW> { 2048 pub fn dier(self) -> Reg<regs::DierAdv, RW> {
1166 unsafe { Reg::from_ptr(self.0.add(24usize)) } 2049 unsafe { Reg::from_ptr(self.0.add(12usize)) }
1167 } 2050 }
1168 #[doc = "CFGR2"] 2051 #[doc = "status register"]
1169 pub fn cfgr2(self) -> Reg<regs::Cfgr2, RW> { 2052 pub fn sr(self) -> Reg<regs::SrAdv, RW> {
1170 unsafe { Reg::from_ptr(self.0.add(28usize)) } 2053 unsafe { Reg::from_ptr(self.0.add(16usize)) }
1171 } 2054 }
1172 #[doc = "SWPR"] 2055 #[doc = "event generation register"]
1173 pub fn swpr(self) -> Reg<regs::Swpr, W> { 2056 pub fn egr(self) -> Reg<regs::EgrAdv, W> {
2057 unsafe { Reg::from_ptr(self.0.add(20usize)) }
2058 }
2059 #[doc = "capture/compare mode register 1 (input mode)"]
2060 pub fn ccmr_input(self, n: usize) -> Reg<regs::CcmrInput, RW> {
2061 assert!(n < 2usize);
2062 unsafe { Reg::from_ptr(self.0.add(24usize + n * 4usize)) }
2063 }
2064 #[doc = "capture/compare mode register 1 (output mode)"]
2065 pub fn ccmr_output(self, n: usize) -> Reg<regs::CcmrOutput, RW> {
2066 assert!(n < 2usize);
2067 unsafe { Reg::from_ptr(self.0.add(24usize + n * 4usize)) }
2068 }
2069 #[doc = "capture/compare enable register"]
2070 pub fn ccer(self) -> Reg<regs::CcerAdv, RW> {
1174 unsafe { Reg::from_ptr(self.0.add(32usize)) } 2071 unsafe { Reg::from_ptr(self.0.add(32usize)) }
1175 } 2072 }
1176 #[doc = "SKR"] 2073 #[doc = "counter"]
1177 pub fn skr(self) -> Reg<regs::Skr, W> { 2074 pub fn cnt(self) -> Reg<regs::Cnt16, RW> {
1178 unsafe { Reg::from_ptr(self.0.add(36usize)) } 2075 unsafe { Reg::from_ptr(self.0.add(36usize)) }
1179 } 2076 }
1180 } 2077 #[doc = "prescaler"]
1181 pub mod regs { 2078 pub fn psc(self) -> Reg<regs::Psc, RW> {
1182 use crate::generic::*; 2079 unsafe { Reg::from_ptr(self.0.add(40usize)) }
1183 #[doc = "external interrupt configuration register 4"]
1184 #[repr(transparent)]
1185 #[derive(Copy, Clone, Eq, PartialEq)]
1186 pub struct Exticr(pub u32);
1187 impl Exticr {
1188 #[doc = "EXTI12 configuration bits"]
1189 pub fn exti(&self, n: usize) -> u8 {
1190 assert!(n < 4usize);
1191 let offs = 0usize + n * 4usize;
1192 let val = (self.0 >> offs) & 0x0f;
1193 val as u8
1194 }
1195 #[doc = "EXTI12 configuration bits"]
1196 pub fn set_exti(&mut self, n: usize, val: u8) {
1197 assert!(n < 4usize);
1198 let offs = 0usize + n * 4usize;
1199 self.0 = (self.0 & !(0x0f << offs)) | (((val as u32) & 0x0f) << offs);
1200 }
1201 } 2080 }
1202 impl Default for Exticr { 2081 #[doc = "auto-reload register"]
1203 fn default() -> Exticr { 2082 pub fn arr(self) -> Reg<regs::Arr16, RW> {
1204 Exticr(0) 2083 unsafe { Reg::from_ptr(self.0.add(44usize)) }
1205 }
1206 } 2084 }
1207 #[doc = "SWPR"] 2085 #[doc = "repetition counter register"]
1208 #[repr(transparent)] 2086 pub fn rcr(self) -> Reg<regs::Rcr, RW> {
1209 #[derive(Copy, Clone, Eq, PartialEq)] 2087 unsafe { Reg::from_ptr(self.0.add(48usize)) }
1210 pub struct Swpr(pub u32);
1211 impl Swpr {
1212 #[doc = "SRAWM2 write protection."]
1213 pub fn pwp(&self, n: usize) -> bool {
1214 assert!(n < 32usize);
1215 let offs = 0usize + n * 1usize;
1216 let val = (self.0 >> offs) & 0x01;
1217 val != 0
1218 }
1219 #[doc = "SRAWM2 write protection."]
1220 pub fn set_pwp(&mut self, n: usize, val: bool) {
1221 assert!(n < 32usize);
1222 let offs = 0usize + n * 1usize;
1223 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
1224 }
1225 } 2088 }
1226 impl Default for Swpr { 2089 #[doc = "capture/compare register"]
1227 fn default() -> Swpr { 2090 pub fn ccr(self, n: usize) -> Reg<regs::Ccr16, RW> {
1228 Swpr(0) 2091 assert!(n < 4usize);
1229 } 2092 unsafe { Reg::from_ptr(self.0.add(52usize + n * 4usize)) }
1230 } 2093 }
1231 #[doc = "configuration register 1"] 2094 #[doc = "break and dead-time register"]
2095 pub fn bdtr(self) -> Reg<regs::Bdtr, RW> {
2096 unsafe { Reg::from_ptr(self.0.add(68usize)) }
2097 }
2098 #[doc = "DMA control register"]
2099 pub fn dcr(self) -> Reg<regs::Dcr, RW> {
2100 unsafe { Reg::from_ptr(self.0.add(72usize)) }
2101 }
2102 #[doc = "DMA address for full transfer"]
2103 pub fn dmar(self) -> Reg<regs::Dmar, RW> {
2104 unsafe { Reg::from_ptr(self.0.add(76usize)) }
2105 }
2106 }
2107 pub mod regs {
2108 use crate::generic::*;
2109 #[doc = "DMA/Interrupt enable register"]
1232 #[repr(transparent)] 2110 #[repr(transparent)]
1233 #[derive(Copy, Clone, Eq, PartialEq)] 2111 #[derive(Copy, Clone, Eq, PartialEq)]
1234 pub struct Cfgr1(pub u32); 2112 pub struct DierBasic(pub u32);
1235 impl Cfgr1 { 2113 impl DierBasic {
1236 #[doc = "Firewall disable"] 2114 #[doc = "Update interrupt enable"]
1237 pub const fn fwdis(&self) -> bool { 2115 pub const fn uie(&self) -> bool {
1238 let val = (self.0 >> 0usize) & 0x01; 2116 let val = (self.0 >> 0usize) & 0x01;
1239 val != 0 2117 val != 0
1240 } 2118 }
1241 #[doc = "Firewall disable"] 2119 #[doc = "Update interrupt enable"]
1242 pub fn set_fwdis(&mut self, val: bool) { 2120 pub fn set_uie(&mut self, val: bool) {
1243 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 2121 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
1244 } 2122 }
1245 #[doc = "I/O analog switch voltage booster enable"] 2123 #[doc = "Update DMA request enable"]
1246 pub const fn boosten(&self) -> bool { 2124 pub const fn ude(&self) -> bool {
1247 let val = (self.0 >> 8usize) & 0x01; 2125 let val = (self.0 >> 8usize) & 0x01;
1248 val != 0 2126 val != 0
1249 } 2127 }
1250 #[doc = "I/O analog switch voltage booster enable"] 2128 #[doc = "Update DMA request enable"]
1251 pub fn set_boosten(&mut self, val: bool) { 2129 pub fn set_ude(&mut self, val: bool) {
1252 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); 2130 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
1253 } 2131 }
1254 #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB6"] 2132 }
1255 pub const fn i2c_pb6_fmp(&self) -> bool { 2133 impl Default for DierBasic {
1256 let val = (self.0 >> 16usize) & 0x01; 2134 fn default() -> DierBasic {
1257 val != 0 2135 DierBasic(0)
1258 }
1259 #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB6"]
1260 pub fn set_i2c_pb6_fmp(&mut self, val: bool) {
1261 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
1262 } 2136 }
1263 #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB7"] 2137 }
1264 pub const fn i2c_pb7_fmp(&self) -> bool { 2138 #[doc = "status register"]
1265 let val = (self.0 >> 17usize) & 0x01; 2139 #[repr(transparent)]
2140 #[derive(Copy, Clone, Eq, PartialEq)]
2141 pub struct SrGp(pub u32);
2142 impl SrGp {
2143 #[doc = "Update interrupt flag"]
2144 pub const fn uif(&self) -> bool {
2145 let val = (self.0 >> 0usize) & 0x01;
1266 val != 0 2146 val != 0
1267 } 2147 }
1268 #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB7"] 2148 #[doc = "Update interrupt flag"]
1269 pub fn set_i2c_pb7_fmp(&mut self, val: bool) { 2149 pub fn set_uif(&mut self, val: bool) {
1270 self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); 2150 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
1271 } 2151 }
1272 #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB8"] 2152 #[doc = "Capture/compare 1 interrupt flag"]
1273 pub const fn i2c_pb8_fmp(&self) -> bool { 2153 pub fn ccif(&self, n: usize) -> bool {
1274 let val = (self.0 >> 18usize) & 0x01; 2154 assert!(n < 4usize);
2155 let offs = 1usize + n * 1usize;
2156 let val = (self.0 >> offs) & 0x01;
1275 val != 0 2157 val != 0
1276 } 2158 }
1277 #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB8"] 2159 #[doc = "Capture/compare 1 interrupt flag"]
1278 pub fn set_i2c_pb8_fmp(&mut self, val: bool) { 2160 pub fn set_ccif(&mut self, n: usize, val: bool) {
1279 self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); 2161 assert!(n < 4usize);
2162 let offs = 1usize + n * 1usize;
2163 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
1280 } 2164 }
1281 #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB9"] 2165 #[doc = "COM interrupt flag"]
1282 pub const fn i2c_pb9_fmp(&self) -> bool { 2166 pub const fn comif(&self) -> bool {
1283 let val = (self.0 >> 19usize) & 0x01; 2167 let val = (self.0 >> 5usize) & 0x01;
1284 val != 0 2168 val != 0
1285 } 2169 }
1286 #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB9"] 2170 #[doc = "COM interrupt flag"]
1287 pub fn set_i2c_pb9_fmp(&mut self, val: bool) { 2171 pub fn set_comif(&mut self, val: bool) {
1288 self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize); 2172 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
1289 } 2173 }
1290 #[doc = "I2C1 Fast-mode Plus driving capability activation"] 2174 #[doc = "Trigger interrupt flag"]
1291 pub const fn i2c1_fmp(&self) -> bool { 2175 pub const fn tif(&self) -> bool {
1292 let val = (self.0 >> 20usize) & 0x01; 2176 let val = (self.0 >> 6usize) & 0x01;
1293 val != 0 2177 val != 0
1294 } 2178 }
1295 #[doc = "I2C1 Fast-mode Plus driving capability activation"] 2179 #[doc = "Trigger interrupt flag"]
1296 pub fn set_i2c1_fmp(&mut self, val: bool) { 2180 pub fn set_tif(&mut self, val: bool) {
1297 self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize); 2181 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
1298 } 2182 }
1299 #[doc = "I2C2 Fast-mode Plus driving capability activation"] 2183 #[doc = "Break interrupt flag"]
1300 pub const fn i2c2_fmp(&self) -> bool { 2184 pub const fn bif(&self) -> bool {
1301 let val = (self.0 >> 21usize) & 0x01; 2185 let val = (self.0 >> 7usize) & 0x01;
1302 val != 0 2186 val != 0
1303 } 2187 }
1304 #[doc = "I2C2 Fast-mode Plus driving capability activation"] 2188 #[doc = "Break interrupt flag"]
1305 pub fn set_i2c2_fmp(&mut self, val: bool) { 2189 pub fn set_bif(&mut self, val: bool) {
1306 self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize); 2190 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
1307 } 2191 }
1308 #[doc = "I2C3 Fast-mode Plus driving capability activation"] 2192 #[doc = "Capture/Compare 1 overcapture flag"]
1309 pub const fn i2c3_fmp(&self) -> bool { 2193 pub fn ccof(&self, n: usize) -> bool {
1310 let val = (self.0 >> 22usize) & 0x01; 2194 assert!(n < 4usize);
2195 let offs = 9usize + n * 1usize;
2196 let val = (self.0 >> offs) & 0x01;
1311 val != 0 2197 val != 0
1312 } 2198 }
1313 #[doc = "I2C3 Fast-mode Plus driving capability activation"] 2199 #[doc = "Capture/Compare 1 overcapture flag"]
1314 pub fn set_i2c3_fmp(&mut self, val: bool) { 2200 pub fn set_ccof(&mut self, n: usize, val: bool) {
1315 self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize); 2201 assert!(n < 4usize);
1316 } 2202 let offs = 9usize + n * 1usize;
1317 #[doc = "Floating Point Unit interrupts enable bits"] 2203 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
1318 pub const fn fpu_ie(&self) -> u8 {
1319 let val = (self.0 >> 26usize) & 0x3f;
1320 val as u8
1321 }
1322 #[doc = "Floating Point Unit interrupts enable bits"]
1323 pub fn set_fpu_ie(&mut self, val: u8) {
1324 self.0 = (self.0 & !(0x3f << 26usize)) | (((val as u32) & 0x3f) << 26usize);
1325 } 2204 }
1326 } 2205 }
1327 impl Default for Cfgr1 { 2206 impl Default for SrGp {
1328 fn default() -> Cfgr1 { 2207 fn default() -> SrGp {
1329 Cfgr1(0) 2208 SrGp(0)
1330 } 2209 }
1331 } 2210 }
1332 #[doc = "memory remap register"] 2211 #[doc = "counter"]
1333 #[repr(transparent)] 2212 #[repr(transparent)]
1334 #[derive(Copy, Clone, Eq, PartialEq)] 2213 #[derive(Copy, Clone, Eq, PartialEq)]
1335 pub struct Memrmp(pub u32); 2214 pub struct Cnt16(pub u32);
1336 impl Memrmp { 2215 impl Cnt16 {
1337 #[doc = "Memory mapping selection"] 2216 #[doc = "counter value"]
1338 pub const fn mem_mode(&self) -> u8 { 2217 pub const fn cnt(&self) -> u16 {
1339 let val = (self.0 >> 0usize) & 0x07; 2218 let val = (self.0 >> 0usize) & 0xffff;
1340 val as u8 2219 val as u16
1341 }
1342 #[doc = "Memory mapping selection"]
1343 pub fn set_mem_mode(&mut self, val: u8) {
1344 self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize);
1345 }
1346 #[doc = "QUADSPI memory mapping swap"]
1347 pub const fn qfs(&self) -> bool {
1348 let val = (self.0 >> 3usize) & 0x01;
1349 val != 0
1350 }
1351 #[doc = "QUADSPI memory mapping swap"]
1352 pub fn set_qfs(&mut self, val: bool) {
1353 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
1354 }
1355 #[doc = "Flash Bank mode selection"]
1356 pub const fn fb_mode(&self) -> bool {
1357 let val = (self.0 >> 8usize) & 0x01;
1358 val != 0
1359 } 2220 }
1360 #[doc = "Flash Bank mode selection"] 2221 #[doc = "counter value"]
1361 pub fn set_fb_mode(&mut self, val: bool) { 2222 pub fn set_cnt(&mut self, val: u16) {
1362 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); 2223 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
1363 } 2224 }
1364 } 2225 }
1365 impl Default for Memrmp { 2226 impl Default for Cnt16 {
1366 fn default() -> Memrmp { 2227 fn default() -> Cnt16 {
1367 Memrmp(0) 2228 Cnt16(0)
1368 } 2229 }
1369 } 2230 }
1370 #[doc = "SCSR"] 2231 #[doc = "capture/compare enable register"]
1371 #[repr(transparent)] 2232 #[repr(transparent)]
1372 #[derive(Copy, Clone, Eq, PartialEq)] 2233 #[derive(Copy, Clone, Eq, PartialEq)]
1373 pub struct Scsr(pub u32); 2234 pub struct CcerGp(pub u32);
1374 impl Scsr { 2235 impl CcerGp {
1375 #[doc = "SRAM2 Erase"] 2236 #[doc = "Capture/Compare 1 output enable"]
1376 pub const fn sram2er(&self) -> bool { 2237 pub fn cce(&self, n: usize) -> bool {
1377 let val = (self.0 >> 0usize) & 0x01; 2238 assert!(n < 4usize);
2239 let offs = 0usize + n * 4usize;
2240 let val = (self.0 >> offs) & 0x01;
1378 val != 0 2241 val != 0
1379 } 2242 }
1380 #[doc = "SRAM2 Erase"] 2243 #[doc = "Capture/Compare 1 output enable"]
1381 pub fn set_sram2er(&mut self, val: bool) { 2244 pub fn set_cce(&mut self, n: usize, val: bool) {
1382 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 2245 assert!(n < 4usize);
2246 let offs = 0usize + n * 4usize;
2247 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
1383 } 2248 }
1384 #[doc = "SRAM2 busy by erase operation"] 2249 #[doc = "Capture/Compare 1 output Polarity"]
1385 pub const fn sram2bsy(&self) -> bool { 2250 pub fn ccp(&self, n: usize) -> bool {
1386 let val = (self.0 >> 1usize) & 0x01; 2251 assert!(n < 4usize);
2252 let offs = 1usize + n * 4usize;
2253 let val = (self.0 >> offs) & 0x01;
1387 val != 0 2254 val != 0
1388 } 2255 }
1389 #[doc = "SRAM2 busy by erase operation"] 2256 #[doc = "Capture/Compare 1 output Polarity"]
1390 pub fn set_sram2bsy(&mut self, val: bool) { 2257 pub fn set_ccp(&mut self, n: usize, val: bool) {
1391 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); 2258 assert!(n < 4usize);
2259 let offs = 1usize + n * 4usize;
2260 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
2261 }
2262 #[doc = "Capture/Compare 1 output Polarity"]
2263 pub fn ccnp(&self, n: usize) -> bool {
2264 assert!(n < 4usize);
2265 let offs = 3usize + n * 4usize;
2266 let val = (self.0 >> offs) & 0x01;
2267 val != 0
2268 }
2269 #[doc = "Capture/Compare 1 output Polarity"]
2270 pub fn set_ccnp(&mut self, n: usize, val: bool) {
2271 assert!(n < 4usize);
2272 let offs = 3usize + n * 4usize;
2273 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
1392 } 2274 }
1393 } 2275 }
1394 impl Default for Scsr { 2276 impl Default for CcerGp {
1395 fn default() -> Scsr { 2277 fn default() -> CcerGp {
1396 Scsr(0) 2278 CcerGp(0)
1397 } 2279 }
1398 } 2280 }
1399 #[doc = "SKR"] 2281 #[doc = "capture/compare register 1"]
1400 #[repr(transparent)] 2282 #[repr(transparent)]
1401 #[derive(Copy, Clone, Eq, PartialEq)] 2283 #[derive(Copy, Clone, Eq, PartialEq)]
1402 pub struct Skr(pub u32); 2284 pub struct Ccr16(pub u32);
1403 impl Skr { 2285 impl Ccr16 {
1404 #[doc = "SRAM2 write protection key for software erase"] 2286 #[doc = "Capture/Compare 1 value"]
1405 pub const fn key(&self) -> u8 { 2287 pub const fn ccr(&self) -> u16 {
1406 let val = (self.0 >> 0usize) & 0xff; 2288 let val = (self.0 >> 0usize) & 0xffff;
1407 val as u8 2289 val as u16
1408 } 2290 }
1409 #[doc = "SRAM2 write protection key for software erase"] 2291 #[doc = "Capture/Compare 1 value"]
1410 pub fn set_key(&mut self, val: u8) { 2292 pub fn set_ccr(&mut self, val: u16) {
1411 self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); 2293 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
1412 } 2294 }
1413 } 2295 }
1414 impl Default for Skr { 2296 impl Default for Ccr16 {
1415 fn default() -> Skr { 2297 fn default() -> Ccr16 {
1416 Skr(0) 2298 Ccr16(0)
1417 } 2299 }
1418 } 2300 }
1419 #[doc = "CFGR2"] 2301 #[doc = "DMA/Interrupt enable register"]
1420 #[repr(transparent)] 2302 #[repr(transparent)]
1421 #[derive(Copy, Clone, Eq, PartialEq)] 2303 #[derive(Copy, Clone, Eq, PartialEq)]
1422 pub struct Cfgr2(pub u32); 2304 pub struct DierGp(pub u32);
1423 impl Cfgr2 { 2305 impl DierGp {
1424 #[doc = "Cortex LOCKUP (Hardfault) output enable bit"] 2306 #[doc = "Update interrupt enable"]
1425 pub const fn cll(&self) -> bool { 2307 pub const fn uie(&self) -> bool {
1426 let val = (self.0 >> 0usize) & 0x01; 2308 let val = (self.0 >> 0usize) & 0x01;
1427 val != 0 2309 val != 0
1428 } 2310 }
1429 #[doc = "Cortex LOCKUP (Hardfault) output enable bit"] 2311 #[doc = "Update interrupt enable"]
1430 pub fn set_cll(&mut self, val: bool) { 2312 pub fn set_uie(&mut self, val: bool) {
1431 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 2313 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
1432 } 2314 }
1433 #[doc = "SRAM2 parity lock bit"] 2315 #[doc = "Capture/Compare 1 interrupt enable"]
1434 pub const fn spl(&self) -> bool { 2316 pub fn ccie(&self, n: usize) -> bool {
1435 let val = (self.0 >> 1usize) & 0x01; 2317 assert!(n < 4usize);
1436 val != 0 2318 let offs = 1usize + n * 1usize;
1437 } 2319 let val = (self.0 >> offs) & 0x01;
1438 #[doc = "SRAM2 parity lock bit"]
1439 pub fn set_spl(&mut self, val: bool) {
1440 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
1441 }
1442 #[doc = "PVD lock enable bit"]
1443 pub const fn pvdl(&self) -> bool {
1444 let val = (self.0 >> 2usize) & 0x01;
1445 val != 0 2320 val != 0
1446 } 2321 }
1447 #[doc = "PVD lock enable bit"] 2322 #[doc = "Capture/Compare 1 interrupt enable"]
1448 pub fn set_pvdl(&mut self, val: bool) { 2323 pub fn set_ccie(&mut self, n: usize, val: bool) {
1449 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); 2324 assert!(n < 4usize);
2325 let offs = 1usize + n * 1usize;
2326 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
1450 } 2327 }
1451 #[doc = "ECC Lock"] 2328 #[doc = "Trigger interrupt enable"]
1452 pub const fn eccl(&self) -> bool { 2329 pub const fn tie(&self) -> bool {
1453 let val = (self.0 >> 3usize) & 0x01; 2330 let val = (self.0 >> 6usize) & 0x01;
1454 val != 0 2331 val != 0
1455 } 2332 }
1456 #[doc = "ECC Lock"] 2333 #[doc = "Trigger interrupt enable"]
1457 pub fn set_eccl(&mut self, val: bool) { 2334 pub fn set_tie(&mut self, val: bool) {
1458 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); 2335 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
1459 } 2336 }
1460 #[doc = "SRAM2 parity error flag"] 2337 #[doc = "Update DMA request enable"]
1461 pub const fn spf(&self) -> bool { 2338 pub const fn ude(&self) -> bool {
1462 let val = (self.0 >> 8usize) & 0x01; 2339 let val = (self.0 >> 8usize) & 0x01;
1463 val != 0 2340 val != 0
1464 } 2341 }
1465 #[doc = "SRAM2 parity error flag"] 2342 #[doc = "Update DMA request enable"]
1466 pub fn set_spf(&mut self, val: bool) { 2343 pub fn set_ude(&mut self, val: bool) {
1467 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); 2344 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
1468 } 2345 }
1469 } 2346 #[doc = "Capture/Compare 1 DMA request enable"]
1470 impl Default for Cfgr2 { 2347 pub fn ccde(&self, n: usize) -> bool {
1471 fn default() -> Cfgr2 { 2348 assert!(n < 4usize);
1472 Cfgr2(0) 2349 let offs = 9usize + n * 1usize;
1473 }
1474 }
1475 }
1476}
1477pub mod gpio_v2 {
1478 use crate::generic::*;
1479 #[doc = "General-purpose I/Os"]
1480 #[derive(Copy, Clone)]
1481 pub struct Gpio(pub *mut u8);
1482 unsafe impl Send for Gpio {}
1483 unsafe impl Sync for Gpio {}
1484 impl Gpio {
1485 #[doc = "GPIO port mode register"]
1486 pub fn moder(self) -> Reg<regs::Moder, RW> {
1487 unsafe { Reg::from_ptr(self.0.add(0usize)) }
1488 }
1489 #[doc = "GPIO port output type register"]
1490 pub fn otyper(self) -> Reg<regs::Otyper, RW> {
1491 unsafe { Reg::from_ptr(self.0.add(4usize)) }
1492 }
1493 #[doc = "GPIO port output speed register"]
1494 pub fn ospeedr(self) -> Reg<regs::Ospeedr, RW> {
1495 unsafe { Reg::from_ptr(self.0.add(8usize)) }
1496 }
1497 #[doc = "GPIO port pull-up/pull-down register"]
1498 pub fn pupdr(self) -> Reg<regs::Pupdr, RW> {
1499 unsafe { Reg::from_ptr(self.0.add(12usize)) }
1500 }
1501 #[doc = "GPIO port input data register"]
1502 pub fn idr(self) -> Reg<regs::Idr, R> {
1503 unsafe { Reg::from_ptr(self.0.add(16usize)) }
1504 }
1505 #[doc = "GPIO port output data register"]
1506 pub fn odr(self) -> Reg<regs::Odr, RW> {
1507 unsafe { Reg::from_ptr(self.0.add(20usize)) }
1508 }
1509 #[doc = "GPIO port bit set/reset register"]
1510 pub fn bsrr(self) -> Reg<regs::Bsrr, W> {
1511 unsafe { Reg::from_ptr(self.0.add(24usize)) }
1512 }
1513 #[doc = "GPIO port configuration lock register"]
1514 pub fn lckr(self) -> Reg<regs::Lckr, RW> {
1515 unsafe { Reg::from_ptr(self.0.add(28usize)) }
1516 }
1517 #[doc = "GPIO alternate function register (low, high)"]
1518 pub fn afr(self, n: usize) -> Reg<regs::Afr, RW> {
1519 assert!(n < 2usize);
1520 unsafe { Reg::from_ptr(self.0.add(32usize + n * 4usize)) }
1521 }
1522 }
1523 pub mod regs {
1524 use crate::generic::*;
1525 #[doc = "GPIO port output data register"]
1526 #[repr(transparent)]
1527 #[derive(Copy, Clone, Eq, PartialEq)]
1528 pub struct Odr(pub u32);
1529 impl Odr {
1530 #[doc = "Port output data (y = 0..15)"]
1531 pub fn odr(&self, n: usize) -> super::vals::Odr {
1532 assert!(n < 16usize);
1533 let offs = 0usize + n * 1usize;
1534 let val = (self.0 >> offs) & 0x01; 2350 let val = (self.0 >> offs) & 0x01;
1535 super::vals::Odr(val as u8) 2351 val != 0
1536 } 2352 }
1537 #[doc = "Port output data (y = 0..15)"] 2353 #[doc = "Capture/Compare 1 DMA request enable"]
1538 pub fn set_odr(&mut self, n: usize, val: super::vals::Odr) { 2354 pub fn set_ccde(&mut self, n: usize, val: bool) {
1539 assert!(n < 16usize); 2355 assert!(n < 4usize);
1540 let offs = 0usize + n * 1usize; 2356 let offs = 9usize + n * 1usize;
1541 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); 2357 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
2358 }
2359 #[doc = "Trigger DMA request enable"]
2360 pub const fn tde(&self) -> bool {
2361 let val = (self.0 >> 14usize) & 0x01;
2362 val != 0
2363 }
2364 #[doc = "Trigger DMA request enable"]
2365 pub fn set_tde(&mut self, val: bool) {
2366 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize);
1542 } 2367 }
1543 } 2368 }
1544 impl Default for Odr { 2369 impl Default for DierGp {
1545 fn default() -> Odr { 2370 fn default() -> DierGp {
1546 Odr(0) 2371 DierGp(0)
1547 } 2372 }
1548 } 2373 }
1549 #[doc = "GPIO alternate function register"] 2374 #[doc = "prescaler"]
1550 #[repr(transparent)] 2375 #[repr(transparent)]
1551 #[derive(Copy, Clone, Eq, PartialEq)] 2376 #[derive(Copy, Clone, Eq, PartialEq)]
1552 pub struct Afr(pub u32); 2377 pub struct Psc(pub u32);
1553 impl Afr { 2378 impl Psc {
1554 #[doc = "Alternate function selection for port x bit y (y = 0..15)"] 2379 #[doc = "Prescaler value"]
1555 pub fn afr(&self, n: usize) -> super::vals::Afr { 2380 pub const fn psc(&self) -> u16 {
1556 assert!(n < 8usize); 2381 let val = (self.0 >> 0usize) & 0xffff;
1557 let offs = 0usize + n * 4usize; 2382 val as u16
1558 let val = (self.0 >> offs) & 0x0f;
1559 super::vals::Afr(val as u8)
1560 } 2383 }
1561 #[doc = "Alternate function selection for port x bit y (y = 0..15)"] 2384 #[doc = "Prescaler value"]
1562 pub fn set_afr(&mut self, n: usize, val: super::vals::Afr) { 2385 pub fn set_psc(&mut self, val: u16) {
1563 assert!(n < 8usize); 2386 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
1564 let offs = 0usize + n * 4usize;
1565 self.0 = (self.0 & !(0x0f << offs)) | (((val.0 as u32) & 0x0f) << offs);
1566 } 2387 }
1567 } 2388 }
1568 impl Default for Afr { 2389 impl Default for Psc {
1569 fn default() -> Afr { 2390 fn default() -> Psc {
1570 Afr(0) 2391 Psc(0)
1571 } 2392 }
1572 } 2393 }
1573 #[doc = "GPIO port bit set/reset register"] 2394 #[doc = "capture/compare mode register 2 (output mode)"]
1574 #[repr(transparent)] 2395 #[repr(transparent)]
1575 #[derive(Copy, Clone, Eq, PartialEq)] 2396 #[derive(Copy, Clone, Eq, PartialEq)]
1576 pub struct Bsrr(pub u32); 2397 pub struct CcmrOutput(pub u32);
1577 impl Bsrr { 2398 impl CcmrOutput {
1578 #[doc = "Port x set bit y (y= 0..15)"] 2399 #[doc = "Capture/Compare 3 selection"]
1579 pub fn bs(&self, n: usize) -> bool { 2400 pub fn ccs(&self, n: usize) -> super::vals::CcmrOutputCcs {
1580 assert!(n < 16usize); 2401 assert!(n < 2usize);
1581 let offs = 0usize + n * 1usize; 2402 let offs = 0usize + n * 8usize;
2403 let val = (self.0 >> offs) & 0x03;
2404 super::vals::CcmrOutputCcs(val as u8)
2405 }
2406 #[doc = "Capture/Compare 3 selection"]
2407 pub fn set_ccs(&mut self, n: usize, val: super::vals::CcmrOutputCcs) {
2408 assert!(n < 2usize);
2409 let offs = 0usize + n * 8usize;
2410 self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs);
2411 }
2412 #[doc = "Output compare 3 fast enable"]
2413 pub fn ocfe(&self, n: usize) -> bool {
2414 assert!(n < 2usize);
2415 let offs = 2usize + n * 8usize;
1582 let val = (self.0 >> offs) & 0x01; 2416 let val = (self.0 >> offs) & 0x01;
1583 val != 0 2417 val != 0
1584 } 2418 }
1585 #[doc = "Port x set bit y (y= 0..15)"] 2419 #[doc = "Output compare 3 fast enable"]
1586 pub fn set_bs(&mut self, n: usize, val: bool) { 2420 pub fn set_ocfe(&mut self, n: usize, val: bool) {
1587 assert!(n < 16usize); 2421 assert!(n < 2usize);
1588 let offs = 0usize + n * 1usize; 2422 let offs = 2usize + n * 8usize;
1589 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); 2423 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
1590 } 2424 }
1591 #[doc = "Port x set bit y (y= 0..15)"] 2425 #[doc = "Output compare 3 preload enable"]
1592 pub fn br(&self, n: usize) -> bool { 2426 pub fn ocpe(&self, n: usize) -> super::vals::Ocpe {
1593 assert!(n < 16usize); 2427 assert!(n < 2usize);
1594 let offs = 16usize + n * 1usize; 2428 let offs = 3usize + n * 8usize;
2429 let val = (self.0 >> offs) & 0x01;
2430 super::vals::Ocpe(val as u8)
2431 }
2432 #[doc = "Output compare 3 preload enable"]
2433 pub fn set_ocpe(&mut self, n: usize, val: super::vals::Ocpe) {
2434 assert!(n < 2usize);
2435 let offs = 3usize + n * 8usize;
2436 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs);
2437 }
2438 #[doc = "Output compare 3 mode"]
2439 pub fn ocm(&self, n: usize) -> super::vals::Ocm {
2440 assert!(n < 2usize);
2441 let offs = 4usize + n * 8usize;
2442 let val = (self.0 >> offs) & 0x07;
2443 super::vals::Ocm(val as u8)
2444 }
2445 #[doc = "Output compare 3 mode"]
2446 pub fn set_ocm(&mut self, n: usize, val: super::vals::Ocm) {
2447 assert!(n < 2usize);
2448 let offs = 4usize + n * 8usize;
2449 self.0 = (self.0 & !(0x07 << offs)) | (((val.0 as u32) & 0x07) << offs);
2450 }
2451 #[doc = "Output compare 3 clear enable"]
2452 pub fn occe(&self, n: usize) -> bool {
2453 assert!(n < 2usize);
2454 let offs = 7usize + n * 8usize;
1595 let val = (self.0 >> offs) & 0x01; 2455 let val = (self.0 >> offs) & 0x01;
1596 val != 0 2456 val != 0
1597 } 2457 }
1598 #[doc = "Port x set bit y (y= 0..15)"] 2458 #[doc = "Output compare 3 clear enable"]
1599 pub fn set_br(&mut self, n: usize, val: bool) { 2459 pub fn set_occe(&mut self, n: usize, val: bool) {
1600 assert!(n < 16usize); 2460 assert!(n < 2usize);
1601 let offs = 16usize + n * 1usize; 2461 let offs = 7usize + n * 8usize;
1602 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); 2462 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
1603 } 2463 }
1604 } 2464 }
1605 impl Default for Bsrr { 2465 impl Default for CcmrOutput {
1606 fn default() -> Bsrr { 2466 fn default() -> CcmrOutput {
1607 Bsrr(0) 2467 CcmrOutput(0)
1608 } 2468 }
1609 } 2469 }
1610 #[doc = "GPIO port output speed register"] 2470 #[doc = "DMA address for full transfer"]
1611 #[repr(transparent)] 2471 #[repr(transparent)]
1612 #[derive(Copy, Clone, Eq, PartialEq)] 2472 #[derive(Copy, Clone, Eq, PartialEq)]
1613 pub struct Ospeedr(pub u32); 2473 pub struct Dmar(pub u32);
1614 impl Ospeedr { 2474 impl Dmar {
1615 #[doc = "Port x configuration bits (y = 0..15)"] 2475 #[doc = "DMA register for burst accesses"]
1616 pub fn ospeedr(&self, n: usize) -> super::vals::Ospeedr { 2476 pub const fn dmab(&self) -> u16 {
1617 assert!(n < 16usize); 2477 let val = (self.0 >> 0usize) & 0xffff;
1618 let offs = 0usize + n * 2usize; 2478 val as u16
1619 let val = (self.0 >> offs) & 0x03;
1620 super::vals::Ospeedr(val as u8)
1621 } 2479 }
1622 #[doc = "Port x configuration bits (y = 0..15)"] 2480 #[doc = "DMA register for burst accesses"]
1623 pub fn set_ospeedr(&mut self, n: usize, val: super::vals::Ospeedr) { 2481 pub fn set_dmab(&mut self, val: u16) {
1624 assert!(n < 16usize); 2482 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
1625 let offs = 0usize + n * 2usize;
1626 self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs);
1627 } 2483 }
1628 } 2484 }
1629 impl Default for Ospeedr { 2485 impl Default for Dmar {
1630 fn default() -> Ospeedr { 2486 fn default() -> Dmar {
1631 Ospeedr(0) 2487 Dmar(0)
1632 } 2488 }
1633 } 2489 }
1634 #[doc = "GPIO port configuration lock register"] 2490 #[doc = "capture/compare enable register"]
1635 #[repr(transparent)] 2491 #[repr(transparent)]
1636 #[derive(Copy, Clone, Eq, PartialEq)] 2492 #[derive(Copy, Clone, Eq, PartialEq)]
1637 pub struct Lckr(pub u32); 2493 pub struct CcerAdv(pub u32);
1638 impl Lckr { 2494 impl CcerAdv {
1639 #[doc = "Port x lock bit y (y= 0..15)"] 2495 #[doc = "Capture/Compare 1 output enable"]
1640 pub fn lck(&self, n: usize) -> super::vals::Lck { 2496 pub fn cce(&self, n: usize) -> bool {
1641 assert!(n < 16usize); 2497 assert!(n < 4usize);
1642 let offs = 0usize + n * 1usize; 2498 let offs = 0usize + n * 4usize;
1643 let val = (self.0 >> offs) & 0x01; 2499 let val = (self.0 >> offs) & 0x01;
1644 super::vals::Lck(val as u8) 2500 val != 0
1645 } 2501 }
1646 #[doc = "Port x lock bit y (y= 0..15)"] 2502 #[doc = "Capture/Compare 1 output enable"]
1647 pub fn set_lck(&mut self, n: usize, val: super::vals::Lck) { 2503 pub fn set_cce(&mut self, n: usize, val: bool) {
1648 assert!(n < 16usize); 2504 assert!(n < 4usize);
1649 let offs = 0usize + n * 1usize; 2505 let offs = 0usize + n * 4usize;
1650 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); 2506 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
1651 } 2507 }
1652 #[doc = "Port x lock bit y (y= 0..15)"] 2508 #[doc = "Capture/Compare 1 output Polarity"]
1653 pub const fn lckk(&self) -> super::vals::Lckk { 2509 pub fn ccp(&self, n: usize) -> bool {
1654 let val = (self.0 >> 16usize) & 0x01; 2510 assert!(n < 4usize);
1655 super::vals::Lckk(val as u8) 2511 let offs = 1usize + n * 4usize;
2512 let val = (self.0 >> offs) & 0x01;
2513 val != 0
1656 } 2514 }
1657 #[doc = "Port x lock bit y (y= 0..15)"] 2515 #[doc = "Capture/Compare 1 output Polarity"]
1658 pub fn set_lckk(&mut self, val: super::vals::Lckk) { 2516 pub fn set_ccp(&mut self, n: usize, val: bool) {
1659 self.0 = (self.0 & !(0x01 << 16usize)) | (((val.0 as u32) & 0x01) << 16usize); 2517 assert!(n < 4usize);
2518 let offs = 1usize + n * 4usize;
2519 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
1660 } 2520 }
1661 } 2521 #[doc = "Capture/Compare 1 complementary output enable"]
1662 impl Default for Lckr { 2522 pub fn ccne(&self, n: usize) -> bool {
1663 fn default() -> Lckr { 2523 assert!(n < 4usize);
1664 Lckr(0) 2524 let offs = 2usize + n * 4usize;
2525 let val = (self.0 >> offs) & 0x01;
2526 val != 0
1665 } 2527 }
1666 } 2528 #[doc = "Capture/Compare 1 complementary output enable"]
1667 #[doc = "GPIO port input data register"] 2529 pub fn set_ccne(&mut self, n: usize, val: bool) {
1668 #[repr(transparent)] 2530 assert!(n < 4usize);
1669 #[derive(Copy, Clone, Eq, PartialEq)] 2531 let offs = 2usize + n * 4usize;
1670 pub struct Idr(pub u32); 2532 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
1671 impl Idr { 2533 }
1672 #[doc = "Port input data (y = 0..15)"] 2534 #[doc = "Capture/Compare 1 output Polarity"]
1673 pub fn idr(&self, n: usize) -> super::vals::Idr { 2535 pub fn ccnp(&self, n: usize) -> bool {
1674 assert!(n < 16usize); 2536 assert!(n < 4usize);
1675 let offs = 0usize + n * 1usize; 2537 let offs = 3usize + n * 4usize;
1676 let val = (self.0 >> offs) & 0x01; 2538 let val = (self.0 >> offs) & 0x01;
1677 super::vals::Idr(val as u8) 2539 val != 0
1678 } 2540 }
1679 #[doc = "Port input data (y = 0..15)"] 2541 #[doc = "Capture/Compare 1 output Polarity"]
1680 pub fn set_idr(&mut self, n: usize, val: super::vals::Idr) { 2542 pub fn set_ccnp(&mut self, n: usize, val: bool) {
1681 assert!(n < 16usize); 2543 assert!(n < 4usize);
1682 let offs = 0usize + n * 1usize; 2544 let offs = 3usize + n * 4usize;
1683 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); 2545 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
1684 } 2546 }
1685 } 2547 }
1686 impl Default for Idr { 2548 impl Default for CcerAdv {
1687 fn default() -> Idr { 2549 fn default() -> CcerAdv {
1688 Idr(0) 2550 CcerAdv(0)
1689 } 2551 }
1690 } 2552 }
1691 #[doc = "GPIO port mode register"] 2553 #[doc = "break and dead-time register"]
1692 #[repr(transparent)] 2554 #[repr(transparent)]
1693 #[derive(Copy, Clone, Eq, PartialEq)] 2555 #[derive(Copy, Clone, Eq, PartialEq)]
1694 pub struct Moder(pub u32); 2556 pub struct Bdtr(pub u32);
1695 impl Moder { 2557 impl Bdtr {
1696 #[doc = "Port x configuration bits (y = 0..15)"] 2558 #[doc = "Dead-time generator setup"]
1697 pub fn moder(&self, n: usize) -> super::vals::Moder { 2559 pub const fn dtg(&self) -> u8 {
1698 assert!(n < 16usize); 2560 let val = (self.0 >> 0usize) & 0xff;
1699 let offs = 0usize + n * 2usize; 2561 val as u8
1700 let val = (self.0 >> offs) & 0x03;
1701 super::vals::Moder(val as u8)
1702 } 2562 }
1703 #[doc = "Port x configuration bits (y = 0..15)"] 2563 #[doc = "Dead-time generator setup"]
1704 pub fn set_moder(&mut self, n: usize, val: super::vals::Moder) { 2564 pub fn set_dtg(&mut self, val: u8) {
1705 assert!(n < 16usize); 2565 self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize);
1706 let offs = 0usize + n * 2usize;
1707 self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs);
1708 } 2566 }
1709 } 2567 #[doc = "Lock configuration"]
1710 impl Default for Moder { 2568 pub const fn lock(&self) -> u8 {
1711 fn default() -> Moder { 2569 let val = (self.0 >> 8usize) & 0x03;
1712 Moder(0) 2570 val as u8
1713 } 2571 }
1714 } 2572 #[doc = "Lock configuration"]
1715 #[doc = "GPIO port pull-up/pull-down register"] 2573 pub fn set_lock(&mut self, val: u8) {
1716 #[repr(transparent)] 2574 self.0 = (self.0 & !(0x03 << 8usize)) | (((val as u32) & 0x03) << 8usize);
1717 #[derive(Copy, Clone, Eq, PartialEq)]
1718 pub struct Pupdr(pub u32);
1719 impl Pupdr {
1720 #[doc = "Port x configuration bits (y = 0..15)"]
1721 pub fn pupdr(&self, n: usize) -> super::vals::Pupdr {
1722 assert!(n < 16usize);
1723 let offs = 0usize + n * 2usize;
1724 let val = (self.0 >> offs) & 0x03;
1725 super::vals::Pupdr(val as u8)
1726 } 2575 }
1727 #[doc = "Port x configuration bits (y = 0..15)"] 2576 #[doc = "Off-state selection for Idle mode"]
1728 pub fn set_pupdr(&mut self, n: usize, val: super::vals::Pupdr) { 2577 pub const fn ossi(&self) -> super::vals::Ossi {
1729 assert!(n < 16usize); 2578 let val = (self.0 >> 10usize) & 0x01;
1730 let offs = 0usize + n * 2usize; 2579 super::vals::Ossi(val as u8)
1731 self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs);
1732 } 2580 }
1733 } 2581 #[doc = "Off-state selection for Idle mode"]
1734 impl Default for Pupdr { 2582 pub fn set_ossi(&mut self, val: super::vals::Ossi) {
1735 fn default() -> Pupdr { 2583 self.0 = (self.0 & !(0x01 << 10usize)) | (((val.0 as u32) & 0x01) << 10usize);
1736 Pupdr(0)
1737 } 2584 }
1738 } 2585 #[doc = "Off-state selection for Run mode"]
1739 #[doc = "GPIO port output type register"] 2586 pub const fn ossr(&self) -> super::vals::Ossr {
1740 #[repr(transparent)] 2587 let val = (self.0 >> 11usize) & 0x01;
1741 #[derive(Copy, Clone, Eq, PartialEq)] 2588 super::vals::Ossr(val as u8)
1742 pub struct Otyper(pub u32);
1743 impl Otyper {
1744 #[doc = "Port x configuration bits (y = 0..15)"]
1745 pub fn ot(&self, n: usize) -> super::vals::Ot {
1746 assert!(n < 16usize);
1747 let offs = 0usize + n * 1usize;
1748 let val = (self.0 >> offs) & 0x01;
1749 super::vals::Ot(val as u8)
1750 } 2589 }
1751 #[doc = "Port x configuration bits (y = 0..15)"] 2590 #[doc = "Off-state selection for Run mode"]
1752 pub fn set_ot(&mut self, n: usize, val: super::vals::Ot) { 2591 pub fn set_ossr(&mut self, val: super::vals::Ossr) {
1753 assert!(n < 16usize); 2592 self.0 = (self.0 & !(0x01 << 11usize)) | (((val.0 as u32) & 0x01) << 11usize);
1754 let offs = 0usize + n * 1usize;
1755 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs);
1756 } 2593 }
1757 } 2594 #[doc = "Break enable"]
1758 impl Default for Otyper { 2595 pub const fn bke(&self) -> bool {
1759 fn default() -> Otyper { 2596 let val = (self.0 >> 12usize) & 0x01;
1760 Otyper(0) 2597 val != 0
2598 }
2599 #[doc = "Break enable"]
2600 pub fn set_bke(&mut self, val: bool) {
2601 self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize);
2602 }
2603 #[doc = "Break polarity"]
2604 pub const fn bkp(&self) -> bool {
2605 let val = (self.0 >> 13usize) & 0x01;
2606 val != 0
2607 }
2608 #[doc = "Break polarity"]
2609 pub fn set_bkp(&mut self, val: bool) {
2610 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize);
2611 }
2612 #[doc = "Automatic output enable"]
2613 pub const fn aoe(&self) -> bool {
2614 let val = (self.0 >> 14usize) & 0x01;
2615 val != 0
2616 }
2617 #[doc = "Automatic output enable"]
2618 pub fn set_aoe(&mut self, val: bool) {
2619 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize);
2620 }
2621 #[doc = "Main output enable"]
2622 pub const fn moe(&self) -> bool {
2623 let val = (self.0 >> 15usize) & 0x01;
2624 val != 0
2625 }
2626 #[doc = "Main output enable"]
2627 pub fn set_moe(&mut self, val: bool) {
2628 self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize);
1761 } 2629 }
1762 } 2630 }
1763 } 2631 impl Default for Bdtr {
1764 pub mod vals { 2632 fn default() -> Bdtr {
1765 use crate::generic::*; 2633 Bdtr(0)
1766 #[repr(transparent)] 2634 }
1767 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1768 pub struct Pupdr(pub u8);
1769 impl Pupdr {
1770 #[doc = "No pull-up, pull-down"]
1771 pub const FLOATING: Self = Self(0);
1772 #[doc = "Pull-up"]
1773 pub const PULLUP: Self = Self(0x01);
1774 #[doc = "Pull-down"]
1775 pub const PULLDOWN: Self = Self(0x02);
1776 }
1777 #[repr(transparent)]
1778 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1779 pub struct Ot(pub u8);
1780 impl Ot {
1781 #[doc = "Output push-pull (reset state)"]
1782 pub const PUSHPULL: Self = Self(0);
1783 #[doc = "Output open-drain"]
1784 pub const OPENDRAIN: Self = Self(0x01);
1785 }
1786 #[repr(transparent)]
1787 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1788 pub struct Afr(pub u8);
1789 impl Afr {
1790 #[doc = "AF0"]
1791 pub const AF0: Self = Self(0);
1792 #[doc = "AF1"]
1793 pub const AF1: Self = Self(0x01);
1794 #[doc = "AF2"]
1795 pub const AF2: Self = Self(0x02);
1796 #[doc = "AF3"]
1797 pub const AF3: Self = Self(0x03);
1798 #[doc = "AF4"]
1799 pub const AF4: Self = Self(0x04);
1800 #[doc = "AF5"]
1801 pub const AF5: Self = Self(0x05);
1802 #[doc = "AF6"]
1803 pub const AF6: Self = Self(0x06);
1804 #[doc = "AF7"]
1805 pub const AF7: Self = Self(0x07);
1806 #[doc = "AF8"]
1807 pub const AF8: Self = Self(0x08);
1808 #[doc = "AF9"]
1809 pub const AF9: Self = Self(0x09);
1810 #[doc = "AF10"]
1811 pub const AF10: Self = Self(0x0a);
1812 #[doc = "AF11"]
1813 pub const AF11: Self = Self(0x0b);
1814 #[doc = "AF12"]
1815 pub const AF12: Self = Self(0x0c);
1816 #[doc = "AF13"]
1817 pub const AF13: Self = Self(0x0d);
1818 #[doc = "AF14"]
1819 pub const AF14: Self = Self(0x0e);
1820 #[doc = "AF15"]
1821 pub const AF15: Self = Self(0x0f);
1822 }
1823 #[repr(transparent)]
1824 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1825 pub struct Brw(pub u8);
1826 impl Brw {
1827 #[doc = "Resets the corresponding ODRx bit"]
1828 pub const RESET: Self = Self(0x01);
1829 }
1830 #[repr(transparent)]
1831 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1832 pub struct Lck(pub u8);
1833 impl Lck {
1834 #[doc = "Port configuration not locked"]
1835 pub const UNLOCKED: Self = Self(0);
1836 #[doc = "Port configuration locked"]
1837 pub const LOCKED: Self = Self(0x01);
1838 }
1839 #[repr(transparent)]
1840 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1841 pub struct Moder(pub u8);
1842 impl Moder {
1843 #[doc = "Input mode (reset state)"]
1844 pub const INPUT: Self = Self(0);
1845 #[doc = "General purpose output mode"]
1846 pub const OUTPUT: Self = Self(0x01);
1847 #[doc = "Alternate function mode"]
1848 pub const ALTERNATE: Self = Self(0x02);
1849 #[doc = "Analog mode"]
1850 pub const ANALOG: Self = Self(0x03);
1851 }
1852 #[repr(transparent)]
1853 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1854 pub struct Idr(pub u8);
1855 impl Idr {
1856 #[doc = "Input is logic low"]
1857 pub const LOW: Self = Self(0);
1858 #[doc = "Input is logic high"]
1859 pub const HIGH: Self = Self(0x01);
1860 }
1861 #[repr(transparent)]
1862 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1863 pub struct Ospeedr(pub u8);
1864 impl Ospeedr {
1865 #[doc = "Low speed"]
1866 pub const LOWSPEED: Self = Self(0);
1867 #[doc = "Medium speed"]
1868 pub const MEDIUMSPEED: Self = Self(0x01);
1869 #[doc = "High speed"]
1870 pub const HIGHSPEED: Self = Self(0x02);
1871 #[doc = "Very high speed"]
1872 pub const VERYHIGHSPEED: Self = Self(0x03);
1873 }
1874 #[repr(transparent)]
1875 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1876 pub struct Bsw(pub u8);
1877 impl Bsw {
1878 #[doc = "Sets the corresponding ODRx bit"]
1879 pub const SET: Self = Self(0x01);
1880 }
1881 #[repr(transparent)]
1882 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1883 pub struct Lckk(pub u8);
1884 impl Lckk {
1885 #[doc = "Port configuration lock key not active"]
1886 pub const NOTACTIVE: Self = Self(0);
1887 #[doc = "Port configuration lock key active"]
1888 pub const ACTIVE: Self = Self(0x01);
1889 }
1890 #[repr(transparent)]
1891 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1892 pub struct Odr(pub u8);
1893 impl Odr {
1894 #[doc = "Set output to logic low"]
1895 pub const LOW: Self = Self(0);
1896 #[doc = "Set output to logic high"]
1897 pub const HIGH: Self = Self(0x01);
1898 }
1899 }
1900}
1901pub mod spi_v1 {
1902 use crate::generic::*;
1903 #[doc = "Serial peripheral interface"]
1904 #[derive(Copy, Clone)]
1905 pub struct Spi(pub *mut u8);
1906 unsafe impl Send for Spi {}
1907 unsafe impl Sync for Spi {}
1908 impl Spi {
1909 #[doc = "control register 1"]
1910 pub fn cr1(self) -> Reg<regs::Cr1, RW> {
1911 unsafe { Reg::from_ptr(self.0.add(0usize)) }
1912 }
1913 #[doc = "control register 2"]
1914 pub fn cr2(self) -> Reg<regs::Cr2, RW> {
1915 unsafe { Reg::from_ptr(self.0.add(4usize)) }
1916 } 2635 }
1917 #[doc = "status register"] 2636 #[doc = "status register"]
1918 pub fn sr(self) -> Reg<regs::Sr, RW> {
1919 unsafe { Reg::from_ptr(self.0.add(8usize)) }
1920 }
1921 #[doc = "data register"]
1922 pub fn dr(self) -> Reg<regs::Dr, RW> {
1923 unsafe { Reg::from_ptr(self.0.add(12usize)) }
1924 }
1925 #[doc = "CRC polynomial register"]
1926 pub fn crcpr(self) -> Reg<regs::Crcpr, RW> {
1927 unsafe { Reg::from_ptr(self.0.add(16usize)) }
1928 }
1929 #[doc = "RX CRC register"]
1930 pub fn rxcrcr(self) -> Reg<regs::Rxcrcr, R> {
1931 unsafe { Reg::from_ptr(self.0.add(20usize)) }
1932 }
1933 #[doc = "TX CRC register"]
1934 pub fn txcrcr(self) -> Reg<regs::Txcrcr, R> {
1935 unsafe { Reg::from_ptr(self.0.add(24usize)) }
1936 }
1937 }
1938 pub mod vals {
1939 use crate::generic::*;
1940 #[repr(transparent)]
1941 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1942 pub struct Bidimode(pub u8);
1943 impl Bidimode {
1944 #[doc = "2-line unidirectional data mode selected"]
1945 pub const UNIDIRECTIONAL: Self = Self(0);
1946 #[doc = "1-line bidirectional data mode selected"]
1947 pub const BIDIRECTIONAL: Self = Self(0x01);
1948 }
1949 #[repr(transparent)]
1950 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1951 pub struct Iscfg(pub u8);
1952 impl Iscfg {
1953 #[doc = "Slave - transmit"]
1954 pub const SLAVETX: Self = Self(0);
1955 #[doc = "Slave - receive"]
1956 pub const SLAVERX: Self = Self(0x01);
1957 #[doc = "Master - transmit"]
1958 pub const MASTERTX: Self = Self(0x02);
1959 #[doc = "Master - receive"]
1960 pub const MASTERRX: Self = Self(0x03);
1961 }
1962 #[repr(transparent)]
1963 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1964 pub struct Dff(pub u8);
1965 impl Dff {
1966 #[doc = "8-bit data frame format is selected for transmission/reception"]
1967 pub const EIGHTBIT: Self = Self(0);
1968 #[doc = "16-bit data frame format is selected for transmission/reception"]
1969 pub const SIXTEENBIT: Self = Self(0x01);
1970 }
1971 #[repr(transparent)]
1972 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1973 pub struct Bidioe(pub u8);
1974 impl Bidioe {
1975 #[doc = "Output disabled (receive-only mode)"]
1976 pub const OUTPUTDISABLED: Self = Self(0);
1977 #[doc = "Output enabled (transmit-only mode)"]
1978 pub const OUTPUTENABLED: Self = Self(0x01);
1979 }
1980 #[repr(transparent)]
1981 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1982 pub struct Rxonly(pub u8);
1983 impl Rxonly {
1984 #[doc = "Full duplex (Transmit and receive)"]
1985 pub const FULLDUPLEX: Self = Self(0);
1986 #[doc = "Output disabled (Receive-only mode)"]
1987 pub const OUTPUTDISABLED: Self = Self(0x01);
1988 }
1989 #[repr(transparent)]
1990 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1991 pub struct Cpha(pub u8);
1992 impl Cpha {
1993 #[doc = "The first clock transition is the first data capture edge"]
1994 pub const FIRSTEDGE: Self = Self(0);
1995 #[doc = "The second clock transition is the first data capture edge"]
1996 pub const SECONDEDGE: Self = Self(0x01);
1997 }
1998 #[repr(transparent)]
1999 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
2000 pub struct Frer(pub u8);
2001 impl Frer {
2002 #[doc = "No frame format error"]
2003 pub const NOERROR: Self = Self(0);
2004 #[doc = "A frame format error occurred"]
2005 pub const ERROR: Self = Self(0x01);
2006 }
2007 #[repr(transparent)]
2008 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
2009 pub struct Crcnext(pub u8);
2010 impl Crcnext {
2011 #[doc = "Next transmit value is from Tx buffer"]
2012 pub const TXBUFFER: Self = Self(0);
2013 #[doc = "Next transmit value is from Tx CRC register"]
2014 pub const CRC: Self = Self(0x01);
2015 }
2016 #[repr(transparent)]
2017 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
2018 pub struct Frf(pub u8);
2019 impl Frf {
2020 #[doc = "SPI Motorola mode"]
2021 pub const MOTOROLA: Self = Self(0);
2022 #[doc = "SPI TI mode"]
2023 pub const TI: Self = Self(0x01);
2024 }
2025 #[repr(transparent)]
2026 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
2027 pub struct Lsbfirst(pub u8);
2028 impl Lsbfirst {
2029 #[doc = "Data is transmitted/received with the MSB first"]
2030 pub const MSBFIRST: Self = Self(0);
2031 #[doc = "Data is transmitted/received with the LSB first"]
2032 pub const LSBFIRST: Self = Self(0x01);
2033 }
2034 #[repr(transparent)]
2035 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
2036 pub struct Br(pub u8);
2037 impl Br {
2038 #[doc = "f_PCLK / 2"]
2039 pub const DIV2: Self = Self(0);
2040 #[doc = "f_PCLK / 4"]
2041 pub const DIV4: Self = Self(0x01);
2042 #[doc = "f_PCLK / 8"]
2043 pub const DIV8: Self = Self(0x02);
2044 #[doc = "f_PCLK / 16"]
2045 pub const DIV16: Self = Self(0x03);
2046 #[doc = "f_PCLK / 32"]
2047 pub const DIV32: Self = Self(0x04);
2048 #[doc = "f_PCLK / 64"]
2049 pub const DIV64: Self = Self(0x05);
2050 #[doc = "f_PCLK / 128"]
2051 pub const DIV128: Self = Self(0x06);
2052 #[doc = "f_PCLK / 256"]
2053 pub const DIV256: Self = Self(0x07);
2054 }
2055 #[repr(transparent)]
2056 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
2057 pub struct Cpol(pub u8);
2058 impl Cpol {
2059 #[doc = "CK to 0 when idle"]
2060 pub const IDLELOW: Self = Self(0);
2061 #[doc = "CK to 1 when idle"]
2062 pub const IDLEHIGH: Self = Self(0x01);
2063 }
2064 #[repr(transparent)]
2065 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
2066 pub struct Mstr(pub u8);
2067 impl Mstr {
2068 #[doc = "Slave configuration"]
2069 pub const SLAVE: Self = Self(0);
2070 #[doc = "Master configuration"]
2071 pub const MASTER: Self = Self(0x01);
2072 }
2073 }
2074 pub mod regs {
2075 use crate::generic::*;
2076 #[doc = "control register 1"]
2077 #[repr(transparent)] 2637 #[repr(transparent)]
2078 #[derive(Copy, Clone, Eq, PartialEq)] 2638 #[derive(Copy, Clone, Eq, PartialEq)]
2079 pub struct Cr1(pub u32); 2639 pub struct SrAdv(pub u32);
2080 impl Cr1 { 2640 impl SrAdv {
2081 #[doc = "Clock phase"] 2641 #[doc = "Update interrupt flag"]
2082 pub const fn cpha(&self) -> super::vals::Cpha { 2642 pub const fn uif(&self) -> bool {
2083 let val = (self.0 >> 0usize) & 0x01; 2643 let val = (self.0 >> 0usize) & 0x01;
2084 super::vals::Cpha(val as u8) 2644 val != 0
2085 }
2086 #[doc = "Clock phase"]
2087 pub fn set_cpha(&mut self, val: super::vals::Cpha) {
2088 self.0 = (self.0 & !(0x01 << 0usize)) | (((val.0 as u32) & 0x01) << 0usize);
2089 }
2090 #[doc = "Clock polarity"]
2091 pub const fn cpol(&self) -> super::vals::Cpol {
2092 let val = (self.0 >> 1usize) & 0x01;
2093 super::vals::Cpol(val as u8)
2094 } 2645 }
2095 #[doc = "Clock polarity"] 2646 #[doc = "Update interrupt flag"]
2096 pub fn set_cpol(&mut self, val: super::vals::Cpol) { 2647 pub fn set_uif(&mut self, val: bool) {
2097 self.0 = (self.0 & !(0x01 << 1usize)) | (((val.0 as u32) & 0x01) << 1usize); 2648 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
2098 } 2649 }
2099 #[doc = "Master selection"] 2650 #[doc = "Capture/compare 1 interrupt flag"]
2100 pub const fn mstr(&self) -> super::vals::Mstr { 2651 pub fn ccif(&self, n: usize) -> bool {
2101 let val = (self.0 >> 2usize) & 0x01; 2652 assert!(n < 4usize);
2102 super::vals::Mstr(val as u8) 2653 let offs = 1usize + n * 1usize;
2654 let val = (self.0 >> offs) & 0x01;
2655 val != 0
2103 } 2656 }
2104 #[doc = "Master selection"] 2657 #[doc = "Capture/compare 1 interrupt flag"]
2105 pub fn set_mstr(&mut self, val: super::vals::Mstr) { 2658 pub fn set_ccif(&mut self, n: usize, val: bool) {
2106 self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize); 2659 assert!(n < 4usize);
2660 let offs = 1usize + n * 1usize;
2661 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
2107 } 2662 }
2108 #[doc = "Baud rate control"] 2663 #[doc = "COM interrupt flag"]
2109 pub const fn br(&self) -> super::vals::Br { 2664 pub const fn comif(&self) -> bool {
2110 let val = (self.0 >> 3usize) & 0x07; 2665 let val = (self.0 >> 5usize) & 0x01;
2111 super::vals::Br(val as u8) 2666 val != 0
2112 } 2667 }
2113 #[doc = "Baud rate control"] 2668 #[doc = "COM interrupt flag"]
2114 pub fn set_br(&mut self, val: super::vals::Br) { 2669 pub fn set_comif(&mut self, val: bool) {
2115 self.0 = (self.0 & !(0x07 << 3usize)) | (((val.0 as u32) & 0x07) << 3usize); 2670 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
2116 } 2671 }
2117 #[doc = "SPI enable"] 2672 #[doc = "Trigger interrupt flag"]
2118 pub const fn spe(&self) -> bool { 2673 pub const fn tif(&self) -> bool {
2119 let val = (self.0 >> 6usize) & 0x01; 2674 let val = (self.0 >> 6usize) & 0x01;
2120 val != 0 2675 val != 0
2121 } 2676 }
2122 #[doc = "SPI enable"] 2677 #[doc = "Trigger interrupt flag"]
2123 pub fn set_spe(&mut self, val: bool) { 2678 pub fn set_tif(&mut self, val: bool) {
2124 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); 2679 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
2125 } 2680 }
2126 #[doc = "Frame format"] 2681 #[doc = "Break interrupt flag"]
2127 pub const fn lsbfirst(&self) -> super::vals::Lsbfirst { 2682 pub const fn bif(&self) -> bool {
2128 let val = (self.0 >> 7usize) & 0x01; 2683 let val = (self.0 >> 7usize) & 0x01;
2129 super::vals::Lsbfirst(val as u8) 2684 val != 0
2130 } 2685 }
2131 #[doc = "Frame format"] 2686 #[doc = "Break interrupt flag"]
2132 pub fn set_lsbfirst(&mut self, val: super::vals::Lsbfirst) { 2687 pub fn set_bif(&mut self, val: bool) {
2133 self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize); 2688 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
2134 } 2689 }
2135 #[doc = "Internal slave select"] 2690 #[doc = "Capture/Compare 1 overcapture flag"]
2136 pub const fn ssi(&self) -> bool { 2691 pub fn ccof(&self, n: usize) -> bool {
2137 let val = (self.0 >> 8usize) & 0x01; 2692 assert!(n < 4usize);
2693 let offs = 9usize + n * 1usize;
2694 let val = (self.0 >> offs) & 0x01;
2138 val != 0 2695 val != 0
2139 } 2696 }
2140 #[doc = "Internal slave select"] 2697 #[doc = "Capture/Compare 1 overcapture flag"]
2141 pub fn set_ssi(&mut self, val: bool) { 2698 pub fn set_ccof(&mut self, n: usize, val: bool) {
2142 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); 2699 assert!(n < 4usize);
2700 let offs = 9usize + n * 1usize;
2701 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
2143 } 2702 }
2144 #[doc = "Software slave management"] 2703 }
2145 pub const fn ssm(&self) -> bool { 2704 impl Default for SrAdv {
2146 let val = (self.0 >> 9usize) & 0x01; 2705 fn default() -> SrAdv {
2706 SrAdv(0)
2707 }
2708 }
2709 #[doc = "control register 1"]
2710 #[repr(transparent)]
2711 #[derive(Copy, Clone, Eq, PartialEq)]
2712 pub struct Cr1Gp(pub u32);
2713 impl Cr1Gp {
2714 #[doc = "Counter enable"]
2715 pub const fn cen(&self) -> bool {
2716 let val = (self.0 >> 0usize) & 0x01;
2147 val != 0 2717 val != 0
2148 } 2718 }
2149 #[doc = "Software slave management"] 2719 #[doc = "Counter enable"]
2150 pub fn set_ssm(&mut self, val: bool) { 2720 pub fn set_cen(&mut self, val: bool) {
2151 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); 2721 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
2152 } 2722 }
2153 #[doc = "Receive only"] 2723 #[doc = "Update disable"]
2154 pub const fn rxonly(&self) -> super::vals::Rxonly { 2724 pub const fn udis(&self) -> bool {
2155 let val = (self.0 >> 10usize) & 0x01; 2725 let val = (self.0 >> 1usize) & 0x01;
2156 super::vals::Rxonly(val as u8) 2726 val != 0
2157 } 2727 }
2158 #[doc = "Receive only"] 2728 #[doc = "Update disable"]
2159 pub fn set_rxonly(&mut self, val: super::vals::Rxonly) { 2729 pub fn set_udis(&mut self, val: bool) {
2160 self.0 = (self.0 & !(0x01 << 10usize)) | (((val.0 as u32) & 0x01) << 10usize); 2730 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
2161 } 2731 }
2162 #[doc = "Data frame format"] 2732 #[doc = "Update request source"]
2163 pub const fn dff(&self) -> super::vals::Dff { 2733 pub const fn urs(&self) -> super::vals::Urs {
2164 let val = (self.0 >> 11usize) & 0x01; 2734 let val = (self.0 >> 2usize) & 0x01;
2165 super::vals::Dff(val as u8) 2735 super::vals::Urs(val as u8)
2166 } 2736 }
2167 #[doc = "Data frame format"] 2737 #[doc = "Update request source"]
2168 pub fn set_dff(&mut self, val: super::vals::Dff) { 2738 pub fn set_urs(&mut self, val: super::vals::Urs) {
2169 self.0 = (self.0 & !(0x01 << 11usize)) | (((val.0 as u32) & 0x01) << 11usize); 2739 self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize);
2170 } 2740 }
2171 #[doc = "CRC transfer next"] 2741 #[doc = "One-pulse mode"]
2172 pub const fn crcnext(&self) -> super::vals::Crcnext { 2742 pub const fn opm(&self) -> super::vals::Opm {
2173 let val = (self.0 >> 12usize) & 0x01; 2743 let val = (self.0 >> 3usize) & 0x01;
2174 super::vals::Crcnext(val as u8) 2744 super::vals::Opm(val as u8)
2175 } 2745 }
2176 #[doc = "CRC transfer next"] 2746 #[doc = "One-pulse mode"]
2177 pub fn set_crcnext(&mut self, val: super::vals::Crcnext) { 2747 pub fn set_opm(&mut self, val: super::vals::Opm) {
2178 self.0 = (self.0 & !(0x01 << 12usize)) | (((val.0 as u32) & 0x01) << 12usize); 2748 self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize);
2179 } 2749 }
2180 #[doc = "Hardware CRC calculation enable"] 2750 #[doc = "Direction"]
2181 pub const fn crcen(&self) -> bool { 2751 pub const fn dir(&self) -> super::vals::Dir {
2182 let val = (self.0 >> 13usize) & 0x01; 2752 let val = (self.0 >> 4usize) & 0x01;
2183 val != 0 2753 super::vals::Dir(val as u8)
2184 } 2754 }
2185 #[doc = "Hardware CRC calculation enable"] 2755 #[doc = "Direction"]
2186 pub fn set_crcen(&mut self, val: bool) { 2756 pub fn set_dir(&mut self, val: super::vals::Dir) {
2187 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); 2757 self.0 = (self.0 & !(0x01 << 4usize)) | (((val.0 as u32) & 0x01) << 4usize);
2188 } 2758 }
2189 #[doc = "Output enable in bidirectional mode"] 2759 #[doc = "Center-aligned mode selection"]
2190 pub const fn bidioe(&self) -> super::vals::Bidioe { 2760 pub const fn cms(&self) -> super::vals::Cms {
2191 let val = (self.0 >> 14usize) & 0x01; 2761 let val = (self.0 >> 5usize) & 0x03;
2192 super::vals::Bidioe(val as u8) 2762 super::vals::Cms(val as u8)
2193 } 2763 }
2194 #[doc = "Output enable in bidirectional mode"] 2764 #[doc = "Center-aligned mode selection"]
2195 pub fn set_bidioe(&mut self, val: super::vals::Bidioe) { 2765 pub fn set_cms(&mut self, val: super::vals::Cms) {
2196 self.0 = (self.0 & !(0x01 << 14usize)) | (((val.0 as u32) & 0x01) << 14usize); 2766 self.0 = (self.0 & !(0x03 << 5usize)) | (((val.0 as u32) & 0x03) << 5usize);
2197 } 2767 }
2198 #[doc = "Bidirectional data mode enable"] 2768 #[doc = "Auto-reload preload enable"]
2199 pub const fn bidimode(&self) -> super::vals::Bidimode { 2769 pub const fn arpe(&self) -> super::vals::Arpe {
2200 let val = (self.0 >> 15usize) & 0x01; 2770 let val = (self.0 >> 7usize) & 0x01;
2201 super::vals::Bidimode(val as u8) 2771 super::vals::Arpe(val as u8)
2202 } 2772 }
2203 #[doc = "Bidirectional data mode enable"] 2773 #[doc = "Auto-reload preload enable"]
2204 pub fn set_bidimode(&mut self, val: super::vals::Bidimode) { 2774 pub fn set_arpe(&mut self, val: super::vals::Arpe) {
2205 self.0 = (self.0 & !(0x01 << 15usize)) | (((val.0 as u32) & 0x01) << 15usize); 2775 self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize);
2776 }
2777 #[doc = "Clock division"]
2778 pub const fn ckd(&self) -> super::vals::Ckd {
2779 let val = (self.0 >> 8usize) & 0x03;
2780 super::vals::Ckd(val as u8)
2781 }
2782 #[doc = "Clock division"]
2783 pub fn set_ckd(&mut self, val: super::vals::Ckd) {
2784 self.0 = (self.0 & !(0x03 << 8usize)) | (((val.0 as u32) & 0x03) << 8usize);
2206 } 2785 }
2207 } 2786 }
2208 impl Default for Cr1 { 2787 impl Default for Cr1Gp {
2209 fn default() -> Cr1 { 2788 fn default() -> Cr1Gp {
2210 Cr1(0) 2789 Cr1Gp(0)
2211 } 2790 }
2212 } 2791 }
2213 #[doc = "data register"] 2792 #[doc = "DMA control register"]
2214 #[repr(transparent)] 2793 #[repr(transparent)]
2215 #[derive(Copy, Clone, Eq, PartialEq)] 2794 #[derive(Copy, Clone, Eq, PartialEq)]
2216 pub struct Dr(pub u32); 2795 pub struct Dcr(pub u32);
2217 impl Dr { 2796 impl Dcr {
2218 #[doc = "Data register"] 2797 #[doc = "DMA base address"]
2219 pub const fn dr(&self) -> u16 { 2798 pub const fn dba(&self) -> u8 {
2220 let val = (self.0 >> 0usize) & 0xffff; 2799 let val = (self.0 >> 0usize) & 0x1f;
2221 val as u16 2800 val as u8
2222 } 2801 }
2223 #[doc = "Data register"] 2802 #[doc = "DMA base address"]
2224 pub fn set_dr(&mut self, val: u16) { 2803 pub fn set_dba(&mut self, val: u8) {
2225 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); 2804 self.0 = (self.0 & !(0x1f << 0usize)) | (((val as u32) & 0x1f) << 0usize);
2805 }
2806 #[doc = "DMA burst length"]
2807 pub const fn dbl(&self) -> u8 {
2808 let val = (self.0 >> 8usize) & 0x1f;
2809 val as u8
2810 }
2811 #[doc = "DMA burst length"]
2812 pub fn set_dbl(&mut self, val: u8) {
2813 self.0 = (self.0 & !(0x1f << 8usize)) | (((val as u32) & 0x1f) << 8usize);
2226 } 2814 }
2227 } 2815 }
2228 impl Default for Dr { 2816 impl Default for Dcr {
2229 fn default() -> Dr { 2817 fn default() -> Dcr {
2230 Dr(0) 2818 Dcr(0)
2231 } 2819 }
2232 } 2820 }
2233 #[doc = "CRC polynomial register"] 2821 #[doc = "event generation register"]
2234 #[repr(transparent)] 2822 #[repr(transparent)]
2235 #[derive(Copy, Clone, Eq, PartialEq)] 2823 #[derive(Copy, Clone, Eq, PartialEq)]
2236 pub struct Crcpr(pub u32); 2824 pub struct EgrBasic(pub u32);
2237 impl Crcpr { 2825 impl EgrBasic {
2238 #[doc = "CRC polynomial register"] 2826 #[doc = "Update generation"]
2239 pub const fn crcpoly(&self) -> u16 { 2827 pub const fn ug(&self) -> bool {
2240 let val = (self.0 >> 0usize) & 0xffff; 2828 let val = (self.0 >> 0usize) & 0x01;
2241 val as u16 2829 val != 0
2242 } 2830 }
2243 #[doc = "CRC polynomial register"] 2831 #[doc = "Update generation"]
2244 pub fn set_crcpoly(&mut self, val: u16) { 2832 pub fn set_ug(&mut self, val: bool) {
2245 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); 2833 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
2246 } 2834 }
2247 } 2835 }
2248 impl Default for Crcpr { 2836 impl Default for EgrBasic {
2249 fn default() -> Crcpr { 2837 fn default() -> EgrBasic {
2250 Crcpr(0) 2838 EgrBasic(0)
2251 } 2839 }
2252 } 2840 }
2253 #[doc = "RX CRC register"] 2841 #[doc = "counter"]
2254 #[repr(transparent)] 2842 #[repr(transparent)]
2255 #[derive(Copy, Clone, Eq, PartialEq)] 2843 #[derive(Copy, Clone, Eq, PartialEq)]
2256 pub struct Rxcrcr(pub u32); 2844 pub struct Cnt32(pub u32);
2257 impl Rxcrcr { 2845 impl Cnt32 {
2258 #[doc = "Rx CRC register"] 2846 #[doc = "counter value"]
2259 pub const fn rx_crc(&self) -> u16 { 2847 pub const fn cnt(&self) -> u32 {
2260 let val = (self.0 >> 0usize) & 0xffff; 2848 let val = (self.0 >> 0usize) & 0xffff_ffff;
2261 val as u16 2849 val as u32
2262 } 2850 }
2263 #[doc = "Rx CRC register"] 2851 #[doc = "counter value"]
2264 pub fn set_rx_crc(&mut self, val: u16) { 2852 pub fn set_cnt(&mut self, val: u32) {
2265 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); 2853 self.0 =
2854 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
2266 } 2855 }
2267 } 2856 }
2268 impl Default for Rxcrcr { 2857 impl Default for Cnt32 {
2269 fn default() -> Rxcrcr { 2858 fn default() -> Cnt32 {
2270 Rxcrcr(0) 2859 Cnt32(0)
2271 } 2860 }
2272 } 2861 }
2273 #[doc = "TX CRC register"] 2862 #[doc = "auto-reload register"]
2274 #[repr(transparent)] 2863 #[repr(transparent)]
2275 #[derive(Copy, Clone, Eq, PartialEq)] 2864 #[derive(Copy, Clone, Eq, PartialEq)]
2276 pub struct Txcrcr(pub u32); 2865 pub struct Arr32(pub u32);
2277 impl Txcrcr { 2866 impl Arr32 {
2278 #[doc = "Tx CRC register"] 2867 #[doc = "Auto-reload value"]
2279 pub const fn tx_crc(&self) -> u16 { 2868 pub const fn arr(&self) -> u32 {
2280 let val = (self.0 >> 0usize) & 0xffff; 2869 let val = (self.0 >> 0usize) & 0xffff_ffff;
2281 val as u16 2870 val as u32
2282 } 2871 }
2283 #[doc = "Tx CRC register"] 2872 #[doc = "Auto-reload value"]
2284 pub fn set_tx_crc(&mut self, val: u16) { 2873 pub fn set_arr(&mut self, val: u32) {
2285 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); 2874 self.0 =
2875 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
2286 } 2876 }
2287 } 2877 }
2288 impl Default for Txcrcr { 2878 impl Default for Arr32 {
2289 fn default() -> Txcrcr { 2879 fn default() -> Arr32 {
2290 Txcrcr(0) 2880 Arr32(0)
2291 } 2881 }
2292 } 2882 }
2293 #[doc = "status register"] 2883 #[doc = "control register 2"]
2294 #[repr(transparent)] 2884 #[repr(transparent)]
2295 #[derive(Copy, Clone, Eq, PartialEq)] 2885 #[derive(Copy, Clone, Eq, PartialEq)]
2296 pub struct Sr(pub u32); 2886 pub struct Cr2Adv(pub u32);
2297 impl Sr { 2887 impl Cr2Adv {
2298 #[doc = "Receive buffer not empty"] 2888 #[doc = "Capture/compare preloaded control"]
2299 pub const fn rxne(&self) -> bool { 2889 pub const fn ccpc(&self) -> bool {
2300 let val = (self.0 >> 0usize) & 0x01; 2890 let val = (self.0 >> 0usize) & 0x01;
2301 val != 0 2891 val != 0
2302 } 2892 }
2303 #[doc = "Receive buffer not empty"] 2893 #[doc = "Capture/compare preloaded control"]
2304 pub fn set_rxne(&mut self, val: bool) { 2894 pub fn set_ccpc(&mut self, val: bool) {
2305 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 2895 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
2306 } 2896 }
2307 #[doc = "Transmit buffer empty"] 2897 #[doc = "Capture/compare control update selection"]
2308 pub const fn txe(&self) -> bool { 2898 pub const fn ccus(&self) -> bool {
2309 let val = (self.0 >> 1usize) & 0x01; 2899 let val = (self.0 >> 2usize) & 0x01;
2310 val != 0 2900 val != 0
2311 } 2901 }
2312 #[doc = "Transmit buffer empty"] 2902 #[doc = "Capture/compare control update selection"]
2313 pub fn set_txe(&mut self, val: bool) { 2903 pub fn set_ccus(&mut self, val: bool) {
2314 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); 2904 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
2315 } 2905 }
2316 #[doc = "CRC error flag"] 2906 #[doc = "Capture/compare DMA selection"]
2317 pub const fn crcerr(&self) -> bool { 2907 pub const fn ccds(&self) -> super::vals::Ccds {
2318 let val = (self.0 >> 4usize) & 0x01; 2908 let val = (self.0 >> 3usize) & 0x01;
2319 val != 0 2909 super::vals::Ccds(val as u8)
2320 } 2910 }
2321 #[doc = "CRC error flag"] 2911 #[doc = "Capture/compare DMA selection"]
2322 pub fn set_crcerr(&mut self, val: bool) { 2912 pub fn set_ccds(&mut self, val: super::vals::Ccds) {
2323 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); 2913 self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize);
2324 } 2914 }
2325 #[doc = "Mode fault"] 2915 #[doc = "Master mode selection"]
2326 pub const fn modf(&self) -> bool { 2916 pub const fn mms(&self) -> super::vals::Mms {
2327 let val = (self.0 >> 5usize) & 0x01; 2917 let val = (self.0 >> 4usize) & 0x07;
2918 super::vals::Mms(val as u8)
2919 }
2920 #[doc = "Master mode selection"]
2921 pub fn set_mms(&mut self, val: super::vals::Mms) {
2922 self.0 = (self.0 & !(0x07 << 4usize)) | (((val.0 as u32) & 0x07) << 4usize);
2923 }
2924 #[doc = "TI1 selection"]
2925 pub const fn ti1s(&self) -> super::vals::Tis {
2926 let val = (self.0 >> 7usize) & 0x01;
2927 super::vals::Tis(val as u8)
2928 }
2929 #[doc = "TI1 selection"]
2930 pub fn set_ti1s(&mut self, val: super::vals::Tis) {
2931 self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize);
2932 }
2933 #[doc = "Output Idle state 1"]
2934 pub fn ois(&self, n: usize) -> bool {
2935 assert!(n < 4usize);
2936 let offs = 8usize + n * 2usize;
2937 let val = (self.0 >> offs) & 0x01;
2328 val != 0 2938 val != 0
2329 } 2939 }
2330 #[doc = "Mode fault"] 2940 #[doc = "Output Idle state 1"]
2331 pub fn set_modf(&mut self, val: bool) { 2941 pub fn set_ois(&mut self, n: usize, val: bool) {
2332 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); 2942 assert!(n < 4usize);
2943 let offs = 8usize + n * 2usize;
2944 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
2333 } 2945 }
2334 #[doc = "Overrun flag"] 2946 #[doc = "Output Idle state 1"]
2335 pub const fn ovr(&self) -> bool { 2947 pub const fn ois1n(&self) -> bool {
2336 let val = (self.0 >> 6usize) & 0x01; 2948 let val = (self.0 >> 9usize) & 0x01;
2337 val != 0 2949 val != 0
2338 } 2950 }
2339 #[doc = "Overrun flag"] 2951 #[doc = "Output Idle state 1"]
2340 pub fn set_ovr(&mut self, val: bool) { 2952 pub fn set_ois1n(&mut self, val: bool) {
2341 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); 2953 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
2342 } 2954 }
2343 #[doc = "Busy flag"] 2955 #[doc = "Output Idle state 2"]
2344 pub const fn bsy(&self) -> bool { 2956 pub const fn ois2n(&self) -> bool {
2345 let val = (self.0 >> 7usize) & 0x01; 2957 let val = (self.0 >> 11usize) & 0x01;
2346 val != 0 2958 val != 0
2347 } 2959 }
2348 #[doc = "Busy flag"] 2960 #[doc = "Output Idle state 2"]
2349 pub fn set_bsy(&mut self, val: bool) { 2961 pub fn set_ois2n(&mut self, val: bool) {
2350 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); 2962 self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize);
2351 } 2963 }
2352 #[doc = "TI frame format error"] 2964 #[doc = "Output Idle state 3"]
2353 pub const fn fre(&self) -> bool { 2965 pub const fn ois3n(&self) -> bool {
2354 let val = (self.0 >> 8usize) & 0x01; 2966 let val = (self.0 >> 13usize) & 0x01;
2355 val != 0 2967 val != 0
2356 } 2968 }
2357 #[doc = "TI frame format error"] 2969 #[doc = "Output Idle state 3"]
2358 pub fn set_fre(&mut self, val: bool) { 2970 pub fn set_ois3n(&mut self, val: bool) {
2359 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); 2971 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize);
2360 } 2972 }
2361 } 2973 }
2362 impl Default for Sr { 2974 impl Default for Cr2Adv {
2363 fn default() -> Sr { 2975 fn default() -> Cr2Adv {
2364 Sr(0) 2976 Cr2Adv(0)
2365 } 2977 }
2366 } 2978 }
2367 #[doc = "control register 2"] 2979 #[doc = "control register 1"]
2368 #[repr(transparent)] 2980 #[repr(transparent)]
2369 #[derive(Copy, Clone, Eq, PartialEq)] 2981 #[derive(Copy, Clone, Eq, PartialEq)]
2370 pub struct Cr2(pub u32); 2982 pub struct Cr1Basic(pub u32);
2371 impl Cr2 { 2983 impl Cr1Basic {
2372 #[doc = "Rx buffer DMA enable"] 2984 #[doc = "Counter enable"]
2373 pub const fn rxdmaen(&self) -> bool { 2985 pub const fn cen(&self) -> bool {
2374 let val = (self.0 >> 0usize) & 0x01; 2986 let val = (self.0 >> 0usize) & 0x01;
2375 val != 0 2987 val != 0
2376 } 2988 }
2377 #[doc = "Rx buffer DMA enable"] 2989 #[doc = "Counter enable"]
2378 pub fn set_rxdmaen(&mut self, val: bool) { 2990 pub fn set_cen(&mut self, val: bool) {
2379 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 2991 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
2380 } 2992 }
2381 #[doc = "Tx buffer DMA enable"] 2993 #[doc = "Update disable"]
2382 pub const fn txdmaen(&self) -> bool { 2994 pub const fn udis(&self) -> bool {
2383 let val = (self.0 >> 1usize) & 0x01; 2995 let val = (self.0 >> 1usize) & 0x01;
2384 val != 0 2996 val != 0
2385 } 2997 }
2386 #[doc = "Tx buffer DMA enable"] 2998 #[doc = "Update disable"]
2387 pub fn set_txdmaen(&mut self, val: bool) { 2999 pub fn set_udis(&mut self, val: bool) {
2388 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); 3000 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
2389 } 3001 }
2390 #[doc = "SS output enable"] 3002 #[doc = "Update request source"]
2391 pub const fn ssoe(&self) -> bool { 3003 pub const fn urs(&self) -> super::vals::Urs {
2392 let val = (self.0 >> 2usize) & 0x01; 3004 let val = (self.0 >> 2usize) & 0x01;
2393 val != 0 3005 super::vals::Urs(val as u8)
2394 } 3006 }
2395 #[doc = "SS output enable"] 3007 #[doc = "Update request source"]
2396 pub fn set_ssoe(&mut self, val: bool) { 3008 pub fn set_urs(&mut self, val: super::vals::Urs) {
2397 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); 3009 self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize);
2398 } 3010 }
2399 #[doc = "Frame format"] 3011 #[doc = "One-pulse mode"]
2400 pub const fn frf(&self) -> super::vals::Frf { 3012 pub const fn opm(&self) -> super::vals::Opm {
2401 let val = (self.0 >> 4usize) & 0x01; 3013 let val = (self.0 >> 3usize) & 0x01;
2402 super::vals::Frf(val as u8) 3014 super::vals::Opm(val as u8)
2403 } 3015 }
2404 #[doc = "Frame format"] 3016 #[doc = "One-pulse mode"]
2405 pub fn set_frf(&mut self, val: super::vals::Frf) { 3017 pub fn set_opm(&mut self, val: super::vals::Opm) {
2406 self.0 = (self.0 & !(0x01 << 4usize)) | (((val.0 as u32) & 0x01) << 4usize); 3018 self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize);
2407 } 3019 }
2408 #[doc = "Error interrupt enable"] 3020 #[doc = "Auto-reload preload enable"]
2409 pub const fn errie(&self) -> bool { 3021 pub const fn arpe(&self) -> super::vals::Arpe {
2410 let val = (self.0 >> 5usize) & 0x01; 3022 let val = (self.0 >> 7usize) & 0x01;
2411 val != 0 3023 super::vals::Arpe(val as u8)
2412 } 3024 }
2413 #[doc = "Error interrupt enable"] 3025 #[doc = "Auto-reload preload enable"]
2414 pub fn set_errie(&mut self, val: bool) { 3026 pub fn set_arpe(&mut self, val: super::vals::Arpe) {
2415 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); 3027 self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize);
2416 } 3028 }
2417 #[doc = "RX buffer not empty interrupt enable"] 3029 }
2418 pub const fn rxneie(&self) -> bool { 3030 impl Default for Cr1Basic {
2419 let val = (self.0 >> 6usize) & 0x01; 3031 fn default() -> Cr1Basic {
2420 val != 0 3032 Cr1Basic(0)
2421 } 3033 }
2422 #[doc = "RX buffer not empty interrupt enable"] 3034 }
2423 pub fn set_rxneie(&mut self, val: bool) { 3035 #[doc = "capture/compare mode register 1 (input mode)"]
2424 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); 3036 #[repr(transparent)]
3037 #[derive(Copy, Clone, Eq, PartialEq)]
3038 pub struct CcmrInput(pub u32);
3039 impl CcmrInput {
3040 #[doc = "Capture/Compare 1 selection"]
3041 pub fn ccs(&self, n: usize) -> super::vals::CcmrInputCcs {
3042 assert!(n < 2usize);
3043 let offs = 0usize + n * 8usize;
3044 let val = (self.0 >> offs) & 0x03;
3045 super::vals::CcmrInputCcs(val as u8)
2425 } 3046 }
2426 #[doc = "Tx buffer empty interrupt enable"] 3047 #[doc = "Capture/Compare 1 selection"]
2427 pub const fn txeie(&self) -> bool { 3048 pub fn set_ccs(&mut self, n: usize, val: super::vals::CcmrInputCcs) {
2428 let val = (self.0 >> 7usize) & 0x01; 3049 assert!(n < 2usize);
2429 val != 0 3050 let offs = 0usize + n * 8usize;
3051 self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs);
2430 } 3052 }
2431 #[doc = "Tx buffer empty interrupt enable"] 3053 #[doc = "Input capture 1 prescaler"]
2432 pub fn set_txeie(&mut self, val: bool) { 3054 pub fn icpsc(&self, n: usize) -> u8 {
2433 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); 3055 assert!(n < 2usize);
3056 let offs = 2usize + n * 8usize;
3057 let val = (self.0 >> offs) & 0x03;
3058 val as u8
2434 } 3059 }
2435 } 3060 #[doc = "Input capture 1 prescaler"]
2436 impl Default for Cr2 { 3061 pub fn set_icpsc(&mut self, n: usize, val: u8) {
2437 fn default() -> Cr2 { 3062 assert!(n < 2usize);
2438 Cr2(0) 3063 let offs = 2usize + n * 8usize;
3064 self.0 = (self.0 & !(0x03 << offs)) | (((val as u32) & 0x03) << offs);
3065 }
3066 #[doc = "Input capture 1 filter"]
3067 pub fn icf(&self, n: usize) -> super::vals::Icf {
3068 assert!(n < 2usize);
3069 let offs = 4usize + n * 8usize;
3070 let val = (self.0 >> offs) & 0x0f;
3071 super::vals::Icf(val as u8)
3072 }
3073 #[doc = "Input capture 1 filter"]
3074 pub fn set_icf(&mut self, n: usize, val: super::vals::Icf) {
3075 assert!(n < 2usize);
3076 let offs = 4usize + n * 8usize;
3077 self.0 = (self.0 & !(0x0f << offs)) | (((val.0 as u32) & 0x0f) << offs);
2439 } 3078 }
2440 } 3079 }
2441 } 3080 impl Default for CcmrInput {
2442} 3081 fn default() -> CcmrInput {
2443pub mod syscfg_h7 { 3082 CcmrInput(0)
2444 use crate::generic::*; 3083 }
2445 #[doc = "System configuration controller"]
2446 #[derive(Copy, Clone)]
2447 pub struct Syscfg(pub *mut u8);
2448 unsafe impl Send for Syscfg {}
2449 unsafe impl Sync for Syscfg {}
2450 impl Syscfg {
2451 #[doc = "peripheral mode configuration register"]
2452 pub fn pmcr(self) -> Reg<regs::Pmcr, RW> {
2453 unsafe { Reg::from_ptr(self.0.add(4usize)) }
2454 }
2455 #[doc = "external interrupt configuration register 1"]
2456 pub fn exticr(self, n: usize) -> Reg<regs::Exticr, RW> {
2457 assert!(n < 4usize);
2458 unsafe { Reg::from_ptr(self.0.add(8usize + n * 4usize)) }
2459 }
2460 #[doc = "compensation cell control/status register"]
2461 pub fn cccsr(self) -> Reg<regs::Cccsr, RW> {
2462 unsafe { Reg::from_ptr(self.0.add(32usize)) }
2463 }
2464 #[doc = "SYSCFG compensation cell value register"]
2465 pub fn ccvr(self) -> Reg<regs::Ccvr, R> {
2466 unsafe { Reg::from_ptr(self.0.add(36usize)) }
2467 }
2468 #[doc = "SYSCFG compensation cell code register"]
2469 pub fn cccr(self) -> Reg<regs::Cccr, RW> {
2470 unsafe { Reg::from_ptr(self.0.add(40usize)) }
2471 }
2472 #[doc = "SYSCFG power control register"]
2473 pub fn pwrcr(self) -> Reg<regs::Pwrcr, RW> {
2474 unsafe { Reg::from_ptr(self.0.add(44usize)) }
2475 }
2476 #[doc = "SYSCFG package register"]
2477 pub fn pkgr(self) -> Reg<regs::Pkgr, R> {
2478 unsafe { Reg::from_ptr(self.0.add(292usize)) }
2479 }
2480 #[doc = "SYSCFG user register 0"]
2481 pub fn ur0(self) -> Reg<regs::Ur0, R> {
2482 unsafe { Reg::from_ptr(self.0.add(768usize)) }
2483 }
2484 #[doc = "SYSCFG user register 2"]
2485 pub fn ur2(self) -> Reg<regs::Ur2, RW> {
2486 unsafe { Reg::from_ptr(self.0.add(776usize)) }
2487 }
2488 #[doc = "SYSCFG user register 3"]
2489 pub fn ur3(self) -> Reg<regs::Ur3, RW> {
2490 unsafe { Reg::from_ptr(self.0.add(780usize)) }
2491 }
2492 #[doc = "SYSCFG user register 4"]
2493 pub fn ur4(self) -> Reg<regs::Ur4, R> {
2494 unsafe { Reg::from_ptr(self.0.add(784usize)) }
2495 }
2496 #[doc = "SYSCFG user register 5"]
2497 pub fn ur5(self) -> Reg<regs::Ur5, R> {
2498 unsafe { Reg::from_ptr(self.0.add(788usize)) }
2499 }
2500 #[doc = "SYSCFG user register 6"]
2501 pub fn ur6(self) -> Reg<regs::Ur6, R> {
2502 unsafe { Reg::from_ptr(self.0.add(792usize)) }
2503 }
2504 #[doc = "SYSCFG user register 7"]
2505 pub fn ur7(self) -> Reg<regs::Ur7, R> {
2506 unsafe { Reg::from_ptr(self.0.add(796usize)) }
2507 }
2508 #[doc = "SYSCFG user register 8"]
2509 pub fn ur8(self) -> Reg<regs::Ur8, R> {
2510 unsafe { Reg::from_ptr(self.0.add(800usize)) }
2511 }
2512 #[doc = "SYSCFG user register 9"]
2513 pub fn ur9(self) -> Reg<regs::Ur9, R> {
2514 unsafe { Reg::from_ptr(self.0.add(804usize)) }
2515 }
2516 #[doc = "SYSCFG user register 10"]
2517 pub fn ur10(self) -> Reg<regs::Ur10, R> {
2518 unsafe { Reg::from_ptr(self.0.add(808usize)) }
2519 }
2520 #[doc = "SYSCFG user register 11"]
2521 pub fn ur11(self) -> Reg<regs::Ur11, R> {
2522 unsafe { Reg::from_ptr(self.0.add(812usize)) }
2523 }
2524 #[doc = "SYSCFG user register 12"]
2525 pub fn ur12(self) -> Reg<regs::Ur12, R> {
2526 unsafe { Reg::from_ptr(self.0.add(816usize)) }
2527 }
2528 #[doc = "SYSCFG user register 13"]
2529 pub fn ur13(self) -> Reg<regs::Ur13, R> {
2530 unsafe { Reg::from_ptr(self.0.add(820usize)) }
2531 }
2532 #[doc = "SYSCFG user register 14"]
2533 pub fn ur14(self) -> Reg<regs::Ur14, RW> {
2534 unsafe { Reg::from_ptr(self.0.add(824usize)) }
2535 }
2536 #[doc = "SYSCFG user register 15"]
2537 pub fn ur15(self) -> Reg<regs::Ur15, R> {
2538 unsafe { Reg::from_ptr(self.0.add(828usize)) }
2539 }
2540 #[doc = "SYSCFG user register 16"]
2541 pub fn ur16(self) -> Reg<regs::Ur16, R> {
2542 unsafe { Reg::from_ptr(self.0.add(832usize)) }
2543 }
2544 #[doc = "SYSCFG user register 17"]
2545 pub fn ur17(self) -> Reg<regs::Ur17, R> {
2546 unsafe { Reg::from_ptr(self.0.add(836usize)) }
2547 } 3084 }
2548 } 3085 #[doc = "repetition counter register"]
2549 pub mod regs {
2550 use crate::generic::*;
2551 #[doc = "SYSCFG user register 2"]
2552 #[repr(transparent)] 3086 #[repr(transparent)]
2553 #[derive(Copy, Clone, Eq, PartialEq)] 3087 #[derive(Copy, Clone, Eq, PartialEq)]
2554 pub struct Ur2(pub u32); 3088 pub struct Rcr(pub u32);
2555 impl Ur2 { 3089 impl Rcr {
2556 #[doc = "BOR_LVL Brownout Reset Threshold Level"] 3090 #[doc = "Repetition counter value"]
2557 pub const fn borh(&self) -> u8 { 3091 pub const fn rep(&self) -> u8 {
2558 let val = (self.0 >> 0usize) & 0x03; 3092 let val = (self.0 >> 0usize) & 0xff;
2559 val as u8 3093 val as u8
2560 } 3094 }
2561 #[doc = "BOR_LVL Brownout Reset Threshold Level"] 3095 #[doc = "Repetition counter value"]
2562 pub fn set_borh(&mut self, val: u8) { 3096 pub fn set_rep(&mut self, val: u8) {
2563 self.0 = (self.0 & !(0x03 << 0usize)) | (((val as u32) & 0x03) << 0usize); 3097 self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize);
2564 }
2565 #[doc = "Boot Address 0"]
2566 pub const fn boot_add0(&self) -> u16 {
2567 let val = (self.0 >> 16usize) & 0xffff;
2568 val as u16
2569 }
2570 #[doc = "Boot Address 0"]
2571 pub fn set_boot_add0(&mut self, val: u16) {
2572 self.0 = (self.0 & !(0xffff << 16usize)) | (((val as u32) & 0xffff) << 16usize);
2573 } 3098 }
2574 } 3099 }
2575 impl Default for Ur2 { 3100 impl Default for Rcr {
2576 fn default() -> Ur2 { 3101 fn default() -> Rcr {
2577 Ur2(0) 3102 Rcr(0)
2578 } 3103 }
2579 } 3104 }
2580 #[doc = "SYSCFG user register 8"] 3105 #[doc = "DMA/Interrupt enable register"]
2581 #[repr(transparent)] 3106 #[repr(transparent)]
2582 #[derive(Copy, Clone, Eq, PartialEq)] 3107 #[derive(Copy, Clone, Eq, PartialEq)]
2583 pub struct Ur8(pub u32); 3108 pub struct DierAdv(pub u32);
2584 impl Ur8 { 3109 impl DierAdv {
2585 #[doc = "Mass erase protected area disabled for bank 2"] 3110 #[doc = "Update interrupt enable"]
2586 pub const fn mepad_2(&self) -> bool { 3111 pub const fn uie(&self) -> bool {
2587 let val = (self.0 >> 0usize) & 0x01; 3112 let val = (self.0 >> 0usize) & 0x01;
2588 val != 0 3113 val != 0
2589 } 3114 }
2590 #[doc = "Mass erase protected area disabled for bank 2"] 3115 #[doc = "Update interrupt enable"]
2591 pub fn set_mepad_2(&mut self, val: bool) { 3116 pub fn set_uie(&mut self, val: bool) {
2592 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 3117 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
2593 } 3118 }
2594 #[doc = "Mass erase secured area disabled for bank 2"] 3119 #[doc = "Capture/Compare 1 interrupt enable"]
2595 pub const fn mesad_2(&self) -> bool { 3120 pub fn ccie(&self, n: usize) -> bool {
2596 let val = (self.0 >> 16usize) & 0x01; 3121 assert!(n < 4usize);
3122 let offs = 1usize + n * 1usize;
3123 let val = (self.0 >> offs) & 0x01;
2597 val != 0 3124 val != 0
2598 } 3125 }
2599 #[doc = "Mass erase secured area disabled for bank 2"] 3126 #[doc = "Capture/Compare 1 interrupt enable"]
2600 pub fn set_mesad_2(&mut self, val: bool) { 3127 pub fn set_ccie(&mut self, n: usize, val: bool) {
2601 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); 3128 assert!(n < 4usize);
3129 let offs = 1usize + n * 1usize;
3130 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
2602 } 3131 }
2603 } 3132 #[doc = "COM interrupt enable"]
2604 impl Default for Ur8 { 3133 pub const fn comie(&self) -> bool {
2605 fn default() -> Ur8 { 3134 let val = (self.0 >> 5usize) & 0x01;
2606 Ur8(0) 3135 val != 0
2607 } 3136 }
2608 } 3137 #[doc = "COM interrupt enable"]
2609 #[doc = "SYSCFG user register 9"] 3138 pub fn set_comie(&mut self, val: bool) {
2610 #[repr(transparent)] 3139 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
2611 #[derive(Copy, Clone, Eq, PartialEq)]
2612 pub struct Ur9(pub u32);
2613 impl Ur9 {
2614 #[doc = "Write protection for flash bank 2"]
2615 pub const fn wrpn_2(&self) -> u8 {
2616 let val = (self.0 >> 0usize) & 0xff;
2617 val as u8
2618 } 3140 }
2619 #[doc = "Write protection for flash bank 2"] 3141 #[doc = "Trigger interrupt enable"]
2620 pub fn set_wrpn_2(&mut self, val: u8) { 3142 pub const fn tie(&self) -> bool {
2621 self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); 3143 let val = (self.0 >> 6usize) & 0x01;
3144 val != 0
2622 } 3145 }
2623 #[doc = "Protected area start address for bank 2"] 3146 #[doc = "Trigger interrupt enable"]
2624 pub const fn pa_beg_2(&self) -> u16 { 3147 pub fn set_tie(&mut self, val: bool) {
2625 let val = (self.0 >> 16usize) & 0x0fff; 3148 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
2626 val as u16
2627 } 3149 }
2628 #[doc = "Protected area start address for bank 2"] 3150 #[doc = "Break interrupt enable"]
2629 pub fn set_pa_beg_2(&mut self, val: u16) { 3151 pub const fn bie(&self) -> bool {
2630 self.0 = (self.0 & !(0x0fff << 16usize)) | (((val as u32) & 0x0fff) << 16usize); 3152 let val = (self.0 >> 7usize) & 0x01;
3153 val != 0
2631 } 3154 }
2632 } 3155 #[doc = "Break interrupt enable"]
2633 impl Default for Ur9 { 3156 pub fn set_bie(&mut self, val: bool) {
2634 fn default() -> Ur9 { 3157 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
2635 Ur9(0)
2636 } 3158 }
2637 } 3159 #[doc = "Update DMA request enable"]
2638 #[doc = "SYSCFG compensation cell code register"] 3160 pub const fn ude(&self) -> bool {
2639 #[repr(transparent)] 3161 let val = (self.0 >> 8usize) & 0x01;
2640 #[derive(Copy, Clone, Eq, PartialEq)] 3162 val != 0
2641 pub struct Cccr(pub u32);
2642 impl Cccr {
2643 #[doc = "NMOS compensation code"]
2644 pub const fn ncc(&self) -> u8 {
2645 let val = (self.0 >> 0usize) & 0x0f;
2646 val as u8
2647 } 3163 }
2648 #[doc = "NMOS compensation code"] 3164 #[doc = "Update DMA request enable"]
2649 pub fn set_ncc(&mut self, val: u8) { 3165 pub fn set_ude(&mut self, val: bool) {
2650 self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); 3166 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
2651 } 3167 }
2652 #[doc = "PMOS compensation code"] 3168 #[doc = "Capture/Compare 1 DMA request enable"]
2653 pub const fn pcc(&self) -> u8 { 3169 pub fn ccde(&self, n: usize) -> bool {
2654 let val = (self.0 >> 4usize) & 0x0f; 3170 assert!(n < 4usize);
2655 val as u8 3171 let offs = 9usize + n * 1usize;
3172 let val = (self.0 >> offs) & 0x01;
3173 val != 0
2656 } 3174 }
2657 #[doc = "PMOS compensation code"] 3175 #[doc = "Capture/Compare 1 DMA request enable"]
2658 pub fn set_pcc(&mut self, val: u8) { 3176 pub fn set_ccde(&mut self, n: usize, val: bool) {
2659 self.0 = (self.0 & !(0x0f << 4usize)) | (((val as u32) & 0x0f) << 4usize); 3177 assert!(n < 4usize);
3178 let offs = 9usize + n * 1usize;
3179 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
3180 }
3181 #[doc = "COM DMA request enable"]
3182 pub const fn comde(&self) -> bool {
3183 let val = (self.0 >> 13usize) & 0x01;
3184 val != 0
3185 }
3186 #[doc = "COM DMA request enable"]
3187 pub fn set_comde(&mut self, val: bool) {
3188 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize);
3189 }
3190 #[doc = "Trigger DMA request enable"]
3191 pub const fn tde(&self) -> bool {
3192 let val = (self.0 >> 14usize) & 0x01;
3193 val != 0
3194 }
3195 #[doc = "Trigger DMA request enable"]
3196 pub fn set_tde(&mut self, val: bool) {
3197 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize);
2660 } 3198 }
2661 } 3199 }
2662 impl Default for Cccr { 3200 impl Default for DierAdv {
2663 fn default() -> Cccr { 3201 fn default() -> DierAdv {
2664 Cccr(0) 3202 DierAdv(0)
2665 } 3203 }
2666 } 3204 }
2667 #[doc = "SYSCFG user register 17"] 3205 #[doc = "auto-reload register"]
2668 #[repr(transparent)] 3206 #[repr(transparent)]
2669 #[derive(Copy, Clone, Eq, PartialEq)] 3207 #[derive(Copy, Clone, Eq, PartialEq)]
2670 pub struct Ur17(pub u32); 3208 pub struct Arr16(pub u32);
2671 impl Ur17 { 3209 impl Arr16 {
2672 #[doc = "I/O high speed / low voltage"] 3210 #[doc = "Auto-reload value"]
2673 pub const fn io_hslv(&self) -> bool { 3211 pub const fn arr(&self) -> u16 {
2674 let val = (self.0 >> 0usize) & 0x01; 3212 let val = (self.0 >> 0usize) & 0xffff;
2675 val != 0 3213 val as u16
2676 } 3214 }
2677 #[doc = "I/O high speed / low voltage"] 3215 #[doc = "Auto-reload value"]
2678 pub fn set_io_hslv(&mut self, val: bool) { 3216 pub fn set_arr(&mut self, val: u16) {
2679 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 3217 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
2680 } 3218 }
2681 } 3219 }
2682 impl Default for Ur17 { 3220 impl Default for Arr16 {
2683 fn default() -> Ur17 { 3221 fn default() -> Arr16 {
2684 Ur17(0) 3222 Arr16(0)
2685 } 3223 }
2686 } 3224 }
2687 #[doc = "SYSCFG user register 14"] 3225 #[doc = "status register"]
2688 #[repr(transparent)] 3226 #[repr(transparent)]
2689 #[derive(Copy, Clone, Eq, PartialEq)] 3227 #[derive(Copy, Clone, Eq, PartialEq)]
2690 pub struct Ur14(pub u32); 3228 pub struct SrBasic(pub u32);
2691 impl Ur14 { 3229 impl SrBasic {
2692 #[doc = "D1 Stop Reset"] 3230 #[doc = "Update interrupt flag"]
2693 pub const fn d1stprst(&self) -> bool { 3231 pub const fn uif(&self) -> bool {
2694 let val = (self.0 >> 0usize) & 0x01; 3232 let val = (self.0 >> 0usize) & 0x01;
2695 val != 0 3233 val != 0
2696 } 3234 }
2697 #[doc = "D1 Stop Reset"] 3235 #[doc = "Update interrupt flag"]
2698 pub fn set_d1stprst(&mut self, val: bool) { 3236 pub fn set_uif(&mut self, val: bool) {
2699 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 3237 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
2700 } 3238 }
2701 } 3239 }
2702 impl Default for Ur14 { 3240 impl Default for SrBasic {
2703 fn default() -> Ur14 { 3241 fn default() -> SrBasic {
2704 Ur14(0) 3242 SrBasic(0)
2705 } 3243 }
2706 } 3244 }
2707 #[doc = "SYSCFG user register 7"] 3245 #[doc = "slave mode control register"]
2708 #[repr(transparent)] 3246 #[repr(transparent)]
2709 #[derive(Copy, Clone, Eq, PartialEq)] 3247 #[derive(Copy, Clone, Eq, PartialEq)]
2710 pub struct Ur7(pub u32); 3248 pub struct Smcr(pub u32);
2711 impl Ur7 { 3249 impl Smcr {
2712 #[doc = "Secured area start address for bank 1"] 3250 #[doc = "Slave mode selection"]
2713 pub const fn sa_beg_1(&self) -> u16 { 3251 pub const fn sms(&self) -> super::vals::Sms {
2714 let val = (self.0 >> 0usize) & 0x0fff; 3252 let val = (self.0 >> 0usize) & 0x07;
2715 val as u16 3253 super::vals::Sms(val as u8)
2716 } 3254 }
2717 #[doc = "Secured area start address for bank 1"] 3255 #[doc = "Slave mode selection"]
2718 pub fn set_sa_beg_1(&mut self, val: u16) { 3256 pub fn set_sms(&mut self, val: super::vals::Sms) {
2719 self.0 = (self.0 & !(0x0fff << 0usize)) | (((val as u32) & 0x0fff) << 0usize); 3257 self.0 = (self.0 & !(0x07 << 0usize)) | (((val.0 as u32) & 0x07) << 0usize);
2720 } 3258 }
2721 #[doc = "Secured area end address for bank 1"] 3259 #[doc = "Trigger selection"]
2722 pub const fn sa_end_1(&self) -> u16 { 3260 pub const fn ts(&self) -> super::vals::Ts {
2723 let val = (self.0 >> 16usize) & 0x0fff; 3261 let val = (self.0 >> 4usize) & 0x07;
2724 val as u16 3262 super::vals::Ts(val as u8)
2725 } 3263 }
2726 #[doc = "Secured area end address for bank 1"] 3264 #[doc = "Trigger selection"]
2727 pub fn set_sa_end_1(&mut self, val: u16) { 3265 pub fn set_ts(&mut self, val: super::vals::Ts) {
2728 self.0 = (self.0 & !(0x0fff << 16usize)) | (((val as u32) & 0x0fff) << 16usize); 3266 self.0 = (self.0 & !(0x07 << 4usize)) | (((val.0 as u32) & 0x07) << 4usize);
2729 } 3267 }
2730 } 3268 #[doc = "Master/Slave mode"]
2731 impl Default for Ur7 { 3269 pub const fn msm(&self) -> super::vals::Msm {
2732 fn default() -> Ur7 { 3270 let val = (self.0 >> 7usize) & 0x01;
2733 Ur7(0) 3271 super::vals::Msm(val as u8)
2734 } 3272 }
2735 } 3273 #[doc = "Master/Slave mode"]
2736 #[doc = "SYSCFG user register 12"] 3274 pub fn set_msm(&mut self, val: super::vals::Msm) {
2737 #[repr(transparent)] 3275 self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize);
2738 #[derive(Copy, Clone, Eq, PartialEq)]
2739 pub struct Ur12(pub u32);
2740 impl Ur12 {
2741 #[doc = "Secure mode"]
2742 pub const fn secure(&self) -> bool {
2743 let val = (self.0 >> 16usize) & 0x01;
2744 val != 0
2745 } 3276 }
2746 #[doc = "Secure mode"] 3277 #[doc = "External trigger filter"]
2747 pub fn set_secure(&mut self, val: bool) { 3278 pub const fn etf(&self) -> super::vals::Etf {
2748 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); 3279 let val = (self.0 >> 8usize) & 0x0f;
3280 super::vals::Etf(val as u8)
2749 } 3281 }
2750 } 3282 #[doc = "External trigger filter"]
2751 impl Default for Ur12 { 3283 pub fn set_etf(&mut self, val: super::vals::Etf) {
2752 fn default() -> Ur12 { 3284 self.0 = (self.0 & !(0x0f << 8usize)) | (((val.0 as u32) & 0x0f) << 8usize);
2753 Ur12(0)
2754 } 3285 }
2755 } 3286 #[doc = "External trigger prescaler"]
2756 #[doc = "SYSCFG user register 0"] 3287 pub const fn etps(&self) -> super::vals::Etps {
2757 #[repr(transparent)] 3288 let val = (self.0 >> 12usize) & 0x03;
2758 #[derive(Copy, Clone, Eq, PartialEq)] 3289 super::vals::Etps(val as u8)
2759 pub struct Ur0(pub u32);
2760 impl Ur0 {
2761 #[doc = "Bank Swap"]
2762 pub const fn bks(&self) -> bool {
2763 let val = (self.0 >> 0usize) & 0x01;
2764 val != 0
2765 } 3290 }
2766 #[doc = "Bank Swap"] 3291 #[doc = "External trigger prescaler"]
2767 pub fn set_bks(&mut self, val: bool) { 3292 pub fn set_etps(&mut self, val: super::vals::Etps) {
2768 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 3293 self.0 = (self.0 & !(0x03 << 12usize)) | (((val.0 as u32) & 0x03) << 12usize);
2769 } 3294 }
2770 #[doc = "Readout protection"] 3295 #[doc = "External clock enable"]
2771 pub const fn rdp(&self) -> u8 { 3296 pub const fn ece(&self) -> super::vals::Ece {
2772 let val = (self.0 >> 16usize) & 0xff; 3297 let val = (self.0 >> 14usize) & 0x01;
2773 val as u8 3298 super::vals::Ece(val as u8)
2774 } 3299 }
2775 #[doc = "Readout protection"] 3300 #[doc = "External clock enable"]
2776 pub fn set_rdp(&mut self, val: u8) { 3301 pub fn set_ece(&mut self, val: super::vals::Ece) {
2777 self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); 3302 self.0 = (self.0 & !(0x01 << 14usize)) | (((val.0 as u32) & 0x01) << 14usize);
3303 }
3304 #[doc = "External trigger polarity"]
3305 pub const fn etp(&self) -> super::vals::Etp {
3306 let val = (self.0 >> 15usize) & 0x01;
3307 super::vals::Etp(val as u8)
3308 }
3309 #[doc = "External trigger polarity"]
3310 pub fn set_etp(&mut self, val: super::vals::Etp) {
3311 self.0 = (self.0 & !(0x01 << 15usize)) | (((val.0 as u32) & 0x01) << 15usize);
2778 } 3312 }
2779 } 3313 }
2780 impl Default for Ur0 { 3314 impl Default for Smcr {
2781 fn default() -> Ur0 { 3315 fn default() -> Smcr {
2782 Ur0(0) 3316 Smcr(0)
2783 } 3317 }
2784 } 3318 }
2785 #[doc = "SYSCFG user register 11"] 3319 #[doc = "event generation register"]
2786 #[repr(transparent)] 3320 #[repr(transparent)]
2787 #[derive(Copy, Clone, Eq, PartialEq)] 3321 #[derive(Copy, Clone, Eq, PartialEq)]
2788 pub struct Ur11(pub u32); 3322 pub struct EgrGp(pub u32);
2789 impl Ur11 { 3323 impl EgrGp {
2790 #[doc = "Secured area end address for bank 2"] 3324 #[doc = "Update generation"]
2791 pub const fn sa_end_2(&self) -> u16 { 3325 pub const fn ug(&self) -> bool {
2792 let val = (self.0 >> 0usize) & 0x0fff; 3326 let val = (self.0 >> 0usize) & 0x01;
2793 val as u16 3327 val != 0
2794 } 3328 }
2795 #[doc = "Secured area end address for bank 2"] 3329 #[doc = "Update generation"]
2796 pub fn set_sa_end_2(&mut self, val: u16) { 3330 pub fn set_ug(&mut self, val: bool) {
2797 self.0 = (self.0 & !(0x0fff << 0usize)) | (((val as u32) & 0x0fff) << 0usize); 3331 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
2798 } 3332 }
2799 #[doc = "Independent Watchdog 1 mode"] 3333 #[doc = "Capture/compare 1 generation"]
2800 pub const fn iwdg1m(&self) -> bool { 3334 pub fn ccg(&self, n: usize) -> bool {
2801 let val = (self.0 >> 16usize) & 0x01; 3335 assert!(n < 4usize);
3336 let offs = 1usize + n * 1usize;
3337 let val = (self.0 >> offs) & 0x01;
2802 val != 0 3338 val != 0
2803 } 3339 }
2804 #[doc = "Independent Watchdog 1 mode"] 3340 #[doc = "Capture/compare 1 generation"]
2805 pub fn set_iwdg1m(&mut self, val: bool) { 3341 pub fn set_ccg(&mut self, n: usize, val: bool) {
2806 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); 3342 assert!(n < 4usize);
3343 let offs = 1usize + n * 1usize;
3344 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
2807 } 3345 }
2808 } 3346 #[doc = "Capture/Compare control update generation"]
2809 impl Default for Ur11 { 3347 pub const fn comg(&self) -> bool {
2810 fn default() -> Ur11 { 3348 let val = (self.0 >> 5usize) & 0x01;
2811 Ur11(0) 3349 val != 0
2812 } 3350 }
2813 } 3351 #[doc = "Capture/Compare control update generation"]
2814 #[doc = "SYSCFG user register 16"] 3352 pub fn set_comg(&mut self, val: bool) {
2815 #[repr(transparent)] 3353 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
2816 #[derive(Copy, Clone, Eq, PartialEq)] 3354 }
2817 pub struct Ur16(pub u32); 3355 #[doc = "Trigger generation"]
2818 impl Ur16 { 3356 pub const fn tg(&self) -> bool {
2819 #[doc = "Freeze independent watchdog in Stop mode"] 3357 let val = (self.0 >> 6usize) & 0x01;
2820 pub const fn fziwdgstp(&self) -> bool {
2821 let val = (self.0 >> 0usize) & 0x01;
2822 val != 0 3358 val != 0
2823 } 3359 }
2824 #[doc = "Freeze independent watchdog in Stop mode"] 3360 #[doc = "Trigger generation"]
2825 pub fn set_fziwdgstp(&mut self, val: bool) { 3361 pub fn set_tg(&mut self, val: bool) {
2826 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 3362 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
2827 } 3363 }
2828 #[doc = "Private key programmed"] 3364 #[doc = "Break generation"]
2829 pub const fn pkp(&self) -> bool { 3365 pub const fn bg(&self) -> bool {
2830 let val = (self.0 >> 16usize) & 0x01; 3366 let val = (self.0 >> 7usize) & 0x01;
2831 val != 0 3367 val != 0
2832 } 3368 }
2833 #[doc = "Private key programmed"] 3369 #[doc = "Break generation"]
2834 pub fn set_pkp(&mut self, val: bool) { 3370 pub fn set_bg(&mut self, val: bool) {
2835 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); 3371 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
2836 } 3372 }
2837 } 3373 }
2838 impl Default for Ur16 { 3374 impl Default for EgrGp {
2839 fn default() -> Ur16 { 3375 fn default() -> EgrGp {
2840 Ur16(0) 3376 EgrGp(0)
2841 } 3377 }
2842 } 3378 }
2843 #[doc = "SYSCFG user register 13"] 3379 #[doc = "capture/compare register 1"]
2844 #[repr(transparent)] 3380 #[repr(transparent)]
2845 #[derive(Copy, Clone, Eq, PartialEq)] 3381 #[derive(Copy, Clone, Eq, PartialEq)]
2846 pub struct Ur13(pub u32); 3382 pub struct Ccr32(pub u32);
2847 impl Ur13 { 3383 impl Ccr32 {
2848 #[doc = "Secured DTCM RAM Size"] 3384 #[doc = "Capture/Compare 1 value"]
2849 pub const fn sdrs(&self) -> u8 { 3385 pub const fn ccr(&self) -> u32 {
2850 let val = (self.0 >> 0usize) & 0x03; 3386 let val = (self.0 >> 0usize) & 0xffff_ffff;
2851 val as u8 3387 val as u32
2852 }
2853 #[doc = "Secured DTCM RAM Size"]
2854 pub fn set_sdrs(&mut self, val: u8) {
2855 self.0 = (self.0 & !(0x03 << 0usize)) | (((val as u32) & 0x03) << 0usize);
2856 }
2857 #[doc = "D1 Standby reset"]
2858 pub const fn d1sbrst(&self) -> bool {
2859 let val = (self.0 >> 16usize) & 0x01;
2860 val != 0
2861 } 3388 }
2862 #[doc = "D1 Standby reset"] 3389 #[doc = "Capture/Compare 1 value"]
2863 pub fn set_d1sbrst(&mut self, val: bool) { 3390 pub fn set_ccr(&mut self, val: u32) {
2864 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); 3391 self.0 =
3392 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
2865 } 3393 }
2866 } 3394 }
2867 impl Default for Ur13 { 3395 impl Default for Ccr32 {
2868 fn default() -> Ur13 { 3396 fn default() -> Ccr32 {
2869 Ur13(0) 3397 Ccr32(0)
2870 } 3398 }
2871 } 3399 }
2872 #[doc = "SYSCFG user register 5"] 3400 #[doc = "control register 2"]
2873 #[repr(transparent)] 3401 #[repr(transparent)]
2874 #[derive(Copy, Clone, Eq, PartialEq)] 3402 #[derive(Copy, Clone, Eq, PartialEq)]
2875 pub struct Ur5(pub u32); 3403 pub struct Cr2Basic(pub u32);
2876 impl Ur5 { 3404 impl Cr2Basic {
2877 #[doc = "Mass erase secured area disabled for bank 1"] 3405 #[doc = "Master mode selection"]
2878 pub const fn mesad_1(&self) -> bool { 3406 pub const fn mms(&self) -> super::vals::Mms {
2879 let val = (self.0 >> 0usize) & 0x01; 3407 let val = (self.0 >> 4usize) & 0x07;
2880 val != 0 3408 super::vals::Mms(val as u8)
2881 }
2882 #[doc = "Mass erase secured area disabled for bank 1"]
2883 pub fn set_mesad_1(&mut self, val: bool) {
2884 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
2885 }
2886 #[doc = "Write protection for flash bank 1"]
2887 pub const fn wrpn_1(&self) -> u8 {
2888 let val = (self.0 >> 16usize) & 0xff;
2889 val as u8
2890 } 3409 }
2891 #[doc = "Write protection for flash bank 1"] 3410 #[doc = "Master mode selection"]
2892 pub fn set_wrpn_1(&mut self, val: u8) { 3411 pub fn set_mms(&mut self, val: super::vals::Mms) {
2893 self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); 3412 self.0 = (self.0 & !(0x07 << 4usize)) | (((val.0 as u32) & 0x07) << 4usize);
2894 } 3413 }
2895 } 3414 }
2896 impl Default for Ur5 { 3415 impl Default for Cr2Basic {
2897 fn default() -> Ur5 { 3416 fn default() -> Cr2Basic {
2898 Ur5(0) 3417 Cr2Basic(0)
2899 } 3418 }
2900 } 3419 }
2901 #[doc = "compensation cell control/status register"] 3420 #[doc = "event generation register"]
2902 #[repr(transparent)] 3421 #[repr(transparent)]
2903 #[derive(Copy, Clone, Eq, PartialEq)] 3422 #[derive(Copy, Clone, Eq, PartialEq)]
2904 pub struct Cccsr(pub u32); 3423 pub struct EgrAdv(pub u32);
2905 impl Cccsr { 3424 impl EgrAdv {
2906 #[doc = "enable"] 3425 #[doc = "Update generation"]
2907 pub const fn en(&self) -> bool { 3426 pub const fn ug(&self) -> bool {
2908 let val = (self.0 >> 0usize) & 0x01; 3427 let val = (self.0 >> 0usize) & 0x01;
2909 val != 0 3428 val != 0
2910 } 3429 }
2911 #[doc = "enable"] 3430 #[doc = "Update generation"]
2912 pub fn set_en(&mut self, val: bool) { 3431 pub fn set_ug(&mut self, val: bool) {
2913 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 3432 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
2914 } 3433 }
2915 #[doc = "Code selection"] 3434 #[doc = "Capture/compare 1 generation"]
2916 pub const fn cs(&self) -> bool { 3435 pub fn ccg(&self, n: usize) -> bool {
2917 let val = (self.0 >> 1usize) & 0x01; 3436 assert!(n < 4usize);
3437 let offs = 1usize + n * 1usize;
3438 let val = (self.0 >> offs) & 0x01;
2918 val != 0 3439 val != 0
2919 } 3440 }
2920 #[doc = "Code selection"] 3441 #[doc = "Capture/compare 1 generation"]
2921 pub fn set_cs(&mut self, val: bool) { 3442 pub fn set_ccg(&mut self, n: usize, val: bool) {
2922 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); 3443 assert!(n < 4usize);
3444 let offs = 1usize + n * 1usize;
3445 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
2923 } 3446 }
2924 #[doc = "Compensation cell ready flag"] 3447 #[doc = "Capture/Compare control update generation"]
2925 pub const fn ready(&self) -> bool { 3448 pub const fn comg(&self) -> bool {
2926 let val = (self.0 >> 8usize) & 0x01; 3449 let val = (self.0 >> 5usize) & 0x01;
2927 val != 0 3450 val != 0
2928 } 3451 }
2929 #[doc = "Compensation cell ready flag"] 3452 #[doc = "Capture/Compare control update generation"]
2930 pub fn set_ready(&mut self, val: bool) { 3453 pub fn set_comg(&mut self, val: bool) {
2931 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); 3454 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
2932 } 3455 }
2933 #[doc = "High-speed at low-voltage"] 3456 #[doc = "Trigger generation"]
2934 pub const fn hslv(&self) -> bool { 3457 pub const fn tg(&self) -> bool {
2935 let val = (self.0 >> 16usize) & 0x01; 3458 let val = (self.0 >> 6usize) & 0x01;
2936 val != 0 3459 val != 0
2937 } 3460 }
2938 #[doc = "High-speed at low-voltage"] 3461 #[doc = "Trigger generation"]
2939 pub fn set_hslv(&mut self, val: bool) { 3462 pub fn set_tg(&mut self, val: bool) {
2940 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); 3463 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
2941 }
2942 }
2943 impl Default for Cccsr {
2944 fn default() -> Cccsr {
2945 Cccsr(0)
2946 } 3464 }
2947 } 3465 #[doc = "Break generation"]
2948 #[doc = "SYSCFG user register 4"] 3466 pub const fn bg(&self) -> bool {
2949 #[repr(transparent)] 3467 let val = (self.0 >> 7usize) & 0x01;
2950 #[derive(Copy, Clone, Eq, PartialEq)]
2951 pub struct Ur4(pub u32);
2952 impl Ur4 {
2953 #[doc = "Mass Erase Protected Area Disabled for bank 1"]
2954 pub const fn mepad_1(&self) -> bool {
2955 let val = (self.0 >> 16usize) & 0x01;
2956 val != 0 3468 val != 0
2957 } 3469 }
2958 #[doc = "Mass Erase Protected Area Disabled for bank 1"] 3470 #[doc = "Break generation"]
2959 pub fn set_mepad_1(&mut self, val: bool) { 3471 pub fn set_bg(&mut self, val: bool) {
2960 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); 3472 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
2961 } 3473 }
2962 } 3474 }
2963 impl Default for Ur4 { 3475 impl Default for EgrAdv {
2964 fn default() -> Ur4 { 3476 fn default() -> EgrAdv {
2965 Ur4(0) 3477 EgrAdv(0)
2966 } 3478 }
2967 } 3479 }
2968 #[doc = "SYSCFG user register 10"] 3480 #[doc = "control register 2"]
2969 #[repr(transparent)] 3481 #[repr(transparent)]
2970 #[derive(Copy, Clone, Eq, PartialEq)] 3482 #[derive(Copy, Clone, Eq, PartialEq)]
2971 pub struct Ur10(pub u32); 3483 pub struct Cr2Gp(pub u32);
2972 impl Ur10 { 3484 impl Cr2Gp {
2973 #[doc = "Protected area end address for bank 2"] 3485 #[doc = "Capture/compare DMA selection"]
2974 pub const fn pa_end_2(&self) -> u16 { 3486 pub const fn ccds(&self) -> super::vals::Ccds {
2975 let val = (self.0 >> 0usize) & 0x0fff; 3487 let val = (self.0 >> 3usize) & 0x01;
2976 val as u16 3488 super::vals::Ccds(val as u8)
2977 } 3489 }
2978 #[doc = "Protected area end address for bank 2"] 3490 #[doc = "Capture/compare DMA selection"]
2979 pub fn set_pa_end_2(&mut self, val: u16) { 3491 pub fn set_ccds(&mut self, val: super::vals::Ccds) {
2980 self.0 = (self.0 & !(0x0fff << 0usize)) | (((val as u32) & 0x0fff) << 0usize); 3492 self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize);
2981 } 3493 }
2982 #[doc = "Secured area start address for bank 2"] 3494 #[doc = "Master mode selection"]
2983 pub const fn sa_beg_2(&self) -> u16 { 3495 pub const fn mms(&self) -> super::vals::Mms {
2984 let val = (self.0 >> 16usize) & 0x0fff; 3496 let val = (self.0 >> 4usize) & 0x07;
2985 val as u16 3497 super::vals::Mms(val as u8)
2986 } 3498 }
2987 #[doc = "Secured area start address for bank 2"] 3499 #[doc = "Master mode selection"]
2988 pub fn set_sa_beg_2(&mut self, val: u16) { 3500 pub fn set_mms(&mut self, val: super::vals::Mms) {
2989 self.0 = (self.0 & !(0x0fff << 16usize)) | (((val as u32) & 0x0fff) << 16usize); 3501 self.0 = (self.0 & !(0x07 << 4usize)) | (((val.0 as u32) & 0x07) << 4usize);
3502 }
3503 #[doc = "TI1 selection"]
3504 pub const fn ti1s(&self) -> super::vals::Tis {
3505 let val = (self.0 >> 7usize) & 0x01;
3506 super::vals::Tis(val as u8)
3507 }
3508 #[doc = "TI1 selection"]
3509 pub fn set_ti1s(&mut self, val: super::vals::Tis) {
3510 self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize);
2990 } 3511 }
2991 } 3512 }
2992 impl Default for Ur10 { 3513 impl Default for Cr2Gp {
2993 fn default() -> Ur10 { 3514 fn default() -> Cr2Gp {
2994 Ur10(0) 3515 Cr2Gp(0)
2995 } 3516 }
2996 } 3517 }
2997 #[doc = "SYSCFG user register 15"] 3518 }
3519 pub mod vals {
3520 use crate::generic::*;
2998 #[repr(transparent)] 3521 #[repr(transparent)]
2999 #[derive(Copy, Clone, Eq, PartialEq)] 3522 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3000 pub struct Ur15(pub u32); 3523 pub struct Opm(pub u8);
3001 impl Ur15 { 3524 impl Opm {
3002 #[doc = "Freeze independent watchdog in Standby mode"] 3525 #[doc = "Counter is not stopped at update event"]
3003 pub const fn fziwdgstb(&self) -> bool { 3526 pub const DISABLED: Self = Self(0);
3004 let val = (self.0 >> 16usize) & 0x01; 3527 #[doc = "Counter stops counting at the next update event (clearing the CEN bit)"]
3005 val != 0 3528 pub const ENABLED: Self = Self(0x01);
3006 }
3007 #[doc = "Freeze independent watchdog in Standby mode"]
3008 pub fn set_fziwdgstb(&mut self, val: bool) {
3009 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
3010 }
3011 } 3529 }
3012 impl Default for Ur15 { 3530 #[repr(transparent)]
3013 fn default() -> Ur15 { 3531 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3014 Ur15(0) 3532 pub struct Tis(pub u8);
3015 } 3533 impl Tis {
3534 #[doc = "The TIMx_CH1 pin is connected to TI1 input"]
3535 pub const NORMAL: Self = Self(0);
3536 #[doc = "The TIMx_CH1, CH2, CH3 pins are connected to TI1 input"]
3537 pub const XOR: Self = Self(0x01);
3538 }
3539 #[repr(transparent)]
3540 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3541 pub struct Msm(pub u8);
3542 impl Msm {
3543 #[doc = "No action"]
3544 pub const NOSYNC: Self = Self(0);
3545 #[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."]
3546 pub const SYNC: Self = Self(0x01);
3547 }
3548 #[repr(transparent)]
3549 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3550 pub struct Urs(pub u8);
3551 impl Urs {
3552 #[doc = "Any of counter overflow/underflow, setting UG, or update through slave mode, generates an update interrupt or DMA request"]
3553 pub const ANYEVENT: Self = Self(0);
3554 #[doc = "Only counter overflow/underflow generates an update interrupt or DMA request"]
3555 pub const COUNTERONLY: Self = Self(0x01);
3556 }
3557 #[repr(transparent)]
3558 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3559 pub struct Ocm(pub u8);
3560 impl Ocm {
3561 #[doc = "The comparison between the output compare register TIMx_CCRy and the counter TIMx_CNT has no effect on the outputs"]
3562 pub const FROZEN: Self = Self(0);
3563 #[doc = "Set channel to active level on match. OCyREF signal is forced high when the counter matches the capture/compare register"]
3564 pub const ACTIVEONMATCH: Self = Self(0x01);
3565 #[doc = "Set channel to inactive level on match. OCyREF signal is forced low when the counter matches the capture/compare register"]
3566 pub const INACTIVEONMATCH: Self = Self(0x02);
3567 #[doc = "OCyREF toggles when TIMx_CNT=TIMx_CCRy"]
3568 pub const TOGGLE: Self = Self(0x03);
3569 #[doc = "OCyREF is forced low"]
3570 pub const FORCEINACTIVE: Self = Self(0x04);
3571 #[doc = "OCyREF is forced high"]
3572 pub const FORCEACTIVE: Self = Self(0x05);
3573 #[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"]
3574 pub const PWMMODE1: Self = Self(0x06);
3575 #[doc = "Inversely to PwmMode1"]
3576 pub const PWMMODE2: Self = Self(0x07);
3577 }
3578 #[repr(transparent)]
3579 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3580 pub struct Arpe(pub u8);
3581 impl Arpe {
3582 #[doc = "TIMx_APRR register is not buffered"]
3583 pub const DISABLED: Self = Self(0);
3584 #[doc = "TIMx_APRR register is buffered"]
3585 pub const ENABLED: Self = Self(0x01);
3586 }
3587 #[repr(transparent)]
3588 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3589 pub struct Ossi(pub u8);
3590 impl Ossi {
3591 #[doc = "When inactive, OC/OCN outputs are disabled"]
3592 pub const DISABLED: Self = Self(0);
3593 #[doc = "When inactive, OC/OCN outputs are forced to idle level"]
3594 pub const IDLELEVEL: Self = Self(0x01);
3595 }
3596 #[repr(transparent)]
3597 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3598 pub struct Ts(pub u8);
3599 impl Ts {
3600 #[doc = "Internal Trigger 0 (ITR0)"]
3601 pub const ITR0: Self = Self(0);
3602 #[doc = "Internal Trigger 1 (ITR1)"]
3603 pub const ITR1: Self = Self(0x01);
3604 #[doc = "Internal Trigger 2 (ITR2)"]
3605 pub const ITR2: Self = Self(0x02);
3606 #[doc = "TI1 Edge Detector (TI1F_ED)"]
3607 pub const TI1F_ED: Self = Self(0x04);
3608 #[doc = "Filtered Timer Input 1 (TI1FP1)"]
3609 pub const TI1FP1: Self = Self(0x05);
3610 #[doc = "Filtered Timer Input 2 (TI2FP2)"]
3611 pub const TI2FP2: Self = Self(0x06);
3612 #[doc = "External Trigger input (ETRF)"]
3613 pub const ETRF: Self = Self(0x07);
3614 }
3615 #[repr(transparent)]
3616 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3617 pub struct Dir(pub u8);
3618 impl Dir {
3619 #[doc = "Counter used as upcounter"]
3620 pub const UP: Self = Self(0);
3621 #[doc = "Counter used as downcounter"]
3622 pub const DOWN: Self = Self(0x01);
3623 }
3624 #[repr(transparent)]
3625 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3626 pub struct Mms(pub u8);
3627 impl Mms {
3628 #[doc = "The UG bit from the TIMx_EGR register is used as trigger output"]
3629 pub const RESET: Self = Self(0);
3630 #[doc = "The counter enable signal, CNT_EN, is used as trigger output"]
3631 pub const ENABLE: Self = Self(0x01);
3632 #[doc = "The update event is selected as trigger output"]
3633 pub const UPDATE: Self = Self(0x02);
3634 #[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"]
3635 pub const COMPAREPULSE: Self = Self(0x03);
3636 #[doc = "OC1REF signal is used as trigger output"]
3637 pub const COMPAREOC1: Self = Self(0x04);
3638 #[doc = "OC2REF signal is used as trigger output"]
3639 pub const COMPAREOC2: Self = Self(0x05);
3640 #[doc = "OC3REF signal is used as trigger output"]
3641 pub const COMPAREOC3: Self = Self(0x06);
3642 #[doc = "OC4REF signal is used as trigger output"]
3643 pub const COMPAREOC4: Self = Self(0x07);
3644 }
3645 #[repr(transparent)]
3646 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3647 pub struct Sms(pub u8);
3648 impl Sms {
3649 #[doc = "Slave mode disabled - if CEN = ‘1 then the prescaler is clocked directly by the internal clock."]
3650 pub const DISABLED: Self = Self(0);
3651 #[doc = "Encoder mode 1 - Counter counts up/down on TI2FP1 edge depending on TI1FP2 level."]
3652 pub const ENCODER_MODE_1: Self = Self(0x01);
3653 #[doc = "Encoder mode 2 - Counter counts up/down on TI1FP2 edge depending on TI2FP1 level."]
3654 pub const ENCODER_MODE_2: Self = Self(0x02);
3655 #[doc = "Encoder mode 3 - Counter counts up/down on both TI1FP1 and TI2FP2 edges depending on the level of the other input."]
3656 pub const ENCODER_MODE_3: Self = Self(0x03);
3657 #[doc = "Reset Mode - Rising edge of the selected trigger input (TRGI) reinitializes the counter and generates an update of the registers."]
3658 pub const RESET_MODE: Self = Self(0x04);
3659 #[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."]
3660 pub const GATED_MODE: Self = Self(0x05);
3661 #[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."]
3662 pub const TRIGGER_MODE: Self = Self(0x06);
3663 #[doc = "External Clock Mode 1 - Rising edges of the selected trigger (TRGI) clock the counter."]
3664 pub const EXT_CLOCK_MODE: Self = Self(0x07);
3016 } 3665 }
3017 #[doc = "SYSCFG user register 3"] 3666 #[repr(transparent)]
3667 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3668 pub struct Ckd(pub u8);
3669 impl Ckd {
3670 #[doc = "t_DTS = t_CK_INT"]
3671 pub const DIV1: Self = Self(0);
3672 #[doc = "t_DTS = 2 × t_CK_INT"]
3673 pub const DIV2: Self = Self(0x01);
3674 #[doc = "t_DTS = 4 × t_CK_INT"]
3675 pub const DIV4: Self = Self(0x02);
3676 }
3677 #[repr(transparent)]
3678 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3679 pub struct Ece(pub u8);
3680 impl Ece {
3681 #[doc = "External clock mode 2 disabled"]
3682 pub const DISABLED: Self = Self(0);
3683 #[doc = "External clock mode 2 enabled. The counter is clocked by any active edge on the ETRF signal."]
3684 pub const ENABLED: Self = Self(0x01);
3685 }
3686 #[repr(transparent)]
3687 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3688 pub struct CcmrOutputCcs(pub u8);
3689 impl CcmrOutputCcs {
3690 #[doc = "CCx channel is configured as output"]
3691 pub const OUTPUT: Self = Self(0);
3692 }
3693 #[repr(transparent)]
3694 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3695 pub struct Etf(pub u8);
3696 impl Etf {
3697 #[doc = "No filter, sampling is done at fDTS"]
3698 pub const NOFILTER: Self = Self(0);
3699 #[doc = "fSAMPLING=fCK_INT, N=2"]
3700 pub const FCK_INT_N2: Self = Self(0x01);
3701 #[doc = "fSAMPLING=fCK_INT, N=4"]
3702 pub const FCK_INT_N4: Self = Self(0x02);
3703 #[doc = "fSAMPLING=fCK_INT, N=8"]
3704 pub const FCK_INT_N8: Self = Self(0x03);
3705 #[doc = "fSAMPLING=fDTS/2, N=6"]
3706 pub const FDTS_DIV2_N6: Self = Self(0x04);
3707 #[doc = "fSAMPLING=fDTS/2, N=8"]
3708 pub const FDTS_DIV2_N8: Self = Self(0x05);
3709 #[doc = "fSAMPLING=fDTS/4, N=6"]
3710 pub const FDTS_DIV4_N6: Self = Self(0x06);
3711 #[doc = "fSAMPLING=fDTS/4, N=8"]
3712 pub const FDTS_DIV4_N8: Self = Self(0x07);
3713 #[doc = "fSAMPLING=fDTS/8, N=6"]
3714 pub const FDTS_DIV8_N6: Self = Self(0x08);
3715 #[doc = "fSAMPLING=fDTS/8, N=8"]
3716 pub const FDTS_DIV8_N8: Self = Self(0x09);
3717 #[doc = "fSAMPLING=fDTS/16, N=5"]
3718 pub const FDTS_DIV16_N5: Self = Self(0x0a);
3719 #[doc = "fSAMPLING=fDTS/16, N=6"]
3720 pub const FDTS_DIV16_N6: Self = Self(0x0b);
3721 #[doc = "fSAMPLING=fDTS/16, N=8"]
3722 pub const FDTS_DIV16_N8: Self = Self(0x0c);
3723 #[doc = "fSAMPLING=fDTS/32, N=5"]
3724 pub const FDTS_DIV32_N5: Self = Self(0x0d);
3725 #[doc = "fSAMPLING=fDTS/32, N=6"]
3726 pub const FDTS_DIV32_N6: Self = Self(0x0e);
3727 #[doc = "fSAMPLING=fDTS/32, N=8"]
3728 pub const FDTS_DIV32_N8: Self = Self(0x0f);
3729 }
3730 #[repr(transparent)]
3731 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3732 pub struct Etp(pub u8);
3733 impl Etp {
3734 #[doc = "ETR is noninverted, active at high level or rising edge"]
3735 pub const NOTINVERTED: Self = Self(0);
3736 #[doc = "ETR is inverted, active at low level or falling edge"]
3737 pub const INVERTED: Self = Self(0x01);
3738 }
3739 #[repr(transparent)]
3740 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3741 pub struct Icf(pub u8);
3742 impl Icf {
3743 #[doc = "No filter, sampling is done at fDTS"]
3744 pub const NOFILTER: Self = Self(0);
3745 #[doc = "fSAMPLING=fCK_INT, N=2"]
3746 pub const FCK_INT_N2: Self = Self(0x01);
3747 #[doc = "fSAMPLING=fCK_INT, N=4"]
3748 pub const FCK_INT_N4: Self = Self(0x02);
3749 #[doc = "fSAMPLING=fCK_INT, N=8"]
3750 pub const FCK_INT_N8: Self = Self(0x03);
3751 #[doc = "fSAMPLING=fDTS/2, N=6"]
3752 pub const FDTS_DIV2_N6: Self = Self(0x04);
3753 #[doc = "fSAMPLING=fDTS/2, N=8"]
3754 pub const FDTS_DIV2_N8: Self = Self(0x05);
3755 #[doc = "fSAMPLING=fDTS/4, N=6"]
3756 pub const FDTS_DIV4_N6: Self = Self(0x06);
3757 #[doc = "fSAMPLING=fDTS/4, N=8"]
3758 pub const FDTS_DIV4_N8: Self = Self(0x07);
3759 #[doc = "fSAMPLING=fDTS/8, N=6"]
3760 pub const FDTS_DIV8_N6: Self = Self(0x08);
3761 #[doc = "fSAMPLING=fDTS/8, N=8"]
3762 pub const FDTS_DIV8_N8: Self = Self(0x09);
3763 #[doc = "fSAMPLING=fDTS/16, N=5"]
3764 pub const FDTS_DIV16_N5: Self = Self(0x0a);
3765 #[doc = "fSAMPLING=fDTS/16, N=6"]
3766 pub const FDTS_DIV16_N6: Self = Self(0x0b);
3767 #[doc = "fSAMPLING=fDTS/16, N=8"]
3768 pub const FDTS_DIV16_N8: Self = Self(0x0c);
3769 #[doc = "fSAMPLING=fDTS/32, N=5"]
3770 pub const FDTS_DIV32_N5: Self = Self(0x0d);
3771 #[doc = "fSAMPLING=fDTS/32, N=6"]
3772 pub const FDTS_DIV32_N6: Self = Self(0x0e);
3773 #[doc = "fSAMPLING=fDTS/32, N=8"]
3774 pub const FDTS_DIV32_N8: Self = Self(0x0f);
3775 }
3776 #[repr(transparent)]
3777 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3778 pub struct CcmrInputCcs(pub u8);
3779 impl CcmrInputCcs {
3780 #[doc = "CCx channel is configured as input, normal mapping: ICx mapped to TIx"]
3781 pub const TI4: Self = Self(0x01);
3782 #[doc = "CCx channel is configured as input, alternate mapping (switches 1 with 2, 3 with 4)"]
3783 pub const TI3: Self = Self(0x02);
3784 #[doc = "CCx channel is configured as input, ICx is mapped on TRC"]
3785 pub const TRC: Self = Self(0x03);
3786 }
3787 #[repr(transparent)]
3788 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3789 pub struct Ocpe(pub u8);
3790 impl Ocpe {
3791 #[doc = "Preload register on CCR2 disabled. New values written to CCR2 are taken into account immediately"]
3792 pub const DISABLED: Self = Self(0);
3793 #[doc = "Preload register on CCR2 enabled. Preload value is loaded into active register on each update event"]
3794 pub const ENABLED: Self = Self(0x01);
3795 }
3796 #[repr(transparent)]
3797 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3798 pub struct Ccds(pub u8);
3799 impl Ccds {
3800 #[doc = "CCx DMA request sent when CCx event occurs"]
3801 pub const ONCOMPARE: Self = Self(0);
3802 #[doc = "CCx DMA request sent when update event occurs"]
3803 pub const ONUPDATE: Self = Self(0x01);
3804 }
3805 #[repr(transparent)]
3806 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3807 pub struct Ossr(pub u8);
3808 impl Ossr {
3809 #[doc = "When inactive, OC/OCN outputs are disabled"]
3810 pub const DISABLED: Self = Self(0);
3811 #[doc = "When inactive, OC/OCN outputs are enabled with their inactive level"]
3812 pub const IDLELEVEL: Self = Self(0x01);
3813 }
3814 #[repr(transparent)]
3815 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3816 pub struct Cms(pub u8);
3817 impl Cms {
3818 #[doc = "The counter counts up or down depending on the direction bit"]
3819 pub const EDGEALIGNED: Self = Self(0);
3820 #[doc = "The counter counts up and down alternatively. Output compare interrupt flags are set only when the counter is counting down."]
3821 pub const CENTERALIGNED1: Self = Self(0x01);
3822 #[doc = "The counter counts up and down alternatively. Output compare interrupt flags are set only when the counter is counting up."]
3823 pub const CENTERALIGNED2: Self = Self(0x02);
3824 #[doc = "The counter counts up and down alternatively. Output compare interrupt flags are set both when the counter is counting up or down."]
3825 pub const CENTERALIGNED3: Self = Self(0x03);
3826 }
3827 #[repr(transparent)]
3828 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3829 pub struct Etps(pub u8);
3830 impl Etps {
3831 #[doc = "Prescaler OFF"]
3832 pub const DIV1: Self = Self(0);
3833 #[doc = "ETRP frequency divided by 2"]
3834 pub const DIV2: Self = Self(0x01);
3835 #[doc = "ETRP frequency divided by 4"]
3836 pub const DIV4: Self = Self(0x02);
3837 #[doc = "ETRP frequency divided by 8"]
3838 pub const DIV8: Self = Self(0x03);
3839 }
3840 }
3841}
3842pub mod gpio_v2 {
3843 use crate::generic::*;
3844 #[doc = "General-purpose I/Os"]
3845 #[derive(Copy, Clone)]
3846 pub struct Gpio(pub *mut u8);
3847 unsafe impl Send for Gpio {}
3848 unsafe impl Sync for Gpio {}
3849 impl Gpio {
3850 #[doc = "GPIO port mode register"]
3851 pub fn moder(self) -> Reg<regs::Moder, RW> {
3852 unsafe { Reg::from_ptr(self.0.add(0usize)) }
3853 }
3854 #[doc = "GPIO port output type register"]
3855 pub fn otyper(self) -> Reg<regs::Otyper, RW> {
3856 unsafe { Reg::from_ptr(self.0.add(4usize)) }
3857 }
3858 #[doc = "GPIO port output speed register"]
3859 pub fn ospeedr(self) -> Reg<regs::Ospeedr, RW> {
3860 unsafe { Reg::from_ptr(self.0.add(8usize)) }
3861 }
3862 #[doc = "GPIO port pull-up/pull-down register"]
3863 pub fn pupdr(self) -> Reg<regs::Pupdr, RW> {
3864 unsafe { Reg::from_ptr(self.0.add(12usize)) }
3865 }
3866 #[doc = "GPIO port input data register"]
3867 pub fn idr(self) -> Reg<regs::Idr, R> {
3868 unsafe { Reg::from_ptr(self.0.add(16usize)) }
3869 }
3870 #[doc = "GPIO port output data register"]
3871 pub fn odr(self) -> Reg<regs::Odr, RW> {
3872 unsafe { Reg::from_ptr(self.0.add(20usize)) }
3873 }
3874 #[doc = "GPIO port bit set/reset register"]
3875 pub fn bsrr(self) -> Reg<regs::Bsrr, W> {
3876 unsafe { Reg::from_ptr(self.0.add(24usize)) }
3877 }
3878 #[doc = "GPIO port configuration lock register"]
3879 pub fn lckr(self) -> Reg<regs::Lckr, RW> {
3880 unsafe { Reg::from_ptr(self.0.add(28usize)) }
3881 }
3882 #[doc = "GPIO alternate function register (low, high)"]
3883 pub fn afr(self, n: usize) -> Reg<regs::Afr, RW> {
3884 assert!(n < 2usize);
3885 unsafe { Reg::from_ptr(self.0.add(32usize + n * 4usize)) }
3886 }
3887 }
3888 pub mod regs {
3889 use crate::generic::*;
3890 #[doc = "GPIO port input data register"]
3018 #[repr(transparent)] 3891 #[repr(transparent)]
3019 #[derive(Copy, Clone, Eq, PartialEq)] 3892 #[derive(Copy, Clone, Eq, PartialEq)]
3020 pub struct Ur3(pub u32); 3893 pub struct Idr(pub u32);
3021 impl Ur3 { 3894 impl Idr {
3022 #[doc = "Boot Address 1"] 3895 #[doc = "Port input data (y = 0..15)"]
3023 pub const fn boot_add1(&self) -> u16 { 3896 pub fn idr(&self, n: usize) -> super::vals::Idr {
3024 let val = (self.0 >> 16usize) & 0xffff; 3897 assert!(n < 16usize);
3025 val as u16 3898 let offs = 0usize + n * 1usize;
3899 let val = (self.0 >> offs) & 0x01;
3900 super::vals::Idr(val as u8)
3026 } 3901 }
3027 #[doc = "Boot Address 1"] 3902 #[doc = "Port input data (y = 0..15)"]
3028 pub fn set_boot_add1(&mut self, val: u16) { 3903 pub fn set_idr(&mut self, n: usize, val: super::vals::Idr) {
3029 self.0 = (self.0 & !(0xffff << 16usize)) | (((val as u32) & 0xffff) << 16usize); 3904 assert!(n < 16usize);
3905 let offs = 0usize + n * 1usize;
3906 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs);
3030 } 3907 }
3031 } 3908 }
3032 impl Default for Ur3 { 3909 impl Default for Idr {
3033 fn default() -> Ur3 { 3910 fn default() -> Idr {
3034 Ur3(0) 3911 Idr(0)
3035 } 3912 }
3036 } 3913 }
3037 #[doc = "SYSCFG package register"] 3914 #[doc = "GPIO port pull-up/pull-down register"]
3038 #[repr(transparent)] 3915 #[repr(transparent)]
3039 #[derive(Copy, Clone, Eq, PartialEq)] 3916 #[derive(Copy, Clone, Eq, PartialEq)]
3040 pub struct Pkgr(pub u32); 3917 pub struct Pupdr(pub u32);
3041 impl Pkgr { 3918 impl Pupdr {
3042 #[doc = "Package"] 3919 #[doc = "Port x configuration bits (y = 0..15)"]
3043 pub const fn pkg(&self) -> u8 { 3920 pub fn pupdr(&self, n: usize) -> super::vals::Pupdr {
3044 let val = (self.0 >> 0usize) & 0x0f; 3921 assert!(n < 16usize);
3045 val as u8 3922 let offs = 0usize + n * 2usize;
3923 let val = (self.0 >> offs) & 0x03;
3924 super::vals::Pupdr(val as u8)
3046 } 3925 }
3047 #[doc = "Package"] 3926 #[doc = "Port x configuration bits (y = 0..15)"]
3048 pub fn set_pkg(&mut self, val: u8) { 3927 pub fn set_pupdr(&mut self, n: usize, val: super::vals::Pupdr) {
3049 self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); 3928 assert!(n < 16usize);
3929 let offs = 0usize + n * 2usize;
3930 self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs);
3050 } 3931 }
3051 } 3932 }
3052 impl Default for Pkgr { 3933 impl Default for Pupdr {
3053 fn default() -> Pkgr { 3934 fn default() -> Pupdr {
3054 Pkgr(0) 3935 Pupdr(0)
3055 } 3936 }
3056 } 3937 }
3057 #[doc = "SYSCFG user register 6"] 3938 #[doc = "GPIO port output type register"]
3058 #[repr(transparent)] 3939 #[repr(transparent)]
3059 #[derive(Copy, Clone, Eq, PartialEq)] 3940 #[derive(Copy, Clone, Eq, PartialEq)]
3060 pub struct Ur6(pub u32); 3941 pub struct Otyper(pub u32);
3061 impl Ur6 { 3942 impl Otyper {
3062 #[doc = "Protected area start address for bank 1"] 3943 #[doc = "Port x configuration bits (y = 0..15)"]
3063 pub const fn pa_beg_1(&self) -> u16 { 3944 pub fn ot(&self, n: usize) -> super::vals::Ot {
3064 let val = (self.0 >> 0usize) & 0x0fff; 3945 assert!(n < 16usize);
3065 val as u16 3946 let offs = 0usize + n * 1usize;
3066 } 3947 let val = (self.0 >> offs) & 0x01;
3067 #[doc = "Protected area start address for bank 1"] 3948 super::vals::Ot(val as u8)
3068 pub fn set_pa_beg_1(&mut self, val: u16) {
3069 self.0 = (self.0 & !(0x0fff << 0usize)) | (((val as u32) & 0x0fff) << 0usize);
3070 }
3071 #[doc = "Protected area end address for bank 1"]
3072 pub const fn pa_end_1(&self) -> u16 {
3073 let val = (self.0 >> 16usize) & 0x0fff;
3074 val as u16
3075 } 3949 }
3076 #[doc = "Protected area end address for bank 1"] 3950 #[doc = "Port x configuration bits (y = 0..15)"]
3077 pub fn set_pa_end_1(&mut self, val: u16) { 3951 pub fn set_ot(&mut self, n: usize, val: super::vals::Ot) {
3078 self.0 = (self.0 & !(0x0fff << 16usize)) | (((val as u32) & 0x0fff) << 16usize); 3952 assert!(n < 16usize);
3953 let offs = 0usize + n * 1usize;
3954 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs);
3079 } 3955 }
3080 } 3956 }
3081 impl Default for Ur6 { 3957 impl Default for Otyper {
3082 fn default() -> Ur6 { 3958 fn default() -> Otyper {
3083 Ur6(0) 3959 Otyper(0)
3084 } 3960 }
3085 } 3961 }
3086 #[doc = "external interrupt configuration register 2"] 3962 #[doc = "GPIO alternate function register"]
3087 #[repr(transparent)] 3963 #[repr(transparent)]
3088 #[derive(Copy, Clone, Eq, PartialEq)] 3964 #[derive(Copy, Clone, Eq, PartialEq)]
3089 pub struct Exticr(pub u32); 3965 pub struct Afr(pub u32);
3090 impl Exticr { 3966 impl Afr {
3091 #[doc = "EXTI x configuration (x = 4 to 7)"] 3967 #[doc = "Alternate function selection for port x bit y (y = 0..15)"]
3092 pub fn exti(&self, n: usize) -> u8 { 3968 pub fn afr(&self, n: usize) -> super::vals::Afr {
3093 assert!(n < 4usize); 3969 assert!(n < 8usize);
3094 let offs = 0usize + n * 4usize; 3970 let offs = 0usize + n * 4usize;
3095 let val = (self.0 >> offs) & 0x0f; 3971 let val = (self.0 >> offs) & 0x0f;
3096 val as u8 3972 super::vals::Afr(val as u8)
3097 } 3973 }
3098 #[doc = "EXTI x configuration (x = 4 to 7)"] 3974 #[doc = "Alternate function selection for port x bit y (y = 0..15)"]
3099 pub fn set_exti(&mut self, n: usize, val: u8) { 3975 pub fn set_afr(&mut self, n: usize, val: super::vals::Afr) {
3100 assert!(n < 4usize); 3976 assert!(n < 8usize);
3101 let offs = 0usize + n * 4usize; 3977 let offs = 0usize + n * 4usize;
3102 self.0 = (self.0 & !(0x0f << offs)) | (((val as u32) & 0x0f) << offs); 3978 self.0 = (self.0 & !(0x0f << offs)) | (((val.0 as u32) & 0x0f) << offs);
3103 } 3979 }
3104 } 3980 }
3105 impl Default for Exticr { 3981 impl Default for Afr {
3106 fn default() -> Exticr { 3982 fn default() -> Afr {
3107 Exticr(0) 3983 Afr(0)
3108 } 3984 }
3109 } 3985 }
3110 #[doc = "SYSCFG compensation cell value register"] 3986 #[doc = "GPIO port configuration lock register"]
3111 #[repr(transparent)] 3987 #[repr(transparent)]
3112 #[derive(Copy, Clone, Eq, PartialEq)] 3988 #[derive(Copy, Clone, Eq, PartialEq)]
3113 pub struct Ccvr(pub u32); 3989 pub struct Lckr(pub u32);
3114 impl Ccvr { 3990 impl Lckr {
3115 #[doc = "NMOS compensation value"] 3991 #[doc = "Port x lock bit y (y= 0..15)"]
3116 pub const fn ncv(&self) -> u8 { 3992 pub fn lck(&self, n: usize) -> super::vals::Lck {
3117 let val = (self.0 >> 0usize) & 0x0f; 3993 assert!(n < 16usize);
3118 val as u8 3994 let offs = 0usize + n * 1usize;
3995 let val = (self.0 >> offs) & 0x01;
3996 super::vals::Lck(val as u8)
3119 } 3997 }
3120 #[doc = "NMOS compensation value"] 3998 #[doc = "Port x lock bit y (y= 0..15)"]
3121 pub fn set_ncv(&mut self, val: u8) { 3999 pub fn set_lck(&mut self, n: usize, val: super::vals::Lck) {
3122 self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); 4000 assert!(n < 16usize);
4001 let offs = 0usize + n * 1usize;
4002 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs);
3123 } 4003 }
3124 #[doc = "PMOS compensation value"] 4004 #[doc = "Port x lock bit y (y= 0..15)"]
3125 pub const fn pcv(&self) -> u8 { 4005 pub const fn lckk(&self) -> super::vals::Lckk {
3126 let val = (self.0 >> 4usize) & 0x0f; 4006 let val = (self.0 >> 16usize) & 0x01;
3127 val as u8 4007 super::vals::Lckk(val as u8)
3128 } 4008 }
3129 #[doc = "PMOS compensation value"] 4009 #[doc = "Port x lock bit y (y= 0..15)"]
3130 pub fn set_pcv(&mut self, val: u8) { 4010 pub fn set_lckk(&mut self, val: super::vals::Lckk) {
3131 self.0 = (self.0 & !(0x0f << 4usize)) | (((val as u32) & 0x0f) << 4usize); 4011 self.0 = (self.0 & !(0x01 << 16usize)) | (((val.0 as u32) & 0x01) << 16usize);
3132 } 4012 }
3133 } 4013 }
3134 impl Default for Ccvr { 4014 impl Default for Lckr {
3135 fn default() -> Ccvr { 4015 fn default() -> Lckr {
3136 Ccvr(0) 4016 Lckr(0)
3137 } 4017 }
3138 } 4018 }
3139 #[doc = "peripheral mode configuration register"] 4019 #[doc = "GPIO port bit set/reset register"]
3140 #[repr(transparent)] 4020 #[repr(transparent)]
3141 #[derive(Copy, Clone, Eq, PartialEq)] 4021 #[derive(Copy, Clone, Eq, PartialEq)]
3142 pub struct Pmcr(pub u32); 4022 pub struct Bsrr(pub u32);
3143 impl Pmcr { 4023 impl Bsrr {
3144 #[doc = "I2C1 Fm+"] 4024 #[doc = "Port x set bit y (y= 0..15)"]
3145 pub const fn i2c1fmp(&self) -> bool { 4025 pub fn bs(&self, n: usize) -> bool {
3146 let val = (self.0 >> 0usize) & 0x01; 4026 assert!(n < 16usize);
3147 val != 0 4027 let offs = 0usize + n * 1usize;
3148 } 4028 let val = (self.0 >> offs) & 0x01;
3149 #[doc = "I2C1 Fm+"]
3150 pub fn set_i2c1fmp(&mut self, val: bool) {
3151 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
3152 }
3153 #[doc = "I2C2 Fm+"]
3154 pub const fn i2c2fmp(&self) -> bool {
3155 let val = (self.0 >> 1usize) & 0x01;
3156 val != 0
3157 }
3158 #[doc = "I2C2 Fm+"]
3159 pub fn set_i2c2fmp(&mut self, val: bool) {
3160 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
3161 }
3162 #[doc = "I2C3 Fm+"]
3163 pub const fn i2c3fmp(&self) -> bool {
3164 let val = (self.0 >> 2usize) & 0x01;
3165 val != 0
3166 }
3167 #[doc = "I2C3 Fm+"]
3168 pub fn set_i2c3fmp(&mut self, val: bool) {
3169 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
3170 }
3171 #[doc = "I2C4 Fm+"]
3172 pub const fn i2c4fmp(&self) -> bool {
3173 let val = (self.0 >> 3usize) & 0x01;
3174 val != 0
3175 }
3176 #[doc = "I2C4 Fm+"]
3177 pub fn set_i2c4fmp(&mut self, val: bool) {
3178 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
3179 }
3180 #[doc = "PB(6) Fm+"]
3181 pub const fn pb6fmp(&self) -> bool {
3182 let val = (self.0 >> 4usize) & 0x01;
3183 val != 0
3184 }
3185 #[doc = "PB(6) Fm+"]
3186 pub fn set_pb6fmp(&mut self, val: bool) {
3187 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
3188 }
3189 #[doc = "PB(7) Fast Mode Plus"]
3190 pub const fn pb7fmp(&self) -> bool {
3191 let val = (self.0 >> 5usize) & 0x01;
3192 val != 0
3193 }
3194 #[doc = "PB(7) Fast Mode Plus"]
3195 pub fn set_pb7fmp(&mut self, val: bool) {
3196 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
3197 }
3198 #[doc = "PB(8) Fast Mode Plus"]
3199 pub const fn pb8fmp(&self) -> bool {
3200 let val = (self.0 >> 6usize) & 0x01;
3201 val != 0
3202 }
3203 #[doc = "PB(8) Fast Mode Plus"]
3204 pub fn set_pb8fmp(&mut self, val: bool) {
3205 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
3206 }
3207 #[doc = "PB(9) Fm+"]
3208 pub const fn pb9fmp(&self) -> bool {
3209 let val = (self.0 >> 7usize) & 0x01;
3210 val != 0
3211 }
3212 #[doc = "PB(9) Fm+"]
3213 pub fn set_pb9fmp(&mut self, val: bool) {
3214 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
3215 }
3216 #[doc = "Booster Enable"]
3217 pub const fn booste(&self) -> bool {
3218 let val = (self.0 >> 8usize) & 0x01;
3219 val != 0
3220 }
3221 #[doc = "Booster Enable"]
3222 pub fn set_booste(&mut self, val: bool) {
3223 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
3224 }
3225 #[doc = "Analog switch supply voltage selection"]
3226 pub const fn boostvddsel(&self) -> bool {
3227 let val = (self.0 >> 9usize) & 0x01;
3228 val != 0 4029 val != 0
3229 } 4030 }
3230 #[doc = "Analog switch supply voltage selection"] 4031 #[doc = "Port x set bit y (y= 0..15)"]
3231 pub fn set_boostvddsel(&mut self, val: bool) { 4032 pub fn set_bs(&mut self, n: usize, val: bool) {
3232 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); 4033 assert!(n < 16usize);
3233 } 4034 let offs = 0usize + n * 1usize;
3234 #[doc = "Ethernet PHY Interface Selection"] 4035 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
3235 pub const fn epis(&self) -> u8 {
3236 let val = (self.0 >> 21usize) & 0x07;
3237 val as u8
3238 }
3239 #[doc = "Ethernet PHY Interface Selection"]
3240 pub fn set_epis(&mut self, val: u8) {
3241 self.0 = (self.0 & !(0x07 << 21usize)) | (((val as u32) & 0x07) << 21usize);
3242 } 4036 }
3243 #[doc = "PA0 Switch Open"] 4037 #[doc = "Port x set bit y (y= 0..15)"]
3244 pub const fn pa0so(&self) -> bool { 4038 pub fn br(&self, n: usize) -> bool {
3245 let val = (self.0 >> 24usize) & 0x01; 4039 assert!(n < 16usize);
4040 let offs = 16usize + n * 1usize;
4041 let val = (self.0 >> offs) & 0x01;
3246 val != 0 4042 val != 0
3247 } 4043 }
3248 #[doc = "PA0 Switch Open"] 4044 #[doc = "Port x set bit y (y= 0..15)"]
3249 pub fn set_pa0so(&mut self, val: bool) { 4045 pub fn set_br(&mut self, n: usize, val: bool) {
3250 self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize); 4046 assert!(n < 16usize);
4047 let offs = 16usize + n * 1usize;
4048 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
3251 } 4049 }
3252 #[doc = "PA1 Switch Open"] 4050 }
3253 pub const fn pa1so(&self) -> bool { 4051 impl Default for Bsrr {
3254 let val = (self.0 >> 25usize) & 0x01; 4052 fn default() -> Bsrr {
3255 val != 0 4053 Bsrr(0)
3256 } 4054 }
3257 #[doc = "PA1 Switch Open"] 4055 }
3258 pub fn set_pa1so(&mut self, val: bool) { 4056 #[doc = "GPIO port output data register"]
3259 self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize); 4057 #[repr(transparent)]
4058 #[derive(Copy, Clone, Eq, PartialEq)]
4059 pub struct Odr(pub u32);
4060 impl Odr {
4061 #[doc = "Port output data (y = 0..15)"]
4062 pub fn odr(&self, n: usize) -> super::vals::Odr {
4063 assert!(n < 16usize);
4064 let offs = 0usize + n * 1usize;
4065 let val = (self.0 >> offs) & 0x01;
4066 super::vals::Odr(val as u8)
3260 } 4067 }
3261 #[doc = "PC2 Switch Open"] 4068 #[doc = "Port output data (y = 0..15)"]
3262 pub const fn pc2so(&self) -> bool { 4069 pub fn set_odr(&mut self, n: usize, val: super::vals::Odr) {
3263 let val = (self.0 >> 26usize) & 0x01; 4070 assert!(n < 16usize);
3264 val != 0 4071 let offs = 0usize + n * 1usize;
4072 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs);
3265 } 4073 }
3266 #[doc = "PC2 Switch Open"] 4074 }
3267 pub fn set_pc2so(&mut self, val: bool) { 4075 impl Default for Odr {
3268 self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize); 4076 fn default() -> Odr {
4077 Odr(0)
3269 } 4078 }
3270 #[doc = "PC3 Switch Open"] 4079 }
3271 pub const fn pc3so(&self) -> bool { 4080 #[doc = "GPIO port output speed register"]
3272 let val = (self.0 >> 27usize) & 0x01; 4081 #[repr(transparent)]
3273 val != 0 4082 #[derive(Copy, Clone, Eq, PartialEq)]
4083 pub struct Ospeedr(pub u32);
4084 impl Ospeedr {
4085 #[doc = "Port x configuration bits (y = 0..15)"]
4086 pub fn ospeedr(&self, n: usize) -> super::vals::Ospeedr {
4087 assert!(n < 16usize);
4088 let offs = 0usize + n * 2usize;
4089 let val = (self.0 >> offs) & 0x03;
4090 super::vals::Ospeedr(val as u8)
3274 } 4091 }
3275 #[doc = "PC3 Switch Open"] 4092 #[doc = "Port x configuration bits (y = 0..15)"]
3276 pub fn set_pc3so(&mut self, val: bool) { 4093 pub fn set_ospeedr(&mut self, n: usize, val: super::vals::Ospeedr) {
3277 self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize); 4094 assert!(n < 16usize);
4095 let offs = 0usize + n * 2usize;
4096 self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs);
3278 } 4097 }
3279 } 4098 }
3280 impl Default for Pmcr { 4099 impl Default for Ospeedr {
3281 fn default() -> Pmcr { 4100 fn default() -> Ospeedr {
3282 Pmcr(0) 4101 Ospeedr(0)
3283 } 4102 }
3284 } 4103 }
3285 #[doc = "SYSCFG power control register"] 4104 #[doc = "GPIO port mode register"]
3286 #[repr(transparent)] 4105 #[repr(transparent)]
3287 #[derive(Copy, Clone, Eq, PartialEq)] 4106 #[derive(Copy, Clone, Eq, PartialEq)]
3288 pub struct Pwrcr(pub u32); 4107 pub struct Moder(pub u32);
3289 impl Pwrcr { 4108 impl Moder {
3290 #[doc = "Overdrive enable"] 4109 #[doc = "Port x configuration bits (y = 0..15)"]
3291 pub const fn oden(&self) -> u8 { 4110 pub fn moder(&self, n: usize) -> super::vals::Moder {
3292 let val = (self.0 >> 0usize) & 0x0f; 4111 assert!(n < 16usize);
3293 val as u8 4112 let offs = 0usize + n * 2usize;
4113 let val = (self.0 >> offs) & 0x03;
4114 super::vals::Moder(val as u8)
3294 } 4115 }
3295 #[doc = "Overdrive enable"] 4116 #[doc = "Port x configuration bits (y = 0..15)"]
3296 pub fn set_oden(&mut self, val: u8) { 4117 pub fn set_moder(&mut self, n: usize, val: super::vals::Moder) {
3297 self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); 4118 assert!(n < 16usize);
4119 let offs = 0usize + n * 2usize;
4120 self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs);
3298 } 4121 }
3299 } 4122 }
3300 impl Default for Pwrcr { 4123 impl Default for Moder {
3301 fn default() -> Pwrcr { 4124 fn default() -> Moder {
3302 Pwrcr(0) 4125 Moder(0)
3303 } 4126 }
3304 } 4127 }
3305 } 4128 }
4129 pub mod vals {
4130 use crate::generic::*;
4131 #[repr(transparent)]
4132 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
4133 pub struct Brw(pub u8);
4134 impl Brw {
4135 #[doc = "Resets the corresponding ODRx bit"]
4136 pub const RESET: Self = Self(0x01);
4137 }
4138 #[repr(transparent)]
4139 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
4140 pub struct Pupdr(pub u8);
4141 impl Pupdr {
4142 #[doc = "No pull-up, pull-down"]
4143 pub const FLOATING: Self = Self(0);
4144 #[doc = "Pull-up"]
4145 pub const PULLUP: Self = Self(0x01);
4146 #[doc = "Pull-down"]
4147 pub const PULLDOWN: Self = Self(0x02);
4148 }
4149 #[repr(transparent)]
4150 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
4151 pub struct Odr(pub u8);
4152 impl Odr {
4153 #[doc = "Set output to logic low"]
4154 pub const LOW: Self = Self(0);
4155 #[doc = "Set output to logic high"]
4156 pub const HIGH: Self = Self(0x01);
4157 }
4158 #[repr(transparent)]
4159 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
4160 pub struct Ospeedr(pub u8);
4161 impl Ospeedr {
4162 #[doc = "Low speed"]
4163 pub const LOWSPEED: Self = Self(0);
4164 #[doc = "Medium speed"]
4165 pub const MEDIUMSPEED: Self = Self(0x01);
4166 #[doc = "High speed"]
4167 pub const HIGHSPEED: Self = Self(0x02);
4168 #[doc = "Very high speed"]
4169 pub const VERYHIGHSPEED: Self = Self(0x03);
4170 }
4171 #[repr(transparent)]
4172 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
4173 pub struct Idr(pub u8);
4174 impl Idr {
4175 #[doc = "Input is logic low"]
4176 pub const LOW: Self = Self(0);
4177 #[doc = "Input is logic high"]
4178 pub const HIGH: Self = Self(0x01);
4179 }
4180 #[repr(transparent)]
4181 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
4182 pub struct Lckk(pub u8);
4183 impl Lckk {
4184 #[doc = "Port configuration lock key not active"]
4185 pub const NOTACTIVE: Self = Self(0);
4186 #[doc = "Port configuration lock key active"]
4187 pub const ACTIVE: Self = Self(0x01);
4188 }
4189 #[repr(transparent)]
4190 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
4191 pub struct Moder(pub u8);
4192 impl Moder {
4193 #[doc = "Input mode (reset state)"]
4194 pub const INPUT: Self = Self(0);
4195 #[doc = "General purpose output mode"]
4196 pub const OUTPUT: Self = Self(0x01);
4197 #[doc = "Alternate function mode"]
4198 pub const ALTERNATE: Self = Self(0x02);
4199 #[doc = "Analog mode"]
4200 pub const ANALOG: Self = Self(0x03);
4201 }
4202 #[repr(transparent)]
4203 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
4204 pub struct Ot(pub u8);
4205 impl Ot {
4206 #[doc = "Output push-pull (reset state)"]
4207 pub const PUSHPULL: Self = Self(0);
4208 #[doc = "Output open-drain"]
4209 pub const OPENDRAIN: Self = Self(0x01);
4210 }
4211 #[repr(transparent)]
4212 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
4213 pub struct Afr(pub u8);
4214 impl Afr {
4215 #[doc = "AF0"]
4216 pub const AF0: Self = Self(0);
4217 #[doc = "AF1"]
4218 pub const AF1: Self = Self(0x01);
4219 #[doc = "AF2"]
4220 pub const AF2: Self = Self(0x02);
4221 #[doc = "AF3"]
4222 pub const AF3: Self = Self(0x03);
4223 #[doc = "AF4"]
4224 pub const AF4: Self = Self(0x04);
4225 #[doc = "AF5"]
4226 pub const AF5: Self = Self(0x05);
4227 #[doc = "AF6"]
4228 pub const AF6: Self = Self(0x06);
4229 #[doc = "AF7"]
4230 pub const AF7: Self = Self(0x07);
4231 #[doc = "AF8"]
4232 pub const AF8: Self = Self(0x08);
4233 #[doc = "AF9"]
4234 pub const AF9: Self = Self(0x09);
4235 #[doc = "AF10"]
4236 pub const AF10: Self = Self(0x0a);
4237 #[doc = "AF11"]
4238 pub const AF11: Self = Self(0x0b);
4239 #[doc = "AF12"]
4240 pub const AF12: Self = Self(0x0c);
4241 #[doc = "AF13"]
4242 pub const AF13: Self = Self(0x0d);
4243 #[doc = "AF14"]
4244 pub const AF14: Self = Self(0x0e);
4245 #[doc = "AF15"]
4246 pub const AF15: Self = Self(0x0f);
4247 }
4248 #[repr(transparent)]
4249 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
4250 pub struct Bsw(pub u8);
4251 impl Bsw {
4252 #[doc = "Sets the corresponding ODRx bit"]
4253 pub const SET: Self = Self(0x01);
4254 }
4255 #[repr(transparent)]
4256 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
4257 pub struct Lck(pub u8);
4258 impl Lck {
4259 #[doc = "Port configuration not locked"]
4260 pub const UNLOCKED: Self = Self(0);
4261 #[doc = "Port configuration locked"]
4262 pub const LOCKED: Self = Self(0x01);
4263 }
4264 }
3306} 4265}
3307pub mod rng_v1 { 4266pub mod rng_v1 {
3308 use crate::generic::*; 4267 use crate::generic::*;
@@ -3414,552 +4373,410 @@ pub mod rng_v1 {
3414 } 4373 }
3415 } 4374 }
3416} 4375}
3417pub mod usart_v1 { 4376pub mod syscfg_l4 {
3418 use crate::generic::*; 4377 use crate::generic::*;
3419 #[doc = "Universal synchronous asynchronous receiver transmitter"] 4378 #[doc = "System configuration controller"]
3420 #[derive(Copy, Clone)] 4379 #[derive(Copy, Clone)]
3421 pub struct Usart(pub *mut u8); 4380 pub struct Syscfg(pub *mut u8);
3422 unsafe impl Send for Usart {} 4381 unsafe impl Send for Syscfg {}
3423 unsafe impl Sync for Usart {} 4382 unsafe impl Sync for Syscfg {}
3424 impl Usart { 4383 impl Syscfg {
3425 #[doc = "Status register"] 4384 #[doc = "memory remap register"]
3426 pub fn sr(self) -> Reg<regs::Sr, RW> { 4385 pub fn memrmp(self) -> Reg<regs::Memrmp, RW> {
3427 unsafe { Reg::from_ptr(self.0.add(0usize)) } 4386 unsafe { Reg::from_ptr(self.0.add(0usize)) }
3428 } 4387 }
3429 #[doc = "Data register"] 4388 #[doc = "configuration register 1"]
3430 pub fn dr(self) -> Reg<regs::Dr, RW> { 4389 pub fn cfgr1(self) -> Reg<regs::Cfgr1, RW> {
3431 unsafe { Reg::from_ptr(self.0.add(4usize)) } 4390 unsafe { Reg::from_ptr(self.0.add(4usize)) }
3432 } 4391 }
3433 #[doc = "Baud rate register"] 4392 #[doc = "external interrupt configuration register 1"]
3434 pub fn brr(self) -> Reg<regs::Brr, RW> { 4393 pub fn exticr(self, n: usize) -> Reg<regs::Exticr, RW> {
3435 unsafe { Reg::from_ptr(self.0.add(8usize)) } 4394 assert!(n < 4usize);
3436 } 4395 unsafe { Reg::from_ptr(self.0.add(8usize + n * 4usize)) }
3437 #[doc = "Control register 1"]
3438 pub fn cr1(self) -> Reg<regs::Cr1, RW> {
3439 unsafe { Reg::from_ptr(self.0.add(12usize)) }
3440 }
3441 #[doc = "Control register 2"]
3442 pub fn cr2(self) -> Reg<regs::Cr2Usart, RW> {
3443 unsafe { Reg::from_ptr(self.0.add(16usize)) }
3444 }
3445 #[doc = "Control register 3"]
3446 pub fn cr3(self) -> Reg<regs::Cr3Usart, RW> {
3447 unsafe { Reg::from_ptr(self.0.add(20usize)) }
3448 } 4396 }
3449 #[doc = "Guard time and prescaler register"] 4397 #[doc = "SCSR"]
3450 pub fn gtpr(self) -> Reg<regs::Gtpr, RW> { 4398 pub fn scsr(self) -> Reg<regs::Scsr, RW> {
3451 unsafe { Reg::from_ptr(self.0.add(24usize)) } 4399 unsafe { Reg::from_ptr(self.0.add(24usize)) }
3452 } 4400 }
3453 } 4401 #[doc = "CFGR2"]
3454 #[doc = "Universal asynchronous receiver transmitter"] 4402 pub fn cfgr2(self) -> Reg<regs::Cfgr2, RW> {
3455 #[derive(Copy, Clone)] 4403 unsafe { Reg::from_ptr(self.0.add(28usize)) }
3456 pub struct Uart(pub *mut u8);
3457 unsafe impl Send for Uart {}
3458 unsafe impl Sync for Uart {}
3459 impl Uart {
3460 #[doc = "Status register"]
3461 pub fn sr(self) -> Reg<regs::Sr, RW> {
3462 unsafe { Reg::from_ptr(self.0.add(0usize)) }
3463 }
3464 #[doc = "Data register"]
3465 pub fn dr(self) -> Reg<regs::Dr, RW> {
3466 unsafe { Reg::from_ptr(self.0.add(4usize)) }
3467 }
3468 #[doc = "Baud rate register"]
3469 pub fn brr(self) -> Reg<regs::Brr, RW> {
3470 unsafe { Reg::from_ptr(self.0.add(8usize)) }
3471 }
3472 #[doc = "Control register 1"]
3473 pub fn cr1(self) -> Reg<regs::Cr1, RW> {
3474 unsafe { Reg::from_ptr(self.0.add(12usize)) }
3475 } 4404 }
3476 #[doc = "Control register 2"] 4405 #[doc = "SWPR"]
3477 pub fn cr2(self) -> Reg<regs::Cr2, RW> { 4406 pub fn swpr(self) -> Reg<regs::Swpr, W> {
3478 unsafe { Reg::from_ptr(self.0.add(16usize)) } 4407 unsafe { Reg::from_ptr(self.0.add(32usize)) }
3479 } 4408 }
3480 #[doc = "Control register 3"] 4409 #[doc = "SKR"]
3481 pub fn cr3(self) -> Reg<regs::Cr3, RW> { 4410 pub fn skr(self) -> Reg<regs::Skr, W> {
3482 unsafe { Reg::from_ptr(self.0.add(20usize)) } 4411 unsafe { Reg::from_ptr(self.0.add(36usize)) }
3483 } 4412 }
3484 } 4413 }
3485 pub mod vals { 4414 pub mod regs {
3486 use crate::generic::*; 4415 use crate::generic::*;
4416 #[doc = "external interrupt configuration register 4"]
3487 #[repr(transparent)] 4417 #[repr(transparent)]
3488 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 4418 #[derive(Copy, Clone, Eq, PartialEq)]
3489 pub struct M(pub u8); 4419 pub struct Exticr(pub u32);
3490 impl M { 4420 impl Exticr {
3491 #[doc = "8 data bits"] 4421 #[doc = "EXTI12 configuration bits"]
3492 pub const M8: Self = Self(0); 4422 pub fn exti(&self, n: usize) -> u8 {
3493 #[doc = "9 data bits"] 4423 assert!(n < 4usize);
3494 pub const M9: Self = Self(0x01); 4424 let offs = 0usize + n * 4usize;
3495 } 4425 let val = (self.0 >> offs) & 0x0f;
3496 #[repr(transparent)] 4426 val as u8
3497 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 4427 }
3498 pub struct Cpha(pub u8); 4428 #[doc = "EXTI12 configuration bits"]
3499 impl Cpha { 4429 pub fn set_exti(&mut self, n: usize, val: u8) {
3500 #[doc = "The first clock transition is the first data capture edge"] 4430 assert!(n < 4usize);
3501 pub const FIRST: Self = Self(0); 4431 let offs = 0usize + n * 4usize;
3502 #[doc = "The second clock transition is the first data capture edge"] 4432 self.0 = (self.0 & !(0x0f << offs)) | (((val as u32) & 0x0f) << offs);
3503 pub const SECOND: Self = Self(0x01); 4433 }
3504 }
3505 #[repr(transparent)]
3506 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3507 pub struct Irlp(pub u8);
3508 impl Irlp {
3509 #[doc = "Normal mode"]
3510 pub const NORMAL: Self = Self(0);
3511 #[doc = "Low-power mode"]
3512 pub const LOWPOWER: Self = Self(0x01);
3513 }
3514 #[repr(transparent)]
3515 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3516 pub struct Lbdl(pub u8);
3517 impl Lbdl {
3518 #[doc = "10-bit break detection"]
3519 pub const LBDL10: Self = Self(0);
3520 #[doc = "11-bit break detection"]
3521 pub const LBDL11: Self = Self(0x01);
3522 }
3523 #[repr(transparent)]
3524 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3525 pub struct Sbk(pub u8);
3526 impl Sbk {
3527 #[doc = "No break character is transmitted"]
3528 pub const NOBREAK: Self = Self(0);
3529 #[doc = "Break character transmitted"]
3530 pub const BREAK: Self = Self(0x01);
3531 }
3532 #[repr(transparent)]
3533 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3534 pub struct Hdsel(pub u8);
3535 impl Hdsel {
3536 #[doc = "Half duplex mode is not selected"]
3537 pub const FULLDUPLEX: Self = Self(0);
3538 #[doc = "Half duplex mode is selected"]
3539 pub const HALFDUPLEX: Self = Self(0x01);
3540 }
3541 #[repr(transparent)]
3542 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3543 pub struct Rwu(pub u8);
3544 impl Rwu {
3545 #[doc = "Receiver in active mode"]
3546 pub const ACTIVE: Self = Self(0);
3547 #[doc = "Receiver in mute mode"]
3548 pub const MUTE: Self = Self(0x01);
3549 }
3550 #[repr(transparent)]
3551 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3552 pub struct Wake(pub u8);
3553 impl Wake {
3554 #[doc = "USART wakeup on idle line"]
3555 pub const IDLELINE: Self = Self(0);
3556 #[doc = "USART wakeup on address mark"]
3557 pub const ADDRESSMARK: Self = Self(0x01);
3558 } 4434 }
3559 #[repr(transparent)] 4435 impl Default for Exticr {
3560 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 4436 fn default() -> Exticr {
3561 pub struct Stop(pub u8); 4437 Exticr(0)
3562 impl Stop { 4438 }
3563 #[doc = "1 stop bit"]
3564 pub const STOP1: Self = Self(0);
3565 #[doc = "0.5 stop bits"]
3566 pub const STOP0P5: Self = Self(0x01);
3567 #[doc = "2 stop bits"]
3568 pub const STOP2: Self = Self(0x02);
3569 #[doc = "1.5 stop bits"]
3570 pub const STOP1P5: Self = Self(0x03);
3571 } 4439 }
4440 #[doc = "SKR"]
3572 #[repr(transparent)] 4441 #[repr(transparent)]
3573 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 4442 #[derive(Copy, Clone, Eq, PartialEq)]
3574 pub struct Ps(pub u8); 4443 pub struct Skr(pub u32);
3575 impl Ps { 4444 impl Skr {
3576 #[doc = "Even parity"] 4445 #[doc = "SRAM2 write protection key for software erase"]
3577 pub const EVEN: Self = Self(0); 4446 pub const fn key(&self) -> u8 {
3578 #[doc = "Odd parity"] 4447 let val = (self.0 >> 0usize) & 0xff;
3579 pub const ODD: Self = Self(0x01); 4448 val as u8
4449 }
4450 #[doc = "SRAM2 write protection key for software erase"]
4451 pub fn set_key(&mut self, val: u8) {
4452 self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize);
4453 }
3580 } 4454 }
3581 #[repr(transparent)] 4455 impl Default for Skr {
3582 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 4456 fn default() -> Skr {
3583 pub struct Cpol(pub u8); 4457 Skr(0)
3584 impl Cpol { 4458 }
3585 #[doc = "Steady low value on CK pin outside transmission window"]
3586 pub const LOW: Self = Self(0);
3587 #[doc = "Steady high value on CK pin outside transmission window"]
3588 pub const HIGH: Self = Self(0x01);
3589 } 4459 }
3590 } 4460 #[doc = "configuration register 1"]
3591 pub mod regs {
3592 use crate::generic::*;
3593 #[doc = "Control register 3"]
3594 #[repr(transparent)] 4461 #[repr(transparent)]
3595 #[derive(Copy, Clone, Eq, PartialEq)] 4462 #[derive(Copy, Clone, Eq, PartialEq)]
3596 pub struct Cr3Usart(pub u32); 4463 pub struct Cfgr1(pub u32);
3597 impl Cr3Usart { 4464 impl Cfgr1 {
3598 #[doc = "Error interrupt enable"] 4465 #[doc = "Firewall disable"]
3599 pub const fn eie(&self) -> bool { 4466 pub const fn fwdis(&self) -> bool {
3600 let val = (self.0 >> 0usize) & 0x01; 4467 let val = (self.0 >> 0usize) & 0x01;
3601 val != 0 4468 val != 0
3602 } 4469 }
3603 #[doc = "Error interrupt enable"] 4470 #[doc = "Firewall disable"]
3604 pub fn set_eie(&mut self, val: bool) { 4471 pub fn set_fwdis(&mut self, val: bool) {
3605 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 4472 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
3606 } 4473 }
3607 #[doc = "IrDA mode enable"] 4474 #[doc = "I/O analog switch voltage booster enable"]
3608 pub const fn iren(&self) -> bool { 4475 pub const fn boosten(&self) -> bool {
3609 let val = (self.0 >> 1usize) & 0x01; 4476 let val = (self.0 >> 8usize) & 0x01;
3610 val != 0 4477 val != 0
3611 } 4478 }
3612 #[doc = "IrDA mode enable"] 4479 #[doc = "I/O analog switch voltage booster enable"]
3613 pub fn set_iren(&mut self, val: bool) { 4480 pub fn set_boosten(&mut self, val: bool) {
3614 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); 4481 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
3615 }
3616 #[doc = "IrDA low-power"]
3617 pub const fn irlp(&self) -> super::vals::Irlp {
3618 let val = (self.0 >> 2usize) & 0x01;
3619 super::vals::Irlp(val as u8)
3620 }
3621 #[doc = "IrDA low-power"]
3622 pub fn set_irlp(&mut self, val: super::vals::Irlp) {
3623 self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize);
3624 } 4482 }
3625 #[doc = "Half-duplex selection"] 4483 #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB6"]
3626 pub const fn hdsel(&self) -> super::vals::Hdsel { 4484 pub const fn i2c_pb6_fmp(&self) -> bool {
3627 let val = (self.0 >> 3usize) & 0x01; 4485 let val = (self.0 >> 16usize) & 0x01;
3628 super::vals::Hdsel(val as u8) 4486 val != 0
3629 } 4487 }
3630 #[doc = "Half-duplex selection"] 4488 #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB6"]
3631 pub fn set_hdsel(&mut self, val: super::vals::Hdsel) { 4489 pub fn set_i2c_pb6_fmp(&mut self, val: bool) {
3632 self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize); 4490 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
3633 } 4491 }
3634 #[doc = "Smartcard NACK enable"] 4492 #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB7"]
3635 pub const fn nack(&self) -> bool { 4493 pub const fn i2c_pb7_fmp(&self) -> bool {
3636 let val = (self.0 >> 4usize) & 0x01; 4494 let val = (self.0 >> 17usize) & 0x01;
3637 val != 0 4495 val != 0
3638 } 4496 }
3639 #[doc = "Smartcard NACK enable"] 4497 #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB7"]
3640 pub fn set_nack(&mut self, val: bool) { 4498 pub fn set_i2c_pb7_fmp(&mut self, val: bool) {
3641 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); 4499 self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize);
3642 } 4500 }
3643 #[doc = "Smartcard mode enable"] 4501 #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB8"]
3644 pub const fn scen(&self) -> bool { 4502 pub const fn i2c_pb8_fmp(&self) -> bool {
3645 let val = (self.0 >> 5usize) & 0x01; 4503 let val = (self.0 >> 18usize) & 0x01;
3646 val != 0 4504 val != 0
3647 } 4505 }
3648 #[doc = "Smartcard mode enable"] 4506 #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB8"]
3649 pub fn set_scen(&mut self, val: bool) { 4507 pub fn set_i2c_pb8_fmp(&mut self, val: bool) {
3650 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); 4508 self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize);
3651 } 4509 }
3652 #[doc = "DMA enable receiver"] 4510 #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB9"]
3653 pub const fn dmar(&self) -> bool { 4511 pub const fn i2c_pb9_fmp(&self) -> bool {
3654 let val = (self.0 >> 6usize) & 0x01; 4512 let val = (self.0 >> 19usize) & 0x01;
3655 val != 0 4513 val != 0
3656 } 4514 }
3657 #[doc = "DMA enable receiver"] 4515 #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB9"]
3658 pub fn set_dmar(&mut self, val: bool) { 4516 pub fn set_i2c_pb9_fmp(&mut self, val: bool) {
3659 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); 4517 self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize);
3660 } 4518 }
3661 #[doc = "DMA enable transmitter"] 4519 #[doc = "I2C1 Fast-mode Plus driving capability activation"]
3662 pub const fn dmat(&self) -> bool { 4520 pub const fn i2c1_fmp(&self) -> bool {
3663 let val = (self.0 >> 7usize) & 0x01; 4521 let val = (self.0 >> 20usize) & 0x01;
3664 val != 0 4522 val != 0
3665 } 4523 }
3666 #[doc = "DMA enable transmitter"] 4524 #[doc = "I2C1 Fast-mode Plus driving capability activation"]
3667 pub fn set_dmat(&mut self, val: bool) { 4525 pub fn set_i2c1_fmp(&mut self, val: bool) {
3668 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); 4526 self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize);
3669 } 4527 }
3670 #[doc = "RTS enable"] 4528 #[doc = "I2C2 Fast-mode Plus driving capability activation"]
3671 pub const fn rtse(&self) -> bool { 4529 pub const fn i2c2_fmp(&self) -> bool {
3672 let val = (self.0 >> 8usize) & 0x01; 4530 let val = (self.0 >> 21usize) & 0x01;
3673 val != 0 4531 val != 0
3674 } 4532 }
3675 #[doc = "RTS enable"] 4533 #[doc = "I2C2 Fast-mode Plus driving capability activation"]
3676 pub fn set_rtse(&mut self, val: bool) { 4534 pub fn set_i2c2_fmp(&mut self, val: bool) {
3677 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); 4535 self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize);
3678 } 4536 }
3679 #[doc = "CTS enable"] 4537 #[doc = "I2C3 Fast-mode Plus driving capability activation"]
3680 pub const fn ctse(&self) -> bool { 4538 pub const fn i2c3_fmp(&self) -> bool {
3681 let val = (self.0 >> 9usize) & 0x01; 4539 let val = (self.0 >> 22usize) & 0x01;
3682 val != 0 4540 val != 0
3683 } 4541 }
3684 #[doc = "CTS enable"] 4542 #[doc = "I2C3 Fast-mode Plus driving capability activation"]
3685 pub fn set_ctse(&mut self, val: bool) { 4543 pub fn set_i2c3_fmp(&mut self, val: bool) {
3686 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); 4544 self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize);
3687 } 4545 }
3688 #[doc = "CTS interrupt enable"] 4546 #[doc = "Floating Point Unit interrupts enable bits"]
3689 pub const fn ctsie(&self) -> bool { 4547 pub const fn fpu_ie(&self) -> u8 {
3690 let val = (self.0 >> 10usize) & 0x01; 4548 let val = (self.0 >> 26usize) & 0x3f;
3691 val != 0 4549 val as u8
3692 } 4550 }
3693 #[doc = "CTS interrupt enable"] 4551 #[doc = "Floating Point Unit interrupts enable bits"]
3694 pub fn set_ctsie(&mut self, val: bool) { 4552 pub fn set_fpu_ie(&mut self, val: u8) {
3695 self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); 4553 self.0 = (self.0 & !(0x3f << 26usize)) | (((val as u32) & 0x3f) << 26usize);
3696 } 4554 }
3697 } 4555 }
3698 impl Default for Cr3Usart { 4556 impl Default for Cfgr1 {
3699 fn default() -> Cr3Usart { 4557 fn default() -> Cfgr1 {
3700 Cr3Usart(0) 4558 Cfgr1(0)
3701 } 4559 }
3702 } 4560 }
3703 #[doc = "Control register 3"] 4561 #[doc = "memory remap register"]
3704 #[repr(transparent)] 4562 #[repr(transparent)]
3705 #[derive(Copy, Clone, Eq, PartialEq)] 4563 #[derive(Copy, Clone, Eq, PartialEq)]
3706 pub struct Cr3(pub u32); 4564 pub struct Memrmp(pub u32);
3707 impl Cr3 { 4565 impl Memrmp {
3708 #[doc = "Error interrupt enable"] 4566 #[doc = "Memory mapping selection"]
3709 pub const fn eie(&self) -> bool { 4567 pub const fn mem_mode(&self) -> u8 {
3710 let val = (self.0 >> 0usize) & 0x01; 4568 let val = (self.0 >> 0usize) & 0x07;
3711 val != 0 4569 val as u8
3712 }
3713 #[doc = "Error interrupt enable"]
3714 pub fn set_eie(&mut self, val: bool) {
3715 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
3716 }
3717 #[doc = "IrDA mode enable"]
3718 pub const fn iren(&self) -> bool {
3719 let val = (self.0 >> 1usize) & 0x01;
3720 val != 0
3721 }
3722 #[doc = "IrDA mode enable"]
3723 pub fn set_iren(&mut self, val: bool) {
3724 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
3725 }
3726 #[doc = "IrDA low-power"]
3727 pub const fn irlp(&self) -> super::vals::Irlp {
3728 let val = (self.0 >> 2usize) & 0x01;
3729 super::vals::Irlp(val as u8)
3730 } 4570 }
3731 #[doc = "IrDA low-power"] 4571 #[doc = "Memory mapping selection"]
3732 pub fn set_irlp(&mut self, val: super::vals::Irlp) { 4572 pub fn set_mem_mode(&mut self, val: u8) {
3733 self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize); 4573 self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize);
3734 } 4574 }
3735 #[doc = "Half-duplex selection"] 4575 #[doc = "QUADSPI memory mapping swap"]
3736 pub const fn hdsel(&self) -> super::vals::Hdsel { 4576 pub const fn qfs(&self) -> bool {
3737 let val = (self.0 >> 3usize) & 0x01; 4577 let val = (self.0 >> 3usize) & 0x01;
3738 super::vals::Hdsel(val as u8)
3739 }
3740 #[doc = "Half-duplex selection"]
3741 pub fn set_hdsel(&mut self, val: super::vals::Hdsel) {
3742 self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize);
3743 }
3744 #[doc = "DMA enable receiver"]
3745 pub const fn dmar(&self) -> bool {
3746 let val = (self.0 >> 6usize) & 0x01;
3747 val != 0 4578 val != 0
3748 } 4579 }
3749 #[doc = "DMA enable receiver"] 4580 #[doc = "QUADSPI memory mapping swap"]
3750 pub fn set_dmar(&mut self, val: bool) { 4581 pub fn set_qfs(&mut self, val: bool) {
3751 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); 4582 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
3752 } 4583 }
3753 #[doc = "DMA enable transmitter"] 4584 #[doc = "Flash Bank mode selection"]
3754 pub const fn dmat(&self) -> bool { 4585 pub const fn fb_mode(&self) -> bool {
3755 let val = (self.0 >> 7usize) & 0x01; 4586 let val = (self.0 >> 8usize) & 0x01;
3756 val != 0 4587 val != 0
3757 } 4588 }
3758 #[doc = "DMA enable transmitter"] 4589 #[doc = "Flash Bank mode selection"]
3759 pub fn set_dmat(&mut self, val: bool) { 4590 pub fn set_fb_mode(&mut self, val: bool) {
3760 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); 4591 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
3761 } 4592 }
3762 } 4593 }
3763 impl Default for Cr3 { 4594 impl Default for Memrmp {
3764 fn default() -> Cr3 { 4595 fn default() -> Memrmp {
3765 Cr3(0) 4596 Memrmp(0)
3766 } 4597 }
3767 } 4598 }
3768 #[doc = "Baud rate register"] 4599 #[doc = "SWPR"]
3769 #[repr(transparent)] 4600 #[repr(transparent)]
3770 #[derive(Copy, Clone, Eq, PartialEq)] 4601 #[derive(Copy, Clone, Eq, PartialEq)]
3771 pub struct Brr(pub u32); 4602 pub struct Swpr(pub u32);
3772 impl Brr { 4603 impl Swpr {
3773 #[doc = "fraction of USARTDIV"] 4604 #[doc = "SRAWM2 write protection."]
3774 pub const fn div_fraction(&self) -> u8 { 4605 pub fn pwp(&self, n: usize) -> bool {
3775 let val = (self.0 >> 0usize) & 0x0f; 4606 assert!(n < 32usize);
3776 val as u8 4607 let offs = 0usize + n * 1usize;
3777 } 4608 let val = (self.0 >> offs) & 0x01;
3778 #[doc = "fraction of USARTDIV"] 4609 val != 0
3779 pub fn set_div_fraction(&mut self, val: u8) {
3780 self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize);
3781 }
3782 #[doc = "mantissa of USARTDIV"]
3783 pub const fn div_mantissa(&self) -> u16 {
3784 let val = (self.0 >> 4usize) & 0x0fff;
3785 val as u16
3786 } 4610 }
3787 #[doc = "mantissa of USARTDIV"] 4611 #[doc = "SRAWM2 write protection."]
3788 pub fn set_div_mantissa(&mut self, val: u16) { 4612 pub fn set_pwp(&mut self, n: usize, val: bool) {
3789 self.0 = (self.0 & !(0x0fff << 4usize)) | (((val as u32) & 0x0fff) << 4usize); 4613 assert!(n < 32usize);
4614 let offs = 0usize + n * 1usize;
4615 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
3790 } 4616 }
3791 } 4617 }
3792 impl Default for Brr { 4618 impl Default for Swpr {
3793 fn default() -> Brr { 4619 fn default() -> Swpr {
3794 Brr(0) 4620 Swpr(0)
3795 } 4621 }
3796 } 4622 }
3797 #[doc = "Control register 1"] 4623 #[doc = "CFGR2"]
3798 #[repr(transparent)] 4624 #[repr(transparent)]
3799 #[derive(Copy, Clone, Eq, PartialEq)] 4625 #[derive(Copy, Clone, Eq, PartialEq)]
3800 pub struct Cr1(pub u32); 4626 pub struct Cfgr2(pub u32);
3801 impl Cr1 { 4627 impl Cfgr2 {
3802 #[doc = "Send break"] 4628 #[doc = "Cortex LOCKUP (Hardfault) output enable bit"]
3803 pub const fn sbk(&self) -> super::vals::Sbk { 4629 pub const fn cll(&self) -> bool {
3804 let val = (self.0 >> 0usize) & 0x01; 4630 let val = (self.0 >> 0usize) & 0x01;
3805 super::vals::Sbk(val as u8) 4631 val != 0
3806 } 4632 }
3807 #[doc = "Send break"] 4633 #[doc = "Cortex LOCKUP (Hardfault) output enable bit"]
3808 pub fn set_sbk(&mut self, val: super::vals::Sbk) { 4634 pub fn set_cll(&mut self, val: bool) {
3809 self.0 = (self.0 & !(0x01 << 0usize)) | (((val.0 as u32) & 0x01) << 0usize); 4635 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
3810 } 4636 }
3811 #[doc = "Receiver wakeup"] 4637 #[doc = "SRAM2 parity lock bit"]
3812 pub const fn rwu(&self) -> super::vals::Rwu { 4638 pub const fn spl(&self) -> bool {
3813 let val = (self.0 >> 1usize) & 0x01; 4639 let val = (self.0 >> 1usize) & 0x01;
3814 super::vals::Rwu(val as u8) 4640 val != 0
3815 } 4641 }
3816 #[doc = "Receiver wakeup"] 4642 #[doc = "SRAM2 parity lock bit"]
3817 pub fn set_rwu(&mut self, val: super::vals::Rwu) { 4643 pub fn set_spl(&mut self, val: bool) {
3818 self.0 = (self.0 & !(0x01 << 1usize)) | (((val.0 as u32) & 0x01) << 1usize); 4644 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
3819 } 4645 }
3820 #[doc = "Receiver enable"] 4646 #[doc = "PVD lock enable bit"]
3821 pub const fn re(&self) -> bool { 4647 pub const fn pvdl(&self) -> bool {
3822 let val = (self.0 >> 2usize) & 0x01; 4648 let val = (self.0 >> 2usize) & 0x01;
3823 val != 0 4649 val != 0
3824 } 4650 }
3825 #[doc = "Receiver enable"] 4651 #[doc = "PVD lock enable bit"]
3826 pub fn set_re(&mut self, val: bool) { 4652 pub fn set_pvdl(&mut self, val: bool) {
3827 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); 4653 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
3828 } 4654 }
3829 #[doc = "Transmitter enable"] 4655 #[doc = "ECC Lock"]
3830 pub const fn te(&self) -> bool { 4656 pub const fn eccl(&self) -> bool {
3831 let val = (self.0 >> 3usize) & 0x01; 4657 let val = (self.0 >> 3usize) & 0x01;
3832 val != 0 4658 val != 0
3833 } 4659 }
3834 #[doc = "Transmitter enable"] 4660 #[doc = "ECC Lock"]
3835 pub fn set_te(&mut self, val: bool) { 4661 pub fn set_eccl(&mut self, val: bool) {
3836 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); 4662 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
3837 } 4663 }
3838 #[doc = "IDLE interrupt enable"] 4664 #[doc = "SRAM2 parity error flag"]
3839 pub const fn idleie(&self) -> bool { 4665 pub const fn spf(&self) -> bool {
3840 let val = (self.0 >> 4usize) & 0x01;
3841 val != 0
3842 }
3843 #[doc = "IDLE interrupt enable"]
3844 pub fn set_idleie(&mut self, val: bool) {
3845 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
3846 }
3847 #[doc = "RXNE interrupt enable"]
3848 pub const fn rxneie(&self) -> bool {
3849 let val = (self.0 >> 5usize) & 0x01;
3850 val != 0
3851 }
3852 #[doc = "RXNE interrupt enable"]
3853 pub fn set_rxneie(&mut self, val: bool) {
3854 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
3855 }
3856 #[doc = "Transmission complete interrupt enable"]
3857 pub const fn tcie(&self) -> bool {
3858 let val = (self.0 >> 6usize) & 0x01;
3859 val != 0
3860 }
3861 #[doc = "Transmission complete interrupt enable"]
3862 pub fn set_tcie(&mut self, val: bool) {
3863 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
3864 }
3865 #[doc = "TXE interrupt enable"]
3866 pub const fn txeie(&self) -> bool {
3867 let val = (self.0 >> 7usize) & 0x01;
3868 val != 0
3869 }
3870 #[doc = "TXE interrupt enable"]
3871 pub fn set_txeie(&mut self, val: bool) {
3872 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
3873 }
3874 #[doc = "PE interrupt enable"]
3875 pub const fn peie(&self) -> bool {
3876 let val = (self.0 >> 8usize) & 0x01; 4666 let val = (self.0 >> 8usize) & 0x01;
3877 val != 0 4667 val != 0
3878 } 4668 }
3879 #[doc = "PE interrupt enable"] 4669 #[doc = "SRAM2 parity error flag"]
3880 pub fn set_peie(&mut self, val: bool) { 4670 pub fn set_spf(&mut self, val: bool) {
3881 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); 4671 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
3882 } 4672 }
3883 #[doc = "Parity selection"]
3884 pub const fn ps(&self) -> super::vals::Ps {
3885 let val = (self.0 >> 9usize) & 0x01;
3886 super::vals::Ps(val as u8)
3887 }
3888 #[doc = "Parity selection"]
3889 pub fn set_ps(&mut self, val: super::vals::Ps) {
3890 self.0 = (self.0 & !(0x01 << 9usize)) | (((val.0 as u32) & 0x01) << 9usize);
3891 }
3892 #[doc = "Parity control enable"]
3893 pub const fn pce(&self) -> bool {
3894 let val = (self.0 >> 10usize) & 0x01;
3895 val != 0
3896 }
3897 #[doc = "Parity control enable"]
3898 pub fn set_pce(&mut self, val: bool) {
3899 self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize);
3900 }
3901 #[doc = "Wakeup method"]
3902 pub const fn wake(&self) -> super::vals::Wake {
3903 let val = (self.0 >> 11usize) & 0x01;
3904 super::vals::Wake(val as u8)
3905 }
3906 #[doc = "Wakeup method"]
3907 pub fn set_wake(&mut self, val: super::vals::Wake) {
3908 self.0 = (self.0 & !(0x01 << 11usize)) | (((val.0 as u32) & 0x01) << 11usize);
3909 }
3910 #[doc = "Word length"]
3911 pub const fn m(&self) -> super::vals::M {
3912 let val = (self.0 >> 12usize) & 0x01;
3913 super::vals::M(val as u8)
3914 }
3915 #[doc = "Word length"]
3916 pub fn set_m(&mut self, val: super::vals::M) {
3917 self.0 = (self.0 & !(0x01 << 12usize)) | (((val.0 as u32) & 0x01) << 12usize);
3918 }
3919 #[doc = "USART enable"]
3920 pub const fn ue(&self) -> bool {
3921 let val = (self.0 >> 13usize) & 0x01;
3922 val != 0
3923 }
3924 #[doc = "USART enable"]
3925 pub fn set_ue(&mut self, val: bool) {
3926 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize);
3927 }
3928 } 4673 }
3929 impl Default for Cr1 { 4674 impl Default for Cfgr2 {
3930 fn default() -> Cr1 { 4675 fn default() -> Cfgr2 {
3931 Cr1(0) 4676 Cfgr2(0)
3932 } 4677 }
3933 } 4678 }
3934 #[doc = "Guard time and prescaler register"] 4679 #[doc = "SCSR"]
3935 #[repr(transparent)] 4680 #[repr(transparent)]
3936 #[derive(Copy, Clone, Eq, PartialEq)] 4681 #[derive(Copy, Clone, Eq, PartialEq)]
3937 pub struct Gtpr(pub u32); 4682 pub struct Scsr(pub u32);
3938 impl Gtpr { 4683 impl Scsr {
3939 #[doc = "Prescaler value"] 4684 #[doc = "SRAM2 Erase"]
3940 pub const fn psc(&self) -> u8 { 4685 pub const fn sram2er(&self) -> bool {
3941 let val = (self.0 >> 0usize) & 0xff; 4686 let val = (self.0 >> 0usize) & 0x01;
3942 val as u8 4687 val != 0
3943 } 4688 }
3944 #[doc = "Prescaler value"] 4689 #[doc = "SRAM2 Erase"]
3945 pub fn set_psc(&mut self, val: u8) { 4690 pub fn set_sram2er(&mut self, val: bool) {
3946 self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); 4691 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
3947 } 4692 }
3948 #[doc = "Guard time value"] 4693 #[doc = "SRAM2 busy by erase operation"]
3949 pub const fn gt(&self) -> u8 { 4694 pub const fn sram2bsy(&self) -> bool {
3950 let val = (self.0 >> 8usize) & 0xff; 4695 let val = (self.0 >> 1usize) & 0x01;
3951 val as u8 4696 val != 0
3952 } 4697 }
3953 #[doc = "Guard time value"] 4698 #[doc = "SRAM2 busy by erase operation"]
3954 pub fn set_gt(&mut self, val: u8) { 4699 pub fn set_sram2bsy(&mut self, val: bool) {
3955 self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); 4700 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
3956 } 4701 }
3957 } 4702 }
3958 impl Default for Gtpr { 4703 impl Default for Scsr {
3959 fn default() -> Gtpr { 4704 fn default() -> Scsr {
3960 Gtpr(0) 4705 Scsr(0)
3961 } 4706 }
3962 } 4707 }
4708 }
4709}
4710pub mod usart_v1 {
4711 use crate::generic::*;
4712 #[doc = "Universal asynchronous receiver transmitter"]
4713 #[derive(Copy, Clone)]
4714 pub struct Uart(pub *mut u8);
4715 unsafe impl Send for Uart {}
4716 unsafe impl Sync for Uart {}
4717 impl Uart {
4718 #[doc = "Status register"]
4719 pub fn sr(self) -> Reg<regs::Sr, RW> {
4720 unsafe { Reg::from_ptr(self.0.add(0usize)) }
4721 }
4722 #[doc = "Data register"]
4723 pub fn dr(self) -> Reg<regs::Dr, RW> {
4724 unsafe { Reg::from_ptr(self.0.add(4usize)) }
4725 }
4726 #[doc = "Baud rate register"]
4727 pub fn brr(self) -> Reg<regs::Brr, RW> {
4728 unsafe { Reg::from_ptr(self.0.add(8usize)) }
4729 }
4730 #[doc = "Control register 1"]
4731 pub fn cr1(self) -> Reg<regs::Cr1, RW> {
4732 unsafe { Reg::from_ptr(self.0.add(12usize)) }
4733 }
4734 #[doc = "Control register 2"]
4735 pub fn cr2(self) -> Reg<regs::Cr2, RW> {
4736 unsafe { Reg::from_ptr(self.0.add(16usize)) }
4737 }
4738 #[doc = "Control register 3"]
4739 pub fn cr3(self) -> Reg<regs::Cr3, RW> {
4740 unsafe { Reg::from_ptr(self.0.add(20usize)) }
4741 }
4742 }
4743 #[doc = "Universal synchronous asynchronous receiver transmitter"]
4744 #[derive(Copy, Clone)]
4745 pub struct Usart(pub *mut u8);
4746 unsafe impl Send for Usart {}
4747 unsafe impl Sync for Usart {}
4748 impl Usart {
4749 #[doc = "Status register"]
4750 pub fn sr(self) -> Reg<regs::Sr, RW> {
4751 unsafe { Reg::from_ptr(self.0.add(0usize)) }
4752 }
4753 #[doc = "Data register"]
4754 pub fn dr(self) -> Reg<regs::Dr, RW> {
4755 unsafe { Reg::from_ptr(self.0.add(4usize)) }
4756 }
4757 #[doc = "Baud rate register"]
4758 pub fn brr(self) -> Reg<regs::Brr, RW> {
4759 unsafe { Reg::from_ptr(self.0.add(8usize)) }
4760 }
4761 #[doc = "Control register 1"]
4762 pub fn cr1(self) -> Reg<regs::Cr1, RW> {
4763 unsafe { Reg::from_ptr(self.0.add(12usize)) }
4764 }
4765 #[doc = "Control register 2"]
4766 pub fn cr2(self) -> Reg<regs::Cr2Usart, RW> {
4767 unsafe { Reg::from_ptr(self.0.add(16usize)) }
4768 }
4769 #[doc = "Control register 3"]
4770 pub fn cr3(self) -> Reg<regs::Cr3Usart, RW> {
4771 unsafe { Reg::from_ptr(self.0.add(20usize)) }
4772 }
4773 #[doc = "Guard time and prescaler register"]
4774 pub fn gtpr(self) -> Reg<regs::Gtpr, RW> {
4775 unsafe { Reg::from_ptr(self.0.add(24usize)) }
4776 }
4777 }
4778 pub mod regs {
4779 use crate::generic::*;
3963 #[doc = "Data register"] 4780 #[doc = "Data register"]
3964 #[repr(transparent)] 4781 #[repr(transparent)]
3965 #[derive(Copy, Clone, Eq, PartialEq)] 4782 #[derive(Copy, Clone, Eq, PartialEq)]
@@ -4072,107 +4889,6 @@ pub mod usart_v1 {
4072 Sr(0) 4889 Sr(0)
4073 } 4890 }
4074 } 4891 }
4075 #[doc = "Status register"]
4076 #[repr(transparent)]
4077 #[derive(Copy, Clone, Eq, PartialEq)]
4078 pub struct SrUsart(pub u32);
4079 impl SrUsart {
4080 #[doc = "Parity error"]
4081 pub const fn pe(&self) -> bool {
4082 let val = (self.0 >> 0usize) & 0x01;
4083 val != 0
4084 }
4085 #[doc = "Parity error"]
4086 pub fn set_pe(&mut self, val: bool) {
4087 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
4088 }
4089 #[doc = "Framing error"]
4090 pub const fn fe(&self) -> bool {
4091 let val = (self.0 >> 1usize) & 0x01;
4092 val != 0
4093 }
4094 #[doc = "Framing error"]
4095 pub fn set_fe(&mut self, val: bool) {
4096 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
4097 }
4098 #[doc = "Noise error flag"]
4099 pub const fn ne(&self) -> bool {
4100 let val = (self.0 >> 2usize) & 0x01;
4101 val != 0
4102 }
4103 #[doc = "Noise error flag"]
4104 pub fn set_ne(&mut self, val: bool) {
4105 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
4106 }
4107 #[doc = "Overrun error"]
4108 pub const fn ore(&self) -> bool {
4109 let val = (self.0 >> 3usize) & 0x01;
4110 val != 0
4111 }
4112 #[doc = "Overrun error"]
4113 pub fn set_ore(&mut self, val: bool) {
4114 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
4115 }
4116 #[doc = "IDLE line detected"]
4117 pub const fn idle(&self) -> bool {
4118 let val = (self.0 >> 4usize) & 0x01;
4119 val != 0
4120 }
4121 #[doc = "IDLE line detected"]
4122 pub fn set_idle(&mut self, val: bool) {
4123 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
4124 }
4125 #[doc = "Read data register not empty"]
4126 pub const fn rxne(&self) -> bool {
4127 let val = (self.0 >> 5usize) & 0x01;
4128 val != 0
4129 }
4130 #[doc = "Read data register not empty"]
4131 pub fn set_rxne(&mut self, val: bool) {
4132 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
4133 }
4134 #[doc = "Transmission complete"]
4135 pub const fn tc(&self) -> bool {
4136 let val = (self.0 >> 6usize) & 0x01;
4137 val != 0
4138 }
4139 #[doc = "Transmission complete"]
4140 pub fn set_tc(&mut self, val: bool) {
4141 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
4142 }
4143 #[doc = "Transmit data register empty"]
4144 pub const fn txe(&self) -> bool {
4145 let val = (self.0 >> 7usize) & 0x01;
4146 val != 0
4147 }
4148 #[doc = "Transmit data register empty"]
4149 pub fn set_txe(&mut self, val: bool) {
4150 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
4151 }
4152 #[doc = "LIN break detection flag"]
4153 pub const fn lbd(&self) -> bool {
4154 let val = (self.0 >> 8usize) & 0x01;
4155 val != 0
4156 }
4157 #[doc = "LIN break detection flag"]
4158 pub fn set_lbd(&mut self, val: bool) {
4159 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
4160 }
4161 #[doc = "CTS flag"]
4162 pub const fn cts(&self) -> bool {
4163 let val = (self.0 >> 9usize) & 0x01;
4164 val != 0
4165 }
4166 #[doc = "CTS flag"]
4167 pub fn set_cts(&mut self, val: bool) {
4168 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
4169 }
4170 }
4171 impl Default for SrUsart {
4172 fn default() -> SrUsart {
4173 SrUsart(0)
4174 }
4175 }
4176 #[doc = "Control register 2"] 4892 #[doc = "Control register 2"]
4177 #[repr(transparent)] 4893 #[repr(transparent)]
4178 #[derive(Copy, Clone, Eq, PartialEq)] 4894 #[derive(Copy, Clone, Eq, PartialEq)]
@@ -4321,1509 +5037,582 @@ pub mod usart_v1 {
4321 Cr2Usart(0) 5037 Cr2Usart(0)
4322 } 5038 }
4323 } 5039 }
4324 } 5040 #[doc = "Control register 3"]
4325}
4326pub mod sdmmc_v2 {
4327 use crate::generic::*;
4328 #[doc = "SDMMC"]
4329 #[derive(Copy, Clone)]
4330 pub struct Sdmmc(pub *mut u8);
4331 unsafe impl Send for Sdmmc {}
4332 unsafe impl Sync for Sdmmc {}
4333 impl Sdmmc {
4334 #[doc = "SDMMC power control register"]
4335 pub fn power(self) -> Reg<regs::Power, RW> {
4336 unsafe { Reg::from_ptr(self.0.add(0usize)) }
4337 }
4338 #[doc = "The SDMMC_CLKCR register controls the SDMMC_CK output clock, the SDMMC_RX_CLK receive clock, and the bus width."]
4339 pub fn clkcr(self) -> Reg<regs::Clkcr, RW> {
4340 unsafe { Reg::from_ptr(self.0.add(4usize)) }
4341 }
4342 #[doc = "The SDMMC_ARGR register contains a 32-bit command argument, which is sent to a card as part of a command message."]
4343 pub fn argr(self) -> Reg<regs::Argr, RW> {
4344 unsafe { Reg::from_ptr(self.0.add(8usize)) }
4345 }
4346 #[doc = "The SDMMC_CMDR register contains the command index and command type bits. The command index is sent to a card as part of a command message. The command type bits control the command path state machine (CPSM)."]
4347 pub fn cmdr(self) -> Reg<regs::Cmdr, RW> {
4348 unsafe { Reg::from_ptr(self.0.add(12usize)) }
4349 }
4350 #[doc = "SDMMC command response register"]
4351 pub fn respcmdr(self) -> Reg<regs::Respcmdr, R> {
4352 unsafe { Reg::from_ptr(self.0.add(16usize)) }
4353 }
4354 #[doc = "The SDMMC_RESP1/2/3/4R registers contain the status of a card, which is part of the received response."]
4355 pub fn respr(self, n: usize) -> Reg<regs::Resp1r, R> {
4356 assert!(n < 4usize);
4357 unsafe { Reg::from_ptr(self.0.add(20usize + n * 4usize)) }
4358 }
4359 #[doc = "The SDMMC_DTIMER register contains the data timeout period, in card bus clock periods. A counter loads the value from the SDMMC_DTIMER register, and starts decrementing when the data path state machine (DPSM) enters the Wait_R or Busy state. If the timer reaches 0 while the DPSM is in either of these states, the timeout status flag is set."]
4360 pub fn dtimer(self) -> Reg<regs::Dtimer, RW> {
4361 unsafe { Reg::from_ptr(self.0.add(36usize)) }
4362 }
4363 #[doc = "The SDMMC_DLENR register contains the number of data bytes to be transferred. The value is loaded into the data counter when data transfer starts."]
4364 pub fn dlenr(self) -> Reg<regs::Dlenr, RW> {
4365 unsafe { Reg::from_ptr(self.0.add(40usize)) }
4366 }
4367 #[doc = "The SDMMC_DCTRL register control the data path state machine (DPSM)."]
4368 pub fn dctrl(self) -> Reg<regs::Dctrl, RW> {
4369 unsafe { Reg::from_ptr(self.0.add(44usize)) }
4370 }
4371 #[doc = "The SDMMC_DCNTR register loads the value from the data length register (see SDMMC_DLENR) when the DPSM moves from the Idle state to the Wait_R or Wait_S state. As data is transferred, the counter decrements the value until it reaches 0. The DPSM then moves to the Idle state and when there has been no error, the data status end flag (DATAEND) is set."]
4372 pub fn dcntr(self) -> Reg<regs::Dcntr, R> {
4373 unsafe { Reg::from_ptr(self.0.add(48usize)) }
4374 }
4375 #[doc = "The SDMMC_STAR register is a read-only register. It contains two types of flag:Static flags (bits [29,21,11:0]): these bits remain asserted until they are cleared by writing to the SDMMC interrupt Clear register (see SDMMC_ICR)Dynamic flags (bits [20:12]): these bits change state depending on the state of the underlying logic (for example, FIFO full and empty flags are asserted and de-asserted as data while written to the FIFO)"]
4376 pub fn star(self) -> Reg<regs::Star, R> {
4377 unsafe { Reg::from_ptr(self.0.add(52usize)) }
4378 }
4379 #[doc = "The SDMMC_ICR register is a write-only register. Writing a bit with 1 clears the corresponding bit in the SDMMC_STAR status register."]
4380 pub fn icr(self) -> Reg<regs::Icr, RW> {
4381 unsafe { Reg::from_ptr(self.0.add(56usize)) }
4382 }
4383 #[doc = "The interrupt mask register determines which status flags generate an interrupt request by setting the corresponding bit to 1."]
4384 pub fn maskr(self) -> Reg<regs::Maskr, RW> {
4385 unsafe { Reg::from_ptr(self.0.add(60usize)) }
4386 }
4387 #[doc = "The SDMMC_ACKTIMER register contains the acknowledgment timeout period, in SDMMC_CK bus clock periods. A counter loads the value from the SDMMC_ACKTIMER register, and starts decrementing when the data path state machine (DPSM) enters the Wait_Ack state. If the timer reaches 0 while the DPSM is in this states, the acknowledgment timeout status flag is set."]
4388 pub fn acktimer(self) -> Reg<regs::Acktimer, RW> {
4389 unsafe { Reg::from_ptr(self.0.add(64usize)) }
4390 }
4391 #[doc = "The receive and transmit FIFOs can be read or written as 32-bit wide registers. The FIFOs contain 32 entries on 32 sequential addresses. This allows the CPU to use its load and store multiple operands to read from/write to the FIFO."]
4392 pub fn idmactrlr(self) -> Reg<regs::Idmactrlr, RW> {
4393 unsafe { Reg::from_ptr(self.0.add(80usize)) }
4394 }
4395 #[doc = "The SDMMC_IDMABSIZER register contains the buffers size when in double buffer configuration."]
4396 pub fn idmabsizer(self) -> Reg<regs::Idmabsizer, RW> {
4397 unsafe { Reg::from_ptr(self.0.add(84usize)) }
4398 }
4399 #[doc = "The SDMMC_IDMABASE0R register contains the memory buffer base address in single buffer configuration and the buffer 0 base address in double buffer configuration."]
4400 pub fn idmabase0r(self) -> Reg<regs::Idmabase0r, RW> {
4401 unsafe { Reg::from_ptr(self.0.add(88usize)) }
4402 }
4403 #[doc = "The SDMMC_IDMABASE1R register contains the double buffer configuration second buffer memory base address."]
4404 pub fn idmabase1r(self) -> Reg<regs::Idmabase1r, RW> {
4405 unsafe { Reg::from_ptr(self.0.add(92usize)) }
4406 }
4407 #[doc = "The receive and transmit FIFOs can be only read or written as word (32-bit) wide registers. The FIFOs contain 16 entries on sequential addresses. This allows the CPU to use its load and store multiple operands to read from/write to the FIFO.When accessing SDMMC_FIFOR with half word or byte access an AHB bus fault is generated."]
4408 pub fn fifor(self) -> Reg<regs::Fifor, RW> {
4409 unsafe { Reg::from_ptr(self.0.add(128usize)) }
4410 }
4411 #[doc = "SDMMC IP version register"]
4412 pub fn ver(self) -> Reg<regs::Ver, R> {
4413 unsafe { Reg::from_ptr(self.0.add(1012usize)) }
4414 }
4415 #[doc = "SDMMC IP identification register"]
4416 pub fn id(self) -> Reg<regs::Id, R> {
4417 unsafe { Reg::from_ptr(self.0.add(1016usize)) }
4418 }
4419 }
4420 pub mod regs {
4421 use crate::generic::*;
4422 #[doc = "The SDMMC_CMDR register contains the command index and command type bits. The command index is sent to a card as part of a command message. The command type bits control the command path state machine (CPSM)."]
4423 #[repr(transparent)] 5041 #[repr(transparent)]
4424 #[derive(Copy, Clone, Eq, PartialEq)] 5042 #[derive(Copy, Clone, Eq, PartialEq)]
4425 pub struct Cmdr(pub u32); 5043 pub struct Cr3(pub u32);
4426 impl Cmdr { 5044 impl Cr3 {
4427 #[doc = "Command index. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). The command index is sent to the card as part of a command message."] 5045 #[doc = "Error interrupt enable"]
4428 pub const fn cmdindex(&self) -> u8 { 5046 pub const fn eie(&self) -> bool {
4429 let val = (self.0 >> 0usize) & 0x3f; 5047 let val = (self.0 >> 0usize) & 0x01;
4430 val as u8
4431 }
4432 #[doc = "Command index. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). The command index is sent to the card as part of a command message."]
4433 pub fn set_cmdindex(&mut self, val: u8) {
4434 self.0 = (self.0 & !(0x3f << 0usize)) | (((val as u32) & 0x3f) << 0usize);
4435 }
4436 #[doc = "The CPSM treats the command as a data transfer command, stops the interrupt period, and signals DataEnable to the DPSM This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). If this bit is set, the CPSM issues an end of interrupt period and issues DataEnable signal to the DPSM when the command is sent."]
4437 pub const fn cmdtrans(&self) -> bool {
4438 let val = (self.0 >> 6usize) & 0x01;
4439 val != 0
4440 }
4441 #[doc = "The CPSM treats the command as a data transfer command, stops the interrupt period, and signals DataEnable to the DPSM This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). If this bit is set, the CPSM issues an end of interrupt period and issues DataEnable signal to the DPSM when the command is sent."]
4442 pub fn set_cmdtrans(&mut self, val: bool) {
4443 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
4444 }
4445 #[doc = "The CPSM treats the command as a Stop Transmission command and signals Abort to the DPSM. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). If this bit is set, the CPSM issues the Abort signal to the DPSM when the command is sent."]
4446 pub const fn cmdstop(&self) -> bool {
4447 let val = (self.0 >> 7usize) & 0x01;
4448 val != 0
4449 }
4450 #[doc = "The CPSM treats the command as a Stop Transmission command and signals Abort to the DPSM. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). If this bit is set, the CPSM issues the Abort signal to the DPSM when the command is sent."]
4451 pub fn set_cmdstop(&mut self, val: bool) {
4452 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
4453 }
4454 #[doc = "Wait for response bits. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). They are used to configure whether the CPSM is to wait for a response, and if yes, which kind of response."]
4455 pub const fn waitresp(&self) -> u8 {
4456 let val = (self.0 >> 8usize) & 0x03;
4457 val as u8
4458 }
4459 #[doc = "Wait for response bits. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). They are used to configure whether the CPSM is to wait for a response, and if yes, which kind of response."]
4460 pub fn set_waitresp(&mut self, val: u8) {
4461 self.0 = (self.0 & !(0x03 << 8usize)) | (((val as u32) & 0x03) << 8usize);
4462 }
4463 #[doc = "CPSM waits for interrupt request. If this bit is set, the CPSM disables command timeout and waits for an card interrupt request (Response). If this bit is cleared in the CPSM Wait state, will cause the abort of the interrupt mode."]
4464 pub const fn waitint(&self) -> bool {
4465 let val = (self.0 >> 10usize) & 0x01;
4466 val != 0
4467 }
4468 #[doc = "CPSM waits for interrupt request. If this bit is set, the CPSM disables command timeout and waits for an card interrupt request (Response). If this bit is cleared in the CPSM Wait state, will cause the abort of the interrupt mode."]
4469 pub fn set_waitint(&mut self, val: bool) {
4470 self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize);
4471 }
4472 #[doc = "CPSM Waits for end of data transfer (CmdPend internal signal) from DPSM. This bit when set, the CPSM waits for the end of data transfer trigger before it starts sending a command. WAITPEND is only taken into account when DTMODE = MMC stream data transfer, WIDBUS = 1-bit wide bus mode, DPSMACT = 1 and DTDIR = from host to card."]
4473 pub const fn waitpend(&self) -> bool {
4474 let val = (self.0 >> 11usize) & 0x01;
4475 val != 0 5048 val != 0
4476 } 5049 }
4477 #[doc = "CPSM Waits for end of data transfer (CmdPend internal signal) from DPSM. This bit when set, the CPSM waits for the end of data transfer trigger before it starts sending a command. WAITPEND is only taken into account when DTMODE = MMC stream data transfer, WIDBUS = 1-bit wide bus mode, DPSMACT = 1 and DTDIR = from host to card."] 5050 #[doc = "Error interrupt enable"]
4478 pub fn set_waitpend(&mut self, val: bool) { 5051 pub fn set_eie(&mut self, val: bool) {
4479 self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); 5052 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
4480 } 5053 }
4481 #[doc = "Command path state machine (CPSM) Enable bit This bit is written 1 by firmware, and cleared by hardware when the CPSM enters the Idle state. If this bit is set, the CPSM is enabled. When DTEN = 1, no command will be transfered nor boot procedure will be started. CPSMEN is cleared to 0."] 5054 #[doc = "IrDA mode enable"]
4482 pub const fn cpsmen(&self) -> bool { 5055 pub const fn iren(&self) -> bool {
4483 let val = (self.0 >> 12usize) & 0x01; 5056 let val = (self.0 >> 1usize) & 0x01;
4484 val != 0 5057 val != 0
4485 } 5058 }
4486 #[doc = "Command path state machine (CPSM) Enable bit This bit is written 1 by firmware, and cleared by hardware when the CPSM enters the Idle state. If this bit is set, the CPSM is enabled. When DTEN = 1, no command will be transfered nor boot procedure will be started. CPSMEN is cleared to 0."] 5059 #[doc = "IrDA mode enable"]
4487 pub fn set_cpsmen(&mut self, val: bool) { 5060 pub fn set_iren(&mut self, val: bool) {
4488 self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); 5061 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
4489 } 5062 }
4490 #[doc = "Hold new data block transmission and reception in the DPSM. If this bit is set, the DPSM will not move from the Wait_S state to the Send state or from the Wait_R state to the Receive state."] 5063 #[doc = "IrDA low-power"]
4491 pub const fn dthold(&self) -> bool { 5064 pub const fn irlp(&self) -> super::vals::Irlp {
4492 let val = (self.0 >> 13usize) & 0x01; 5065 let val = (self.0 >> 2usize) & 0x01;
4493 val != 0 5066 super::vals::Irlp(val as u8)
4494 } 5067 }
4495 #[doc = "Hold new data block transmission and reception in the DPSM. If this bit is set, the DPSM will not move from the Wait_S state to the Send state or from the Wait_R state to the Receive state."] 5068 #[doc = "IrDA low-power"]
4496 pub fn set_dthold(&mut self, val: bool) { 5069 pub fn set_irlp(&mut self, val: super::vals::Irlp) {
4497 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); 5070 self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize);
4498 } 5071 }
4499 #[doc = "Select the boot mode procedure to be used. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0)"] 5072 #[doc = "Half-duplex selection"]
4500 pub const fn bootmode(&self) -> bool { 5073 pub const fn hdsel(&self) -> super::vals::Hdsel {
4501 let val = (self.0 >> 14usize) & 0x01; 5074 let val = (self.0 >> 3usize) & 0x01;
4502 val != 0 5075 super::vals::Hdsel(val as u8)
4503 } 5076 }
4504 #[doc = "Select the boot mode procedure to be used. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0)"] 5077 #[doc = "Half-duplex selection"]
4505 pub fn set_bootmode(&mut self, val: bool) { 5078 pub fn set_hdsel(&mut self, val: super::vals::Hdsel) {
4506 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); 5079 self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize);
4507 } 5080 }
4508 #[doc = "Enable boot mode procedure."] 5081 #[doc = "DMA enable receiver"]
4509 pub const fn booten(&self) -> bool { 5082 pub const fn dmar(&self) -> bool {
4510 let val = (self.0 >> 15usize) & 0x01; 5083 let val = (self.0 >> 6usize) & 0x01;
4511 val != 0 5084 val != 0
4512 } 5085 }
4513 #[doc = "Enable boot mode procedure."] 5086 #[doc = "DMA enable receiver"]
4514 pub fn set_booten(&mut self, val: bool) { 5087 pub fn set_dmar(&mut self, val: bool) {
4515 self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); 5088 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
4516 } 5089 }
4517 #[doc = "The CPSM treats the command as a Suspend or Resume command and signals interrupt period start/end. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). CMDSUSPEND = 1 and CMDTRANS = 0 Suspend command, start interrupt period when response bit BS=0. CMDSUSPEND = 1 and CMDTRANS = 1 Resume command with data, end interrupt period when response bit DF=1."] 5090 #[doc = "DMA enable transmitter"]
4518 pub const fn cmdsuspend(&self) -> bool { 5091 pub const fn dmat(&self) -> bool {
4519 let val = (self.0 >> 16usize) & 0x01; 5092 let val = (self.0 >> 7usize) & 0x01;
4520 val != 0 5093 val != 0
4521 } 5094 }
4522 #[doc = "The CPSM treats the command as a Suspend or Resume command and signals interrupt period start/end. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). CMDSUSPEND = 1 and CMDTRANS = 0 Suspend command, start interrupt period when response bit BS=0. CMDSUSPEND = 1 and CMDTRANS = 1 Resume command with data, end interrupt period when response bit DF=1."] 5095 #[doc = "DMA enable transmitter"]
4523 pub fn set_cmdsuspend(&mut self, val: bool) { 5096 pub fn set_dmat(&mut self, val: bool) {
4524 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); 5097 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
4525 }
4526 }
4527 impl Default for Cmdr {
4528 fn default() -> Cmdr {
4529 Cmdr(0)
4530 }
4531 }
4532 #[doc = "The SDMMC_ACKTIMER register contains the acknowledgment timeout period, in SDMMC_CK bus clock periods. A counter loads the value from the SDMMC_ACKTIMER register, and starts decrementing when the data path state machine (DPSM) enters the Wait_Ack state. If the timer reaches 0 while the DPSM is in this states, the acknowledgment timeout status flag is set."]
4533 #[repr(transparent)]
4534 #[derive(Copy, Clone, Eq, PartialEq)]
4535 pub struct Acktimer(pub u32);
4536 impl Acktimer {
4537 #[doc = "Boot acknowledgment timeout period This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). Boot acknowledgment timeout period expressed in card bus clock periods."]
4538 pub const fn acktime(&self) -> u32 {
4539 let val = (self.0 >> 0usize) & 0x01ff_ffff;
4540 val as u32
4541 }
4542 #[doc = "Boot acknowledgment timeout period This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). Boot acknowledgment timeout period expressed in card bus clock periods."]
4543 pub fn set_acktime(&mut self, val: u32) {
4544 self.0 =
4545 (self.0 & !(0x01ff_ffff << 0usize)) | (((val as u32) & 0x01ff_ffff) << 0usize);
4546 } 5098 }
4547 } 5099 }
4548 impl Default for Acktimer { 5100 impl Default for Cr3 {
4549 fn default() -> Acktimer { 5101 fn default() -> Cr3 {
4550 Acktimer(0) 5102 Cr3(0)
4551 } 5103 }
4552 } 5104 }
4553 #[doc = "The SDMMC_STAR register is a read-only register. It contains two types of flag:Static flags (bits [29,21,11:0]): these bits remain asserted until they are cleared by writing to the SDMMC interrupt Clear register (see SDMMC_ICR)Dynamic flags (bits [20:12]): these bits change state depending on the state of the underlying logic (for example, FIFO full and empty flags are asserted and de-asserted as data while written to the FIFO)"] 5105 #[doc = "Control register 3"]
4554 #[repr(transparent)] 5106 #[repr(transparent)]
4555 #[derive(Copy, Clone, Eq, PartialEq)] 5107 #[derive(Copy, Clone, Eq, PartialEq)]
4556 pub struct Star(pub u32); 5108 pub struct Cr3Usart(pub u32);
4557 impl Star { 5109 impl Cr3Usart {
4558 #[doc = "Command response received (CRC check failed). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] 5110 #[doc = "Error interrupt enable"]
4559 pub const fn ccrcfail(&self) -> bool { 5111 pub const fn eie(&self) -> bool {
4560 let val = (self.0 >> 0usize) & 0x01; 5112 let val = (self.0 >> 0usize) & 0x01;
4561 val != 0 5113 val != 0
4562 } 5114 }
4563 #[doc = "Command response received (CRC check failed). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] 5115 #[doc = "Error interrupt enable"]
4564 pub fn set_ccrcfail(&mut self, val: bool) { 5116 pub fn set_eie(&mut self, val: bool) {
4565 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 5117 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
4566 } 5118 }
4567 #[doc = "Data block sent/received (CRC check failed). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] 5119 #[doc = "IrDA mode enable"]
4568 pub const fn dcrcfail(&self) -> bool { 5120 pub const fn iren(&self) -> bool {
4569 let val = (self.0 >> 1usize) & 0x01; 5121 let val = (self.0 >> 1usize) & 0x01;
4570 val != 0 5122 val != 0
4571 } 5123 }
4572 #[doc = "Data block sent/received (CRC check failed). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] 5124 #[doc = "IrDA mode enable"]
4573 pub fn set_dcrcfail(&mut self, val: bool) { 5125 pub fn set_iren(&mut self, val: bool) {
4574 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); 5126 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
4575 } 5127 }
4576 #[doc = "Command response timeout. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR. The Command Timeout period has a fixed value of 64 SDMMC_CK clock periods."] 5128 #[doc = "IrDA low-power"]
4577 pub const fn ctimeout(&self) -> bool { 5129 pub const fn irlp(&self) -> super::vals::Irlp {
4578 let val = (self.0 >> 2usize) & 0x01; 5130 let val = (self.0 >> 2usize) & 0x01;
4579 val != 0 5131 super::vals::Irlp(val as u8)
4580 } 5132 }
4581 #[doc = "Command response timeout. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR. The Command Timeout period has a fixed value of 64 SDMMC_CK clock periods."] 5133 #[doc = "IrDA low-power"]
4582 pub fn set_ctimeout(&mut self, val: bool) { 5134 pub fn set_irlp(&mut self, val: super::vals::Irlp) {
4583 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); 5135 self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize);
4584 } 5136 }
4585 #[doc = "Data timeout. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] 5137 #[doc = "Half-duplex selection"]
4586 pub const fn dtimeout(&self) -> bool { 5138 pub const fn hdsel(&self) -> super::vals::Hdsel {
4587 let val = (self.0 >> 3usize) & 0x01; 5139 let val = (self.0 >> 3usize) & 0x01;
4588 val != 0 5140 super::vals::Hdsel(val as u8)
4589 } 5141 }
4590 #[doc = "Data timeout. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] 5142 #[doc = "Half-duplex selection"]
4591 pub fn set_dtimeout(&mut self, val: bool) { 5143 pub fn set_hdsel(&mut self, val: super::vals::Hdsel) {
4592 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); 5144 self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize);
4593 } 5145 }
4594 #[doc = "Transmit FIFO underrun error or IDMA read transfer error. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] 5146 #[doc = "Smartcard NACK enable"]
4595 pub const fn txunderr(&self) -> bool { 5147 pub const fn nack(&self) -> bool {
4596 let val = (self.0 >> 4usize) & 0x01; 5148 let val = (self.0 >> 4usize) & 0x01;
4597 val != 0 5149 val != 0
4598 } 5150 }
4599 #[doc = "Transmit FIFO underrun error or IDMA read transfer error. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] 5151 #[doc = "Smartcard NACK enable"]
4600 pub fn set_txunderr(&mut self, val: bool) { 5152 pub fn set_nack(&mut self, val: bool) {
4601 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); 5153 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
4602 } 5154 }
4603 #[doc = "Received FIFO overrun error or IDMA write transfer error. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] 5155 #[doc = "Smartcard mode enable"]
4604 pub const fn rxoverr(&self) -> bool { 5156 pub const fn scen(&self) -> bool {
4605 let val = (self.0 >> 5usize) & 0x01; 5157 let val = (self.0 >> 5usize) & 0x01;
4606 val != 0 5158 val != 0
4607 } 5159 }
4608 #[doc = "Received FIFO overrun error or IDMA write transfer error. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] 5160 #[doc = "Smartcard mode enable"]
4609 pub fn set_rxoverr(&mut self, val: bool) { 5161 pub fn set_scen(&mut self, val: bool) {
4610 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); 5162 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
4611 } 5163 }
4612 #[doc = "Command response received (CRC check passed, or no CRC). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] 5164 #[doc = "DMA enable receiver"]
4613 pub const fn cmdrend(&self) -> bool { 5165 pub const fn dmar(&self) -> bool {
4614 let val = (self.0 >> 6usize) & 0x01; 5166 let val = (self.0 >> 6usize) & 0x01;
4615 val != 0 5167 val != 0
4616 } 5168 }
4617 #[doc = "Command response received (CRC check passed, or no CRC). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] 5169 #[doc = "DMA enable receiver"]
4618 pub fn set_cmdrend(&mut self, val: bool) { 5170 pub fn set_dmar(&mut self, val: bool) {
4619 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); 5171 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
4620 } 5172 }
4621 #[doc = "Command sent (no response required). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] 5173 #[doc = "DMA enable transmitter"]
4622 pub const fn cmdsent(&self) -> bool { 5174 pub const fn dmat(&self) -> bool {
4623 let val = (self.0 >> 7usize) & 0x01; 5175 let val = (self.0 >> 7usize) & 0x01;
4624 val != 0 5176 val != 0
4625 } 5177 }
4626 #[doc = "Command sent (no response required). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] 5178 #[doc = "DMA enable transmitter"]
4627 pub fn set_cmdsent(&mut self, val: bool) { 5179 pub fn set_dmat(&mut self, val: bool) {
4628 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); 5180 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
4629 } 5181 }
4630 #[doc = "Data transfer ended correctly. (data counter, DATACOUNT is zero and no errors occur). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] 5182 #[doc = "RTS enable"]
4631 pub const fn dataend(&self) -> bool { 5183 pub const fn rtse(&self) -> bool {
4632 let val = (self.0 >> 8usize) & 0x01; 5184 let val = (self.0 >> 8usize) & 0x01;
4633 val != 0 5185 val != 0
4634 } 5186 }
4635 #[doc = "Data transfer ended correctly. (data counter, DATACOUNT is zero and no errors occur). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] 5187 #[doc = "RTS enable"]
4636 pub fn set_dataend(&mut self, val: bool) { 5188 pub fn set_rtse(&mut self, val: bool) {
4637 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); 5189 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
4638 } 5190 }
4639 #[doc = "Data transfer Hold. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] 5191 #[doc = "CTS enable"]
4640 pub const fn dhold(&self) -> bool { 5192 pub const fn ctse(&self) -> bool {
4641 let val = (self.0 >> 9usize) & 0x01; 5193 let val = (self.0 >> 9usize) & 0x01;
4642 val != 0 5194 val != 0
4643 } 5195 }
4644 #[doc = "Data transfer Hold. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] 5196 #[doc = "CTS enable"]
4645 pub fn set_dhold(&mut self, val: bool) { 5197 pub fn set_ctse(&mut self, val: bool) {
4646 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); 5198 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
4647 } 5199 }
4648 #[doc = "Data block sent/received. (CRC check passed) and DPSM moves to the READWAIT state. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] 5200 #[doc = "CTS interrupt enable"]
4649 pub const fn dbckend(&self) -> bool { 5201 pub const fn ctsie(&self) -> bool {
4650 let val = (self.0 >> 10usize) & 0x01; 5202 let val = (self.0 >> 10usize) & 0x01;
4651 val != 0 5203 val != 0
4652 } 5204 }
4653 #[doc = "Data block sent/received. (CRC check passed) and DPSM moves to the READWAIT state. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] 5205 #[doc = "CTS interrupt enable"]
4654 pub fn set_dbckend(&mut self, val: bool) { 5206 pub fn set_ctsie(&mut self, val: bool) {
4655 self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); 5207 self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize);
4656 } 5208 }
4657 #[doc = "Data transfer aborted by CMD12. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
4658 pub const fn dabort(&self) -> bool {
4659 let val = (self.0 >> 11usize) & 0x01;
4660 val != 0
4661 }
4662 #[doc = "Data transfer aborted by CMD12. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
4663 pub fn set_dabort(&mut self, val: bool) {
4664 self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize);
4665 }
4666 #[doc = "Data path state machine active, i.e. not in Idle state. This is a hardware status flag only, does not generate an interrupt."]
4667 pub const fn dpsmact(&self) -> bool {
4668 let val = (self.0 >> 12usize) & 0x01;
4669 val != 0
4670 }
4671 #[doc = "Data path state machine active, i.e. not in Idle state. This is a hardware status flag only, does not generate an interrupt."]
4672 pub fn set_dpsmact(&mut self, val: bool) {
4673 self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize);
4674 }
4675 #[doc = "Command path state machine active, i.e. not in Idle state. This is a hardware status flag only, does not generate an interrupt."]
4676 pub const fn cpsmact(&self) -> bool {
4677 let val = (self.0 >> 13usize) & 0x01;
4678 val != 0
4679 }
4680 #[doc = "Command path state machine active, i.e. not in Idle state. This is a hardware status flag only, does not generate an interrupt."]
4681 pub fn set_cpsmact(&mut self, val: bool) {
4682 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize);
4683 }
4684 #[doc = "Transmit FIFO half empty At least half the number of words can be written into the FIFO. This bit is cleared when the FIFO becomes half+1 full."]
4685 pub const fn txfifohe(&self) -> bool {
4686 let val = (self.0 >> 14usize) & 0x01;
4687 val != 0
4688 }
4689 #[doc = "Transmit FIFO half empty At least half the number of words can be written into the FIFO. This bit is cleared when the FIFO becomes half+1 full."]
4690 pub fn set_txfifohe(&mut self, val: bool) {
4691 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize);
4692 }
4693 #[doc = "Receive FIFO half full There are at least half the number of words in the FIFO. This bit is cleared when the FIFO becomes half+1 empty."]
4694 pub const fn rxfifohf(&self) -> bool {
4695 let val = (self.0 >> 15usize) & 0x01;
4696 val != 0
4697 }
4698 #[doc = "Receive FIFO half full There are at least half the number of words in the FIFO. This bit is cleared when the FIFO becomes half+1 empty."]
4699 pub fn set_rxfifohf(&mut self, val: bool) {
4700 self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize);
4701 }
4702 #[doc = "Transmit FIFO full This is a hardware status flag only, does not generate an interrupt. This bit is cleared when one FIFO location becomes empty."]
4703 pub const fn txfifof(&self) -> bool {
4704 let val = (self.0 >> 16usize) & 0x01;
4705 val != 0
4706 }
4707 #[doc = "Transmit FIFO full This is a hardware status flag only, does not generate an interrupt. This bit is cleared when one FIFO location becomes empty."]
4708 pub fn set_txfifof(&mut self, val: bool) {
4709 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
4710 }
4711 #[doc = "Receive FIFO full This bit is cleared when one FIFO location becomes empty."]
4712 pub const fn rxfifof(&self) -> bool {
4713 let val = (self.0 >> 17usize) & 0x01;
4714 val != 0
4715 }
4716 #[doc = "Receive FIFO full This bit is cleared when one FIFO location becomes empty."]
4717 pub fn set_rxfifof(&mut self, val: bool) {
4718 self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize);
4719 }
4720 #[doc = "Transmit FIFO empty This bit is cleared when one FIFO location becomes full."]
4721 pub const fn txfifoe(&self) -> bool {
4722 let val = (self.0 >> 18usize) & 0x01;
4723 val != 0
4724 }
4725 #[doc = "Transmit FIFO empty This bit is cleared when one FIFO location becomes full."]
4726 pub fn set_txfifoe(&mut self, val: bool) {
4727 self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize);
4728 }
4729 #[doc = "Receive FIFO empty This is a hardware status flag only, does not generate an interrupt. This bit is cleared when one FIFO location becomes full."]
4730 pub const fn rxfifoe(&self) -> bool {
4731 let val = (self.0 >> 19usize) & 0x01;
4732 val != 0
4733 }
4734 #[doc = "Receive FIFO empty This is a hardware status flag only, does not generate an interrupt. This bit is cleared when one FIFO location becomes full."]
4735 pub fn set_rxfifoe(&mut self, val: bool) {
4736 self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize);
4737 }
4738 #[doc = "Inverted value of SDMMC_D0 line (Busy), sampled at the end of a CMD response and a second time 2 SDMMC_CK cycles after the CMD response. This bit is reset to not busy when the SDMMCD0 line changes from busy to not busy. This bit does not signal busy due to data transfer. This is a hardware status flag only, it does not generate an interrupt."]
4739 pub const fn busyd0(&self) -> bool {
4740 let val = (self.0 >> 20usize) & 0x01;
4741 val != 0
4742 }
4743 #[doc = "Inverted value of SDMMC_D0 line (Busy), sampled at the end of a CMD response and a second time 2 SDMMC_CK cycles after the CMD response. This bit is reset to not busy when the SDMMCD0 line changes from busy to not busy. This bit does not signal busy due to data transfer. This is a hardware status flag only, it does not generate an interrupt."]
4744 pub fn set_busyd0(&mut self, val: bool) {
4745 self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize);
4746 }
4747 #[doc = "end of SDMMC_D0 Busy following a CMD response detected. This indicates only end of busy following a CMD response. This bit does not signal busy due to data transfer. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
4748 pub const fn busyd0end(&self) -> bool {
4749 let val = (self.0 >> 21usize) & 0x01;
4750 val != 0
4751 }
4752 #[doc = "end of SDMMC_D0 Busy following a CMD response detected. This indicates only end of busy following a CMD response. This bit does not signal busy due to data transfer. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
4753 pub fn set_busyd0end(&mut self, val: bool) {
4754 self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize);
4755 }
4756 #[doc = "SDIO interrupt received. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
4757 pub const fn sdioit(&self) -> bool {
4758 let val = (self.0 >> 22usize) & 0x01;
4759 val != 0
4760 }
4761 #[doc = "SDIO interrupt received. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
4762 pub fn set_sdioit(&mut self, val: bool) {
4763 self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize);
4764 }
4765 #[doc = "Boot acknowledgment received (boot acknowledgment check fail). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
4766 pub const fn ackfail(&self) -> bool {
4767 let val = (self.0 >> 23usize) & 0x01;
4768 val != 0
4769 }
4770 #[doc = "Boot acknowledgment received (boot acknowledgment check fail). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
4771 pub fn set_ackfail(&mut self, val: bool) {
4772 self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize);
4773 }
4774 #[doc = "Boot acknowledgment timeout. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
4775 pub const fn acktimeout(&self) -> bool {
4776 let val = (self.0 >> 24usize) & 0x01;
4777 val != 0
4778 }
4779 #[doc = "Boot acknowledgment timeout. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
4780 pub fn set_acktimeout(&mut self, val: bool) {
4781 self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize);
4782 }
4783 #[doc = "Voltage switch critical timing section completion. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
4784 pub const fn vswend(&self) -> bool {
4785 let val = (self.0 >> 25usize) & 0x01;
4786 val != 0
4787 }
4788 #[doc = "Voltage switch critical timing section completion. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
4789 pub fn set_vswend(&mut self, val: bool) {
4790 self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize);
4791 }
4792 #[doc = "SDMMC_CK stopped in Voltage switch procedure. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
4793 pub const fn ckstop(&self) -> bool {
4794 let val = (self.0 >> 26usize) & 0x01;
4795 val != 0
4796 }
4797 #[doc = "SDMMC_CK stopped in Voltage switch procedure. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
4798 pub fn set_ckstop(&mut self, val: bool) {
4799 self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize);
4800 }
4801 #[doc = "IDMA transfer error. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
4802 pub const fn idmate(&self) -> bool {
4803 let val = (self.0 >> 27usize) & 0x01;
4804 val != 0
4805 }
4806 #[doc = "IDMA transfer error. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
4807 pub fn set_idmate(&mut self, val: bool) {
4808 self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize);
4809 }
4810 #[doc = "IDMA buffer transfer complete. interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
4811 pub const fn idmabtc(&self) -> bool {
4812 let val = (self.0 >> 28usize) & 0x01;
4813 val != 0
4814 }
4815 #[doc = "IDMA buffer transfer complete. interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
4816 pub fn set_idmabtc(&mut self, val: bool) {
4817 self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize);
4818 }
4819 } 5209 }
4820 impl Default for Star { 5210 impl Default for Cr3Usart {
4821 fn default() -> Star { 5211 fn default() -> Cr3Usart {
4822 Star(0) 5212 Cr3Usart(0)
4823 } 5213 }
4824 } 5214 }
4825 #[doc = "The interrupt mask register determines which status flags generate an interrupt request by setting the corresponding bit to 1."] 5215 #[doc = "Status register"]
4826 #[repr(transparent)] 5216 #[repr(transparent)]
4827 #[derive(Copy, Clone, Eq, PartialEq)] 5217 #[derive(Copy, Clone, Eq, PartialEq)]
4828 pub struct Maskr(pub u32); 5218 pub struct SrUsart(pub u32);
4829 impl Maskr { 5219 impl SrUsart {
4830 #[doc = "Command CRC fail interrupt enable Set and cleared by software to enable/disable interrupt caused by command CRC failure."] 5220 #[doc = "Parity error"]
4831 pub const fn ccrcfailie(&self) -> bool { 5221 pub const fn pe(&self) -> bool {
4832 let val = (self.0 >> 0usize) & 0x01; 5222 let val = (self.0 >> 0usize) & 0x01;
4833 val != 0 5223 val != 0
4834 } 5224 }
4835 #[doc = "Command CRC fail interrupt enable Set and cleared by software to enable/disable interrupt caused by command CRC failure."] 5225 #[doc = "Parity error"]
4836 pub fn set_ccrcfailie(&mut self, val: bool) { 5226 pub fn set_pe(&mut self, val: bool) {
4837 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 5227 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
4838 } 5228 }
4839 #[doc = "Data CRC fail interrupt enable Set and cleared by software to enable/disable interrupt caused by data CRC failure."] 5229 #[doc = "Framing error"]
4840 pub const fn dcrcfailie(&self) -> bool { 5230 pub const fn fe(&self) -> bool {
4841 let val = (self.0 >> 1usize) & 0x01; 5231 let val = (self.0 >> 1usize) & 0x01;
4842 val != 0 5232 val != 0
4843 } 5233 }
4844 #[doc = "Data CRC fail interrupt enable Set and cleared by software to enable/disable interrupt caused by data CRC failure."] 5234 #[doc = "Framing error"]
4845 pub fn set_dcrcfailie(&mut self, val: bool) { 5235 pub fn set_fe(&mut self, val: bool) {
4846 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); 5236 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
4847 } 5237 }
4848 #[doc = "Command timeout interrupt enable Set and cleared by software to enable/disable interrupt caused by command timeout."] 5238 #[doc = "Noise error flag"]
4849 pub const fn ctimeoutie(&self) -> bool { 5239 pub const fn ne(&self) -> bool {
4850 let val = (self.0 >> 2usize) & 0x01; 5240 let val = (self.0 >> 2usize) & 0x01;
4851 val != 0 5241 val != 0
4852 } 5242 }
4853 #[doc = "Command timeout interrupt enable Set and cleared by software to enable/disable interrupt caused by command timeout."] 5243 #[doc = "Noise error flag"]
4854 pub fn set_ctimeoutie(&mut self, val: bool) { 5244 pub fn set_ne(&mut self, val: bool) {
4855 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); 5245 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
4856 } 5246 }
4857 #[doc = "Data timeout interrupt enable Set and cleared by software to enable/disable interrupt caused by data timeout."] 5247 #[doc = "Overrun error"]
4858 pub const fn dtimeoutie(&self) -> bool { 5248 pub const fn ore(&self) -> bool {
4859 let val = (self.0 >> 3usize) & 0x01; 5249 let val = (self.0 >> 3usize) & 0x01;
4860 val != 0 5250 val != 0
4861 } 5251 }
4862 #[doc = "Data timeout interrupt enable Set and cleared by software to enable/disable interrupt caused by data timeout."] 5252 #[doc = "Overrun error"]
4863 pub fn set_dtimeoutie(&mut self, val: bool) { 5253 pub fn set_ore(&mut self, val: bool) {
4864 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); 5254 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
4865 } 5255 }
4866 #[doc = "Tx FIFO underrun error interrupt enable Set and cleared by software to enable/disable interrupt caused by Tx FIFO underrun error."] 5256 #[doc = "IDLE line detected"]
4867 pub const fn txunderrie(&self) -> bool { 5257 pub const fn idle(&self) -> bool {
4868 let val = (self.0 >> 4usize) & 0x01; 5258 let val = (self.0 >> 4usize) & 0x01;
4869 val != 0 5259 val != 0
4870 } 5260 }
4871 #[doc = "Tx FIFO underrun error interrupt enable Set and cleared by software to enable/disable interrupt caused by Tx FIFO underrun error."] 5261 #[doc = "IDLE line detected"]
4872 pub fn set_txunderrie(&mut self, val: bool) { 5262 pub fn set_idle(&mut self, val: bool) {
4873 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); 5263 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
4874 } 5264 }
4875 #[doc = "Rx FIFO overrun error interrupt enable Set and cleared by software to enable/disable interrupt caused by Rx FIFO overrun error."] 5265 #[doc = "Read data register not empty"]
4876 pub const fn rxoverrie(&self) -> bool { 5266 pub const fn rxne(&self) -> bool {
4877 let val = (self.0 >> 5usize) & 0x01; 5267 let val = (self.0 >> 5usize) & 0x01;
4878 val != 0 5268 val != 0
4879 } 5269 }
4880 #[doc = "Rx FIFO overrun error interrupt enable Set and cleared by software to enable/disable interrupt caused by Rx FIFO overrun error."] 5270 #[doc = "Read data register not empty"]
4881 pub fn set_rxoverrie(&mut self, val: bool) { 5271 pub fn set_rxne(&mut self, val: bool) {
4882 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); 5272 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
4883 } 5273 }
4884 #[doc = "Command response received interrupt enable Set and cleared by software to enable/disable interrupt caused by receiving command response."] 5274 #[doc = "Transmission complete"]
4885 pub const fn cmdrendie(&self) -> bool { 5275 pub const fn tc(&self) -> bool {
4886 let val = (self.0 >> 6usize) & 0x01; 5276 let val = (self.0 >> 6usize) & 0x01;
4887 val != 0 5277 val != 0
4888 } 5278 }
4889 #[doc = "Command response received interrupt enable Set and cleared by software to enable/disable interrupt caused by receiving command response."] 5279 #[doc = "Transmission complete"]
4890 pub fn set_cmdrendie(&mut self, val: bool) { 5280 pub fn set_tc(&mut self, val: bool) {
4891 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); 5281 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
4892 } 5282 }
4893 #[doc = "Command sent interrupt enable Set and cleared by software to enable/disable interrupt caused by sending command."] 5283 #[doc = "Transmit data register empty"]
4894 pub const fn cmdsentie(&self) -> bool { 5284 pub const fn txe(&self) -> bool {
4895 let val = (self.0 >> 7usize) & 0x01; 5285 let val = (self.0 >> 7usize) & 0x01;
4896 val != 0 5286 val != 0
4897 } 5287 }
4898 #[doc = "Command sent interrupt enable Set and cleared by software to enable/disable interrupt caused by sending command."] 5288 #[doc = "Transmit data register empty"]
4899 pub fn set_cmdsentie(&mut self, val: bool) { 5289 pub fn set_txe(&mut self, val: bool) {
4900 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); 5290 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
4901 } 5291 }
4902 #[doc = "Data end interrupt enable Set and cleared by software to enable/disable interrupt caused by data end."] 5292 #[doc = "LIN break detection flag"]
4903 pub const fn dataendie(&self) -> bool { 5293 pub const fn lbd(&self) -> bool {
4904 let val = (self.0 >> 8usize) & 0x01; 5294 let val = (self.0 >> 8usize) & 0x01;
4905 val != 0 5295 val != 0
4906 } 5296 }
4907 #[doc = "Data end interrupt enable Set and cleared by software to enable/disable interrupt caused by data end."] 5297 #[doc = "LIN break detection flag"]
4908 pub fn set_dataendie(&mut self, val: bool) { 5298 pub fn set_lbd(&mut self, val: bool) {
4909 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); 5299 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
4910 } 5300 }
4911 #[doc = "Data hold interrupt enable Set and cleared by software to enable/disable the interrupt generated when sending new data is hold in the DPSM Wait_S state."] 5301 #[doc = "CTS flag"]
4912 pub const fn dholdie(&self) -> bool { 5302 pub const fn cts(&self) -> bool {
4913 let val = (self.0 >> 9usize) & 0x01; 5303 let val = (self.0 >> 9usize) & 0x01;
4914 val != 0 5304 val != 0
4915 } 5305 }
4916 #[doc = "Data hold interrupt enable Set and cleared by software to enable/disable the interrupt generated when sending new data is hold in the DPSM Wait_S state."] 5306 #[doc = "CTS flag"]
4917 pub fn set_dholdie(&mut self, val: bool) { 5307 pub fn set_cts(&mut self, val: bool) {
4918 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); 5308 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
4919 } 5309 }
4920 #[doc = "Data block end interrupt enable Set and cleared by software to enable/disable interrupt caused by data block end."]
4921 pub const fn dbckendie(&self) -> bool {
4922 let val = (self.0 >> 10usize) & 0x01;
4923 val != 0
4924 }
4925 #[doc = "Data block end interrupt enable Set and cleared by software to enable/disable interrupt caused by data block end."]
4926 pub fn set_dbckendie(&mut self, val: bool) {
4927 self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize);
4928 }
4929 #[doc = "Data transfer aborted interrupt enable Set and cleared by software to enable/disable interrupt caused by a data transfer being aborted."]
4930 pub const fn dabortie(&self) -> bool {
4931 let val = (self.0 >> 11usize) & 0x01;
4932 val != 0
4933 }
4934 #[doc = "Data transfer aborted interrupt enable Set and cleared by software to enable/disable interrupt caused by a data transfer being aborted."]
4935 pub fn set_dabortie(&mut self, val: bool) {
4936 self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize);
4937 }
4938 #[doc = "Tx FIFO half empty interrupt enable Set and cleared by software to enable/disable interrupt caused by Tx FIFO half empty."]
4939 pub const fn txfifoheie(&self) -> bool {
4940 let val = (self.0 >> 14usize) & 0x01;
4941 val != 0
4942 }
4943 #[doc = "Tx FIFO half empty interrupt enable Set and cleared by software to enable/disable interrupt caused by Tx FIFO half empty."]
4944 pub fn set_txfifoheie(&mut self, val: bool) {
4945 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize);
4946 }
4947 #[doc = "Rx FIFO half full interrupt enable Set and cleared by software to enable/disable interrupt caused by Rx FIFO half full."]
4948 pub const fn rxfifohfie(&self) -> bool {
4949 let val = (self.0 >> 15usize) & 0x01;
4950 val != 0
4951 }
4952 #[doc = "Rx FIFO half full interrupt enable Set and cleared by software to enable/disable interrupt caused by Rx FIFO half full."]
4953 pub fn set_rxfifohfie(&mut self, val: bool) {
4954 self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize);
4955 }
4956 #[doc = "Rx FIFO full interrupt enable Set and cleared by software to enable/disable interrupt caused by Rx FIFO full."]
4957 pub const fn rxfifofie(&self) -> bool {
4958 let val = (self.0 >> 17usize) & 0x01;
4959 val != 0
4960 }
4961 #[doc = "Rx FIFO full interrupt enable Set and cleared by software to enable/disable interrupt caused by Rx FIFO full."]
4962 pub fn set_rxfifofie(&mut self, val: bool) {
4963 self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize);
4964 }
4965 #[doc = "Tx FIFO empty interrupt enable Set and cleared by software to enable/disable interrupt caused by Tx FIFO empty."]
4966 pub const fn txfifoeie(&self) -> bool {
4967 let val = (self.0 >> 18usize) & 0x01;
4968 val != 0
4969 }
4970 #[doc = "Tx FIFO empty interrupt enable Set and cleared by software to enable/disable interrupt caused by Tx FIFO empty."]
4971 pub fn set_txfifoeie(&mut self, val: bool) {
4972 self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize);
4973 }
4974 #[doc = "BUSYD0END interrupt enable Set and cleared by software to enable/disable the interrupt generated when SDMMC_D0 signal changes from busy to NOT busy following a CMD response."]
4975 pub const fn busyd0endie(&self) -> bool {
4976 let val = (self.0 >> 21usize) & 0x01;
4977 val != 0
4978 }
4979 #[doc = "BUSYD0END interrupt enable Set and cleared by software to enable/disable the interrupt generated when SDMMC_D0 signal changes from busy to NOT busy following a CMD response."]
4980 pub fn set_busyd0endie(&mut self, val: bool) {
4981 self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize);
4982 }
4983 #[doc = "SDIO mode interrupt received interrupt enable Set and cleared by software to enable/disable the interrupt generated when receiving the SDIO mode interrupt."]
4984 pub const fn sdioitie(&self) -> bool {
4985 let val = (self.0 >> 22usize) & 0x01;
4986 val != 0
4987 }
4988 #[doc = "SDIO mode interrupt received interrupt enable Set and cleared by software to enable/disable the interrupt generated when receiving the SDIO mode interrupt."]
4989 pub fn set_sdioitie(&mut self, val: bool) {
4990 self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize);
4991 }
4992 #[doc = "Acknowledgment Fail interrupt enable Set and cleared by software to enable/disable interrupt caused by acknowledgment Fail."]
4993 pub const fn ackfailie(&self) -> bool {
4994 let val = (self.0 >> 23usize) & 0x01;
4995 val != 0
4996 }
4997 #[doc = "Acknowledgment Fail interrupt enable Set and cleared by software to enable/disable interrupt caused by acknowledgment Fail."]
4998 pub fn set_ackfailie(&mut self, val: bool) {
4999 self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize);
5000 }
5001 #[doc = "Acknowledgment timeout interrupt enable Set and cleared by software to enable/disable interrupt caused by acknowledgment timeout."]
5002 pub const fn acktimeoutie(&self) -> bool {
5003 let val = (self.0 >> 24usize) & 0x01;
5004 val != 0
5005 }
5006 #[doc = "Acknowledgment timeout interrupt enable Set and cleared by software to enable/disable interrupt caused by acknowledgment timeout."]
5007 pub fn set_acktimeoutie(&mut self, val: bool) {
5008 self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize);
5009 }
5010 #[doc = "Voltage switch critical timing section completion interrupt enable Set and cleared by software to enable/disable the interrupt generated when voltage switch critical timing section completion."]
5011 pub const fn vswendie(&self) -> bool {
5012 let val = (self.0 >> 25usize) & 0x01;
5013 val != 0
5014 }
5015 #[doc = "Voltage switch critical timing section completion interrupt enable Set and cleared by software to enable/disable the interrupt generated when voltage switch critical timing section completion."]
5016 pub fn set_vswendie(&mut self, val: bool) {
5017 self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize);
5018 }
5019 #[doc = "Voltage Switch clock stopped interrupt enable Set and cleared by software to enable/disable interrupt caused by Voltage Switch clock stopped."]
5020 pub const fn ckstopie(&self) -> bool {
5021 let val = (self.0 >> 26usize) & 0x01;
5022 val != 0
5023 }
5024 #[doc = "Voltage Switch clock stopped interrupt enable Set and cleared by software to enable/disable interrupt caused by Voltage Switch clock stopped."]
5025 pub fn set_ckstopie(&mut self, val: bool) {
5026 self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize);
5027 }
5028 #[doc = "IDMA buffer transfer complete interrupt enable Set and cleared by software to enable/disable the interrupt generated when the IDMA has transferred all data belonging to a memory buffer."]
5029 pub const fn idmabtcie(&self) -> bool {
5030 let val = (self.0 >> 28usize) & 0x01;
5031 val != 0
5032 }
5033 #[doc = "IDMA buffer transfer complete interrupt enable Set and cleared by software to enable/disable the interrupt generated when the IDMA has transferred all data belonging to a memory buffer."]
5034 pub fn set_idmabtcie(&mut self, val: bool) {
5035 self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize);
5036 }
5037 } 5310 }
5038 impl Default for Maskr { 5311 impl Default for SrUsart {
5039 fn default() -> Maskr { 5312 fn default() -> SrUsart {
5040 Maskr(0) 5313 SrUsart(0)
5041 } 5314 }
5042 } 5315 }
5043 #[doc = "SDMMC power control register"] 5316 #[doc = "Guard time and prescaler register"]
5044 #[repr(transparent)] 5317 #[repr(transparent)]
5045 #[derive(Copy, Clone, Eq, PartialEq)] 5318 #[derive(Copy, Clone, Eq, PartialEq)]
5046 pub struct Power(pub u32); 5319 pub struct Gtpr(pub u32);
5047 impl Power { 5320 impl Gtpr {
5048 #[doc = "SDMMC state control bits. These bits can only be written when the SDMMC is not in the power-on state (PWRCTRL?11). These bits are used to define the functional state of the SDMMC signals: Any further write will be ignored, PWRCTRL value will keep 11."] 5321 #[doc = "Prescaler value"]
5049 pub const fn pwrctrl(&self) -> u8 { 5322 pub const fn psc(&self) -> u8 {
5050 let val = (self.0 >> 0usize) & 0x03; 5323 let val = (self.0 >> 0usize) & 0xff;
5051 val as u8 5324 val as u8
5052 } 5325 }
5053 #[doc = "SDMMC state control bits. These bits can only be written when the SDMMC is not in the power-on state (PWRCTRL?11). These bits are used to define the functional state of the SDMMC signals: Any further write will be ignored, PWRCTRL value will keep 11."] 5326 #[doc = "Prescaler value"]
5054 pub fn set_pwrctrl(&mut self, val: u8) { 5327 pub fn set_psc(&mut self, val: u8) {
5055 self.0 = (self.0 & !(0x03 << 0usize)) | (((val as u32) & 0x03) << 0usize); 5328 self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize);
5056 }
5057 #[doc = "Voltage switch sequence start. This bit is used to start the timing critical section of the voltage switch sequence:"]
5058 pub const fn vswitch(&self) -> bool {
5059 let val = (self.0 >> 2usize) & 0x01;
5060 val != 0
5061 }
5062 #[doc = "Voltage switch sequence start. This bit is used to start the timing critical section of the voltage switch sequence:"]
5063 pub fn set_vswitch(&mut self, val: bool) {
5064 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
5065 }
5066 #[doc = "Voltage switch procedure enable. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). This bit is used to stop the SDMMC_CK after the voltage switch command response:"]
5067 pub const fn vswitchen(&self) -> bool {
5068 let val = (self.0 >> 3usize) & 0x01;
5069 val != 0
5070 }
5071 #[doc = "Voltage switch procedure enable. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). This bit is used to stop the SDMMC_CK after the voltage switch command response:"]
5072 pub fn set_vswitchen(&mut self, val: bool) {
5073 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
5074 } 5329 }
5075 #[doc = "Data and command direction signals polarity selection. This bit can only be written when the SDMMC is in the power-off state (PWRCTRL = 00)."] 5330 #[doc = "Guard time value"]
5076 pub const fn dirpol(&self) -> bool { 5331 pub const fn gt(&self) -> u8 {
5077 let val = (self.0 >> 4usize) & 0x01; 5332 let val = (self.0 >> 8usize) & 0xff;
5078 val != 0 5333 val as u8
5079 } 5334 }
5080 #[doc = "Data and command direction signals polarity selection. This bit can only be written when the SDMMC is in the power-off state (PWRCTRL = 00)."] 5335 #[doc = "Guard time value"]
5081 pub fn set_dirpol(&mut self, val: bool) { 5336 pub fn set_gt(&mut self, val: u8) {
5082 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); 5337 self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize);
5083 } 5338 }
5084 } 5339 }
5085 impl Default for Power { 5340 impl Default for Gtpr {
5086 fn default() -> Power { 5341 fn default() -> Gtpr {
5087 Power(0) 5342 Gtpr(0)
5088 } 5343 }
5089 } 5344 }
5090 #[doc = "The SDMMC_DLENR register contains the number of data bytes to be transferred. The value is loaded into the data counter when data transfer starts."] 5345 #[doc = "Baud rate register"]
5091 #[repr(transparent)] 5346 #[repr(transparent)]
5092 #[derive(Copy, Clone, Eq, PartialEq)] 5347 #[derive(Copy, Clone, Eq, PartialEq)]
5093 pub struct Dlenr(pub u32); 5348 pub struct Brr(pub u32);
5094 impl Dlenr { 5349 impl Brr {
5095 #[doc = "Data length value This register can only be written by firmware when DPSM is inactive (DPSMACT = 0). Number of data bytes to be transferred. When DDR = 1 DATALENGTH is truncated to a multiple of 2. (The last odd byte is not transfered) When DATALENGTH = 0 no data will be transfered, when requested by a CPSMEN and CMDTRANS = 1 also no command will be transfered. DTEN and CPSMEN are cleared to 0."] 5350 #[doc = "fraction of USARTDIV"]
5096 pub const fn datalength(&self) -> u32 { 5351 pub const fn div_fraction(&self) -> u8 {
5097 let val = (self.0 >> 0usize) & 0x01ff_ffff; 5352 let val = (self.0 >> 0usize) & 0x0f;
5098 val as u32 5353 val as u8
5099 } 5354 }
5100 #[doc = "Data length value This register can only be written by firmware when DPSM is inactive (DPSMACT = 0). Number of data bytes to be transferred. When DDR = 1 DATALENGTH is truncated to a multiple of 2. (The last odd byte is not transfered) When DATALENGTH = 0 no data will be transfered, when requested by a CPSMEN and CMDTRANS = 1 also no command will be transfered. DTEN and CPSMEN are cleared to 0."] 5355 #[doc = "fraction of USARTDIV"]
5101 pub fn set_datalength(&mut self, val: u32) { 5356 pub fn set_div_fraction(&mut self, val: u8) {
5102 self.0 = 5357 self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize);
5103 (self.0 & !(0x01ff_ffff << 0usize)) | (((val as u32) & 0x01ff_ffff) << 0usize); 5358 }
5359 #[doc = "mantissa of USARTDIV"]
5360 pub const fn div_mantissa(&self) -> u16 {
5361 let val = (self.0 >> 4usize) & 0x0fff;
5362 val as u16
5363 }
5364 #[doc = "mantissa of USARTDIV"]
5365 pub fn set_div_mantissa(&mut self, val: u16) {
5366 self.0 = (self.0 & !(0x0fff << 4usize)) | (((val as u32) & 0x0fff) << 4usize);
5104 } 5367 }
5105 } 5368 }
5106 impl Default for Dlenr { 5369 impl Default for Brr {
5107 fn default() -> Dlenr { 5370 fn default() -> Brr {
5108 Dlenr(0) 5371 Brr(0)
5109 } 5372 }
5110 } 5373 }
5111 #[doc = "The SDMMC_ICR register is a write-only register. Writing a bit with 1 clears the corresponding bit in the SDMMC_STAR status register."] 5374 #[doc = "Control register 1"]
5112 #[repr(transparent)] 5375 #[repr(transparent)]
5113 #[derive(Copy, Clone, Eq, PartialEq)] 5376 #[derive(Copy, Clone, Eq, PartialEq)]
5114 pub struct Icr(pub u32); 5377 pub struct Cr1(pub u32);
5115 impl Icr { 5378 impl Cr1 {
5116 #[doc = "CCRCFAIL flag clear bit Set by software to clear the CCRCFAIL flag."] 5379 #[doc = "Send break"]
5117 pub const fn ccrcfailc(&self) -> bool { 5380 pub const fn sbk(&self) -> super::vals::Sbk {
5118 let val = (self.0 >> 0usize) & 0x01; 5381 let val = (self.0 >> 0usize) & 0x01;
5119 val != 0 5382 super::vals::Sbk(val as u8)
5120 } 5383 }
5121 #[doc = "CCRCFAIL flag clear bit Set by software to clear the CCRCFAIL flag."] 5384 #[doc = "Send break"]
5122 pub fn set_ccrcfailc(&mut self, val: bool) { 5385 pub fn set_sbk(&mut self, val: super::vals::Sbk) {
5123 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 5386 self.0 = (self.0 & !(0x01 << 0usize)) | (((val.0 as u32) & 0x01) << 0usize);
5124 } 5387 }
5125 #[doc = "DCRCFAIL flag clear bit Set by software to clear the DCRCFAIL flag."] 5388 #[doc = "Receiver wakeup"]
5126 pub const fn dcrcfailc(&self) -> bool { 5389 pub const fn rwu(&self) -> super::vals::Rwu {
5127 let val = (self.0 >> 1usize) & 0x01; 5390 let val = (self.0 >> 1usize) & 0x01;
5128 val != 0 5391 super::vals::Rwu(val as u8)
5129 } 5392 }
5130 #[doc = "DCRCFAIL flag clear bit Set by software to clear the DCRCFAIL flag."] 5393 #[doc = "Receiver wakeup"]
5131 pub fn set_dcrcfailc(&mut self, val: bool) { 5394 pub fn set_rwu(&mut self, val: super::vals::Rwu) {
5132 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); 5395 self.0 = (self.0 & !(0x01 << 1usize)) | (((val.0 as u32) & 0x01) << 1usize);
5133 } 5396 }
5134 #[doc = "CTIMEOUT flag clear bit Set by software to clear the CTIMEOUT flag."] 5397 #[doc = "Receiver enable"]
5135 pub const fn ctimeoutc(&self) -> bool { 5398 pub const fn re(&self) -> bool {
5136 let val = (self.0 >> 2usize) & 0x01; 5399 let val = (self.0 >> 2usize) & 0x01;
5137 val != 0 5400 val != 0
5138 } 5401 }
5139 #[doc = "CTIMEOUT flag clear bit Set by software to clear the CTIMEOUT flag."] 5402 #[doc = "Receiver enable"]
5140 pub fn set_ctimeoutc(&mut self, val: bool) { 5403 pub fn set_re(&mut self, val: bool) {
5141 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); 5404 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
5142 } 5405 }
5143 #[doc = "DTIMEOUT flag clear bit Set by software to clear the DTIMEOUT flag."] 5406 #[doc = "Transmitter enable"]
5144 pub const fn dtimeoutc(&self) -> bool { 5407 pub const fn te(&self) -> bool {
5145 let val = (self.0 >> 3usize) & 0x01; 5408 let val = (self.0 >> 3usize) & 0x01;
5146 val != 0 5409 val != 0
5147 } 5410 }
5148 #[doc = "DTIMEOUT flag clear bit Set by software to clear the DTIMEOUT flag."] 5411 #[doc = "Transmitter enable"]
5149 pub fn set_dtimeoutc(&mut self, val: bool) { 5412 pub fn set_te(&mut self, val: bool) {
5150 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); 5413 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
5151 } 5414 }
5152 #[doc = "TXUNDERR flag clear bit Set by software to clear TXUNDERR flag."] 5415 #[doc = "IDLE interrupt enable"]
5153 pub const fn txunderrc(&self) -> bool { 5416 pub const fn idleie(&self) -> bool {
5154 let val = (self.0 >> 4usize) & 0x01; 5417 let val = (self.0 >> 4usize) & 0x01;
5155 val != 0 5418 val != 0
5156 } 5419 }
5157 #[doc = "TXUNDERR flag clear bit Set by software to clear TXUNDERR flag."] 5420 #[doc = "IDLE interrupt enable"]
5158 pub fn set_txunderrc(&mut self, val: bool) { 5421 pub fn set_idleie(&mut self, val: bool) {
5159 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); 5422 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
5160 } 5423 }
5161 #[doc = "RXOVERR flag clear bit Set by software to clear the RXOVERR flag."] 5424 #[doc = "RXNE interrupt enable"]
5162 pub const fn rxoverrc(&self) -> bool { 5425 pub const fn rxneie(&self) -> bool {
5163 let val = (self.0 >> 5usize) & 0x01; 5426 let val = (self.0 >> 5usize) & 0x01;
5164 val != 0 5427 val != 0
5165 } 5428 }
5166 #[doc = "RXOVERR flag clear bit Set by software to clear the RXOVERR flag."] 5429 #[doc = "RXNE interrupt enable"]
5167 pub fn set_rxoverrc(&mut self, val: bool) { 5430 pub fn set_rxneie(&mut self, val: bool) {
5168 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); 5431 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
5169 } 5432 }
5170 #[doc = "CMDREND flag clear bit Set by software to clear the CMDREND flag."] 5433 #[doc = "Transmission complete interrupt enable"]
5171 pub const fn cmdrendc(&self) -> bool { 5434 pub const fn tcie(&self) -> bool {
5172 let val = (self.0 >> 6usize) & 0x01; 5435 let val = (self.0 >> 6usize) & 0x01;
5173 val != 0 5436 val != 0
5174 } 5437 }
5175 #[doc = "CMDREND flag clear bit Set by software to clear the CMDREND flag."] 5438 #[doc = "Transmission complete interrupt enable"]
5176 pub fn set_cmdrendc(&mut self, val: bool) { 5439 pub fn set_tcie(&mut self, val: bool) {
5177 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); 5440 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
5178 } 5441 }
5179 #[doc = "CMDSENT flag clear bit Set by software to clear the CMDSENT flag."] 5442 #[doc = "TXE interrupt enable"]
5180 pub const fn cmdsentc(&self) -> bool { 5443 pub const fn txeie(&self) -> bool {
5181 let val = (self.0 >> 7usize) & 0x01; 5444 let val = (self.0 >> 7usize) & 0x01;
5182 val != 0 5445 val != 0
5183 } 5446 }
5184 #[doc = "CMDSENT flag clear bit Set by software to clear the CMDSENT flag."] 5447 #[doc = "TXE interrupt enable"]
5185 pub fn set_cmdsentc(&mut self, val: bool) { 5448 pub fn set_txeie(&mut self, val: bool) {
5186 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); 5449 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
5187 } 5450 }
5188 #[doc = "DATAEND flag clear bit Set by software to clear the DATAEND flag."] 5451 #[doc = "PE interrupt enable"]
5189 pub const fn dataendc(&self) -> bool { 5452 pub const fn peie(&self) -> bool {
5190 let val = (self.0 >> 8usize) & 0x01;
5191 val != 0
5192 }
5193 #[doc = "DATAEND flag clear bit Set by software to clear the DATAEND flag."]
5194 pub fn set_dataendc(&mut self, val: bool) {
5195 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
5196 }
5197 #[doc = "DHOLD flag clear bit Set by software to clear the DHOLD flag."]
5198 pub const fn dholdc(&self) -> bool {
5199 let val = (self.0 >> 9usize) & 0x01;
5200 val != 0
5201 }
5202 #[doc = "DHOLD flag clear bit Set by software to clear the DHOLD flag."]
5203 pub fn set_dholdc(&mut self, val: bool) {
5204 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
5205 }
5206 #[doc = "DBCKEND flag clear bit Set by software to clear the DBCKEND flag."]
5207 pub const fn dbckendc(&self) -> bool {
5208 let val = (self.0 >> 10usize) & 0x01;
5209 val != 0
5210 }
5211 #[doc = "DBCKEND flag clear bit Set by software to clear the DBCKEND flag."]
5212 pub fn set_dbckendc(&mut self, val: bool) {
5213 self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize);
5214 }
5215 #[doc = "DABORT flag clear bit Set by software to clear the DABORT flag."]
5216 pub const fn dabortc(&self) -> bool {
5217 let val = (self.0 >> 11usize) & 0x01;
5218 val != 0
5219 }
5220 #[doc = "DABORT flag clear bit Set by software to clear the DABORT flag."]
5221 pub fn set_dabortc(&mut self, val: bool) {
5222 self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize);
5223 }
5224 #[doc = "BUSYD0END flag clear bit Set by software to clear the BUSYD0END flag."]
5225 pub const fn busyd0endc(&self) -> bool {
5226 let val = (self.0 >> 21usize) & 0x01;
5227 val != 0
5228 }
5229 #[doc = "BUSYD0END flag clear bit Set by software to clear the BUSYD0END flag."]
5230 pub fn set_busyd0endc(&mut self, val: bool) {
5231 self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize);
5232 }
5233 #[doc = "SDIOIT flag clear bit Set by software to clear the SDIOIT flag."]
5234 pub const fn sdioitc(&self) -> bool {
5235 let val = (self.0 >> 22usize) & 0x01;
5236 val != 0
5237 }
5238 #[doc = "SDIOIT flag clear bit Set by software to clear the SDIOIT flag."]
5239 pub fn set_sdioitc(&mut self, val: bool) {
5240 self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize);
5241 }
5242 #[doc = "ACKFAIL flag clear bit Set by software to clear the ACKFAIL flag."]
5243 pub const fn ackfailc(&self) -> bool {
5244 let val = (self.0 >> 23usize) & 0x01;
5245 val != 0
5246 }
5247 #[doc = "ACKFAIL flag clear bit Set by software to clear the ACKFAIL flag."]
5248 pub fn set_ackfailc(&mut self, val: bool) {
5249 self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize);
5250 }
5251 #[doc = "ACKTIMEOUT flag clear bit Set by software to clear the ACKTIMEOUT flag."]
5252 pub const fn acktimeoutc(&self) -> bool {
5253 let val = (self.0 >> 24usize) & 0x01;
5254 val != 0
5255 }
5256 #[doc = "ACKTIMEOUT flag clear bit Set by software to clear the ACKTIMEOUT flag."]
5257 pub fn set_acktimeoutc(&mut self, val: bool) {
5258 self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize);
5259 }
5260 #[doc = "VSWEND flag clear bit Set by software to clear the VSWEND flag."]
5261 pub const fn vswendc(&self) -> bool {
5262 let val = (self.0 >> 25usize) & 0x01;
5263 val != 0
5264 }
5265 #[doc = "VSWEND flag clear bit Set by software to clear the VSWEND flag."]
5266 pub fn set_vswendc(&mut self, val: bool) {
5267 self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize);
5268 }
5269 #[doc = "CKSTOP flag clear bit Set by software to clear the CKSTOP flag."]
5270 pub const fn ckstopc(&self) -> bool {
5271 let val = (self.0 >> 26usize) & 0x01;
5272 val != 0
5273 }
5274 #[doc = "CKSTOP flag clear bit Set by software to clear the CKSTOP flag."]
5275 pub fn set_ckstopc(&mut self, val: bool) {
5276 self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize);
5277 }
5278 #[doc = "IDMA transfer error clear bit Set by software to clear the IDMATE flag."]
5279 pub const fn idmatec(&self) -> bool {
5280 let val = (self.0 >> 27usize) & 0x01;
5281 val != 0
5282 }
5283 #[doc = "IDMA transfer error clear bit Set by software to clear the IDMATE flag."]
5284 pub fn set_idmatec(&mut self, val: bool) {
5285 self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize);
5286 }
5287 #[doc = "IDMA buffer transfer complete clear bit Set by software to clear the IDMABTC flag."]
5288 pub const fn idmabtcc(&self) -> bool {
5289 let val = (self.0 >> 28usize) & 0x01;
5290 val != 0
5291 }
5292 #[doc = "IDMA buffer transfer complete clear bit Set by software to clear the IDMABTC flag."]
5293 pub fn set_idmabtcc(&mut self, val: bool) {
5294 self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize);
5295 }
5296 }
5297 impl Default for Icr {
5298 fn default() -> Icr {
5299 Icr(0)
5300 }
5301 }
5302 #[doc = "The SDMMC_RESP1/2/3/4R registers contain the status of a card, which is part of the received response."]
5303 #[repr(transparent)]
5304 #[derive(Copy, Clone, Eq, PartialEq)]
5305 pub struct Resp1r(pub u32);
5306 impl Resp1r {
5307 #[doc = "see Table 432"]
5308 pub const fn cardstatus1(&self) -> u32 {
5309 let val = (self.0 >> 0usize) & 0xffff_ffff;
5310 val as u32
5311 }
5312 #[doc = "see Table 432"]
5313 pub fn set_cardstatus1(&mut self, val: u32) {
5314 self.0 =
5315 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
5316 }
5317 }
5318 impl Default for Resp1r {
5319 fn default() -> Resp1r {
5320 Resp1r(0)
5321 }
5322 }
5323 #[doc = "The SDMMC_DCTRL register control the data path state machine (DPSM)."]
5324 #[repr(transparent)]
5325 #[derive(Copy, Clone, Eq, PartialEq)]
5326 pub struct Dctrl(pub u32);
5327 impl Dctrl {
5328 #[doc = "Data transfer enable bit This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0). This bit is cleared by Hardware when data transfer completes. This bit shall only be used to transfer data when no associated data transfer command is used, i.e. shall not be used with SD or eMMC cards."]
5329 pub const fn dten(&self) -> bool {
5330 let val = (self.0 >> 0usize) & 0x01;
5331 val != 0
5332 }
5333 #[doc = "Data transfer enable bit This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0). This bit is cleared by Hardware when data transfer completes. This bit shall only be used to transfer data when no associated data transfer command is used, i.e. shall not be used with SD or eMMC cards."]
5334 pub fn set_dten(&mut self, val: bool) {
5335 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
5336 }
5337 #[doc = "Data transfer direction selection This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
5338 pub const fn dtdir(&self) -> bool {
5339 let val = (self.0 >> 1usize) & 0x01;
5340 val != 0
5341 }
5342 #[doc = "Data transfer direction selection This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
5343 pub fn set_dtdir(&mut self, val: bool) {
5344 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
5345 }
5346 #[doc = "Data transfer mode selection. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
5347 pub const fn dtmode(&self) -> u8 {
5348 let val = (self.0 >> 2usize) & 0x03;
5349 val as u8
5350 }
5351 #[doc = "Data transfer mode selection. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
5352 pub fn set_dtmode(&mut self, val: u8) {
5353 self.0 = (self.0 & !(0x03 << 2usize)) | (((val as u32) & 0x03) << 2usize);
5354 }
5355 #[doc = "Data block size This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0). Define the data block length when the block data transfer mode is selected: When DATALENGTH is not a multiple of DBLOCKSIZE, the transfered data is truncated at a multiple of DBLOCKSIZE. (Any remain data will not be transfered.) When DDR = 1, DBLOCKSIZE = 0000 shall not be used. (No data will be transfered)"]
5356 pub const fn dblocksize(&self) -> u8 {
5357 let val = (self.0 >> 4usize) & 0x0f;
5358 val as u8
5359 }
5360 #[doc = "Data block size This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0). Define the data block length when the block data transfer mode is selected: When DATALENGTH is not a multiple of DBLOCKSIZE, the transfered data is truncated at a multiple of DBLOCKSIZE. (Any remain data will not be transfered.) When DDR = 1, DBLOCKSIZE = 0000 shall not be used. (No data will be transfered)"]
5361 pub fn set_dblocksize(&mut self, val: u8) {
5362 self.0 = (self.0 & !(0x0f << 4usize)) | (((val as u32) & 0x0f) << 4usize);
5363 }
5364 #[doc = "Read wait start. If this bit is set, read wait operation starts."]
5365 pub const fn rwstart(&self) -> bool {
5366 let val = (self.0 >> 8usize) & 0x01; 5453 let val = (self.0 >> 8usize) & 0x01;
5367 val != 0 5454 val != 0
5368 } 5455 }
5369 #[doc = "Read wait start. If this bit is set, read wait operation starts."] 5456 #[doc = "PE interrupt enable"]
5370 pub fn set_rwstart(&mut self, val: bool) { 5457 pub fn set_peie(&mut self, val: bool) {
5371 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); 5458 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
5372 } 5459 }
5373 #[doc = "Read wait stop This bit is written by firmware and auto cleared by hardware when the DPSM moves from the READ_WAIT state to the WAIT_R or IDLE state."] 5460 #[doc = "Parity selection"]
5374 pub const fn rwstop(&self) -> bool { 5461 pub const fn ps(&self) -> super::vals::Ps {
5375 let val = (self.0 >> 9usize) & 0x01; 5462 let val = (self.0 >> 9usize) & 0x01;
5376 val != 0 5463 super::vals::Ps(val as u8)
5377 } 5464 }
5378 #[doc = "Read wait stop This bit is written by firmware and auto cleared by hardware when the DPSM moves from the READ_WAIT state to the WAIT_R or IDLE state."] 5465 #[doc = "Parity selection"]
5379 pub fn set_rwstop(&mut self, val: bool) { 5466 pub fn set_ps(&mut self, val: super::vals::Ps) {
5380 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); 5467 self.0 = (self.0 & !(0x01 << 9usize)) | (((val.0 as u32) & 0x01) << 9usize);
5381 } 5468 }
5382 #[doc = "Read wait mode. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] 5469 #[doc = "Parity control enable"]
5383 pub const fn rwmod(&self) -> bool { 5470 pub const fn pce(&self) -> bool {
5384 let val = (self.0 >> 10usize) & 0x01; 5471 let val = (self.0 >> 10usize) & 0x01;
5385 val != 0 5472 val != 0
5386 } 5473 }
5387 #[doc = "Read wait mode. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] 5474 #[doc = "Parity control enable"]
5388 pub fn set_rwmod(&mut self, val: bool) { 5475 pub fn set_pce(&mut self, val: bool) {
5389 self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); 5476 self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize);
5390 } 5477 }
5391 #[doc = "SD I/O interrupt enable functions This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0). If this bit is set, the DPSM enables the SD I/O card specific interrupt operation."] 5478 #[doc = "Wakeup method"]
5392 pub const fn sdioen(&self) -> bool { 5479 pub const fn wake(&self) -> super::vals::Wake {
5393 let val = (self.0 >> 11usize) & 0x01; 5480 let val = (self.0 >> 11usize) & 0x01;
5394 val != 0 5481 super::vals::Wake(val as u8)
5395 } 5482 }
5396 #[doc = "SD I/O interrupt enable functions This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0). If this bit is set, the DPSM enables the SD I/O card specific interrupt operation."] 5483 #[doc = "Wakeup method"]
5397 pub fn set_sdioen(&mut self, val: bool) { 5484 pub fn set_wake(&mut self, val: super::vals::Wake) {
5398 self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); 5485 self.0 = (self.0 & !(0x01 << 11usize)) | (((val.0 as u32) & 0x01) << 11usize);
5399 } 5486 }
5400 #[doc = "Enable the reception of the boot acknowledgment. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] 5487 #[doc = "Word length"]
5401 pub const fn bootacken(&self) -> bool { 5488 pub const fn m(&self) -> super::vals::M {
5402 let val = (self.0 >> 12usize) & 0x01; 5489 let val = (self.0 >> 12usize) & 0x01;
5403 val != 0 5490 super::vals::M(val as u8)
5404 } 5491 }
5405 #[doc = "Enable the reception of the boot acknowledgment. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] 5492 #[doc = "Word length"]
5406 pub fn set_bootacken(&mut self, val: bool) { 5493 pub fn set_m(&mut self, val: super::vals::M) {
5407 self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); 5494 self.0 = (self.0 & !(0x01 << 12usize)) | (((val.0 as u32) & 0x01) << 12usize);
5408 } 5495 }
5409 #[doc = "FIFO reset, will flush any remaining data. This bit can only be written by firmware when IDMAEN= 0 and DPSM is active (DPSMACT = 1). This bit will only take effect when a transfer error or transfer hold occurs."] 5496 #[doc = "USART enable"]
5410 pub const fn fiforst(&self) -> bool { 5497 pub const fn ue(&self) -> bool {
5411 let val = (self.0 >> 13usize) & 0x01; 5498 let val = (self.0 >> 13usize) & 0x01;
5412 val != 0 5499 val != 0
5413 } 5500 }
5414 #[doc = "FIFO reset, will flush any remaining data. This bit can only be written by firmware when IDMAEN= 0 and DPSM is active (DPSMACT = 1). This bit will only take effect when a transfer error or transfer hold occurs."] 5501 #[doc = "USART enable"]
5415 pub fn set_fiforst(&mut self, val: bool) { 5502 pub fn set_ue(&mut self, val: bool) {
5416 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); 5503 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize);
5417 } 5504 }
5418 } 5505 }
5419 impl Default for Dctrl { 5506 impl Default for Cr1 {
5420 fn default() -> Dctrl { 5507 fn default() -> Cr1 {
5421 Dctrl(0) 5508 Cr1(0)
5422 }
5423 }
5424 #[doc = "The SDMMC_DCNTR register loads the value from the data length register (see SDMMC_DLENR) when the DPSM moves from the Idle state to the Wait_R or Wait_S state. As data is transferred, the counter decrements the value until it reaches 0. The DPSM then moves to the Idle state and when there has been no error, the data status end flag (DATAEND) is set."]
5425 #[repr(transparent)]
5426 #[derive(Copy, Clone, Eq, PartialEq)]
5427 pub struct Dcntr(pub u32);
5428 impl Dcntr {
5429 #[doc = "Data count value When read, the number of remaining data bytes to be transferred is returned. Write has no effect."]
5430 pub const fn datacount(&self) -> u32 {
5431 let val = (self.0 >> 0usize) & 0x01ff_ffff;
5432 val as u32
5433 }
5434 #[doc = "Data count value When read, the number of remaining data bytes to be transferred is returned. Write has no effect."]
5435 pub fn set_datacount(&mut self, val: u32) {
5436 self.0 =
5437 (self.0 & !(0x01ff_ffff << 0usize)) | (((val as u32) & 0x01ff_ffff) << 0usize);
5438 }
5439 }
5440 impl Default for Dcntr {
5441 fn default() -> Dcntr {
5442 Dcntr(0)
5443 }
5444 }
5445 #[doc = "The SDMMC_CLKCR register controls the SDMMC_CK output clock, the SDMMC_RX_CLK receive clock, and the bus width."]
5446 #[repr(transparent)]
5447 #[derive(Copy, Clone, Eq, PartialEq)]
5448 pub struct Clkcr(pub u32);
5449 impl Clkcr {
5450 #[doc = "Clock divide factor This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0). This field defines the divide factor between the input clock (SDMMCCLK) and the output clock (SDMMC_CK): SDMMC_CK frequency = SDMMCCLK / [2 * CLKDIV]. 0xx: etc.. xxx: etc.."]
5451 pub const fn clkdiv(&self) -> u16 {
5452 let val = (self.0 >> 0usize) & 0x03ff;
5453 val as u16
5454 }
5455 #[doc = "Clock divide factor This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0). This field defines the divide factor between the input clock (SDMMCCLK) and the output clock (SDMMC_CK): SDMMC_CK frequency = SDMMCCLK / [2 * CLKDIV]. 0xx: etc.. xxx: etc.."]
5456 pub fn set_clkdiv(&mut self, val: u16) {
5457 self.0 = (self.0 & !(0x03ff << 0usize)) | (((val as u32) & 0x03ff) << 0usize);
5458 }
5459 #[doc = "Power saving configuration bit This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0) For power saving, the SDMMC_CK clock output can be disabled when the bus is idle by setting PWRSAV:"]
5460 pub const fn pwrsav(&self) -> bool {
5461 let val = (self.0 >> 12usize) & 0x01;
5462 val != 0
5463 }
5464 #[doc = "Power saving configuration bit This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0) For power saving, the SDMMC_CK clock output can be disabled when the bus is idle by setting PWRSAV:"]
5465 pub fn set_pwrsav(&mut self, val: bool) {
5466 self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize);
5467 }
5468 #[doc = "Wide bus mode enable bit This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0)"]
5469 pub const fn widbus(&self) -> u8 {
5470 let val = (self.0 >> 14usize) & 0x03;
5471 val as u8
5472 }
5473 #[doc = "Wide bus mode enable bit This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0)"]
5474 pub fn set_widbus(&mut self, val: u8) {
5475 self.0 = (self.0 & !(0x03 << 14usize)) | (((val as u32) & 0x03) << 14usize);
5476 }
5477 #[doc = "SDMMC_CK dephasing selection bit for data and Command. This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0). When clock division = 1 (CLKDIV = 0), this bit has no effect. Data and Command change on SDMMC_CK falling edge. When clock division &gt;1 (CLKDIV &gt; 0) &amp; DDR = 0: - SDMMC_CK edge occurs on SDMMCCLK rising edge. When clock division >1 (CLKDIV > 0) & DDR = 1: - Data changed on the SDMMCCLK falling edge succeeding a SDMMC_CK edge. - SDMMC_CK edge occurs on SDMMCCLK rising edge. - Data changed on the SDMMC_CK falling edge succeeding a SDMMC_CK edge. - SDMMC_CK edge occurs on SDMMCCLK rising edge."]
5478 pub const fn negedge(&self) -> bool {
5479 let val = (self.0 >> 16usize) & 0x01;
5480 val != 0
5481 }
5482 #[doc = "SDMMC_CK dephasing selection bit for data and Command. This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0). When clock division = 1 (CLKDIV = 0), this bit has no effect. Data and Command change on SDMMC_CK falling edge. When clock division &gt;1 (CLKDIV &gt; 0) &amp; DDR = 0: - SDMMC_CK edge occurs on SDMMCCLK rising edge. When clock division >1 (CLKDIV > 0) & DDR = 1: - Data changed on the SDMMCCLK falling edge succeeding a SDMMC_CK edge. - SDMMC_CK edge occurs on SDMMCCLK rising edge. - Data changed on the SDMMC_CK falling edge succeeding a SDMMC_CK edge. - SDMMC_CK edge occurs on SDMMCCLK rising edge."]
5483 pub fn set_negedge(&mut self, val: bool) {
5484 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
5485 }
5486 #[doc = "Hardware flow control enable This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0) When Hardware flow control is enabled, the meaning of the TXFIFOE and RXFIFOF flags change, please see SDMMC status register definition in Section56.8.11."]
5487 pub const fn hwfc_en(&self) -> bool {
5488 let val = (self.0 >> 17usize) & 0x01;
5489 val != 0
5490 }
5491 #[doc = "Hardware flow control enable This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0) When Hardware flow control is enabled, the meaning of the TXFIFOE and RXFIFOF flags change, please see SDMMC status register definition in Section56.8.11."]
5492 pub fn set_hwfc_en(&mut self, val: bool) {
5493 self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize);
5494 }
5495 #[doc = "Data rate signaling selection This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0) DDR rate shall only be selected with 4-bit or 8-bit wide bus mode. (WIDBUS &gt; 00). DDR = 1 has no effect when WIDBUS = 00 (1-bit wide bus). DDR rate shall only be selected with clock division &gt;1. (CLKDIV &gt; 0)"]
5496 pub const fn ddr(&self) -> bool {
5497 let val = (self.0 >> 18usize) & 0x01;
5498 val != 0
5499 }
5500 #[doc = "Data rate signaling selection This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0) DDR rate shall only be selected with 4-bit or 8-bit wide bus mode. (WIDBUS &gt; 00). DDR = 1 has no effect when WIDBUS = 00 (1-bit wide bus). DDR rate shall only be selected with clock division &gt;1. (CLKDIV &gt; 0)"]
5501 pub fn set_ddr(&mut self, val: bool) {
5502 self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize);
5503 }
5504 #[doc = "Bus speed mode selection between DS, HS, SDR12, SDR25 and SDR50, DDR50, SDR104. This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0)"]
5505 pub const fn busspeed(&self) -> bool {
5506 let val = (self.0 >> 19usize) & 0x01;
5507 val != 0
5508 }
5509 #[doc = "Bus speed mode selection between DS, HS, SDR12, SDR25 and SDR50, DDR50, SDR104. This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0)"]
5510 pub fn set_busspeed(&mut self, val: bool) {
5511 self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize);
5512 }
5513 #[doc = "Receive clock selection. These bits can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0)"]
5514 pub const fn selclkrx(&self) -> u8 {
5515 let val = (self.0 >> 20usize) & 0x03;
5516 val as u8
5517 }
5518 #[doc = "Receive clock selection. These bits can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0)"]
5519 pub fn set_selclkrx(&mut self, val: u8) {
5520 self.0 = (self.0 & !(0x03 << 20usize)) | (((val as u32) & 0x03) << 20usize);
5521 }
5522 }
5523 impl Default for Clkcr {
5524 fn default() -> Clkcr {
5525 Clkcr(0)
5526 }
5527 }
5528 #[doc = "The SDMMC_ARGR register contains a 32-bit command argument, which is sent to a card as part of a command message."]
5529 #[repr(transparent)]
5530 #[derive(Copy, Clone, Eq, PartialEq)]
5531 pub struct Argr(pub u32);
5532 impl Argr {
5533 #[doc = "Command argument. These bits can only be written by firmware when CPSM is disabled (CPSMEN = 0). Command argument sent to a card as part of a command message. If a command contains an argument, it must be loaded into this register before writing a command to the command register."]
5534 pub const fn cmdarg(&self) -> u32 {
5535 let val = (self.0 >> 0usize) & 0xffff_ffff;
5536 val as u32
5537 }
5538 #[doc = "Command argument. These bits can only be written by firmware when CPSM is disabled (CPSMEN = 0). Command argument sent to a card as part of a command message. If a command contains an argument, it must be loaded into this register before writing a command to the command register."]
5539 pub fn set_cmdarg(&mut self, val: u32) {
5540 self.0 =
5541 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
5542 }
5543 }
5544 impl Default for Argr {
5545 fn default() -> Argr {
5546 Argr(0)
5547 }
5548 }
5549 #[doc = "The receive and transmit FIFOs can be read or written as 32-bit wide registers. The FIFOs contain 32 entries on 32 sequential addresses. This allows the CPU to use its load and store multiple operands to read from/write to the FIFO."]
5550 #[repr(transparent)]
5551 #[derive(Copy, Clone, Eq, PartialEq)]
5552 pub struct Idmactrlr(pub u32);
5553 impl Idmactrlr {
5554 #[doc = "IDMA enable This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
5555 pub const fn idmaen(&self) -> bool {
5556 let val = (self.0 >> 0usize) & 0x01;
5557 val != 0
5558 }
5559 #[doc = "IDMA enable This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
5560 pub fn set_idmaen(&mut self, val: bool) {
5561 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
5562 }
5563 #[doc = "Buffer mode selection. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
5564 pub const fn idmabmode(&self) -> bool {
5565 let val = (self.0 >> 1usize) & 0x01;
5566 val != 0
5567 }
5568 #[doc = "Buffer mode selection. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
5569 pub fn set_idmabmode(&mut self, val: bool) {
5570 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
5571 }
5572 #[doc = "Double buffer mode active buffer indication This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0). When IDMA is enabled this bit is toggled by hardware."]
5573 pub const fn idmabact(&self) -> bool {
5574 let val = (self.0 >> 2usize) & 0x01;
5575 val != 0
5576 }
5577 #[doc = "Double buffer mode active buffer indication This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0). When IDMA is enabled this bit is toggled by hardware."]
5578 pub fn set_idmabact(&mut self, val: bool) {
5579 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
5580 }
5581 }
5582 impl Default for Idmactrlr {
5583 fn default() -> Idmactrlr {
5584 Idmactrlr(0)
5585 } 5509 }
5586 } 5510 }
5587 #[doc = "The receive and transmit FIFOs can be only read or written as word (32-bit) wide registers. The FIFOs contain 16 entries on sequential addresses. This allows the CPU to use its load and store multiple operands to read from/write to the FIFO.When accessing SDMMC_FIFOR with half word or byte access an AHB bus fault is generated."] 5511 }
5512 pub mod vals {
5513 use crate::generic::*;
5588 #[repr(transparent)] 5514 #[repr(transparent)]
5589 #[derive(Copy, Clone, Eq, PartialEq)] 5515 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5590 pub struct Fifor(pub u32); 5516 pub struct Cpha(pub u8);
5591 impl Fifor { 5517 impl Cpha {
5592 #[doc = "Receive and transmit FIFO data This register can only be read or written by firmware when the DPSM is active (DPSMACT=1). The FIFO data occupies 16 entries of 32-bit words."] 5518 #[doc = "The first clock transition is the first data capture edge"]
5593 pub const fn fifodata(&self) -> u32 { 5519 pub const FIRST: Self = Self(0);
5594 let val = (self.0 >> 0usize) & 0xffff_ffff; 5520 #[doc = "The second clock transition is the first data capture edge"]
5595 val as u32 5521 pub const SECOND: Self = Self(0x01);
5596 }
5597 #[doc = "Receive and transmit FIFO data This register can only be read or written by firmware when the DPSM is active (DPSMACT=1). The FIFO data occupies 16 entries of 32-bit words."]
5598 pub fn set_fifodata(&mut self, val: u32) {
5599 self.0 =
5600 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
5601 }
5602 }
5603 impl Default for Fifor {
5604 fn default() -> Fifor {
5605 Fifor(0)
5606 }
5607 } 5522 }
5608 #[doc = "The SDMMC_DTIMER register contains the data timeout period, in card bus clock periods. A counter loads the value from the SDMMC_DTIMER register, and starts decrementing when the data path state machine (DPSM) enters the Wait_R or Busy state. If the timer reaches 0 while the DPSM is in either of these states, the timeout status flag is set."]
5609 #[repr(transparent)] 5523 #[repr(transparent)]
5610 #[derive(Copy, Clone, Eq, PartialEq)] 5524 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5611 pub struct Dtimer(pub u32); 5525 pub struct Irlp(pub u8);
5612 impl Dtimer { 5526 impl Irlp {
5613 #[doc = "Data and R1b busy timeout period This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0). Data and R1b busy timeout period expressed in card bus clock periods."] 5527 #[doc = "Normal mode"]
5614 pub const fn datatime(&self) -> u32 { 5528 pub const NORMAL: Self = Self(0);
5615 let val = (self.0 >> 0usize) & 0xffff_ffff; 5529 #[doc = "Low-power mode"]
5616 val as u32 5530 pub const LOWPOWER: Self = Self(0x01);
5617 }
5618 #[doc = "Data and R1b busy timeout period This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0). Data and R1b busy timeout period expressed in card bus clock periods."]
5619 pub fn set_datatime(&mut self, val: u32) {
5620 self.0 =
5621 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
5622 }
5623 }
5624 impl Default for Dtimer {
5625 fn default() -> Dtimer {
5626 Dtimer(0)
5627 }
5628 } 5531 }
5629 #[doc = "The SDMMC_RESP1/2/3/4R registers contain the status of a card, which is part of the received response."]
5630 #[repr(transparent)] 5532 #[repr(transparent)]
5631 #[derive(Copy, Clone, Eq, PartialEq)] 5533 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5632 pub struct Resp2r(pub u32); 5534 pub struct Cpol(pub u8);
5633 impl Resp2r { 5535 impl Cpol {
5634 #[doc = "see Table404."] 5536 #[doc = "Steady low value on CK pin outside transmission window"]
5635 pub const fn cardstatus2(&self) -> u32 { 5537 pub const LOW: Self = Self(0);
5636 let val = (self.0 >> 0usize) & 0xffff_ffff; 5538 #[doc = "Steady high value on CK pin outside transmission window"]
5637 val as u32 5539 pub const HIGH: Self = Self(0x01);
5638 }
5639 #[doc = "see Table404."]
5640 pub fn set_cardstatus2(&mut self, val: u32) {
5641 self.0 =
5642 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
5643 }
5644 }
5645 impl Default for Resp2r {
5646 fn default() -> Resp2r {
5647 Resp2r(0)
5648 }
5649 } 5540 }
5650 #[doc = "SDMMC IP version register"]
5651 #[repr(transparent)] 5541 #[repr(transparent)]
5652 #[derive(Copy, Clone, Eq, PartialEq)] 5542 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5653 pub struct Ver(pub u32); 5543 pub struct Stop(pub u8);
5654 impl Ver { 5544 impl Stop {
5655 #[doc = "IP minor revision number."] 5545 #[doc = "1 stop bit"]
5656 pub const fn minrev(&self) -> u8 { 5546 pub const STOP1: Self = Self(0);
5657 let val = (self.0 >> 0usize) & 0x0f; 5547 #[doc = "0.5 stop bits"]
5658 val as u8 5548 pub const STOP0P5: Self = Self(0x01);
5659 } 5549 #[doc = "2 stop bits"]
5660 #[doc = "IP minor revision number."] 5550 pub const STOP2: Self = Self(0x02);
5661 pub fn set_minrev(&mut self, val: u8) { 5551 #[doc = "1.5 stop bits"]
5662 self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); 5552 pub const STOP1P5: Self = Self(0x03);
5663 }
5664 #[doc = "IP major revision number."]
5665 pub const fn majrev(&self) -> u8 {
5666 let val = (self.0 >> 4usize) & 0x0f;
5667 val as u8
5668 }
5669 #[doc = "IP major revision number."]
5670 pub fn set_majrev(&mut self, val: u8) {
5671 self.0 = (self.0 & !(0x0f << 4usize)) | (((val as u32) & 0x0f) << 4usize);
5672 }
5673 }
5674 impl Default for Ver {
5675 fn default() -> Ver {
5676 Ver(0)
5677 }
5678 } 5553 }
5679 #[doc = "The SDMMC_RESP1/2/3/4R registers contain the status of a card, which is part of the received response."]
5680 #[repr(transparent)] 5554 #[repr(transparent)]
5681 #[derive(Copy, Clone, Eq, PartialEq)] 5555 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5682 pub struct Resp3r(pub u32); 5556 pub struct Lbdl(pub u8);
5683 impl Resp3r { 5557 impl Lbdl {
5684 #[doc = "see Table404."] 5558 #[doc = "10-bit break detection"]
5685 pub const fn cardstatus3(&self) -> u32 { 5559 pub const LBDL10: Self = Self(0);
5686 let val = (self.0 >> 0usize) & 0xffff_ffff; 5560 #[doc = "11-bit break detection"]
5687 val as u32 5561 pub const LBDL11: Self = Self(0x01);
5688 }
5689 #[doc = "see Table404."]
5690 pub fn set_cardstatus3(&mut self, val: u32) {
5691 self.0 =
5692 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
5693 }
5694 }
5695 impl Default for Resp3r {
5696 fn default() -> Resp3r {
5697 Resp3r(0)
5698 }
5699 } 5562 }
5700 #[doc = "The SDMMC_IDMABASE1R register contains the double buffer configuration second buffer memory base address."]
5701 #[repr(transparent)] 5563 #[repr(transparent)]
5702 #[derive(Copy, Clone, Eq, PartialEq)] 5564 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5703 pub struct Idmabase1r(pub u32); 5565 pub struct Ps(pub u8);
5704 impl Idmabase1r { 5566 impl Ps {
5705 #[doc = "Buffer 1 memory base address, shall be word aligned (bit [1:0] 5567 #[doc = "Even parity"]
5706are always 0 and read only). This register can be written by firmware when DPSM is inactive (DPSMACT = 0), and can dynamically be written by firmware when DPSM active (DPSMACT = 1) and memory buffer 1 is inactive (IDMABACT = 0)."] 5568 pub const EVEN: Self = Self(0);
5707 pub const fn idmabase1(&self) -> u32 { 5569 #[doc = "Odd parity"]
5708 let val = (self.0 >> 0usize) & 0xffff_ffff; 5570 pub const ODD: Self = Self(0x01);
5709 val as u32
5710 }
5711 #[doc = "Buffer 1 memory base address, shall be word aligned (bit [1:0]
5712are always 0 and read only). This register can be written by firmware when DPSM is inactive (DPSMACT = 0), and can dynamically be written by firmware when DPSM active (DPSMACT = 1) and memory buffer 1 is inactive (IDMABACT = 0)."]
5713 pub fn set_idmabase1(&mut self, val: u32) {
5714 self.0 =
5715 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
5716 }
5717 }
5718 impl Default for Idmabase1r {
5719 fn default() -> Idmabase1r {
5720 Idmabase1r(0)
5721 }
5722 } 5571 }
5723 #[doc = "SDMMC command response register"]
5724 #[repr(transparent)] 5572 #[repr(transparent)]
5725 #[derive(Copy, Clone, Eq, PartialEq)] 5573 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5726 pub struct Respcmdr(pub u32); 5574 pub struct M(pub u8);
5727 impl Respcmdr { 5575 impl M {
5728 #[doc = "Response command index"] 5576 #[doc = "8 data bits"]
5729 pub const fn respcmd(&self) -> u8 { 5577 pub const M8: Self = Self(0);
5730 let val = (self.0 >> 0usize) & 0x3f; 5578 #[doc = "9 data bits"]
5731 val as u8 5579 pub const M9: Self = Self(0x01);
5732 }
5733 #[doc = "Response command index"]
5734 pub fn set_respcmd(&mut self, val: u8) {
5735 self.0 = (self.0 & !(0x3f << 0usize)) | (((val as u32) & 0x3f) << 0usize);
5736 }
5737 }
5738 impl Default for Respcmdr {
5739 fn default() -> Respcmdr {
5740 Respcmdr(0)
5741 }
5742 } 5580 }
5743 #[doc = "The SDMMC_RESP1/2/3/4R registers contain the status of a card, which is part of the received response."]
5744 #[repr(transparent)] 5581 #[repr(transparent)]
5745 #[derive(Copy, Clone, Eq, PartialEq)] 5582 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5746 pub struct Resp4r(pub u32); 5583 pub struct Sbk(pub u8);
5747 impl Resp4r { 5584 impl Sbk {
5748 #[doc = "see Table404."] 5585 #[doc = "No break character is transmitted"]
5749 pub const fn cardstatus4(&self) -> u32 { 5586 pub const NOBREAK: Self = Self(0);
5750 let val = (self.0 >> 0usize) & 0xffff_ffff; 5587 #[doc = "Break character transmitted"]
5751 val as u32 5588 pub const BREAK: Self = Self(0x01);
5752 }
5753 #[doc = "see Table404."]
5754 pub fn set_cardstatus4(&mut self, val: u32) {
5755 self.0 =
5756 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
5757 }
5758 }
5759 impl Default for Resp4r {
5760 fn default() -> Resp4r {
5761 Resp4r(0)
5762 }
5763 } 5589 }
5764 #[doc = "The SDMMC_IDMABASE0R register contains the memory buffer base address in single buffer configuration and the buffer 0 base address in double buffer configuration."]
5765 #[repr(transparent)] 5590 #[repr(transparent)]
5766 #[derive(Copy, Clone, Eq, PartialEq)] 5591 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5767 pub struct Idmabase0r(pub u32); 5592 pub struct Hdsel(pub u8);
5768 impl Idmabase0r { 5593 impl Hdsel {
5769 #[doc = "Buffer 0 memory base address bits [31:2], shall be word aligned (bit [1:0] 5594 #[doc = "Half duplex mode is not selected"]
5770are always 0 and read only). This register can be written by firmware when DPSM is inactive (DPSMACT = 0), and can dynamically be written by firmware when DPSM active (DPSMACT = 1) and memory buffer 0 is inactive (IDMABACT = 1)."] 5595 pub const FULLDUPLEX: Self = Self(0);
5771 pub const fn idmabase0(&self) -> u32 { 5596 #[doc = "Half duplex mode is selected"]
5772 let val = (self.0 >> 0usize) & 0xffff_ffff; 5597 pub const HALFDUPLEX: Self = Self(0x01);
5773 val as u32
5774 }
5775 #[doc = "Buffer 0 memory base address bits [31:2], shall be word aligned (bit [1:0]
5776are always 0 and read only). This register can be written by firmware when DPSM is inactive (DPSMACT = 0), and can dynamically be written by firmware when DPSM active (DPSMACT = 1) and memory buffer 0 is inactive (IDMABACT = 1)."]
5777 pub fn set_idmabase0(&mut self, val: u32) {
5778 self.0 =
5779 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
5780 }
5781 }
5782 impl Default for Idmabase0r {
5783 fn default() -> Idmabase0r {
5784 Idmabase0r(0)
5785 }
5786 } 5598 }
5787 #[doc = "The SDMMC_IDMABSIZER register contains the buffers size when in double buffer configuration."]
5788 #[repr(transparent)] 5599 #[repr(transparent)]
5789 #[derive(Copy, Clone, Eq, PartialEq)] 5600 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5790 pub struct Idmabsizer(pub u32); 5601 pub struct Rwu(pub u8);
5791 impl Idmabsizer { 5602 impl Rwu {
5792 #[doc = "Number of transfers per buffer. This 8-bit value shall be multiplied by 8 to get the size of the buffer in 32-bit words and by 32 to get the size of the buffer in bytes. Example: IDMABNDT = 0x01: buffer size = 8 words = 32 bytes. These bits can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] 5603 #[doc = "Receiver in active mode"]
5793 pub const fn idmabndt(&self) -> u8 { 5604 pub const ACTIVE: Self = Self(0);
5794 let val = (self.0 >> 5usize) & 0xff; 5605 #[doc = "Receiver in mute mode"]
5795 val as u8 5606 pub const MUTE: Self = Self(0x01);
5796 }
5797 #[doc = "Number of transfers per buffer. This 8-bit value shall be multiplied by 8 to get the size of the buffer in 32-bit words and by 32 to get the size of the buffer in bytes. Example: IDMABNDT = 0x01: buffer size = 8 words = 32 bytes. These bits can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
5798 pub fn set_idmabndt(&mut self, val: u8) {
5799 self.0 = (self.0 & !(0xff << 5usize)) | (((val as u32) & 0xff) << 5usize);
5800 }
5801 }
5802 impl Default for Idmabsizer {
5803 fn default() -> Idmabsizer {
5804 Idmabsizer(0)
5805 }
5806 } 5607 }
5807 #[doc = "SDMMC IP identification register"]
5808 #[repr(transparent)] 5608 #[repr(transparent)]
5809 #[derive(Copy, Clone, Eq, PartialEq)] 5609 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5810 pub struct Id(pub u32); 5610 pub struct Wake(pub u8);
5811 impl Id { 5611 impl Wake {
5812 #[doc = "SDMMC IP identification."] 5612 #[doc = "USART wakeup on idle line"]
5813 pub const fn ip_id(&self) -> u32 { 5613 pub const IDLELINE: Self = Self(0);
5814 let val = (self.0 >> 0usize) & 0xffff_ffff; 5614 #[doc = "USART wakeup on address mark"]
5815 val as u32 5615 pub const ADDRESSMARK: Self = Self(0x01);
5816 }
5817 #[doc = "SDMMC IP identification."]
5818 pub fn set_ip_id(&mut self, val: u32) {
5819 self.0 =
5820 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
5821 }
5822 }
5823 impl Default for Id {
5824 fn default() -> Id {
5825 Id(0)
5826 }
5827 } 5616 }
5828 } 5617 }
5829} 5618}
@@ -5868,51 +5657,65 @@ pub mod spi_v2 {
5868 use crate::generic::*; 5657 use crate::generic::*;
5869 #[repr(transparent)] 5658 #[repr(transparent)]
5870 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 5659 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5871 pub struct Br(pub u8); 5660 pub struct Frlvlr(pub u8);
5872 impl Br { 5661 impl Frlvlr {
5873 #[doc = "f_PCLK / 2"] 5662 #[doc = "Rx FIFO Empty"]
5874 pub const DIV2: Self = Self(0); 5663 pub const EMPTY: Self = Self(0);
5875 #[doc = "f_PCLK / 4"] 5664 #[doc = "Rx 1/4 FIFO"]
5876 pub const DIV4: Self = Self(0x01); 5665 pub const QUARTER: Self = Self(0x01);
5877 #[doc = "f_PCLK / 8"] 5666 #[doc = "Rx 1/2 FIFO"]
5878 pub const DIV8: Self = Self(0x02); 5667 pub const HALF: Self = Self(0x02);
5879 #[doc = "f_PCLK / 16"] 5668 #[doc = "Rx FIFO full"]
5880 pub const DIV16: Self = Self(0x03); 5669 pub const FULL: Self = Self(0x03);
5881 #[doc = "f_PCLK / 32"]
5882 pub const DIV32: Self = Self(0x04);
5883 #[doc = "f_PCLK / 64"]
5884 pub const DIV64: Self = Self(0x05);
5885 #[doc = "f_PCLK / 128"]
5886 pub const DIV128: Self = Self(0x06);
5887 #[doc = "f_PCLK / 256"]
5888 pub const DIV256: Self = Self(0x07);
5889 } 5670 }
5890 #[repr(transparent)] 5671 #[repr(transparent)]
5891 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 5672 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5892 pub struct Lsbfirst(pub u8); 5673 pub struct Rxonly(pub u8);
5893 impl Lsbfirst { 5674 impl Rxonly {
5894 #[doc = "Data is transmitted/received with the MSB first"] 5675 #[doc = "Full duplex (Transmit and receive)"]
5895 pub const MSBFIRST: Self = Self(0); 5676 pub const FULLDUPLEX: Self = Self(0);
5896 #[doc = "Data is transmitted/received with the LSB first"] 5677 #[doc = "Output disabled (Receive-only mode)"]
5897 pub const LSBFIRST: Self = Self(0x01); 5678 pub const OUTPUTDISABLED: Self = Self(0x01);
5898 } 5679 }
5899 #[repr(transparent)] 5680 #[repr(transparent)]
5900 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 5681 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5901 pub struct LdmaTx(pub u8); 5682 pub struct Mstr(pub u8);
5902 impl LdmaTx { 5683 impl Mstr {
5903 #[doc = "Number of data to transfer for transmit is even"] 5684 #[doc = "Slave configuration"]
5904 pub const EVEN: Self = Self(0); 5685 pub const SLAVE: Self = Self(0);
5905 #[doc = "Number of data to transfer for transmit is odd"] 5686 #[doc = "Master configuration"]
5906 pub const ODD: Self = Self(0x01); 5687 pub const MASTER: Self = Self(0x01);
5907 } 5688 }
5908 #[repr(transparent)] 5689 #[repr(transparent)]
5909 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 5690 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5910 pub struct Frf(pub u8); 5691 pub struct Cpha(pub u8);
5911 impl Frf { 5692 impl Cpha {
5912 #[doc = "SPI Motorola mode"] 5693 #[doc = "The first clock transition is the first data capture edge"]
5913 pub const MOTOROLA: Self = Self(0); 5694 pub const FIRSTEDGE: Self = Self(0);
5914 #[doc = "SPI TI mode"] 5695 #[doc = "The second clock transition is the first data capture edge"]
5915 pub const TI: Self = Self(0x01); 5696 pub const SECONDEDGE: Self = Self(0x01);
5697 }
5698 #[repr(transparent)]
5699 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5700 pub struct Frxth(pub u8);
5701 impl Frxth {
5702 #[doc = "RXNE event is generated if the FIFO level is greater than or equal to 1/2 (16-bit)"]
5703 pub const HALF: Self = Self(0);
5704 #[doc = "RXNE event is generated if the FIFO level is greater than or equal to 1/4 (8-bit)"]
5705 pub const QUARTER: Self = Self(0x01);
5706 }
5707 #[repr(transparent)]
5708 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5709 pub struct Ftlvlr(pub u8);
5710 impl Ftlvlr {
5711 #[doc = "Tx FIFO Empty"]
5712 pub const EMPTY: Self = Self(0);
5713 #[doc = "Tx 1/4 FIFO"]
5714 pub const QUARTER: Self = Self(0x01);
5715 #[doc = "Tx 1/2 FIFO"]
5716 pub const HALF: Self = Self(0x02);
5717 #[doc = "Tx FIFO full"]
5718 pub const FULL: Self = Self(0x03);
5916 } 5719 }
5917 #[repr(transparent)] 5720 #[repr(transparent)]
5918 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 5721 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
@@ -5925,12 +5728,21 @@ pub mod spi_v2 {
5925 } 5728 }
5926 #[repr(transparent)] 5729 #[repr(transparent)]
5927 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 5730 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5928 pub struct Frer(pub u8); 5731 pub struct Lsbfirst(pub u8);
5929 impl Frer { 5732 impl Lsbfirst {
5930 #[doc = "No frame format error"] 5733 #[doc = "Data is transmitted/received with the MSB first"]
5931 pub const NOERROR: Self = Self(0); 5734 pub const MSBFIRST: Self = Self(0);
5932 #[doc = "A frame format error occurred"] 5735 #[doc = "Data is transmitted/received with the LSB first"]
5933 pub const ERROR: Self = Self(0x01); 5736 pub const LSBFIRST: Self = Self(0x01);
5737 }
5738 #[repr(transparent)]
5739 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5740 pub struct LdmaTx(pub u8);
5741 impl LdmaTx {
5742 #[doc = "Number of data to transfer for transmit is even"]
5743 pub const EVEN: Self = Self(0);
5744 #[doc = "Number of data to transfer for transmit is odd"]
5745 pub const ODD: Self = Self(0x01);
5934 } 5746 }
5935 #[repr(transparent)] 5747 #[repr(transparent)]
5936 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 5748 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
@@ -5974,43 +5786,33 @@ pub mod spi_v2 {
5974 } 5786 }
5975 #[repr(transparent)] 5787 #[repr(transparent)]
5976 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 5788 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5977 pub struct Cpha(pub u8); 5789 pub struct LdmaRx(pub u8);
5978 impl Cpha { 5790 impl LdmaRx {
5979 #[doc = "The first clock transition is the first data capture edge"] 5791 #[doc = "Number of data to transfer for receive is even"]
5980 pub const FIRSTEDGE: Self = Self(0); 5792 pub const EVEN: Self = Self(0);
5981 #[doc = "The second clock transition is the first data capture edge"] 5793 #[doc = "Number of data to transfer for receive is odd"]
5982 pub const SECONDEDGE: Self = Self(0x01); 5794 pub const ODD: Self = Self(0x01);
5983 }
5984 #[repr(transparent)]
5985 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5986 pub struct Frlvlr(pub u8);
5987 impl Frlvlr {
5988 #[doc = "Rx FIFO Empty"]
5989 pub const EMPTY: Self = Self(0);
5990 #[doc = "Rx 1/4 FIFO"]
5991 pub const QUARTER: Self = Self(0x01);
5992 #[doc = "Rx 1/2 FIFO"]
5993 pub const HALF: Self = Self(0x02);
5994 #[doc = "Rx FIFO full"]
5995 pub const FULL: Self = Self(0x03);
5996 }
5997 #[repr(transparent)]
5998 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5999 pub struct Bidimode(pub u8);
6000 impl Bidimode {
6001 #[doc = "2-line unidirectional data mode selected"]
6002 pub const UNIDIRECTIONAL: Self = Self(0);
6003 #[doc = "1-line bidirectional data mode selected"]
6004 pub const BIDIRECTIONAL: Self = Self(0x01);
6005 } 5795 }
6006 #[repr(transparent)] 5796 #[repr(transparent)]
6007 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 5797 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6008 pub struct Mstr(pub u8); 5798 pub struct Br(pub u8);
6009 impl Mstr { 5799 impl Br {
6010 #[doc = "Slave configuration"] 5800 #[doc = "f_PCLK / 2"]
6011 pub const SLAVE: Self = Self(0); 5801 pub const DIV2: Self = Self(0);
6012 #[doc = "Master configuration"] 5802 #[doc = "f_PCLK / 4"]
6013 pub const MASTER: Self = Self(0x01); 5803 pub const DIV4: Self = Self(0x01);
5804 #[doc = "f_PCLK / 8"]
5805 pub const DIV8: Self = Self(0x02);
5806 #[doc = "f_PCLK / 16"]
5807 pub const DIV16: Self = Self(0x03);
5808 #[doc = "f_PCLK / 32"]
5809 pub const DIV32: Self = Self(0x04);
5810 #[doc = "f_PCLK / 64"]
5811 pub const DIV64: Self = Self(0x05);
5812 #[doc = "f_PCLK / 128"]
5813 pub const DIV128: Self = Self(0x06);
5814 #[doc = "f_PCLK / 256"]
5815 pub const DIV256: Self = Self(0x07);
6014 } 5816 }
6015 #[repr(transparent)] 5817 #[repr(transparent)]
6016 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 5818 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
@@ -6023,43 +5825,30 @@ pub mod spi_v2 {
6023 } 5825 }
6024 #[repr(transparent)] 5826 #[repr(transparent)]
6025 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 5827 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6026 pub struct Rxonly(pub u8); 5828 pub struct Frer(pub u8);
6027 impl Rxonly { 5829 impl Frer {
6028 #[doc = "Full duplex (Transmit and receive)"] 5830 #[doc = "No frame format error"]
6029 pub const FULLDUPLEX: Self = Self(0); 5831 pub const NOERROR: Self = Self(0);
6030 #[doc = "Output disabled (Receive-only mode)"] 5832 #[doc = "A frame format error occurred"]
6031 pub const OUTPUTDISABLED: Self = Self(0x01); 5833 pub const ERROR: Self = Self(0x01);
6032 }
6033 #[repr(transparent)]
6034 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6035 pub struct Ftlvlr(pub u8);
6036 impl Ftlvlr {
6037 #[doc = "Tx FIFO Empty"]
6038 pub const EMPTY: Self = Self(0);
6039 #[doc = "Tx 1/4 FIFO"]
6040 pub const QUARTER: Self = Self(0x01);
6041 #[doc = "Tx 1/2 FIFO"]
6042 pub const HALF: Self = Self(0x02);
6043 #[doc = "Tx FIFO full"]
6044 pub const FULL: Self = Self(0x03);
6045 } 5834 }
6046 #[repr(transparent)] 5835 #[repr(transparent)]
6047 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 5836 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6048 pub struct Frxth(pub u8); 5837 pub struct Frf(pub u8);
6049 impl Frxth { 5838 impl Frf {
6050 #[doc = "RXNE event is generated if the FIFO level is greater than or equal to 1/2 (16-bit)"] 5839 #[doc = "SPI Motorola mode"]
6051 pub const HALF: Self = Self(0); 5840 pub const MOTOROLA: Self = Self(0);
6052 #[doc = "RXNE event is generated if the FIFO level is greater than or equal to 1/4 (8-bit)"] 5841 #[doc = "SPI TI mode"]
6053 pub const QUARTER: Self = Self(0x01); 5842 pub const TI: Self = Self(0x01);
6054 } 5843 }
6055 #[repr(transparent)] 5844 #[repr(transparent)]
6056 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 5845 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6057 pub struct LdmaRx(pub u8); 5846 pub struct Bidimode(pub u8);
6058 impl LdmaRx { 5847 impl Bidimode {
6059 #[doc = "Number of data to transfer for receive is even"] 5848 #[doc = "2-line unidirectional data mode selected"]
6060 pub const EVEN: Self = Self(0); 5849 pub const UNIDIRECTIONAL: Self = Self(0);
6061 #[doc = "Number of data to transfer for receive is odd"] 5850 #[doc = "1-line bidirectional data mode selected"]
6062 pub const ODD: Self = Self(0x01); 5851 pub const BIDIRECTIONAL: Self = Self(0x01);
6063 } 5852 }
6064 #[repr(transparent)] 5853 #[repr(transparent)]
6065 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 5854 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
@@ -6210,6 +5999,26 @@ pub mod spi_v2 {
6210 Cr1(0) 5999 Cr1(0)
6211 } 6000 }
6212 } 6001 }
6002 #[doc = "data register"]
6003 #[repr(transparent)]
6004 #[derive(Copy, Clone, Eq, PartialEq)]
6005 pub struct Dr(pub u32);
6006 impl Dr {
6007 #[doc = "Data register"]
6008 pub const fn dr(&self) -> u16 {
6009 let val = (self.0 >> 0usize) & 0xffff;
6010 val as u16
6011 }
6012 #[doc = "Data register"]
6013 pub fn set_dr(&mut self, val: u16) {
6014 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
6015 }
6016 }
6017 impl Default for Dr {
6018 fn default() -> Dr {
6019 Dr(0)
6020 }
6021 }
6213 #[doc = "status register"] 6022 #[doc = "status register"]
6214 #[repr(transparent)] 6023 #[repr(transparent)]
6215 #[derive(Copy, Clone, Eq, PartialEq)] 6024 #[derive(Copy, Clone, Eq, PartialEq)]
@@ -6421,26 +6230,6 @@ pub mod spi_v2 {
6421 Cr2(0) 6230 Cr2(0)
6422 } 6231 }
6423 } 6232 }
6424 #[doc = "data register"]
6425 #[repr(transparent)]
6426 #[derive(Copy, Clone, Eq, PartialEq)]
6427 pub struct Dr(pub u32);
6428 impl Dr {
6429 #[doc = "Data register"]
6430 pub const fn dr(&self) -> u16 {
6431 let val = (self.0 >> 0usize) & 0xffff;
6432 val as u16
6433 }
6434 #[doc = "Data register"]
6435 pub fn set_dr(&mut self, val: u16) {
6436 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
6437 }
6438 }
6439 impl Default for Dr {
6440 fn default() -> Dr {
6441 Dr(0)
6442 }
6443 }
6444 #[doc = "CRC polynomial register"] 6233 #[doc = "CRC polynomial register"]
6445 #[repr(transparent)] 6234 #[repr(transparent)]
6446 #[derive(Copy, Clone, Eq, PartialEq)] 6235 #[derive(Copy, Clone, Eq, PartialEq)]
@@ -6461,6 +6250,26 @@ pub mod spi_v2 {
6461 Crcpr(0) 6250 Crcpr(0)
6462 } 6251 }
6463 } 6252 }
6253 #[doc = "TX CRC register"]
6254 #[repr(transparent)]
6255 #[derive(Copy, Clone, Eq, PartialEq)]
6256 pub struct Txcrcr(pub u32);
6257 impl Txcrcr {
6258 #[doc = "Tx CRC register"]
6259 pub const fn tx_crc(&self) -> u16 {
6260 let val = (self.0 >> 0usize) & 0xffff;
6261 val as u16
6262 }
6263 #[doc = "Tx CRC register"]
6264 pub fn set_tx_crc(&mut self, val: u16) {
6265 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
6266 }
6267 }
6268 impl Default for Txcrcr {
6269 fn default() -> Txcrcr {
6270 Txcrcr(0)
6271 }
6272 }
6464 #[doc = "RX CRC register"] 6273 #[doc = "RX CRC register"]
6465 #[repr(transparent)] 6274 #[repr(transparent)]
6466 #[derive(Copy, Clone, Eq, PartialEq)] 6275 #[derive(Copy, Clone, Eq, PartialEq)]
@@ -6481,2623 +6290,2814 @@ pub mod spi_v2 {
6481 Rxcrcr(0) 6290 Rxcrcr(0)
6482 } 6291 }
6483 } 6292 }
6484 #[doc = "TX CRC register"] 6293 }
6294}
6295pub mod syscfg_f4 {
6296 use crate::generic::*;
6297 #[doc = "System configuration controller"]
6298 #[derive(Copy, Clone)]
6299 pub struct Syscfg(pub *mut u8);
6300 unsafe impl Send for Syscfg {}
6301 unsafe impl Sync for Syscfg {}
6302 impl Syscfg {
6303 #[doc = "memory remap register"]
6304 pub fn memrm(self) -> Reg<regs::Memrm, RW> {
6305 unsafe { Reg::from_ptr(self.0.add(0usize)) }
6306 }
6307 #[doc = "peripheral mode configuration register"]
6308 pub fn pmc(self) -> Reg<regs::Pmc, RW> {
6309 unsafe { Reg::from_ptr(self.0.add(4usize)) }
6310 }
6311 #[doc = "external interrupt configuration register"]
6312 pub fn exticr(self, n: usize) -> Reg<regs::Exticr, RW> {
6313 assert!(n < 4usize);
6314 unsafe { Reg::from_ptr(self.0.add(8usize + n * 4usize)) }
6315 }
6316 #[doc = "Compensation cell control register"]
6317 pub fn cmpcr(self) -> Reg<regs::Cmpcr, R> {
6318 unsafe { Reg::from_ptr(self.0.add(32usize)) }
6319 }
6320 }
6321 pub mod regs {
6322 use crate::generic::*;
6323 #[doc = "memory remap register"]
6485 #[repr(transparent)] 6324 #[repr(transparent)]
6486 #[derive(Copy, Clone, Eq, PartialEq)] 6325 #[derive(Copy, Clone, Eq, PartialEq)]
6487 pub struct Txcrcr(pub u32); 6326 pub struct Memrm(pub u32);
6488 impl Txcrcr { 6327 impl Memrm {
6489 #[doc = "Tx CRC register"] 6328 #[doc = "Memory mapping selection"]
6490 pub const fn tx_crc(&self) -> u16 { 6329 pub const fn mem_mode(&self) -> u8 {
6491 let val = (self.0 >> 0usize) & 0xffff; 6330 let val = (self.0 >> 0usize) & 0x07;
6492 val as u16 6331 val as u8
6493 } 6332 }
6494 #[doc = "Tx CRC register"] 6333 #[doc = "Memory mapping selection"]
6495 pub fn set_tx_crc(&mut self, val: u16) { 6334 pub fn set_mem_mode(&mut self, val: u8) {
6496 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); 6335 self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize);
6336 }
6337 #[doc = "Flash bank mode selection"]
6338 pub const fn fb_mode(&self) -> bool {
6339 let val = (self.0 >> 8usize) & 0x01;
6340 val != 0
6341 }
6342 #[doc = "Flash bank mode selection"]
6343 pub fn set_fb_mode(&mut self, val: bool) {
6344 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
6345 }
6346 #[doc = "FMC memory mapping swap"]
6347 pub const fn swp_fmc(&self) -> u8 {
6348 let val = (self.0 >> 10usize) & 0x03;
6349 val as u8
6350 }
6351 #[doc = "FMC memory mapping swap"]
6352 pub fn set_swp_fmc(&mut self, val: u8) {
6353 self.0 = (self.0 & !(0x03 << 10usize)) | (((val as u32) & 0x03) << 10usize);
6497 } 6354 }
6498 } 6355 }
6499 impl Default for Txcrcr { 6356 impl Default for Memrm {
6500 fn default() -> Txcrcr { 6357 fn default() -> Memrm {
6501 Txcrcr(0) 6358 Memrm(0)
6502 } 6359 }
6503 } 6360 }
6504 } 6361 #[doc = "external interrupt configuration register"]
6505} 6362 #[repr(transparent)]
6506pub mod dma_v2 { 6363 #[derive(Copy, Clone, Eq, PartialEq)]
6507 use crate::generic::*; 6364 pub struct Exticr(pub u32);
6508 #[doc = "DMA controller"] 6365 impl Exticr {
6509 #[derive(Copy, Clone)] 6366 #[doc = "EXTI x configuration"]
6510 pub struct Dma(pub *mut u8); 6367 pub fn exti(&self, n: usize) -> u8 {
6511 unsafe impl Send for Dma {} 6368 assert!(n < 4usize);
6512 unsafe impl Sync for Dma {} 6369 let offs = 0usize + n * 4usize;
6513 impl Dma { 6370 let val = (self.0 >> offs) & 0x0f;
6514 #[doc = "low interrupt status register"] 6371 val as u8
6515 pub fn isr(self, n: usize) -> Reg<regs::Isr, R> { 6372 }
6516 assert!(n < 2usize); 6373 #[doc = "EXTI x configuration"]
6517 unsafe { Reg::from_ptr(self.0.add(0usize + n * 4usize)) } 6374 pub fn set_exti(&mut self, n: usize, val: u8) {
6375 assert!(n < 4usize);
6376 let offs = 0usize + n * 4usize;
6377 self.0 = (self.0 & !(0x0f << offs)) | (((val as u32) & 0x0f) << offs);
6378 }
6518 } 6379 }
6519 #[doc = "low interrupt flag clear register"] 6380 impl Default for Exticr {
6520 pub fn ifcr(self, n: usize) -> Reg<regs::Ifcr, W> { 6381 fn default() -> Exticr {
6521 assert!(n < 2usize); 6382 Exticr(0)
6522 unsafe { Reg::from_ptr(self.0.add(8usize + n * 4usize)) } 6383 }
6523 } 6384 }
6524 #[doc = "Stream cluster: S?CR, S?NDTR, S?M0AR, S?M1AR and S?FCR registers"] 6385 #[doc = "peripheral mode configuration register"]
6525 pub fn st(self, n: usize) -> St { 6386 #[repr(transparent)]
6526 assert!(n < 8usize); 6387 #[derive(Copy, Clone, Eq, PartialEq)]
6527 unsafe { St(self.0.add(16usize + n * 24usize)) } 6388 pub struct Pmc(pub u32);
6389 impl Pmc {
6390 #[doc = "ADC1DC2"]
6391 pub const fn adc1dc2(&self) -> bool {
6392 let val = (self.0 >> 16usize) & 0x01;
6393 val != 0
6394 }
6395 #[doc = "ADC1DC2"]
6396 pub fn set_adc1dc2(&mut self, val: bool) {
6397 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
6398 }
6399 #[doc = "ADC2DC2"]
6400 pub const fn adc2dc2(&self) -> bool {
6401 let val = (self.0 >> 17usize) & 0x01;
6402 val != 0
6403 }
6404 #[doc = "ADC2DC2"]
6405 pub fn set_adc2dc2(&mut self, val: bool) {
6406 self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize);
6407 }
6408 #[doc = "ADC3DC2"]
6409 pub const fn adc3dc2(&self) -> bool {
6410 let val = (self.0 >> 18usize) & 0x01;
6411 val != 0
6412 }
6413 #[doc = "ADC3DC2"]
6414 pub fn set_adc3dc2(&mut self, val: bool) {
6415 self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize);
6416 }
6417 #[doc = "Ethernet PHY interface selection"]
6418 pub const fn mii_rmii_sel(&self) -> bool {
6419 let val = (self.0 >> 23usize) & 0x01;
6420 val != 0
6421 }
6422 #[doc = "Ethernet PHY interface selection"]
6423 pub fn set_mii_rmii_sel(&mut self, val: bool) {
6424 self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize);
6425 }
6426 }
6427 impl Default for Pmc {
6428 fn default() -> Pmc {
6429 Pmc(0)
6430 }
6431 }
6432 #[doc = "Compensation cell control register"]
6433 #[repr(transparent)]
6434 #[derive(Copy, Clone, Eq, PartialEq)]
6435 pub struct Cmpcr(pub u32);
6436 impl Cmpcr {
6437 #[doc = "Compensation cell power-down"]
6438 pub const fn cmp_pd(&self) -> bool {
6439 let val = (self.0 >> 0usize) & 0x01;
6440 val != 0
6441 }
6442 #[doc = "Compensation cell power-down"]
6443 pub fn set_cmp_pd(&mut self, val: bool) {
6444 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
6445 }
6446 #[doc = "READY"]
6447 pub const fn ready(&self) -> bool {
6448 let val = (self.0 >> 8usize) & 0x01;
6449 val != 0
6450 }
6451 #[doc = "READY"]
6452 pub fn set_ready(&mut self, val: bool) {
6453 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
6454 }
6455 }
6456 impl Default for Cmpcr {
6457 fn default() -> Cmpcr {
6458 Cmpcr(0)
6459 }
6528 } 6460 }
6529 } 6461 }
6530 #[doc = "Stream cluster: S?CR, S?NDTR, S?M0AR, S?M1AR and S?FCR registers"] 6462}
6463pub mod spi_v1 {
6464 use crate::generic::*;
6465 #[doc = "Serial peripheral interface"]
6531 #[derive(Copy, Clone)] 6466 #[derive(Copy, Clone)]
6532 pub struct St(pub *mut u8); 6467 pub struct Spi(pub *mut u8);
6533 unsafe impl Send for St {} 6468 unsafe impl Send for Spi {}
6534 unsafe impl Sync for St {} 6469 unsafe impl Sync for Spi {}
6535 impl St { 6470 impl Spi {
6536 #[doc = "stream x configuration register"] 6471 #[doc = "control register 1"]
6537 pub fn cr(self) -> Reg<regs::Cr, RW> { 6472 pub fn cr1(self) -> Reg<regs::Cr1, RW> {
6538 unsafe { Reg::from_ptr(self.0.add(0usize)) } 6473 unsafe { Reg::from_ptr(self.0.add(0usize)) }
6539 } 6474 }
6540 #[doc = "stream x number of data register"] 6475 #[doc = "control register 2"]
6541 pub fn ndtr(self) -> Reg<regs::Ndtr, RW> { 6476 pub fn cr2(self) -> Reg<regs::Cr2, RW> {
6542 unsafe { Reg::from_ptr(self.0.add(4usize)) } 6477 unsafe { Reg::from_ptr(self.0.add(4usize)) }
6543 } 6478 }
6544 #[doc = "stream x peripheral address register"] 6479 #[doc = "status register"]
6545 pub fn par(self) -> Reg<u32, RW> { 6480 pub fn sr(self) -> Reg<regs::Sr, RW> {
6546 unsafe { Reg::from_ptr(self.0.add(8usize)) } 6481 unsafe { Reg::from_ptr(self.0.add(8usize)) }
6547 } 6482 }
6548 #[doc = "stream x memory 0 address register"] 6483 #[doc = "data register"]
6549 pub fn m0ar(self) -> Reg<u32, RW> { 6484 pub fn dr(self) -> Reg<regs::Dr, RW> {
6550 unsafe { Reg::from_ptr(self.0.add(12usize)) } 6485 unsafe { Reg::from_ptr(self.0.add(12usize)) }
6551 } 6486 }
6552 #[doc = "stream x memory 1 address register"] 6487 #[doc = "CRC polynomial register"]
6553 pub fn m1ar(self) -> Reg<u32, RW> { 6488 pub fn crcpr(self) -> Reg<regs::Crcpr, RW> {
6554 unsafe { Reg::from_ptr(self.0.add(16usize)) } 6489 unsafe { Reg::from_ptr(self.0.add(16usize)) }
6555 } 6490 }
6556 #[doc = "stream x FIFO control register"] 6491 #[doc = "RX CRC register"]
6557 pub fn fcr(self) -> Reg<regs::Fcr, RW> { 6492 pub fn rxcrcr(self) -> Reg<regs::Rxcrcr, R> {
6558 unsafe { Reg::from_ptr(self.0.add(20usize)) } 6493 unsafe { Reg::from_ptr(self.0.add(20usize)) }
6559 } 6494 }
6495 #[doc = "TX CRC register"]
6496 pub fn txcrcr(self) -> Reg<regs::Txcrcr, R> {
6497 unsafe { Reg::from_ptr(self.0.add(24usize)) }
6498 }
6560 } 6499 }
6561 pub mod vals { 6500 pub mod vals {
6562 use crate::generic::*; 6501 use crate::generic::*;
6563 #[repr(transparent)] 6502 #[repr(transparent)]
6564 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 6503 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6565 pub struct Pincos(pub u8); 6504 pub struct Lsbfirst(pub u8);
6566 impl Pincos { 6505 impl Lsbfirst {
6567 #[doc = "The offset size for the peripheral address calculation is linked to the PSIZE"] 6506 #[doc = "Data is transmitted/received with the MSB first"]
6568 pub const PSIZE: Self = Self(0); 6507 pub const MSBFIRST: Self = Self(0);
6569 #[doc = "The offset size for the peripheral address calculation is fixed to 4 (32-bit alignment)"] 6508 #[doc = "Data is transmitted/received with the LSB first"]
6570 pub const FIXED4: Self = Self(0x01); 6509 pub const LSBFIRST: Self = Self(0x01);
6571 } 6510 }
6572 #[repr(transparent)] 6511 #[repr(transparent)]
6573 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 6512 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6574 pub struct Fs(pub u8); 6513 pub struct Iscfg(pub u8);
6575 impl Fs { 6514 impl Iscfg {
6576 #[doc = "0 < fifo_level < 1/4"] 6515 #[doc = "Slave - transmit"]
6577 pub const QUARTER1: Self = Self(0); 6516 pub const SLAVETX: Self = Self(0);
6578 #[doc = "1/4 <= fifo_level < 1/2"] 6517 #[doc = "Slave - receive"]
6579 pub const QUARTER2: Self = Self(0x01); 6518 pub const SLAVERX: Self = Self(0x01);
6580 #[doc = "1/2 <= fifo_level < 3/4"] 6519 #[doc = "Master - transmit"]
6581 pub const QUARTER3: Self = Self(0x02); 6520 pub const MASTERTX: Self = Self(0x02);
6582 #[doc = "3/4 <= fifo_level < full"] 6521 #[doc = "Master - receive"]
6583 pub const QUARTER4: Self = Self(0x03); 6522 pub const MASTERRX: Self = Self(0x03);
6584 #[doc = "FIFO is empty"]
6585 pub const EMPTY: Self = Self(0x04);
6586 #[doc = "FIFO is full"]
6587 pub const FULL: Self = Self(0x05);
6588 } 6523 }
6589 #[repr(transparent)] 6524 #[repr(transparent)]
6590 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 6525 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6591 pub struct Burst(pub u8); 6526 pub struct Rxonly(pub u8);
6592 impl Burst { 6527 impl Rxonly {
6593 #[doc = "Single transfer"] 6528 #[doc = "Full duplex (Transmit and receive)"]
6594 pub const SINGLE: Self = Self(0); 6529 pub const FULLDUPLEX: Self = Self(0);
6595 #[doc = "Incremental burst of 4 beats"] 6530 #[doc = "Output disabled (Receive-only mode)"]
6596 pub const INCR4: Self = Self(0x01); 6531 pub const OUTPUTDISABLED: Self = Self(0x01);
6597 #[doc = "Incremental burst of 8 beats"]
6598 pub const INCR8: Self = Self(0x02);
6599 #[doc = "Incremental burst of 16 beats"]
6600 pub const INCR16: Self = Self(0x03);
6601 } 6532 }
6602 #[repr(transparent)] 6533 #[repr(transparent)]
6603 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 6534 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6604 pub struct Dbm(pub u8); 6535 pub struct Mstr(pub u8);
6605 impl Dbm { 6536 impl Mstr {
6606 #[doc = "No buffer switching at the end of transfer"] 6537 #[doc = "Slave configuration"]
6607 pub const DISABLED: Self = Self(0); 6538 pub const SLAVE: Self = Self(0);
6608 #[doc = "Memory target switched at the end of the DMA transfer"] 6539 #[doc = "Master configuration"]
6609 pub const ENABLED: Self = Self(0x01); 6540 pub const MASTER: Self = Self(0x01);
6610 } 6541 }
6611 #[repr(transparent)] 6542 #[repr(transparent)]
6612 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 6543 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6613 pub struct Inc(pub u8); 6544 pub struct Crcnext(pub u8);
6614 impl Inc { 6545 impl Crcnext {
6615 #[doc = "Address pointer is fixed"] 6546 #[doc = "Next transmit value is from Tx buffer"]
6616 pub const FIXED: Self = Self(0); 6547 pub const TXBUFFER: Self = Self(0);
6617 #[doc = "Address pointer is incremented after each data transfer"] 6548 #[doc = "Next transmit value is from Tx CRC register"]
6618 pub const INCREMENTED: Self = Self(0x01); 6549 pub const CRC: Self = Self(0x01);
6619 } 6550 }
6620 #[repr(transparent)] 6551 #[repr(transparent)]
6621 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 6552 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6622 pub struct Dir(pub u8); 6553 pub struct Br(pub u8);
6623 impl Dir { 6554 impl Br {
6624 #[doc = "Peripheral-to-memory"] 6555 #[doc = "f_PCLK / 2"]
6625 pub const PERIPHERALTOMEMORY: Self = Self(0); 6556 pub const DIV2: Self = Self(0);
6626 #[doc = "Memory-to-peripheral"] 6557 #[doc = "f_PCLK / 4"]
6627 pub const MEMORYTOPERIPHERAL: Self = Self(0x01); 6558 pub const DIV4: Self = Self(0x01);
6628 #[doc = "Memory-to-memory"] 6559 #[doc = "f_PCLK / 8"]
6629 pub const MEMORYTOMEMORY: Self = Self(0x02); 6560 pub const DIV8: Self = Self(0x02);
6561 #[doc = "f_PCLK / 16"]
6562 pub const DIV16: Self = Self(0x03);
6563 #[doc = "f_PCLK / 32"]
6564 pub const DIV32: Self = Self(0x04);
6565 #[doc = "f_PCLK / 64"]
6566 pub const DIV64: Self = Self(0x05);
6567 #[doc = "f_PCLK / 128"]
6568 pub const DIV128: Self = Self(0x06);
6569 #[doc = "f_PCLK / 256"]
6570 pub const DIV256: Self = Self(0x07);
6630 } 6571 }
6631 #[repr(transparent)] 6572 #[repr(transparent)]
6632 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 6573 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6633 pub struct Pfctrl(pub u8); 6574 pub struct Frf(pub u8);
6634 impl Pfctrl { 6575 impl Frf {
6635 #[doc = "The DMA is the flow controller"] 6576 #[doc = "SPI Motorola mode"]
6636 pub const DMA: Self = Self(0); 6577 pub const MOTOROLA: Self = Self(0);
6637 #[doc = "The peripheral is the flow controller"] 6578 #[doc = "SPI TI mode"]
6638 pub const PERIPHERAL: Self = Self(0x01); 6579 pub const TI: Self = Self(0x01);
6639 } 6580 }
6640 #[repr(transparent)] 6581 #[repr(transparent)]
6641 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 6582 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6642 pub struct Pl(pub u8); 6583 pub struct Cpha(pub u8);
6643 impl Pl { 6584 impl Cpha {
6644 #[doc = "Low"] 6585 #[doc = "The first clock transition is the first data capture edge"]
6645 pub const LOW: Self = Self(0); 6586 pub const FIRSTEDGE: Self = Self(0);
6646 #[doc = "Medium"] 6587 #[doc = "The second clock transition is the first data capture edge"]
6647 pub const MEDIUM: Self = Self(0x01); 6588 pub const SECONDEDGE: Self = Self(0x01);
6648 #[doc = "High"]
6649 pub const HIGH: Self = Self(0x02);
6650 #[doc = "Very high"]
6651 pub const VERYHIGH: Self = Self(0x03);
6652 } 6589 }
6653 #[repr(transparent)] 6590 #[repr(transparent)]
6654 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 6591 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6655 pub struct Circ(pub u8); 6592 pub struct Bidioe(pub u8);
6656 impl Circ { 6593 impl Bidioe {
6657 #[doc = "Circular mode disabled"] 6594 #[doc = "Output disabled (receive-only mode)"]
6658 pub const DISABLED: Self = Self(0); 6595 pub const OUTPUTDISABLED: Self = Self(0);
6659 #[doc = "Circular mode enabled"] 6596 #[doc = "Output enabled (transmit-only mode)"]
6660 pub const ENABLED: Self = Self(0x01); 6597 pub const OUTPUTENABLED: Self = Self(0x01);
6661 } 6598 }
6662 #[repr(transparent)] 6599 #[repr(transparent)]
6663 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 6600 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6664 pub struct Fth(pub u8); 6601 pub struct Cpol(pub u8);
6665 impl Fth { 6602 impl Cpol {
6666 #[doc = "1/4 full FIFO"] 6603 #[doc = "CK to 0 when idle"]
6667 pub const QUARTER: Self = Self(0); 6604 pub const IDLELOW: Self = Self(0);
6668 #[doc = "1/2 full FIFO"] 6605 #[doc = "CK to 1 when idle"]
6669 pub const HALF: Self = Self(0x01); 6606 pub const IDLEHIGH: Self = Self(0x01);
6670 #[doc = "3/4 full FIFO"]
6671 pub const THREEQUARTERS: Self = Self(0x02);
6672 #[doc = "Full FIFO"]
6673 pub const FULL: Self = Self(0x03);
6674 } 6607 }
6675 #[repr(transparent)] 6608 #[repr(transparent)]
6676 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 6609 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6677 pub struct Ct(pub u8); 6610 pub struct Dff(pub u8);
6678 impl Ct { 6611 impl Dff {
6679 #[doc = "The current target memory is Memory 0"] 6612 #[doc = "8-bit data frame format is selected for transmission/reception"]
6680 pub const MEMORY0: Self = Self(0); 6613 pub const EIGHTBIT: Self = Self(0);
6681 #[doc = "The current target memory is Memory 1"] 6614 #[doc = "16-bit data frame format is selected for transmission/reception"]
6682 pub const MEMORY1: Self = Self(0x01); 6615 pub const SIXTEENBIT: Self = Self(0x01);
6683 } 6616 }
6684 #[repr(transparent)] 6617 #[repr(transparent)]
6685 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 6618 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6686 pub struct Dmdis(pub u8); 6619 pub struct Frer(pub u8);
6687 impl Dmdis { 6620 impl Frer {
6688 #[doc = "Direct mode is enabled"] 6621 #[doc = "No frame format error"]
6689 pub const ENABLED: Self = Self(0); 6622 pub const NOERROR: Self = Self(0);
6690 #[doc = "Direct mode is disabled"] 6623 #[doc = "A frame format error occurred"]
6691 pub const DISABLED: Self = Self(0x01); 6624 pub const ERROR: Self = Self(0x01);
6692 } 6625 }
6693 #[repr(transparent)] 6626 #[repr(transparent)]
6694 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 6627 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6695 pub struct Size(pub u8); 6628 pub struct Bidimode(pub u8);
6696 impl Size { 6629 impl Bidimode {
6697 #[doc = "Byte (8-bit)"] 6630 #[doc = "2-line unidirectional data mode selected"]
6698 pub const BITS8: Self = Self(0); 6631 pub const UNIDIRECTIONAL: Self = Self(0);
6699 #[doc = "Half-word (16-bit)"] 6632 #[doc = "1-line bidirectional data mode selected"]
6700 pub const BITS16: Self = Self(0x01); 6633 pub const BIDIRECTIONAL: Self = Self(0x01);
6701 #[doc = "Word (32-bit)"]
6702 pub const BITS32: Self = Self(0x02);
6703 } 6634 }
6704 } 6635 }
6705 pub mod regs { 6636 pub mod regs {
6706 use crate::generic::*; 6637 use crate::generic::*;
6707 #[doc = "low interrupt flag clear register"] 6638 #[doc = "CRC polynomial register"]
6708 #[repr(transparent)]
6709 #[derive(Copy, Clone, Eq, PartialEq)]
6710 pub struct Ifcr(pub u32);
6711 impl Ifcr {
6712 #[doc = "Stream x clear FIFO error interrupt flag (x = 3..0)"]
6713 pub fn cfeif(&self, n: usize) -> bool {
6714 assert!(n < 4usize);
6715 let offs = 0usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
6716 let val = (self.0 >> offs) & 0x01;
6717 val != 0
6718 }
6719 #[doc = "Stream x clear FIFO error interrupt flag (x = 3..0)"]
6720 pub fn set_cfeif(&mut self, n: usize, val: bool) {
6721 assert!(n < 4usize);
6722 let offs = 0usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
6723 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
6724 }
6725 #[doc = "Stream x clear direct mode error interrupt flag (x = 3..0)"]
6726 pub fn cdmeif(&self, n: usize) -> bool {
6727 assert!(n < 4usize);
6728 let offs = 2usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
6729 let val = (self.0 >> offs) & 0x01;
6730 val != 0
6731 }
6732 #[doc = "Stream x clear direct mode error interrupt flag (x = 3..0)"]
6733 pub fn set_cdmeif(&mut self, n: usize, val: bool) {
6734 assert!(n < 4usize);
6735 let offs = 2usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
6736 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
6737 }
6738 #[doc = "Stream x clear transfer error interrupt flag (x = 3..0)"]
6739 pub fn cteif(&self, n: usize) -> bool {
6740 assert!(n < 4usize);
6741 let offs = 3usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
6742 let val = (self.0 >> offs) & 0x01;
6743 val != 0
6744 }
6745 #[doc = "Stream x clear transfer error interrupt flag (x = 3..0)"]
6746 pub fn set_cteif(&mut self, n: usize, val: bool) {
6747 assert!(n < 4usize);
6748 let offs = 3usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
6749 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
6750 }
6751 #[doc = "Stream x clear half transfer interrupt flag (x = 3..0)"]
6752 pub fn chtif(&self, n: usize) -> bool {
6753 assert!(n < 4usize);
6754 let offs = 4usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
6755 let val = (self.0 >> offs) & 0x01;
6756 val != 0
6757 }
6758 #[doc = "Stream x clear half transfer interrupt flag (x = 3..0)"]
6759 pub fn set_chtif(&mut self, n: usize, val: bool) {
6760 assert!(n < 4usize);
6761 let offs = 4usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
6762 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
6763 }
6764 #[doc = "Stream x clear transfer complete interrupt flag (x = 3..0)"]
6765 pub fn ctcif(&self, n: usize) -> bool {
6766 assert!(n < 4usize);
6767 let offs = 5usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
6768 let val = (self.0 >> offs) & 0x01;
6769 val != 0
6770 }
6771 #[doc = "Stream x clear transfer complete interrupt flag (x = 3..0)"]
6772 pub fn set_ctcif(&mut self, n: usize, val: bool) {
6773 assert!(n < 4usize);
6774 let offs = 5usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
6775 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
6776 }
6777 }
6778 impl Default for Ifcr {
6779 fn default() -> Ifcr {
6780 Ifcr(0)
6781 }
6782 }
6783 #[doc = "stream x FIFO control register"]
6784 #[repr(transparent)] 6639 #[repr(transparent)]
6785 #[derive(Copy, Clone, Eq, PartialEq)] 6640 #[derive(Copy, Clone, Eq, PartialEq)]
6786 pub struct Fcr(pub u32); 6641 pub struct Crcpr(pub u32);
6787 impl Fcr { 6642 impl Crcpr {
6788 #[doc = "FIFO threshold selection"] 6643 #[doc = "CRC polynomial register"]
6789 pub const fn fth(&self) -> super::vals::Fth { 6644 pub const fn crcpoly(&self) -> u16 {
6790 let val = (self.0 >> 0usize) & 0x03; 6645 let val = (self.0 >> 0usize) & 0xffff;
6791 super::vals::Fth(val as u8) 6646 val as u16
6792 }
6793 #[doc = "FIFO threshold selection"]
6794 pub fn set_fth(&mut self, val: super::vals::Fth) {
6795 self.0 = (self.0 & !(0x03 << 0usize)) | (((val.0 as u32) & 0x03) << 0usize);
6796 }
6797 #[doc = "Direct mode disable"]
6798 pub const fn dmdis(&self) -> super::vals::Dmdis {
6799 let val = (self.0 >> 2usize) & 0x01;
6800 super::vals::Dmdis(val as u8)
6801 }
6802 #[doc = "Direct mode disable"]
6803 pub fn set_dmdis(&mut self, val: super::vals::Dmdis) {
6804 self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize);
6805 }
6806 #[doc = "FIFO status"]
6807 pub const fn fs(&self) -> super::vals::Fs {
6808 let val = (self.0 >> 3usize) & 0x07;
6809 super::vals::Fs(val as u8)
6810 }
6811 #[doc = "FIFO status"]
6812 pub fn set_fs(&mut self, val: super::vals::Fs) {
6813 self.0 = (self.0 & !(0x07 << 3usize)) | (((val.0 as u32) & 0x07) << 3usize);
6814 }
6815 #[doc = "FIFO error interrupt enable"]
6816 pub const fn feie(&self) -> bool {
6817 let val = (self.0 >> 7usize) & 0x01;
6818 val != 0
6819 } 6647 }
6820 #[doc = "FIFO error interrupt enable"] 6648 #[doc = "CRC polynomial register"]
6821 pub fn set_feie(&mut self, val: bool) { 6649 pub fn set_crcpoly(&mut self, val: u16) {
6822 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); 6650 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
6823 } 6651 }
6824 } 6652 }
6825 impl Default for Fcr { 6653 impl Default for Crcpr {
6826 fn default() -> Fcr { 6654 fn default() -> Crcpr {
6827 Fcr(0) 6655 Crcpr(0)
6828 } 6656 }
6829 } 6657 }
6830 #[doc = "stream x number of data register"] 6658 #[doc = "TX CRC register"]
6831 #[repr(transparent)] 6659 #[repr(transparent)]
6832 #[derive(Copy, Clone, Eq, PartialEq)] 6660 #[derive(Copy, Clone, Eq, PartialEq)]
6833 pub struct Ndtr(pub u32); 6661 pub struct Txcrcr(pub u32);
6834 impl Ndtr { 6662 impl Txcrcr {
6835 #[doc = "Number of data items to transfer"] 6663 #[doc = "Tx CRC register"]
6836 pub const fn ndt(&self) -> u16 { 6664 pub const fn tx_crc(&self) -> u16 {
6837 let val = (self.0 >> 0usize) & 0xffff; 6665 let val = (self.0 >> 0usize) & 0xffff;
6838 val as u16 6666 val as u16
6839 } 6667 }
6840 #[doc = "Number of data items to transfer"] 6668 #[doc = "Tx CRC register"]
6841 pub fn set_ndt(&mut self, val: u16) { 6669 pub fn set_tx_crc(&mut self, val: u16) {
6842 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); 6670 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
6843 } 6671 }
6844 } 6672 }
6845 impl Default for Ndtr { 6673 impl Default for Txcrcr {
6846 fn default() -> Ndtr { 6674 fn default() -> Txcrcr {
6847 Ndtr(0) 6675 Txcrcr(0)
6848 } 6676 }
6849 } 6677 }
6850 #[doc = "low interrupt status register"] 6678 #[doc = "control register 2"]
6851 #[repr(transparent)] 6679 #[repr(transparent)]
6852 #[derive(Copy, Clone, Eq, PartialEq)] 6680 #[derive(Copy, Clone, Eq, PartialEq)]
6853 pub struct Isr(pub u32); 6681 pub struct Cr2(pub u32);
6854 impl Isr { 6682 impl Cr2 {
6855 #[doc = "Stream x FIFO error interrupt flag (x=3..0)"] 6683 #[doc = "Rx buffer DMA enable"]
6856 pub fn feif(&self, n: usize) -> bool { 6684 pub const fn rxdmaen(&self) -> bool {
6857 assert!(n < 4usize); 6685 let val = (self.0 >> 0usize) & 0x01;
6858 let offs = 0usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
6859 let val = (self.0 >> offs) & 0x01;
6860 val != 0 6686 val != 0
6861 } 6687 }
6862 #[doc = "Stream x FIFO error interrupt flag (x=3..0)"] 6688 #[doc = "Rx buffer DMA enable"]
6863 pub fn set_feif(&mut self, n: usize, val: bool) { 6689 pub fn set_rxdmaen(&mut self, val: bool) {
6864 assert!(n < 4usize); 6690 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
6865 let offs = 0usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
6866 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
6867 } 6691 }
6868 #[doc = "Stream x direct mode error interrupt flag (x=3..0)"] 6692 #[doc = "Tx buffer DMA enable"]
6869 pub fn dmeif(&self, n: usize) -> bool { 6693 pub const fn txdmaen(&self) -> bool {
6870 assert!(n < 4usize); 6694 let val = (self.0 >> 1usize) & 0x01;
6871 let offs = 2usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
6872 let val = (self.0 >> offs) & 0x01;
6873 val != 0 6695 val != 0
6874 } 6696 }
6875 #[doc = "Stream x direct mode error interrupt flag (x=3..0)"] 6697 #[doc = "Tx buffer DMA enable"]
6876 pub fn set_dmeif(&mut self, n: usize, val: bool) { 6698 pub fn set_txdmaen(&mut self, val: bool) {
6877 assert!(n < 4usize); 6699 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
6878 let offs = 2usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
6879 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
6880 } 6700 }
6881 #[doc = "Stream x transfer error interrupt flag (x=3..0)"] 6701 #[doc = "SS output enable"]
6882 pub fn teif(&self, n: usize) -> bool { 6702 pub const fn ssoe(&self) -> bool {
6883 assert!(n < 4usize); 6703 let val = (self.0 >> 2usize) & 0x01;
6884 let offs = 3usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
6885 let val = (self.0 >> offs) & 0x01;
6886 val != 0 6704 val != 0
6887 } 6705 }
6888 #[doc = "Stream x transfer error interrupt flag (x=3..0)"] 6706 #[doc = "SS output enable"]
6889 pub fn set_teif(&mut self, n: usize, val: bool) { 6707 pub fn set_ssoe(&mut self, val: bool) {
6890 assert!(n < 4usize); 6708 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
6891 let offs = 3usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
6892 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
6893 } 6709 }
6894 #[doc = "Stream x half transfer interrupt flag (x=3..0)"] 6710 #[doc = "Frame format"]
6895 pub fn htif(&self, n: usize) -> bool { 6711 pub const fn frf(&self) -> super::vals::Frf {
6896 assert!(n < 4usize); 6712 let val = (self.0 >> 4usize) & 0x01;
6897 let offs = 4usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); 6713 super::vals::Frf(val as u8)
6898 let val = (self.0 >> offs) & 0x01; 6714 }
6715 #[doc = "Frame format"]
6716 pub fn set_frf(&mut self, val: super::vals::Frf) {
6717 self.0 = (self.0 & !(0x01 << 4usize)) | (((val.0 as u32) & 0x01) << 4usize);
6718 }
6719 #[doc = "Error interrupt enable"]
6720 pub const fn errie(&self) -> bool {
6721 let val = (self.0 >> 5usize) & 0x01;
6899 val != 0 6722 val != 0
6900 } 6723 }
6901 #[doc = "Stream x half transfer interrupt flag (x=3..0)"] 6724 #[doc = "Error interrupt enable"]
6902 pub fn set_htif(&mut self, n: usize, val: bool) { 6725 pub fn set_errie(&mut self, val: bool) {
6903 assert!(n < 4usize); 6726 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
6904 let offs = 4usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
6905 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
6906 } 6727 }
6907 #[doc = "Stream x transfer complete interrupt flag (x = 3..0)"] 6728 #[doc = "RX buffer not empty interrupt enable"]
6908 pub fn tcif(&self, n: usize) -> bool { 6729 pub const fn rxneie(&self) -> bool {
6909 assert!(n < 4usize); 6730 let val = (self.0 >> 6usize) & 0x01;
6910 let offs = 5usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
6911 let val = (self.0 >> offs) & 0x01;
6912 val != 0 6731 val != 0
6913 } 6732 }
6914 #[doc = "Stream x transfer complete interrupt flag (x = 3..0)"] 6733 #[doc = "RX buffer not empty interrupt enable"]
6915 pub fn set_tcif(&mut self, n: usize, val: bool) { 6734 pub fn set_rxneie(&mut self, val: bool) {
6916 assert!(n < 4usize); 6735 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
6917 let offs = 5usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); 6736 }
6918 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); 6737 #[doc = "Tx buffer empty interrupt enable"]
6738 pub const fn txeie(&self) -> bool {
6739 let val = (self.0 >> 7usize) & 0x01;
6740 val != 0
6741 }
6742 #[doc = "Tx buffer empty interrupt enable"]
6743 pub fn set_txeie(&mut self, val: bool) {
6744 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
6919 } 6745 }
6920 } 6746 }
6921 impl Default for Isr { 6747 impl Default for Cr2 {
6922 fn default() -> Isr { 6748 fn default() -> Cr2 {
6923 Isr(0) 6749 Cr2(0)
6924 } 6750 }
6925 } 6751 }
6926 #[doc = "stream x configuration register"] 6752 #[doc = "control register 1"]
6927 #[repr(transparent)] 6753 #[repr(transparent)]
6928 #[derive(Copy, Clone, Eq, PartialEq)] 6754 #[derive(Copy, Clone, Eq, PartialEq)]
6929 pub struct Cr(pub u32); 6755 pub struct Cr1(pub u32);
6930 impl Cr { 6756 impl Cr1 {
6931 #[doc = "Stream enable / flag stream ready when read low"] 6757 #[doc = "Clock phase"]
6932 pub const fn en(&self) -> bool { 6758 pub const fn cpha(&self) -> super::vals::Cpha {
6933 let val = (self.0 >> 0usize) & 0x01; 6759 let val = (self.0 >> 0usize) & 0x01;
6934 val != 0 6760 super::vals::Cpha(val as u8)
6935 } 6761 }
6936 #[doc = "Stream enable / flag stream ready when read low"] 6762 #[doc = "Clock phase"]
6937 pub fn set_en(&mut self, val: bool) { 6763 pub fn set_cpha(&mut self, val: super::vals::Cpha) {
6938 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 6764 self.0 = (self.0 & !(0x01 << 0usize)) | (((val.0 as u32) & 0x01) << 0usize);
6939 } 6765 }
6940 #[doc = "Direct mode error interrupt enable"] 6766 #[doc = "Clock polarity"]
6941 pub const fn dmeie(&self) -> bool { 6767 pub const fn cpol(&self) -> super::vals::Cpol {
6942 let val = (self.0 >> 1usize) & 0x01; 6768 let val = (self.0 >> 1usize) & 0x01;
6943 val != 0 6769 super::vals::Cpol(val as u8)
6944 } 6770 }
6945 #[doc = "Direct mode error interrupt enable"] 6771 #[doc = "Clock polarity"]
6946 pub fn set_dmeie(&mut self, val: bool) { 6772 pub fn set_cpol(&mut self, val: super::vals::Cpol) {
6947 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); 6773 self.0 = (self.0 & !(0x01 << 1usize)) | (((val.0 as u32) & 0x01) << 1usize);
6948 } 6774 }
6949 #[doc = "Transfer error interrupt enable"] 6775 #[doc = "Master selection"]
6950 pub const fn teie(&self) -> bool { 6776 pub const fn mstr(&self) -> super::vals::Mstr {
6951 let val = (self.0 >> 2usize) & 0x01; 6777 let val = (self.0 >> 2usize) & 0x01;
6952 val != 0 6778 super::vals::Mstr(val as u8)
6953 } 6779 }
6954 #[doc = "Transfer error interrupt enable"] 6780 #[doc = "Master selection"]
6955 pub fn set_teie(&mut self, val: bool) { 6781 pub fn set_mstr(&mut self, val: super::vals::Mstr) {
6956 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); 6782 self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize);
6957 } 6783 }
6958 #[doc = "Half transfer interrupt enable"] 6784 #[doc = "Baud rate control"]
6959 pub const fn htie(&self) -> bool { 6785 pub const fn br(&self) -> super::vals::Br {
6960 let val = (self.0 >> 3usize) & 0x01; 6786 let val = (self.0 >> 3usize) & 0x07;
6961 val != 0 6787 super::vals::Br(val as u8)
6962 } 6788 }
6963 #[doc = "Half transfer interrupt enable"] 6789 #[doc = "Baud rate control"]
6964 pub fn set_htie(&mut self, val: bool) { 6790 pub fn set_br(&mut self, val: super::vals::Br) {
6965 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); 6791 self.0 = (self.0 & !(0x07 << 3usize)) | (((val.0 as u32) & 0x07) << 3usize);
6966 } 6792 }
6967 #[doc = "Transfer complete interrupt enable"] 6793 #[doc = "SPI enable"]
6968 pub const fn tcie(&self) -> bool { 6794 pub const fn spe(&self) -> bool {
6969 let val = (self.0 >> 4usize) & 0x01; 6795 let val = (self.0 >> 6usize) & 0x01;
6970 val != 0 6796 val != 0
6971 } 6797 }
6972 #[doc = "Transfer complete interrupt enable"] 6798 #[doc = "SPI enable"]
6973 pub fn set_tcie(&mut self, val: bool) { 6799 pub fn set_spe(&mut self, val: bool) {
6974 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); 6800 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
6975 }
6976 #[doc = "Peripheral flow controller"]
6977 pub const fn pfctrl(&self) -> super::vals::Pfctrl {
6978 let val = (self.0 >> 5usize) & 0x01;
6979 super::vals::Pfctrl(val as u8)
6980 }
6981 #[doc = "Peripheral flow controller"]
6982 pub fn set_pfctrl(&mut self, val: super::vals::Pfctrl) {
6983 self.0 = (self.0 & !(0x01 << 5usize)) | (((val.0 as u32) & 0x01) << 5usize);
6984 } 6801 }
6985 #[doc = "Data transfer direction"] 6802 #[doc = "Frame format"]
6986 pub const fn dir(&self) -> super::vals::Dir { 6803 pub const fn lsbfirst(&self) -> super::vals::Lsbfirst {
6987 let val = (self.0 >> 6usize) & 0x03; 6804 let val = (self.0 >> 7usize) & 0x01;
6988 super::vals::Dir(val as u8) 6805 super::vals::Lsbfirst(val as u8)
6989 } 6806 }
6990 #[doc = "Data transfer direction"] 6807 #[doc = "Frame format"]
6991 pub fn set_dir(&mut self, val: super::vals::Dir) { 6808 pub fn set_lsbfirst(&mut self, val: super::vals::Lsbfirst) {
6992 self.0 = (self.0 & !(0x03 << 6usize)) | (((val.0 as u32) & 0x03) << 6usize); 6809 self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize);
6993 } 6810 }
6994 #[doc = "Circular mode"] 6811 #[doc = "Internal slave select"]
6995 pub const fn circ(&self) -> super::vals::Circ { 6812 pub const fn ssi(&self) -> bool {
6996 let val = (self.0 >> 8usize) & 0x01; 6813 let val = (self.0 >> 8usize) & 0x01;
6997 super::vals::Circ(val as u8) 6814 val != 0
6998 } 6815 }
6999 #[doc = "Circular mode"] 6816 #[doc = "Internal slave select"]
7000 pub fn set_circ(&mut self, val: super::vals::Circ) { 6817 pub fn set_ssi(&mut self, val: bool) {
7001 self.0 = (self.0 & !(0x01 << 8usize)) | (((val.0 as u32) & 0x01) << 8usize); 6818 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
7002 } 6819 }
7003 #[doc = "Peripheral increment mode"] 6820 #[doc = "Software slave management"]
7004 pub const fn pinc(&self) -> super::vals::Inc { 6821 pub const fn ssm(&self) -> bool {
7005 let val = (self.0 >> 9usize) & 0x01; 6822 let val = (self.0 >> 9usize) & 0x01;
7006 super::vals::Inc(val as u8) 6823 val != 0
7007 } 6824 }
7008 #[doc = "Peripheral increment mode"] 6825 #[doc = "Software slave management"]
7009 pub fn set_pinc(&mut self, val: super::vals::Inc) { 6826 pub fn set_ssm(&mut self, val: bool) {
7010 self.0 = (self.0 & !(0x01 << 9usize)) | (((val.0 as u32) & 0x01) << 9usize); 6827 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
7011 } 6828 }
7012 #[doc = "Memory increment mode"] 6829 #[doc = "Receive only"]
7013 pub const fn minc(&self) -> super::vals::Inc { 6830 pub const fn rxonly(&self) -> super::vals::Rxonly {
7014 let val = (self.0 >> 10usize) & 0x01; 6831 let val = (self.0 >> 10usize) & 0x01;
7015 super::vals::Inc(val as u8) 6832 super::vals::Rxonly(val as u8)
7016 } 6833 }
7017 #[doc = "Memory increment mode"] 6834 #[doc = "Receive only"]
7018 pub fn set_minc(&mut self, val: super::vals::Inc) { 6835 pub fn set_rxonly(&mut self, val: super::vals::Rxonly) {
7019 self.0 = (self.0 & !(0x01 << 10usize)) | (((val.0 as u32) & 0x01) << 10usize); 6836 self.0 = (self.0 & !(0x01 << 10usize)) | (((val.0 as u32) & 0x01) << 10usize);
7020 } 6837 }
7021 #[doc = "Peripheral data size"] 6838 #[doc = "Data frame format"]
7022 pub const fn psize(&self) -> super::vals::Size { 6839 pub const fn dff(&self) -> super::vals::Dff {
7023 let val = (self.0 >> 11usize) & 0x03; 6840 let val = (self.0 >> 11usize) & 0x01;
7024 super::vals::Size(val as u8) 6841 super::vals::Dff(val as u8)
7025 } 6842 }
7026 #[doc = "Peripheral data size"] 6843 #[doc = "Data frame format"]
7027 pub fn set_psize(&mut self, val: super::vals::Size) { 6844 pub fn set_dff(&mut self, val: super::vals::Dff) {
7028 self.0 = (self.0 & !(0x03 << 11usize)) | (((val.0 as u32) & 0x03) << 11usize); 6845 self.0 = (self.0 & !(0x01 << 11usize)) | (((val.0 as u32) & 0x01) << 11usize);
7029 } 6846 }
7030 #[doc = "Memory data size"] 6847 #[doc = "CRC transfer next"]
7031 pub const fn msize(&self) -> super::vals::Size { 6848 pub const fn crcnext(&self) -> super::vals::Crcnext {
7032 let val = (self.0 >> 13usize) & 0x03; 6849 let val = (self.0 >> 12usize) & 0x01;
7033 super::vals::Size(val as u8) 6850 super::vals::Crcnext(val as u8)
7034 } 6851 }
7035 #[doc = "Memory data size"] 6852 #[doc = "CRC transfer next"]
7036 pub fn set_msize(&mut self, val: super::vals::Size) { 6853 pub fn set_crcnext(&mut self, val: super::vals::Crcnext) {
7037 self.0 = (self.0 & !(0x03 << 13usize)) | (((val.0 as u32) & 0x03) << 13usize); 6854 self.0 = (self.0 & !(0x01 << 12usize)) | (((val.0 as u32) & 0x01) << 12usize);
7038 } 6855 }
7039 #[doc = "Peripheral increment offset size"] 6856 #[doc = "Hardware CRC calculation enable"]
7040 pub const fn pincos(&self) -> super::vals::Pincos { 6857 pub const fn crcen(&self) -> bool {
6858 let val = (self.0 >> 13usize) & 0x01;
6859 val != 0
6860 }
6861 #[doc = "Hardware CRC calculation enable"]
6862 pub fn set_crcen(&mut self, val: bool) {
6863 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize);
6864 }
6865 #[doc = "Output enable in bidirectional mode"]
6866 pub const fn bidioe(&self) -> super::vals::Bidioe {
6867 let val = (self.0 >> 14usize) & 0x01;
6868 super::vals::Bidioe(val as u8)
6869 }
6870 #[doc = "Output enable in bidirectional mode"]
6871 pub fn set_bidioe(&mut self, val: super::vals::Bidioe) {
6872 self.0 = (self.0 & !(0x01 << 14usize)) | (((val.0 as u32) & 0x01) << 14usize);
6873 }
6874 #[doc = "Bidirectional data mode enable"]
6875 pub const fn bidimode(&self) -> super::vals::Bidimode {
7041 let val = (self.0 >> 15usize) & 0x01; 6876 let val = (self.0 >> 15usize) & 0x01;
7042 super::vals::Pincos(val as u8) 6877 super::vals::Bidimode(val as u8)
7043 } 6878 }
7044 #[doc = "Peripheral increment offset size"] 6879 #[doc = "Bidirectional data mode enable"]
7045 pub fn set_pincos(&mut self, val: super::vals::Pincos) { 6880 pub fn set_bidimode(&mut self, val: super::vals::Bidimode) {
7046 self.0 = (self.0 & !(0x01 << 15usize)) | (((val.0 as u32) & 0x01) << 15usize); 6881 self.0 = (self.0 & !(0x01 << 15usize)) | (((val.0 as u32) & 0x01) << 15usize);
7047 } 6882 }
7048 #[doc = "Priority level"] 6883 }
7049 pub const fn pl(&self) -> super::vals::Pl { 6884 impl Default for Cr1 {
7050 let val = (self.0 >> 16usize) & 0x03; 6885 fn default() -> Cr1 {
7051 super::vals::Pl(val as u8) 6886 Cr1(0)
7052 } 6887 }
7053 #[doc = "Priority level"] 6888 }
7054 pub fn set_pl(&mut self, val: super::vals::Pl) { 6889 #[doc = "RX CRC register"]
7055 self.0 = (self.0 & !(0x03 << 16usize)) | (((val.0 as u32) & 0x03) << 16usize); 6890 #[repr(transparent)]
6891 #[derive(Copy, Clone, Eq, PartialEq)]
6892 pub struct Rxcrcr(pub u32);
6893 impl Rxcrcr {
6894 #[doc = "Rx CRC register"]
6895 pub const fn rx_crc(&self) -> u16 {
6896 let val = (self.0 >> 0usize) & 0xffff;
6897 val as u16
7056 } 6898 }
7057 #[doc = "Double buffer mode"] 6899 #[doc = "Rx CRC register"]
7058 pub const fn dbm(&self) -> super::vals::Dbm { 6900 pub fn set_rx_crc(&mut self, val: u16) {
7059 let val = (self.0 >> 18usize) & 0x01; 6901 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
7060 super::vals::Dbm(val as u8)
7061 } 6902 }
7062 #[doc = "Double buffer mode"] 6903 }
7063 pub fn set_dbm(&mut self, val: super::vals::Dbm) { 6904 impl Default for Rxcrcr {
7064 self.0 = (self.0 & !(0x01 << 18usize)) | (((val.0 as u32) & 0x01) << 18usize); 6905 fn default() -> Rxcrcr {
6906 Rxcrcr(0)
7065 } 6907 }
7066 #[doc = "Current target (only in double buffer mode)"] 6908 }
7067 pub const fn ct(&self) -> super::vals::Ct { 6909 #[doc = "data register"]
7068 let val = (self.0 >> 19usize) & 0x01; 6910 #[repr(transparent)]
7069 super::vals::Ct(val as u8) 6911 #[derive(Copy, Clone, Eq, PartialEq)]
6912 pub struct Dr(pub u32);
6913 impl Dr {
6914 #[doc = "Data register"]
6915 pub const fn dr(&self) -> u16 {
6916 let val = (self.0 >> 0usize) & 0xffff;
6917 val as u16
7070 } 6918 }
7071 #[doc = "Current target (only in double buffer mode)"] 6919 #[doc = "Data register"]
7072 pub fn set_ct(&mut self, val: super::vals::Ct) { 6920 pub fn set_dr(&mut self, val: u16) {
7073 self.0 = (self.0 & !(0x01 << 19usize)) | (((val.0 as u32) & 0x01) << 19usize); 6921 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
7074 } 6922 }
7075 #[doc = "Peripheral burst transfer configuration"] 6923 }
7076 pub const fn pburst(&self) -> super::vals::Burst { 6924 impl Default for Dr {
7077 let val = (self.0 >> 21usize) & 0x03; 6925 fn default() -> Dr {
7078 super::vals::Burst(val as u8) 6926 Dr(0)
7079 } 6927 }
7080 #[doc = "Peripheral burst transfer configuration"] 6928 }
7081 pub fn set_pburst(&mut self, val: super::vals::Burst) { 6929 #[doc = "status register"]
7082 self.0 = (self.0 & !(0x03 << 21usize)) | (((val.0 as u32) & 0x03) << 21usize); 6930 #[repr(transparent)]
6931 #[derive(Copy, Clone, Eq, PartialEq)]
6932 pub struct Sr(pub u32);
6933 impl Sr {
6934 #[doc = "Receive buffer not empty"]
6935 pub const fn rxne(&self) -> bool {
6936 let val = (self.0 >> 0usize) & 0x01;
6937 val != 0
7083 } 6938 }
7084 #[doc = "Memory burst transfer configuration"] 6939 #[doc = "Receive buffer not empty"]
7085 pub const fn mburst(&self) -> super::vals::Burst { 6940 pub fn set_rxne(&mut self, val: bool) {
7086 let val = (self.0 >> 23usize) & 0x03; 6941 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
7087 super::vals::Burst(val as u8)
7088 } 6942 }
7089 #[doc = "Memory burst transfer configuration"] 6943 #[doc = "Transmit buffer empty"]
7090 pub fn set_mburst(&mut self, val: super::vals::Burst) { 6944 pub const fn txe(&self) -> bool {
7091 self.0 = (self.0 & !(0x03 << 23usize)) | (((val.0 as u32) & 0x03) << 23usize); 6945 let val = (self.0 >> 1usize) & 0x01;
6946 val != 0
7092 } 6947 }
7093 #[doc = "Channel selection"] 6948 #[doc = "Transmit buffer empty"]
7094 pub const fn chsel(&self) -> u8 { 6949 pub fn set_txe(&mut self, val: bool) {
7095 let val = (self.0 >> 25usize) & 0x0f; 6950 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
7096 val as u8
7097 } 6951 }
7098 #[doc = "Channel selection"] 6952 #[doc = "CRC error flag"]
7099 pub fn set_chsel(&mut self, val: u8) { 6953 pub const fn crcerr(&self) -> bool {
7100 self.0 = (self.0 & !(0x0f << 25usize)) | (((val as u32) & 0x0f) << 25usize); 6954 let val = (self.0 >> 4usize) & 0x01;
6955 val != 0
6956 }
6957 #[doc = "CRC error flag"]
6958 pub fn set_crcerr(&mut self, val: bool) {
6959 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
6960 }
6961 #[doc = "Mode fault"]
6962 pub const fn modf(&self) -> bool {
6963 let val = (self.0 >> 5usize) & 0x01;
6964 val != 0
6965 }
6966 #[doc = "Mode fault"]
6967 pub fn set_modf(&mut self, val: bool) {
6968 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
6969 }
6970 #[doc = "Overrun flag"]
6971 pub const fn ovr(&self) -> bool {
6972 let val = (self.0 >> 6usize) & 0x01;
6973 val != 0
6974 }
6975 #[doc = "Overrun flag"]
6976 pub fn set_ovr(&mut self, val: bool) {
6977 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
6978 }
6979 #[doc = "Busy flag"]
6980 pub const fn bsy(&self) -> bool {
6981 let val = (self.0 >> 7usize) & 0x01;
6982 val != 0
6983 }
6984 #[doc = "Busy flag"]
6985 pub fn set_bsy(&mut self, val: bool) {
6986 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
6987 }
6988 #[doc = "TI frame format error"]
6989 pub const fn fre(&self) -> bool {
6990 let val = (self.0 >> 8usize) & 0x01;
6991 val != 0
6992 }
6993 #[doc = "TI frame format error"]
6994 pub fn set_fre(&mut self, val: bool) {
6995 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
7101 } 6996 }
7102 } 6997 }
7103 impl Default for Cr { 6998 impl Default for Sr {
7104 fn default() -> Cr { 6999 fn default() -> Sr {
7105 Cr(0) 7000 Sr(0)
7106 } 7001 }
7107 } 7002 }
7108 } 7003 }
7109} 7004}
7110pub mod timer_v1 { 7005pub mod generic {
7111 use crate::generic::*; 7006 use core::marker::PhantomData;
7112 #[doc = "General purpose 32-bit timer"]
7113 #[derive(Copy, Clone)] 7007 #[derive(Copy, Clone)]
7114 pub struct TimGp32(pub *mut u8); 7008 pub struct RW;
7115 unsafe impl Send for TimGp32 {} 7009 #[derive(Copy, Clone)]
7116 unsafe impl Sync for TimGp32 {} 7010 pub struct R;
7117 impl TimGp32 { 7011 #[derive(Copy, Clone)]
7118 #[doc = "control register 1"] 7012 pub struct W;
7119 pub fn cr1(self) -> Reg<regs::Cr1Gp, RW> { 7013 mod sealed {
7120 unsafe { Reg::from_ptr(self.0.add(0usize)) } 7014 use super::*;
7121 } 7015 pub trait Access {}
7122 #[doc = "control register 2"] 7016 impl Access for R {}
7123 pub fn cr2(self) -> Reg<regs::Cr2Gp, RW> { 7017 impl Access for W {}
7124 unsafe { Reg::from_ptr(self.0.add(4usize)) } 7018 impl Access for RW {}
7125 }
7126 #[doc = "slave mode control register"]
7127 pub fn smcr(self) -> Reg<regs::Smcr, RW> {
7128 unsafe { Reg::from_ptr(self.0.add(8usize)) }
7129 }
7130 #[doc = "DMA/Interrupt enable register"]
7131 pub fn dier(self) -> Reg<regs::DierGp, RW> {
7132 unsafe { Reg::from_ptr(self.0.add(12usize)) }
7133 }
7134 #[doc = "status register"]
7135 pub fn sr(self) -> Reg<regs::SrGp, RW> {
7136 unsafe { Reg::from_ptr(self.0.add(16usize)) }
7137 }
7138 #[doc = "event generation register"]
7139 pub fn egr(self) -> Reg<regs::EgrGp, W> {
7140 unsafe { Reg::from_ptr(self.0.add(20usize)) }
7141 }
7142 #[doc = "capture/compare mode register 1 (input mode)"]
7143 pub fn ccmr_input(self, n: usize) -> Reg<regs::CcmrInput, RW> {
7144 assert!(n < 2usize);
7145 unsafe { Reg::from_ptr(self.0.add(24usize + n * 4usize)) }
7146 }
7147 #[doc = "capture/compare mode register 1 (output mode)"]
7148 pub fn ccmr_output(self, n: usize) -> Reg<regs::CcmrOutput, RW> {
7149 assert!(n < 2usize);
7150 unsafe { Reg::from_ptr(self.0.add(24usize + n * 4usize)) }
7151 }
7152 #[doc = "capture/compare enable register"]
7153 pub fn ccer(self) -> Reg<regs::CcerGp, RW> {
7154 unsafe { Reg::from_ptr(self.0.add(32usize)) }
7155 }
7156 #[doc = "counter"]
7157 pub fn cnt(self) -> Reg<regs::Cnt32, RW> {
7158 unsafe { Reg::from_ptr(self.0.add(36usize)) }
7159 }
7160 #[doc = "prescaler"]
7161 pub fn psc(self) -> Reg<regs::Psc, RW> {
7162 unsafe { Reg::from_ptr(self.0.add(40usize)) }
7163 }
7164 #[doc = "auto-reload register"]
7165 pub fn arr(self) -> Reg<regs::Arr32, RW> {
7166 unsafe { Reg::from_ptr(self.0.add(44usize)) }
7167 }
7168 #[doc = "capture/compare register"]
7169 pub fn ccr(self, n: usize) -> Reg<regs::Ccr32, RW> {
7170 assert!(n < 4usize);
7171 unsafe { Reg::from_ptr(self.0.add(52usize + n * 4usize)) }
7172 }
7173 #[doc = "DMA control register"]
7174 pub fn dcr(self) -> Reg<regs::Dcr, RW> {
7175 unsafe { Reg::from_ptr(self.0.add(72usize)) }
7176 }
7177 #[doc = "DMA address for full transfer"]
7178 pub fn dmar(self) -> Reg<regs::Dmar, RW> {
7179 unsafe { Reg::from_ptr(self.0.add(76usize)) }
7180 }
7181 } 7019 }
7182 #[doc = "Advanced-timers"] 7020 pub trait Access: sealed::Access + Copy {}
7021 impl Access for R {}
7022 impl Access for W {}
7023 impl Access for RW {}
7024 pub trait Read: Access {}
7025 impl Read for RW {}
7026 impl Read for R {}
7027 pub trait Write: Access {}
7028 impl Write for RW {}
7029 impl Write for W {}
7183 #[derive(Copy, Clone)] 7030 #[derive(Copy, Clone)]
7184 pub struct TimAdv(pub *mut u8); 7031 pub struct Reg<T: Copy, A: Access> {
7185 unsafe impl Send for TimAdv {} 7032 ptr: *mut u8,
7186 unsafe impl Sync for TimAdv {} 7033 phantom: PhantomData<*mut (T, A)>,
7187 impl TimAdv { 7034 }
7188 #[doc = "control register 1"] 7035 unsafe impl<T: Copy, A: Access> Send for Reg<T, A> {}
7189 pub fn cr1(self) -> Reg<regs::Cr1Gp, RW> { 7036 unsafe impl<T: Copy, A: Access> Sync for Reg<T, A> {}
7190 unsafe { Reg::from_ptr(self.0.add(0usize)) } 7037 impl<T: Copy, A: Access> Reg<T, A> {
7191 } 7038 pub fn from_ptr(ptr: *mut u8) -> Self {
7192 #[doc = "control register 2"] 7039 Self {
7193 pub fn cr2(self) -> Reg<regs::Cr2Adv, RW> { 7040 ptr,
7194 unsafe { Reg::from_ptr(self.0.add(4usize)) } 7041 phantom: PhantomData,
7195 } 7042 }
7196 #[doc = "slave mode control register"]
7197 pub fn smcr(self) -> Reg<regs::Smcr, RW> {
7198 unsafe { Reg::from_ptr(self.0.add(8usize)) }
7199 }
7200 #[doc = "DMA/Interrupt enable register"]
7201 pub fn dier(self) -> Reg<regs::DierAdv, RW> {
7202 unsafe { Reg::from_ptr(self.0.add(12usize)) }
7203 }
7204 #[doc = "status register"]
7205 pub fn sr(self) -> Reg<regs::SrAdv, RW> {
7206 unsafe { Reg::from_ptr(self.0.add(16usize)) }
7207 }
7208 #[doc = "event generation register"]
7209 pub fn egr(self) -> Reg<regs::EgrAdv, W> {
7210 unsafe { Reg::from_ptr(self.0.add(20usize)) }
7211 }
7212 #[doc = "capture/compare mode register 1 (input mode)"]
7213 pub fn ccmr_input(self, n: usize) -> Reg<regs::CcmrInput, RW> {
7214 assert!(n < 2usize);
7215 unsafe { Reg::from_ptr(self.0.add(24usize + n * 4usize)) }
7216 }
7217 #[doc = "capture/compare mode register 1 (output mode)"]
7218 pub fn ccmr_output(self, n: usize) -> Reg<regs::CcmrOutput, RW> {
7219 assert!(n < 2usize);
7220 unsafe { Reg::from_ptr(self.0.add(24usize + n * 4usize)) }
7221 }
7222 #[doc = "capture/compare enable register"]
7223 pub fn ccer(self) -> Reg<regs::CcerAdv, RW> {
7224 unsafe { Reg::from_ptr(self.0.add(32usize)) }
7225 }
7226 #[doc = "counter"]
7227 pub fn cnt(self) -> Reg<regs::Cnt16, RW> {
7228 unsafe { Reg::from_ptr(self.0.add(36usize)) }
7229 }
7230 #[doc = "prescaler"]
7231 pub fn psc(self) -> Reg<regs::Psc, RW> {
7232 unsafe { Reg::from_ptr(self.0.add(40usize)) }
7233 }
7234 #[doc = "auto-reload register"]
7235 pub fn arr(self) -> Reg<regs::Arr16, RW> {
7236 unsafe { Reg::from_ptr(self.0.add(44usize)) }
7237 } 7043 }
7238 #[doc = "repetition counter register"] 7044 pub fn ptr(&self) -> *mut T {
7239 pub fn rcr(self) -> Reg<regs::Rcr, RW> { 7045 self.ptr as _
7240 unsafe { Reg::from_ptr(self.0.add(48usize)) }
7241 } 7046 }
7242 #[doc = "capture/compare register"] 7047 }
7243 pub fn ccr(self, n: usize) -> Reg<regs::Ccr16, RW> { 7048 impl<T: Copy, A: Read> Reg<T, A> {
7244 assert!(n < 4usize); 7049 pub unsafe fn read(&self) -> T {
7245 unsafe { Reg::from_ptr(self.0.add(52usize + n * 4usize)) } 7050 (self.ptr as *mut T).read_volatile()
7246 } 7051 }
7247 #[doc = "break and dead-time register"] 7052 }
7248 pub fn bdtr(self) -> Reg<regs::Bdtr, RW> { 7053 impl<T: Copy, A: Write> Reg<T, A> {
7249 unsafe { Reg::from_ptr(self.0.add(68usize)) } 7054 pub unsafe fn write_value(&self, val: T) {
7055 (self.ptr as *mut T).write_volatile(val)
7250 } 7056 }
7251 #[doc = "DMA control register"] 7057 }
7252 pub fn dcr(self) -> Reg<regs::Dcr, RW> { 7058 impl<T: Default + Copy, A: Write> Reg<T, A> {
7253 unsafe { Reg::from_ptr(self.0.add(72usize)) } 7059 pub unsafe fn write<R>(&self, f: impl FnOnce(&mut T) -> R) -> R {
7060 let mut val = Default::default();
7061 let res = f(&mut val);
7062 self.write_value(val);
7063 res
7254 } 7064 }
7255 #[doc = "DMA address for full transfer"] 7065 }
7256 pub fn dmar(self) -> Reg<regs::Dmar, RW> { 7066 impl<T: Copy, A: Read + Write> Reg<T, A> {
7257 unsafe { Reg::from_ptr(self.0.add(76usize)) } 7067 pub unsafe fn modify<R>(&self, f: impl FnOnce(&mut T) -> R) -> R {
7068 let mut val = self.read();
7069 let res = f(&mut val);
7070 self.write_value(val);
7071 res
7258 } 7072 }
7259 } 7073 }
7260 #[doc = "General purpose 16-bit timer"] 7074}
7075pub mod sdmmc_v2 {
7076 use crate::generic::*;
7077 #[doc = "SDMMC"]
7261 #[derive(Copy, Clone)] 7078 #[derive(Copy, Clone)]
7262 pub struct TimGp16(pub *mut u8); 7079 pub struct Sdmmc(pub *mut u8);
7263 unsafe impl Send for TimGp16 {} 7080 unsafe impl Send for Sdmmc {}
7264 unsafe impl Sync for TimGp16 {} 7081 unsafe impl Sync for Sdmmc {}
7265 impl TimGp16 { 7082 impl Sdmmc {
7266 #[doc = "control register 1"] 7083 #[doc = "SDMMC power control register"]
7267 pub fn cr1(self) -> Reg<regs::Cr1Gp, RW> { 7084 pub fn power(self) -> Reg<regs::Power, RW> {
7268 unsafe { Reg::from_ptr(self.0.add(0usize)) } 7085 unsafe { Reg::from_ptr(self.0.add(0usize)) }
7269 } 7086 }
7270 #[doc = "control register 2"] 7087 #[doc = "The SDMMC_CLKCR register controls the SDMMC_CK output clock, the SDMMC_RX_CLK receive clock, and the bus width."]
7271 pub fn cr2(self) -> Reg<regs::Cr2Gp, RW> { 7088 pub fn clkcr(self) -> Reg<regs::Clkcr, RW> {
7272 unsafe { Reg::from_ptr(self.0.add(4usize)) } 7089 unsafe { Reg::from_ptr(self.0.add(4usize)) }
7273 } 7090 }
7274 #[doc = "slave mode control register"] 7091 #[doc = "The SDMMC_ARGR register contains a 32-bit command argument, which is sent to a card as part of a command message."]
7275 pub fn smcr(self) -> Reg<regs::Smcr, RW> { 7092 pub fn argr(self) -> Reg<regs::Argr, RW> {
7276 unsafe { Reg::from_ptr(self.0.add(8usize)) } 7093 unsafe { Reg::from_ptr(self.0.add(8usize)) }
7277 } 7094 }
7278 #[doc = "DMA/Interrupt enable register"] 7095 #[doc = "The SDMMC_CMDR register contains the command index and command type bits. The command index is sent to a card as part of a command message. The command type bits control the command path state machine (CPSM)."]
7279 pub fn dier(self) -> Reg<regs::DierGp, RW> { 7096 pub fn cmdr(self) -> Reg<regs::Cmdr, RW> {
7280 unsafe { Reg::from_ptr(self.0.add(12usize)) } 7097 unsafe { Reg::from_ptr(self.0.add(12usize)) }
7281 } 7098 }
7282 #[doc = "status register"] 7099 #[doc = "SDMMC command response register"]
7283 pub fn sr(self) -> Reg<regs::SrGp, RW> { 7100 pub fn respcmdr(self) -> Reg<regs::Respcmdr, R> {
7284 unsafe { Reg::from_ptr(self.0.add(16usize)) } 7101 unsafe { Reg::from_ptr(self.0.add(16usize)) }
7285 } 7102 }
7286 #[doc = "event generation register"] 7103 #[doc = "The SDMMC_RESP1/2/3/4R registers contain the status of a card, which is part of the received response."]
7287 pub fn egr(self) -> Reg<regs::EgrGp, W> { 7104 pub fn respr(self, n: usize) -> Reg<regs::Resp1r, R> {
7288 unsafe { Reg::from_ptr(self.0.add(20usize)) } 7105 assert!(n < 4usize);
7289 } 7106 unsafe { Reg::from_ptr(self.0.add(20usize + n * 4usize)) }
7290 #[doc = "capture/compare mode register 1 (input mode)"]
7291 pub fn ccmr_input(self, n: usize) -> Reg<regs::CcmrInput, RW> {
7292 assert!(n < 2usize);
7293 unsafe { Reg::from_ptr(self.0.add(24usize + n * 4usize)) }
7294 }
7295 #[doc = "capture/compare mode register 1 (output mode)"]
7296 pub fn ccmr_output(self, n: usize) -> Reg<regs::CcmrOutput, RW> {
7297 assert!(n < 2usize);
7298 unsafe { Reg::from_ptr(self.0.add(24usize + n * 4usize)) }
7299 }
7300 #[doc = "capture/compare enable register"]
7301 pub fn ccer(self) -> Reg<regs::CcerGp, RW> {
7302 unsafe { Reg::from_ptr(self.0.add(32usize)) }
7303 } 7107 }
7304 #[doc = "counter"] 7108 #[doc = "The SDMMC_DTIMER register contains the data timeout period, in card bus clock periods. A counter loads the value from the SDMMC_DTIMER register, and starts decrementing when the data path state machine (DPSM) enters the Wait_R or Busy state. If the timer reaches 0 while the DPSM is in either of these states, the timeout status flag is set."]
7305 pub fn cnt(self) -> Reg<regs::Cnt16, RW> { 7109 pub fn dtimer(self) -> Reg<regs::Dtimer, RW> {
7306 unsafe { Reg::from_ptr(self.0.add(36usize)) } 7110 unsafe { Reg::from_ptr(self.0.add(36usize)) }
7307 } 7111 }
7308 #[doc = "prescaler"] 7112 #[doc = "The SDMMC_DLENR register contains the number of data bytes to be transferred. The value is loaded into the data counter when data transfer starts."]
7309 pub fn psc(self) -> Reg<regs::Psc, RW> { 7113 pub fn dlenr(self) -> Reg<regs::Dlenr, RW> {
7310 unsafe { Reg::from_ptr(self.0.add(40usize)) } 7114 unsafe { Reg::from_ptr(self.0.add(40usize)) }
7311 } 7115 }
7312 #[doc = "auto-reload register"] 7116 #[doc = "The SDMMC_DCTRL register control the data path state machine (DPSM)."]
7313 pub fn arr(self) -> Reg<regs::Arr16, RW> { 7117 pub fn dctrl(self) -> Reg<regs::Dctrl, RW> {
7314 unsafe { Reg::from_ptr(self.0.add(44usize)) } 7118 unsafe { Reg::from_ptr(self.0.add(44usize)) }
7315 } 7119 }
7316 #[doc = "capture/compare register"] 7120 #[doc = "The SDMMC_DCNTR register loads the value from the data length register (see SDMMC_DLENR) when the DPSM moves from the Idle state to the Wait_R or Wait_S state. As data is transferred, the counter decrements the value until it reaches 0. The DPSM then moves to the Idle state and when there has been no error, the data status end flag (DATAEND) is set."]
7317 pub fn ccr(self, n: usize) -> Reg<regs::Ccr16, RW> { 7121 pub fn dcntr(self) -> Reg<regs::Dcntr, R> {
7318 assert!(n < 4usize); 7122 unsafe { Reg::from_ptr(self.0.add(48usize)) }
7319 unsafe { Reg::from_ptr(self.0.add(52usize + n * 4usize)) }
7320 } 7123 }
7321 #[doc = "DMA control register"] 7124 #[doc = "The SDMMC_STAR register is a read-only register. It contains two types of flag:Static flags (bits [29,21,11:0]): these bits remain asserted until they are cleared by writing to the SDMMC interrupt Clear register (see SDMMC_ICR)Dynamic flags (bits [20:12]): these bits change state depending on the state of the underlying logic (for example, FIFO full and empty flags are asserted and de-asserted as data while written to the FIFO)"]
7322 pub fn dcr(self) -> Reg<regs::Dcr, RW> { 7125 pub fn star(self) -> Reg<regs::Star, R> {
7323 unsafe { Reg::from_ptr(self.0.add(72usize)) } 7126 unsafe { Reg::from_ptr(self.0.add(52usize)) }
7324 } 7127 }
7325 #[doc = "DMA address for full transfer"] 7128 #[doc = "The SDMMC_ICR register is a write-only register. Writing a bit with 1 clears the corresponding bit in the SDMMC_STAR status register."]
7326 pub fn dmar(self) -> Reg<regs::Dmar, RW> { 7129 pub fn icr(self) -> Reg<regs::Icr, RW> {
7327 unsafe { Reg::from_ptr(self.0.add(76usize)) } 7130 unsafe { Reg::from_ptr(self.0.add(56usize)) }
7328 } 7131 }
7329 } 7132 #[doc = "The interrupt mask register determines which status flags generate an interrupt request by setting the corresponding bit to 1."]
7330 #[doc = "Basic timer"] 7133 pub fn maskr(self) -> Reg<regs::Maskr, RW> {
7331 #[derive(Copy, Clone)] 7134 unsafe { Reg::from_ptr(self.0.add(60usize)) }
7332 pub struct TimBasic(pub *mut u8);
7333 unsafe impl Send for TimBasic {}
7334 unsafe impl Sync for TimBasic {}
7335 impl TimBasic {
7336 #[doc = "control register 1"]
7337 pub fn cr1(self) -> Reg<regs::Cr1Basic, RW> {
7338 unsafe { Reg::from_ptr(self.0.add(0usize)) }
7339 } 7135 }
7340 #[doc = "control register 2"] 7136 #[doc = "The SDMMC_ACKTIMER register contains the acknowledgment timeout period, in SDMMC_CK bus clock periods. A counter loads the value from the SDMMC_ACKTIMER register, and starts decrementing when the data path state machine (DPSM) enters the Wait_Ack state. If the timer reaches 0 while the DPSM is in this states, the acknowledgment timeout status flag is set."]
7341 pub fn cr2(self) -> Reg<regs::Cr2Basic, RW> { 7137 pub fn acktimer(self) -> Reg<regs::Acktimer, RW> {
7342 unsafe { Reg::from_ptr(self.0.add(4usize)) } 7138 unsafe { Reg::from_ptr(self.0.add(64usize)) }
7343 } 7139 }
7344 #[doc = "DMA/Interrupt enable register"] 7140 #[doc = "The receive and transmit FIFOs can be read or written as 32-bit wide registers. The FIFOs contain 32 entries on 32 sequential addresses. This allows the CPU to use its load and store multiple operands to read from/write to the FIFO."]
7345 pub fn dier(self) -> Reg<regs::DierBasic, RW> { 7141 pub fn idmactrlr(self) -> Reg<regs::Idmactrlr, RW> {
7346 unsafe { Reg::from_ptr(self.0.add(12usize)) } 7142 unsafe { Reg::from_ptr(self.0.add(80usize)) }
7347 } 7143 }
7348 #[doc = "status register"] 7144 #[doc = "The SDMMC_IDMABSIZER register contains the buffers size when in double buffer configuration."]
7349 pub fn sr(self) -> Reg<regs::SrBasic, RW> { 7145 pub fn idmabsizer(self) -> Reg<regs::Idmabsizer, RW> {
7350 unsafe { Reg::from_ptr(self.0.add(16usize)) } 7146 unsafe { Reg::from_ptr(self.0.add(84usize)) }
7351 } 7147 }
7352 #[doc = "event generation register"] 7148 #[doc = "The SDMMC_IDMABASE0R register contains the memory buffer base address in single buffer configuration and the buffer 0 base address in double buffer configuration."]
7353 pub fn egr(self) -> Reg<regs::EgrBasic, W> { 7149 pub fn idmabase0r(self) -> Reg<regs::Idmabase0r, RW> {
7354 unsafe { Reg::from_ptr(self.0.add(20usize)) } 7150 unsafe { Reg::from_ptr(self.0.add(88usize)) }
7355 } 7151 }
7356 #[doc = "counter"] 7152 #[doc = "The SDMMC_IDMABASE1R register contains the double buffer configuration second buffer memory base address."]
7357 pub fn cnt(self) -> Reg<regs::Cnt16, RW> { 7153 pub fn idmabase1r(self) -> Reg<regs::Idmabase1r, RW> {
7358 unsafe { Reg::from_ptr(self.0.add(36usize)) } 7154 unsafe { Reg::from_ptr(self.0.add(92usize)) }
7359 } 7155 }
7360 #[doc = "prescaler"] 7156 #[doc = "The receive and transmit FIFOs can be only read or written as word (32-bit) wide registers. The FIFOs contain 16 entries on sequential addresses. This allows the CPU to use its load and store multiple operands to read from/write to the FIFO.When accessing SDMMC_FIFOR with half word or byte access an AHB bus fault is generated."]
7361 pub fn psc(self) -> Reg<regs::Psc, RW> { 7157 pub fn fifor(self) -> Reg<regs::Fifor, RW> {
7362 unsafe { Reg::from_ptr(self.0.add(40usize)) } 7158 unsafe { Reg::from_ptr(self.0.add(128usize)) }
7363 } 7159 }
7364 #[doc = "auto-reload register"] 7160 #[doc = "SDMMC IP version register"]
7365 pub fn arr(self) -> Reg<regs::Arr16, RW> { 7161 pub fn ver(self) -> Reg<regs::Ver, R> {
7366 unsafe { Reg::from_ptr(self.0.add(44usize)) } 7162 unsafe { Reg::from_ptr(self.0.add(1012usize)) }
7163 }
7164 #[doc = "SDMMC IP identification register"]
7165 pub fn id(self) -> Reg<regs::Id, R> {
7166 unsafe { Reg::from_ptr(self.0.add(1016usize)) }
7367 } 7167 }
7368 } 7168 }
7369 pub mod regs { 7169 pub mod regs {
7370 use crate::generic::*; 7170 use crate::generic::*;
7371 #[doc = "capture/compare mode register 1 (input mode)"] 7171 #[doc = "The SDMMC_DTIMER register contains the data timeout period, in card bus clock periods. A counter loads the value from the SDMMC_DTIMER register, and starts decrementing when the data path state machine (DPSM) enters the Wait_R or Busy state. If the timer reaches 0 while the DPSM is in either of these states, the timeout status flag is set."]
7372 #[repr(transparent)] 7172 #[repr(transparent)]
7373 #[derive(Copy, Clone, Eq, PartialEq)] 7173 #[derive(Copy, Clone, Eq, PartialEq)]
7374 pub struct CcmrInput(pub u32); 7174 pub struct Dtimer(pub u32);
7375 impl CcmrInput { 7175 impl Dtimer {
7376 #[doc = "Capture/Compare 1 selection"] 7176 #[doc = "Data and R1b busy timeout period This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0). Data and R1b busy timeout period expressed in card bus clock periods."]
7377 pub fn ccs(&self, n: usize) -> super::vals::CcmrInputCcs { 7177 pub const fn datatime(&self) -> u32 {
7378 assert!(n < 2usize); 7178 let val = (self.0 >> 0usize) & 0xffff_ffff;
7379 let offs = 0usize + n * 8usize; 7179 val as u32
7380 let val = (self.0 >> offs) & 0x03;
7381 super::vals::CcmrInputCcs(val as u8)
7382 } 7180 }
7383 #[doc = "Capture/Compare 1 selection"] 7181 #[doc = "Data and R1b busy timeout period This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0). Data and R1b busy timeout period expressed in card bus clock periods."]
7384 pub fn set_ccs(&mut self, n: usize, val: super::vals::CcmrInputCcs) { 7182 pub fn set_datatime(&mut self, val: u32) {
7385 assert!(n < 2usize); 7183 self.0 =
7386 let offs = 0usize + n * 8usize; 7184 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
7387 self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs);
7388 } 7185 }
7389 #[doc = "Input capture 1 prescaler"] 7186 }
7390 pub fn icpsc(&self, n: usize) -> u8 { 7187 impl Default for Dtimer {
7391 assert!(n < 2usize); 7188 fn default() -> Dtimer {
7392 let offs = 2usize + n * 8usize; 7189 Dtimer(0)
7393 let val = (self.0 >> offs) & 0x03; 7190 }
7191 }
7192 #[doc = "The SDMMC_CLKCR register controls the SDMMC_CK output clock, the SDMMC_RX_CLK receive clock, and the bus width."]
7193 #[repr(transparent)]
7194 #[derive(Copy, Clone, Eq, PartialEq)]
7195 pub struct Clkcr(pub u32);
7196 impl Clkcr {
7197 #[doc = "Clock divide factor This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0). This field defines the divide factor between the input clock (SDMMCCLK) and the output clock (SDMMC_CK): SDMMC_CK frequency = SDMMCCLK / [2 * CLKDIV]. 0xx: etc.. xxx: etc.."]
7198 pub const fn clkdiv(&self) -> u16 {
7199 let val = (self.0 >> 0usize) & 0x03ff;
7200 val as u16
7201 }
7202 #[doc = "Clock divide factor This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0). This field defines the divide factor between the input clock (SDMMCCLK) and the output clock (SDMMC_CK): SDMMC_CK frequency = SDMMCCLK / [2 * CLKDIV]. 0xx: etc.. xxx: etc.."]
7203 pub fn set_clkdiv(&mut self, val: u16) {
7204 self.0 = (self.0 & !(0x03ff << 0usize)) | (((val as u32) & 0x03ff) << 0usize);
7205 }
7206 #[doc = "Power saving configuration bit This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0) For power saving, the SDMMC_CK clock output can be disabled when the bus is idle by setting PWRSAV:"]
7207 pub const fn pwrsav(&self) -> bool {
7208 let val = (self.0 >> 12usize) & 0x01;
7209 val != 0
7210 }
7211 #[doc = "Power saving configuration bit This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0) For power saving, the SDMMC_CK clock output can be disabled when the bus is idle by setting PWRSAV:"]
7212 pub fn set_pwrsav(&mut self, val: bool) {
7213 self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize);
7214 }
7215 #[doc = "Wide bus mode enable bit This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0)"]
7216 pub const fn widbus(&self) -> u8 {
7217 let val = (self.0 >> 14usize) & 0x03;
7394 val as u8 7218 val as u8
7395 } 7219 }
7396 #[doc = "Input capture 1 prescaler"] 7220 #[doc = "Wide bus mode enable bit This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0)"]
7397 pub fn set_icpsc(&mut self, n: usize, val: u8) { 7221 pub fn set_widbus(&mut self, val: u8) {
7398 assert!(n < 2usize); 7222 self.0 = (self.0 & !(0x03 << 14usize)) | (((val as u32) & 0x03) << 14usize);
7399 let offs = 2usize + n * 8usize;
7400 self.0 = (self.0 & !(0x03 << offs)) | (((val as u32) & 0x03) << offs);
7401 } 7223 }
7402 #[doc = "Input capture 1 filter"] 7224 #[doc = "SDMMC_CK dephasing selection bit for data and Command. This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0). When clock division = 1 (CLKDIV = 0), this bit has no effect. Data and Command change on SDMMC_CK falling edge. When clock division &gt;1 (CLKDIV &gt; 0) &amp; DDR = 0: - SDMMC_CK edge occurs on SDMMCCLK rising edge. When clock division >1 (CLKDIV > 0) & DDR = 1: - Data changed on the SDMMCCLK falling edge succeeding a SDMMC_CK edge. - SDMMC_CK edge occurs on SDMMCCLK rising edge. - Data changed on the SDMMC_CK falling edge succeeding a SDMMC_CK edge. - SDMMC_CK edge occurs on SDMMCCLK rising edge."]
7403 pub fn icf(&self, n: usize) -> super::vals::Icf { 7225 pub const fn negedge(&self) -> bool {
7404 assert!(n < 2usize); 7226 let val = (self.0 >> 16usize) & 0x01;
7405 let offs = 4usize + n * 8usize; 7227 val != 0
7406 let val = (self.0 >> offs) & 0x0f;
7407 super::vals::Icf(val as u8)
7408 } 7228 }
7409 #[doc = "Input capture 1 filter"] 7229 #[doc = "SDMMC_CK dephasing selection bit for data and Command. This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0). When clock division = 1 (CLKDIV = 0), this bit has no effect. Data and Command change on SDMMC_CK falling edge. When clock division &gt;1 (CLKDIV &gt; 0) &amp; DDR = 0: - SDMMC_CK edge occurs on SDMMCCLK rising edge. When clock division >1 (CLKDIV > 0) & DDR = 1: - Data changed on the SDMMCCLK falling edge succeeding a SDMMC_CK edge. - SDMMC_CK edge occurs on SDMMCCLK rising edge. - Data changed on the SDMMC_CK falling edge succeeding a SDMMC_CK edge. - SDMMC_CK edge occurs on SDMMCCLK rising edge."]
7410 pub fn set_icf(&mut self, n: usize, val: super::vals::Icf) { 7230 pub fn set_negedge(&mut self, val: bool) {
7411 assert!(n < 2usize); 7231 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
7412 let offs = 4usize + n * 8usize; 7232 }
7413 self.0 = (self.0 & !(0x0f << offs)) | (((val.0 as u32) & 0x0f) << offs); 7233 #[doc = "Hardware flow control enable This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0) When Hardware flow control is enabled, the meaning of the TXFIFOE and RXFIFOF flags change, please see SDMMC status register definition in Section56.8.11."]
7234 pub const fn hwfc_en(&self) -> bool {
7235 let val = (self.0 >> 17usize) & 0x01;
7236 val != 0
7237 }
7238 #[doc = "Hardware flow control enable This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0) When Hardware flow control is enabled, the meaning of the TXFIFOE and RXFIFOF flags change, please see SDMMC status register definition in Section56.8.11."]
7239 pub fn set_hwfc_en(&mut self, val: bool) {
7240 self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize);
7241 }
7242 #[doc = "Data rate signaling selection This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0) DDR rate shall only be selected with 4-bit or 8-bit wide bus mode. (WIDBUS &gt; 00). DDR = 1 has no effect when WIDBUS = 00 (1-bit wide bus). DDR rate shall only be selected with clock division &gt;1. (CLKDIV &gt; 0)"]
7243 pub const fn ddr(&self) -> bool {
7244 let val = (self.0 >> 18usize) & 0x01;
7245 val != 0
7246 }
7247 #[doc = "Data rate signaling selection This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0) DDR rate shall only be selected with 4-bit or 8-bit wide bus mode. (WIDBUS &gt; 00). DDR = 1 has no effect when WIDBUS = 00 (1-bit wide bus). DDR rate shall only be selected with clock division &gt;1. (CLKDIV &gt; 0)"]
7248 pub fn set_ddr(&mut self, val: bool) {
7249 self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize);
7250 }
7251 #[doc = "Bus speed mode selection between DS, HS, SDR12, SDR25 and SDR50, DDR50, SDR104. This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0)"]
7252 pub const fn busspeed(&self) -> bool {
7253 let val = (self.0 >> 19usize) & 0x01;
7254 val != 0
7255 }
7256 #[doc = "Bus speed mode selection between DS, HS, SDR12, SDR25 and SDR50, DDR50, SDR104. This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0)"]
7257 pub fn set_busspeed(&mut self, val: bool) {
7258 self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize);
7259 }
7260 #[doc = "Receive clock selection. These bits can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0)"]
7261 pub const fn selclkrx(&self) -> u8 {
7262 let val = (self.0 >> 20usize) & 0x03;
7263 val as u8
7264 }
7265 #[doc = "Receive clock selection. These bits can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0)"]
7266 pub fn set_selclkrx(&mut self, val: u8) {
7267 self.0 = (self.0 & !(0x03 << 20usize)) | (((val as u32) & 0x03) << 20usize);
7414 } 7268 }
7415 } 7269 }
7416 impl Default for CcmrInput { 7270 impl Default for Clkcr {
7417 fn default() -> CcmrInput { 7271 fn default() -> Clkcr {
7418 CcmrInput(0) 7272 Clkcr(0)
7419 } 7273 }
7420 } 7274 }
7421 #[doc = "capture/compare mode register 2 (output mode)"] 7275 #[doc = "SDMMC power control register"]
7422 #[repr(transparent)] 7276 #[repr(transparent)]
7423 #[derive(Copy, Clone, Eq, PartialEq)] 7277 #[derive(Copy, Clone, Eq, PartialEq)]
7424 pub struct CcmrOutput(pub u32); 7278 pub struct Power(pub u32);
7425 impl CcmrOutput { 7279 impl Power {
7426 #[doc = "Capture/Compare 3 selection"] 7280 #[doc = "SDMMC state control bits. These bits can only be written when the SDMMC is not in the power-on state (PWRCTRL?11). These bits are used to define the functional state of the SDMMC signals: Any further write will be ignored, PWRCTRL value will keep 11."]
7427 pub fn ccs(&self, n: usize) -> super::vals::CcmrOutputCcs { 7281 pub const fn pwrctrl(&self) -> u8 {
7428 assert!(n < 2usize); 7282 let val = (self.0 >> 0usize) & 0x03;
7429 let offs = 0usize + n * 8usize; 7283 val as u8
7430 let val = (self.0 >> offs) & 0x03;
7431 super::vals::CcmrOutputCcs(val as u8)
7432 } 7284 }
7433 #[doc = "Capture/Compare 3 selection"] 7285 #[doc = "SDMMC state control bits. These bits can only be written when the SDMMC is not in the power-on state (PWRCTRL?11). These bits are used to define the functional state of the SDMMC signals: Any further write will be ignored, PWRCTRL value will keep 11."]
7434 pub fn set_ccs(&mut self, n: usize, val: super::vals::CcmrOutputCcs) { 7286 pub fn set_pwrctrl(&mut self, val: u8) {
7435 assert!(n < 2usize); 7287 self.0 = (self.0 & !(0x03 << 0usize)) | (((val as u32) & 0x03) << 0usize);
7436 let offs = 0usize + n * 8usize;
7437 self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs);
7438 } 7288 }
7439 #[doc = "Output compare 3 fast enable"] 7289 #[doc = "Voltage switch sequence start. This bit is used to start the timing critical section of the voltage switch sequence:"]
7440 pub fn ocfe(&self, n: usize) -> bool { 7290 pub const fn vswitch(&self) -> bool {
7441 assert!(n < 2usize); 7291 let val = (self.0 >> 2usize) & 0x01;
7442 let offs = 2usize + n * 8usize;
7443 let val = (self.0 >> offs) & 0x01;
7444 val != 0 7292 val != 0
7445 } 7293 }
7446 #[doc = "Output compare 3 fast enable"] 7294 #[doc = "Voltage switch sequence start. This bit is used to start the timing critical section of the voltage switch sequence:"]
7447 pub fn set_ocfe(&mut self, n: usize, val: bool) { 7295 pub fn set_vswitch(&mut self, val: bool) {
7448 assert!(n < 2usize); 7296 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
7449 let offs = 2usize + n * 8usize;
7450 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
7451 } 7297 }
7452 #[doc = "Output compare 3 preload enable"] 7298 #[doc = "Voltage switch procedure enable. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). This bit is used to stop the SDMMC_CK after the voltage switch command response:"]
7453 pub fn ocpe(&self, n: usize) -> super::vals::Ocpe { 7299 pub const fn vswitchen(&self) -> bool {
7454 assert!(n < 2usize); 7300 let val = (self.0 >> 3usize) & 0x01;
7455 let offs = 3usize + n * 8usize; 7301 val != 0
7456 let val = (self.0 >> offs) & 0x01;
7457 super::vals::Ocpe(val as u8)
7458 } 7302 }
7459 #[doc = "Output compare 3 preload enable"] 7303 #[doc = "Voltage switch procedure enable. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). This bit is used to stop the SDMMC_CK after the voltage switch command response:"]
7460 pub fn set_ocpe(&mut self, n: usize, val: super::vals::Ocpe) { 7304 pub fn set_vswitchen(&mut self, val: bool) {
7461 assert!(n < 2usize); 7305 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
7462 let offs = 3usize + n * 8usize;
7463 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs);
7464 } 7306 }
7465 #[doc = "Output compare 3 mode"] 7307 #[doc = "Data and command direction signals polarity selection. This bit can only be written when the SDMMC is in the power-off state (PWRCTRL = 00)."]
7466 pub fn ocm(&self, n: usize) -> super::vals::Ocm { 7308 pub const fn dirpol(&self) -> bool {
7467 assert!(n < 2usize); 7309 let val = (self.0 >> 4usize) & 0x01;
7468 let offs = 4usize + n * 8usize; 7310 val != 0
7469 let val = (self.0 >> offs) & 0x07;
7470 super::vals::Ocm(val as u8)
7471 } 7311 }
7472 #[doc = "Output compare 3 mode"] 7312 #[doc = "Data and command direction signals polarity selection. This bit can only be written when the SDMMC is in the power-off state (PWRCTRL = 00)."]
7473 pub fn set_ocm(&mut self, n: usize, val: super::vals::Ocm) { 7313 pub fn set_dirpol(&mut self, val: bool) {
7474 assert!(n < 2usize); 7314 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
7475 let offs = 4usize + n * 8usize;
7476 self.0 = (self.0 & !(0x07 << offs)) | (((val.0 as u32) & 0x07) << offs);
7477 } 7315 }
7478 #[doc = "Output compare 3 clear enable"] 7316 }
7479 pub fn occe(&self, n: usize) -> bool { 7317 impl Default for Power {
7480 assert!(n < 2usize); 7318 fn default() -> Power {
7481 let offs = 7usize + n * 8usize; 7319 Power(0)
7482 let val = (self.0 >> offs) & 0x01;
7483 val != 0
7484 } 7320 }
7485 #[doc = "Output compare 3 clear enable"] 7321 }
7486 pub fn set_occe(&mut self, n: usize, val: bool) { 7322 #[doc = "The SDMMC_DCNTR register loads the value from the data length register (see SDMMC_DLENR) when the DPSM moves from the Idle state to the Wait_R or Wait_S state. As data is transferred, the counter decrements the value until it reaches 0. The DPSM then moves to the Idle state and when there has been no error, the data status end flag (DATAEND) is set."]
7487 assert!(n < 2usize); 7323 #[repr(transparent)]
7488 let offs = 7usize + n * 8usize; 7324 #[derive(Copy, Clone, Eq, PartialEq)]
7489 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); 7325 pub struct Dcntr(pub u32);
7326 impl Dcntr {
7327 #[doc = "Data count value When read, the number of remaining data bytes to be transferred is returned. Write has no effect."]
7328 pub const fn datacount(&self) -> u32 {
7329 let val = (self.0 >> 0usize) & 0x01ff_ffff;
7330 val as u32
7331 }
7332 #[doc = "Data count value When read, the number of remaining data bytes to be transferred is returned. Write has no effect."]
7333 pub fn set_datacount(&mut self, val: u32) {
7334 self.0 =
7335 (self.0 & !(0x01ff_ffff << 0usize)) | (((val as u32) & 0x01ff_ffff) << 0usize);
7490 } 7336 }
7491 } 7337 }
7492 impl Default for CcmrOutput { 7338 impl Default for Dcntr {
7493 fn default() -> CcmrOutput { 7339 fn default() -> Dcntr {
7494 CcmrOutput(0) 7340 Dcntr(0)
7495 } 7341 }
7496 } 7342 }
7497 #[doc = "event generation register"] 7343 #[doc = "SDMMC IP identification register"]
7498 #[repr(transparent)] 7344 #[repr(transparent)]
7499 #[derive(Copy, Clone, Eq, PartialEq)] 7345 #[derive(Copy, Clone, Eq, PartialEq)]
7500 pub struct EgrGp(pub u32); 7346 pub struct Id(pub u32);
7501 impl EgrGp { 7347 impl Id {
7502 #[doc = "Update generation"] 7348 #[doc = "SDMMC IP identification."]
7503 pub const fn ug(&self) -> bool { 7349 pub const fn ip_id(&self) -> u32 {
7504 let val = (self.0 >> 0usize) & 0x01; 7350 let val = (self.0 >> 0usize) & 0xffff_ffff;
7505 val != 0 7351 val as u32
7506 } 7352 }
7507 #[doc = "Update generation"] 7353 #[doc = "SDMMC IP identification."]
7508 pub fn set_ug(&mut self, val: bool) { 7354 pub fn set_ip_id(&mut self, val: u32) {
7509 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 7355 self.0 =
7356 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
7510 } 7357 }
7511 #[doc = "Capture/compare 1 generation"] 7358 }
7512 pub fn ccg(&self, n: usize) -> bool { 7359 impl Default for Id {
7513 assert!(n < 4usize); 7360 fn default() -> Id {
7514 let offs = 1usize + n * 1usize; 7361 Id(0)
7515 let val = (self.0 >> offs) & 0x01;
7516 val != 0
7517 } 7362 }
7518 #[doc = "Capture/compare 1 generation"] 7363 }
7519 pub fn set_ccg(&mut self, n: usize, val: bool) { 7364 #[doc = "The SDMMC_IDMABASE1R register contains the double buffer configuration second buffer memory base address."]
7520 assert!(n < 4usize); 7365 #[repr(transparent)]
7521 let offs = 1usize + n * 1usize; 7366 #[derive(Copy, Clone, Eq, PartialEq)]
7522 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); 7367 pub struct Idmabase1r(pub u32);
7368 impl Idmabase1r {
7369 #[doc = "Buffer 1 memory base address, shall be word aligned (bit [1:0]
7370are always 0 and read only). This register can be written by firmware when DPSM is inactive (DPSMACT = 0), and can dynamically be written by firmware when DPSM active (DPSMACT = 1) and memory buffer 1 is inactive (IDMABACT = 0)."]
7371 pub const fn idmabase1(&self) -> u32 {
7372 let val = (self.0 >> 0usize) & 0xffff_ffff;
7373 val as u32
7523 } 7374 }
7524 #[doc = "Capture/Compare control update generation"] 7375 #[doc = "Buffer 1 memory base address, shall be word aligned (bit [1:0]
7525 pub const fn comg(&self) -> bool { 7376are always 0 and read only). This register can be written by firmware when DPSM is inactive (DPSMACT = 0), and can dynamically be written by firmware when DPSM active (DPSMACT = 1) and memory buffer 1 is inactive (IDMABACT = 0)."]
7526 let val = (self.0 >> 5usize) & 0x01; 7377 pub fn set_idmabase1(&mut self, val: u32) {
7527 val != 0 7378 self.0 =
7379 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
7528 } 7380 }
7529 #[doc = "Capture/Compare control update generation"] 7381 }
7530 pub fn set_comg(&mut self, val: bool) { 7382 impl Default for Idmabase1r {
7531 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); 7383 fn default() -> Idmabase1r {
7384 Idmabase1r(0)
7532 } 7385 }
7533 #[doc = "Trigger generation"] 7386 }
7534 pub const fn tg(&self) -> bool { 7387 #[doc = "SDMMC IP version register"]
7535 let val = (self.0 >> 6usize) & 0x01; 7388 #[repr(transparent)]
7536 val != 0 7389 #[derive(Copy, Clone, Eq, PartialEq)]
7390 pub struct Ver(pub u32);
7391 impl Ver {
7392 #[doc = "IP minor revision number."]
7393 pub const fn minrev(&self) -> u8 {
7394 let val = (self.0 >> 0usize) & 0x0f;
7395 val as u8
7537 } 7396 }
7538 #[doc = "Trigger generation"] 7397 #[doc = "IP minor revision number."]
7539 pub fn set_tg(&mut self, val: bool) { 7398 pub fn set_minrev(&mut self, val: u8) {
7540 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); 7399 self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize);
7541 } 7400 }
7542 #[doc = "Break generation"] 7401 #[doc = "IP major revision number."]
7543 pub const fn bg(&self) -> bool { 7402 pub const fn majrev(&self) -> u8 {
7544 let val = (self.0 >> 7usize) & 0x01; 7403 let val = (self.0 >> 4usize) & 0x0f;
7545 val != 0 7404 val as u8
7546 } 7405 }
7547 #[doc = "Break generation"] 7406 #[doc = "IP major revision number."]
7548 pub fn set_bg(&mut self, val: bool) { 7407 pub fn set_majrev(&mut self, val: u8) {
7549 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); 7408 self.0 = (self.0 & !(0x0f << 4usize)) | (((val as u32) & 0x0f) << 4usize);
7550 } 7409 }
7551 } 7410 }
7552 impl Default for EgrGp { 7411 impl Default for Ver {
7553 fn default() -> EgrGp { 7412 fn default() -> Ver {
7554 EgrGp(0) 7413 Ver(0)
7555 } 7414 }
7556 } 7415 }
7557 #[doc = "counter"] 7416 #[doc = "The SDMMC_RESP1/2/3/4R registers contain the status of a card, which is part of the received response."]
7558 #[repr(transparent)] 7417 #[repr(transparent)]
7559 #[derive(Copy, Clone, Eq, PartialEq)] 7418 #[derive(Copy, Clone, Eq, PartialEq)]
7560 pub struct Cnt16(pub u32); 7419 pub struct Resp1r(pub u32);
7561 impl Cnt16 { 7420 impl Resp1r {
7562 #[doc = "counter value"] 7421 #[doc = "see Table 432"]
7563 pub const fn cnt(&self) -> u16 { 7422 pub const fn cardstatus1(&self) -> u32 {
7564 let val = (self.0 >> 0usize) & 0xffff; 7423 let val = (self.0 >> 0usize) & 0xffff_ffff;
7565 val as u16 7424 val as u32
7566 } 7425 }
7567 #[doc = "counter value"] 7426 #[doc = "see Table 432"]
7568 pub fn set_cnt(&mut self, val: u16) { 7427 pub fn set_cardstatus1(&mut self, val: u32) {
7569 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); 7428 self.0 =
7429 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
7570 } 7430 }
7571 } 7431 }
7572 impl Default for Cnt16 { 7432 impl Default for Resp1r {
7573 fn default() -> Cnt16 { 7433 fn default() -> Resp1r {
7574 Cnt16(0) 7434 Resp1r(0)
7575 } 7435 }
7576 } 7436 }
7577 #[doc = "control register 2"] 7437 #[doc = "The interrupt mask register determines which status flags generate an interrupt request by setting the corresponding bit to 1."]
7578 #[repr(transparent)] 7438 #[repr(transparent)]
7579 #[derive(Copy, Clone, Eq, PartialEq)] 7439 #[derive(Copy, Clone, Eq, PartialEq)]
7580 pub struct Cr2Adv(pub u32); 7440 pub struct Maskr(pub u32);
7581 impl Cr2Adv { 7441 impl Maskr {
7582 #[doc = "Capture/compare preloaded control"] 7442 #[doc = "Command CRC fail interrupt enable Set and cleared by software to enable/disable interrupt caused by command CRC failure."]
7583 pub const fn ccpc(&self) -> bool { 7443 pub const fn ccrcfailie(&self) -> bool {
7584 let val = (self.0 >> 0usize) & 0x01; 7444 let val = (self.0 >> 0usize) & 0x01;
7585 val != 0 7445 val != 0
7586 } 7446 }
7587 #[doc = "Capture/compare preloaded control"] 7447 #[doc = "Command CRC fail interrupt enable Set and cleared by software to enable/disable interrupt caused by command CRC failure."]
7588 pub fn set_ccpc(&mut self, val: bool) { 7448 pub fn set_ccrcfailie(&mut self, val: bool) {
7589 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 7449 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
7590 } 7450 }
7591 #[doc = "Capture/compare control update selection"] 7451 #[doc = "Data CRC fail interrupt enable Set and cleared by software to enable/disable interrupt caused by data CRC failure."]
7592 pub const fn ccus(&self) -> bool { 7452 pub const fn dcrcfailie(&self) -> bool {
7453 let val = (self.0 >> 1usize) & 0x01;
7454 val != 0
7455 }
7456 #[doc = "Data CRC fail interrupt enable Set and cleared by software to enable/disable interrupt caused by data CRC failure."]
7457 pub fn set_dcrcfailie(&mut self, val: bool) {
7458 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
7459 }
7460 #[doc = "Command timeout interrupt enable Set and cleared by software to enable/disable interrupt caused by command timeout."]
7461 pub const fn ctimeoutie(&self) -> bool {
7593 let val = (self.0 >> 2usize) & 0x01; 7462 let val = (self.0 >> 2usize) & 0x01;
7594 val != 0 7463 val != 0
7595 } 7464 }
7596 #[doc = "Capture/compare control update selection"] 7465 #[doc = "Command timeout interrupt enable Set and cleared by software to enable/disable interrupt caused by command timeout."]
7597 pub fn set_ccus(&mut self, val: bool) { 7466 pub fn set_ctimeoutie(&mut self, val: bool) {
7598 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); 7467 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
7599 } 7468 }
7600 #[doc = "Capture/compare DMA selection"] 7469 #[doc = "Data timeout interrupt enable Set and cleared by software to enable/disable interrupt caused by data timeout."]
7601 pub const fn ccds(&self) -> super::vals::Ccds { 7470 pub const fn dtimeoutie(&self) -> bool {
7602 let val = (self.0 >> 3usize) & 0x01; 7471 let val = (self.0 >> 3usize) & 0x01;
7603 super::vals::Ccds(val as u8) 7472 val != 0
7604 } 7473 }
7605 #[doc = "Capture/compare DMA selection"] 7474 #[doc = "Data timeout interrupt enable Set and cleared by software to enable/disable interrupt caused by data timeout."]
7606 pub fn set_ccds(&mut self, val: super::vals::Ccds) { 7475 pub fn set_dtimeoutie(&mut self, val: bool) {
7607 self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize); 7476 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
7608 } 7477 }
7609 #[doc = "Master mode selection"] 7478 #[doc = "Tx FIFO underrun error interrupt enable Set and cleared by software to enable/disable interrupt caused by Tx FIFO underrun error."]
7610 pub const fn mms(&self) -> super::vals::Mms { 7479 pub const fn txunderrie(&self) -> bool {
7611 let val = (self.0 >> 4usize) & 0x07; 7480 let val = (self.0 >> 4usize) & 0x01;
7612 super::vals::Mms(val as u8) 7481 val != 0
7613 } 7482 }
7614 #[doc = "Master mode selection"] 7483 #[doc = "Tx FIFO underrun error interrupt enable Set and cleared by software to enable/disable interrupt caused by Tx FIFO underrun error."]
7615 pub fn set_mms(&mut self, val: super::vals::Mms) { 7484 pub fn set_txunderrie(&mut self, val: bool) {
7616 self.0 = (self.0 & !(0x07 << 4usize)) | (((val.0 as u32) & 0x07) << 4usize); 7485 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
7617 } 7486 }
7618 #[doc = "TI1 selection"] 7487 #[doc = "Rx FIFO overrun error interrupt enable Set and cleared by software to enable/disable interrupt caused by Rx FIFO overrun error."]
7619 pub const fn ti1s(&self) -> super::vals::Tis { 7488 pub const fn rxoverrie(&self) -> bool {
7489 let val = (self.0 >> 5usize) & 0x01;
7490 val != 0
7491 }
7492 #[doc = "Rx FIFO overrun error interrupt enable Set and cleared by software to enable/disable interrupt caused by Rx FIFO overrun error."]
7493 pub fn set_rxoverrie(&mut self, val: bool) {
7494 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
7495 }
7496 #[doc = "Command response received interrupt enable Set and cleared by software to enable/disable interrupt caused by receiving command response."]
7497 pub const fn cmdrendie(&self) -> bool {
7498 let val = (self.0 >> 6usize) & 0x01;
7499 val != 0
7500 }
7501 #[doc = "Command response received interrupt enable Set and cleared by software to enable/disable interrupt caused by receiving command response."]
7502 pub fn set_cmdrendie(&mut self, val: bool) {
7503 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
7504 }
7505 #[doc = "Command sent interrupt enable Set and cleared by software to enable/disable interrupt caused by sending command."]
7506 pub const fn cmdsentie(&self) -> bool {
7620 let val = (self.0 >> 7usize) & 0x01; 7507 let val = (self.0 >> 7usize) & 0x01;
7621 super::vals::Tis(val as u8) 7508 val != 0
7622 } 7509 }
7623 #[doc = "TI1 selection"] 7510 #[doc = "Command sent interrupt enable Set and cleared by software to enable/disable interrupt caused by sending command."]
7624 pub fn set_ti1s(&mut self, val: super::vals::Tis) { 7511 pub fn set_cmdsentie(&mut self, val: bool) {
7625 self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize); 7512 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
7626 } 7513 }
7627 #[doc = "Output Idle state 1"] 7514 #[doc = "Data end interrupt enable Set and cleared by software to enable/disable interrupt caused by data end."]
7628 pub fn ois(&self, n: usize) -> bool { 7515 pub const fn dataendie(&self) -> bool {
7629 assert!(n < 4usize); 7516 let val = (self.0 >> 8usize) & 0x01;
7630 let offs = 8usize + n * 2usize;
7631 let val = (self.0 >> offs) & 0x01;
7632 val != 0 7517 val != 0
7633 } 7518 }
7634 #[doc = "Output Idle state 1"] 7519 #[doc = "Data end interrupt enable Set and cleared by software to enable/disable interrupt caused by data end."]
7635 pub fn set_ois(&mut self, n: usize, val: bool) { 7520 pub fn set_dataendie(&mut self, val: bool) {
7636 assert!(n < 4usize); 7521 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
7637 let offs = 8usize + n * 2usize;
7638 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
7639 } 7522 }
7640 #[doc = "Output Idle state 1"] 7523 #[doc = "Data hold interrupt enable Set and cleared by software to enable/disable the interrupt generated when sending new data is hold in the DPSM Wait_S state."]
7641 pub const fn ois1n(&self) -> bool { 7524 pub const fn dholdie(&self) -> bool {
7642 let val = (self.0 >> 9usize) & 0x01; 7525 let val = (self.0 >> 9usize) & 0x01;
7643 val != 0 7526 val != 0
7644 } 7527 }
7645 #[doc = "Output Idle state 1"] 7528 #[doc = "Data hold interrupt enable Set and cleared by software to enable/disable the interrupt generated when sending new data is hold in the DPSM Wait_S state."]
7646 pub fn set_ois1n(&mut self, val: bool) { 7529 pub fn set_dholdie(&mut self, val: bool) {
7647 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); 7530 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
7648 } 7531 }
7649 #[doc = "Output Idle state 2"] 7532 #[doc = "Data block end interrupt enable Set and cleared by software to enable/disable interrupt caused by data block end."]
7650 pub const fn ois2n(&self) -> bool { 7533 pub const fn dbckendie(&self) -> bool {
7651 let val = (self.0 >> 11usize) & 0x01; 7534 let val = (self.0 >> 10usize) & 0x01;
7652 val != 0 7535 val != 0
7653 } 7536 }
7654 #[doc = "Output Idle state 2"] 7537 #[doc = "Data block end interrupt enable Set and cleared by software to enable/disable interrupt caused by data block end."]
7655 pub fn set_ois2n(&mut self, val: bool) { 7538 pub fn set_dbckendie(&mut self, val: bool) {
7656 self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); 7539 self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize);
7657 } 7540 }
7658 #[doc = "Output Idle state 3"] 7541 #[doc = "Data transfer aborted interrupt enable Set and cleared by software to enable/disable interrupt caused by a data transfer being aborted."]
7659 pub const fn ois3n(&self) -> bool { 7542 pub const fn dabortie(&self) -> bool {
7660 let val = (self.0 >> 13usize) & 0x01; 7543 let val = (self.0 >> 11usize) & 0x01;
7661 val != 0 7544 val != 0
7662 } 7545 }
7663 #[doc = "Output Idle state 3"] 7546 #[doc = "Data transfer aborted interrupt enable Set and cleared by software to enable/disable interrupt caused by a data transfer being aborted."]
7664 pub fn set_ois3n(&mut self, val: bool) { 7547 pub fn set_dabortie(&mut self, val: bool) {
7665 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); 7548 self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize);
7666 } 7549 }
7667 } 7550 #[doc = "Tx FIFO half empty interrupt enable Set and cleared by software to enable/disable interrupt caused by Tx FIFO half empty."]
7668 impl Default for Cr2Adv { 7551 pub const fn txfifoheie(&self) -> bool {
7669 fn default() -> Cr2Adv { 7552 let val = (self.0 >> 14usize) & 0x01;
7670 Cr2Adv(0) 7553 val != 0
7671 } 7554 }
7672 } 7555 #[doc = "Tx FIFO half empty interrupt enable Set and cleared by software to enable/disable interrupt caused by Tx FIFO half empty."]
7673 #[doc = "auto-reload register"] 7556 pub fn set_txfifoheie(&mut self, val: bool) {
7674 #[repr(transparent)] 7557 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize);
7675 #[derive(Copy, Clone, Eq, PartialEq)]
7676 pub struct Arr32(pub u32);
7677 impl Arr32 {
7678 #[doc = "Auto-reload value"]
7679 pub const fn arr(&self) -> u32 {
7680 let val = (self.0 >> 0usize) & 0xffff_ffff;
7681 val as u32
7682 } 7558 }
7683 #[doc = "Auto-reload value"] 7559 #[doc = "Rx FIFO half full interrupt enable Set and cleared by software to enable/disable interrupt caused by Rx FIFO half full."]
7684 pub fn set_arr(&mut self, val: u32) { 7560 pub const fn rxfifohfie(&self) -> bool {
7685 self.0 = 7561 let val = (self.0 >> 15usize) & 0x01;
7686 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize); 7562 val != 0
7687 } 7563 }
7688 } 7564 #[doc = "Rx FIFO half full interrupt enable Set and cleared by software to enable/disable interrupt caused by Rx FIFO half full."]
7689 impl Default for Arr32 { 7565 pub fn set_rxfifohfie(&mut self, val: bool) {
7690 fn default() -> Arr32 { 7566 self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize);
7691 Arr32(0)
7692 } 7567 }
7693 } 7568 #[doc = "Rx FIFO full interrupt enable Set and cleared by software to enable/disable interrupt caused by Rx FIFO full."]
7694 #[doc = "DMA/Interrupt enable register"] 7569 pub const fn rxfifofie(&self) -> bool {
7695 #[repr(transparent)] 7570 let val = (self.0 >> 17usize) & 0x01;
7696 #[derive(Copy, Clone, Eq, PartialEq)]
7697 pub struct DierGp(pub u32);
7698 impl DierGp {
7699 #[doc = "Update interrupt enable"]
7700 pub const fn uie(&self) -> bool {
7701 let val = (self.0 >> 0usize) & 0x01;
7702 val != 0 7571 val != 0
7703 } 7572 }
7704 #[doc = "Update interrupt enable"] 7573 #[doc = "Rx FIFO full interrupt enable Set and cleared by software to enable/disable interrupt caused by Rx FIFO full."]
7705 pub fn set_uie(&mut self, val: bool) { 7574 pub fn set_rxfifofie(&mut self, val: bool) {
7706 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 7575 self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize);
7707 } 7576 }
7708 #[doc = "Capture/Compare 1 interrupt enable"] 7577 #[doc = "Tx FIFO empty interrupt enable Set and cleared by software to enable/disable interrupt caused by Tx FIFO empty."]
7709 pub fn ccie(&self, n: usize) -> bool { 7578 pub const fn txfifoeie(&self) -> bool {
7710 assert!(n < 4usize); 7579 let val = (self.0 >> 18usize) & 0x01;
7711 let offs = 1usize + n * 1usize;
7712 let val = (self.0 >> offs) & 0x01;
7713 val != 0 7580 val != 0
7714 } 7581 }
7715 #[doc = "Capture/Compare 1 interrupt enable"] 7582 #[doc = "Tx FIFO empty interrupt enable Set and cleared by software to enable/disable interrupt caused by Tx FIFO empty."]
7716 pub fn set_ccie(&mut self, n: usize, val: bool) { 7583 pub fn set_txfifoeie(&mut self, val: bool) {
7717 assert!(n < 4usize); 7584 self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize);
7718 let offs = 1usize + n * 1usize;
7719 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
7720 } 7585 }
7721 #[doc = "Trigger interrupt enable"] 7586 #[doc = "BUSYD0END interrupt enable Set and cleared by software to enable/disable the interrupt generated when SDMMC_D0 signal changes from busy to NOT busy following a CMD response."]
7722 pub const fn tie(&self) -> bool { 7587 pub const fn busyd0endie(&self) -> bool {
7723 let val = (self.0 >> 6usize) & 0x01; 7588 let val = (self.0 >> 21usize) & 0x01;
7724 val != 0 7589 val != 0
7725 } 7590 }
7726 #[doc = "Trigger interrupt enable"] 7591 #[doc = "BUSYD0END interrupt enable Set and cleared by software to enable/disable the interrupt generated when SDMMC_D0 signal changes from busy to NOT busy following a CMD response."]
7727 pub fn set_tie(&mut self, val: bool) { 7592 pub fn set_busyd0endie(&mut self, val: bool) {
7728 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); 7593 self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize);
7729 } 7594 }
7730 #[doc = "Update DMA request enable"] 7595 #[doc = "SDIO mode interrupt received interrupt enable Set and cleared by software to enable/disable the interrupt generated when receiving the SDIO mode interrupt."]
7731 pub const fn ude(&self) -> bool { 7596 pub const fn sdioitie(&self) -> bool {
7732 let val = (self.0 >> 8usize) & 0x01; 7597 let val = (self.0 >> 22usize) & 0x01;
7733 val != 0 7598 val != 0
7734 } 7599 }
7735 #[doc = "Update DMA request enable"] 7600 #[doc = "SDIO mode interrupt received interrupt enable Set and cleared by software to enable/disable the interrupt generated when receiving the SDIO mode interrupt."]
7736 pub fn set_ude(&mut self, val: bool) { 7601 pub fn set_sdioitie(&mut self, val: bool) {
7737 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); 7602 self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize);
7738 } 7603 }
7739 #[doc = "Capture/Compare 1 DMA request enable"] 7604 #[doc = "Acknowledgment Fail interrupt enable Set and cleared by software to enable/disable interrupt caused by acknowledgment Fail."]
7740 pub fn ccde(&self, n: usize) -> bool { 7605 pub const fn ackfailie(&self) -> bool {
7741 assert!(n < 4usize); 7606 let val = (self.0 >> 23usize) & 0x01;
7742 let offs = 9usize + n * 1usize;
7743 let val = (self.0 >> offs) & 0x01;
7744 val != 0 7607 val != 0
7745 } 7608 }
7746 #[doc = "Capture/Compare 1 DMA request enable"] 7609 #[doc = "Acknowledgment Fail interrupt enable Set and cleared by software to enable/disable interrupt caused by acknowledgment Fail."]
7747 pub fn set_ccde(&mut self, n: usize, val: bool) { 7610 pub fn set_ackfailie(&mut self, val: bool) {
7748 assert!(n < 4usize); 7611 self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize);
7749 let offs = 9usize + n * 1usize;
7750 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
7751 } 7612 }
7752 #[doc = "Trigger DMA request enable"] 7613 #[doc = "Acknowledgment timeout interrupt enable Set and cleared by software to enable/disable interrupt caused by acknowledgment timeout."]
7753 pub const fn tde(&self) -> bool { 7614 pub const fn acktimeoutie(&self) -> bool {
7754 let val = (self.0 >> 14usize) & 0x01; 7615 let val = (self.0 >> 24usize) & 0x01;
7755 val != 0 7616 val != 0
7756 } 7617 }
7757 #[doc = "Trigger DMA request enable"] 7618 #[doc = "Acknowledgment timeout interrupt enable Set and cleared by software to enable/disable interrupt caused by acknowledgment timeout."]
7758 pub fn set_tde(&mut self, val: bool) { 7619 pub fn set_acktimeoutie(&mut self, val: bool) {
7759 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); 7620 self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize);
7760 }
7761 }
7762 impl Default for DierGp {
7763 fn default() -> DierGp {
7764 DierGp(0)
7765 } 7621 }
7766 } 7622 #[doc = "Voltage switch critical timing section completion interrupt enable Set and cleared by software to enable/disable the interrupt generated when voltage switch critical timing section completion."]
7767 #[doc = "control register 2"] 7623 pub const fn vswendie(&self) -> bool {
7768 #[repr(transparent)] 7624 let val = (self.0 >> 25usize) & 0x01;
7769 #[derive(Copy, Clone, Eq, PartialEq)] 7625 val != 0
7770 pub struct Cr2Gp(pub u32);
7771 impl Cr2Gp {
7772 #[doc = "Capture/compare DMA selection"]
7773 pub const fn ccds(&self) -> super::vals::Ccds {
7774 let val = (self.0 >> 3usize) & 0x01;
7775 super::vals::Ccds(val as u8)
7776 } 7626 }
7777 #[doc = "Capture/compare DMA selection"] 7627 #[doc = "Voltage switch critical timing section completion interrupt enable Set and cleared by software to enable/disable the interrupt generated when voltage switch critical timing section completion."]
7778 pub fn set_ccds(&mut self, val: super::vals::Ccds) { 7628 pub fn set_vswendie(&mut self, val: bool) {
7779 self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize); 7629 self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize);
7780 } 7630 }
7781 #[doc = "Master mode selection"] 7631 #[doc = "Voltage Switch clock stopped interrupt enable Set and cleared by software to enable/disable interrupt caused by Voltage Switch clock stopped."]
7782 pub const fn mms(&self) -> super::vals::Mms { 7632 pub const fn ckstopie(&self) -> bool {
7783 let val = (self.0 >> 4usize) & 0x07; 7633 let val = (self.0 >> 26usize) & 0x01;
7784 super::vals::Mms(val as u8) 7634 val != 0
7785 } 7635 }
7786 #[doc = "Master mode selection"] 7636 #[doc = "Voltage Switch clock stopped interrupt enable Set and cleared by software to enable/disable interrupt caused by Voltage Switch clock stopped."]
7787 pub fn set_mms(&mut self, val: super::vals::Mms) { 7637 pub fn set_ckstopie(&mut self, val: bool) {
7788 self.0 = (self.0 & !(0x07 << 4usize)) | (((val.0 as u32) & 0x07) << 4usize); 7638 self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize);
7789 } 7639 }
7790 #[doc = "TI1 selection"] 7640 #[doc = "IDMA buffer transfer complete interrupt enable Set and cleared by software to enable/disable the interrupt generated when the IDMA has transferred all data belonging to a memory buffer."]
7791 pub const fn ti1s(&self) -> super::vals::Tis { 7641 pub const fn idmabtcie(&self) -> bool {
7792 let val = (self.0 >> 7usize) & 0x01; 7642 let val = (self.0 >> 28usize) & 0x01;
7793 super::vals::Tis(val as u8) 7643 val != 0
7794 } 7644 }
7795 #[doc = "TI1 selection"] 7645 #[doc = "IDMA buffer transfer complete interrupt enable Set and cleared by software to enable/disable the interrupt generated when the IDMA has transferred all data belonging to a memory buffer."]
7796 pub fn set_ti1s(&mut self, val: super::vals::Tis) { 7646 pub fn set_idmabtcie(&mut self, val: bool) {
7797 self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize); 7647 self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize);
7798 } 7648 }
7799 } 7649 }
7800 impl Default for Cr2Gp { 7650 impl Default for Maskr {
7801 fn default() -> Cr2Gp { 7651 fn default() -> Maskr {
7802 Cr2Gp(0) 7652 Maskr(0)
7803 } 7653 }
7804 } 7654 }
7805 #[doc = "capture/compare register 1"] 7655 #[doc = "The SDMMC_ARGR register contains a 32-bit command argument, which is sent to a card as part of a command message."]
7806 #[repr(transparent)] 7656 #[repr(transparent)]
7807 #[derive(Copy, Clone, Eq, PartialEq)] 7657 #[derive(Copy, Clone, Eq, PartialEq)]
7808 pub struct Ccr16(pub u32); 7658 pub struct Argr(pub u32);
7809 impl Ccr16 { 7659 impl Argr {
7810 #[doc = "Capture/Compare 1 value"] 7660 #[doc = "Command argument. These bits can only be written by firmware when CPSM is disabled (CPSMEN = 0). Command argument sent to a card as part of a command message. If a command contains an argument, it must be loaded into this register before writing a command to the command register."]
7811 pub const fn ccr(&self) -> u16 { 7661 pub const fn cmdarg(&self) -> u32 {
7812 let val = (self.0 >> 0usize) & 0xffff; 7662 let val = (self.0 >> 0usize) & 0xffff_ffff;
7813 val as u16 7663 val as u32
7814 } 7664 }
7815 #[doc = "Capture/Compare 1 value"] 7665 #[doc = "Command argument. These bits can only be written by firmware when CPSM is disabled (CPSMEN = 0). Command argument sent to a card as part of a command message. If a command contains an argument, it must be loaded into this register before writing a command to the command register."]
7816 pub fn set_ccr(&mut self, val: u16) { 7666 pub fn set_cmdarg(&mut self, val: u32) {
7817 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); 7667 self.0 =
7668 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
7818 } 7669 }
7819 } 7670 }
7820 impl Default for Ccr16 { 7671 impl Default for Argr {
7821 fn default() -> Ccr16 { 7672 fn default() -> Argr {
7822 Ccr16(0) 7673 Argr(0)
7823 } 7674 }
7824 } 7675 }
7825 #[doc = "capture/compare enable register"] 7676 #[doc = "The SDMMC_DLENR register contains the number of data bytes to be transferred. The value is loaded into the data counter when data transfer starts."]
7826 #[repr(transparent)] 7677 #[repr(transparent)]
7827 #[derive(Copy, Clone, Eq, PartialEq)] 7678 #[derive(Copy, Clone, Eq, PartialEq)]
7828 pub struct CcerAdv(pub u32); 7679 pub struct Dlenr(pub u32);
7829 impl CcerAdv { 7680 impl Dlenr {
7830 #[doc = "Capture/Compare 1 output enable"] 7681 #[doc = "Data length value This register can only be written by firmware when DPSM is inactive (DPSMACT = 0). Number of data bytes to be transferred. When DDR = 1 DATALENGTH is truncated to a multiple of 2. (The last odd byte is not transfered) When DATALENGTH = 0 no data will be transfered, when requested by a CPSMEN and CMDTRANS = 1 also no command will be transfered. DTEN and CPSMEN are cleared to 0."]
7831 pub fn cce(&self, n: usize) -> bool { 7682 pub const fn datalength(&self) -> u32 {
7832 assert!(n < 4usize); 7683 let val = (self.0 >> 0usize) & 0x01ff_ffff;
7833 let offs = 0usize + n * 4usize; 7684 val as u32
7834 let val = (self.0 >> offs) & 0x01;
7835 val != 0
7836 } 7685 }
7837 #[doc = "Capture/Compare 1 output enable"] 7686 #[doc = "Data length value This register can only be written by firmware when DPSM is inactive (DPSMACT = 0). Number of data bytes to be transferred. When DDR = 1 DATALENGTH is truncated to a multiple of 2. (The last odd byte is not transfered) When DATALENGTH = 0 no data will be transfered, when requested by a CPSMEN and CMDTRANS = 1 also no command will be transfered. DTEN and CPSMEN are cleared to 0."]
7838 pub fn set_cce(&mut self, n: usize, val: bool) { 7687 pub fn set_datalength(&mut self, val: u32) {
7839 assert!(n < 4usize); 7688 self.0 =
7840 let offs = 0usize + n * 4usize; 7689 (self.0 & !(0x01ff_ffff << 0usize)) | (((val as u32) & 0x01ff_ffff) << 0usize);
7841 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
7842 } 7690 }
7843 #[doc = "Capture/Compare 1 output Polarity"] 7691 }
7844 pub fn ccp(&self, n: usize) -> bool { 7692 impl Default for Dlenr {
7845 assert!(n < 4usize); 7693 fn default() -> Dlenr {
7846 let offs = 1usize + n * 4usize; 7694 Dlenr(0)
7847 let val = (self.0 >> offs) & 0x01;
7848 val != 0
7849 } 7695 }
7850 #[doc = "Capture/Compare 1 output Polarity"] 7696 }
7851 pub fn set_ccp(&mut self, n: usize, val: bool) { 7697 #[doc = "The SDMMC_RESP1/2/3/4R registers contain the status of a card, which is part of the received response."]
7852 assert!(n < 4usize); 7698 #[repr(transparent)]
7853 let offs = 1usize + n * 4usize; 7699 #[derive(Copy, Clone, Eq, PartialEq)]
7854 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); 7700 pub struct Resp2r(pub u32);
7701 impl Resp2r {
7702 #[doc = "see Table404."]
7703 pub const fn cardstatus2(&self) -> u32 {
7704 let val = (self.0 >> 0usize) & 0xffff_ffff;
7705 val as u32
7855 } 7706 }
7856 #[doc = "Capture/Compare 1 complementary output enable"] 7707 #[doc = "see Table404."]
7857 pub fn ccne(&self, n: usize) -> bool { 7708 pub fn set_cardstatus2(&mut self, val: u32) {
7858 assert!(n < 4usize); 7709 self.0 =
7859 let offs = 2usize + n * 4usize; 7710 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
7860 let val = (self.0 >> offs) & 0x01;
7861 val != 0
7862 } 7711 }
7863 #[doc = "Capture/Compare 1 complementary output enable"] 7712 }
7864 pub fn set_ccne(&mut self, n: usize, val: bool) { 7713 impl Default for Resp2r {
7865 assert!(n < 4usize); 7714 fn default() -> Resp2r {
7866 let offs = 2usize + n * 4usize; 7715 Resp2r(0)
7867 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
7868 } 7716 }
7869 #[doc = "Capture/Compare 1 output Polarity"] 7717 }
7870 pub fn ccnp(&self, n: usize) -> bool { 7718 #[doc = "The SDMMC_RESP1/2/3/4R registers contain the status of a card, which is part of the received response."]
7871 assert!(n < 4usize); 7719 #[repr(transparent)]
7872 let offs = 3usize + n * 4usize; 7720 #[derive(Copy, Clone, Eq, PartialEq)]
7873 let val = (self.0 >> offs) & 0x01; 7721 pub struct Resp3r(pub u32);
7874 val != 0 7722 impl Resp3r {
7723 #[doc = "see Table404."]
7724 pub const fn cardstatus3(&self) -> u32 {
7725 let val = (self.0 >> 0usize) & 0xffff_ffff;
7726 val as u32
7875 } 7727 }
7876 #[doc = "Capture/Compare 1 output Polarity"] 7728 #[doc = "see Table404."]
7877 pub fn set_ccnp(&mut self, n: usize, val: bool) { 7729 pub fn set_cardstatus3(&mut self, val: u32) {
7878 assert!(n < 4usize); 7730 self.0 =
7879 let offs = 3usize + n * 4usize; 7731 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
7880 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
7881 } 7732 }
7882 } 7733 }
7883 impl Default for CcerAdv { 7734 impl Default for Resp3r {
7884 fn default() -> CcerAdv { 7735 fn default() -> Resp3r {
7885 CcerAdv(0) 7736 Resp3r(0)
7886 } 7737 }
7887 } 7738 }
7888 #[doc = "DMA/Interrupt enable register"] 7739 #[doc = "The SDMMC_ICR register is a write-only register. Writing a bit with 1 clears the corresponding bit in the SDMMC_STAR status register."]
7889 #[repr(transparent)] 7740 #[repr(transparent)]
7890 #[derive(Copy, Clone, Eq, PartialEq)] 7741 #[derive(Copy, Clone, Eq, PartialEq)]
7891 pub struct DierBasic(pub u32); 7742 pub struct Icr(pub u32);
7892 impl DierBasic { 7743 impl Icr {
7893 #[doc = "Update interrupt enable"] 7744 #[doc = "CCRCFAIL flag clear bit Set by software to clear the CCRCFAIL flag."]
7894 pub const fn uie(&self) -> bool { 7745 pub const fn ccrcfailc(&self) -> bool {
7895 let val = (self.0 >> 0usize) & 0x01; 7746 let val = (self.0 >> 0usize) & 0x01;
7896 val != 0 7747 val != 0
7897 } 7748 }
7898 #[doc = "Update interrupt enable"] 7749 #[doc = "CCRCFAIL flag clear bit Set by software to clear the CCRCFAIL flag."]
7899 pub fn set_uie(&mut self, val: bool) { 7750 pub fn set_ccrcfailc(&mut self, val: bool) {
7900 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 7751 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
7901 } 7752 }
7902 #[doc = "Update DMA request enable"] 7753 #[doc = "DCRCFAIL flag clear bit Set by software to clear the DCRCFAIL flag."]
7903 pub const fn ude(&self) -> bool { 7754 pub const fn dcrcfailc(&self) -> bool {
7904 let val = (self.0 >> 8usize) & 0x01; 7755 let val = (self.0 >> 1usize) & 0x01;
7905 val != 0 7756 val != 0
7906 } 7757 }
7907 #[doc = "Update DMA request enable"] 7758 #[doc = "DCRCFAIL flag clear bit Set by software to clear the DCRCFAIL flag."]
7908 pub fn set_ude(&mut self, val: bool) { 7759 pub fn set_dcrcfailc(&mut self, val: bool) {
7909 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); 7760 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
7910 } 7761 }
7911 } 7762 #[doc = "CTIMEOUT flag clear bit Set by software to clear the CTIMEOUT flag."]
7912 impl Default for DierBasic { 7763 pub const fn ctimeoutc(&self) -> bool {
7913 fn default() -> DierBasic { 7764 let val = (self.0 >> 2usize) & 0x01;
7914 DierBasic(0) 7765 val != 0
7915 } 7766 }
7916 } 7767 #[doc = "CTIMEOUT flag clear bit Set by software to clear the CTIMEOUT flag."]
7917 #[doc = "event generation register"] 7768 pub fn set_ctimeoutc(&mut self, val: bool) {
7918 #[repr(transparent)] 7769 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
7919 #[derive(Copy, Clone, Eq, PartialEq)] 7770 }
7920 pub struct EgrAdv(pub u32); 7771 #[doc = "DTIMEOUT flag clear bit Set by software to clear the DTIMEOUT flag."]
7921 impl EgrAdv { 7772 pub const fn dtimeoutc(&self) -> bool {
7922 #[doc = "Update generation"] 7773 let val = (self.0 >> 3usize) & 0x01;
7923 pub const fn ug(&self) -> bool {
7924 let val = (self.0 >> 0usize) & 0x01;
7925 val != 0 7774 val != 0
7926 } 7775 }
7927 #[doc = "Update generation"] 7776 #[doc = "DTIMEOUT flag clear bit Set by software to clear the DTIMEOUT flag."]
7928 pub fn set_ug(&mut self, val: bool) { 7777 pub fn set_dtimeoutc(&mut self, val: bool) {
7929 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 7778 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
7930 } 7779 }
7931 #[doc = "Capture/compare 1 generation"] 7780 #[doc = "TXUNDERR flag clear bit Set by software to clear TXUNDERR flag."]
7932 pub fn ccg(&self, n: usize) -> bool { 7781 pub const fn txunderrc(&self) -> bool {
7933 assert!(n < 4usize); 7782 let val = (self.0 >> 4usize) & 0x01;
7934 let offs = 1usize + n * 1usize;
7935 let val = (self.0 >> offs) & 0x01;
7936 val != 0 7783 val != 0
7937 } 7784 }
7938 #[doc = "Capture/compare 1 generation"] 7785 #[doc = "TXUNDERR flag clear bit Set by software to clear TXUNDERR flag."]
7939 pub fn set_ccg(&mut self, n: usize, val: bool) { 7786 pub fn set_txunderrc(&mut self, val: bool) {
7940 assert!(n < 4usize); 7787 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
7941 let offs = 1usize + n * 1usize;
7942 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
7943 } 7788 }
7944 #[doc = "Capture/Compare control update generation"] 7789 #[doc = "RXOVERR flag clear bit Set by software to clear the RXOVERR flag."]
7945 pub const fn comg(&self) -> bool { 7790 pub const fn rxoverrc(&self) -> bool {
7946 let val = (self.0 >> 5usize) & 0x01; 7791 let val = (self.0 >> 5usize) & 0x01;
7947 val != 0 7792 val != 0
7948 } 7793 }
7949 #[doc = "Capture/Compare control update generation"] 7794 #[doc = "RXOVERR flag clear bit Set by software to clear the RXOVERR flag."]
7950 pub fn set_comg(&mut self, val: bool) { 7795 pub fn set_rxoverrc(&mut self, val: bool) {
7951 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); 7796 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
7952 } 7797 }
7953 #[doc = "Trigger generation"] 7798 #[doc = "CMDREND flag clear bit Set by software to clear the CMDREND flag."]
7954 pub const fn tg(&self) -> bool { 7799 pub const fn cmdrendc(&self) -> bool {
7955 let val = (self.0 >> 6usize) & 0x01; 7800 let val = (self.0 >> 6usize) & 0x01;
7956 val != 0 7801 val != 0
7957 } 7802 }
7958 #[doc = "Trigger generation"] 7803 #[doc = "CMDREND flag clear bit Set by software to clear the CMDREND flag."]
7959 pub fn set_tg(&mut self, val: bool) { 7804 pub fn set_cmdrendc(&mut self, val: bool) {
7960 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); 7805 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
7961 } 7806 }
7962 #[doc = "Break generation"] 7807 #[doc = "CMDSENT flag clear bit Set by software to clear the CMDSENT flag."]
7963 pub const fn bg(&self) -> bool { 7808 pub const fn cmdsentc(&self) -> bool {
7964 let val = (self.0 >> 7usize) & 0x01; 7809 let val = (self.0 >> 7usize) & 0x01;
7965 val != 0 7810 val != 0
7966 } 7811 }
7967 #[doc = "Break generation"] 7812 #[doc = "CMDSENT flag clear bit Set by software to clear the CMDSENT flag."]
7968 pub fn set_bg(&mut self, val: bool) { 7813 pub fn set_cmdsentc(&mut self, val: bool) {
7969 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); 7814 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
7970 } 7815 }
7971 } 7816 #[doc = "DATAEND flag clear bit Set by software to clear the DATAEND flag."]
7972 impl Default for EgrAdv { 7817 pub const fn dataendc(&self) -> bool {
7973 fn default() -> EgrAdv { 7818 let val = (self.0 >> 8usize) & 0x01;
7974 EgrAdv(0)
7975 }
7976 }
7977 #[doc = "control register 2"]
7978 #[repr(transparent)]
7979 #[derive(Copy, Clone, Eq, PartialEq)]
7980 pub struct Cr2Basic(pub u32);
7981 impl Cr2Basic {
7982 #[doc = "Master mode selection"]
7983 pub const fn mms(&self) -> super::vals::Mms {
7984 let val = (self.0 >> 4usize) & 0x07;
7985 super::vals::Mms(val as u8)
7986 }
7987 #[doc = "Master mode selection"]
7988 pub fn set_mms(&mut self, val: super::vals::Mms) {
7989 self.0 = (self.0 & !(0x07 << 4usize)) | (((val.0 as u32) & 0x07) << 4usize);
7990 }
7991 }
7992 impl Default for Cr2Basic {
7993 fn default() -> Cr2Basic {
7994 Cr2Basic(0)
7995 }
7996 }
7997 #[doc = "status register"]
7998 #[repr(transparent)]
7999 #[derive(Copy, Clone, Eq, PartialEq)]
8000 pub struct SrGp(pub u32);
8001 impl SrGp {
8002 #[doc = "Update interrupt flag"]
8003 pub const fn uif(&self) -> bool {
8004 let val = (self.0 >> 0usize) & 0x01;
8005 val != 0 7819 val != 0
8006 } 7820 }
8007 #[doc = "Update interrupt flag"] 7821 #[doc = "DATAEND flag clear bit Set by software to clear the DATAEND flag."]
8008 pub fn set_uif(&mut self, val: bool) { 7822 pub fn set_dataendc(&mut self, val: bool) {
8009 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 7823 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
8010 } 7824 }
8011 #[doc = "Capture/compare 1 interrupt flag"] 7825 #[doc = "DHOLD flag clear bit Set by software to clear the DHOLD flag."]
8012 pub fn ccif(&self, n: usize) -> bool { 7826 pub const fn dholdc(&self) -> bool {
8013 assert!(n < 4usize); 7827 let val = (self.0 >> 9usize) & 0x01;
8014 let offs = 1usize + n * 1usize;
8015 let val = (self.0 >> offs) & 0x01;
8016 val != 0 7828 val != 0
8017 } 7829 }
8018 #[doc = "Capture/compare 1 interrupt flag"] 7830 #[doc = "DHOLD flag clear bit Set by software to clear the DHOLD flag."]
8019 pub fn set_ccif(&mut self, n: usize, val: bool) { 7831 pub fn set_dholdc(&mut self, val: bool) {
8020 assert!(n < 4usize); 7832 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
8021 let offs = 1usize + n * 1usize;
8022 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
8023 } 7833 }
8024 #[doc = "COM interrupt flag"] 7834 #[doc = "DBCKEND flag clear bit Set by software to clear the DBCKEND flag."]
8025 pub const fn comif(&self) -> bool { 7835 pub const fn dbckendc(&self) -> bool {
8026 let val = (self.0 >> 5usize) & 0x01; 7836 let val = (self.0 >> 10usize) & 0x01;
8027 val != 0 7837 val != 0
8028 } 7838 }
8029 #[doc = "COM interrupt flag"] 7839 #[doc = "DBCKEND flag clear bit Set by software to clear the DBCKEND flag."]
8030 pub fn set_comif(&mut self, val: bool) { 7840 pub fn set_dbckendc(&mut self, val: bool) {
8031 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); 7841 self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize);
8032 } 7842 }
8033 #[doc = "Trigger interrupt flag"] 7843 #[doc = "DABORT flag clear bit Set by software to clear the DABORT flag."]
8034 pub const fn tif(&self) -> bool { 7844 pub const fn dabortc(&self) -> bool {
8035 let val = (self.0 >> 6usize) & 0x01; 7845 let val = (self.0 >> 11usize) & 0x01;
8036 val != 0 7846 val != 0
8037 } 7847 }
8038 #[doc = "Trigger interrupt flag"] 7848 #[doc = "DABORT flag clear bit Set by software to clear the DABORT flag."]
8039 pub fn set_tif(&mut self, val: bool) { 7849 pub fn set_dabortc(&mut self, val: bool) {
8040 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); 7850 self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize);
8041 } 7851 }
8042 #[doc = "Break interrupt flag"] 7852 #[doc = "BUSYD0END flag clear bit Set by software to clear the BUSYD0END flag."]
8043 pub const fn bif(&self) -> bool { 7853 pub const fn busyd0endc(&self) -> bool {
8044 let val = (self.0 >> 7usize) & 0x01; 7854 let val = (self.0 >> 21usize) & 0x01;
8045 val != 0 7855 val != 0
8046 } 7856 }
8047 #[doc = "Break interrupt flag"] 7857 #[doc = "BUSYD0END flag clear bit Set by software to clear the BUSYD0END flag."]
8048 pub fn set_bif(&mut self, val: bool) { 7858 pub fn set_busyd0endc(&mut self, val: bool) {
8049 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); 7859 self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize);
8050 } 7860 }
8051 #[doc = "Capture/Compare 1 overcapture flag"] 7861 #[doc = "SDIOIT flag clear bit Set by software to clear the SDIOIT flag."]
8052 pub fn ccof(&self, n: usize) -> bool { 7862 pub const fn sdioitc(&self) -> bool {
8053 assert!(n < 4usize); 7863 let val = (self.0 >> 22usize) & 0x01;
8054 let offs = 9usize + n * 1usize;
8055 let val = (self.0 >> offs) & 0x01;
8056 val != 0 7864 val != 0
8057 } 7865 }
8058 #[doc = "Capture/Compare 1 overcapture flag"] 7866 #[doc = "SDIOIT flag clear bit Set by software to clear the SDIOIT flag."]
8059 pub fn set_ccof(&mut self, n: usize, val: bool) { 7867 pub fn set_sdioitc(&mut self, val: bool) {
8060 assert!(n < 4usize); 7868 self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize);
8061 let offs = 9usize + n * 1usize;
8062 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
8063 }
8064 }
8065 impl Default for SrGp {
8066 fn default() -> SrGp {
8067 SrGp(0)
8068 } 7869 }
8069 } 7870 #[doc = "ACKFAIL flag clear bit Set by software to clear the ACKFAIL flag."]
8070 #[doc = "event generation register"] 7871 pub const fn ackfailc(&self) -> bool {
8071 #[repr(transparent)] 7872 let val = (self.0 >> 23usize) & 0x01;
8072 #[derive(Copy, Clone, Eq, PartialEq)]
8073 pub struct EgrBasic(pub u32);
8074 impl EgrBasic {
8075 #[doc = "Update generation"]
8076 pub const fn ug(&self) -> bool {
8077 let val = (self.0 >> 0usize) & 0x01;
8078 val != 0 7873 val != 0
8079 } 7874 }
8080 #[doc = "Update generation"] 7875 #[doc = "ACKFAIL flag clear bit Set by software to clear the ACKFAIL flag."]
8081 pub fn set_ug(&mut self, val: bool) { 7876 pub fn set_ackfailc(&mut self, val: bool) {
8082 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 7877 self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize);
8083 }
8084 }
8085 impl Default for EgrBasic {
8086 fn default() -> EgrBasic {
8087 EgrBasic(0)
8088 } 7878 }
8089 } 7879 #[doc = "ACKTIMEOUT flag clear bit Set by software to clear the ACKTIMEOUT flag."]
8090 #[doc = "control register 1"] 7880 pub const fn acktimeoutc(&self) -> bool {
8091 #[repr(transparent)] 7881 let val = (self.0 >> 24usize) & 0x01;
8092 #[derive(Copy, Clone, Eq, PartialEq)]
8093 pub struct Cr1Gp(pub u32);
8094 impl Cr1Gp {
8095 #[doc = "Counter enable"]
8096 pub const fn cen(&self) -> bool {
8097 let val = (self.0 >> 0usize) & 0x01;
8098 val != 0 7882 val != 0
8099 } 7883 }
8100 #[doc = "Counter enable"] 7884 #[doc = "ACKTIMEOUT flag clear bit Set by software to clear the ACKTIMEOUT flag."]
8101 pub fn set_cen(&mut self, val: bool) { 7885 pub fn set_acktimeoutc(&mut self, val: bool) {
8102 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 7886 self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize);
8103 } 7887 }
8104 #[doc = "Update disable"] 7888 #[doc = "VSWEND flag clear bit Set by software to clear the VSWEND flag."]
8105 pub const fn udis(&self) -> bool { 7889 pub const fn vswendc(&self) -> bool {
8106 let val = (self.0 >> 1usize) & 0x01; 7890 let val = (self.0 >> 25usize) & 0x01;
8107 val != 0 7891 val != 0
8108 } 7892 }
8109 #[doc = "Update disable"] 7893 #[doc = "VSWEND flag clear bit Set by software to clear the VSWEND flag."]
8110 pub fn set_udis(&mut self, val: bool) { 7894 pub fn set_vswendc(&mut self, val: bool) {
8111 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); 7895 self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize);
8112 } 7896 }
8113 #[doc = "Update request source"] 7897 #[doc = "CKSTOP flag clear bit Set by software to clear the CKSTOP flag."]
8114 pub const fn urs(&self) -> super::vals::Urs { 7898 pub const fn ckstopc(&self) -> bool {
8115 let val = (self.0 >> 2usize) & 0x01; 7899 let val = (self.0 >> 26usize) & 0x01;
8116 super::vals::Urs(val as u8) 7900 val != 0
8117 } 7901 }
8118 #[doc = "Update request source"] 7902 #[doc = "CKSTOP flag clear bit Set by software to clear the CKSTOP flag."]
8119 pub fn set_urs(&mut self, val: super::vals::Urs) { 7903 pub fn set_ckstopc(&mut self, val: bool) {
8120 self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize); 7904 self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize);
8121 } 7905 }
8122 #[doc = "One-pulse mode"] 7906 #[doc = "IDMA transfer error clear bit Set by software to clear the IDMATE flag."]
8123 pub const fn opm(&self) -> super::vals::Opm { 7907 pub const fn idmatec(&self) -> bool {
8124 let val = (self.0 >> 3usize) & 0x01; 7908 let val = (self.0 >> 27usize) & 0x01;
8125 super::vals::Opm(val as u8) 7909 val != 0
8126 } 7910 }
8127 #[doc = "One-pulse mode"] 7911 #[doc = "IDMA transfer error clear bit Set by software to clear the IDMATE flag."]
8128 pub fn set_opm(&mut self, val: super::vals::Opm) { 7912 pub fn set_idmatec(&mut self, val: bool) {
8129 self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize); 7913 self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize);
8130 } 7914 }
8131 #[doc = "Direction"] 7915 #[doc = "IDMA buffer transfer complete clear bit Set by software to clear the IDMABTC flag."]
8132 pub const fn dir(&self) -> super::vals::Dir { 7916 pub const fn idmabtcc(&self) -> bool {
8133 let val = (self.0 >> 4usize) & 0x01; 7917 let val = (self.0 >> 28usize) & 0x01;
8134 super::vals::Dir(val as u8) 7918 val != 0
8135 } 7919 }
8136 #[doc = "Direction"] 7920 #[doc = "IDMA buffer transfer complete clear bit Set by software to clear the IDMABTC flag."]
8137 pub fn set_dir(&mut self, val: super::vals::Dir) { 7921 pub fn set_idmabtcc(&mut self, val: bool) {
8138 self.0 = (self.0 & !(0x01 << 4usize)) | (((val.0 as u32) & 0x01) << 4usize); 7922 self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize);
8139 } 7923 }
8140 #[doc = "Center-aligned mode selection"] 7924 }
8141 pub const fn cms(&self) -> super::vals::Cms { 7925 impl Default for Icr {
8142 let val = (self.0 >> 5usize) & 0x03; 7926 fn default() -> Icr {
8143 super::vals::Cms(val as u8) 7927 Icr(0)
8144 } 7928 }
8145 #[doc = "Center-aligned mode selection"] 7929 }
8146 pub fn set_cms(&mut self, val: super::vals::Cms) { 7930 #[doc = "The SDMMC_RESP1/2/3/4R registers contain the status of a card, which is part of the received response."]
8147 self.0 = (self.0 & !(0x03 << 5usize)) | (((val.0 as u32) & 0x03) << 5usize); 7931 #[repr(transparent)]
7932 #[derive(Copy, Clone, Eq, PartialEq)]
7933 pub struct Resp4r(pub u32);
7934 impl Resp4r {
7935 #[doc = "see Table404."]
7936 pub const fn cardstatus4(&self) -> u32 {
7937 let val = (self.0 >> 0usize) & 0xffff_ffff;
7938 val as u32
8148 } 7939 }
8149 #[doc = "Auto-reload preload enable"] 7940 #[doc = "see Table404."]
8150 pub const fn arpe(&self) -> super::vals::Arpe { 7941 pub fn set_cardstatus4(&mut self, val: u32) {
8151 let val = (self.0 >> 7usize) & 0x01; 7942 self.0 =
8152 super::vals::Arpe(val as u8) 7943 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
8153 } 7944 }
8154 #[doc = "Auto-reload preload enable"] 7945 }
8155 pub fn set_arpe(&mut self, val: super::vals::Arpe) { 7946 impl Default for Resp4r {
8156 self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize); 7947 fn default() -> Resp4r {
7948 Resp4r(0)
8157 } 7949 }
8158 #[doc = "Clock division"] 7950 }
8159 pub const fn ckd(&self) -> super::vals::Ckd { 7951 #[doc = "The SDMMC_IDMABSIZER register contains the buffers size when in double buffer configuration."]
8160 let val = (self.0 >> 8usize) & 0x03; 7952 #[repr(transparent)]
8161 super::vals::Ckd(val as u8) 7953 #[derive(Copy, Clone, Eq, PartialEq)]
7954 pub struct Idmabsizer(pub u32);
7955 impl Idmabsizer {
7956 #[doc = "Number of transfers per buffer. This 8-bit value shall be multiplied by 8 to get the size of the buffer in 32-bit words and by 32 to get the size of the buffer in bytes. Example: IDMABNDT = 0x01: buffer size = 8 words = 32 bytes. These bits can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
7957 pub const fn idmabndt(&self) -> u8 {
7958 let val = (self.0 >> 5usize) & 0xff;
7959 val as u8
8162 } 7960 }
8163 #[doc = "Clock division"] 7961 #[doc = "Number of transfers per buffer. This 8-bit value shall be multiplied by 8 to get the size of the buffer in 32-bit words and by 32 to get the size of the buffer in bytes. Example: IDMABNDT = 0x01: buffer size = 8 words = 32 bytes. These bits can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
8164 pub fn set_ckd(&mut self, val: super::vals::Ckd) { 7962 pub fn set_idmabndt(&mut self, val: u8) {
8165 self.0 = (self.0 & !(0x03 << 8usize)) | (((val.0 as u32) & 0x03) << 8usize); 7963 self.0 = (self.0 & !(0xff << 5usize)) | (((val as u32) & 0xff) << 5usize);
8166 } 7964 }
8167 } 7965 }
8168 impl Default for Cr1Gp { 7966 impl Default for Idmabsizer {
8169 fn default() -> Cr1Gp { 7967 fn default() -> Idmabsizer {
8170 Cr1Gp(0) 7968 Idmabsizer(0)
8171 } 7969 }
8172 } 7970 }
8173 #[doc = "prescaler"] 7971 #[doc = "The SDMMC_ACKTIMER register contains the acknowledgment timeout period, in SDMMC_CK bus clock periods. A counter loads the value from the SDMMC_ACKTIMER register, and starts decrementing when the data path state machine (DPSM) enters the Wait_Ack state. If the timer reaches 0 while the DPSM is in this states, the acknowledgment timeout status flag is set."]
8174 #[repr(transparent)] 7972 #[repr(transparent)]
8175 #[derive(Copy, Clone, Eq, PartialEq)] 7973 #[derive(Copy, Clone, Eq, PartialEq)]
8176 pub struct Psc(pub u32); 7974 pub struct Acktimer(pub u32);
8177 impl Psc { 7975 impl Acktimer {
8178 #[doc = "Prescaler value"] 7976 #[doc = "Boot acknowledgment timeout period This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). Boot acknowledgment timeout period expressed in card bus clock periods."]
8179 pub const fn psc(&self) -> u16 { 7977 pub const fn acktime(&self) -> u32 {
8180 let val = (self.0 >> 0usize) & 0xffff; 7978 let val = (self.0 >> 0usize) & 0x01ff_ffff;
8181 val as u16 7979 val as u32
8182 } 7980 }
8183 #[doc = "Prescaler value"] 7981 #[doc = "Boot acknowledgment timeout period This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). Boot acknowledgment timeout period expressed in card bus clock periods."]
8184 pub fn set_psc(&mut self, val: u16) { 7982 pub fn set_acktime(&mut self, val: u32) {
8185 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); 7983 self.0 =
7984 (self.0 & !(0x01ff_ffff << 0usize)) | (((val as u32) & 0x01ff_ffff) << 0usize);
8186 } 7985 }
8187 } 7986 }
8188 impl Default for Psc { 7987 impl Default for Acktimer {
8189 fn default() -> Psc { 7988 fn default() -> Acktimer {
8190 Psc(0) 7989 Acktimer(0)
8191 } 7990 }
8192 } 7991 }
8193 #[doc = "capture/compare enable register"] 7992 #[doc = "The receive and transmit FIFOs can be read or written as 32-bit wide registers. The FIFOs contain 32 entries on 32 sequential addresses. This allows the CPU to use its load and store multiple operands to read from/write to the FIFO."]
8194 #[repr(transparent)] 7993 #[repr(transparent)]
8195 #[derive(Copy, Clone, Eq, PartialEq)] 7994 #[derive(Copy, Clone, Eq, PartialEq)]
8196 pub struct CcerGp(pub u32); 7995 pub struct Idmactrlr(pub u32);
8197 impl CcerGp { 7996 impl Idmactrlr {
8198 #[doc = "Capture/Compare 1 output enable"] 7997 #[doc = "IDMA enable This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
8199 pub fn cce(&self, n: usize) -> bool { 7998 pub const fn idmaen(&self) -> bool {
8200 assert!(n < 4usize); 7999 let val = (self.0 >> 0usize) & 0x01;
8201 let offs = 0usize + n * 4usize;
8202 let val = (self.0 >> offs) & 0x01;
8203 val != 0 8000 val != 0
8204 } 8001 }
8205 #[doc = "Capture/Compare 1 output enable"] 8002 #[doc = "IDMA enable This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
8206 pub fn set_cce(&mut self, n: usize, val: bool) { 8003 pub fn set_idmaen(&mut self, val: bool) {
8207 assert!(n < 4usize); 8004 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
8208 let offs = 0usize + n * 4usize;
8209 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
8210 } 8005 }
8211 #[doc = "Capture/Compare 1 output Polarity"] 8006 #[doc = "Buffer mode selection. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
8212 pub fn ccp(&self, n: usize) -> bool { 8007 pub const fn idmabmode(&self) -> bool {
8213 assert!(n < 4usize); 8008 let val = (self.0 >> 1usize) & 0x01;
8214 let offs = 1usize + n * 4usize;
8215 let val = (self.0 >> offs) & 0x01;
8216 val != 0 8009 val != 0
8217 } 8010 }
8218 #[doc = "Capture/Compare 1 output Polarity"] 8011 #[doc = "Buffer mode selection. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
8219 pub fn set_ccp(&mut self, n: usize, val: bool) { 8012 pub fn set_idmabmode(&mut self, val: bool) {
8220 assert!(n < 4usize); 8013 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
8221 let offs = 1usize + n * 4usize;
8222 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
8223 } 8014 }
8224 #[doc = "Capture/Compare 1 output Polarity"] 8015 #[doc = "Double buffer mode active buffer indication This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0). When IDMA is enabled this bit is toggled by hardware."]
8225 pub fn ccnp(&self, n: usize) -> bool { 8016 pub const fn idmabact(&self) -> bool {
8226 assert!(n < 4usize); 8017 let val = (self.0 >> 2usize) & 0x01;
8227 let offs = 3usize + n * 4usize;
8228 let val = (self.0 >> offs) & 0x01;
8229 val != 0 8018 val != 0
8230 } 8019 }
8231 #[doc = "Capture/Compare 1 output Polarity"] 8020 #[doc = "Double buffer mode active buffer indication This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0). When IDMA is enabled this bit is toggled by hardware."]
8232 pub fn set_ccnp(&mut self, n: usize, val: bool) { 8021 pub fn set_idmabact(&mut self, val: bool) {
8233 assert!(n < 4usize); 8022 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
8234 let offs = 3usize + n * 4usize;
8235 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
8236 } 8023 }
8237 } 8024 }
8238 impl Default for CcerGp { 8025 impl Default for Idmactrlr {
8239 fn default() -> CcerGp { 8026 fn default() -> Idmactrlr {
8240 CcerGp(0) 8027 Idmactrlr(0)
8241 } 8028 }
8242 } 8029 }
8243 #[doc = "DMA/Interrupt enable register"] 8030 #[doc = "The SDMMC_DCTRL register control the data path state machine (DPSM)."]
8244 #[repr(transparent)] 8031 #[repr(transparent)]
8245 #[derive(Copy, Clone, Eq, PartialEq)] 8032 #[derive(Copy, Clone, Eq, PartialEq)]
8246 pub struct DierAdv(pub u32); 8033 pub struct Dctrl(pub u32);
8247 impl DierAdv { 8034 impl Dctrl {
8248 #[doc = "Update interrupt enable"] 8035 #[doc = "Data transfer enable bit This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0). This bit is cleared by Hardware when data transfer completes. This bit shall only be used to transfer data when no associated data transfer command is used, i.e. shall not be used with SD or eMMC cards."]
8249 pub const fn uie(&self) -> bool { 8036 pub const fn dten(&self) -> bool {
8250 let val = (self.0 >> 0usize) & 0x01; 8037 let val = (self.0 >> 0usize) & 0x01;
8251 val != 0 8038 val != 0
8252 } 8039 }
8253 #[doc = "Update interrupt enable"] 8040 #[doc = "Data transfer enable bit This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0). This bit is cleared by Hardware when data transfer completes. This bit shall only be used to transfer data when no associated data transfer command is used, i.e. shall not be used with SD or eMMC cards."]
8254 pub fn set_uie(&mut self, val: bool) { 8041 pub fn set_dten(&mut self, val: bool) {
8255 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 8042 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
8256 } 8043 }
8257 #[doc = "Capture/Compare 1 interrupt enable"] 8044 #[doc = "Data transfer direction selection This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
8258 pub fn ccie(&self, n: usize) -> bool { 8045 pub const fn dtdir(&self) -> bool {
8259 assert!(n < 4usize); 8046 let val = (self.0 >> 1usize) & 0x01;
8260 let offs = 1usize + n * 1usize;
8261 let val = (self.0 >> offs) & 0x01;
8262 val != 0 8047 val != 0
8263 } 8048 }
8264 #[doc = "Capture/Compare 1 interrupt enable"] 8049 #[doc = "Data transfer direction selection This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
8265 pub fn set_ccie(&mut self, n: usize, val: bool) { 8050 pub fn set_dtdir(&mut self, val: bool) {
8266 assert!(n < 4usize); 8051 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
8267 let offs = 1usize + n * 1usize;
8268 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
8269 } 8052 }
8270 #[doc = "COM interrupt enable"] 8053 #[doc = "Data transfer mode selection. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
8271 pub const fn comie(&self) -> bool { 8054 pub const fn dtmode(&self) -> u8 {
8272 let val = (self.0 >> 5usize) & 0x01; 8055 let val = (self.0 >> 2usize) & 0x03;
8273 val != 0 8056 val as u8
8274 } 8057 }
8275 #[doc = "COM interrupt enable"] 8058 #[doc = "Data transfer mode selection. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
8276 pub fn set_comie(&mut self, val: bool) { 8059 pub fn set_dtmode(&mut self, val: u8) {
8277 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); 8060 self.0 = (self.0 & !(0x03 << 2usize)) | (((val as u32) & 0x03) << 2usize);
8278 } 8061 }
8279 #[doc = "Trigger interrupt enable"] 8062 #[doc = "Data block size This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0). Define the data block length when the block data transfer mode is selected: When DATALENGTH is not a multiple of DBLOCKSIZE, the transfered data is truncated at a multiple of DBLOCKSIZE. (Any remain data will not be transfered.) When DDR = 1, DBLOCKSIZE = 0000 shall not be used. (No data will be transfered)"]
8280 pub const fn tie(&self) -> bool { 8063 pub const fn dblocksize(&self) -> u8 {
8281 let val = (self.0 >> 6usize) & 0x01; 8064 let val = (self.0 >> 4usize) & 0x0f;
8065 val as u8
8066 }
8067 #[doc = "Data block size This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0). Define the data block length when the block data transfer mode is selected: When DATALENGTH is not a multiple of DBLOCKSIZE, the transfered data is truncated at a multiple of DBLOCKSIZE. (Any remain data will not be transfered.) When DDR = 1, DBLOCKSIZE = 0000 shall not be used. (No data will be transfered)"]
8068 pub fn set_dblocksize(&mut self, val: u8) {
8069 self.0 = (self.0 & !(0x0f << 4usize)) | (((val as u32) & 0x0f) << 4usize);
8070 }
8071 #[doc = "Read wait start. If this bit is set, read wait operation starts."]
8072 pub const fn rwstart(&self) -> bool {
8073 let val = (self.0 >> 8usize) & 0x01;
8282 val != 0 8074 val != 0
8283 } 8075 }
8284 #[doc = "Trigger interrupt enable"] 8076 #[doc = "Read wait start. If this bit is set, read wait operation starts."]
8285 pub fn set_tie(&mut self, val: bool) { 8077 pub fn set_rwstart(&mut self, val: bool) {
8286 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); 8078 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
8287 } 8079 }
8288 #[doc = "Break interrupt enable"] 8080 #[doc = "Read wait stop This bit is written by firmware and auto cleared by hardware when the DPSM moves from the READ_WAIT state to the WAIT_R or IDLE state."]
8289 pub const fn bie(&self) -> bool { 8081 pub const fn rwstop(&self) -> bool {
8290 let val = (self.0 >> 7usize) & 0x01; 8082 let val = (self.0 >> 9usize) & 0x01;
8291 val != 0 8083 val != 0
8292 } 8084 }
8293 #[doc = "Break interrupt enable"] 8085 #[doc = "Read wait stop This bit is written by firmware and auto cleared by hardware when the DPSM moves from the READ_WAIT state to the WAIT_R or IDLE state."]
8294 pub fn set_bie(&mut self, val: bool) { 8086 pub fn set_rwstop(&mut self, val: bool) {
8295 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); 8087 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
8296 } 8088 }
8297 #[doc = "Update DMA request enable"] 8089 #[doc = "Read wait mode. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
8298 pub const fn ude(&self) -> bool { 8090 pub const fn rwmod(&self) -> bool {
8299 let val = (self.0 >> 8usize) & 0x01; 8091 let val = (self.0 >> 10usize) & 0x01;
8300 val != 0 8092 val != 0
8301 } 8093 }
8302 #[doc = "Update DMA request enable"] 8094 #[doc = "Read wait mode. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
8303 pub fn set_ude(&mut self, val: bool) { 8095 pub fn set_rwmod(&mut self, val: bool) {
8304 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); 8096 self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize);
8305 } 8097 }
8306 #[doc = "Capture/Compare 1 DMA request enable"] 8098 #[doc = "SD I/O interrupt enable functions This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0). If this bit is set, the DPSM enables the SD I/O card specific interrupt operation."]
8307 pub fn ccde(&self, n: usize) -> bool { 8099 pub const fn sdioen(&self) -> bool {
8308 assert!(n < 4usize); 8100 let val = (self.0 >> 11usize) & 0x01;
8309 let offs = 9usize + n * 1usize;
8310 let val = (self.0 >> offs) & 0x01;
8311 val != 0 8101 val != 0
8312 } 8102 }
8313 #[doc = "Capture/Compare 1 DMA request enable"] 8103 #[doc = "SD I/O interrupt enable functions This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0). If this bit is set, the DPSM enables the SD I/O card specific interrupt operation."]
8314 pub fn set_ccde(&mut self, n: usize, val: bool) { 8104 pub fn set_sdioen(&mut self, val: bool) {
8315 assert!(n < 4usize); 8105 self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize);
8316 let offs = 9usize + n * 1usize;
8317 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
8318 } 8106 }
8319 #[doc = "COM DMA request enable"] 8107 #[doc = "Enable the reception of the boot acknowledgment. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
8320 pub const fn comde(&self) -> bool { 8108 pub const fn bootacken(&self) -> bool {
8321 let val = (self.0 >> 13usize) & 0x01; 8109 let val = (self.0 >> 12usize) & 0x01;
8322 val != 0 8110 val != 0
8323 } 8111 }
8324 #[doc = "COM DMA request enable"] 8112 #[doc = "Enable the reception of the boot acknowledgment. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
8325 pub fn set_comde(&mut self, val: bool) { 8113 pub fn set_bootacken(&mut self, val: bool) {
8326 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); 8114 self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize);
8327 } 8115 }
8328 #[doc = "Trigger DMA request enable"] 8116 #[doc = "FIFO reset, will flush any remaining data. This bit can only be written by firmware when IDMAEN= 0 and DPSM is active (DPSMACT = 1). This bit will only take effect when a transfer error or transfer hold occurs."]
8329 pub const fn tde(&self) -> bool { 8117 pub const fn fiforst(&self) -> bool {
8330 let val = (self.0 >> 14usize) & 0x01; 8118 let val = (self.0 >> 13usize) & 0x01;
8331 val != 0 8119 val != 0
8332 } 8120 }
8333 #[doc = "Trigger DMA request enable"] 8121 #[doc = "FIFO reset, will flush any remaining data. This bit can only be written by firmware when IDMAEN= 0 and DPSM is active (DPSMACT = 1). This bit will only take effect when a transfer error or transfer hold occurs."]
8334 pub fn set_tde(&mut self, val: bool) { 8122 pub fn set_fiforst(&mut self, val: bool) {
8335 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); 8123 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize);
8336 } 8124 }
8337 } 8125 }
8338 impl Default for DierAdv { 8126 impl Default for Dctrl {
8339 fn default() -> DierAdv { 8127 fn default() -> Dctrl {
8340 DierAdv(0) 8128 Dctrl(0)
8341 } 8129 }
8342 } 8130 }
8343 #[doc = "slave mode control register"] 8131 #[doc = "The SDMMC_CMDR register contains the command index and command type bits. The command index is sent to a card as part of a command message. The command type bits control the command path state machine (CPSM)."]
8344 #[repr(transparent)] 8132 #[repr(transparent)]
8345 #[derive(Copy, Clone, Eq, PartialEq)] 8133 #[derive(Copy, Clone, Eq, PartialEq)]
8346 pub struct Smcr(pub u32); 8134 pub struct Cmdr(pub u32);
8347 impl Smcr { 8135 impl Cmdr {
8348 #[doc = "Slave mode selection"] 8136 #[doc = "Command index. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). The command index is sent to the card as part of a command message."]
8349 pub const fn sms(&self) -> super::vals::Sms { 8137 pub const fn cmdindex(&self) -> u8 {
8350 let val = (self.0 >> 0usize) & 0x07; 8138 let val = (self.0 >> 0usize) & 0x3f;
8351 super::vals::Sms(val as u8) 8139 val as u8
8352 } 8140 }
8353 #[doc = "Slave mode selection"] 8141 #[doc = "Command index. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). The command index is sent to the card as part of a command message."]
8354 pub fn set_sms(&mut self, val: super::vals::Sms) { 8142 pub fn set_cmdindex(&mut self, val: u8) {
8355 self.0 = (self.0 & !(0x07 << 0usize)) | (((val.0 as u32) & 0x07) << 0usize); 8143 self.0 = (self.0 & !(0x3f << 0usize)) | (((val as u32) & 0x3f) << 0usize);
8356 } 8144 }
8357 #[doc = "Trigger selection"] 8145 #[doc = "The CPSM treats the command as a data transfer command, stops the interrupt period, and signals DataEnable to the DPSM This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). If this bit is set, the CPSM issues an end of interrupt period and issues DataEnable signal to the DPSM when the command is sent."]
8358 pub const fn ts(&self) -> super::vals::Ts { 8146 pub const fn cmdtrans(&self) -> bool {
8359 let val = (self.0 >> 4usize) & 0x07; 8147 let val = (self.0 >> 6usize) & 0x01;
8360 super::vals::Ts(val as u8) 8148 val != 0
8361 } 8149 }
8362 #[doc = "Trigger selection"] 8150 #[doc = "The CPSM treats the command as a data transfer command, stops the interrupt period, and signals DataEnable to the DPSM This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). If this bit is set, the CPSM issues an end of interrupt period and issues DataEnable signal to the DPSM when the command is sent."]
8363 pub fn set_ts(&mut self, val: super::vals::Ts) { 8151 pub fn set_cmdtrans(&mut self, val: bool) {
8364 self.0 = (self.0 & !(0x07 << 4usize)) | (((val.0 as u32) & 0x07) << 4usize); 8152 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
8365 } 8153 }
8366 #[doc = "Master/Slave mode"] 8154 #[doc = "The CPSM treats the command as a Stop Transmission command and signals Abort to the DPSM. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). If this bit is set, the CPSM issues the Abort signal to the DPSM when the command is sent."]
8367 pub const fn msm(&self) -> super::vals::Msm { 8155 pub const fn cmdstop(&self) -> bool {
8368 let val = (self.0 >> 7usize) & 0x01; 8156 let val = (self.0 >> 7usize) & 0x01;
8369 super::vals::Msm(val as u8) 8157 val != 0
8370 } 8158 }
8371 #[doc = "Master/Slave mode"] 8159 #[doc = "The CPSM treats the command as a Stop Transmission command and signals Abort to the DPSM. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). If this bit is set, the CPSM issues the Abort signal to the DPSM when the command is sent."]
8372 pub fn set_msm(&mut self, val: super::vals::Msm) { 8160 pub fn set_cmdstop(&mut self, val: bool) {
8373 self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize); 8161 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
8374 } 8162 }
8375 #[doc = "External trigger filter"] 8163 #[doc = "Wait for response bits. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). They are used to configure whether the CPSM is to wait for a response, and if yes, which kind of response."]
8376 pub const fn etf(&self) -> super::vals::Etf { 8164 pub const fn waitresp(&self) -> u8 {
8377 let val = (self.0 >> 8usize) & 0x0f; 8165 let val = (self.0 >> 8usize) & 0x03;
8378 super::vals::Etf(val as u8) 8166 val as u8
8379 } 8167 }
8380 #[doc = "External trigger filter"] 8168 #[doc = "Wait for response bits. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). They are used to configure whether the CPSM is to wait for a response, and if yes, which kind of response."]
8381 pub fn set_etf(&mut self, val: super::vals::Etf) { 8169 pub fn set_waitresp(&mut self, val: u8) {
8382 self.0 = (self.0 & !(0x0f << 8usize)) | (((val.0 as u32) & 0x0f) << 8usize); 8170 self.0 = (self.0 & !(0x03 << 8usize)) | (((val as u32) & 0x03) << 8usize);
8383 } 8171 }
8384 #[doc = "External trigger prescaler"] 8172 #[doc = "CPSM waits for interrupt request. If this bit is set, the CPSM disables command timeout and waits for an card interrupt request (Response). If this bit is cleared in the CPSM Wait state, will cause the abort of the interrupt mode."]
8385 pub const fn etps(&self) -> super::vals::Etps { 8173 pub const fn waitint(&self) -> bool {
8386 let val = (self.0 >> 12usize) & 0x03; 8174 let val = (self.0 >> 10usize) & 0x01;
8387 super::vals::Etps(val as u8) 8175 val != 0
8388 } 8176 }
8389 #[doc = "External trigger prescaler"] 8177 #[doc = "CPSM waits for interrupt request. If this bit is set, the CPSM disables command timeout and waits for an card interrupt request (Response). If this bit is cleared in the CPSM Wait state, will cause the abort of the interrupt mode."]
8390 pub fn set_etps(&mut self, val: super::vals::Etps) { 8178 pub fn set_waitint(&mut self, val: bool) {
8391 self.0 = (self.0 & !(0x03 << 12usize)) | (((val.0 as u32) & 0x03) << 12usize); 8179 self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize);
8392 } 8180 }
8393 #[doc = "External clock enable"] 8181 #[doc = "CPSM Waits for end of data transfer (CmdPend internal signal) from DPSM. This bit when set, the CPSM waits for the end of data transfer trigger before it starts sending a command. WAITPEND is only taken into account when DTMODE = MMC stream data transfer, WIDBUS = 1-bit wide bus mode, DPSMACT = 1 and DTDIR = from host to card."]
8394 pub const fn ece(&self) -> super::vals::Ece { 8182 pub const fn waitpend(&self) -> bool {
8183 let val = (self.0 >> 11usize) & 0x01;
8184 val != 0
8185 }
8186 #[doc = "CPSM Waits for end of data transfer (CmdPend internal signal) from DPSM. This bit when set, the CPSM waits for the end of data transfer trigger before it starts sending a command. WAITPEND is only taken into account when DTMODE = MMC stream data transfer, WIDBUS = 1-bit wide bus mode, DPSMACT = 1 and DTDIR = from host to card."]
8187 pub fn set_waitpend(&mut self, val: bool) {
8188 self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize);
8189 }
8190 #[doc = "Command path state machine (CPSM) Enable bit This bit is written 1 by firmware, and cleared by hardware when the CPSM enters the Idle state. If this bit is set, the CPSM is enabled. When DTEN = 1, no command will be transfered nor boot procedure will be started. CPSMEN is cleared to 0."]
8191 pub const fn cpsmen(&self) -> bool {
8192 let val = (self.0 >> 12usize) & 0x01;
8193 val != 0
8194 }
8195 #[doc = "Command path state machine (CPSM) Enable bit This bit is written 1 by firmware, and cleared by hardware when the CPSM enters the Idle state. If this bit is set, the CPSM is enabled. When DTEN = 1, no command will be transfered nor boot procedure will be started. CPSMEN is cleared to 0."]
8196 pub fn set_cpsmen(&mut self, val: bool) {
8197 self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize);
8198 }
8199 #[doc = "Hold new data block transmission and reception in the DPSM. If this bit is set, the DPSM will not move from the Wait_S state to the Send state or from the Wait_R state to the Receive state."]
8200 pub const fn dthold(&self) -> bool {
8201 let val = (self.0 >> 13usize) & 0x01;
8202 val != 0
8203 }
8204 #[doc = "Hold new data block transmission and reception in the DPSM. If this bit is set, the DPSM will not move from the Wait_S state to the Send state or from the Wait_R state to the Receive state."]
8205 pub fn set_dthold(&mut self, val: bool) {
8206 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize);
8207 }
8208 #[doc = "Select the boot mode procedure to be used. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0)"]
8209 pub const fn bootmode(&self) -> bool {
8395 let val = (self.0 >> 14usize) & 0x01; 8210 let val = (self.0 >> 14usize) & 0x01;
8396 super::vals::Ece(val as u8) 8211 val != 0
8397 } 8212 }
8398 #[doc = "External clock enable"] 8213 #[doc = "Select the boot mode procedure to be used. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0)"]
8399 pub fn set_ece(&mut self, val: super::vals::Ece) { 8214 pub fn set_bootmode(&mut self, val: bool) {
8400 self.0 = (self.0 & !(0x01 << 14usize)) | (((val.0 as u32) & 0x01) << 14usize); 8215 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize);
8401 } 8216 }
8402 #[doc = "External trigger polarity"] 8217 #[doc = "Enable boot mode procedure."]
8403 pub const fn etp(&self) -> super::vals::Etp { 8218 pub const fn booten(&self) -> bool {
8404 let val = (self.0 >> 15usize) & 0x01; 8219 let val = (self.0 >> 15usize) & 0x01;
8405 super::vals::Etp(val as u8) 8220 val != 0
8406 } 8221 }
8407 #[doc = "External trigger polarity"] 8222 #[doc = "Enable boot mode procedure."]
8408 pub fn set_etp(&mut self, val: super::vals::Etp) { 8223 pub fn set_booten(&mut self, val: bool) {
8409 self.0 = (self.0 & !(0x01 << 15usize)) | (((val.0 as u32) & 0x01) << 15usize); 8224 self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize);
8225 }
8226 #[doc = "The CPSM treats the command as a Suspend or Resume command and signals interrupt period start/end. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). CMDSUSPEND = 1 and CMDTRANS = 0 Suspend command, start interrupt period when response bit BS=0. CMDSUSPEND = 1 and CMDTRANS = 1 Resume command with data, end interrupt period when response bit DF=1."]
8227 pub const fn cmdsuspend(&self) -> bool {
8228 let val = (self.0 >> 16usize) & 0x01;
8229 val != 0
8230 }
8231 #[doc = "The CPSM treats the command as a Suspend or Resume command and signals interrupt period start/end. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). CMDSUSPEND = 1 and CMDTRANS = 0 Suspend command, start interrupt period when response bit BS=0. CMDSUSPEND = 1 and CMDTRANS = 1 Resume command with data, end interrupt period when response bit DF=1."]
8232 pub fn set_cmdsuspend(&mut self, val: bool) {
8233 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
8410 } 8234 }
8411 } 8235 }
8412 impl Default for Smcr { 8236 impl Default for Cmdr {
8413 fn default() -> Smcr { 8237 fn default() -> Cmdr {
8414 Smcr(0) 8238 Cmdr(0)
8415 } 8239 }
8416 } 8240 }
8417 #[doc = "DMA control register"] 8241 #[doc = "The SDMMC_STAR register is a read-only register. It contains two types of flag:Static flags (bits [29,21,11:0]): these bits remain asserted until they are cleared by writing to the SDMMC interrupt Clear register (see SDMMC_ICR)Dynamic flags (bits [20:12]): these bits change state depending on the state of the underlying logic (for example, FIFO full and empty flags are asserted and de-asserted as data while written to the FIFO)"]
8418 #[repr(transparent)] 8242 #[repr(transparent)]
8419 #[derive(Copy, Clone, Eq, PartialEq)] 8243 #[derive(Copy, Clone, Eq, PartialEq)]
8420 pub struct Dcr(pub u32); 8244 pub struct Star(pub u32);
8421 impl Dcr { 8245 impl Star {
8422 #[doc = "DMA base address"] 8246 #[doc = "Command response received (CRC check failed). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
8423 pub const fn dba(&self) -> u8 { 8247 pub const fn ccrcfail(&self) -> bool {
8424 let val = (self.0 >> 0usize) & 0x1f; 8248 let val = (self.0 >> 0usize) & 0x01;
8425 val as u8 8249 val != 0
8426 }
8427 #[doc = "DMA base address"]
8428 pub fn set_dba(&mut self, val: u8) {
8429 self.0 = (self.0 & !(0x1f << 0usize)) | (((val as u32) & 0x1f) << 0usize);
8430 } 8250 }
8431 #[doc = "DMA burst length"] 8251 #[doc = "Command response received (CRC check failed). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
8432 pub const fn dbl(&self) -> u8 { 8252 pub fn set_ccrcfail(&mut self, val: bool) {
8433 let val = (self.0 >> 8usize) & 0x1f; 8253 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
8434 val as u8
8435 } 8254 }
8436 #[doc = "DMA burst length"] 8255 #[doc = "Data block sent/received (CRC check failed). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
8437 pub fn set_dbl(&mut self, val: u8) { 8256 pub const fn dcrcfail(&self) -> bool {
8438 self.0 = (self.0 & !(0x1f << 8usize)) | (((val as u32) & 0x1f) << 8usize); 8257 let val = (self.0 >> 1usize) & 0x01;
8258 val != 0
8439 } 8259 }
8440 } 8260 #[doc = "Data block sent/received (CRC check failed). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
8441 impl Default for Dcr { 8261 pub fn set_dcrcfail(&mut self, val: bool) {
8442 fn default() -> Dcr { 8262 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
8443 Dcr(0)
8444 } 8263 }
8445 } 8264 #[doc = "Command response timeout. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR. The Command Timeout period has a fixed value of 64 SDMMC_CK clock periods."]
8446 #[doc = "capture/compare register 1"] 8265 pub const fn ctimeout(&self) -> bool {
8447 #[repr(transparent)] 8266 let val = (self.0 >> 2usize) & 0x01;
8448 #[derive(Copy, Clone, Eq, PartialEq)] 8267 val != 0
8449 pub struct Ccr32(pub u32);
8450 impl Ccr32 {
8451 #[doc = "Capture/Compare 1 value"]
8452 pub const fn ccr(&self) -> u32 {
8453 let val = (self.0 >> 0usize) & 0xffff_ffff;
8454 val as u32
8455 } 8268 }
8456 #[doc = "Capture/Compare 1 value"] 8269 #[doc = "Command response timeout. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR. The Command Timeout period has a fixed value of 64 SDMMC_CK clock periods."]
8457 pub fn set_ccr(&mut self, val: u32) { 8270 pub fn set_ctimeout(&mut self, val: bool) {
8458 self.0 = 8271 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
8459 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
8460 } 8272 }
8461 } 8273 #[doc = "Data timeout. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
8462 impl Default for Ccr32 { 8274 pub const fn dtimeout(&self) -> bool {
8463 fn default() -> Ccr32 { 8275 let val = (self.0 >> 3usize) & 0x01;
8464 Ccr32(0) 8276 val != 0
8465 } 8277 }
8466 } 8278 #[doc = "Data timeout. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
8467 #[doc = "auto-reload register"] 8279 pub fn set_dtimeout(&mut self, val: bool) {
8468 #[repr(transparent)] 8280 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
8469 #[derive(Copy, Clone, Eq, PartialEq)]
8470 pub struct Arr16(pub u32);
8471 impl Arr16 {
8472 #[doc = "Auto-reload value"]
8473 pub const fn arr(&self) -> u16 {
8474 let val = (self.0 >> 0usize) & 0xffff;
8475 val as u16
8476 } 8281 }
8477 #[doc = "Auto-reload value"] 8282 #[doc = "Transmit FIFO underrun error or IDMA read transfer error. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
8478 pub fn set_arr(&mut self, val: u16) { 8283 pub const fn txunderr(&self) -> bool {
8479 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); 8284 let val = (self.0 >> 4usize) & 0x01;
8285 val != 0
8480 } 8286 }
8481 } 8287 #[doc = "Transmit FIFO underrun error or IDMA read transfer error. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
8482 impl Default for Arr16 { 8288 pub fn set_txunderr(&mut self, val: bool) {
8483 fn default() -> Arr16 { 8289 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
8484 Arr16(0)
8485 } 8290 }
8486 } 8291 #[doc = "Received FIFO overrun error or IDMA write transfer error. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
8487 #[doc = "DMA address for full transfer"] 8292 pub const fn rxoverr(&self) -> bool {
8488 #[repr(transparent)] 8293 let val = (self.0 >> 5usize) & 0x01;
8489 #[derive(Copy, Clone, Eq, PartialEq)] 8294 val != 0
8490 pub struct Dmar(pub u32);
8491 impl Dmar {
8492 #[doc = "DMA register for burst accesses"]
8493 pub const fn dmab(&self) -> u16 {
8494 let val = (self.0 >> 0usize) & 0xffff;
8495 val as u16
8496 } 8295 }
8497 #[doc = "DMA register for burst accesses"] 8296 #[doc = "Received FIFO overrun error or IDMA write transfer error. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
8498 pub fn set_dmab(&mut self, val: u16) { 8297 pub fn set_rxoverr(&mut self, val: bool) {
8499 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); 8298 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
8500 } 8299 }
8501 } 8300 #[doc = "Command response received (CRC check passed, or no CRC). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
8502 impl Default for Dmar { 8301 pub const fn cmdrend(&self) -> bool {
8503 fn default() -> Dmar { 8302 let val = (self.0 >> 6usize) & 0x01;
8504 Dmar(0) 8303 val != 0
8505 } 8304 }
8506 } 8305 #[doc = "Command response received (CRC check passed, or no CRC). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
8507 #[doc = "counter"] 8306 pub fn set_cmdrend(&mut self, val: bool) {
8508 #[repr(transparent)] 8307 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
8509 #[derive(Copy, Clone, Eq, PartialEq)]
8510 pub struct Cnt32(pub u32);
8511 impl Cnt32 {
8512 #[doc = "counter value"]
8513 pub const fn cnt(&self) -> u32 {
8514 let val = (self.0 >> 0usize) & 0xffff_ffff;
8515 val as u32
8516 } 8308 }
8517 #[doc = "counter value"] 8309 #[doc = "Command sent (no response required). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
8518 pub fn set_cnt(&mut self, val: u32) { 8310 pub const fn cmdsent(&self) -> bool {
8519 self.0 = 8311 let val = (self.0 >> 7usize) & 0x01;
8520 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize); 8312 val != 0
8521 } 8313 }
8522 } 8314 #[doc = "Command sent (no response required). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
8523 impl Default for Cnt32 { 8315 pub fn set_cmdsent(&mut self, val: bool) {
8524 fn default() -> Cnt32 { 8316 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
8525 Cnt32(0)
8526 } 8317 }
8527 } 8318 #[doc = "Data transfer ended correctly. (data counter, DATACOUNT is zero and no errors occur). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
8528 #[doc = "break and dead-time register"] 8319 pub const fn dataend(&self) -> bool {
8529 #[repr(transparent)] 8320 let val = (self.0 >> 8usize) & 0x01;
8530 #[derive(Copy, Clone, Eq, PartialEq)] 8321 val != 0
8531 pub struct Bdtr(pub u32);
8532 impl Bdtr {
8533 #[doc = "Dead-time generator setup"]
8534 pub const fn dtg(&self) -> u8 {
8535 let val = (self.0 >> 0usize) & 0xff;
8536 val as u8
8537 } 8322 }
8538 #[doc = "Dead-time generator setup"] 8323 #[doc = "Data transfer ended correctly. (data counter, DATACOUNT is zero and no errors occur). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
8539 pub fn set_dtg(&mut self, val: u8) { 8324 pub fn set_dataend(&mut self, val: bool) {
8540 self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); 8325 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
8541 } 8326 }
8542 #[doc = "Lock configuration"] 8327 #[doc = "Data transfer Hold. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
8543 pub const fn lock(&self) -> u8 { 8328 pub const fn dhold(&self) -> bool {
8544 let val = (self.0 >> 8usize) & 0x03; 8329 let val = (self.0 >> 9usize) & 0x01;
8545 val as u8 8330 val != 0
8546 } 8331 }
8547 #[doc = "Lock configuration"] 8332 #[doc = "Data transfer Hold. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
8548 pub fn set_lock(&mut self, val: u8) { 8333 pub fn set_dhold(&mut self, val: bool) {
8549 self.0 = (self.0 & !(0x03 << 8usize)) | (((val as u32) & 0x03) << 8usize); 8334 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
8550 } 8335 }
8551 #[doc = "Off-state selection for Idle mode"] 8336 #[doc = "Data block sent/received. (CRC check passed) and DPSM moves to the READWAIT state. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
8552 pub const fn ossi(&self) -> super::vals::Ossi { 8337 pub const fn dbckend(&self) -> bool {
8553 let val = (self.0 >> 10usize) & 0x01; 8338 let val = (self.0 >> 10usize) & 0x01;
8554 super::vals::Ossi(val as u8) 8339 val != 0
8555 } 8340 }
8556 #[doc = "Off-state selection for Idle mode"] 8341 #[doc = "Data block sent/received. (CRC check passed) and DPSM moves to the READWAIT state. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
8557 pub fn set_ossi(&mut self, val: super::vals::Ossi) { 8342 pub fn set_dbckend(&mut self, val: bool) {
8558 self.0 = (self.0 & !(0x01 << 10usize)) | (((val.0 as u32) & 0x01) << 10usize); 8343 self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize);
8559 } 8344 }
8560 #[doc = "Off-state selection for Run mode"] 8345 #[doc = "Data transfer aborted by CMD12. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
8561 pub const fn ossr(&self) -> super::vals::Ossr { 8346 pub const fn dabort(&self) -> bool {
8562 let val = (self.0 >> 11usize) & 0x01; 8347 let val = (self.0 >> 11usize) & 0x01;
8563 super::vals::Ossr(val as u8) 8348 val != 0
8564 } 8349 }
8565 #[doc = "Off-state selection for Run mode"] 8350 #[doc = "Data transfer aborted by CMD12. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
8566 pub fn set_ossr(&mut self, val: super::vals::Ossr) { 8351 pub fn set_dabort(&mut self, val: bool) {
8567 self.0 = (self.0 & !(0x01 << 11usize)) | (((val.0 as u32) & 0x01) << 11usize); 8352 self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize);
8568 } 8353 }
8569 #[doc = "Break enable"] 8354 #[doc = "Data path state machine active, i.e. not in Idle state. This is a hardware status flag only, does not generate an interrupt."]
8570 pub const fn bke(&self) -> bool { 8355 pub const fn dpsmact(&self) -> bool {
8571 let val = (self.0 >> 12usize) & 0x01; 8356 let val = (self.0 >> 12usize) & 0x01;
8572 val != 0 8357 val != 0
8573 } 8358 }
8574 #[doc = "Break enable"] 8359 #[doc = "Data path state machine active, i.e. not in Idle state. This is a hardware status flag only, does not generate an interrupt."]
8575 pub fn set_bke(&mut self, val: bool) { 8360 pub fn set_dpsmact(&mut self, val: bool) {
8576 self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); 8361 self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize);
8577 } 8362 }
8578 #[doc = "Break polarity"] 8363 #[doc = "Command path state machine active, i.e. not in Idle state. This is a hardware status flag only, does not generate an interrupt."]
8579 pub const fn bkp(&self) -> bool { 8364 pub const fn cpsmact(&self) -> bool {
8580 let val = (self.0 >> 13usize) & 0x01; 8365 let val = (self.0 >> 13usize) & 0x01;
8581 val != 0 8366 val != 0
8582 } 8367 }
8583 #[doc = "Break polarity"] 8368 #[doc = "Command path state machine active, i.e. not in Idle state. This is a hardware status flag only, does not generate an interrupt."]
8584 pub fn set_bkp(&mut self, val: bool) { 8369 pub fn set_cpsmact(&mut self, val: bool) {
8585 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); 8370 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize);
8586 } 8371 }
8587 #[doc = "Automatic output enable"] 8372 #[doc = "Transmit FIFO half empty At least half the number of words can be written into the FIFO. This bit is cleared when the FIFO becomes half+1 full."]
8588 pub const fn aoe(&self) -> bool { 8373 pub const fn txfifohe(&self) -> bool {
8589 let val = (self.0 >> 14usize) & 0x01; 8374 let val = (self.0 >> 14usize) & 0x01;
8590 val != 0 8375 val != 0
8591 } 8376 }
8592 #[doc = "Automatic output enable"] 8377 #[doc = "Transmit FIFO half empty At least half the number of words can be written into the FIFO. This bit is cleared when the FIFO becomes half+1 full."]
8593 pub fn set_aoe(&mut self, val: bool) { 8378 pub fn set_txfifohe(&mut self, val: bool) {
8594 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); 8379 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize);
8595 } 8380 }
8596 #[doc = "Main output enable"] 8381 #[doc = "Receive FIFO half full There are at least half the number of words in the FIFO. This bit is cleared when the FIFO becomes half+1 empty."]
8597 pub const fn moe(&self) -> bool { 8382 pub const fn rxfifohf(&self) -> bool {
8598 let val = (self.0 >> 15usize) & 0x01; 8383 let val = (self.0 >> 15usize) & 0x01;
8599 val != 0 8384 val != 0
8600 } 8385 }
8601 #[doc = "Main output enable"] 8386 #[doc = "Receive FIFO half full There are at least half the number of words in the FIFO. This bit is cleared when the FIFO becomes half+1 empty."]
8602 pub fn set_moe(&mut self, val: bool) { 8387 pub fn set_rxfifohf(&mut self, val: bool) {
8603 self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); 8388 self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize);
8604 } 8389 }
8605 } 8390 #[doc = "Transmit FIFO full This is a hardware status flag only, does not generate an interrupt. This bit is cleared when one FIFO location becomes empty."]
8606 impl Default for Bdtr { 8391 pub const fn txfifof(&self) -> bool {
8607 fn default() -> Bdtr { 8392 let val = (self.0 >> 16usize) & 0x01;
8608 Bdtr(0) 8393 val != 0
8609 } 8394 }
8610 } 8395 #[doc = "Transmit FIFO full This is a hardware status flag only, does not generate an interrupt. This bit is cleared when one FIFO location becomes empty."]
8611 #[doc = "status register"] 8396 pub fn set_txfifof(&mut self, val: bool) {
8612 #[repr(transparent)] 8397 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
8613 #[derive(Copy, Clone, Eq, PartialEq)] 8398 }
8614 pub struct SrAdv(pub u32); 8399 #[doc = "Receive FIFO full This bit is cleared when one FIFO location becomes empty."]
8615 impl SrAdv { 8400 pub const fn rxfifof(&self) -> bool {
8616 #[doc = "Update interrupt flag"] 8401 let val = (self.0 >> 17usize) & 0x01;
8617 pub const fn uif(&self) -> bool {
8618 let val = (self.0 >> 0usize) & 0x01;
8619 val != 0 8402 val != 0
8620 } 8403 }
8621 #[doc = "Update interrupt flag"] 8404 #[doc = "Receive FIFO full This bit is cleared when one FIFO location becomes empty."]
8622 pub fn set_uif(&mut self, val: bool) { 8405 pub fn set_rxfifof(&mut self, val: bool) {
8623 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 8406 self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize);
8624 } 8407 }
8625 #[doc = "Capture/compare 1 interrupt flag"] 8408 #[doc = "Transmit FIFO empty This bit is cleared when one FIFO location becomes full."]
8626 pub fn ccif(&self, n: usize) -> bool { 8409 pub const fn txfifoe(&self) -> bool {
8627 assert!(n < 4usize); 8410 let val = (self.0 >> 18usize) & 0x01;
8628 let offs = 1usize + n * 1usize;
8629 let val = (self.0 >> offs) & 0x01;
8630 val != 0 8411 val != 0
8631 } 8412 }
8632 #[doc = "Capture/compare 1 interrupt flag"] 8413 #[doc = "Transmit FIFO empty This bit is cleared when one FIFO location becomes full."]
8633 pub fn set_ccif(&mut self, n: usize, val: bool) { 8414 pub fn set_txfifoe(&mut self, val: bool) {
8634 assert!(n < 4usize); 8415 self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize);
8635 let offs = 1usize + n * 1usize;
8636 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
8637 } 8416 }
8638 #[doc = "COM interrupt flag"] 8417 #[doc = "Receive FIFO empty This is a hardware status flag only, does not generate an interrupt. This bit is cleared when one FIFO location becomes full."]
8639 pub const fn comif(&self) -> bool { 8418 pub const fn rxfifoe(&self) -> bool {
8640 let val = (self.0 >> 5usize) & 0x01; 8419 let val = (self.0 >> 19usize) & 0x01;
8641 val != 0 8420 val != 0
8642 } 8421 }
8643 #[doc = "COM interrupt flag"] 8422 #[doc = "Receive FIFO empty This is a hardware status flag only, does not generate an interrupt. This bit is cleared when one FIFO location becomes full."]
8644 pub fn set_comif(&mut self, val: bool) { 8423 pub fn set_rxfifoe(&mut self, val: bool) {
8645 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); 8424 self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize);
8646 } 8425 }
8647 #[doc = "Trigger interrupt flag"] 8426 #[doc = "Inverted value of SDMMC_D0 line (Busy), sampled at the end of a CMD response and a second time 2 SDMMC_CK cycles after the CMD response. This bit is reset to not busy when the SDMMCD0 line changes from busy to not busy. This bit does not signal busy due to data transfer. This is a hardware status flag only, it does not generate an interrupt."]
8648 pub const fn tif(&self) -> bool { 8427 pub const fn busyd0(&self) -> bool {
8649 let val = (self.0 >> 6usize) & 0x01; 8428 let val = (self.0 >> 20usize) & 0x01;
8650 val != 0 8429 val != 0
8651 } 8430 }
8652 #[doc = "Trigger interrupt flag"] 8431 #[doc = "Inverted value of SDMMC_D0 line (Busy), sampled at the end of a CMD response and a second time 2 SDMMC_CK cycles after the CMD response. This bit is reset to not busy when the SDMMCD0 line changes from busy to not busy. This bit does not signal busy due to data transfer. This is a hardware status flag only, it does not generate an interrupt."]
8653 pub fn set_tif(&mut self, val: bool) { 8432 pub fn set_busyd0(&mut self, val: bool) {
8654 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); 8433 self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize);
8655 } 8434 }
8656 #[doc = "Break interrupt flag"] 8435 #[doc = "end of SDMMC_D0 Busy following a CMD response detected. This indicates only end of busy following a CMD response. This bit does not signal busy due to data transfer. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
8657 pub const fn bif(&self) -> bool { 8436 pub const fn busyd0end(&self) -> bool {
8658 let val = (self.0 >> 7usize) & 0x01; 8437 let val = (self.0 >> 21usize) & 0x01;
8659 val != 0 8438 val != 0
8660 } 8439 }
8661 #[doc = "Break interrupt flag"] 8440 #[doc = "end of SDMMC_D0 Busy following a CMD response detected. This indicates only end of busy following a CMD response. This bit does not signal busy due to data transfer. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
8662 pub fn set_bif(&mut self, val: bool) { 8441 pub fn set_busyd0end(&mut self, val: bool) {
8663 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); 8442 self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize);
8664 } 8443 }
8665 #[doc = "Capture/Compare 1 overcapture flag"] 8444 #[doc = "SDIO interrupt received. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
8666 pub fn ccof(&self, n: usize) -> bool { 8445 pub const fn sdioit(&self) -> bool {
8667 assert!(n < 4usize); 8446 let val = (self.0 >> 22usize) & 0x01;
8668 let offs = 9usize + n * 1usize;
8669 let val = (self.0 >> offs) & 0x01;
8670 val != 0 8447 val != 0
8671 } 8448 }
8672 #[doc = "Capture/Compare 1 overcapture flag"] 8449 #[doc = "SDIO interrupt received. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
8673 pub fn set_ccof(&mut self, n: usize, val: bool) { 8450 pub fn set_sdioit(&mut self, val: bool) {
8674 assert!(n < 4usize); 8451 self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize);
8675 let offs = 9usize + n * 1usize;
8676 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
8677 } 8452 }
8678 } 8453 #[doc = "Boot acknowledgment received (boot acknowledgment check fail). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
8679 impl Default for SrAdv { 8454 pub const fn ackfail(&self) -> bool {
8680 fn default() -> SrAdv { 8455 let val = (self.0 >> 23usize) & 0x01;
8681 SrAdv(0) 8456 val != 0
8682 } 8457 }
8683 } 8458 #[doc = "Boot acknowledgment received (boot acknowledgment check fail). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
8684 #[doc = "repetition counter register"] 8459 pub fn set_ackfail(&mut self, val: bool) {
8685 #[repr(transparent)] 8460 self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize);
8686 #[derive(Copy, Clone, Eq, PartialEq)]
8687 pub struct Rcr(pub u32);
8688 impl Rcr {
8689 #[doc = "Repetition counter value"]
8690 pub const fn rep(&self) -> u8 {
8691 let val = (self.0 >> 0usize) & 0xff;
8692 val as u8
8693 } 8461 }
8694 #[doc = "Repetition counter value"] 8462 #[doc = "Boot acknowledgment timeout. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
8695 pub fn set_rep(&mut self, val: u8) { 8463 pub const fn acktimeout(&self) -> bool {
8696 self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); 8464 let val = (self.0 >> 24usize) & 0x01;
8465 val != 0
8697 } 8466 }
8698 } 8467 #[doc = "Boot acknowledgment timeout. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
8699 impl Default for Rcr { 8468 pub fn set_acktimeout(&mut self, val: bool) {
8700 fn default() -> Rcr { 8469 self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize);
8701 Rcr(0)
8702 } 8470 }
8703 } 8471 #[doc = "Voltage switch critical timing section completion. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
8704 #[doc = "control register 1"] 8472 pub const fn vswend(&self) -> bool {
8705 #[repr(transparent)] 8473 let val = (self.0 >> 25usize) & 0x01;
8706 #[derive(Copy, Clone, Eq, PartialEq)]
8707 pub struct Cr1Basic(pub u32);
8708 impl Cr1Basic {
8709 #[doc = "Counter enable"]
8710 pub const fn cen(&self) -> bool {
8711 let val = (self.0 >> 0usize) & 0x01;
8712 val != 0 8474 val != 0
8713 } 8475 }
8714 #[doc = "Counter enable"] 8476 #[doc = "Voltage switch critical timing section completion. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
8715 pub fn set_cen(&mut self, val: bool) { 8477 pub fn set_vswend(&mut self, val: bool) {
8716 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 8478 self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize);
8717 } 8479 }
8718 #[doc = "Update disable"] 8480 #[doc = "SDMMC_CK stopped in Voltage switch procedure. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
8719 pub const fn udis(&self) -> bool { 8481 pub const fn ckstop(&self) -> bool {
8720 let val = (self.0 >> 1usize) & 0x01; 8482 let val = (self.0 >> 26usize) & 0x01;
8721 val != 0 8483 val != 0
8722 } 8484 }
8723 #[doc = "Update disable"] 8485 #[doc = "SDMMC_CK stopped in Voltage switch procedure. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
8724 pub fn set_udis(&mut self, val: bool) { 8486 pub fn set_ckstop(&mut self, val: bool) {
8725 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); 8487 self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize);
8726 } 8488 }
8727 #[doc = "Update request source"] 8489 #[doc = "IDMA transfer error. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
8728 pub const fn urs(&self) -> super::vals::Urs { 8490 pub const fn idmate(&self) -> bool {
8729 let val = (self.0 >> 2usize) & 0x01; 8491 let val = (self.0 >> 27usize) & 0x01;
8730 super::vals::Urs(val as u8) 8492 val != 0
8731 } 8493 }
8732 #[doc = "Update request source"] 8494 #[doc = "IDMA transfer error. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
8733 pub fn set_urs(&mut self, val: super::vals::Urs) { 8495 pub fn set_idmate(&mut self, val: bool) {
8734 self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize); 8496 self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize);
8735 } 8497 }
8736 #[doc = "One-pulse mode"] 8498 #[doc = "IDMA buffer transfer complete. interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
8737 pub const fn opm(&self) -> super::vals::Opm { 8499 pub const fn idmabtc(&self) -> bool {
8738 let val = (self.0 >> 3usize) & 0x01; 8500 let val = (self.0 >> 28usize) & 0x01;
8739 super::vals::Opm(val as u8) 8501 val != 0
8740 } 8502 }
8741 #[doc = "One-pulse mode"] 8503 #[doc = "IDMA buffer transfer complete. interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
8742 pub fn set_opm(&mut self, val: super::vals::Opm) { 8504 pub fn set_idmabtc(&mut self, val: bool) {
8743 self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize); 8505 self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize);
8744 } 8506 }
8745 #[doc = "Auto-reload preload enable"] 8507 }
8746 pub const fn arpe(&self) -> super::vals::Arpe { 8508 impl Default for Star {
8747 let val = (self.0 >> 7usize) & 0x01; 8509 fn default() -> Star {
8748 super::vals::Arpe(val as u8) 8510 Star(0)
8749 } 8511 }
8750 #[doc = "Auto-reload preload enable"] 8512 }
8751 pub fn set_arpe(&mut self, val: super::vals::Arpe) { 8513 #[doc = "The receive and transmit FIFOs can be only read or written as word (32-bit) wide registers. The FIFOs contain 16 entries on sequential addresses. This allows the CPU to use its load and store multiple operands to read from/write to the FIFO.When accessing SDMMC_FIFOR with half word or byte access an AHB bus fault is generated."]
8752 self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize); 8514 #[repr(transparent)]
8515 #[derive(Copy, Clone, Eq, PartialEq)]
8516 pub struct Fifor(pub u32);
8517 impl Fifor {
8518 #[doc = "Receive and transmit FIFO data This register can only be read or written by firmware when the DPSM is active (DPSMACT=1). The FIFO data occupies 16 entries of 32-bit words."]
8519 pub const fn fifodata(&self) -> u32 {
8520 let val = (self.0 >> 0usize) & 0xffff_ffff;
8521 val as u32
8522 }
8523 #[doc = "Receive and transmit FIFO data This register can only be read or written by firmware when the DPSM is active (DPSMACT=1). The FIFO data occupies 16 entries of 32-bit words."]
8524 pub fn set_fifodata(&mut self, val: u32) {
8525 self.0 =
8526 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
8753 } 8527 }
8754 } 8528 }
8755 impl Default for Cr1Basic { 8529 impl Default for Fifor {
8756 fn default() -> Cr1Basic { 8530 fn default() -> Fifor {
8757 Cr1Basic(0) 8531 Fifor(0)
8758 } 8532 }
8759 } 8533 }
8760 #[doc = "status register"] 8534 #[doc = "SDMMC command response register"]
8761 #[repr(transparent)] 8535 #[repr(transparent)]
8762 #[derive(Copy, Clone, Eq, PartialEq)] 8536 #[derive(Copy, Clone, Eq, PartialEq)]
8763 pub struct SrBasic(pub u32); 8537 pub struct Respcmdr(pub u32);
8764 impl SrBasic { 8538 impl Respcmdr {
8765 #[doc = "Update interrupt flag"] 8539 #[doc = "Response command index"]
8766 pub const fn uif(&self) -> bool { 8540 pub const fn respcmd(&self) -> u8 {
8767 let val = (self.0 >> 0usize) & 0x01; 8541 let val = (self.0 >> 0usize) & 0x3f;
8768 val != 0 8542 val as u8
8769 } 8543 }
8770 #[doc = "Update interrupt flag"] 8544 #[doc = "Response command index"]
8771 pub fn set_uif(&mut self, val: bool) { 8545 pub fn set_respcmd(&mut self, val: u8) {
8772 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 8546 self.0 = (self.0 & !(0x3f << 0usize)) | (((val as u32) & 0x3f) << 0usize);
8773 } 8547 }
8774 } 8548 }
8775 impl Default for SrBasic { 8549 impl Default for Respcmdr {
8776 fn default() -> SrBasic { 8550 fn default() -> Respcmdr {
8777 SrBasic(0) 8551 Respcmdr(0)
8552 }
8553 }
8554 #[doc = "The SDMMC_IDMABASE0R register contains the memory buffer base address in single buffer configuration and the buffer 0 base address in double buffer configuration."]
8555 #[repr(transparent)]
8556 #[derive(Copy, Clone, Eq, PartialEq)]
8557 pub struct Idmabase0r(pub u32);
8558 impl Idmabase0r {
8559 #[doc = "Buffer 0 memory base address bits [31:2], shall be word aligned (bit [1:0]
8560are always 0 and read only). This register can be written by firmware when DPSM is inactive (DPSMACT = 0), and can dynamically be written by firmware when DPSM active (DPSMACT = 1) and memory buffer 0 is inactive (IDMABACT = 1)."]
8561 pub const fn idmabase0(&self) -> u32 {
8562 let val = (self.0 >> 0usize) & 0xffff_ffff;
8563 val as u32
8564 }
8565 #[doc = "Buffer 0 memory base address bits [31:2], shall be word aligned (bit [1:0]
8566are always 0 and read only). This register can be written by firmware when DPSM is inactive (DPSMACT = 0), and can dynamically be written by firmware when DPSM active (DPSMACT = 1) and memory buffer 0 is inactive (IDMABACT = 1)."]
8567 pub fn set_idmabase0(&mut self, val: u32) {
8568 self.0 =
8569 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
8570 }
8571 }
8572 impl Default for Idmabase0r {
8573 fn default() -> Idmabase0r {
8574 Idmabase0r(0)
8778 } 8575 }
8779 } 8576 }
8780 } 8577 }
8578}
8579pub mod gpio_v1 {
8580 use crate::generic::*;
8581 #[doc = "General purpose I/O"]
8582 #[derive(Copy, Clone)]
8583 pub struct Gpio(pub *mut u8);
8584 unsafe impl Send for Gpio {}
8585 unsafe impl Sync for Gpio {}
8586 impl Gpio {
8587 #[doc = "Port configuration register low (GPIOn_CRL)"]
8588 pub fn cr(self, n: usize) -> Reg<regs::Cr, RW> {
8589 assert!(n < 2usize);
8590 unsafe { Reg::from_ptr(self.0.add(0usize + n * 4usize)) }
8591 }
8592 #[doc = "Port input data register (GPIOn_IDR)"]
8593 pub fn idr(self) -> Reg<regs::Idr, R> {
8594 unsafe { Reg::from_ptr(self.0.add(8usize)) }
8595 }
8596 #[doc = "Port output data register (GPIOn_ODR)"]
8597 pub fn odr(self) -> Reg<regs::Odr, RW> {
8598 unsafe { Reg::from_ptr(self.0.add(12usize)) }
8599 }
8600 #[doc = "Port bit set/reset register (GPIOn_BSRR)"]
8601 pub fn bsrr(self) -> Reg<regs::Bsrr, W> {
8602 unsafe { Reg::from_ptr(self.0.add(16usize)) }
8603 }
8604 #[doc = "Port bit reset register (GPIOn_BRR)"]
8605 pub fn brr(self) -> Reg<regs::Brr, W> {
8606 unsafe { Reg::from_ptr(self.0.add(20usize)) }
8607 }
8608 #[doc = "Port configuration lock register"]
8609 pub fn lckr(self) -> Reg<regs::Lckr, RW> {
8610 unsafe { Reg::from_ptr(self.0.add(24usize)) }
8611 }
8612 }
8781 pub mod vals { 8613 pub mod vals {
8782 use crate::generic::*; 8614 use crate::generic::*;
8783 #[repr(transparent)] 8615 #[repr(transparent)]
8784 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 8616 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
8785 pub struct Cms(pub u8); 8617 pub struct Cnf(pub u8);
8786 impl Cms { 8618 impl Cnf {
8787 #[doc = "The counter counts up or down depending on the direction bit"] 8619 #[doc = "Analog mode / Push-Pull mode"]
8788 pub const EDGEALIGNED: Self = Self(0); 8620 pub const PUSHPULL: Self = Self(0);
8789 #[doc = "The counter counts up and down alternatively. Output compare interrupt flags are set only when the counter is counting down."] 8621 #[doc = "Floating input (reset state) / Open Drain-Mode"]
8790 pub const CENTERALIGNED1: Self = Self(0x01); 8622 pub const OPENDRAIN: Self = Self(0x01);
8791 #[doc = "The counter counts up and down alternatively. Output compare interrupt flags are set only when the counter is counting up."] 8623 #[doc = "Input with pull-up/pull-down / Alternate Function Push-Pull Mode"]
8792 pub const CENTERALIGNED2: Self = Self(0x02); 8624 pub const ALTPUSHPULL: Self = Self(0x02);
8793 #[doc = "The counter counts up and down alternatively. Output compare interrupt flags are set both when the counter is counting up or down."] 8625 #[doc = "Alternate Function Open-Drain Mode"]
8794 pub const CENTERALIGNED3: Self = Self(0x03); 8626 pub const ALTOPENDRAIN: Self = Self(0x03);
8795 } 8627 }
8796 #[repr(transparent)] 8628 #[repr(transparent)]
8797 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 8629 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
8798 pub struct Tis(pub u8); 8630 pub struct Mode(pub u8);
8799 impl Tis { 8631 impl Mode {
8800 #[doc = "The TIMx_CH1 pin is connected to TI1 input"] 8632 #[doc = "Input mode (reset state)"]
8801 pub const NORMAL: Self = Self(0); 8633 pub const INPUT: Self = Self(0);
8802 #[doc = "The TIMx_CH1, CH2, CH3 pins are connected to TI1 input"] 8634 #[doc = "Output mode 10 MHz"]
8803 pub const XOR: Self = Self(0x01); 8635 pub const OUTPUT: Self = Self(0x01);
8636 #[doc = "Output mode 2 MHz"]
8637 pub const OUTPUT2: Self = Self(0x02);
8638 #[doc = "Output mode 50 MHz"]
8639 pub const OUTPUT50: Self = Self(0x03);
8804 } 8640 }
8805 #[repr(transparent)] 8641 #[repr(transparent)]
8806 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 8642 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
8807 pub struct Msm(pub u8); 8643 pub struct Lckk(pub u8);
8808 impl Msm { 8644 impl Lckk {
8809 #[doc = "No action"] 8645 #[doc = "Port configuration lock key not active"]
8810 pub const NOSYNC: Self = Self(0); 8646 pub const NOTACTIVE: Self = Self(0);
8811 #[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."] 8647 #[doc = "Port configuration lock key active"]
8812 pub const SYNC: Self = Self(0x01); 8648 pub const ACTIVE: Self = Self(0x01);
8813 } 8649 }
8814 #[repr(transparent)] 8650 #[repr(transparent)]
8815 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 8651 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
8816 pub struct Mms(pub u8); 8652 pub struct Lck(pub u8);
8817 impl Mms { 8653 impl Lck {
8818 #[doc = "The UG bit from the TIMx_EGR register is used as trigger output"] 8654 #[doc = "Port configuration not locked"]
8819 pub const RESET: Self = Self(0); 8655 pub const UNLOCKED: Self = Self(0);
8820 #[doc = "The counter enable signal, CNT_EN, is used as trigger output"] 8656 #[doc = "Port configuration locked"]
8821 pub const ENABLE: Self = Self(0x01); 8657 pub const LOCKED: Self = Self(0x01);
8822 #[doc = "The update event is selected as trigger output"]
8823 pub const UPDATE: Self = Self(0x02);
8824 #[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"]
8825 pub const COMPAREPULSE: Self = Self(0x03);
8826 #[doc = "OC1REF signal is used as trigger output"]
8827 pub const COMPAREOC1: Self = Self(0x04);
8828 #[doc = "OC2REF signal is used as trigger output"]
8829 pub const COMPAREOC2: Self = Self(0x05);
8830 #[doc = "OC3REF signal is used as trigger output"]
8831 pub const COMPAREOC3: Self = Self(0x06);
8832 #[doc = "OC4REF signal is used as trigger output"]
8833 pub const COMPAREOC4: Self = Self(0x07);
8834 } 8658 }
8835 #[repr(transparent)] 8659 #[repr(transparent)]
8836 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 8660 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
8837 pub struct Dir(pub u8); 8661 pub struct Idr(pub u8);
8838 impl Dir { 8662 impl Idr {
8839 #[doc = "Counter used as upcounter"] 8663 #[doc = "Input is logic low"]
8840 pub const UP: Self = Self(0); 8664 pub const LOW: Self = Self(0);
8841 #[doc = "Counter used as downcounter"] 8665 #[doc = "Input is logic high"]
8842 pub const DOWN: Self = Self(0x01); 8666 pub const HIGH: Self = Self(0x01);
8843 } 8667 }
8844 #[repr(transparent)] 8668 #[repr(transparent)]
8845 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 8669 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
8846 pub struct Arpe(pub u8); 8670 pub struct Bsw(pub u8);
8847 impl Arpe { 8671 impl Bsw {
8848 #[doc = "TIMx_APRR register is not buffered"] 8672 #[doc = "No action on the corresponding ODx bit"]
8849 pub const DISABLED: Self = Self(0); 8673 pub const NOACTION: Self = Self(0);
8850 #[doc = "TIMx_APRR register is buffered"] 8674 #[doc = "Sets the corresponding ODRx bit"]
8851 pub const ENABLED: Self = Self(0x01); 8675 pub const SET: Self = Self(0x01);
8852 } 8676 }
8853 #[repr(transparent)] 8677 #[repr(transparent)]
8854 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 8678 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
8855 pub struct Sms(pub u8); 8679 pub struct Brw(pub u8);
8856 impl Sms { 8680 impl Brw {
8857 #[doc = "Slave mode disabled - if CEN = ‘1 then the prescaler is clocked directly by the internal clock."] 8681 #[doc = "No action on the corresponding ODx bit"]
8858 pub const DISABLED: Self = Self(0); 8682 pub const NOACTION: Self = Self(0);
8859 #[doc = "Encoder mode 1 - Counter counts up/down on TI2FP1 edge depending on TI1FP2 level."] 8683 #[doc = "Reset the ODx bit"]
8860 pub const ENCODER_MODE_1: Self = Self(0x01); 8684 pub const RESET: Self = Self(0x01);
8861 #[doc = "Encoder mode 2 - Counter counts up/down on TI1FP2 edge depending on TI2FP1 level."]
8862 pub const ENCODER_MODE_2: Self = Self(0x02);
8863 #[doc = "Encoder mode 3 - Counter counts up/down on both TI1FP1 and TI2FP2 edges depending on the level of the other input."]
8864 pub const ENCODER_MODE_3: Self = Self(0x03);
8865 #[doc = "Reset Mode - Rising edge of the selected trigger input (TRGI) reinitializes the counter and generates an update of the registers."]
8866 pub const RESET_MODE: Self = Self(0x04);
8867 #[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."]
8868 pub const GATED_MODE: Self = Self(0x05);
8869 #[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."]
8870 pub const TRIGGER_MODE: Self = Self(0x06);
8871 #[doc = "External Clock Mode 1 - Rising edges of the selected trigger (TRGI) clock the counter."]
8872 pub const EXT_CLOCK_MODE: Self = Self(0x07);
8873 } 8685 }
8874 #[repr(transparent)] 8686 #[repr(transparent)]
8875 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 8687 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
8876 pub struct Ocm(pub u8); 8688 pub struct Odr(pub u8);
8877 impl Ocm { 8689 impl Odr {
8878 #[doc = "The comparison between the output compare register TIMx_CCRy and the counter TIMx_CNT has no effect on the outputs"] 8690 #[doc = "Set output to logic low"]
8879 pub const FROZEN: Self = Self(0); 8691 pub const LOW: Self = Self(0);
8880 #[doc = "Set channel to active level on match. OCyREF signal is forced high when the counter matches the capture/compare register"] 8692 #[doc = "Set output to logic high"]
8881 pub const ACTIVEONMATCH: Self = Self(0x01); 8693 pub const HIGH: Self = Self(0x01);
8882 #[doc = "Set channel to inactive level on match. OCyREF signal is forced low when the counter matches the capture/compare register"]
8883 pub const INACTIVEONMATCH: Self = Self(0x02);
8884 #[doc = "OCyREF toggles when TIMx_CNT=TIMx_CCRy"]
8885 pub const TOGGLE: Self = Self(0x03);
8886 #[doc = "OCyREF is forced low"]
8887 pub const FORCEINACTIVE: Self = Self(0x04);
8888 #[doc = "OCyREF is forced high"]
8889 pub const FORCEACTIVE: Self = Self(0x05);
8890 #[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"]
8891 pub const PWMMODE1: Self = Self(0x06);
8892 #[doc = "Inversely to PwmMode1"]
8893 pub const PWMMODE2: Self = Self(0x07);
8894 } 8694 }
8695 }
8696 pub mod regs {
8697 use crate::generic::*;
8698 #[doc = "Port bit set/reset register (GPIOn_BSRR)"]
8895 #[repr(transparent)] 8699 #[repr(transparent)]
8896 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 8700 #[derive(Copy, Clone, Eq, PartialEq)]
8897 pub struct Ocpe(pub u8); 8701 pub struct Bsrr(pub u32);
8898 impl Ocpe { 8702 impl Bsrr {
8899 #[doc = "Preload register on CCR2 disabled. New values written to CCR2 are taken into account immediately"] 8703 #[doc = "Set bit"]
8900 pub const DISABLED: Self = Self(0); 8704 pub fn bs(&self, n: usize) -> bool {
8901 #[doc = "Preload register on CCR2 enabled. Preload value is loaded into active register on each update event"] 8705 assert!(n < 16usize);
8902 pub const ENABLED: Self = Self(0x01); 8706 let offs = 0usize + n * 1usize;
8707 let val = (self.0 >> offs) & 0x01;
8708 val != 0
8709 }
8710 #[doc = "Set bit"]
8711 pub fn set_bs(&mut self, n: usize, val: bool) {
8712 assert!(n < 16usize);
8713 let offs = 0usize + n * 1usize;
8714 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
8715 }
8716 #[doc = "Reset bit"]
8717 pub fn br(&self, n: usize) -> bool {
8718 assert!(n < 16usize);
8719 let offs = 16usize + n * 1usize;
8720 let val = (self.0 >> offs) & 0x01;
8721 val != 0
8722 }
8723 #[doc = "Reset bit"]
8724 pub fn set_br(&mut self, n: usize, val: bool) {
8725 assert!(n < 16usize);
8726 let offs = 16usize + n * 1usize;
8727 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
8728 }
8729 }
8730 impl Default for Bsrr {
8731 fn default() -> Bsrr {
8732 Bsrr(0)
8733 }
8903 } 8734 }
8735 #[doc = "Port configuration register (GPIOn_CRx)"]
8904 #[repr(transparent)] 8736 #[repr(transparent)]
8905 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 8737 #[derive(Copy, Clone, Eq, PartialEq)]
8906 pub struct Ckd(pub u8); 8738 pub struct Cr(pub u32);
8907 impl Ckd { 8739 impl Cr {
8908 #[doc = "t_DTS = t_CK_INT"] 8740 #[doc = "Port n mode bits"]
8909 pub const DIV1: Self = Self(0); 8741 pub fn mode(&self, n: usize) -> super::vals::Mode {
8910 #[doc = "t_DTS = 2 × t_CK_INT"] 8742 assert!(n < 8usize);
8911 pub const DIV2: Self = Self(0x01); 8743 let offs = 0usize + n * 4usize;
8912 #[doc = "t_DTS = 4 × t_CK_INT"] 8744 let val = (self.0 >> offs) & 0x03;
8913 pub const DIV4: Self = Self(0x02); 8745 super::vals::Mode(val as u8)
8746 }
8747 #[doc = "Port n mode bits"]
8748 pub fn set_mode(&mut self, n: usize, val: super::vals::Mode) {
8749 assert!(n < 8usize);
8750 let offs = 0usize + n * 4usize;
8751 self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs);
8752 }
8753 #[doc = "Port n configuration bits"]
8754 pub fn cnf(&self, n: usize) -> super::vals::Cnf {
8755 assert!(n < 8usize);
8756 let offs = 2usize + n * 4usize;
8757 let val = (self.0 >> offs) & 0x03;
8758 super::vals::Cnf(val as u8)
8759 }
8760 #[doc = "Port n configuration bits"]
8761 pub fn set_cnf(&mut self, n: usize, val: super::vals::Cnf) {
8762 assert!(n < 8usize);
8763 let offs = 2usize + n * 4usize;
8764 self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs);
8765 }
8766 }
8767 impl Default for Cr {
8768 fn default() -> Cr {
8769 Cr(0)
8770 }
8914 } 8771 }
8772 #[doc = "Port input data register (GPIOn_IDR)"]
8915 #[repr(transparent)] 8773 #[repr(transparent)]
8916 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 8774 #[derive(Copy, Clone, Eq, PartialEq)]
8917 pub struct Icf(pub u8); 8775 pub struct Idr(pub u32);
8918 impl Icf { 8776 impl Idr {
8919 #[doc = "No filter, sampling is done at fDTS"] 8777 #[doc = "Port input data"]
8920 pub const NOFILTER: Self = Self(0); 8778 pub fn idr(&self, n: usize) -> super::vals::Idr {
8921 #[doc = "fSAMPLING=fCK_INT, N=2"] 8779 assert!(n < 16usize);
8922 pub const FCK_INT_N2: Self = Self(0x01); 8780 let offs = 0usize + n * 1usize;
8923 #[doc = "fSAMPLING=fCK_INT, N=4"] 8781 let val = (self.0 >> offs) & 0x01;
8924 pub const FCK_INT_N4: Self = Self(0x02); 8782 super::vals::Idr(val as u8)
8925 #[doc = "fSAMPLING=fCK_INT, N=8"] 8783 }
8926 pub const FCK_INT_N8: Self = Self(0x03); 8784 #[doc = "Port input data"]
8927 #[doc = "fSAMPLING=fDTS/2, N=6"] 8785 pub fn set_idr(&mut self, n: usize, val: super::vals::Idr) {
8928 pub const FDTS_DIV2_N6: Self = Self(0x04); 8786 assert!(n < 16usize);
8929 #[doc = "fSAMPLING=fDTS/2, N=8"] 8787 let offs = 0usize + n * 1usize;
8930 pub const FDTS_DIV2_N8: Self = Self(0x05); 8788 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs);
8931 #[doc = "fSAMPLING=fDTS/4, N=6"] 8789 }
8932 pub const FDTS_DIV4_N6: Self = Self(0x06); 8790 }
8933 #[doc = "fSAMPLING=fDTS/4, N=8"] 8791 impl Default for Idr {
8934 pub const FDTS_DIV4_N8: Self = Self(0x07); 8792 fn default() -> Idr {
8935 #[doc = "fSAMPLING=fDTS/8, N=6"] 8793 Idr(0)
8936 pub const FDTS_DIV8_N6: Self = Self(0x08); 8794 }
8937 #[doc = "fSAMPLING=fDTS/8, N=8"]
8938 pub const FDTS_DIV8_N8: Self = Self(0x09);
8939 #[doc = "fSAMPLING=fDTS/16, N=5"]
8940 pub const FDTS_DIV16_N5: Self = Self(0x0a);
8941 #[doc = "fSAMPLING=fDTS/16, N=6"]
8942 pub const FDTS_DIV16_N6: Self = Self(0x0b);
8943 #[doc = "fSAMPLING=fDTS/16, N=8"]
8944 pub const FDTS_DIV16_N8: Self = Self(0x0c);
8945 #[doc = "fSAMPLING=fDTS/32, N=5"]
8946 pub const FDTS_DIV32_N5: Self = Self(0x0d);
8947 #[doc = "fSAMPLING=fDTS/32, N=6"]
8948 pub const FDTS_DIV32_N6: Self = Self(0x0e);
8949 #[doc = "fSAMPLING=fDTS/32, N=8"]
8950 pub const FDTS_DIV32_N8: Self = Self(0x0f);
8951 } 8795 }
8796 #[doc = "Port output data register (GPIOn_ODR)"]
8952 #[repr(transparent)] 8797 #[repr(transparent)]
8953 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 8798 #[derive(Copy, Clone, Eq, PartialEq)]
8954 pub struct Urs(pub u8); 8799 pub struct Odr(pub u32);
8955 impl Urs { 8800 impl Odr {
8956 #[doc = "Any of counter overflow/underflow, setting UG, or update through slave mode, generates an update interrupt or DMA request"] 8801 #[doc = "Port output data"]
8957 pub const ANYEVENT: Self = Self(0); 8802 pub fn odr(&self, n: usize) -> super::vals::Odr {
8958 #[doc = "Only counter overflow/underflow generates an update interrupt or DMA request"] 8803 assert!(n < 16usize);
8959 pub const COUNTERONLY: Self = Self(0x01); 8804 let offs = 0usize + n * 1usize;
8805 let val = (self.0 >> offs) & 0x01;
8806 super::vals::Odr(val as u8)
8807 }
8808 #[doc = "Port output data"]
8809 pub fn set_odr(&mut self, n: usize, val: super::vals::Odr) {
8810 assert!(n < 16usize);
8811 let offs = 0usize + n * 1usize;
8812 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs);
8813 }
8814 }
8815 impl Default for Odr {
8816 fn default() -> Odr {
8817 Odr(0)
8818 }
8960 } 8819 }
8820 #[doc = "Port configuration lock register"]
8961 #[repr(transparent)] 8821 #[repr(transparent)]
8962 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 8822 #[derive(Copy, Clone, Eq, PartialEq)]
8963 pub struct Ccds(pub u8); 8823 pub struct Lckr(pub u32);
8964 impl Ccds { 8824 impl Lckr {
8965 #[doc = "CCx DMA request sent when CCx event occurs"] 8825 #[doc = "Port A Lock bit"]
8966 pub const ONCOMPARE: Self = Self(0); 8826 pub fn lck(&self, n: usize) -> super::vals::Lck {
8967 #[doc = "CCx DMA request sent when update event occurs"] 8827 assert!(n < 16usize);
8968 pub const ONUPDATE: Self = Self(0x01); 8828 let offs = 0usize + n * 1usize;
8829 let val = (self.0 >> offs) & 0x01;
8830 super::vals::Lck(val as u8)
8831 }
8832 #[doc = "Port A Lock bit"]
8833 pub fn set_lck(&mut self, n: usize, val: super::vals::Lck) {
8834 assert!(n < 16usize);
8835 let offs = 0usize + n * 1usize;
8836 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs);
8837 }
8838 #[doc = "Lock key"]
8839 pub const fn lckk(&self) -> super::vals::Lckk {
8840 let val = (self.0 >> 16usize) & 0x01;
8841 super::vals::Lckk(val as u8)
8842 }
8843 #[doc = "Lock key"]
8844 pub fn set_lckk(&mut self, val: super::vals::Lckk) {
8845 self.0 = (self.0 & !(0x01 << 16usize)) | (((val.0 as u32) & 0x01) << 16usize);
8846 }
8969 } 8847 }
8848 impl Default for Lckr {
8849 fn default() -> Lckr {
8850 Lckr(0)
8851 }
8852 }
8853 #[doc = "Port bit reset register (GPIOn_BRR)"]
8970 #[repr(transparent)] 8854 #[repr(transparent)]
8971 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 8855 #[derive(Copy, Clone, Eq, PartialEq)]
8972 pub struct CcmrInputCcs(pub u8); 8856 pub struct Brr(pub u32);
8973 impl CcmrInputCcs { 8857 impl Brr {
8974 #[doc = "CCx channel is configured as input, normal mapping: ICx mapped to TIx"] 8858 #[doc = "Reset bit"]
8975 pub const TI4: Self = Self(0x01); 8859 pub fn br(&self, n: usize) -> bool {
8976 #[doc = "CCx channel is configured as input, alternate mapping (switches 1 with 2, 3 with 4)"] 8860 assert!(n < 16usize);
8977 pub const TI3: Self = Self(0x02); 8861 let offs = 0usize + n * 1usize;
8978 #[doc = "CCx channel is configured as input, ICx is mapped on TRC"] 8862 let val = (self.0 >> offs) & 0x01;
8979 pub const TRC: Self = Self(0x03); 8863 val != 0
8864 }
8865 #[doc = "Reset bit"]
8866 pub fn set_br(&mut self, n: usize, val: bool) {
8867 assert!(n < 16usize);
8868 let offs = 0usize + n * 1usize;
8869 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
8870 }
8871 }
8872 impl Default for Brr {
8873 fn default() -> Brr {
8874 Brr(0)
8875 }
8980 } 8876 }
8877 }
8878}
8879pub mod exti_v1 {
8880 use crate::generic::*;
8881 #[doc = "External interrupt/event controller"]
8882 #[derive(Copy, Clone)]
8883 pub struct Exti(pub *mut u8);
8884 unsafe impl Send for Exti {}
8885 unsafe impl Sync for Exti {}
8886 impl Exti {
8887 #[doc = "Interrupt mask register (EXTI_IMR)"]
8888 pub fn imr(self) -> Reg<regs::Imr, RW> {
8889 unsafe { Reg::from_ptr(self.0.add(0usize)) }
8890 }
8891 #[doc = "Event mask register (EXTI_EMR)"]
8892 pub fn emr(self) -> Reg<regs::Emr, RW> {
8893 unsafe { Reg::from_ptr(self.0.add(4usize)) }
8894 }
8895 #[doc = "Rising Trigger selection register (EXTI_RTSR)"]
8896 pub fn rtsr(self) -> Reg<regs::Rtsr, RW> {
8897 unsafe { Reg::from_ptr(self.0.add(8usize)) }
8898 }
8899 #[doc = "Falling Trigger selection register (EXTI_FTSR)"]
8900 pub fn ftsr(self) -> Reg<regs::Ftsr, RW> {
8901 unsafe { Reg::from_ptr(self.0.add(12usize)) }
8902 }
8903 #[doc = "Software interrupt event register (EXTI_SWIER)"]
8904 pub fn swier(self) -> Reg<regs::Swier, RW> {
8905 unsafe { Reg::from_ptr(self.0.add(16usize)) }
8906 }
8907 #[doc = "Pending register (EXTI_PR)"]
8908 pub fn pr(self) -> Reg<regs::Pr, RW> {
8909 unsafe { Reg::from_ptr(self.0.add(20usize)) }
8910 }
8911 }
8912 pub mod regs {
8913 use crate::generic::*;
8914 #[doc = "Interrupt mask register (EXTI_IMR)"]
8981 #[repr(transparent)] 8915 #[repr(transparent)]
8982 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 8916 #[derive(Copy, Clone, Eq, PartialEq)]
8983 pub struct Opm(pub u8); 8917 pub struct Imr(pub u32);
8984 impl Opm { 8918 impl Imr {
8985 #[doc = "Counter is not stopped at update event"] 8919 #[doc = "Interrupt Mask on line 0"]
8986 pub const DISABLED: Self = Self(0); 8920 pub fn mr(&self, n: usize) -> super::vals::Mr {
8987 #[doc = "Counter stops counting at the next update event (clearing the CEN bit)"] 8921 assert!(n < 23usize);
8988 pub const ENABLED: Self = Self(0x01); 8922 let offs = 0usize + n * 1usize;
8923 let val = (self.0 >> offs) & 0x01;
8924 super::vals::Mr(val as u8)
8925 }
8926 #[doc = "Interrupt Mask on line 0"]
8927 pub fn set_mr(&mut self, n: usize, val: super::vals::Mr) {
8928 assert!(n < 23usize);
8929 let offs = 0usize + n * 1usize;
8930 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs);
8931 }
8989 } 8932 }
8933 impl Default for Imr {
8934 fn default() -> Imr {
8935 Imr(0)
8936 }
8937 }
8938 #[doc = "Software interrupt event register (EXTI_SWIER)"]
8990 #[repr(transparent)] 8939 #[repr(transparent)]
8991 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 8940 #[derive(Copy, Clone, Eq, PartialEq)]
8992 pub struct CcmrOutputCcs(pub u8); 8941 pub struct Swier(pub u32);
8993 impl CcmrOutputCcs { 8942 impl Swier {
8994 #[doc = "CCx channel is configured as output"] 8943 #[doc = "Software Interrupt on line 0"]
8995 pub const OUTPUT: Self = Self(0); 8944 pub fn swier(&self, n: usize) -> bool {
8945 assert!(n < 23usize);
8946 let offs = 0usize + n * 1usize;
8947 let val = (self.0 >> offs) & 0x01;
8948 val != 0
8949 }
8950 #[doc = "Software Interrupt on line 0"]
8951 pub fn set_swier(&mut self, n: usize, val: bool) {
8952 assert!(n < 23usize);
8953 let offs = 0usize + n * 1usize;
8954 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
8955 }
8956 }
8957 impl Default for Swier {
8958 fn default() -> Swier {
8959 Swier(0)
8960 }
8996 } 8961 }
8962 #[doc = "Falling Trigger selection register (EXTI_FTSR)"]
8997 #[repr(transparent)] 8963 #[repr(transparent)]
8998 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 8964 #[derive(Copy, Clone, Eq, PartialEq)]
8999 pub struct Ece(pub u8); 8965 pub struct Ftsr(pub u32);
9000 impl Ece { 8966 impl Ftsr {
9001 #[doc = "External clock mode 2 disabled"] 8967 #[doc = "Falling trigger event configuration of line 0"]
9002 pub const DISABLED: Self = Self(0); 8968 pub fn tr(&self, n: usize) -> super::vals::Tr {
9003 #[doc = "External clock mode 2 enabled. The counter is clocked by any active edge on the ETRF signal."] 8969 assert!(n < 23usize);
9004 pub const ENABLED: Self = Self(0x01); 8970 let offs = 0usize + n * 1usize;
8971 let val = (self.0 >> offs) & 0x01;
8972 super::vals::Tr(val as u8)
8973 }
8974 #[doc = "Falling trigger event configuration of line 0"]
8975 pub fn set_tr(&mut self, n: usize, val: super::vals::Tr) {
8976 assert!(n < 23usize);
8977 let offs = 0usize + n * 1usize;
8978 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs);
8979 }
8980 }
8981 impl Default for Ftsr {
8982 fn default() -> Ftsr {
8983 Ftsr(0)
8984 }
9005 } 8985 }
8986 #[doc = "Rising Trigger selection register (EXTI_RTSR)"]
9006 #[repr(transparent)] 8987 #[repr(transparent)]
9007 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 8988 #[derive(Copy, Clone, Eq, PartialEq)]
9008 pub struct Etp(pub u8); 8989 pub struct Rtsr(pub u32);
9009 impl Etp { 8990 impl Rtsr {
9010 #[doc = "ETR is noninverted, active at high level or rising edge"] 8991 #[doc = "Rising trigger event configuration of line 0"]
9011 pub const NOTINVERTED: Self = Self(0); 8992 pub fn tr(&self, n: usize) -> super::vals::Tr {
9012 #[doc = "ETR is inverted, active at low level or falling edge"] 8993 assert!(n < 23usize);
9013 pub const INVERTED: Self = Self(0x01); 8994 let offs = 0usize + n * 1usize;
8995 let val = (self.0 >> offs) & 0x01;
8996 super::vals::Tr(val as u8)
8997 }
8998 #[doc = "Rising trigger event configuration of line 0"]
8999 pub fn set_tr(&mut self, n: usize, val: super::vals::Tr) {
9000 assert!(n < 23usize);
9001 let offs = 0usize + n * 1usize;
9002 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs);
9003 }
9004 }
9005 impl Default for Rtsr {
9006 fn default() -> Rtsr {
9007 Rtsr(0)
9008 }
9009 }
9010 #[doc = "Pending register (EXTI_PR)"]
9011 #[repr(transparent)]
9012 #[derive(Copy, Clone, Eq, PartialEq)]
9013 pub struct Pr(pub u32);
9014 impl Pr {
9015 #[doc = "Pending bit 0"]
9016 pub fn pr(&self, n: usize) -> bool {
9017 assert!(n < 23usize);
9018 let offs = 0usize + n * 1usize;
9019 let val = (self.0 >> offs) & 0x01;
9020 val != 0
9021 }
9022 #[doc = "Pending bit 0"]
9023 pub fn set_pr(&mut self, n: usize, val: bool) {
9024 assert!(n < 23usize);
9025 let offs = 0usize + n * 1usize;
9026 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
9027 }
9028 }
9029 impl Default for Pr {
9030 fn default() -> Pr {
9031 Pr(0)
9032 }
9014 } 9033 }
9034 #[doc = "Event mask register (EXTI_EMR)"]
9035 #[repr(transparent)]
9036 #[derive(Copy, Clone, Eq, PartialEq)]
9037 pub struct Emr(pub u32);
9038 impl Emr {
9039 #[doc = "Event Mask on line 0"]
9040 pub fn mr(&self, n: usize) -> super::vals::Mr {
9041 assert!(n < 23usize);
9042 let offs = 0usize + n * 1usize;
9043 let val = (self.0 >> offs) & 0x01;
9044 super::vals::Mr(val as u8)
9045 }
9046 #[doc = "Event Mask on line 0"]
9047 pub fn set_mr(&mut self, n: usize, val: super::vals::Mr) {
9048 assert!(n < 23usize);
9049 let offs = 0usize + n * 1usize;
9050 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs);
9051 }
9052 }
9053 impl Default for Emr {
9054 fn default() -> Emr {
9055 Emr(0)
9056 }
9057 }
9058 }
9059 pub mod vals {
9060 use crate::generic::*;
9015 #[repr(transparent)] 9061 #[repr(transparent)]
9016 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 9062 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
9017 pub struct Etf(pub u8); 9063 pub struct Prw(pub u8);
9018 impl Etf { 9064 impl Prw {
9019 #[doc = "No filter, sampling is done at fDTS"] 9065 #[doc = "Clears pending bit"]
9020 pub const NOFILTER: Self = Self(0); 9066 pub const CLEAR: Self = Self(0x01);
9021 #[doc = "fSAMPLING=fCK_INT, N=2"]
9022 pub const FCK_INT_N2: Self = Self(0x01);
9023 #[doc = "fSAMPLING=fCK_INT, N=4"]
9024 pub const FCK_INT_N4: Self = Self(0x02);
9025 #[doc = "fSAMPLING=fCK_INT, N=8"]
9026 pub const FCK_INT_N8: Self = Self(0x03);
9027 #[doc = "fSAMPLING=fDTS/2, N=6"]
9028 pub const FDTS_DIV2_N6: Self = Self(0x04);
9029 #[doc = "fSAMPLING=fDTS/2, N=8"]
9030 pub const FDTS_DIV2_N8: Self = Self(0x05);
9031 #[doc = "fSAMPLING=fDTS/4, N=6"]
9032 pub const FDTS_DIV4_N6: Self = Self(0x06);
9033 #[doc = "fSAMPLING=fDTS/4, N=8"]
9034 pub const FDTS_DIV4_N8: Self = Self(0x07);
9035 #[doc = "fSAMPLING=fDTS/8, N=6"]
9036 pub const FDTS_DIV8_N6: Self = Self(0x08);
9037 #[doc = "fSAMPLING=fDTS/8, N=8"]
9038 pub const FDTS_DIV8_N8: Self = Self(0x09);
9039 #[doc = "fSAMPLING=fDTS/16, N=5"]
9040 pub const FDTS_DIV16_N5: Self = Self(0x0a);
9041 #[doc = "fSAMPLING=fDTS/16, N=6"]
9042 pub const FDTS_DIV16_N6: Self = Self(0x0b);
9043 #[doc = "fSAMPLING=fDTS/16, N=8"]
9044 pub const FDTS_DIV16_N8: Self = Self(0x0c);
9045 #[doc = "fSAMPLING=fDTS/32, N=5"]
9046 pub const FDTS_DIV32_N5: Self = Self(0x0d);
9047 #[doc = "fSAMPLING=fDTS/32, N=6"]
9048 pub const FDTS_DIV32_N6: Self = Self(0x0e);
9049 #[doc = "fSAMPLING=fDTS/32, N=8"]
9050 pub const FDTS_DIV32_N8: Self = Self(0x0f);
9051 } 9067 }
9052 #[repr(transparent)] 9068 #[repr(transparent)]
9053 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 9069 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
9054 pub struct Ts(pub u8); 9070 pub struct Swierw(pub u8);
9055 impl Ts { 9071 impl Swierw {
9056 #[doc = "Internal Trigger 0 (ITR0)"] 9072 #[doc = "Generates an interrupt request"]
9057 pub const ITR0: Self = Self(0); 9073 pub const PEND: Self = Self(0x01);
9058 #[doc = "Internal Trigger 1 (ITR1)"]
9059 pub const ITR1: Self = Self(0x01);
9060 #[doc = "Internal Trigger 2 (ITR2)"]
9061 pub const ITR2: Self = Self(0x02);
9062 #[doc = "TI1 Edge Detector (TI1F_ED)"]
9063 pub const TI1F_ED: Self = Self(0x04);
9064 #[doc = "Filtered Timer Input 1 (TI1FP1)"]
9065 pub const TI1FP1: Self = Self(0x05);
9066 #[doc = "Filtered Timer Input 2 (TI2FP2)"]
9067 pub const TI2FP2: Self = Self(0x06);
9068 #[doc = "External Trigger input (ETRF)"]
9069 pub const ETRF: Self = Self(0x07);
9070 } 9074 }
9071 #[repr(transparent)] 9075 #[repr(transparent)]
9072 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 9076 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
9073 pub struct Ossr(pub u8); 9077 pub struct Tr(pub u8);
9074 impl Ossr { 9078 impl Tr {
9075 #[doc = "When inactive, OC/OCN outputs are disabled"] 9079 #[doc = "Falling edge trigger is disabled"]
9076 pub const DISABLED: Self = Self(0); 9080 pub const DISABLED: Self = Self(0);
9077 #[doc = "When inactive, OC/OCN outputs are enabled with their inactive level"] 9081 #[doc = "Falling edge trigger is enabled"]
9078 pub const IDLELEVEL: Self = Self(0x01); 9082 pub const ENABLED: Self = Self(0x01);
9079 } 9083 }
9080 #[repr(transparent)] 9084 #[repr(transparent)]
9081 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 9085 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
9082 pub struct Etps(pub u8); 9086 pub struct Prr(pub u8);
9083 impl Etps { 9087 impl Prr {
9084 #[doc = "Prescaler OFF"] 9088 #[doc = "No trigger request occurred"]
9085 pub const DIV1: Self = Self(0); 9089 pub const NOTPENDING: Self = Self(0);
9086 #[doc = "ETRP frequency divided by 2"] 9090 #[doc = "Selected trigger request occurred"]
9087 pub const DIV2: Self = Self(0x01); 9091 pub const PENDING: Self = Self(0x01);
9088 #[doc = "ETRP frequency divided by 4"]
9089 pub const DIV4: Self = Self(0x02);
9090 #[doc = "ETRP frequency divided by 8"]
9091 pub const DIV8: Self = Self(0x03);
9092 } 9092 }
9093 #[repr(transparent)] 9093 #[repr(transparent)]
9094 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 9094 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
9095 pub struct Ossi(pub u8); 9095 pub struct Mr(pub u8);
9096 impl Ossi { 9096 impl Mr {
9097 #[doc = "When inactive, OC/OCN outputs are disabled"] 9097 #[doc = "Interrupt request line is masked"]
9098 pub const DISABLED: Self = Self(0); 9098 pub const MASKED: Self = Self(0);
9099 #[doc = "When inactive, OC/OCN outputs are forced to idle level"] 9099 #[doc = "Interrupt request line is unmasked"]
9100 pub const IDLELEVEL: Self = Self(0x01); 9100 pub const UNMASKED: Self = Self(0x01);
9101 } 9101 }
9102 } 9102 }
9103} 9103}
diff --git a/embassy-stm32/src/pac/stm32f401cb.rs b/embassy-stm32/src/pac/stm32f401cb.rs
index fe69202d8..34fa05d86 100644
--- a/embassy-stm32/src/pac/stm32f401cb.rs
+++ b/embassy-stm32/src/pac/stm32f401cb.rs
@@ -126,6 +126,32 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
126impl_gpio_pin!(PH13, 7, 13, EXTI13); 126impl_gpio_pin!(PH13, 7, 13, EXTI13);
127impl_gpio_pin!(PH14, 7, 14, EXTI14); 127impl_gpio_pin!(PH14, 7, 14, EXTI14);
128impl_gpio_pin!(PH15, 7, 15, EXTI15); 128impl_gpio_pin!(PH15, 7, 15, EXTI15);
129pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
130impl_spi!(SPI1, APB2);
131impl_spi_pin!(SPI1, SckPin, PA5, 5);
132impl_spi_pin!(SPI1, MisoPin, PA6, 5);
133impl_spi_pin!(SPI1, MosiPin, PA7, 5);
134impl_spi_pin!(SPI1, SckPin, PB3, 5);
135impl_spi_pin!(SPI1, MisoPin, PB4, 5);
136impl_spi_pin!(SPI1, MosiPin, PB5, 5);
137pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
138impl_spi!(SPI2, APB1);
139impl_spi_pin!(SPI2, SckPin, PB10, 5);
140impl_spi_pin!(SPI2, SckPin, PB13, 5);
141impl_spi_pin!(SPI2, MisoPin, PB14, 5);
142impl_spi_pin!(SPI2, MosiPin, PB15, 5);
143impl_spi_pin!(SPI2, MisoPin, PC2, 5);
144impl_spi_pin!(SPI2, MosiPin, PC3, 5);
145impl_spi_pin!(SPI2, SckPin, PD3, 5);
146pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
147impl_spi!(SPI3, APB1);
148impl_spi_pin!(SPI3, SckPin, PB3, 6);
149impl_spi_pin!(SPI3, MisoPin, PB4, 6);
150impl_spi_pin!(SPI3, MosiPin, PB5, 6);
151impl_spi_pin!(SPI3, SckPin, PC10, 6);
152impl_spi_pin!(SPI3, MisoPin, PC11, 6);
153impl_spi_pin!(SPI3, MosiPin, PC12, 6);
154impl_spi_pin!(SPI3, MosiPin, PD6, 5);
129pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 155pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
130pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 156pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
131impl_usart!(USART1); 157impl_usart!(USART1);
@@ -158,6 +184,7 @@ impl_usart_pin!(USART6, CkPin, PC8, 8);
158pub use regs::dma_v2 as dma; 184pub use regs::dma_v2 as dma;
159pub use regs::exti_v1 as exti; 185pub use regs::exti_v1 as exti;
160pub use regs::gpio_v2 as gpio; 186pub use regs::gpio_v2 as gpio;
187pub use regs::spi_v1 as spi;
161pub use regs::syscfg_f4 as syscfg; 188pub use regs::syscfg_f4 as syscfg;
162pub use regs::usart_v1 as usart; 189pub use regs::usart_v1 as usart;
163mod regs; 190mod regs;
@@ -172,7 +199,7 @@ peripherals!(
172 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, 199 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5,
173 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, 200 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7,
174 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, 201 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9,
175 PH10, PH11, PH12, PH13, PH14, PH15, SYSCFG, USART1, USART2, USART6 202 PH10, PH11, PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART6
176); 203);
177 204
178pub mod interrupt { 205pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f401cc.rs b/embassy-stm32/src/pac/stm32f401cc.rs
index fe69202d8..34fa05d86 100644
--- a/embassy-stm32/src/pac/stm32f401cc.rs
+++ b/embassy-stm32/src/pac/stm32f401cc.rs
@@ -126,6 +126,32 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
126impl_gpio_pin!(PH13, 7, 13, EXTI13); 126impl_gpio_pin!(PH13, 7, 13, EXTI13);
127impl_gpio_pin!(PH14, 7, 14, EXTI14); 127impl_gpio_pin!(PH14, 7, 14, EXTI14);
128impl_gpio_pin!(PH15, 7, 15, EXTI15); 128impl_gpio_pin!(PH15, 7, 15, EXTI15);
129pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
130impl_spi!(SPI1, APB2);
131impl_spi_pin!(SPI1, SckPin, PA5, 5);
132impl_spi_pin!(SPI1, MisoPin, PA6, 5);
133impl_spi_pin!(SPI1, MosiPin, PA7, 5);
134impl_spi_pin!(SPI1, SckPin, PB3, 5);
135impl_spi_pin!(SPI1, MisoPin, PB4, 5);
136impl_spi_pin!(SPI1, MosiPin, PB5, 5);
137pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
138impl_spi!(SPI2, APB1);
139impl_spi_pin!(SPI2, SckPin, PB10, 5);
140impl_spi_pin!(SPI2, SckPin, PB13, 5);
141impl_spi_pin!(SPI2, MisoPin, PB14, 5);
142impl_spi_pin!(SPI2, MosiPin, PB15, 5);
143impl_spi_pin!(SPI2, MisoPin, PC2, 5);
144impl_spi_pin!(SPI2, MosiPin, PC3, 5);
145impl_spi_pin!(SPI2, SckPin, PD3, 5);
146pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
147impl_spi!(SPI3, APB1);
148impl_spi_pin!(SPI3, SckPin, PB3, 6);
149impl_spi_pin!(SPI3, MisoPin, PB4, 6);
150impl_spi_pin!(SPI3, MosiPin, PB5, 6);
151impl_spi_pin!(SPI3, SckPin, PC10, 6);
152impl_spi_pin!(SPI3, MisoPin, PC11, 6);
153impl_spi_pin!(SPI3, MosiPin, PC12, 6);
154impl_spi_pin!(SPI3, MosiPin, PD6, 5);
129pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 155pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
130pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 156pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
131impl_usart!(USART1); 157impl_usart!(USART1);
@@ -158,6 +184,7 @@ impl_usart_pin!(USART6, CkPin, PC8, 8);
158pub use regs::dma_v2 as dma; 184pub use regs::dma_v2 as dma;
159pub use regs::exti_v1 as exti; 185pub use regs::exti_v1 as exti;
160pub use regs::gpio_v2 as gpio; 186pub use regs::gpio_v2 as gpio;
187pub use regs::spi_v1 as spi;
161pub use regs::syscfg_f4 as syscfg; 188pub use regs::syscfg_f4 as syscfg;
162pub use regs::usart_v1 as usart; 189pub use regs::usart_v1 as usart;
163mod regs; 190mod regs;
@@ -172,7 +199,7 @@ peripherals!(
172 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, 199 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5,
173 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, 200 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7,
174 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, 201 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9,
175 PH10, PH11, PH12, PH13, PH14, PH15, SYSCFG, USART1, USART2, USART6 202 PH10, PH11, PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART6
176); 203);
177 204
178pub mod interrupt { 205pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f401cd.rs b/embassy-stm32/src/pac/stm32f401cd.rs
index fe69202d8..34fa05d86 100644
--- a/embassy-stm32/src/pac/stm32f401cd.rs
+++ b/embassy-stm32/src/pac/stm32f401cd.rs
@@ -126,6 +126,32 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
126impl_gpio_pin!(PH13, 7, 13, EXTI13); 126impl_gpio_pin!(PH13, 7, 13, EXTI13);
127impl_gpio_pin!(PH14, 7, 14, EXTI14); 127impl_gpio_pin!(PH14, 7, 14, EXTI14);
128impl_gpio_pin!(PH15, 7, 15, EXTI15); 128impl_gpio_pin!(PH15, 7, 15, EXTI15);
129pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
130impl_spi!(SPI1, APB2);
131impl_spi_pin!(SPI1, SckPin, PA5, 5);
132impl_spi_pin!(SPI1, MisoPin, PA6, 5);
133impl_spi_pin!(SPI1, MosiPin, PA7, 5);
134impl_spi_pin!(SPI1, SckPin, PB3, 5);
135impl_spi_pin!(SPI1, MisoPin, PB4, 5);
136impl_spi_pin!(SPI1, MosiPin, PB5, 5);
137pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
138impl_spi!(SPI2, APB1);
139impl_spi_pin!(SPI2, SckPin, PB10, 5);
140impl_spi_pin!(SPI2, SckPin, PB13, 5);
141impl_spi_pin!(SPI2, MisoPin, PB14, 5);
142impl_spi_pin!(SPI2, MosiPin, PB15, 5);
143impl_spi_pin!(SPI2, MisoPin, PC2, 5);
144impl_spi_pin!(SPI2, MosiPin, PC3, 5);
145impl_spi_pin!(SPI2, SckPin, PD3, 5);
146pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
147impl_spi!(SPI3, APB1);
148impl_spi_pin!(SPI3, SckPin, PB3, 6);
149impl_spi_pin!(SPI3, MisoPin, PB4, 6);
150impl_spi_pin!(SPI3, MosiPin, PB5, 6);
151impl_spi_pin!(SPI3, SckPin, PC10, 6);
152impl_spi_pin!(SPI3, MisoPin, PC11, 6);
153impl_spi_pin!(SPI3, MosiPin, PC12, 6);
154impl_spi_pin!(SPI3, MosiPin, PD6, 5);
129pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 155pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
130pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 156pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
131impl_usart!(USART1); 157impl_usart!(USART1);
@@ -158,6 +184,7 @@ impl_usart_pin!(USART6, CkPin, PC8, 8);
158pub use regs::dma_v2 as dma; 184pub use regs::dma_v2 as dma;
159pub use regs::exti_v1 as exti; 185pub use regs::exti_v1 as exti;
160pub use regs::gpio_v2 as gpio; 186pub use regs::gpio_v2 as gpio;
187pub use regs::spi_v1 as spi;
161pub use regs::syscfg_f4 as syscfg; 188pub use regs::syscfg_f4 as syscfg;
162pub use regs::usart_v1 as usart; 189pub use regs::usart_v1 as usart;
163mod regs; 190mod regs;
@@ -172,7 +199,7 @@ peripherals!(
172 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, 199 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5,
173 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, 200 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7,
174 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, 201 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9,
175 PH10, PH11, PH12, PH13, PH14, PH15, SYSCFG, USART1, USART2, USART6 202 PH10, PH11, PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART6
176); 203);
177 204
178pub mod interrupt { 205pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f401ce.rs b/embassy-stm32/src/pac/stm32f401ce.rs
index fe69202d8..34fa05d86 100644
--- a/embassy-stm32/src/pac/stm32f401ce.rs
+++ b/embassy-stm32/src/pac/stm32f401ce.rs
@@ -126,6 +126,32 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
126impl_gpio_pin!(PH13, 7, 13, EXTI13); 126impl_gpio_pin!(PH13, 7, 13, EXTI13);
127impl_gpio_pin!(PH14, 7, 14, EXTI14); 127impl_gpio_pin!(PH14, 7, 14, EXTI14);
128impl_gpio_pin!(PH15, 7, 15, EXTI15); 128impl_gpio_pin!(PH15, 7, 15, EXTI15);
129pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
130impl_spi!(SPI1, APB2);
131impl_spi_pin!(SPI1, SckPin, PA5, 5);
132impl_spi_pin!(SPI1, MisoPin, PA6, 5);
133impl_spi_pin!(SPI1, MosiPin, PA7, 5);
134impl_spi_pin!(SPI1, SckPin, PB3, 5);
135impl_spi_pin!(SPI1, MisoPin, PB4, 5);
136impl_spi_pin!(SPI1, MosiPin, PB5, 5);
137pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
138impl_spi!(SPI2, APB1);
139impl_spi_pin!(SPI2, SckPin, PB10, 5);
140impl_spi_pin!(SPI2, SckPin, PB13, 5);
141impl_spi_pin!(SPI2, MisoPin, PB14, 5);
142impl_spi_pin!(SPI2, MosiPin, PB15, 5);
143impl_spi_pin!(SPI2, MisoPin, PC2, 5);
144impl_spi_pin!(SPI2, MosiPin, PC3, 5);
145impl_spi_pin!(SPI2, SckPin, PD3, 5);
146pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
147impl_spi!(SPI3, APB1);
148impl_spi_pin!(SPI3, SckPin, PB3, 6);
149impl_spi_pin!(SPI3, MisoPin, PB4, 6);
150impl_spi_pin!(SPI3, MosiPin, PB5, 6);
151impl_spi_pin!(SPI3, SckPin, PC10, 6);
152impl_spi_pin!(SPI3, MisoPin, PC11, 6);
153impl_spi_pin!(SPI3, MosiPin, PC12, 6);
154impl_spi_pin!(SPI3, MosiPin, PD6, 5);
129pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 155pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
130pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 156pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
131impl_usart!(USART1); 157impl_usart!(USART1);
@@ -158,6 +184,7 @@ impl_usart_pin!(USART6, CkPin, PC8, 8);
158pub use regs::dma_v2 as dma; 184pub use regs::dma_v2 as dma;
159pub use regs::exti_v1 as exti; 185pub use regs::exti_v1 as exti;
160pub use regs::gpio_v2 as gpio; 186pub use regs::gpio_v2 as gpio;
187pub use regs::spi_v1 as spi;
161pub use regs::syscfg_f4 as syscfg; 188pub use regs::syscfg_f4 as syscfg;
162pub use regs::usart_v1 as usart; 189pub use regs::usart_v1 as usart;
163mod regs; 190mod regs;
@@ -172,7 +199,7 @@ peripherals!(
172 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, 199 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5,
173 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, 200 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7,
174 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, 201 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9,
175 PH10, PH11, PH12, PH13, PH14, PH15, SYSCFG, USART1, USART2, USART6 202 PH10, PH11, PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART6
176); 203);
177 204
178pub mod interrupt { 205pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f401rb.rs b/embassy-stm32/src/pac/stm32f401rb.rs
index fe69202d8..34fa05d86 100644
--- a/embassy-stm32/src/pac/stm32f401rb.rs
+++ b/embassy-stm32/src/pac/stm32f401rb.rs
@@ -126,6 +126,32 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
126impl_gpio_pin!(PH13, 7, 13, EXTI13); 126impl_gpio_pin!(PH13, 7, 13, EXTI13);
127impl_gpio_pin!(PH14, 7, 14, EXTI14); 127impl_gpio_pin!(PH14, 7, 14, EXTI14);
128impl_gpio_pin!(PH15, 7, 15, EXTI15); 128impl_gpio_pin!(PH15, 7, 15, EXTI15);
129pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
130impl_spi!(SPI1, APB2);
131impl_spi_pin!(SPI1, SckPin, PA5, 5);
132impl_spi_pin!(SPI1, MisoPin, PA6, 5);
133impl_spi_pin!(SPI1, MosiPin, PA7, 5);
134impl_spi_pin!(SPI1, SckPin, PB3, 5);
135impl_spi_pin!(SPI1, MisoPin, PB4, 5);
136impl_spi_pin!(SPI1, MosiPin, PB5, 5);
137pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
138impl_spi!(SPI2, APB1);
139impl_spi_pin!(SPI2, SckPin, PB10, 5);
140impl_spi_pin!(SPI2, SckPin, PB13, 5);
141impl_spi_pin!(SPI2, MisoPin, PB14, 5);
142impl_spi_pin!(SPI2, MosiPin, PB15, 5);
143impl_spi_pin!(SPI2, MisoPin, PC2, 5);
144impl_spi_pin!(SPI2, MosiPin, PC3, 5);
145impl_spi_pin!(SPI2, SckPin, PD3, 5);
146pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
147impl_spi!(SPI3, APB1);
148impl_spi_pin!(SPI3, SckPin, PB3, 6);
149impl_spi_pin!(SPI3, MisoPin, PB4, 6);
150impl_spi_pin!(SPI3, MosiPin, PB5, 6);
151impl_spi_pin!(SPI3, SckPin, PC10, 6);
152impl_spi_pin!(SPI3, MisoPin, PC11, 6);
153impl_spi_pin!(SPI3, MosiPin, PC12, 6);
154impl_spi_pin!(SPI3, MosiPin, PD6, 5);
129pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 155pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
130pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 156pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
131impl_usart!(USART1); 157impl_usart!(USART1);
@@ -158,6 +184,7 @@ impl_usart_pin!(USART6, CkPin, PC8, 8);
158pub use regs::dma_v2 as dma; 184pub use regs::dma_v2 as dma;
159pub use regs::exti_v1 as exti; 185pub use regs::exti_v1 as exti;
160pub use regs::gpio_v2 as gpio; 186pub use regs::gpio_v2 as gpio;
187pub use regs::spi_v1 as spi;
161pub use regs::syscfg_f4 as syscfg; 188pub use regs::syscfg_f4 as syscfg;
162pub use regs::usart_v1 as usart; 189pub use regs::usart_v1 as usart;
163mod regs; 190mod regs;
@@ -172,7 +199,7 @@ peripherals!(
172 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, 199 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5,
173 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, 200 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7,
174 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, 201 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9,
175 PH10, PH11, PH12, PH13, PH14, PH15, SYSCFG, USART1, USART2, USART6 202 PH10, PH11, PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART6
176); 203);
177 204
178pub mod interrupt { 205pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f401rc.rs b/embassy-stm32/src/pac/stm32f401rc.rs
index fe69202d8..34fa05d86 100644
--- a/embassy-stm32/src/pac/stm32f401rc.rs
+++ b/embassy-stm32/src/pac/stm32f401rc.rs
@@ -126,6 +126,32 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
126impl_gpio_pin!(PH13, 7, 13, EXTI13); 126impl_gpio_pin!(PH13, 7, 13, EXTI13);
127impl_gpio_pin!(PH14, 7, 14, EXTI14); 127impl_gpio_pin!(PH14, 7, 14, EXTI14);
128impl_gpio_pin!(PH15, 7, 15, EXTI15); 128impl_gpio_pin!(PH15, 7, 15, EXTI15);
129pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
130impl_spi!(SPI1, APB2);
131impl_spi_pin!(SPI1, SckPin, PA5, 5);
132impl_spi_pin!(SPI1, MisoPin, PA6, 5);
133impl_spi_pin!(SPI1, MosiPin, PA7, 5);
134impl_spi_pin!(SPI1, SckPin, PB3, 5);
135impl_spi_pin!(SPI1, MisoPin, PB4, 5);
136impl_spi_pin!(SPI1, MosiPin, PB5, 5);
137pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
138impl_spi!(SPI2, APB1);
139impl_spi_pin!(SPI2, SckPin, PB10, 5);
140impl_spi_pin!(SPI2, SckPin, PB13, 5);
141impl_spi_pin!(SPI2, MisoPin, PB14, 5);
142impl_spi_pin!(SPI2, MosiPin, PB15, 5);
143impl_spi_pin!(SPI2, MisoPin, PC2, 5);
144impl_spi_pin!(SPI2, MosiPin, PC3, 5);
145impl_spi_pin!(SPI2, SckPin, PD3, 5);
146pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
147impl_spi!(SPI3, APB1);
148impl_spi_pin!(SPI3, SckPin, PB3, 6);
149impl_spi_pin!(SPI3, MisoPin, PB4, 6);
150impl_spi_pin!(SPI3, MosiPin, PB5, 6);
151impl_spi_pin!(SPI3, SckPin, PC10, 6);
152impl_spi_pin!(SPI3, MisoPin, PC11, 6);
153impl_spi_pin!(SPI3, MosiPin, PC12, 6);
154impl_spi_pin!(SPI3, MosiPin, PD6, 5);
129pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 155pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
130pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 156pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
131impl_usart!(USART1); 157impl_usart!(USART1);
@@ -158,6 +184,7 @@ impl_usart_pin!(USART6, CkPin, PC8, 8);
158pub use regs::dma_v2 as dma; 184pub use regs::dma_v2 as dma;
159pub use regs::exti_v1 as exti; 185pub use regs::exti_v1 as exti;
160pub use regs::gpio_v2 as gpio; 186pub use regs::gpio_v2 as gpio;
187pub use regs::spi_v1 as spi;
161pub use regs::syscfg_f4 as syscfg; 188pub use regs::syscfg_f4 as syscfg;
162pub use regs::usart_v1 as usart; 189pub use regs::usart_v1 as usart;
163mod regs; 190mod regs;
@@ -172,7 +199,7 @@ peripherals!(
172 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, 199 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5,
173 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, 200 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7,
174 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, 201 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9,
175 PH10, PH11, PH12, PH13, PH14, PH15, SYSCFG, USART1, USART2, USART6 202 PH10, PH11, PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART6
176); 203);
177 204
178pub mod interrupt { 205pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f401rd.rs b/embassy-stm32/src/pac/stm32f401rd.rs
index fe69202d8..34fa05d86 100644
--- a/embassy-stm32/src/pac/stm32f401rd.rs
+++ b/embassy-stm32/src/pac/stm32f401rd.rs
@@ -126,6 +126,32 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
126impl_gpio_pin!(PH13, 7, 13, EXTI13); 126impl_gpio_pin!(PH13, 7, 13, EXTI13);
127impl_gpio_pin!(PH14, 7, 14, EXTI14); 127impl_gpio_pin!(PH14, 7, 14, EXTI14);
128impl_gpio_pin!(PH15, 7, 15, EXTI15); 128impl_gpio_pin!(PH15, 7, 15, EXTI15);
129pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
130impl_spi!(SPI1, APB2);
131impl_spi_pin!(SPI1, SckPin, PA5, 5);
132impl_spi_pin!(SPI1, MisoPin, PA6, 5);
133impl_spi_pin!(SPI1, MosiPin, PA7, 5);
134impl_spi_pin!(SPI1, SckPin, PB3, 5);
135impl_spi_pin!(SPI1, MisoPin, PB4, 5);
136impl_spi_pin!(SPI1, MosiPin, PB5, 5);
137pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
138impl_spi!(SPI2, APB1);
139impl_spi_pin!(SPI2, SckPin, PB10, 5);
140impl_spi_pin!(SPI2, SckPin, PB13, 5);
141impl_spi_pin!(SPI2, MisoPin, PB14, 5);
142impl_spi_pin!(SPI2, MosiPin, PB15, 5);
143impl_spi_pin!(SPI2, MisoPin, PC2, 5);
144impl_spi_pin!(SPI2, MosiPin, PC3, 5);
145impl_spi_pin!(SPI2, SckPin, PD3, 5);
146pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
147impl_spi!(SPI3, APB1);
148impl_spi_pin!(SPI3, SckPin, PB3, 6);
149impl_spi_pin!(SPI3, MisoPin, PB4, 6);
150impl_spi_pin!(SPI3, MosiPin, PB5, 6);
151impl_spi_pin!(SPI3, SckPin, PC10, 6);
152impl_spi_pin!(SPI3, MisoPin, PC11, 6);
153impl_spi_pin!(SPI3, MosiPin, PC12, 6);
154impl_spi_pin!(SPI3, MosiPin, PD6, 5);
129pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 155pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
130pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 156pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
131impl_usart!(USART1); 157impl_usart!(USART1);
@@ -158,6 +184,7 @@ impl_usart_pin!(USART6, CkPin, PC8, 8);
158pub use regs::dma_v2 as dma; 184pub use regs::dma_v2 as dma;
159pub use regs::exti_v1 as exti; 185pub use regs::exti_v1 as exti;
160pub use regs::gpio_v2 as gpio; 186pub use regs::gpio_v2 as gpio;
187pub use regs::spi_v1 as spi;
161pub use regs::syscfg_f4 as syscfg; 188pub use regs::syscfg_f4 as syscfg;
162pub use regs::usart_v1 as usart; 189pub use regs::usart_v1 as usart;
163mod regs; 190mod regs;
@@ -172,7 +199,7 @@ peripherals!(
172 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, 199 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5,
173 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, 200 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7,
174 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, 201 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9,
175 PH10, PH11, PH12, PH13, PH14, PH15, SYSCFG, USART1, USART2, USART6 202 PH10, PH11, PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART6
176); 203);
177 204
178pub mod interrupt { 205pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f401re.rs b/embassy-stm32/src/pac/stm32f401re.rs
index fe69202d8..34fa05d86 100644
--- a/embassy-stm32/src/pac/stm32f401re.rs
+++ b/embassy-stm32/src/pac/stm32f401re.rs
@@ -126,6 +126,32 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
126impl_gpio_pin!(PH13, 7, 13, EXTI13); 126impl_gpio_pin!(PH13, 7, 13, EXTI13);
127impl_gpio_pin!(PH14, 7, 14, EXTI14); 127impl_gpio_pin!(PH14, 7, 14, EXTI14);
128impl_gpio_pin!(PH15, 7, 15, EXTI15); 128impl_gpio_pin!(PH15, 7, 15, EXTI15);
129pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
130impl_spi!(SPI1, APB2);
131impl_spi_pin!(SPI1, SckPin, PA5, 5);
132impl_spi_pin!(SPI1, MisoPin, PA6, 5);
133impl_spi_pin!(SPI1, MosiPin, PA7, 5);
134impl_spi_pin!(SPI1, SckPin, PB3, 5);
135impl_spi_pin!(SPI1, MisoPin, PB4, 5);
136impl_spi_pin!(SPI1, MosiPin, PB5, 5);
137pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
138impl_spi!(SPI2, APB1);
139impl_spi_pin!(SPI2, SckPin, PB10, 5);
140impl_spi_pin!(SPI2, SckPin, PB13, 5);
141impl_spi_pin!(SPI2, MisoPin, PB14, 5);
142impl_spi_pin!(SPI2, MosiPin, PB15, 5);
143impl_spi_pin!(SPI2, MisoPin, PC2, 5);
144impl_spi_pin!(SPI2, MosiPin, PC3, 5);
145impl_spi_pin!(SPI2, SckPin, PD3, 5);
146pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
147impl_spi!(SPI3, APB1);
148impl_spi_pin!(SPI3, SckPin, PB3, 6);
149impl_spi_pin!(SPI3, MisoPin, PB4, 6);
150impl_spi_pin!(SPI3, MosiPin, PB5, 6);
151impl_spi_pin!(SPI3, SckPin, PC10, 6);
152impl_spi_pin!(SPI3, MisoPin, PC11, 6);
153impl_spi_pin!(SPI3, MosiPin, PC12, 6);
154impl_spi_pin!(SPI3, MosiPin, PD6, 5);
129pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 155pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
130pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 156pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
131impl_usart!(USART1); 157impl_usart!(USART1);
@@ -158,6 +184,7 @@ impl_usart_pin!(USART6, CkPin, PC8, 8);
158pub use regs::dma_v2 as dma; 184pub use regs::dma_v2 as dma;
159pub use regs::exti_v1 as exti; 185pub use regs::exti_v1 as exti;
160pub use regs::gpio_v2 as gpio; 186pub use regs::gpio_v2 as gpio;
187pub use regs::spi_v1 as spi;
161pub use regs::syscfg_f4 as syscfg; 188pub use regs::syscfg_f4 as syscfg;
162pub use regs::usart_v1 as usart; 189pub use regs::usart_v1 as usart;
163mod regs; 190mod regs;
@@ -172,7 +199,7 @@ peripherals!(
172 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, 199 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5,
173 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, 200 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7,
174 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, 201 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9,
175 PH10, PH11, PH12, PH13, PH14, PH15, SYSCFG, USART1, USART2, USART6 202 PH10, PH11, PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART6
176); 203);
177 204
178pub mod interrupt { 205pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f401vb.rs b/embassy-stm32/src/pac/stm32f401vb.rs
index fe69202d8..cc0e9bd85 100644
--- a/embassy-stm32/src/pac/stm32f401vb.rs
+++ b/embassy-stm32/src/pac/stm32f401vb.rs
@@ -126,6 +126,40 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
126impl_gpio_pin!(PH13, 7, 13, EXTI13); 126impl_gpio_pin!(PH13, 7, 13, EXTI13);
127impl_gpio_pin!(PH14, 7, 14, EXTI14); 127impl_gpio_pin!(PH14, 7, 14, EXTI14);
128impl_gpio_pin!(PH15, 7, 15, EXTI15); 128impl_gpio_pin!(PH15, 7, 15, EXTI15);
129pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
130impl_spi!(SPI1, APB2);
131impl_spi_pin!(SPI1, SckPin, PA5, 5);
132impl_spi_pin!(SPI1, MisoPin, PA6, 5);
133impl_spi_pin!(SPI1, MosiPin, PA7, 5);
134impl_spi_pin!(SPI1, SckPin, PB3, 5);
135impl_spi_pin!(SPI1, MisoPin, PB4, 5);
136impl_spi_pin!(SPI1, MosiPin, PB5, 5);
137pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
138impl_spi!(SPI2, APB1);
139impl_spi_pin!(SPI2, SckPin, PB10, 5);
140impl_spi_pin!(SPI2, SckPin, PB13, 5);
141impl_spi_pin!(SPI2, MisoPin, PB14, 5);
142impl_spi_pin!(SPI2, MosiPin, PB15, 5);
143impl_spi_pin!(SPI2, MisoPin, PC2, 5);
144impl_spi_pin!(SPI2, MosiPin, PC3, 5);
145impl_spi_pin!(SPI2, SckPin, PD3, 5);
146pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
147impl_spi!(SPI3, APB1);
148impl_spi_pin!(SPI3, SckPin, PB3, 6);
149impl_spi_pin!(SPI3, MisoPin, PB4, 6);
150impl_spi_pin!(SPI3, MosiPin, PB5, 6);
151impl_spi_pin!(SPI3, SckPin, PC10, 6);
152impl_spi_pin!(SPI3, MisoPin, PC11, 6);
153impl_spi_pin!(SPI3, MosiPin, PC12, 6);
154impl_spi_pin!(SPI3, MosiPin, PD6, 5);
155pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
156impl_spi!(SPI4, APB2);
157impl_spi_pin!(SPI4, SckPin, PE12, 5);
158impl_spi_pin!(SPI4, MisoPin, PE13, 5);
159impl_spi_pin!(SPI4, MosiPin, PE14, 5);
160impl_spi_pin!(SPI4, SckPin, PE2, 5);
161impl_spi_pin!(SPI4, MisoPin, PE5, 5);
162impl_spi_pin!(SPI4, MosiPin, PE6, 5);
129pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 163pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
130pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 164pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
131impl_usart!(USART1); 165impl_usart!(USART1);
@@ -158,6 +192,7 @@ impl_usart_pin!(USART6, CkPin, PC8, 8);
158pub use regs::dma_v2 as dma; 192pub use regs::dma_v2 as dma;
159pub use regs::exti_v1 as exti; 193pub use regs::exti_v1 as exti;
160pub use regs::gpio_v2 as gpio; 194pub use regs::gpio_v2 as gpio;
195pub use regs::spi_v1 as spi;
161pub use regs::syscfg_f4 as syscfg; 196pub use regs::syscfg_f4 as syscfg;
162pub use regs::usart_v1 as usart; 197pub use regs::usart_v1 as usart;
163mod regs; 198mod regs;
@@ -172,7 +207,7 @@ peripherals!(
172 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, 207 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5,
173 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, 208 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7,
174 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, 209 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9,
175 PH10, PH11, PH12, PH13, PH14, PH15, SYSCFG, USART1, USART2, USART6 210 PH10, PH11, PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SPI4, SYSCFG, USART1, USART2, USART6
176); 211);
177 212
178pub mod interrupt { 213pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f401vc.rs b/embassy-stm32/src/pac/stm32f401vc.rs
index fe69202d8..cc0e9bd85 100644
--- a/embassy-stm32/src/pac/stm32f401vc.rs
+++ b/embassy-stm32/src/pac/stm32f401vc.rs
@@ -126,6 +126,40 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
126impl_gpio_pin!(PH13, 7, 13, EXTI13); 126impl_gpio_pin!(PH13, 7, 13, EXTI13);
127impl_gpio_pin!(PH14, 7, 14, EXTI14); 127impl_gpio_pin!(PH14, 7, 14, EXTI14);
128impl_gpio_pin!(PH15, 7, 15, EXTI15); 128impl_gpio_pin!(PH15, 7, 15, EXTI15);
129pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
130impl_spi!(SPI1, APB2);
131impl_spi_pin!(SPI1, SckPin, PA5, 5);
132impl_spi_pin!(SPI1, MisoPin, PA6, 5);
133impl_spi_pin!(SPI1, MosiPin, PA7, 5);
134impl_spi_pin!(SPI1, SckPin, PB3, 5);
135impl_spi_pin!(SPI1, MisoPin, PB4, 5);
136impl_spi_pin!(SPI1, MosiPin, PB5, 5);
137pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
138impl_spi!(SPI2, APB1);
139impl_spi_pin!(SPI2, SckPin, PB10, 5);
140impl_spi_pin!(SPI2, SckPin, PB13, 5);
141impl_spi_pin!(SPI2, MisoPin, PB14, 5);
142impl_spi_pin!(SPI2, MosiPin, PB15, 5);
143impl_spi_pin!(SPI2, MisoPin, PC2, 5);
144impl_spi_pin!(SPI2, MosiPin, PC3, 5);
145impl_spi_pin!(SPI2, SckPin, PD3, 5);
146pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
147impl_spi!(SPI3, APB1);
148impl_spi_pin!(SPI3, SckPin, PB3, 6);
149impl_spi_pin!(SPI3, MisoPin, PB4, 6);
150impl_spi_pin!(SPI3, MosiPin, PB5, 6);
151impl_spi_pin!(SPI3, SckPin, PC10, 6);
152impl_spi_pin!(SPI3, MisoPin, PC11, 6);
153impl_spi_pin!(SPI3, MosiPin, PC12, 6);
154impl_spi_pin!(SPI3, MosiPin, PD6, 5);
155pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
156impl_spi!(SPI4, APB2);
157impl_spi_pin!(SPI4, SckPin, PE12, 5);
158impl_spi_pin!(SPI4, MisoPin, PE13, 5);
159impl_spi_pin!(SPI4, MosiPin, PE14, 5);
160impl_spi_pin!(SPI4, SckPin, PE2, 5);
161impl_spi_pin!(SPI4, MisoPin, PE5, 5);
162impl_spi_pin!(SPI4, MosiPin, PE6, 5);
129pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 163pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
130pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 164pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
131impl_usart!(USART1); 165impl_usart!(USART1);
@@ -158,6 +192,7 @@ impl_usart_pin!(USART6, CkPin, PC8, 8);
158pub use regs::dma_v2 as dma; 192pub use regs::dma_v2 as dma;
159pub use regs::exti_v1 as exti; 193pub use regs::exti_v1 as exti;
160pub use regs::gpio_v2 as gpio; 194pub use regs::gpio_v2 as gpio;
195pub use regs::spi_v1 as spi;
161pub use regs::syscfg_f4 as syscfg; 196pub use regs::syscfg_f4 as syscfg;
162pub use regs::usart_v1 as usart; 197pub use regs::usart_v1 as usart;
163mod regs; 198mod regs;
@@ -172,7 +207,7 @@ peripherals!(
172 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, 207 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5,
173 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, 208 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7,
174 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, 209 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9,
175 PH10, PH11, PH12, PH13, PH14, PH15, SYSCFG, USART1, USART2, USART6 210 PH10, PH11, PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SPI4, SYSCFG, USART1, USART2, USART6
176); 211);
177 212
178pub mod interrupt { 213pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f401vd.rs b/embassy-stm32/src/pac/stm32f401vd.rs
index fe69202d8..cc0e9bd85 100644
--- a/embassy-stm32/src/pac/stm32f401vd.rs
+++ b/embassy-stm32/src/pac/stm32f401vd.rs
@@ -126,6 +126,40 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
126impl_gpio_pin!(PH13, 7, 13, EXTI13); 126impl_gpio_pin!(PH13, 7, 13, EXTI13);
127impl_gpio_pin!(PH14, 7, 14, EXTI14); 127impl_gpio_pin!(PH14, 7, 14, EXTI14);
128impl_gpio_pin!(PH15, 7, 15, EXTI15); 128impl_gpio_pin!(PH15, 7, 15, EXTI15);
129pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
130impl_spi!(SPI1, APB2);
131impl_spi_pin!(SPI1, SckPin, PA5, 5);
132impl_spi_pin!(SPI1, MisoPin, PA6, 5);
133impl_spi_pin!(SPI1, MosiPin, PA7, 5);
134impl_spi_pin!(SPI1, SckPin, PB3, 5);
135impl_spi_pin!(SPI1, MisoPin, PB4, 5);
136impl_spi_pin!(SPI1, MosiPin, PB5, 5);
137pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
138impl_spi!(SPI2, APB1);
139impl_spi_pin!(SPI2, SckPin, PB10, 5);
140impl_spi_pin!(SPI2, SckPin, PB13, 5);
141impl_spi_pin!(SPI2, MisoPin, PB14, 5);
142impl_spi_pin!(SPI2, MosiPin, PB15, 5);
143impl_spi_pin!(SPI2, MisoPin, PC2, 5);
144impl_spi_pin!(SPI2, MosiPin, PC3, 5);
145impl_spi_pin!(SPI2, SckPin, PD3, 5);
146pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
147impl_spi!(SPI3, APB1);
148impl_spi_pin!(SPI3, SckPin, PB3, 6);
149impl_spi_pin!(SPI3, MisoPin, PB4, 6);
150impl_spi_pin!(SPI3, MosiPin, PB5, 6);
151impl_spi_pin!(SPI3, SckPin, PC10, 6);
152impl_spi_pin!(SPI3, MisoPin, PC11, 6);
153impl_spi_pin!(SPI3, MosiPin, PC12, 6);
154impl_spi_pin!(SPI3, MosiPin, PD6, 5);
155pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
156impl_spi!(SPI4, APB2);
157impl_spi_pin!(SPI4, SckPin, PE12, 5);
158impl_spi_pin!(SPI4, MisoPin, PE13, 5);
159impl_spi_pin!(SPI4, MosiPin, PE14, 5);
160impl_spi_pin!(SPI4, SckPin, PE2, 5);
161impl_spi_pin!(SPI4, MisoPin, PE5, 5);
162impl_spi_pin!(SPI4, MosiPin, PE6, 5);
129pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 163pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
130pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 164pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
131impl_usart!(USART1); 165impl_usart!(USART1);
@@ -158,6 +192,7 @@ impl_usart_pin!(USART6, CkPin, PC8, 8);
158pub use regs::dma_v2 as dma; 192pub use regs::dma_v2 as dma;
159pub use regs::exti_v1 as exti; 193pub use regs::exti_v1 as exti;
160pub use regs::gpio_v2 as gpio; 194pub use regs::gpio_v2 as gpio;
195pub use regs::spi_v1 as spi;
161pub use regs::syscfg_f4 as syscfg; 196pub use regs::syscfg_f4 as syscfg;
162pub use regs::usart_v1 as usart; 197pub use regs::usart_v1 as usart;
163mod regs; 198mod regs;
@@ -172,7 +207,7 @@ peripherals!(
172 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, 207 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5,
173 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, 208 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7,
174 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, 209 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9,
175 PH10, PH11, PH12, PH13, PH14, PH15, SYSCFG, USART1, USART2, USART6 210 PH10, PH11, PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SPI4, SYSCFG, USART1, USART2, USART6
176); 211);
177 212
178pub mod interrupt { 213pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f401ve.rs b/embassy-stm32/src/pac/stm32f401ve.rs
index fe69202d8..cc0e9bd85 100644
--- a/embassy-stm32/src/pac/stm32f401ve.rs
+++ b/embassy-stm32/src/pac/stm32f401ve.rs
@@ -126,6 +126,40 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
126impl_gpio_pin!(PH13, 7, 13, EXTI13); 126impl_gpio_pin!(PH13, 7, 13, EXTI13);
127impl_gpio_pin!(PH14, 7, 14, EXTI14); 127impl_gpio_pin!(PH14, 7, 14, EXTI14);
128impl_gpio_pin!(PH15, 7, 15, EXTI15); 128impl_gpio_pin!(PH15, 7, 15, EXTI15);
129pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
130impl_spi!(SPI1, APB2);
131impl_spi_pin!(SPI1, SckPin, PA5, 5);
132impl_spi_pin!(SPI1, MisoPin, PA6, 5);
133impl_spi_pin!(SPI1, MosiPin, PA7, 5);
134impl_spi_pin!(SPI1, SckPin, PB3, 5);
135impl_spi_pin!(SPI1, MisoPin, PB4, 5);
136impl_spi_pin!(SPI1, MosiPin, PB5, 5);
137pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
138impl_spi!(SPI2, APB1);
139impl_spi_pin!(SPI2, SckPin, PB10, 5);
140impl_spi_pin!(SPI2, SckPin, PB13, 5);
141impl_spi_pin!(SPI2, MisoPin, PB14, 5);
142impl_spi_pin!(SPI2, MosiPin, PB15, 5);
143impl_spi_pin!(SPI2, MisoPin, PC2, 5);
144impl_spi_pin!(SPI2, MosiPin, PC3, 5);
145impl_spi_pin!(SPI2, SckPin, PD3, 5);
146pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
147impl_spi!(SPI3, APB1);
148impl_spi_pin!(SPI3, SckPin, PB3, 6);
149impl_spi_pin!(SPI3, MisoPin, PB4, 6);
150impl_spi_pin!(SPI3, MosiPin, PB5, 6);
151impl_spi_pin!(SPI3, SckPin, PC10, 6);
152impl_spi_pin!(SPI3, MisoPin, PC11, 6);
153impl_spi_pin!(SPI3, MosiPin, PC12, 6);
154impl_spi_pin!(SPI3, MosiPin, PD6, 5);
155pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
156impl_spi!(SPI4, APB2);
157impl_spi_pin!(SPI4, SckPin, PE12, 5);
158impl_spi_pin!(SPI4, MisoPin, PE13, 5);
159impl_spi_pin!(SPI4, MosiPin, PE14, 5);
160impl_spi_pin!(SPI4, SckPin, PE2, 5);
161impl_spi_pin!(SPI4, MisoPin, PE5, 5);
162impl_spi_pin!(SPI4, MosiPin, PE6, 5);
129pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 163pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
130pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 164pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
131impl_usart!(USART1); 165impl_usart!(USART1);
@@ -158,6 +192,7 @@ impl_usart_pin!(USART6, CkPin, PC8, 8);
158pub use regs::dma_v2 as dma; 192pub use regs::dma_v2 as dma;
159pub use regs::exti_v1 as exti; 193pub use regs::exti_v1 as exti;
160pub use regs::gpio_v2 as gpio; 194pub use regs::gpio_v2 as gpio;
195pub use regs::spi_v1 as spi;
161pub use regs::syscfg_f4 as syscfg; 196pub use regs::syscfg_f4 as syscfg;
162pub use regs::usart_v1 as usart; 197pub use regs::usart_v1 as usart;
163mod regs; 198mod regs;
@@ -172,7 +207,7 @@ peripherals!(
172 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, 207 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5,
173 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, 208 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7,
174 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, 209 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9,
175 PH10, PH11, PH12, PH13, PH14, PH15, SYSCFG, USART1, USART2, USART6 210 PH10, PH11, PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SPI4, SYSCFG, USART1, USART2, USART6
176); 211);
177 212
178pub mod interrupt { 213pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f405oe.rs b/embassy-stm32/src/pac/stm32f405oe.rs
index ef281f87c..60eadd64d 100644
--- a/embassy-stm32/src/pac/stm32f405oe.rs
+++ b/embassy-stm32/src/pac/stm32f405oe.rs
@@ -178,7 +178,34 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA5, 5);
185impl_spi_pin!(SPI1, MisoPin, PA6, 5);
186impl_spi_pin!(SPI1, MosiPin, PA7, 5);
187impl_spi_pin!(SPI1, SckPin, PB3, 5);
188impl_spi_pin!(SPI1, MisoPin, PB4, 5);
189impl_spi_pin!(SPI1, MosiPin, PB5, 5);
190pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
191impl_spi!(SPI2, APB1);
192impl_spi_pin!(SPI2, SckPin, PB10, 5);
193impl_spi_pin!(SPI2, SckPin, PB13, 5);
194impl_spi_pin!(SPI2, MisoPin, PB14, 5);
195impl_spi_pin!(SPI2, MosiPin, PB15, 5);
196impl_spi_pin!(SPI2, MisoPin, PC2, 5);
197impl_spi_pin!(SPI2, MosiPin, PC3, 5);
198impl_spi_pin!(SPI2, SckPin, PI1, 5);
199impl_spi_pin!(SPI2, MisoPin, PI2, 5);
200impl_spi_pin!(SPI2, MosiPin, PI3, 5);
201pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
202impl_spi!(SPI3, APB1);
203impl_spi_pin!(SPI3, SckPin, PB3, 6);
204impl_spi_pin!(SPI3, MisoPin, PB4, 6);
205impl_spi_pin!(SPI3, MosiPin, PB5, 6);
206impl_spi_pin!(SPI3, SckPin, PC10, 6);
207impl_spi_pin!(SPI3, MisoPin, PC11, 6);
208impl_spi_pin!(SPI3, MosiPin, PC12, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 209pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
183pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 210pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
184impl_usart!(USART1); 211impl_usart!(USART1);
@@ -232,6 +259,7 @@ pub use regs::dma_v2 as dma;
232pub use regs::exti_v1 as exti; 259pub use regs::exti_v1 as exti;
233pub use regs::gpio_v2 as gpio; 260pub use regs::gpio_v2 as gpio;
234pub use regs::rng_v1 as rng; 261pub use regs::rng_v1 as rng;
262pub use regs::spi_v1 as spi;
235pub use regs::syscfg_f4 as syscfg; 263pub use regs::syscfg_f4 as syscfg;
236pub use regs::usart_v1 as usart; 264pub use regs::usart_v1 as usart;
237mod regs; 265mod regs;
@@ -249,7 +277,7 @@ peripherals!(
249 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 277 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
250 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 278 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
251 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 279 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
252 PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3, USART6 280 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3, USART6
253); 281);
254 282
255pub mod interrupt { 283pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f405og.rs b/embassy-stm32/src/pac/stm32f405og.rs
index ef281f87c..60eadd64d 100644
--- a/embassy-stm32/src/pac/stm32f405og.rs
+++ b/embassy-stm32/src/pac/stm32f405og.rs
@@ -178,7 +178,34 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA5, 5);
185impl_spi_pin!(SPI1, MisoPin, PA6, 5);
186impl_spi_pin!(SPI1, MosiPin, PA7, 5);
187impl_spi_pin!(SPI1, SckPin, PB3, 5);
188impl_spi_pin!(SPI1, MisoPin, PB4, 5);
189impl_spi_pin!(SPI1, MosiPin, PB5, 5);
190pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
191impl_spi!(SPI2, APB1);
192impl_spi_pin!(SPI2, SckPin, PB10, 5);
193impl_spi_pin!(SPI2, SckPin, PB13, 5);
194impl_spi_pin!(SPI2, MisoPin, PB14, 5);
195impl_spi_pin!(SPI2, MosiPin, PB15, 5);
196impl_spi_pin!(SPI2, MisoPin, PC2, 5);
197impl_spi_pin!(SPI2, MosiPin, PC3, 5);
198impl_spi_pin!(SPI2, SckPin, PI1, 5);
199impl_spi_pin!(SPI2, MisoPin, PI2, 5);
200impl_spi_pin!(SPI2, MosiPin, PI3, 5);
201pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
202impl_spi!(SPI3, APB1);
203impl_spi_pin!(SPI3, SckPin, PB3, 6);
204impl_spi_pin!(SPI3, MisoPin, PB4, 6);
205impl_spi_pin!(SPI3, MosiPin, PB5, 6);
206impl_spi_pin!(SPI3, SckPin, PC10, 6);
207impl_spi_pin!(SPI3, MisoPin, PC11, 6);
208impl_spi_pin!(SPI3, MosiPin, PC12, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 209pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
183pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 210pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
184impl_usart!(USART1); 211impl_usart!(USART1);
@@ -232,6 +259,7 @@ pub use regs::dma_v2 as dma;
232pub use regs::exti_v1 as exti; 259pub use regs::exti_v1 as exti;
233pub use regs::gpio_v2 as gpio; 260pub use regs::gpio_v2 as gpio;
234pub use regs::rng_v1 as rng; 261pub use regs::rng_v1 as rng;
262pub use regs::spi_v1 as spi;
235pub use regs::syscfg_f4 as syscfg; 263pub use regs::syscfg_f4 as syscfg;
236pub use regs::usart_v1 as usart; 264pub use regs::usart_v1 as usart;
237mod regs; 265mod regs;
@@ -249,7 +277,7 @@ peripherals!(
249 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 277 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
250 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 278 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
251 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 279 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
252 PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3, USART6 280 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3, USART6
253); 281);
254 282
255pub mod interrupt { 283pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f405rg.rs b/embassy-stm32/src/pac/stm32f405rg.rs
index ef281f87c..60eadd64d 100644
--- a/embassy-stm32/src/pac/stm32f405rg.rs
+++ b/embassy-stm32/src/pac/stm32f405rg.rs
@@ -178,7 +178,34 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA5, 5);
185impl_spi_pin!(SPI1, MisoPin, PA6, 5);
186impl_spi_pin!(SPI1, MosiPin, PA7, 5);
187impl_spi_pin!(SPI1, SckPin, PB3, 5);
188impl_spi_pin!(SPI1, MisoPin, PB4, 5);
189impl_spi_pin!(SPI1, MosiPin, PB5, 5);
190pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
191impl_spi!(SPI2, APB1);
192impl_spi_pin!(SPI2, SckPin, PB10, 5);
193impl_spi_pin!(SPI2, SckPin, PB13, 5);
194impl_spi_pin!(SPI2, MisoPin, PB14, 5);
195impl_spi_pin!(SPI2, MosiPin, PB15, 5);
196impl_spi_pin!(SPI2, MisoPin, PC2, 5);
197impl_spi_pin!(SPI2, MosiPin, PC3, 5);
198impl_spi_pin!(SPI2, SckPin, PI1, 5);
199impl_spi_pin!(SPI2, MisoPin, PI2, 5);
200impl_spi_pin!(SPI2, MosiPin, PI3, 5);
201pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
202impl_spi!(SPI3, APB1);
203impl_spi_pin!(SPI3, SckPin, PB3, 6);
204impl_spi_pin!(SPI3, MisoPin, PB4, 6);
205impl_spi_pin!(SPI3, MosiPin, PB5, 6);
206impl_spi_pin!(SPI3, SckPin, PC10, 6);
207impl_spi_pin!(SPI3, MisoPin, PC11, 6);
208impl_spi_pin!(SPI3, MosiPin, PC12, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 209pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
183pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 210pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
184impl_usart!(USART1); 211impl_usart!(USART1);
@@ -232,6 +259,7 @@ pub use regs::dma_v2 as dma;
232pub use regs::exti_v1 as exti; 259pub use regs::exti_v1 as exti;
233pub use regs::gpio_v2 as gpio; 260pub use regs::gpio_v2 as gpio;
234pub use regs::rng_v1 as rng; 261pub use regs::rng_v1 as rng;
262pub use regs::spi_v1 as spi;
235pub use regs::syscfg_f4 as syscfg; 263pub use regs::syscfg_f4 as syscfg;
236pub use regs::usart_v1 as usart; 264pub use regs::usart_v1 as usart;
237mod regs; 265mod regs;
@@ -249,7 +277,7 @@ peripherals!(
249 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 277 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
250 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 278 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
251 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 279 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
252 PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3, USART6 280 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3, USART6
253); 281);
254 282
255pub mod interrupt { 283pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f405vg.rs b/embassy-stm32/src/pac/stm32f405vg.rs
index ef281f87c..60eadd64d 100644
--- a/embassy-stm32/src/pac/stm32f405vg.rs
+++ b/embassy-stm32/src/pac/stm32f405vg.rs
@@ -178,7 +178,34 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA5, 5);
185impl_spi_pin!(SPI1, MisoPin, PA6, 5);
186impl_spi_pin!(SPI1, MosiPin, PA7, 5);
187impl_spi_pin!(SPI1, SckPin, PB3, 5);
188impl_spi_pin!(SPI1, MisoPin, PB4, 5);
189impl_spi_pin!(SPI1, MosiPin, PB5, 5);
190pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
191impl_spi!(SPI2, APB1);
192impl_spi_pin!(SPI2, SckPin, PB10, 5);
193impl_spi_pin!(SPI2, SckPin, PB13, 5);
194impl_spi_pin!(SPI2, MisoPin, PB14, 5);
195impl_spi_pin!(SPI2, MosiPin, PB15, 5);
196impl_spi_pin!(SPI2, MisoPin, PC2, 5);
197impl_spi_pin!(SPI2, MosiPin, PC3, 5);
198impl_spi_pin!(SPI2, SckPin, PI1, 5);
199impl_spi_pin!(SPI2, MisoPin, PI2, 5);
200impl_spi_pin!(SPI2, MosiPin, PI3, 5);
201pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
202impl_spi!(SPI3, APB1);
203impl_spi_pin!(SPI3, SckPin, PB3, 6);
204impl_spi_pin!(SPI3, MisoPin, PB4, 6);
205impl_spi_pin!(SPI3, MosiPin, PB5, 6);
206impl_spi_pin!(SPI3, SckPin, PC10, 6);
207impl_spi_pin!(SPI3, MisoPin, PC11, 6);
208impl_spi_pin!(SPI3, MosiPin, PC12, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 209pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
183pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 210pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
184impl_usart!(USART1); 211impl_usart!(USART1);
@@ -232,6 +259,7 @@ pub use regs::dma_v2 as dma;
232pub use regs::exti_v1 as exti; 259pub use regs::exti_v1 as exti;
233pub use regs::gpio_v2 as gpio; 260pub use regs::gpio_v2 as gpio;
234pub use regs::rng_v1 as rng; 261pub use regs::rng_v1 as rng;
262pub use regs::spi_v1 as spi;
235pub use regs::syscfg_f4 as syscfg; 263pub use regs::syscfg_f4 as syscfg;
236pub use regs::usart_v1 as usart; 264pub use regs::usart_v1 as usart;
237mod regs; 265mod regs;
@@ -249,7 +277,7 @@ peripherals!(
249 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 277 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
250 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 278 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
251 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 279 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
252 PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3, USART6 280 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3, USART6
253); 281);
254 282
255pub mod interrupt { 283pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f405zg.rs b/embassy-stm32/src/pac/stm32f405zg.rs
index ef281f87c..60eadd64d 100644
--- a/embassy-stm32/src/pac/stm32f405zg.rs
+++ b/embassy-stm32/src/pac/stm32f405zg.rs
@@ -178,7 +178,34 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA5, 5);
185impl_spi_pin!(SPI1, MisoPin, PA6, 5);
186impl_spi_pin!(SPI1, MosiPin, PA7, 5);
187impl_spi_pin!(SPI1, SckPin, PB3, 5);
188impl_spi_pin!(SPI1, MisoPin, PB4, 5);
189impl_spi_pin!(SPI1, MosiPin, PB5, 5);
190pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
191impl_spi!(SPI2, APB1);
192impl_spi_pin!(SPI2, SckPin, PB10, 5);
193impl_spi_pin!(SPI2, SckPin, PB13, 5);
194impl_spi_pin!(SPI2, MisoPin, PB14, 5);
195impl_spi_pin!(SPI2, MosiPin, PB15, 5);
196impl_spi_pin!(SPI2, MisoPin, PC2, 5);
197impl_spi_pin!(SPI2, MosiPin, PC3, 5);
198impl_spi_pin!(SPI2, SckPin, PI1, 5);
199impl_spi_pin!(SPI2, MisoPin, PI2, 5);
200impl_spi_pin!(SPI2, MosiPin, PI3, 5);
201pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
202impl_spi!(SPI3, APB1);
203impl_spi_pin!(SPI3, SckPin, PB3, 6);
204impl_spi_pin!(SPI3, MisoPin, PB4, 6);
205impl_spi_pin!(SPI3, MosiPin, PB5, 6);
206impl_spi_pin!(SPI3, SckPin, PC10, 6);
207impl_spi_pin!(SPI3, MisoPin, PC11, 6);
208impl_spi_pin!(SPI3, MosiPin, PC12, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 209pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
183pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 210pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
184impl_usart!(USART1); 211impl_usart!(USART1);
@@ -232,6 +259,7 @@ pub use regs::dma_v2 as dma;
232pub use regs::exti_v1 as exti; 259pub use regs::exti_v1 as exti;
233pub use regs::gpio_v2 as gpio; 260pub use regs::gpio_v2 as gpio;
234pub use regs::rng_v1 as rng; 261pub use regs::rng_v1 as rng;
262pub use regs::spi_v1 as spi;
235pub use regs::syscfg_f4 as syscfg; 263pub use regs::syscfg_f4 as syscfg;
236pub use regs::usart_v1 as usart; 264pub use regs::usart_v1 as usart;
237mod regs; 265mod regs;
@@ -249,7 +277,7 @@ peripherals!(
249 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 277 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
250 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 278 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
251 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 279 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
252 PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3, USART6 280 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3, USART6
253); 281);
254 282
255pub mod interrupt { 283pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f407ie.rs b/embassy-stm32/src/pac/stm32f407ie.rs
index e331efc83..b02ca8d30 100644
--- a/embassy-stm32/src/pac/stm32f407ie.rs
+++ b/embassy-stm32/src/pac/stm32f407ie.rs
@@ -178,7 +178,34 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA5, 5);
185impl_spi_pin!(SPI1, MisoPin, PA6, 5);
186impl_spi_pin!(SPI1, MosiPin, PA7, 5);
187impl_spi_pin!(SPI1, SckPin, PB3, 5);
188impl_spi_pin!(SPI1, MisoPin, PB4, 5);
189impl_spi_pin!(SPI1, MosiPin, PB5, 5);
190pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
191impl_spi!(SPI2, APB1);
192impl_spi_pin!(SPI2, SckPin, PB10, 5);
193impl_spi_pin!(SPI2, SckPin, PB13, 5);
194impl_spi_pin!(SPI2, MisoPin, PB14, 5);
195impl_spi_pin!(SPI2, MosiPin, PB15, 5);
196impl_spi_pin!(SPI2, MisoPin, PC2, 5);
197impl_spi_pin!(SPI2, MosiPin, PC3, 5);
198impl_spi_pin!(SPI2, SckPin, PI1, 5);
199impl_spi_pin!(SPI2, MisoPin, PI2, 5);
200impl_spi_pin!(SPI2, MosiPin, PI3, 5);
201pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
202impl_spi!(SPI3, APB1);
203impl_spi_pin!(SPI3, SckPin, PB3, 6);
204impl_spi_pin!(SPI3, MisoPin, PB4, 6);
205impl_spi_pin!(SPI3, MosiPin, PB5, 6);
206impl_spi_pin!(SPI3, SckPin, PC10, 6);
207impl_spi_pin!(SPI3, MisoPin, PC11, 6);
208impl_spi_pin!(SPI3, MosiPin, PC12, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 209pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
183pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 210pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
184impl_usart!(USART1); 211impl_usart!(USART1);
@@ -232,6 +259,7 @@ pub use regs::dma_v2 as dma;
232pub use regs::exti_v1 as exti; 259pub use regs::exti_v1 as exti;
233pub use regs::gpio_v2 as gpio; 260pub use regs::gpio_v2 as gpio;
234pub use regs::rng_v1 as rng; 261pub use regs::rng_v1 as rng;
262pub use regs::spi_v1 as spi;
235pub use regs::syscfg_f4 as syscfg; 263pub use regs::syscfg_f4 as syscfg;
236pub use regs::usart_v1 as usart; 264pub use regs::usart_v1 as usart;
237mod regs; 265mod regs;
@@ -249,7 +277,7 @@ peripherals!(
249 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 277 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
250 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 278 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
251 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 279 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
252 PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3, USART6 280 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3, USART6
253); 281);
254 282
255pub mod interrupt { 283pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f407ig.rs b/embassy-stm32/src/pac/stm32f407ig.rs
index e331efc83..b02ca8d30 100644
--- a/embassy-stm32/src/pac/stm32f407ig.rs
+++ b/embassy-stm32/src/pac/stm32f407ig.rs
@@ -178,7 +178,34 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA5, 5);
185impl_spi_pin!(SPI1, MisoPin, PA6, 5);
186impl_spi_pin!(SPI1, MosiPin, PA7, 5);
187impl_spi_pin!(SPI1, SckPin, PB3, 5);
188impl_spi_pin!(SPI1, MisoPin, PB4, 5);
189impl_spi_pin!(SPI1, MosiPin, PB5, 5);
190pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
191impl_spi!(SPI2, APB1);
192impl_spi_pin!(SPI2, SckPin, PB10, 5);
193impl_spi_pin!(SPI2, SckPin, PB13, 5);
194impl_spi_pin!(SPI2, MisoPin, PB14, 5);
195impl_spi_pin!(SPI2, MosiPin, PB15, 5);
196impl_spi_pin!(SPI2, MisoPin, PC2, 5);
197impl_spi_pin!(SPI2, MosiPin, PC3, 5);
198impl_spi_pin!(SPI2, SckPin, PI1, 5);
199impl_spi_pin!(SPI2, MisoPin, PI2, 5);
200impl_spi_pin!(SPI2, MosiPin, PI3, 5);
201pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
202impl_spi!(SPI3, APB1);
203impl_spi_pin!(SPI3, SckPin, PB3, 6);
204impl_spi_pin!(SPI3, MisoPin, PB4, 6);
205impl_spi_pin!(SPI3, MosiPin, PB5, 6);
206impl_spi_pin!(SPI3, SckPin, PC10, 6);
207impl_spi_pin!(SPI3, MisoPin, PC11, 6);
208impl_spi_pin!(SPI3, MosiPin, PC12, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 209pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
183pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 210pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
184impl_usart!(USART1); 211impl_usart!(USART1);
@@ -232,6 +259,7 @@ pub use regs::dma_v2 as dma;
232pub use regs::exti_v1 as exti; 259pub use regs::exti_v1 as exti;
233pub use regs::gpio_v2 as gpio; 260pub use regs::gpio_v2 as gpio;
234pub use regs::rng_v1 as rng; 261pub use regs::rng_v1 as rng;
262pub use regs::spi_v1 as spi;
235pub use regs::syscfg_f4 as syscfg; 263pub use regs::syscfg_f4 as syscfg;
236pub use regs::usart_v1 as usart; 264pub use regs::usart_v1 as usart;
237mod regs; 265mod regs;
@@ -249,7 +277,7 @@ peripherals!(
249 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 277 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
250 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 278 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
251 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 279 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
252 PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3, USART6 280 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3, USART6
253); 281);
254 282
255pub mod interrupt { 283pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f407ve.rs b/embassy-stm32/src/pac/stm32f407ve.rs
index e331efc83..b02ca8d30 100644
--- a/embassy-stm32/src/pac/stm32f407ve.rs
+++ b/embassy-stm32/src/pac/stm32f407ve.rs
@@ -178,7 +178,34 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA5, 5);
185impl_spi_pin!(SPI1, MisoPin, PA6, 5);
186impl_spi_pin!(SPI1, MosiPin, PA7, 5);
187impl_spi_pin!(SPI1, SckPin, PB3, 5);
188impl_spi_pin!(SPI1, MisoPin, PB4, 5);
189impl_spi_pin!(SPI1, MosiPin, PB5, 5);
190pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
191impl_spi!(SPI2, APB1);
192impl_spi_pin!(SPI2, SckPin, PB10, 5);
193impl_spi_pin!(SPI2, SckPin, PB13, 5);
194impl_spi_pin!(SPI2, MisoPin, PB14, 5);
195impl_spi_pin!(SPI2, MosiPin, PB15, 5);
196impl_spi_pin!(SPI2, MisoPin, PC2, 5);
197impl_spi_pin!(SPI2, MosiPin, PC3, 5);
198impl_spi_pin!(SPI2, SckPin, PI1, 5);
199impl_spi_pin!(SPI2, MisoPin, PI2, 5);
200impl_spi_pin!(SPI2, MosiPin, PI3, 5);
201pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
202impl_spi!(SPI3, APB1);
203impl_spi_pin!(SPI3, SckPin, PB3, 6);
204impl_spi_pin!(SPI3, MisoPin, PB4, 6);
205impl_spi_pin!(SPI3, MosiPin, PB5, 6);
206impl_spi_pin!(SPI3, SckPin, PC10, 6);
207impl_spi_pin!(SPI3, MisoPin, PC11, 6);
208impl_spi_pin!(SPI3, MosiPin, PC12, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 209pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
183pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 210pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
184impl_usart!(USART1); 211impl_usart!(USART1);
@@ -232,6 +259,7 @@ pub use regs::dma_v2 as dma;
232pub use regs::exti_v1 as exti; 259pub use regs::exti_v1 as exti;
233pub use regs::gpio_v2 as gpio; 260pub use regs::gpio_v2 as gpio;
234pub use regs::rng_v1 as rng; 261pub use regs::rng_v1 as rng;
262pub use regs::spi_v1 as spi;
235pub use regs::syscfg_f4 as syscfg; 263pub use regs::syscfg_f4 as syscfg;
236pub use regs::usart_v1 as usart; 264pub use regs::usart_v1 as usart;
237mod regs; 265mod regs;
@@ -249,7 +277,7 @@ peripherals!(
249 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 277 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
250 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 278 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
251 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 279 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
252 PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3, USART6 280 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3, USART6
253); 281);
254 282
255pub mod interrupt { 283pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f407vg.rs b/embassy-stm32/src/pac/stm32f407vg.rs
index e331efc83..b02ca8d30 100644
--- a/embassy-stm32/src/pac/stm32f407vg.rs
+++ b/embassy-stm32/src/pac/stm32f407vg.rs
@@ -178,7 +178,34 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA5, 5);
185impl_spi_pin!(SPI1, MisoPin, PA6, 5);
186impl_spi_pin!(SPI1, MosiPin, PA7, 5);
187impl_spi_pin!(SPI1, SckPin, PB3, 5);
188impl_spi_pin!(SPI1, MisoPin, PB4, 5);
189impl_spi_pin!(SPI1, MosiPin, PB5, 5);
190pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
191impl_spi!(SPI2, APB1);
192impl_spi_pin!(SPI2, SckPin, PB10, 5);
193impl_spi_pin!(SPI2, SckPin, PB13, 5);
194impl_spi_pin!(SPI2, MisoPin, PB14, 5);
195impl_spi_pin!(SPI2, MosiPin, PB15, 5);
196impl_spi_pin!(SPI2, MisoPin, PC2, 5);
197impl_spi_pin!(SPI2, MosiPin, PC3, 5);
198impl_spi_pin!(SPI2, SckPin, PI1, 5);
199impl_spi_pin!(SPI2, MisoPin, PI2, 5);
200impl_spi_pin!(SPI2, MosiPin, PI3, 5);
201pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
202impl_spi!(SPI3, APB1);
203impl_spi_pin!(SPI3, SckPin, PB3, 6);
204impl_spi_pin!(SPI3, MisoPin, PB4, 6);
205impl_spi_pin!(SPI3, MosiPin, PB5, 6);
206impl_spi_pin!(SPI3, SckPin, PC10, 6);
207impl_spi_pin!(SPI3, MisoPin, PC11, 6);
208impl_spi_pin!(SPI3, MosiPin, PC12, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 209pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
183pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 210pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
184impl_usart!(USART1); 211impl_usart!(USART1);
@@ -232,6 +259,7 @@ pub use regs::dma_v2 as dma;
232pub use regs::exti_v1 as exti; 259pub use regs::exti_v1 as exti;
233pub use regs::gpio_v2 as gpio; 260pub use regs::gpio_v2 as gpio;
234pub use regs::rng_v1 as rng; 261pub use regs::rng_v1 as rng;
262pub use regs::spi_v1 as spi;
235pub use regs::syscfg_f4 as syscfg; 263pub use regs::syscfg_f4 as syscfg;
236pub use regs::usart_v1 as usart; 264pub use regs::usart_v1 as usart;
237mod regs; 265mod regs;
@@ -249,7 +277,7 @@ peripherals!(
249 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 277 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
250 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 278 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
251 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 279 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
252 PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3, USART6 280 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3, USART6
253); 281);
254 282
255pub mod interrupt { 283pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f407ze.rs b/embassy-stm32/src/pac/stm32f407ze.rs
index e331efc83..b02ca8d30 100644
--- a/embassy-stm32/src/pac/stm32f407ze.rs
+++ b/embassy-stm32/src/pac/stm32f407ze.rs
@@ -178,7 +178,34 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA5, 5);
185impl_spi_pin!(SPI1, MisoPin, PA6, 5);
186impl_spi_pin!(SPI1, MosiPin, PA7, 5);
187impl_spi_pin!(SPI1, SckPin, PB3, 5);
188impl_spi_pin!(SPI1, MisoPin, PB4, 5);
189impl_spi_pin!(SPI1, MosiPin, PB5, 5);
190pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
191impl_spi!(SPI2, APB1);
192impl_spi_pin!(SPI2, SckPin, PB10, 5);
193impl_spi_pin!(SPI2, SckPin, PB13, 5);
194impl_spi_pin!(SPI2, MisoPin, PB14, 5);
195impl_spi_pin!(SPI2, MosiPin, PB15, 5);
196impl_spi_pin!(SPI2, MisoPin, PC2, 5);
197impl_spi_pin!(SPI2, MosiPin, PC3, 5);
198impl_spi_pin!(SPI2, SckPin, PI1, 5);
199impl_spi_pin!(SPI2, MisoPin, PI2, 5);
200impl_spi_pin!(SPI2, MosiPin, PI3, 5);
201pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
202impl_spi!(SPI3, APB1);
203impl_spi_pin!(SPI3, SckPin, PB3, 6);
204impl_spi_pin!(SPI3, MisoPin, PB4, 6);
205impl_spi_pin!(SPI3, MosiPin, PB5, 6);
206impl_spi_pin!(SPI3, SckPin, PC10, 6);
207impl_spi_pin!(SPI3, MisoPin, PC11, 6);
208impl_spi_pin!(SPI3, MosiPin, PC12, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 209pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
183pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 210pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
184impl_usart!(USART1); 211impl_usart!(USART1);
@@ -232,6 +259,7 @@ pub use regs::dma_v2 as dma;
232pub use regs::exti_v1 as exti; 259pub use regs::exti_v1 as exti;
233pub use regs::gpio_v2 as gpio; 260pub use regs::gpio_v2 as gpio;
234pub use regs::rng_v1 as rng; 261pub use regs::rng_v1 as rng;
262pub use regs::spi_v1 as spi;
235pub use regs::syscfg_f4 as syscfg; 263pub use regs::syscfg_f4 as syscfg;
236pub use regs::usart_v1 as usart; 264pub use regs::usart_v1 as usart;
237mod regs; 265mod regs;
@@ -249,7 +277,7 @@ peripherals!(
249 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 277 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
250 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 278 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
251 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 279 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
252 PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3, USART6 280 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3, USART6
253); 281);
254 282
255pub mod interrupt { 283pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f407zg.rs b/embassy-stm32/src/pac/stm32f407zg.rs
index e331efc83..b02ca8d30 100644
--- a/embassy-stm32/src/pac/stm32f407zg.rs
+++ b/embassy-stm32/src/pac/stm32f407zg.rs
@@ -178,7 +178,34 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA5, 5);
185impl_spi_pin!(SPI1, MisoPin, PA6, 5);
186impl_spi_pin!(SPI1, MosiPin, PA7, 5);
187impl_spi_pin!(SPI1, SckPin, PB3, 5);
188impl_spi_pin!(SPI1, MisoPin, PB4, 5);
189impl_spi_pin!(SPI1, MosiPin, PB5, 5);
190pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
191impl_spi!(SPI2, APB1);
192impl_spi_pin!(SPI2, SckPin, PB10, 5);
193impl_spi_pin!(SPI2, SckPin, PB13, 5);
194impl_spi_pin!(SPI2, MisoPin, PB14, 5);
195impl_spi_pin!(SPI2, MosiPin, PB15, 5);
196impl_spi_pin!(SPI2, MisoPin, PC2, 5);
197impl_spi_pin!(SPI2, MosiPin, PC3, 5);
198impl_spi_pin!(SPI2, SckPin, PI1, 5);
199impl_spi_pin!(SPI2, MisoPin, PI2, 5);
200impl_spi_pin!(SPI2, MosiPin, PI3, 5);
201pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
202impl_spi!(SPI3, APB1);
203impl_spi_pin!(SPI3, SckPin, PB3, 6);
204impl_spi_pin!(SPI3, MisoPin, PB4, 6);
205impl_spi_pin!(SPI3, MosiPin, PB5, 6);
206impl_spi_pin!(SPI3, SckPin, PC10, 6);
207impl_spi_pin!(SPI3, MisoPin, PC11, 6);
208impl_spi_pin!(SPI3, MosiPin, PC12, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 209pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
183pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 210pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
184impl_usart!(USART1); 211impl_usart!(USART1);
@@ -232,6 +259,7 @@ pub use regs::dma_v2 as dma;
232pub use regs::exti_v1 as exti; 259pub use regs::exti_v1 as exti;
233pub use regs::gpio_v2 as gpio; 260pub use regs::gpio_v2 as gpio;
234pub use regs::rng_v1 as rng; 261pub use regs::rng_v1 as rng;
262pub use regs::spi_v1 as spi;
235pub use regs::syscfg_f4 as syscfg; 263pub use regs::syscfg_f4 as syscfg;
236pub use regs::usart_v1 as usart; 264pub use regs::usart_v1 as usart;
237mod regs; 265mod regs;
@@ -249,7 +277,7 @@ peripherals!(
249 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 277 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
250 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 278 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
251 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 279 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
252 PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3, USART6 280 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3, USART6
253); 281);
254 282
255pub mod interrupt { 283pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f410c8.rs b/embassy-stm32/src/pac/stm32f410c8.rs
index 0ade08eff..938c0c052 100644
--- a/embassy-stm32/src/pac/stm32f410c8.rs
+++ b/embassy-stm32/src/pac/stm32f410c8.rs
@@ -93,7 +93,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
93impl_gpio_pin!(PH14, 7, 14, EXTI14); 93impl_gpio_pin!(PH14, 7, 14, EXTI14);
94impl_gpio_pin!(PH15, 7, 15, EXTI15); 94impl_gpio_pin!(PH15, 7, 15, EXTI15);
95pub const RNG: rng::Rng = rng::Rng(0x40080000 as _); 95pub const RNG: rng::Rng = rng::Rng(0x40080000 as _);
96impl_rng!(RNG); 96impl_rng!(RNG, RNG);
97pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 97pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
98pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 98pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
99impl_usart!(USART1); 99impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f410cb.rs b/embassy-stm32/src/pac/stm32f410cb.rs
index 0ade08eff..938c0c052 100644
--- a/embassy-stm32/src/pac/stm32f410cb.rs
+++ b/embassy-stm32/src/pac/stm32f410cb.rs
@@ -93,7 +93,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
93impl_gpio_pin!(PH14, 7, 14, EXTI14); 93impl_gpio_pin!(PH14, 7, 14, EXTI14);
94impl_gpio_pin!(PH15, 7, 15, EXTI15); 94impl_gpio_pin!(PH15, 7, 15, EXTI15);
95pub const RNG: rng::Rng = rng::Rng(0x40080000 as _); 95pub const RNG: rng::Rng = rng::Rng(0x40080000 as _);
96impl_rng!(RNG); 96impl_rng!(RNG, RNG);
97pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 97pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
98pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 98pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
99impl_usart!(USART1); 99impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f410r8.rs b/embassy-stm32/src/pac/stm32f410r8.rs
index 0ade08eff..938c0c052 100644
--- a/embassy-stm32/src/pac/stm32f410r8.rs
+++ b/embassy-stm32/src/pac/stm32f410r8.rs
@@ -93,7 +93,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
93impl_gpio_pin!(PH14, 7, 14, EXTI14); 93impl_gpio_pin!(PH14, 7, 14, EXTI14);
94impl_gpio_pin!(PH15, 7, 15, EXTI15); 94impl_gpio_pin!(PH15, 7, 15, EXTI15);
95pub const RNG: rng::Rng = rng::Rng(0x40080000 as _); 95pub const RNG: rng::Rng = rng::Rng(0x40080000 as _);
96impl_rng!(RNG); 96impl_rng!(RNG, RNG);
97pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 97pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
98pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 98pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
99impl_usart!(USART1); 99impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f410rb.rs b/embassy-stm32/src/pac/stm32f410rb.rs
index 0ade08eff..938c0c052 100644
--- a/embassy-stm32/src/pac/stm32f410rb.rs
+++ b/embassy-stm32/src/pac/stm32f410rb.rs
@@ -93,7 +93,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
93impl_gpio_pin!(PH14, 7, 14, EXTI14); 93impl_gpio_pin!(PH14, 7, 14, EXTI14);
94impl_gpio_pin!(PH15, 7, 15, EXTI15); 94impl_gpio_pin!(PH15, 7, 15, EXTI15);
95pub const RNG: rng::Rng = rng::Rng(0x40080000 as _); 95pub const RNG: rng::Rng = rng::Rng(0x40080000 as _);
96impl_rng!(RNG); 96impl_rng!(RNG, RNG);
97pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 97pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
98pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 98pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
99impl_usart!(USART1); 99impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f410t8.rs b/embassy-stm32/src/pac/stm32f410t8.rs
index 01c938453..74d238a1c 100644
--- a/embassy-stm32/src/pac/stm32f410t8.rs
+++ b/embassy-stm32/src/pac/stm32f410t8.rs
@@ -93,7 +93,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
93impl_gpio_pin!(PH14, 7, 14, EXTI14); 93impl_gpio_pin!(PH14, 7, 14, EXTI14);
94impl_gpio_pin!(PH15, 7, 15, EXTI15); 94impl_gpio_pin!(PH15, 7, 15, EXTI15);
95pub const RNG: rng::Rng = rng::Rng(0x40080000 as _); 95pub const RNG: rng::Rng = rng::Rng(0x40080000 as _);
96impl_rng!(RNG); 96impl_rng!(RNG, RNG);
97pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 97pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
98pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 98pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
99impl_usart!(USART1); 99impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f410tb.rs b/embassy-stm32/src/pac/stm32f410tb.rs
index 01c938453..74d238a1c 100644
--- a/embassy-stm32/src/pac/stm32f410tb.rs
+++ b/embassy-stm32/src/pac/stm32f410tb.rs
@@ -93,7 +93,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
93impl_gpio_pin!(PH14, 7, 14, EXTI14); 93impl_gpio_pin!(PH14, 7, 14, EXTI14);
94impl_gpio_pin!(PH15, 7, 15, EXTI15); 94impl_gpio_pin!(PH15, 7, 15, EXTI15);
95pub const RNG: rng::Rng = rng::Rng(0x40080000 as _); 95pub const RNG: rng::Rng = rng::Rng(0x40080000 as _);
96impl_rng!(RNG); 96impl_rng!(RNG, RNG);
97pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 97pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
98pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 98pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
99impl_usart!(USART1); 99impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f411cc.rs b/embassy-stm32/src/pac/stm32f411cc.rs
index 1e54e97c9..2f3f0f0bf 100644
--- a/embassy-stm32/src/pac/stm32f411cc.rs
+++ b/embassy-stm32/src/pac/stm32f411cc.rs
@@ -126,6 +126,57 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
126impl_gpio_pin!(PH13, 7, 13, EXTI13); 126impl_gpio_pin!(PH13, 7, 13, EXTI13);
127impl_gpio_pin!(PH14, 7, 14, EXTI14); 127impl_gpio_pin!(PH14, 7, 14, EXTI14);
128impl_gpio_pin!(PH15, 7, 15, EXTI15); 128impl_gpio_pin!(PH15, 7, 15, EXTI15);
129pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
130impl_spi!(SPI1, APB2);
131impl_spi_pin!(SPI1, SckPin, PA5, 5);
132impl_spi_pin!(SPI1, MisoPin, PA6, 5);
133impl_spi_pin!(SPI1, MosiPin, PA7, 5);
134impl_spi_pin!(SPI1, SckPin, PB3, 5);
135impl_spi_pin!(SPI1, MisoPin, PB4, 5);
136impl_spi_pin!(SPI1, MosiPin, PB5, 5);
137pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
138impl_spi!(SPI2, APB1);
139impl_spi_pin!(SPI2, SckPin, PB10, 5);
140impl_spi_pin!(SPI2, SckPin, PB13, 5);
141impl_spi_pin!(SPI2, MisoPin, PB14, 5);
142impl_spi_pin!(SPI2, MosiPin, PB15, 5);
143impl_spi_pin!(SPI2, MisoPin, PC2, 5);
144impl_spi_pin!(SPI2, MosiPin, PC3, 5);
145impl_spi_pin!(SPI2, SckPin, PC7, 5);
146impl_spi_pin!(SPI2, SckPin, PD3, 5);
147pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
148impl_spi!(SPI3, APB1);
149impl_spi_pin!(SPI3, SckPin, PB12, 7);
150impl_spi_pin!(SPI3, SckPin, PB3, 6);
151impl_spi_pin!(SPI3, MisoPin, PB4, 6);
152impl_spi_pin!(SPI3, MosiPin, PB5, 6);
153impl_spi_pin!(SPI3, SckPin, PC10, 6);
154impl_spi_pin!(SPI3, MisoPin, PC11, 6);
155impl_spi_pin!(SPI3, MosiPin, PC12, 6);
156impl_spi_pin!(SPI3, MosiPin, PD6, 5);
157pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
158impl_spi!(SPI4, APB2);
159impl_spi_pin!(SPI4, MosiPin, PA1, 5);
160impl_spi_pin!(SPI4, MisoPin, PA11, 6);
161impl_spi_pin!(SPI4, SckPin, PB13, 6);
162impl_spi_pin!(SPI4, SckPin, PE12, 5);
163impl_spi_pin!(SPI4, MisoPin, PE13, 5);
164impl_spi_pin!(SPI4, MosiPin, PE14, 5);
165impl_spi_pin!(SPI4, SckPin, PE2, 5);
166impl_spi_pin!(SPI4, MisoPin, PE5, 5);
167impl_spi_pin!(SPI4, MosiPin, PE6, 5);
168pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
169impl_spi!(SPI5, APB2);
170impl_spi_pin!(SPI5, MosiPin, PA10, 6);
171impl_spi_pin!(SPI5, MisoPin, PA12, 6);
172impl_spi_pin!(SPI5, SckPin, PB0, 6);
173impl_spi_pin!(SPI5, MosiPin, PB8, 6);
174impl_spi_pin!(SPI5, SckPin, PE12, 6);
175impl_spi_pin!(SPI5, MisoPin, PE13, 6);
176impl_spi_pin!(SPI5, MosiPin, PE14, 6);
177impl_spi_pin!(SPI5, SckPin, PE2, 6);
178impl_spi_pin!(SPI5, MisoPin, PE5, 6);
179impl_spi_pin!(SPI5, MosiPin, PE6, 6);
129pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 180pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
130pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 181pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
131impl_usart!(USART1); 182impl_usart!(USART1);
@@ -160,6 +211,7 @@ impl_usart_pin!(USART6, CkPin, PC8, 8);
160pub use regs::dma_v2 as dma; 211pub use regs::dma_v2 as dma;
161pub use regs::exti_v1 as exti; 212pub use regs::exti_v1 as exti;
162pub use regs::gpio_v2 as gpio; 213pub use regs::gpio_v2 as gpio;
214pub use regs::spi_v1 as spi;
163pub use regs::syscfg_f4 as syscfg; 215pub use regs::syscfg_f4 as syscfg;
164pub use regs::usart_v1 as usart; 216pub use regs::usart_v1 as usart;
165mod regs; 217mod regs;
@@ -174,7 +226,8 @@ peripherals!(
174 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, 226 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5,
175 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, 227 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7,
176 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, 228 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9,
177 PH10, PH11, PH12, PH13, PH14, PH15, SYSCFG, USART1, USART2, USART6 229 PH10, PH11, PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2,
230 USART6
178); 231);
179 232
180pub mod interrupt { 233pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f411ce.rs b/embassy-stm32/src/pac/stm32f411ce.rs
index 1e54e97c9..2f3f0f0bf 100644
--- a/embassy-stm32/src/pac/stm32f411ce.rs
+++ b/embassy-stm32/src/pac/stm32f411ce.rs
@@ -126,6 +126,57 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
126impl_gpio_pin!(PH13, 7, 13, EXTI13); 126impl_gpio_pin!(PH13, 7, 13, EXTI13);
127impl_gpio_pin!(PH14, 7, 14, EXTI14); 127impl_gpio_pin!(PH14, 7, 14, EXTI14);
128impl_gpio_pin!(PH15, 7, 15, EXTI15); 128impl_gpio_pin!(PH15, 7, 15, EXTI15);
129pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
130impl_spi!(SPI1, APB2);
131impl_spi_pin!(SPI1, SckPin, PA5, 5);
132impl_spi_pin!(SPI1, MisoPin, PA6, 5);
133impl_spi_pin!(SPI1, MosiPin, PA7, 5);
134impl_spi_pin!(SPI1, SckPin, PB3, 5);
135impl_spi_pin!(SPI1, MisoPin, PB4, 5);
136impl_spi_pin!(SPI1, MosiPin, PB5, 5);
137pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
138impl_spi!(SPI2, APB1);
139impl_spi_pin!(SPI2, SckPin, PB10, 5);
140impl_spi_pin!(SPI2, SckPin, PB13, 5);
141impl_spi_pin!(SPI2, MisoPin, PB14, 5);
142impl_spi_pin!(SPI2, MosiPin, PB15, 5);
143impl_spi_pin!(SPI2, MisoPin, PC2, 5);
144impl_spi_pin!(SPI2, MosiPin, PC3, 5);
145impl_spi_pin!(SPI2, SckPin, PC7, 5);
146impl_spi_pin!(SPI2, SckPin, PD3, 5);
147pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
148impl_spi!(SPI3, APB1);
149impl_spi_pin!(SPI3, SckPin, PB12, 7);
150impl_spi_pin!(SPI3, SckPin, PB3, 6);
151impl_spi_pin!(SPI3, MisoPin, PB4, 6);
152impl_spi_pin!(SPI3, MosiPin, PB5, 6);
153impl_spi_pin!(SPI3, SckPin, PC10, 6);
154impl_spi_pin!(SPI3, MisoPin, PC11, 6);
155impl_spi_pin!(SPI3, MosiPin, PC12, 6);
156impl_spi_pin!(SPI3, MosiPin, PD6, 5);
157pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
158impl_spi!(SPI4, APB2);
159impl_spi_pin!(SPI4, MosiPin, PA1, 5);
160impl_spi_pin!(SPI4, MisoPin, PA11, 6);
161impl_spi_pin!(SPI4, SckPin, PB13, 6);
162impl_spi_pin!(SPI4, SckPin, PE12, 5);
163impl_spi_pin!(SPI4, MisoPin, PE13, 5);
164impl_spi_pin!(SPI4, MosiPin, PE14, 5);
165impl_spi_pin!(SPI4, SckPin, PE2, 5);
166impl_spi_pin!(SPI4, MisoPin, PE5, 5);
167impl_spi_pin!(SPI4, MosiPin, PE6, 5);
168pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
169impl_spi!(SPI5, APB2);
170impl_spi_pin!(SPI5, MosiPin, PA10, 6);
171impl_spi_pin!(SPI5, MisoPin, PA12, 6);
172impl_spi_pin!(SPI5, SckPin, PB0, 6);
173impl_spi_pin!(SPI5, MosiPin, PB8, 6);
174impl_spi_pin!(SPI5, SckPin, PE12, 6);
175impl_spi_pin!(SPI5, MisoPin, PE13, 6);
176impl_spi_pin!(SPI5, MosiPin, PE14, 6);
177impl_spi_pin!(SPI5, SckPin, PE2, 6);
178impl_spi_pin!(SPI5, MisoPin, PE5, 6);
179impl_spi_pin!(SPI5, MosiPin, PE6, 6);
129pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 180pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
130pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 181pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
131impl_usart!(USART1); 182impl_usart!(USART1);
@@ -160,6 +211,7 @@ impl_usart_pin!(USART6, CkPin, PC8, 8);
160pub use regs::dma_v2 as dma; 211pub use regs::dma_v2 as dma;
161pub use regs::exti_v1 as exti; 212pub use regs::exti_v1 as exti;
162pub use regs::gpio_v2 as gpio; 213pub use regs::gpio_v2 as gpio;
214pub use regs::spi_v1 as spi;
163pub use regs::syscfg_f4 as syscfg; 215pub use regs::syscfg_f4 as syscfg;
164pub use regs::usart_v1 as usart; 216pub use regs::usart_v1 as usart;
165mod regs; 217mod regs;
@@ -174,7 +226,8 @@ peripherals!(
174 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, 226 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5,
175 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, 227 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7,
176 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, 228 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9,
177 PH10, PH11, PH12, PH13, PH14, PH15, SYSCFG, USART1, USART2, USART6 229 PH10, PH11, PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2,
230 USART6
178); 231);
179 232
180pub mod interrupt { 233pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f411rc.rs b/embassy-stm32/src/pac/stm32f411rc.rs
index 1e54e97c9..2f3f0f0bf 100644
--- a/embassy-stm32/src/pac/stm32f411rc.rs
+++ b/embassy-stm32/src/pac/stm32f411rc.rs
@@ -126,6 +126,57 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
126impl_gpio_pin!(PH13, 7, 13, EXTI13); 126impl_gpio_pin!(PH13, 7, 13, EXTI13);
127impl_gpio_pin!(PH14, 7, 14, EXTI14); 127impl_gpio_pin!(PH14, 7, 14, EXTI14);
128impl_gpio_pin!(PH15, 7, 15, EXTI15); 128impl_gpio_pin!(PH15, 7, 15, EXTI15);
129pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
130impl_spi!(SPI1, APB2);
131impl_spi_pin!(SPI1, SckPin, PA5, 5);
132impl_spi_pin!(SPI1, MisoPin, PA6, 5);
133impl_spi_pin!(SPI1, MosiPin, PA7, 5);
134impl_spi_pin!(SPI1, SckPin, PB3, 5);
135impl_spi_pin!(SPI1, MisoPin, PB4, 5);
136impl_spi_pin!(SPI1, MosiPin, PB5, 5);
137pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
138impl_spi!(SPI2, APB1);
139impl_spi_pin!(SPI2, SckPin, PB10, 5);
140impl_spi_pin!(SPI2, SckPin, PB13, 5);
141impl_spi_pin!(SPI2, MisoPin, PB14, 5);
142impl_spi_pin!(SPI2, MosiPin, PB15, 5);
143impl_spi_pin!(SPI2, MisoPin, PC2, 5);
144impl_spi_pin!(SPI2, MosiPin, PC3, 5);
145impl_spi_pin!(SPI2, SckPin, PC7, 5);
146impl_spi_pin!(SPI2, SckPin, PD3, 5);
147pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
148impl_spi!(SPI3, APB1);
149impl_spi_pin!(SPI3, SckPin, PB12, 7);
150impl_spi_pin!(SPI3, SckPin, PB3, 6);
151impl_spi_pin!(SPI3, MisoPin, PB4, 6);
152impl_spi_pin!(SPI3, MosiPin, PB5, 6);
153impl_spi_pin!(SPI3, SckPin, PC10, 6);
154impl_spi_pin!(SPI3, MisoPin, PC11, 6);
155impl_spi_pin!(SPI3, MosiPin, PC12, 6);
156impl_spi_pin!(SPI3, MosiPin, PD6, 5);
157pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
158impl_spi!(SPI4, APB2);
159impl_spi_pin!(SPI4, MosiPin, PA1, 5);
160impl_spi_pin!(SPI4, MisoPin, PA11, 6);
161impl_spi_pin!(SPI4, SckPin, PB13, 6);
162impl_spi_pin!(SPI4, SckPin, PE12, 5);
163impl_spi_pin!(SPI4, MisoPin, PE13, 5);
164impl_spi_pin!(SPI4, MosiPin, PE14, 5);
165impl_spi_pin!(SPI4, SckPin, PE2, 5);
166impl_spi_pin!(SPI4, MisoPin, PE5, 5);
167impl_spi_pin!(SPI4, MosiPin, PE6, 5);
168pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
169impl_spi!(SPI5, APB2);
170impl_spi_pin!(SPI5, MosiPin, PA10, 6);
171impl_spi_pin!(SPI5, MisoPin, PA12, 6);
172impl_spi_pin!(SPI5, SckPin, PB0, 6);
173impl_spi_pin!(SPI5, MosiPin, PB8, 6);
174impl_spi_pin!(SPI5, SckPin, PE12, 6);
175impl_spi_pin!(SPI5, MisoPin, PE13, 6);
176impl_spi_pin!(SPI5, MosiPin, PE14, 6);
177impl_spi_pin!(SPI5, SckPin, PE2, 6);
178impl_spi_pin!(SPI5, MisoPin, PE5, 6);
179impl_spi_pin!(SPI5, MosiPin, PE6, 6);
129pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 180pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
130pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 181pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
131impl_usart!(USART1); 182impl_usart!(USART1);
@@ -160,6 +211,7 @@ impl_usart_pin!(USART6, CkPin, PC8, 8);
160pub use regs::dma_v2 as dma; 211pub use regs::dma_v2 as dma;
161pub use regs::exti_v1 as exti; 212pub use regs::exti_v1 as exti;
162pub use regs::gpio_v2 as gpio; 213pub use regs::gpio_v2 as gpio;
214pub use regs::spi_v1 as spi;
163pub use regs::syscfg_f4 as syscfg; 215pub use regs::syscfg_f4 as syscfg;
164pub use regs::usart_v1 as usart; 216pub use regs::usart_v1 as usart;
165mod regs; 217mod regs;
@@ -174,7 +226,8 @@ peripherals!(
174 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, 226 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5,
175 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, 227 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7,
176 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, 228 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9,
177 PH10, PH11, PH12, PH13, PH14, PH15, SYSCFG, USART1, USART2, USART6 229 PH10, PH11, PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2,
230 USART6
178); 231);
179 232
180pub mod interrupt { 233pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f411re.rs b/embassy-stm32/src/pac/stm32f411re.rs
index 1e54e97c9..2f3f0f0bf 100644
--- a/embassy-stm32/src/pac/stm32f411re.rs
+++ b/embassy-stm32/src/pac/stm32f411re.rs
@@ -126,6 +126,57 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
126impl_gpio_pin!(PH13, 7, 13, EXTI13); 126impl_gpio_pin!(PH13, 7, 13, EXTI13);
127impl_gpio_pin!(PH14, 7, 14, EXTI14); 127impl_gpio_pin!(PH14, 7, 14, EXTI14);
128impl_gpio_pin!(PH15, 7, 15, EXTI15); 128impl_gpio_pin!(PH15, 7, 15, EXTI15);
129pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
130impl_spi!(SPI1, APB2);
131impl_spi_pin!(SPI1, SckPin, PA5, 5);
132impl_spi_pin!(SPI1, MisoPin, PA6, 5);
133impl_spi_pin!(SPI1, MosiPin, PA7, 5);
134impl_spi_pin!(SPI1, SckPin, PB3, 5);
135impl_spi_pin!(SPI1, MisoPin, PB4, 5);
136impl_spi_pin!(SPI1, MosiPin, PB5, 5);
137pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
138impl_spi!(SPI2, APB1);
139impl_spi_pin!(SPI2, SckPin, PB10, 5);
140impl_spi_pin!(SPI2, SckPin, PB13, 5);
141impl_spi_pin!(SPI2, MisoPin, PB14, 5);
142impl_spi_pin!(SPI2, MosiPin, PB15, 5);
143impl_spi_pin!(SPI2, MisoPin, PC2, 5);
144impl_spi_pin!(SPI2, MosiPin, PC3, 5);
145impl_spi_pin!(SPI2, SckPin, PC7, 5);
146impl_spi_pin!(SPI2, SckPin, PD3, 5);
147pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
148impl_spi!(SPI3, APB1);
149impl_spi_pin!(SPI3, SckPin, PB12, 7);
150impl_spi_pin!(SPI3, SckPin, PB3, 6);
151impl_spi_pin!(SPI3, MisoPin, PB4, 6);
152impl_spi_pin!(SPI3, MosiPin, PB5, 6);
153impl_spi_pin!(SPI3, SckPin, PC10, 6);
154impl_spi_pin!(SPI3, MisoPin, PC11, 6);
155impl_spi_pin!(SPI3, MosiPin, PC12, 6);
156impl_spi_pin!(SPI3, MosiPin, PD6, 5);
157pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
158impl_spi!(SPI4, APB2);
159impl_spi_pin!(SPI4, MosiPin, PA1, 5);
160impl_spi_pin!(SPI4, MisoPin, PA11, 6);
161impl_spi_pin!(SPI4, SckPin, PB13, 6);
162impl_spi_pin!(SPI4, SckPin, PE12, 5);
163impl_spi_pin!(SPI4, MisoPin, PE13, 5);
164impl_spi_pin!(SPI4, MosiPin, PE14, 5);
165impl_spi_pin!(SPI4, SckPin, PE2, 5);
166impl_spi_pin!(SPI4, MisoPin, PE5, 5);
167impl_spi_pin!(SPI4, MosiPin, PE6, 5);
168pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
169impl_spi!(SPI5, APB2);
170impl_spi_pin!(SPI5, MosiPin, PA10, 6);
171impl_spi_pin!(SPI5, MisoPin, PA12, 6);
172impl_spi_pin!(SPI5, SckPin, PB0, 6);
173impl_spi_pin!(SPI5, MosiPin, PB8, 6);
174impl_spi_pin!(SPI5, SckPin, PE12, 6);
175impl_spi_pin!(SPI5, MisoPin, PE13, 6);
176impl_spi_pin!(SPI5, MosiPin, PE14, 6);
177impl_spi_pin!(SPI5, SckPin, PE2, 6);
178impl_spi_pin!(SPI5, MisoPin, PE5, 6);
179impl_spi_pin!(SPI5, MosiPin, PE6, 6);
129pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 180pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
130pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 181pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
131impl_usart!(USART1); 182impl_usart!(USART1);
@@ -160,6 +211,7 @@ impl_usart_pin!(USART6, CkPin, PC8, 8);
160pub use regs::dma_v2 as dma; 211pub use regs::dma_v2 as dma;
161pub use regs::exti_v1 as exti; 212pub use regs::exti_v1 as exti;
162pub use regs::gpio_v2 as gpio; 213pub use regs::gpio_v2 as gpio;
214pub use regs::spi_v1 as spi;
163pub use regs::syscfg_f4 as syscfg; 215pub use regs::syscfg_f4 as syscfg;
164pub use regs::usart_v1 as usart; 216pub use regs::usart_v1 as usart;
165mod regs; 217mod regs;
@@ -174,7 +226,8 @@ peripherals!(
174 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, 226 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5,
175 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, 227 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7,
176 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, 228 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9,
177 PH10, PH11, PH12, PH13, PH14, PH15, SYSCFG, USART1, USART2, USART6 229 PH10, PH11, PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2,
230 USART6
178); 231);
179 232
180pub mod interrupt { 233pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f411vc.rs b/embassy-stm32/src/pac/stm32f411vc.rs
index 1e54e97c9..2f3f0f0bf 100644
--- a/embassy-stm32/src/pac/stm32f411vc.rs
+++ b/embassy-stm32/src/pac/stm32f411vc.rs
@@ -126,6 +126,57 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
126impl_gpio_pin!(PH13, 7, 13, EXTI13); 126impl_gpio_pin!(PH13, 7, 13, EXTI13);
127impl_gpio_pin!(PH14, 7, 14, EXTI14); 127impl_gpio_pin!(PH14, 7, 14, EXTI14);
128impl_gpio_pin!(PH15, 7, 15, EXTI15); 128impl_gpio_pin!(PH15, 7, 15, EXTI15);
129pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
130impl_spi!(SPI1, APB2);
131impl_spi_pin!(SPI1, SckPin, PA5, 5);
132impl_spi_pin!(SPI1, MisoPin, PA6, 5);
133impl_spi_pin!(SPI1, MosiPin, PA7, 5);
134impl_spi_pin!(SPI1, SckPin, PB3, 5);
135impl_spi_pin!(SPI1, MisoPin, PB4, 5);
136impl_spi_pin!(SPI1, MosiPin, PB5, 5);
137pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
138impl_spi!(SPI2, APB1);
139impl_spi_pin!(SPI2, SckPin, PB10, 5);
140impl_spi_pin!(SPI2, SckPin, PB13, 5);
141impl_spi_pin!(SPI2, MisoPin, PB14, 5);
142impl_spi_pin!(SPI2, MosiPin, PB15, 5);
143impl_spi_pin!(SPI2, MisoPin, PC2, 5);
144impl_spi_pin!(SPI2, MosiPin, PC3, 5);
145impl_spi_pin!(SPI2, SckPin, PC7, 5);
146impl_spi_pin!(SPI2, SckPin, PD3, 5);
147pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
148impl_spi!(SPI3, APB1);
149impl_spi_pin!(SPI3, SckPin, PB12, 7);
150impl_spi_pin!(SPI3, SckPin, PB3, 6);
151impl_spi_pin!(SPI3, MisoPin, PB4, 6);
152impl_spi_pin!(SPI3, MosiPin, PB5, 6);
153impl_spi_pin!(SPI3, SckPin, PC10, 6);
154impl_spi_pin!(SPI3, MisoPin, PC11, 6);
155impl_spi_pin!(SPI3, MosiPin, PC12, 6);
156impl_spi_pin!(SPI3, MosiPin, PD6, 5);
157pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
158impl_spi!(SPI4, APB2);
159impl_spi_pin!(SPI4, MosiPin, PA1, 5);
160impl_spi_pin!(SPI4, MisoPin, PA11, 6);
161impl_spi_pin!(SPI4, SckPin, PB13, 6);
162impl_spi_pin!(SPI4, SckPin, PE12, 5);
163impl_spi_pin!(SPI4, MisoPin, PE13, 5);
164impl_spi_pin!(SPI4, MosiPin, PE14, 5);
165impl_spi_pin!(SPI4, SckPin, PE2, 5);
166impl_spi_pin!(SPI4, MisoPin, PE5, 5);
167impl_spi_pin!(SPI4, MosiPin, PE6, 5);
168pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
169impl_spi!(SPI5, APB2);
170impl_spi_pin!(SPI5, MosiPin, PA10, 6);
171impl_spi_pin!(SPI5, MisoPin, PA12, 6);
172impl_spi_pin!(SPI5, SckPin, PB0, 6);
173impl_spi_pin!(SPI5, MosiPin, PB8, 6);
174impl_spi_pin!(SPI5, SckPin, PE12, 6);
175impl_spi_pin!(SPI5, MisoPin, PE13, 6);
176impl_spi_pin!(SPI5, MosiPin, PE14, 6);
177impl_spi_pin!(SPI5, SckPin, PE2, 6);
178impl_spi_pin!(SPI5, MisoPin, PE5, 6);
179impl_spi_pin!(SPI5, MosiPin, PE6, 6);
129pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 180pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
130pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 181pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
131impl_usart!(USART1); 182impl_usart!(USART1);
@@ -160,6 +211,7 @@ impl_usart_pin!(USART6, CkPin, PC8, 8);
160pub use regs::dma_v2 as dma; 211pub use regs::dma_v2 as dma;
161pub use regs::exti_v1 as exti; 212pub use regs::exti_v1 as exti;
162pub use regs::gpio_v2 as gpio; 213pub use regs::gpio_v2 as gpio;
214pub use regs::spi_v1 as spi;
163pub use regs::syscfg_f4 as syscfg; 215pub use regs::syscfg_f4 as syscfg;
164pub use regs::usart_v1 as usart; 216pub use regs::usart_v1 as usart;
165mod regs; 217mod regs;
@@ -174,7 +226,8 @@ peripherals!(
174 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, 226 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5,
175 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, 227 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7,
176 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, 228 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9,
177 PH10, PH11, PH12, PH13, PH14, PH15, SYSCFG, USART1, USART2, USART6 229 PH10, PH11, PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2,
230 USART6
178); 231);
179 232
180pub mod interrupt { 233pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f411ve.rs b/embassy-stm32/src/pac/stm32f411ve.rs
index 1e54e97c9..2f3f0f0bf 100644
--- a/embassy-stm32/src/pac/stm32f411ve.rs
+++ b/embassy-stm32/src/pac/stm32f411ve.rs
@@ -126,6 +126,57 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
126impl_gpio_pin!(PH13, 7, 13, EXTI13); 126impl_gpio_pin!(PH13, 7, 13, EXTI13);
127impl_gpio_pin!(PH14, 7, 14, EXTI14); 127impl_gpio_pin!(PH14, 7, 14, EXTI14);
128impl_gpio_pin!(PH15, 7, 15, EXTI15); 128impl_gpio_pin!(PH15, 7, 15, EXTI15);
129pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
130impl_spi!(SPI1, APB2);
131impl_spi_pin!(SPI1, SckPin, PA5, 5);
132impl_spi_pin!(SPI1, MisoPin, PA6, 5);
133impl_spi_pin!(SPI1, MosiPin, PA7, 5);
134impl_spi_pin!(SPI1, SckPin, PB3, 5);
135impl_spi_pin!(SPI1, MisoPin, PB4, 5);
136impl_spi_pin!(SPI1, MosiPin, PB5, 5);
137pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
138impl_spi!(SPI2, APB1);
139impl_spi_pin!(SPI2, SckPin, PB10, 5);
140impl_spi_pin!(SPI2, SckPin, PB13, 5);
141impl_spi_pin!(SPI2, MisoPin, PB14, 5);
142impl_spi_pin!(SPI2, MosiPin, PB15, 5);
143impl_spi_pin!(SPI2, MisoPin, PC2, 5);
144impl_spi_pin!(SPI2, MosiPin, PC3, 5);
145impl_spi_pin!(SPI2, SckPin, PC7, 5);
146impl_spi_pin!(SPI2, SckPin, PD3, 5);
147pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
148impl_spi!(SPI3, APB1);
149impl_spi_pin!(SPI3, SckPin, PB12, 7);
150impl_spi_pin!(SPI3, SckPin, PB3, 6);
151impl_spi_pin!(SPI3, MisoPin, PB4, 6);
152impl_spi_pin!(SPI3, MosiPin, PB5, 6);
153impl_spi_pin!(SPI3, SckPin, PC10, 6);
154impl_spi_pin!(SPI3, MisoPin, PC11, 6);
155impl_spi_pin!(SPI3, MosiPin, PC12, 6);
156impl_spi_pin!(SPI3, MosiPin, PD6, 5);
157pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
158impl_spi!(SPI4, APB2);
159impl_spi_pin!(SPI4, MosiPin, PA1, 5);
160impl_spi_pin!(SPI4, MisoPin, PA11, 6);
161impl_spi_pin!(SPI4, SckPin, PB13, 6);
162impl_spi_pin!(SPI4, SckPin, PE12, 5);
163impl_spi_pin!(SPI4, MisoPin, PE13, 5);
164impl_spi_pin!(SPI4, MosiPin, PE14, 5);
165impl_spi_pin!(SPI4, SckPin, PE2, 5);
166impl_spi_pin!(SPI4, MisoPin, PE5, 5);
167impl_spi_pin!(SPI4, MosiPin, PE6, 5);
168pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
169impl_spi!(SPI5, APB2);
170impl_spi_pin!(SPI5, MosiPin, PA10, 6);
171impl_spi_pin!(SPI5, MisoPin, PA12, 6);
172impl_spi_pin!(SPI5, SckPin, PB0, 6);
173impl_spi_pin!(SPI5, MosiPin, PB8, 6);
174impl_spi_pin!(SPI5, SckPin, PE12, 6);
175impl_spi_pin!(SPI5, MisoPin, PE13, 6);
176impl_spi_pin!(SPI5, MosiPin, PE14, 6);
177impl_spi_pin!(SPI5, SckPin, PE2, 6);
178impl_spi_pin!(SPI5, MisoPin, PE5, 6);
179impl_spi_pin!(SPI5, MosiPin, PE6, 6);
129pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 180pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
130pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 181pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
131impl_usart!(USART1); 182impl_usart!(USART1);
@@ -160,6 +211,7 @@ impl_usart_pin!(USART6, CkPin, PC8, 8);
160pub use regs::dma_v2 as dma; 211pub use regs::dma_v2 as dma;
161pub use regs::exti_v1 as exti; 212pub use regs::exti_v1 as exti;
162pub use regs::gpio_v2 as gpio; 213pub use regs::gpio_v2 as gpio;
214pub use regs::spi_v1 as spi;
163pub use regs::syscfg_f4 as syscfg; 215pub use regs::syscfg_f4 as syscfg;
164pub use regs::usart_v1 as usart; 216pub use regs::usart_v1 as usart;
165mod regs; 217mod regs;
@@ -174,7 +226,8 @@ peripherals!(
174 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, 226 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5,
175 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, 227 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7,
176 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, 228 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9,
177 PH10, PH11, PH12, PH13, PH14, PH15, SYSCFG, USART1, USART2, USART6 229 PH10, PH11, PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2,
230 USART6
178); 231);
179 232
180pub mod interrupt { 233pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f412ce.rs b/embassy-stm32/src/pac/stm32f412ce.rs
index 9f734f6e1..f3e125b70 100644
--- a/embassy-stm32/src/pac/stm32f412ce.rs
+++ b/embassy-stm32/src/pac/stm32f412ce.rs
@@ -93,7 +93,44 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
93impl_gpio_pin!(PH14, 7, 14, EXTI14); 93impl_gpio_pin!(PH14, 7, 14, EXTI14);
94impl_gpio_pin!(PH15, 7, 15, EXTI15); 94impl_gpio_pin!(PH15, 7, 15, EXTI15);
95pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 95pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
96impl_rng!(RNG); 96impl_rng!(RNG, RNG);
97pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
98impl_spi!(SPI1, APB2);
99impl_spi_pin!(SPI1, SckPin, PA5, 5);
100impl_spi_pin!(SPI1, MisoPin, PA6, 5);
101impl_spi_pin!(SPI1, MosiPin, PA7, 5);
102impl_spi_pin!(SPI1, SckPin, PB3, 5);
103impl_spi_pin!(SPI1, MisoPin, PB4, 5);
104impl_spi_pin!(SPI1, MosiPin, PB5, 5);
105pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
106impl_spi!(SPI2, APB1);
107impl_spi_pin!(SPI2, SckPin, PB10, 5);
108impl_spi_pin!(SPI2, SckPin, PB13, 5);
109impl_spi_pin!(SPI2, MisoPin, PB14, 5);
110impl_spi_pin!(SPI2, MosiPin, PB15, 5);
111impl_spi_pin!(SPI2, MisoPin, PC2, 5);
112impl_spi_pin!(SPI2, MosiPin, PC3, 5);
113impl_spi_pin!(SPI2, SckPin, PC7, 5);
114pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
115impl_spi!(SPI3, APB1);
116impl_spi_pin!(SPI3, SckPin, PB12, 7);
117impl_spi_pin!(SPI3, SckPin, PB3, 6);
118impl_spi_pin!(SPI3, MisoPin, PB4, 6);
119impl_spi_pin!(SPI3, MosiPin, PB5, 6);
120impl_spi_pin!(SPI3, SckPin, PC10, 6);
121impl_spi_pin!(SPI3, MisoPin, PC11, 6);
122impl_spi_pin!(SPI3, MosiPin, PC12, 6);
123pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
124impl_spi!(SPI4, APB2);
125impl_spi_pin!(SPI4, MosiPin, PA1, 5);
126impl_spi_pin!(SPI4, MisoPin, PA11, 6);
127impl_spi_pin!(SPI4, SckPin, PB13, 6);
128pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
129impl_spi!(SPI5, APB2);
130impl_spi_pin!(SPI5, MosiPin, PA10, 6);
131impl_spi_pin!(SPI5, MisoPin, PA12, 6);
132impl_spi_pin!(SPI5, SckPin, PB0, 6);
133impl_spi_pin!(SPI5, MosiPin, PB8, 6);
97pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 134pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
98pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 135pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
99impl_usart!(USART1); 136impl_usart!(USART1);
@@ -135,6 +172,7 @@ pub use regs::dma_v2 as dma;
135pub use regs::exti_v1 as exti; 172pub use regs::exti_v1 as exti;
136pub use regs::gpio_v2 as gpio; 173pub use regs::gpio_v2 as gpio;
137pub use regs::rng_v1 as rng; 174pub use regs::rng_v1 as rng;
175pub use regs::spi_v1 as spi;
138pub use regs::syscfg_f4 as syscfg; 176pub use regs::syscfg_f4 as syscfg;
139pub use regs::usart_v1 as usart; 177pub use regs::usart_v1 as usart;
140mod regs; 178mod regs;
@@ -147,8 +185,8 @@ peripherals!(
147 PA0, PA1, PA2, PA3, PA4, PA5, PA6, PA7, PA8, PA9, PA10, PA11, PA12, PA13, PA14, PA15, PB0, PB1, 185 PA0, PA1, PA2, PA3, PA4, PA5, PA6, PA7, PA8, PA9, PA10, PA11, PA12, PA13, PA14, PA15, PB0, PB1,
148 PB2, PB3, PB4, PB5, PB6, PB7, PB8, PB9, PB10, PB11, PB12, PB13, PB14, PB15, PC0, PC1, PC2, PC3, 186 PB2, PB3, PB4, PB5, PB6, PB7, PB8, PB9, PB10, PB11, PB12, PB13, PB14, PB15, PC0, PC1, PC2, PC3,
149 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PH0, PH1, PH2, PH3, PH4, PH5, 187 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PH0, PH1, PH2, PH3, PH4, PH5,
150 PH6, PH7, PH8, PH9, PH10, PH11, PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART3, 188 PH6, PH7, PH8, PH9, PH10, PH11, PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5,
151 USART6 189 SYSCFG, USART1, USART2, USART3, USART6
152); 190);
153 191
154pub mod interrupt { 192pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f412cg.rs b/embassy-stm32/src/pac/stm32f412cg.rs
index 9f734f6e1..f3e125b70 100644
--- a/embassy-stm32/src/pac/stm32f412cg.rs
+++ b/embassy-stm32/src/pac/stm32f412cg.rs
@@ -93,7 +93,44 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
93impl_gpio_pin!(PH14, 7, 14, EXTI14); 93impl_gpio_pin!(PH14, 7, 14, EXTI14);
94impl_gpio_pin!(PH15, 7, 15, EXTI15); 94impl_gpio_pin!(PH15, 7, 15, EXTI15);
95pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 95pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
96impl_rng!(RNG); 96impl_rng!(RNG, RNG);
97pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
98impl_spi!(SPI1, APB2);
99impl_spi_pin!(SPI1, SckPin, PA5, 5);
100impl_spi_pin!(SPI1, MisoPin, PA6, 5);
101impl_spi_pin!(SPI1, MosiPin, PA7, 5);
102impl_spi_pin!(SPI1, SckPin, PB3, 5);
103impl_spi_pin!(SPI1, MisoPin, PB4, 5);
104impl_spi_pin!(SPI1, MosiPin, PB5, 5);
105pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
106impl_spi!(SPI2, APB1);
107impl_spi_pin!(SPI2, SckPin, PB10, 5);
108impl_spi_pin!(SPI2, SckPin, PB13, 5);
109impl_spi_pin!(SPI2, MisoPin, PB14, 5);
110impl_spi_pin!(SPI2, MosiPin, PB15, 5);
111impl_spi_pin!(SPI2, MisoPin, PC2, 5);
112impl_spi_pin!(SPI2, MosiPin, PC3, 5);
113impl_spi_pin!(SPI2, SckPin, PC7, 5);
114pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
115impl_spi!(SPI3, APB1);
116impl_spi_pin!(SPI3, SckPin, PB12, 7);
117impl_spi_pin!(SPI3, SckPin, PB3, 6);
118impl_spi_pin!(SPI3, MisoPin, PB4, 6);
119impl_spi_pin!(SPI3, MosiPin, PB5, 6);
120impl_spi_pin!(SPI3, SckPin, PC10, 6);
121impl_spi_pin!(SPI3, MisoPin, PC11, 6);
122impl_spi_pin!(SPI3, MosiPin, PC12, 6);
123pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
124impl_spi!(SPI4, APB2);
125impl_spi_pin!(SPI4, MosiPin, PA1, 5);
126impl_spi_pin!(SPI4, MisoPin, PA11, 6);
127impl_spi_pin!(SPI4, SckPin, PB13, 6);
128pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
129impl_spi!(SPI5, APB2);
130impl_spi_pin!(SPI5, MosiPin, PA10, 6);
131impl_spi_pin!(SPI5, MisoPin, PA12, 6);
132impl_spi_pin!(SPI5, SckPin, PB0, 6);
133impl_spi_pin!(SPI5, MosiPin, PB8, 6);
97pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 134pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
98pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 135pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
99impl_usart!(USART1); 136impl_usart!(USART1);
@@ -135,6 +172,7 @@ pub use regs::dma_v2 as dma;
135pub use regs::exti_v1 as exti; 172pub use regs::exti_v1 as exti;
136pub use regs::gpio_v2 as gpio; 173pub use regs::gpio_v2 as gpio;
137pub use regs::rng_v1 as rng; 174pub use regs::rng_v1 as rng;
175pub use regs::spi_v1 as spi;
138pub use regs::syscfg_f4 as syscfg; 176pub use regs::syscfg_f4 as syscfg;
139pub use regs::usart_v1 as usart; 177pub use regs::usart_v1 as usart;
140mod regs; 178mod regs;
@@ -147,8 +185,8 @@ peripherals!(
147 PA0, PA1, PA2, PA3, PA4, PA5, PA6, PA7, PA8, PA9, PA10, PA11, PA12, PA13, PA14, PA15, PB0, PB1, 185 PA0, PA1, PA2, PA3, PA4, PA5, PA6, PA7, PA8, PA9, PA10, PA11, PA12, PA13, PA14, PA15, PB0, PB1,
148 PB2, PB3, PB4, PB5, PB6, PB7, PB8, PB9, PB10, PB11, PB12, PB13, PB14, PB15, PC0, PC1, PC2, PC3, 186 PB2, PB3, PB4, PB5, PB6, PB7, PB8, PB9, PB10, PB11, PB12, PB13, PB14, PB15, PC0, PC1, PC2, PC3,
149 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PH0, PH1, PH2, PH3, PH4, PH5, 187 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PH0, PH1, PH2, PH3, PH4, PH5,
150 PH6, PH7, PH8, PH9, PH10, PH11, PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART3, 188 PH6, PH7, PH8, PH9, PH10, PH11, PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5,
151 USART6 189 SYSCFG, USART1, USART2, USART3, USART6
152); 190);
153 191
154pub mod interrupt { 192pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f412re.rs b/embassy-stm32/src/pac/stm32f412re.rs
index faee66505..c390cb26c 100644
--- a/embassy-stm32/src/pac/stm32f412re.rs
+++ b/embassy-stm32/src/pac/stm32f412re.rs
@@ -110,7 +110,46 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
110impl_gpio_pin!(PH14, 7, 14, EXTI14); 110impl_gpio_pin!(PH14, 7, 14, EXTI14);
111impl_gpio_pin!(PH15, 7, 15, EXTI15); 111impl_gpio_pin!(PH15, 7, 15, EXTI15);
112pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 112pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
113impl_rng!(RNG); 113impl_rng!(RNG, RNG);
114pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
115impl_spi!(SPI1, APB2);
116impl_spi_pin!(SPI1, SckPin, PA5, 5);
117impl_spi_pin!(SPI1, MisoPin, PA6, 5);
118impl_spi_pin!(SPI1, MosiPin, PA7, 5);
119impl_spi_pin!(SPI1, SckPin, PB3, 5);
120impl_spi_pin!(SPI1, MisoPin, PB4, 5);
121impl_spi_pin!(SPI1, MosiPin, PB5, 5);
122pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
123impl_spi!(SPI2, APB1);
124impl_spi_pin!(SPI2, SckPin, PB10, 5);
125impl_spi_pin!(SPI2, SckPin, PB13, 5);
126impl_spi_pin!(SPI2, MisoPin, PB14, 5);
127impl_spi_pin!(SPI2, MosiPin, PB15, 5);
128impl_spi_pin!(SPI2, MisoPin, PC2, 5);
129impl_spi_pin!(SPI2, MosiPin, PC3, 5);
130impl_spi_pin!(SPI2, SckPin, PC7, 5);
131impl_spi_pin!(SPI2, SckPin, PD3, 5);
132pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
133impl_spi!(SPI3, APB1);
134impl_spi_pin!(SPI3, SckPin, PB12, 7);
135impl_spi_pin!(SPI3, SckPin, PB3, 6);
136impl_spi_pin!(SPI3, MisoPin, PB4, 6);
137impl_spi_pin!(SPI3, MosiPin, PB5, 6);
138impl_spi_pin!(SPI3, SckPin, PC10, 6);
139impl_spi_pin!(SPI3, MisoPin, PC11, 6);
140impl_spi_pin!(SPI3, MosiPin, PC12, 6);
141impl_spi_pin!(SPI3, MosiPin, PD6, 5);
142pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
143impl_spi!(SPI4, APB2);
144impl_spi_pin!(SPI4, MosiPin, PA1, 5);
145impl_spi_pin!(SPI4, MisoPin, PA11, 6);
146impl_spi_pin!(SPI4, SckPin, PB13, 6);
147pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
148impl_spi!(SPI5, APB2);
149impl_spi_pin!(SPI5, MosiPin, PA10, 6);
150impl_spi_pin!(SPI5, MisoPin, PA12, 6);
151impl_spi_pin!(SPI5, SckPin, PB0, 6);
152impl_spi_pin!(SPI5, MosiPin, PB8, 6);
114pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 153pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
115pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 154pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
116impl_usart!(USART1); 155impl_usart!(USART1);
@@ -162,6 +201,7 @@ pub use regs::dma_v2 as dma;
162pub use regs::exti_v1 as exti; 201pub use regs::exti_v1 as exti;
163pub use regs::gpio_v2 as gpio; 202pub use regs::gpio_v2 as gpio;
164pub use regs::rng_v1 as rng; 203pub use regs::rng_v1 as rng;
204pub use regs::spi_v1 as spi;
165pub use regs::syscfg_f4 as syscfg; 205pub use regs::syscfg_f4 as syscfg;
166pub use regs::usart_v1 as usart; 206pub use regs::usart_v1 as usart;
167mod regs; 207mod regs;
@@ -175,7 +215,8 @@ peripherals!(
175 PB2, PB3, PB4, PB5, PB6, PB7, PB8, PB9, PB10, PB11, PB12, PB13, PB14, PB15, PC0, PC1, PC2, PC3, 215 PB2, PB3, PB4, PB5, PB6, PB7, PB8, PB9, PB10, PB11, PB12, PB13, PB14, PB15, PC0, PC1, PC2, PC3,
176 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, 216 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5,
177 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, 217 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7,
178 PH8, PH9, PH10, PH11, PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART3, USART6 218 PH8, PH9, PH10, PH11, PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG,
219 USART1, USART2, USART3, USART6
179); 220);
180 221
181pub mod interrupt { 222pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f412rg.rs b/embassy-stm32/src/pac/stm32f412rg.rs
index faee66505..c390cb26c 100644
--- a/embassy-stm32/src/pac/stm32f412rg.rs
+++ b/embassy-stm32/src/pac/stm32f412rg.rs
@@ -110,7 +110,46 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
110impl_gpio_pin!(PH14, 7, 14, EXTI14); 110impl_gpio_pin!(PH14, 7, 14, EXTI14);
111impl_gpio_pin!(PH15, 7, 15, EXTI15); 111impl_gpio_pin!(PH15, 7, 15, EXTI15);
112pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 112pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
113impl_rng!(RNG); 113impl_rng!(RNG, RNG);
114pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
115impl_spi!(SPI1, APB2);
116impl_spi_pin!(SPI1, SckPin, PA5, 5);
117impl_spi_pin!(SPI1, MisoPin, PA6, 5);
118impl_spi_pin!(SPI1, MosiPin, PA7, 5);
119impl_spi_pin!(SPI1, SckPin, PB3, 5);
120impl_spi_pin!(SPI1, MisoPin, PB4, 5);
121impl_spi_pin!(SPI1, MosiPin, PB5, 5);
122pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
123impl_spi!(SPI2, APB1);
124impl_spi_pin!(SPI2, SckPin, PB10, 5);
125impl_spi_pin!(SPI2, SckPin, PB13, 5);
126impl_spi_pin!(SPI2, MisoPin, PB14, 5);
127impl_spi_pin!(SPI2, MosiPin, PB15, 5);
128impl_spi_pin!(SPI2, MisoPin, PC2, 5);
129impl_spi_pin!(SPI2, MosiPin, PC3, 5);
130impl_spi_pin!(SPI2, SckPin, PC7, 5);
131impl_spi_pin!(SPI2, SckPin, PD3, 5);
132pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
133impl_spi!(SPI3, APB1);
134impl_spi_pin!(SPI3, SckPin, PB12, 7);
135impl_spi_pin!(SPI3, SckPin, PB3, 6);
136impl_spi_pin!(SPI3, MisoPin, PB4, 6);
137impl_spi_pin!(SPI3, MosiPin, PB5, 6);
138impl_spi_pin!(SPI3, SckPin, PC10, 6);
139impl_spi_pin!(SPI3, MisoPin, PC11, 6);
140impl_spi_pin!(SPI3, MosiPin, PC12, 6);
141impl_spi_pin!(SPI3, MosiPin, PD6, 5);
142pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
143impl_spi!(SPI4, APB2);
144impl_spi_pin!(SPI4, MosiPin, PA1, 5);
145impl_spi_pin!(SPI4, MisoPin, PA11, 6);
146impl_spi_pin!(SPI4, SckPin, PB13, 6);
147pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
148impl_spi!(SPI5, APB2);
149impl_spi_pin!(SPI5, MosiPin, PA10, 6);
150impl_spi_pin!(SPI5, MisoPin, PA12, 6);
151impl_spi_pin!(SPI5, SckPin, PB0, 6);
152impl_spi_pin!(SPI5, MosiPin, PB8, 6);
114pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 153pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
115pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 154pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
116impl_usart!(USART1); 155impl_usart!(USART1);
@@ -162,6 +201,7 @@ pub use regs::dma_v2 as dma;
162pub use regs::exti_v1 as exti; 201pub use regs::exti_v1 as exti;
163pub use regs::gpio_v2 as gpio; 202pub use regs::gpio_v2 as gpio;
164pub use regs::rng_v1 as rng; 203pub use regs::rng_v1 as rng;
204pub use regs::spi_v1 as spi;
165pub use regs::syscfg_f4 as syscfg; 205pub use regs::syscfg_f4 as syscfg;
166pub use regs::usart_v1 as usart; 206pub use regs::usart_v1 as usart;
167mod regs; 207mod regs;
@@ -175,7 +215,8 @@ peripherals!(
175 PB2, PB3, PB4, PB5, PB6, PB7, PB8, PB9, PB10, PB11, PB12, PB13, PB14, PB15, PC0, PC1, PC2, PC3, 215 PB2, PB3, PB4, PB5, PB6, PB7, PB8, PB9, PB10, PB11, PB12, PB13, PB14, PB15, PC0, PC1, PC2, PC3,
176 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, 216 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5,
177 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, 217 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7,
178 PH8, PH9, PH10, PH11, PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART3, USART6 218 PH8, PH9, PH10, PH11, PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG,
219 USART1, USART2, USART3, USART6
179); 220);
180 221
181pub mod interrupt { 222pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f412ve.rs b/embassy-stm32/src/pac/stm32f412ve.rs
index 035b44f21..e951dcd09 100644
--- a/embassy-stm32/src/pac/stm32f412ve.rs
+++ b/embassy-stm32/src/pac/stm32f412ve.rs
@@ -161,7 +161,58 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
164impl_rng!(RNG); 164impl_rng!(RNG, RNG);
165pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
166impl_spi!(SPI1, APB2);
167impl_spi_pin!(SPI1, SckPin, PA5, 5);
168impl_spi_pin!(SPI1, MisoPin, PA6, 5);
169impl_spi_pin!(SPI1, MosiPin, PA7, 5);
170impl_spi_pin!(SPI1, SckPin, PB3, 5);
171impl_spi_pin!(SPI1, MisoPin, PB4, 5);
172impl_spi_pin!(SPI1, MosiPin, PB5, 5);
173pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
174impl_spi!(SPI2, APB1);
175impl_spi_pin!(SPI2, SckPin, PB10, 5);
176impl_spi_pin!(SPI2, SckPin, PB13, 5);
177impl_spi_pin!(SPI2, MisoPin, PB14, 5);
178impl_spi_pin!(SPI2, MosiPin, PB15, 5);
179impl_spi_pin!(SPI2, MisoPin, PC2, 5);
180impl_spi_pin!(SPI2, MosiPin, PC3, 5);
181impl_spi_pin!(SPI2, SckPin, PC7, 5);
182impl_spi_pin!(SPI2, SckPin, PD3, 5);
183pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
184impl_spi!(SPI3, APB1);
185impl_spi_pin!(SPI3, SckPin, PB12, 7);
186impl_spi_pin!(SPI3, SckPin, PB3, 6);
187impl_spi_pin!(SPI3, MisoPin, PB4, 6);
188impl_spi_pin!(SPI3, MosiPin, PB5, 6);
189impl_spi_pin!(SPI3, SckPin, PC10, 6);
190impl_spi_pin!(SPI3, MisoPin, PC11, 6);
191impl_spi_pin!(SPI3, MosiPin, PC12, 6);
192impl_spi_pin!(SPI3, MosiPin, PD6, 5);
193pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
194impl_spi!(SPI4, APB2);
195impl_spi_pin!(SPI4, MosiPin, PA1, 5);
196impl_spi_pin!(SPI4, MisoPin, PA11, 6);
197impl_spi_pin!(SPI4, SckPin, PB13, 6);
198impl_spi_pin!(SPI4, SckPin, PE12, 5);
199impl_spi_pin!(SPI4, MisoPin, PE13, 5);
200impl_spi_pin!(SPI4, MosiPin, PE14, 5);
201impl_spi_pin!(SPI4, SckPin, PE2, 5);
202impl_spi_pin!(SPI4, MisoPin, PE5, 5);
203impl_spi_pin!(SPI4, MosiPin, PE6, 5);
204pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
205impl_spi!(SPI5, APB2);
206impl_spi_pin!(SPI5, MosiPin, PA10, 6);
207impl_spi_pin!(SPI5, MisoPin, PA12, 6);
208impl_spi_pin!(SPI5, SckPin, PB0, 6);
209impl_spi_pin!(SPI5, MosiPin, PB8, 6);
210impl_spi_pin!(SPI5, SckPin, PE12, 6);
211impl_spi_pin!(SPI5, MisoPin, PE13, 6);
212impl_spi_pin!(SPI5, MosiPin, PE14, 6);
213impl_spi_pin!(SPI5, SckPin, PE2, 6);
214impl_spi_pin!(SPI5, MisoPin, PE5, 6);
215impl_spi_pin!(SPI5, MosiPin, PE6, 6);
165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
166pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
167impl_usart!(USART1); 218impl_usart!(USART1);
@@ -220,6 +271,7 @@ pub use regs::dma_v2 as dma;
220pub use regs::exti_v1 as exti; 271pub use regs::exti_v1 as exti;
221pub use regs::gpio_v2 as gpio; 272pub use regs::gpio_v2 as gpio;
222pub use regs::rng_v1 as rng; 273pub use regs::rng_v1 as rng;
274pub use regs::spi_v1 as spi;
223pub use regs::syscfg_f4 as syscfg; 275pub use regs::syscfg_f4 as syscfg;
224pub use regs::usart_v1 as usart; 276pub use regs::usart_v1 as usart;
225mod regs; 277mod regs;
@@ -236,7 +288,8 @@ peripherals!(
236 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, 288 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9,
237 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 289 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
238 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 290 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
239 PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART3, USART6 291 PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART3,
292 USART6
240); 293);
241 294
242pub mod interrupt { 295pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f412vg.rs b/embassy-stm32/src/pac/stm32f412vg.rs
index 035b44f21..e951dcd09 100644
--- a/embassy-stm32/src/pac/stm32f412vg.rs
+++ b/embassy-stm32/src/pac/stm32f412vg.rs
@@ -161,7 +161,58 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
164impl_rng!(RNG); 164impl_rng!(RNG, RNG);
165pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
166impl_spi!(SPI1, APB2);
167impl_spi_pin!(SPI1, SckPin, PA5, 5);
168impl_spi_pin!(SPI1, MisoPin, PA6, 5);
169impl_spi_pin!(SPI1, MosiPin, PA7, 5);
170impl_spi_pin!(SPI1, SckPin, PB3, 5);
171impl_spi_pin!(SPI1, MisoPin, PB4, 5);
172impl_spi_pin!(SPI1, MosiPin, PB5, 5);
173pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
174impl_spi!(SPI2, APB1);
175impl_spi_pin!(SPI2, SckPin, PB10, 5);
176impl_spi_pin!(SPI2, SckPin, PB13, 5);
177impl_spi_pin!(SPI2, MisoPin, PB14, 5);
178impl_spi_pin!(SPI2, MosiPin, PB15, 5);
179impl_spi_pin!(SPI2, MisoPin, PC2, 5);
180impl_spi_pin!(SPI2, MosiPin, PC3, 5);
181impl_spi_pin!(SPI2, SckPin, PC7, 5);
182impl_spi_pin!(SPI2, SckPin, PD3, 5);
183pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
184impl_spi!(SPI3, APB1);
185impl_spi_pin!(SPI3, SckPin, PB12, 7);
186impl_spi_pin!(SPI3, SckPin, PB3, 6);
187impl_spi_pin!(SPI3, MisoPin, PB4, 6);
188impl_spi_pin!(SPI3, MosiPin, PB5, 6);
189impl_spi_pin!(SPI3, SckPin, PC10, 6);
190impl_spi_pin!(SPI3, MisoPin, PC11, 6);
191impl_spi_pin!(SPI3, MosiPin, PC12, 6);
192impl_spi_pin!(SPI3, MosiPin, PD6, 5);
193pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
194impl_spi!(SPI4, APB2);
195impl_spi_pin!(SPI4, MosiPin, PA1, 5);
196impl_spi_pin!(SPI4, MisoPin, PA11, 6);
197impl_spi_pin!(SPI4, SckPin, PB13, 6);
198impl_spi_pin!(SPI4, SckPin, PE12, 5);
199impl_spi_pin!(SPI4, MisoPin, PE13, 5);
200impl_spi_pin!(SPI4, MosiPin, PE14, 5);
201impl_spi_pin!(SPI4, SckPin, PE2, 5);
202impl_spi_pin!(SPI4, MisoPin, PE5, 5);
203impl_spi_pin!(SPI4, MosiPin, PE6, 5);
204pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
205impl_spi!(SPI5, APB2);
206impl_spi_pin!(SPI5, MosiPin, PA10, 6);
207impl_spi_pin!(SPI5, MisoPin, PA12, 6);
208impl_spi_pin!(SPI5, SckPin, PB0, 6);
209impl_spi_pin!(SPI5, MosiPin, PB8, 6);
210impl_spi_pin!(SPI5, SckPin, PE12, 6);
211impl_spi_pin!(SPI5, MisoPin, PE13, 6);
212impl_spi_pin!(SPI5, MosiPin, PE14, 6);
213impl_spi_pin!(SPI5, SckPin, PE2, 6);
214impl_spi_pin!(SPI5, MisoPin, PE5, 6);
215impl_spi_pin!(SPI5, MosiPin, PE6, 6);
165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
166pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
167impl_usart!(USART1); 218impl_usart!(USART1);
@@ -220,6 +271,7 @@ pub use regs::dma_v2 as dma;
220pub use regs::exti_v1 as exti; 271pub use regs::exti_v1 as exti;
221pub use regs::gpio_v2 as gpio; 272pub use regs::gpio_v2 as gpio;
222pub use regs::rng_v1 as rng; 273pub use regs::rng_v1 as rng;
274pub use regs::spi_v1 as spi;
223pub use regs::syscfg_f4 as syscfg; 275pub use regs::syscfg_f4 as syscfg;
224pub use regs::usart_v1 as usart; 276pub use regs::usart_v1 as usart;
225mod regs; 277mod regs;
@@ -236,7 +288,8 @@ peripherals!(
236 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, 288 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9,
237 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 289 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
238 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 290 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
239 PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART3, USART6 291 PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART3,
292 USART6
240); 293);
241 294
242pub mod interrupt { 295pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f412ze.rs b/embassy-stm32/src/pac/stm32f412ze.rs
index 035b44f21..e951dcd09 100644
--- a/embassy-stm32/src/pac/stm32f412ze.rs
+++ b/embassy-stm32/src/pac/stm32f412ze.rs
@@ -161,7 +161,58 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
164impl_rng!(RNG); 164impl_rng!(RNG, RNG);
165pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
166impl_spi!(SPI1, APB2);
167impl_spi_pin!(SPI1, SckPin, PA5, 5);
168impl_spi_pin!(SPI1, MisoPin, PA6, 5);
169impl_spi_pin!(SPI1, MosiPin, PA7, 5);
170impl_spi_pin!(SPI1, SckPin, PB3, 5);
171impl_spi_pin!(SPI1, MisoPin, PB4, 5);
172impl_spi_pin!(SPI1, MosiPin, PB5, 5);
173pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
174impl_spi!(SPI2, APB1);
175impl_spi_pin!(SPI2, SckPin, PB10, 5);
176impl_spi_pin!(SPI2, SckPin, PB13, 5);
177impl_spi_pin!(SPI2, MisoPin, PB14, 5);
178impl_spi_pin!(SPI2, MosiPin, PB15, 5);
179impl_spi_pin!(SPI2, MisoPin, PC2, 5);
180impl_spi_pin!(SPI2, MosiPin, PC3, 5);
181impl_spi_pin!(SPI2, SckPin, PC7, 5);
182impl_spi_pin!(SPI2, SckPin, PD3, 5);
183pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
184impl_spi!(SPI3, APB1);
185impl_spi_pin!(SPI3, SckPin, PB12, 7);
186impl_spi_pin!(SPI3, SckPin, PB3, 6);
187impl_spi_pin!(SPI3, MisoPin, PB4, 6);
188impl_spi_pin!(SPI3, MosiPin, PB5, 6);
189impl_spi_pin!(SPI3, SckPin, PC10, 6);
190impl_spi_pin!(SPI3, MisoPin, PC11, 6);
191impl_spi_pin!(SPI3, MosiPin, PC12, 6);
192impl_spi_pin!(SPI3, MosiPin, PD6, 5);
193pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
194impl_spi!(SPI4, APB2);
195impl_spi_pin!(SPI4, MosiPin, PA1, 5);
196impl_spi_pin!(SPI4, MisoPin, PA11, 6);
197impl_spi_pin!(SPI4, SckPin, PB13, 6);
198impl_spi_pin!(SPI4, SckPin, PE12, 5);
199impl_spi_pin!(SPI4, MisoPin, PE13, 5);
200impl_spi_pin!(SPI4, MosiPin, PE14, 5);
201impl_spi_pin!(SPI4, SckPin, PE2, 5);
202impl_spi_pin!(SPI4, MisoPin, PE5, 5);
203impl_spi_pin!(SPI4, MosiPin, PE6, 5);
204pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
205impl_spi!(SPI5, APB2);
206impl_spi_pin!(SPI5, MosiPin, PA10, 6);
207impl_spi_pin!(SPI5, MisoPin, PA12, 6);
208impl_spi_pin!(SPI5, SckPin, PB0, 6);
209impl_spi_pin!(SPI5, MosiPin, PB8, 6);
210impl_spi_pin!(SPI5, SckPin, PE12, 6);
211impl_spi_pin!(SPI5, MisoPin, PE13, 6);
212impl_spi_pin!(SPI5, MosiPin, PE14, 6);
213impl_spi_pin!(SPI5, SckPin, PE2, 6);
214impl_spi_pin!(SPI5, MisoPin, PE5, 6);
215impl_spi_pin!(SPI5, MosiPin, PE6, 6);
165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
166pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
167impl_usart!(USART1); 218impl_usart!(USART1);
@@ -220,6 +271,7 @@ pub use regs::dma_v2 as dma;
220pub use regs::exti_v1 as exti; 271pub use regs::exti_v1 as exti;
221pub use regs::gpio_v2 as gpio; 272pub use regs::gpio_v2 as gpio;
222pub use regs::rng_v1 as rng; 273pub use regs::rng_v1 as rng;
274pub use regs::spi_v1 as spi;
223pub use regs::syscfg_f4 as syscfg; 275pub use regs::syscfg_f4 as syscfg;
224pub use regs::usart_v1 as usart; 276pub use regs::usart_v1 as usart;
225mod regs; 277mod regs;
@@ -236,7 +288,8 @@ peripherals!(
236 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, 288 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9,
237 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 289 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
238 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 290 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
239 PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART3, USART6 291 PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART3,
292 USART6
240); 293);
241 294
242pub mod interrupt { 295pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f412zg.rs b/embassy-stm32/src/pac/stm32f412zg.rs
index 035b44f21..e951dcd09 100644
--- a/embassy-stm32/src/pac/stm32f412zg.rs
+++ b/embassy-stm32/src/pac/stm32f412zg.rs
@@ -161,7 +161,58 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
164impl_rng!(RNG); 164impl_rng!(RNG, RNG);
165pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
166impl_spi!(SPI1, APB2);
167impl_spi_pin!(SPI1, SckPin, PA5, 5);
168impl_spi_pin!(SPI1, MisoPin, PA6, 5);
169impl_spi_pin!(SPI1, MosiPin, PA7, 5);
170impl_spi_pin!(SPI1, SckPin, PB3, 5);
171impl_spi_pin!(SPI1, MisoPin, PB4, 5);
172impl_spi_pin!(SPI1, MosiPin, PB5, 5);
173pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
174impl_spi!(SPI2, APB1);
175impl_spi_pin!(SPI2, SckPin, PB10, 5);
176impl_spi_pin!(SPI2, SckPin, PB13, 5);
177impl_spi_pin!(SPI2, MisoPin, PB14, 5);
178impl_spi_pin!(SPI2, MosiPin, PB15, 5);
179impl_spi_pin!(SPI2, MisoPin, PC2, 5);
180impl_spi_pin!(SPI2, MosiPin, PC3, 5);
181impl_spi_pin!(SPI2, SckPin, PC7, 5);
182impl_spi_pin!(SPI2, SckPin, PD3, 5);
183pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
184impl_spi!(SPI3, APB1);
185impl_spi_pin!(SPI3, SckPin, PB12, 7);
186impl_spi_pin!(SPI3, SckPin, PB3, 6);
187impl_spi_pin!(SPI3, MisoPin, PB4, 6);
188impl_spi_pin!(SPI3, MosiPin, PB5, 6);
189impl_spi_pin!(SPI3, SckPin, PC10, 6);
190impl_spi_pin!(SPI3, MisoPin, PC11, 6);
191impl_spi_pin!(SPI3, MosiPin, PC12, 6);
192impl_spi_pin!(SPI3, MosiPin, PD6, 5);
193pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
194impl_spi!(SPI4, APB2);
195impl_spi_pin!(SPI4, MosiPin, PA1, 5);
196impl_spi_pin!(SPI4, MisoPin, PA11, 6);
197impl_spi_pin!(SPI4, SckPin, PB13, 6);
198impl_spi_pin!(SPI4, SckPin, PE12, 5);
199impl_spi_pin!(SPI4, MisoPin, PE13, 5);
200impl_spi_pin!(SPI4, MosiPin, PE14, 5);
201impl_spi_pin!(SPI4, SckPin, PE2, 5);
202impl_spi_pin!(SPI4, MisoPin, PE5, 5);
203impl_spi_pin!(SPI4, MosiPin, PE6, 5);
204pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
205impl_spi!(SPI5, APB2);
206impl_spi_pin!(SPI5, MosiPin, PA10, 6);
207impl_spi_pin!(SPI5, MisoPin, PA12, 6);
208impl_spi_pin!(SPI5, SckPin, PB0, 6);
209impl_spi_pin!(SPI5, MosiPin, PB8, 6);
210impl_spi_pin!(SPI5, SckPin, PE12, 6);
211impl_spi_pin!(SPI5, MisoPin, PE13, 6);
212impl_spi_pin!(SPI5, MosiPin, PE14, 6);
213impl_spi_pin!(SPI5, SckPin, PE2, 6);
214impl_spi_pin!(SPI5, MisoPin, PE5, 6);
215impl_spi_pin!(SPI5, MosiPin, PE6, 6);
165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
166pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
167impl_usart!(USART1); 218impl_usart!(USART1);
@@ -220,6 +271,7 @@ pub use regs::dma_v2 as dma;
220pub use regs::exti_v1 as exti; 271pub use regs::exti_v1 as exti;
221pub use regs::gpio_v2 as gpio; 272pub use regs::gpio_v2 as gpio;
222pub use regs::rng_v1 as rng; 273pub use regs::rng_v1 as rng;
274pub use regs::spi_v1 as spi;
223pub use regs::syscfg_f4 as syscfg; 275pub use regs::syscfg_f4 as syscfg;
224pub use regs::usart_v1 as usart; 276pub use regs::usart_v1 as usart;
225mod regs; 277mod regs;
@@ -236,7 +288,8 @@ peripherals!(
236 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, 288 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9,
237 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 289 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
238 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 290 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
239 PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART3, USART6 291 PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART3,
292 USART6
240); 293);
241 294
242pub mod interrupt { 295pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f413cg.rs b/embassy-stm32/src/pac/stm32f413cg.rs
index b2b2c30d6..d826ffc9d 100644
--- a/embassy-stm32/src/pac/stm32f413cg.rs
+++ b/embassy-stm32/src/pac/stm32f413cg.rs
@@ -161,7 +161,61 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
164impl_rng!(RNG); 164impl_rng!(RNG, RNG);
165pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
166impl_spi!(SPI1, APB2);
167impl_spi_pin!(SPI1, SckPin, PA5, 5);
168impl_spi_pin!(SPI1, MisoPin, PA6, 5);
169impl_spi_pin!(SPI1, MosiPin, PA7, 5);
170impl_spi_pin!(SPI1, SckPin, PB3, 5);
171impl_spi_pin!(SPI1, MisoPin, PB4, 5);
172impl_spi_pin!(SPI1, MosiPin, PB5, 5);
173pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
174impl_spi!(SPI2, APB1);
175impl_spi_pin!(SPI2, MosiPin, PA10, 5);
176impl_spi_pin!(SPI2, MisoPin, PA12, 5);
177impl_spi_pin!(SPI2, SckPin, PA9, 5);
178impl_spi_pin!(SPI2, SckPin, PB10, 5);
179impl_spi_pin!(SPI2, SckPin, PB13, 5);
180impl_spi_pin!(SPI2, MisoPin, PB14, 5);
181impl_spi_pin!(SPI2, MosiPin, PB15, 5);
182impl_spi_pin!(SPI2, MisoPin, PC2, 5);
183impl_spi_pin!(SPI2, MosiPin, PC3, 5);
184impl_spi_pin!(SPI2, SckPin, PC7, 5);
185impl_spi_pin!(SPI2, SckPin, PD3, 5);
186pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
187impl_spi!(SPI3, APB1);
188impl_spi_pin!(SPI3, SckPin, PB12, 7);
189impl_spi_pin!(SPI3, SckPin, PB3, 6);
190impl_spi_pin!(SPI3, MisoPin, PB4, 6);
191impl_spi_pin!(SPI3, MosiPin, PB5, 6);
192impl_spi_pin!(SPI3, SckPin, PC10, 6);
193impl_spi_pin!(SPI3, MisoPin, PC11, 6);
194impl_spi_pin!(SPI3, MosiPin, PC12, 6);
195impl_spi_pin!(SPI3, MosiPin, PD6, 5);
196pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
197impl_spi!(SPI4, APB2);
198impl_spi_pin!(SPI4, MosiPin, PA1, 5);
199impl_spi_pin!(SPI4, MisoPin, PA11, 6);
200impl_spi_pin!(SPI4, SckPin, PB13, 6);
201impl_spi_pin!(SPI4, SckPin, PE12, 5);
202impl_spi_pin!(SPI4, MisoPin, PE13, 5);
203impl_spi_pin!(SPI4, MosiPin, PE14, 5);
204impl_spi_pin!(SPI4, SckPin, PE2, 5);
205impl_spi_pin!(SPI4, MisoPin, PE5, 5);
206impl_spi_pin!(SPI4, MosiPin, PE6, 5);
207pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
208impl_spi!(SPI5, APB2);
209impl_spi_pin!(SPI5, MosiPin, PA10, 6);
210impl_spi_pin!(SPI5, MisoPin, PA12, 6);
211impl_spi_pin!(SPI5, SckPin, PB0, 6);
212impl_spi_pin!(SPI5, MosiPin, PB8, 6);
213impl_spi_pin!(SPI5, SckPin, PE12, 6);
214impl_spi_pin!(SPI5, MisoPin, PE13, 6);
215impl_spi_pin!(SPI5, MosiPin, PE14, 6);
216impl_spi_pin!(SPI5, SckPin, PE2, 6);
217impl_spi_pin!(SPI5, MisoPin, PE5, 6);
218impl_spi_pin!(SPI5, MosiPin, PE6, 6);
165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 219pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
166pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 220pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
167impl_usart!(USART1); 221impl_usart!(USART1);
@@ -204,6 +258,7 @@ pub use regs::dma_v2 as dma;
204pub use regs::exti_v1 as exti; 258pub use regs::exti_v1 as exti;
205pub use regs::gpio_v2 as gpio; 259pub use regs::gpio_v2 as gpio;
206pub use regs::rng_v1 as rng; 260pub use regs::rng_v1 as rng;
261pub use regs::spi_v1 as spi;
207pub use regs::syscfg_f4 as syscfg; 262pub use regs::syscfg_f4 as syscfg;
208pub use regs::usart_v1 as usart; 263pub use regs::usart_v1 as usart;
209mod regs; 264mod regs;
@@ -220,7 +275,7 @@ peripherals!(
220 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, 275 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9,
221 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 276 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
222 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 277 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
223 PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART6 278 PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART6
224); 279);
225 280
226pub mod interrupt { 281pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f413ch.rs b/embassy-stm32/src/pac/stm32f413ch.rs
index b2b2c30d6..d826ffc9d 100644
--- a/embassy-stm32/src/pac/stm32f413ch.rs
+++ b/embassy-stm32/src/pac/stm32f413ch.rs
@@ -161,7 +161,61 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
164impl_rng!(RNG); 164impl_rng!(RNG, RNG);
165pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
166impl_spi!(SPI1, APB2);
167impl_spi_pin!(SPI1, SckPin, PA5, 5);
168impl_spi_pin!(SPI1, MisoPin, PA6, 5);
169impl_spi_pin!(SPI1, MosiPin, PA7, 5);
170impl_spi_pin!(SPI1, SckPin, PB3, 5);
171impl_spi_pin!(SPI1, MisoPin, PB4, 5);
172impl_spi_pin!(SPI1, MosiPin, PB5, 5);
173pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
174impl_spi!(SPI2, APB1);
175impl_spi_pin!(SPI2, MosiPin, PA10, 5);
176impl_spi_pin!(SPI2, MisoPin, PA12, 5);
177impl_spi_pin!(SPI2, SckPin, PA9, 5);
178impl_spi_pin!(SPI2, SckPin, PB10, 5);
179impl_spi_pin!(SPI2, SckPin, PB13, 5);
180impl_spi_pin!(SPI2, MisoPin, PB14, 5);
181impl_spi_pin!(SPI2, MosiPin, PB15, 5);
182impl_spi_pin!(SPI2, MisoPin, PC2, 5);
183impl_spi_pin!(SPI2, MosiPin, PC3, 5);
184impl_spi_pin!(SPI2, SckPin, PC7, 5);
185impl_spi_pin!(SPI2, SckPin, PD3, 5);
186pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
187impl_spi!(SPI3, APB1);
188impl_spi_pin!(SPI3, SckPin, PB12, 7);
189impl_spi_pin!(SPI3, SckPin, PB3, 6);
190impl_spi_pin!(SPI3, MisoPin, PB4, 6);
191impl_spi_pin!(SPI3, MosiPin, PB5, 6);
192impl_spi_pin!(SPI3, SckPin, PC10, 6);
193impl_spi_pin!(SPI3, MisoPin, PC11, 6);
194impl_spi_pin!(SPI3, MosiPin, PC12, 6);
195impl_spi_pin!(SPI3, MosiPin, PD6, 5);
196pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
197impl_spi!(SPI4, APB2);
198impl_spi_pin!(SPI4, MosiPin, PA1, 5);
199impl_spi_pin!(SPI4, MisoPin, PA11, 6);
200impl_spi_pin!(SPI4, SckPin, PB13, 6);
201impl_spi_pin!(SPI4, SckPin, PE12, 5);
202impl_spi_pin!(SPI4, MisoPin, PE13, 5);
203impl_spi_pin!(SPI4, MosiPin, PE14, 5);
204impl_spi_pin!(SPI4, SckPin, PE2, 5);
205impl_spi_pin!(SPI4, MisoPin, PE5, 5);
206impl_spi_pin!(SPI4, MosiPin, PE6, 5);
207pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
208impl_spi!(SPI5, APB2);
209impl_spi_pin!(SPI5, MosiPin, PA10, 6);
210impl_spi_pin!(SPI5, MisoPin, PA12, 6);
211impl_spi_pin!(SPI5, SckPin, PB0, 6);
212impl_spi_pin!(SPI5, MosiPin, PB8, 6);
213impl_spi_pin!(SPI5, SckPin, PE12, 6);
214impl_spi_pin!(SPI5, MisoPin, PE13, 6);
215impl_spi_pin!(SPI5, MosiPin, PE14, 6);
216impl_spi_pin!(SPI5, SckPin, PE2, 6);
217impl_spi_pin!(SPI5, MisoPin, PE5, 6);
218impl_spi_pin!(SPI5, MosiPin, PE6, 6);
165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 219pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
166pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 220pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
167impl_usart!(USART1); 221impl_usart!(USART1);
@@ -204,6 +258,7 @@ pub use regs::dma_v2 as dma;
204pub use regs::exti_v1 as exti; 258pub use regs::exti_v1 as exti;
205pub use regs::gpio_v2 as gpio; 259pub use regs::gpio_v2 as gpio;
206pub use regs::rng_v1 as rng; 260pub use regs::rng_v1 as rng;
261pub use regs::spi_v1 as spi;
207pub use regs::syscfg_f4 as syscfg; 262pub use regs::syscfg_f4 as syscfg;
208pub use regs::usart_v1 as usart; 263pub use regs::usart_v1 as usart;
209mod regs; 264mod regs;
@@ -220,7 +275,7 @@ peripherals!(
220 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, 275 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9,
221 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 276 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
222 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 277 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
223 PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART6 278 PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART6
224); 279);
225 280
226pub mod interrupt { 281pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f413mg.rs b/embassy-stm32/src/pac/stm32f413mg.rs
index e653d0cb1..7064cf6d3 100644
--- a/embassy-stm32/src/pac/stm32f413mg.rs
+++ b/embassy-stm32/src/pac/stm32f413mg.rs
@@ -161,7 +161,61 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
164impl_rng!(RNG); 164impl_rng!(RNG, RNG);
165pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
166impl_spi!(SPI1, APB2);
167impl_spi_pin!(SPI1, SckPin, PA5, 5);
168impl_spi_pin!(SPI1, MisoPin, PA6, 5);
169impl_spi_pin!(SPI1, MosiPin, PA7, 5);
170impl_spi_pin!(SPI1, SckPin, PB3, 5);
171impl_spi_pin!(SPI1, MisoPin, PB4, 5);
172impl_spi_pin!(SPI1, MosiPin, PB5, 5);
173pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
174impl_spi!(SPI2, APB1);
175impl_spi_pin!(SPI2, MosiPin, PA10, 5);
176impl_spi_pin!(SPI2, MisoPin, PA12, 5);
177impl_spi_pin!(SPI2, SckPin, PA9, 5);
178impl_spi_pin!(SPI2, SckPin, PB10, 5);
179impl_spi_pin!(SPI2, SckPin, PB13, 5);
180impl_spi_pin!(SPI2, MisoPin, PB14, 5);
181impl_spi_pin!(SPI2, MosiPin, PB15, 5);
182impl_spi_pin!(SPI2, MisoPin, PC2, 5);
183impl_spi_pin!(SPI2, MosiPin, PC3, 5);
184impl_spi_pin!(SPI2, SckPin, PC7, 5);
185impl_spi_pin!(SPI2, SckPin, PD3, 5);
186pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
187impl_spi!(SPI3, APB1);
188impl_spi_pin!(SPI3, SckPin, PB12, 7);
189impl_spi_pin!(SPI3, SckPin, PB3, 6);
190impl_spi_pin!(SPI3, MisoPin, PB4, 6);
191impl_spi_pin!(SPI3, MosiPin, PB5, 6);
192impl_spi_pin!(SPI3, SckPin, PC10, 6);
193impl_spi_pin!(SPI3, MisoPin, PC11, 6);
194impl_spi_pin!(SPI3, MosiPin, PC12, 6);
195impl_spi_pin!(SPI3, MosiPin, PD6, 5);
196pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
197impl_spi!(SPI4, APB2);
198impl_spi_pin!(SPI4, MosiPin, PA1, 5);
199impl_spi_pin!(SPI4, MisoPin, PA11, 6);
200impl_spi_pin!(SPI4, SckPin, PB13, 6);
201impl_spi_pin!(SPI4, SckPin, PE12, 5);
202impl_spi_pin!(SPI4, MisoPin, PE13, 5);
203impl_spi_pin!(SPI4, MosiPin, PE14, 5);
204impl_spi_pin!(SPI4, SckPin, PE2, 5);
205impl_spi_pin!(SPI4, MisoPin, PE5, 5);
206impl_spi_pin!(SPI4, MosiPin, PE6, 5);
207pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
208impl_spi!(SPI5, APB2);
209impl_spi_pin!(SPI5, MosiPin, PA10, 6);
210impl_spi_pin!(SPI5, MisoPin, PA12, 6);
211impl_spi_pin!(SPI5, SckPin, PB0, 6);
212impl_spi_pin!(SPI5, MosiPin, PB8, 6);
213impl_spi_pin!(SPI5, SckPin, PE12, 6);
214impl_spi_pin!(SPI5, MisoPin, PE13, 6);
215impl_spi_pin!(SPI5, MosiPin, PE14, 6);
216impl_spi_pin!(SPI5, SckPin, PE2, 6);
217impl_spi_pin!(SPI5, MisoPin, PE5, 6);
218impl_spi_pin!(SPI5, MosiPin, PE6, 6);
165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 219pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
166pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 220pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
167impl_usart!(USART1); 221impl_usart!(USART1);
@@ -220,6 +274,7 @@ pub use regs::dma_v2 as dma;
220pub use regs::exti_v1 as exti; 274pub use regs::exti_v1 as exti;
221pub use regs::gpio_v2 as gpio; 275pub use regs::gpio_v2 as gpio;
222pub use regs::rng_v1 as rng; 276pub use regs::rng_v1 as rng;
277pub use regs::spi_v1 as spi;
223pub use regs::syscfg_f4 as syscfg; 278pub use regs::syscfg_f4 as syscfg;
224pub use regs::usart_v1 as usart; 279pub use regs::usart_v1 as usart;
225mod regs; 280mod regs;
@@ -236,7 +291,8 @@ peripherals!(
236 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, 291 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9,
237 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 292 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
238 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 293 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
239 PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART3, USART6 294 PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART3,
295 USART6
240); 296);
241 297
242pub mod interrupt { 298pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f413mh.rs b/embassy-stm32/src/pac/stm32f413mh.rs
index e653d0cb1..7064cf6d3 100644
--- a/embassy-stm32/src/pac/stm32f413mh.rs
+++ b/embassy-stm32/src/pac/stm32f413mh.rs
@@ -161,7 +161,61 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
164impl_rng!(RNG); 164impl_rng!(RNG, RNG);
165pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
166impl_spi!(SPI1, APB2);
167impl_spi_pin!(SPI1, SckPin, PA5, 5);
168impl_spi_pin!(SPI1, MisoPin, PA6, 5);
169impl_spi_pin!(SPI1, MosiPin, PA7, 5);
170impl_spi_pin!(SPI1, SckPin, PB3, 5);
171impl_spi_pin!(SPI1, MisoPin, PB4, 5);
172impl_spi_pin!(SPI1, MosiPin, PB5, 5);
173pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
174impl_spi!(SPI2, APB1);
175impl_spi_pin!(SPI2, MosiPin, PA10, 5);
176impl_spi_pin!(SPI2, MisoPin, PA12, 5);
177impl_spi_pin!(SPI2, SckPin, PA9, 5);
178impl_spi_pin!(SPI2, SckPin, PB10, 5);
179impl_spi_pin!(SPI2, SckPin, PB13, 5);
180impl_spi_pin!(SPI2, MisoPin, PB14, 5);
181impl_spi_pin!(SPI2, MosiPin, PB15, 5);
182impl_spi_pin!(SPI2, MisoPin, PC2, 5);
183impl_spi_pin!(SPI2, MosiPin, PC3, 5);
184impl_spi_pin!(SPI2, SckPin, PC7, 5);
185impl_spi_pin!(SPI2, SckPin, PD3, 5);
186pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
187impl_spi!(SPI3, APB1);
188impl_spi_pin!(SPI3, SckPin, PB12, 7);
189impl_spi_pin!(SPI3, SckPin, PB3, 6);
190impl_spi_pin!(SPI3, MisoPin, PB4, 6);
191impl_spi_pin!(SPI3, MosiPin, PB5, 6);
192impl_spi_pin!(SPI3, SckPin, PC10, 6);
193impl_spi_pin!(SPI3, MisoPin, PC11, 6);
194impl_spi_pin!(SPI3, MosiPin, PC12, 6);
195impl_spi_pin!(SPI3, MosiPin, PD6, 5);
196pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
197impl_spi!(SPI4, APB2);
198impl_spi_pin!(SPI4, MosiPin, PA1, 5);
199impl_spi_pin!(SPI4, MisoPin, PA11, 6);
200impl_spi_pin!(SPI4, SckPin, PB13, 6);
201impl_spi_pin!(SPI4, SckPin, PE12, 5);
202impl_spi_pin!(SPI4, MisoPin, PE13, 5);
203impl_spi_pin!(SPI4, MosiPin, PE14, 5);
204impl_spi_pin!(SPI4, SckPin, PE2, 5);
205impl_spi_pin!(SPI4, MisoPin, PE5, 5);
206impl_spi_pin!(SPI4, MosiPin, PE6, 5);
207pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
208impl_spi!(SPI5, APB2);
209impl_spi_pin!(SPI5, MosiPin, PA10, 6);
210impl_spi_pin!(SPI5, MisoPin, PA12, 6);
211impl_spi_pin!(SPI5, SckPin, PB0, 6);
212impl_spi_pin!(SPI5, MosiPin, PB8, 6);
213impl_spi_pin!(SPI5, SckPin, PE12, 6);
214impl_spi_pin!(SPI5, MisoPin, PE13, 6);
215impl_spi_pin!(SPI5, MosiPin, PE14, 6);
216impl_spi_pin!(SPI5, SckPin, PE2, 6);
217impl_spi_pin!(SPI5, MisoPin, PE5, 6);
218impl_spi_pin!(SPI5, MosiPin, PE6, 6);
165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 219pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
166pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 220pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
167impl_usart!(USART1); 221impl_usart!(USART1);
@@ -220,6 +274,7 @@ pub use regs::dma_v2 as dma;
220pub use regs::exti_v1 as exti; 274pub use regs::exti_v1 as exti;
221pub use regs::gpio_v2 as gpio; 275pub use regs::gpio_v2 as gpio;
222pub use regs::rng_v1 as rng; 276pub use regs::rng_v1 as rng;
277pub use regs::spi_v1 as spi;
223pub use regs::syscfg_f4 as syscfg; 278pub use regs::syscfg_f4 as syscfg;
224pub use regs::usart_v1 as usart; 279pub use regs::usart_v1 as usart;
225mod regs; 280mod regs;
@@ -236,7 +291,8 @@ peripherals!(
236 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, 291 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9,
237 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 292 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
238 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 293 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
239 PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART3, USART6 294 PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART3,
295 USART6
240); 296);
241 297
242pub mod interrupt { 298pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f413rg.rs b/embassy-stm32/src/pac/stm32f413rg.rs
index e653d0cb1..7064cf6d3 100644
--- a/embassy-stm32/src/pac/stm32f413rg.rs
+++ b/embassy-stm32/src/pac/stm32f413rg.rs
@@ -161,7 +161,61 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
164impl_rng!(RNG); 164impl_rng!(RNG, RNG);
165pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
166impl_spi!(SPI1, APB2);
167impl_spi_pin!(SPI1, SckPin, PA5, 5);
168impl_spi_pin!(SPI1, MisoPin, PA6, 5);
169impl_spi_pin!(SPI1, MosiPin, PA7, 5);
170impl_spi_pin!(SPI1, SckPin, PB3, 5);
171impl_spi_pin!(SPI1, MisoPin, PB4, 5);
172impl_spi_pin!(SPI1, MosiPin, PB5, 5);
173pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
174impl_spi!(SPI2, APB1);
175impl_spi_pin!(SPI2, MosiPin, PA10, 5);
176impl_spi_pin!(SPI2, MisoPin, PA12, 5);
177impl_spi_pin!(SPI2, SckPin, PA9, 5);
178impl_spi_pin!(SPI2, SckPin, PB10, 5);
179impl_spi_pin!(SPI2, SckPin, PB13, 5);
180impl_spi_pin!(SPI2, MisoPin, PB14, 5);
181impl_spi_pin!(SPI2, MosiPin, PB15, 5);
182impl_spi_pin!(SPI2, MisoPin, PC2, 5);
183impl_spi_pin!(SPI2, MosiPin, PC3, 5);
184impl_spi_pin!(SPI2, SckPin, PC7, 5);
185impl_spi_pin!(SPI2, SckPin, PD3, 5);
186pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
187impl_spi!(SPI3, APB1);
188impl_spi_pin!(SPI3, SckPin, PB12, 7);
189impl_spi_pin!(SPI3, SckPin, PB3, 6);
190impl_spi_pin!(SPI3, MisoPin, PB4, 6);
191impl_spi_pin!(SPI3, MosiPin, PB5, 6);
192impl_spi_pin!(SPI3, SckPin, PC10, 6);
193impl_spi_pin!(SPI3, MisoPin, PC11, 6);
194impl_spi_pin!(SPI3, MosiPin, PC12, 6);
195impl_spi_pin!(SPI3, MosiPin, PD6, 5);
196pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
197impl_spi!(SPI4, APB2);
198impl_spi_pin!(SPI4, MosiPin, PA1, 5);
199impl_spi_pin!(SPI4, MisoPin, PA11, 6);
200impl_spi_pin!(SPI4, SckPin, PB13, 6);
201impl_spi_pin!(SPI4, SckPin, PE12, 5);
202impl_spi_pin!(SPI4, MisoPin, PE13, 5);
203impl_spi_pin!(SPI4, MosiPin, PE14, 5);
204impl_spi_pin!(SPI4, SckPin, PE2, 5);
205impl_spi_pin!(SPI4, MisoPin, PE5, 5);
206impl_spi_pin!(SPI4, MosiPin, PE6, 5);
207pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
208impl_spi!(SPI5, APB2);
209impl_spi_pin!(SPI5, MosiPin, PA10, 6);
210impl_spi_pin!(SPI5, MisoPin, PA12, 6);
211impl_spi_pin!(SPI5, SckPin, PB0, 6);
212impl_spi_pin!(SPI5, MosiPin, PB8, 6);
213impl_spi_pin!(SPI5, SckPin, PE12, 6);
214impl_spi_pin!(SPI5, MisoPin, PE13, 6);
215impl_spi_pin!(SPI5, MosiPin, PE14, 6);
216impl_spi_pin!(SPI5, SckPin, PE2, 6);
217impl_spi_pin!(SPI5, MisoPin, PE5, 6);
218impl_spi_pin!(SPI5, MosiPin, PE6, 6);
165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 219pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
166pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 220pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
167impl_usart!(USART1); 221impl_usart!(USART1);
@@ -220,6 +274,7 @@ pub use regs::dma_v2 as dma;
220pub use regs::exti_v1 as exti; 274pub use regs::exti_v1 as exti;
221pub use regs::gpio_v2 as gpio; 275pub use regs::gpio_v2 as gpio;
222pub use regs::rng_v1 as rng; 276pub use regs::rng_v1 as rng;
277pub use regs::spi_v1 as spi;
223pub use regs::syscfg_f4 as syscfg; 278pub use regs::syscfg_f4 as syscfg;
224pub use regs::usart_v1 as usart; 279pub use regs::usart_v1 as usart;
225mod regs; 280mod regs;
@@ -236,7 +291,8 @@ peripherals!(
236 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, 291 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9,
237 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 292 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
238 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 293 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
239 PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART3, USART6 294 PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART3,
295 USART6
240); 296);
241 297
242pub mod interrupt { 298pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f413rh.rs b/embassy-stm32/src/pac/stm32f413rh.rs
index e653d0cb1..7064cf6d3 100644
--- a/embassy-stm32/src/pac/stm32f413rh.rs
+++ b/embassy-stm32/src/pac/stm32f413rh.rs
@@ -161,7 +161,61 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
164impl_rng!(RNG); 164impl_rng!(RNG, RNG);
165pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
166impl_spi!(SPI1, APB2);
167impl_spi_pin!(SPI1, SckPin, PA5, 5);
168impl_spi_pin!(SPI1, MisoPin, PA6, 5);
169impl_spi_pin!(SPI1, MosiPin, PA7, 5);
170impl_spi_pin!(SPI1, SckPin, PB3, 5);
171impl_spi_pin!(SPI1, MisoPin, PB4, 5);
172impl_spi_pin!(SPI1, MosiPin, PB5, 5);
173pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
174impl_spi!(SPI2, APB1);
175impl_spi_pin!(SPI2, MosiPin, PA10, 5);
176impl_spi_pin!(SPI2, MisoPin, PA12, 5);
177impl_spi_pin!(SPI2, SckPin, PA9, 5);
178impl_spi_pin!(SPI2, SckPin, PB10, 5);
179impl_spi_pin!(SPI2, SckPin, PB13, 5);
180impl_spi_pin!(SPI2, MisoPin, PB14, 5);
181impl_spi_pin!(SPI2, MosiPin, PB15, 5);
182impl_spi_pin!(SPI2, MisoPin, PC2, 5);
183impl_spi_pin!(SPI2, MosiPin, PC3, 5);
184impl_spi_pin!(SPI2, SckPin, PC7, 5);
185impl_spi_pin!(SPI2, SckPin, PD3, 5);
186pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
187impl_spi!(SPI3, APB1);
188impl_spi_pin!(SPI3, SckPin, PB12, 7);
189impl_spi_pin!(SPI3, SckPin, PB3, 6);
190impl_spi_pin!(SPI3, MisoPin, PB4, 6);
191impl_spi_pin!(SPI3, MosiPin, PB5, 6);
192impl_spi_pin!(SPI3, SckPin, PC10, 6);
193impl_spi_pin!(SPI3, MisoPin, PC11, 6);
194impl_spi_pin!(SPI3, MosiPin, PC12, 6);
195impl_spi_pin!(SPI3, MosiPin, PD6, 5);
196pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
197impl_spi!(SPI4, APB2);
198impl_spi_pin!(SPI4, MosiPin, PA1, 5);
199impl_spi_pin!(SPI4, MisoPin, PA11, 6);
200impl_spi_pin!(SPI4, SckPin, PB13, 6);
201impl_spi_pin!(SPI4, SckPin, PE12, 5);
202impl_spi_pin!(SPI4, MisoPin, PE13, 5);
203impl_spi_pin!(SPI4, MosiPin, PE14, 5);
204impl_spi_pin!(SPI4, SckPin, PE2, 5);
205impl_spi_pin!(SPI4, MisoPin, PE5, 5);
206impl_spi_pin!(SPI4, MosiPin, PE6, 5);
207pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
208impl_spi!(SPI5, APB2);
209impl_spi_pin!(SPI5, MosiPin, PA10, 6);
210impl_spi_pin!(SPI5, MisoPin, PA12, 6);
211impl_spi_pin!(SPI5, SckPin, PB0, 6);
212impl_spi_pin!(SPI5, MosiPin, PB8, 6);
213impl_spi_pin!(SPI5, SckPin, PE12, 6);
214impl_spi_pin!(SPI5, MisoPin, PE13, 6);
215impl_spi_pin!(SPI5, MosiPin, PE14, 6);
216impl_spi_pin!(SPI5, SckPin, PE2, 6);
217impl_spi_pin!(SPI5, MisoPin, PE5, 6);
218impl_spi_pin!(SPI5, MosiPin, PE6, 6);
165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 219pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
166pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 220pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
167impl_usart!(USART1); 221impl_usart!(USART1);
@@ -220,6 +274,7 @@ pub use regs::dma_v2 as dma;
220pub use regs::exti_v1 as exti; 274pub use regs::exti_v1 as exti;
221pub use regs::gpio_v2 as gpio; 275pub use regs::gpio_v2 as gpio;
222pub use regs::rng_v1 as rng; 276pub use regs::rng_v1 as rng;
277pub use regs::spi_v1 as spi;
223pub use regs::syscfg_f4 as syscfg; 278pub use regs::syscfg_f4 as syscfg;
224pub use regs::usart_v1 as usart; 279pub use regs::usart_v1 as usart;
225mod regs; 280mod regs;
@@ -236,7 +291,8 @@ peripherals!(
236 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, 291 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9,
237 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 292 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
238 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 293 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
239 PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART3, USART6 294 PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART3,
295 USART6
240); 296);
241 297
242pub mod interrupt { 298pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f413vg.rs b/embassy-stm32/src/pac/stm32f413vg.rs
index e653d0cb1..7064cf6d3 100644
--- a/embassy-stm32/src/pac/stm32f413vg.rs
+++ b/embassy-stm32/src/pac/stm32f413vg.rs
@@ -161,7 +161,61 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
164impl_rng!(RNG); 164impl_rng!(RNG, RNG);
165pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
166impl_spi!(SPI1, APB2);
167impl_spi_pin!(SPI1, SckPin, PA5, 5);
168impl_spi_pin!(SPI1, MisoPin, PA6, 5);
169impl_spi_pin!(SPI1, MosiPin, PA7, 5);
170impl_spi_pin!(SPI1, SckPin, PB3, 5);
171impl_spi_pin!(SPI1, MisoPin, PB4, 5);
172impl_spi_pin!(SPI1, MosiPin, PB5, 5);
173pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
174impl_spi!(SPI2, APB1);
175impl_spi_pin!(SPI2, MosiPin, PA10, 5);
176impl_spi_pin!(SPI2, MisoPin, PA12, 5);
177impl_spi_pin!(SPI2, SckPin, PA9, 5);
178impl_spi_pin!(SPI2, SckPin, PB10, 5);
179impl_spi_pin!(SPI2, SckPin, PB13, 5);
180impl_spi_pin!(SPI2, MisoPin, PB14, 5);
181impl_spi_pin!(SPI2, MosiPin, PB15, 5);
182impl_spi_pin!(SPI2, MisoPin, PC2, 5);
183impl_spi_pin!(SPI2, MosiPin, PC3, 5);
184impl_spi_pin!(SPI2, SckPin, PC7, 5);
185impl_spi_pin!(SPI2, SckPin, PD3, 5);
186pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
187impl_spi!(SPI3, APB1);
188impl_spi_pin!(SPI3, SckPin, PB12, 7);
189impl_spi_pin!(SPI3, SckPin, PB3, 6);
190impl_spi_pin!(SPI3, MisoPin, PB4, 6);
191impl_spi_pin!(SPI3, MosiPin, PB5, 6);
192impl_spi_pin!(SPI3, SckPin, PC10, 6);
193impl_spi_pin!(SPI3, MisoPin, PC11, 6);
194impl_spi_pin!(SPI3, MosiPin, PC12, 6);
195impl_spi_pin!(SPI3, MosiPin, PD6, 5);
196pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
197impl_spi!(SPI4, APB2);
198impl_spi_pin!(SPI4, MosiPin, PA1, 5);
199impl_spi_pin!(SPI4, MisoPin, PA11, 6);
200impl_spi_pin!(SPI4, SckPin, PB13, 6);
201impl_spi_pin!(SPI4, SckPin, PE12, 5);
202impl_spi_pin!(SPI4, MisoPin, PE13, 5);
203impl_spi_pin!(SPI4, MosiPin, PE14, 5);
204impl_spi_pin!(SPI4, SckPin, PE2, 5);
205impl_spi_pin!(SPI4, MisoPin, PE5, 5);
206impl_spi_pin!(SPI4, MosiPin, PE6, 5);
207pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
208impl_spi!(SPI5, APB2);
209impl_spi_pin!(SPI5, MosiPin, PA10, 6);
210impl_spi_pin!(SPI5, MisoPin, PA12, 6);
211impl_spi_pin!(SPI5, SckPin, PB0, 6);
212impl_spi_pin!(SPI5, MosiPin, PB8, 6);
213impl_spi_pin!(SPI5, SckPin, PE12, 6);
214impl_spi_pin!(SPI5, MisoPin, PE13, 6);
215impl_spi_pin!(SPI5, MosiPin, PE14, 6);
216impl_spi_pin!(SPI5, SckPin, PE2, 6);
217impl_spi_pin!(SPI5, MisoPin, PE5, 6);
218impl_spi_pin!(SPI5, MosiPin, PE6, 6);
165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 219pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
166pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 220pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
167impl_usart!(USART1); 221impl_usart!(USART1);
@@ -220,6 +274,7 @@ pub use regs::dma_v2 as dma;
220pub use regs::exti_v1 as exti; 274pub use regs::exti_v1 as exti;
221pub use regs::gpio_v2 as gpio; 275pub use regs::gpio_v2 as gpio;
222pub use regs::rng_v1 as rng; 276pub use regs::rng_v1 as rng;
277pub use regs::spi_v1 as spi;
223pub use regs::syscfg_f4 as syscfg; 278pub use regs::syscfg_f4 as syscfg;
224pub use regs::usart_v1 as usart; 279pub use regs::usart_v1 as usart;
225mod regs; 280mod regs;
@@ -236,7 +291,8 @@ peripherals!(
236 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, 291 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9,
237 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 292 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
238 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 293 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
239 PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART3, USART6 294 PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART3,
295 USART6
240); 296);
241 297
242pub mod interrupt { 298pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f413vh.rs b/embassy-stm32/src/pac/stm32f413vh.rs
index e653d0cb1..7064cf6d3 100644
--- a/embassy-stm32/src/pac/stm32f413vh.rs
+++ b/embassy-stm32/src/pac/stm32f413vh.rs
@@ -161,7 +161,61 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
164impl_rng!(RNG); 164impl_rng!(RNG, RNG);
165pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
166impl_spi!(SPI1, APB2);
167impl_spi_pin!(SPI1, SckPin, PA5, 5);
168impl_spi_pin!(SPI1, MisoPin, PA6, 5);
169impl_spi_pin!(SPI1, MosiPin, PA7, 5);
170impl_spi_pin!(SPI1, SckPin, PB3, 5);
171impl_spi_pin!(SPI1, MisoPin, PB4, 5);
172impl_spi_pin!(SPI1, MosiPin, PB5, 5);
173pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
174impl_spi!(SPI2, APB1);
175impl_spi_pin!(SPI2, MosiPin, PA10, 5);
176impl_spi_pin!(SPI2, MisoPin, PA12, 5);
177impl_spi_pin!(SPI2, SckPin, PA9, 5);
178impl_spi_pin!(SPI2, SckPin, PB10, 5);
179impl_spi_pin!(SPI2, SckPin, PB13, 5);
180impl_spi_pin!(SPI2, MisoPin, PB14, 5);
181impl_spi_pin!(SPI2, MosiPin, PB15, 5);
182impl_spi_pin!(SPI2, MisoPin, PC2, 5);
183impl_spi_pin!(SPI2, MosiPin, PC3, 5);
184impl_spi_pin!(SPI2, SckPin, PC7, 5);
185impl_spi_pin!(SPI2, SckPin, PD3, 5);
186pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
187impl_spi!(SPI3, APB1);
188impl_spi_pin!(SPI3, SckPin, PB12, 7);
189impl_spi_pin!(SPI3, SckPin, PB3, 6);
190impl_spi_pin!(SPI3, MisoPin, PB4, 6);
191impl_spi_pin!(SPI3, MosiPin, PB5, 6);
192impl_spi_pin!(SPI3, SckPin, PC10, 6);
193impl_spi_pin!(SPI3, MisoPin, PC11, 6);
194impl_spi_pin!(SPI3, MosiPin, PC12, 6);
195impl_spi_pin!(SPI3, MosiPin, PD6, 5);
196pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
197impl_spi!(SPI4, APB2);
198impl_spi_pin!(SPI4, MosiPin, PA1, 5);
199impl_spi_pin!(SPI4, MisoPin, PA11, 6);
200impl_spi_pin!(SPI4, SckPin, PB13, 6);
201impl_spi_pin!(SPI4, SckPin, PE12, 5);
202impl_spi_pin!(SPI4, MisoPin, PE13, 5);
203impl_spi_pin!(SPI4, MosiPin, PE14, 5);
204impl_spi_pin!(SPI4, SckPin, PE2, 5);
205impl_spi_pin!(SPI4, MisoPin, PE5, 5);
206impl_spi_pin!(SPI4, MosiPin, PE6, 5);
207pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
208impl_spi!(SPI5, APB2);
209impl_spi_pin!(SPI5, MosiPin, PA10, 6);
210impl_spi_pin!(SPI5, MisoPin, PA12, 6);
211impl_spi_pin!(SPI5, SckPin, PB0, 6);
212impl_spi_pin!(SPI5, MosiPin, PB8, 6);
213impl_spi_pin!(SPI5, SckPin, PE12, 6);
214impl_spi_pin!(SPI5, MisoPin, PE13, 6);
215impl_spi_pin!(SPI5, MosiPin, PE14, 6);
216impl_spi_pin!(SPI5, SckPin, PE2, 6);
217impl_spi_pin!(SPI5, MisoPin, PE5, 6);
218impl_spi_pin!(SPI5, MosiPin, PE6, 6);
165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 219pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
166pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 220pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
167impl_usart!(USART1); 221impl_usart!(USART1);
@@ -220,6 +274,7 @@ pub use regs::dma_v2 as dma;
220pub use regs::exti_v1 as exti; 274pub use regs::exti_v1 as exti;
221pub use regs::gpio_v2 as gpio; 275pub use regs::gpio_v2 as gpio;
222pub use regs::rng_v1 as rng; 276pub use regs::rng_v1 as rng;
277pub use regs::spi_v1 as spi;
223pub use regs::syscfg_f4 as syscfg; 278pub use regs::syscfg_f4 as syscfg;
224pub use regs::usart_v1 as usart; 279pub use regs::usart_v1 as usart;
225mod regs; 280mod regs;
@@ -236,7 +291,8 @@ peripherals!(
236 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, 291 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9,
237 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 292 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
238 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 293 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
239 PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART3, USART6 294 PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART3,
295 USART6
240); 296);
241 297
242pub mod interrupt { 298pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f413zg.rs b/embassy-stm32/src/pac/stm32f413zg.rs
index e653d0cb1..7064cf6d3 100644
--- a/embassy-stm32/src/pac/stm32f413zg.rs
+++ b/embassy-stm32/src/pac/stm32f413zg.rs
@@ -161,7 +161,61 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
164impl_rng!(RNG); 164impl_rng!(RNG, RNG);
165pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
166impl_spi!(SPI1, APB2);
167impl_spi_pin!(SPI1, SckPin, PA5, 5);
168impl_spi_pin!(SPI1, MisoPin, PA6, 5);
169impl_spi_pin!(SPI1, MosiPin, PA7, 5);
170impl_spi_pin!(SPI1, SckPin, PB3, 5);
171impl_spi_pin!(SPI1, MisoPin, PB4, 5);
172impl_spi_pin!(SPI1, MosiPin, PB5, 5);
173pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
174impl_spi!(SPI2, APB1);
175impl_spi_pin!(SPI2, MosiPin, PA10, 5);
176impl_spi_pin!(SPI2, MisoPin, PA12, 5);
177impl_spi_pin!(SPI2, SckPin, PA9, 5);
178impl_spi_pin!(SPI2, SckPin, PB10, 5);
179impl_spi_pin!(SPI2, SckPin, PB13, 5);
180impl_spi_pin!(SPI2, MisoPin, PB14, 5);
181impl_spi_pin!(SPI2, MosiPin, PB15, 5);
182impl_spi_pin!(SPI2, MisoPin, PC2, 5);
183impl_spi_pin!(SPI2, MosiPin, PC3, 5);
184impl_spi_pin!(SPI2, SckPin, PC7, 5);
185impl_spi_pin!(SPI2, SckPin, PD3, 5);
186pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
187impl_spi!(SPI3, APB1);
188impl_spi_pin!(SPI3, SckPin, PB12, 7);
189impl_spi_pin!(SPI3, SckPin, PB3, 6);
190impl_spi_pin!(SPI3, MisoPin, PB4, 6);
191impl_spi_pin!(SPI3, MosiPin, PB5, 6);
192impl_spi_pin!(SPI3, SckPin, PC10, 6);
193impl_spi_pin!(SPI3, MisoPin, PC11, 6);
194impl_spi_pin!(SPI3, MosiPin, PC12, 6);
195impl_spi_pin!(SPI3, MosiPin, PD6, 5);
196pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
197impl_spi!(SPI4, APB2);
198impl_spi_pin!(SPI4, MosiPin, PA1, 5);
199impl_spi_pin!(SPI4, MisoPin, PA11, 6);
200impl_spi_pin!(SPI4, SckPin, PB13, 6);
201impl_spi_pin!(SPI4, SckPin, PE12, 5);
202impl_spi_pin!(SPI4, MisoPin, PE13, 5);
203impl_spi_pin!(SPI4, MosiPin, PE14, 5);
204impl_spi_pin!(SPI4, SckPin, PE2, 5);
205impl_spi_pin!(SPI4, MisoPin, PE5, 5);
206impl_spi_pin!(SPI4, MosiPin, PE6, 5);
207pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
208impl_spi!(SPI5, APB2);
209impl_spi_pin!(SPI5, MosiPin, PA10, 6);
210impl_spi_pin!(SPI5, MisoPin, PA12, 6);
211impl_spi_pin!(SPI5, SckPin, PB0, 6);
212impl_spi_pin!(SPI5, MosiPin, PB8, 6);
213impl_spi_pin!(SPI5, SckPin, PE12, 6);
214impl_spi_pin!(SPI5, MisoPin, PE13, 6);
215impl_spi_pin!(SPI5, MosiPin, PE14, 6);
216impl_spi_pin!(SPI5, SckPin, PE2, 6);
217impl_spi_pin!(SPI5, MisoPin, PE5, 6);
218impl_spi_pin!(SPI5, MosiPin, PE6, 6);
165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 219pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
166pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 220pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
167impl_usart!(USART1); 221impl_usart!(USART1);
@@ -220,6 +274,7 @@ pub use regs::dma_v2 as dma;
220pub use regs::exti_v1 as exti; 274pub use regs::exti_v1 as exti;
221pub use regs::gpio_v2 as gpio; 275pub use regs::gpio_v2 as gpio;
222pub use regs::rng_v1 as rng; 276pub use regs::rng_v1 as rng;
277pub use regs::spi_v1 as spi;
223pub use regs::syscfg_f4 as syscfg; 278pub use regs::syscfg_f4 as syscfg;
224pub use regs::usart_v1 as usart; 279pub use regs::usart_v1 as usart;
225mod regs; 280mod regs;
@@ -236,7 +291,8 @@ peripherals!(
236 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, 291 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9,
237 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 292 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
238 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 293 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
239 PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART3, USART6 294 PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART3,
295 USART6
240); 296);
241 297
242pub mod interrupt { 298pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f413zh.rs b/embassy-stm32/src/pac/stm32f413zh.rs
index e653d0cb1..7064cf6d3 100644
--- a/embassy-stm32/src/pac/stm32f413zh.rs
+++ b/embassy-stm32/src/pac/stm32f413zh.rs
@@ -161,7 +161,61 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
164impl_rng!(RNG); 164impl_rng!(RNG, RNG);
165pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
166impl_spi!(SPI1, APB2);
167impl_spi_pin!(SPI1, SckPin, PA5, 5);
168impl_spi_pin!(SPI1, MisoPin, PA6, 5);
169impl_spi_pin!(SPI1, MosiPin, PA7, 5);
170impl_spi_pin!(SPI1, SckPin, PB3, 5);
171impl_spi_pin!(SPI1, MisoPin, PB4, 5);
172impl_spi_pin!(SPI1, MosiPin, PB5, 5);
173pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
174impl_spi!(SPI2, APB1);
175impl_spi_pin!(SPI2, MosiPin, PA10, 5);
176impl_spi_pin!(SPI2, MisoPin, PA12, 5);
177impl_spi_pin!(SPI2, SckPin, PA9, 5);
178impl_spi_pin!(SPI2, SckPin, PB10, 5);
179impl_spi_pin!(SPI2, SckPin, PB13, 5);
180impl_spi_pin!(SPI2, MisoPin, PB14, 5);
181impl_spi_pin!(SPI2, MosiPin, PB15, 5);
182impl_spi_pin!(SPI2, MisoPin, PC2, 5);
183impl_spi_pin!(SPI2, MosiPin, PC3, 5);
184impl_spi_pin!(SPI2, SckPin, PC7, 5);
185impl_spi_pin!(SPI2, SckPin, PD3, 5);
186pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
187impl_spi!(SPI3, APB1);
188impl_spi_pin!(SPI3, SckPin, PB12, 7);
189impl_spi_pin!(SPI3, SckPin, PB3, 6);
190impl_spi_pin!(SPI3, MisoPin, PB4, 6);
191impl_spi_pin!(SPI3, MosiPin, PB5, 6);
192impl_spi_pin!(SPI3, SckPin, PC10, 6);
193impl_spi_pin!(SPI3, MisoPin, PC11, 6);
194impl_spi_pin!(SPI3, MosiPin, PC12, 6);
195impl_spi_pin!(SPI3, MosiPin, PD6, 5);
196pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
197impl_spi!(SPI4, APB2);
198impl_spi_pin!(SPI4, MosiPin, PA1, 5);
199impl_spi_pin!(SPI4, MisoPin, PA11, 6);
200impl_spi_pin!(SPI4, SckPin, PB13, 6);
201impl_spi_pin!(SPI4, SckPin, PE12, 5);
202impl_spi_pin!(SPI4, MisoPin, PE13, 5);
203impl_spi_pin!(SPI4, MosiPin, PE14, 5);
204impl_spi_pin!(SPI4, SckPin, PE2, 5);
205impl_spi_pin!(SPI4, MisoPin, PE5, 5);
206impl_spi_pin!(SPI4, MosiPin, PE6, 5);
207pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
208impl_spi!(SPI5, APB2);
209impl_spi_pin!(SPI5, MosiPin, PA10, 6);
210impl_spi_pin!(SPI5, MisoPin, PA12, 6);
211impl_spi_pin!(SPI5, SckPin, PB0, 6);
212impl_spi_pin!(SPI5, MosiPin, PB8, 6);
213impl_spi_pin!(SPI5, SckPin, PE12, 6);
214impl_spi_pin!(SPI5, MisoPin, PE13, 6);
215impl_spi_pin!(SPI5, MosiPin, PE14, 6);
216impl_spi_pin!(SPI5, SckPin, PE2, 6);
217impl_spi_pin!(SPI5, MisoPin, PE5, 6);
218impl_spi_pin!(SPI5, MosiPin, PE6, 6);
165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 219pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
166pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 220pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
167impl_usart!(USART1); 221impl_usart!(USART1);
@@ -220,6 +274,7 @@ pub use regs::dma_v2 as dma;
220pub use regs::exti_v1 as exti; 274pub use regs::exti_v1 as exti;
221pub use regs::gpio_v2 as gpio; 275pub use regs::gpio_v2 as gpio;
222pub use regs::rng_v1 as rng; 276pub use regs::rng_v1 as rng;
277pub use regs::spi_v1 as spi;
223pub use regs::syscfg_f4 as syscfg; 278pub use regs::syscfg_f4 as syscfg;
224pub use regs::usart_v1 as usart; 279pub use regs::usart_v1 as usart;
225mod regs; 280mod regs;
@@ -236,7 +291,8 @@ peripherals!(
236 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, 291 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9,
237 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 292 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
238 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 293 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
239 PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART3, USART6 294 PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART3,
295 USART6
240); 296);
241 297
242pub mod interrupt { 298pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f415og.rs b/embassy-stm32/src/pac/stm32f415og.rs
index 46f5b252c..212f6befd 100644
--- a/embassy-stm32/src/pac/stm32f415og.rs
+++ b/embassy-stm32/src/pac/stm32f415og.rs
@@ -178,7 +178,34 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, HASH_RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA5, 5);
185impl_spi_pin!(SPI1, MisoPin, PA6, 5);
186impl_spi_pin!(SPI1, MosiPin, PA7, 5);
187impl_spi_pin!(SPI1, SckPin, PB3, 5);
188impl_spi_pin!(SPI1, MisoPin, PB4, 5);
189impl_spi_pin!(SPI1, MosiPin, PB5, 5);
190pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
191impl_spi!(SPI2, APB1);
192impl_spi_pin!(SPI2, SckPin, PB10, 5);
193impl_spi_pin!(SPI2, SckPin, PB13, 5);
194impl_spi_pin!(SPI2, MisoPin, PB14, 5);
195impl_spi_pin!(SPI2, MosiPin, PB15, 5);
196impl_spi_pin!(SPI2, MisoPin, PC2, 5);
197impl_spi_pin!(SPI2, MosiPin, PC3, 5);
198impl_spi_pin!(SPI2, SckPin, PI1, 5);
199impl_spi_pin!(SPI2, MisoPin, PI2, 5);
200impl_spi_pin!(SPI2, MosiPin, PI3, 5);
201pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
202impl_spi!(SPI3, APB1);
203impl_spi_pin!(SPI3, SckPin, PB3, 6);
204impl_spi_pin!(SPI3, MisoPin, PB4, 6);
205impl_spi_pin!(SPI3, MosiPin, PB5, 6);
206impl_spi_pin!(SPI3, SckPin, PC10, 6);
207impl_spi_pin!(SPI3, MisoPin, PC11, 6);
208impl_spi_pin!(SPI3, MosiPin, PC12, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 209pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
183pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 210pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
184impl_usart!(USART1); 211impl_usart!(USART1);
@@ -232,6 +259,7 @@ pub use regs::dma_v2 as dma;
232pub use regs::exti_v1 as exti; 259pub use regs::exti_v1 as exti;
233pub use regs::gpio_v2 as gpio; 260pub use regs::gpio_v2 as gpio;
234pub use regs::rng_v1 as rng; 261pub use regs::rng_v1 as rng;
262pub use regs::spi_v1 as spi;
235pub use regs::syscfg_f4 as syscfg; 263pub use regs::syscfg_f4 as syscfg;
236pub use regs::usart_v1 as usart; 264pub use regs::usart_v1 as usart;
237mod regs; 265mod regs;
@@ -249,7 +277,7 @@ peripherals!(
249 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 277 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
250 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 278 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
251 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 279 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
252 PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3, USART6 280 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3, USART6
253); 281);
254 282
255pub mod interrupt { 283pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f415rg.rs b/embassy-stm32/src/pac/stm32f415rg.rs
index 46f5b252c..212f6befd 100644
--- a/embassy-stm32/src/pac/stm32f415rg.rs
+++ b/embassy-stm32/src/pac/stm32f415rg.rs
@@ -178,7 +178,34 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, HASH_RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA5, 5);
185impl_spi_pin!(SPI1, MisoPin, PA6, 5);
186impl_spi_pin!(SPI1, MosiPin, PA7, 5);
187impl_spi_pin!(SPI1, SckPin, PB3, 5);
188impl_spi_pin!(SPI1, MisoPin, PB4, 5);
189impl_spi_pin!(SPI1, MosiPin, PB5, 5);
190pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
191impl_spi!(SPI2, APB1);
192impl_spi_pin!(SPI2, SckPin, PB10, 5);
193impl_spi_pin!(SPI2, SckPin, PB13, 5);
194impl_spi_pin!(SPI2, MisoPin, PB14, 5);
195impl_spi_pin!(SPI2, MosiPin, PB15, 5);
196impl_spi_pin!(SPI2, MisoPin, PC2, 5);
197impl_spi_pin!(SPI2, MosiPin, PC3, 5);
198impl_spi_pin!(SPI2, SckPin, PI1, 5);
199impl_spi_pin!(SPI2, MisoPin, PI2, 5);
200impl_spi_pin!(SPI2, MosiPin, PI3, 5);
201pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
202impl_spi!(SPI3, APB1);
203impl_spi_pin!(SPI3, SckPin, PB3, 6);
204impl_spi_pin!(SPI3, MisoPin, PB4, 6);
205impl_spi_pin!(SPI3, MosiPin, PB5, 6);
206impl_spi_pin!(SPI3, SckPin, PC10, 6);
207impl_spi_pin!(SPI3, MisoPin, PC11, 6);
208impl_spi_pin!(SPI3, MosiPin, PC12, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 209pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
183pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 210pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
184impl_usart!(USART1); 211impl_usart!(USART1);
@@ -232,6 +259,7 @@ pub use regs::dma_v2 as dma;
232pub use regs::exti_v1 as exti; 259pub use regs::exti_v1 as exti;
233pub use regs::gpio_v2 as gpio; 260pub use regs::gpio_v2 as gpio;
234pub use regs::rng_v1 as rng; 261pub use regs::rng_v1 as rng;
262pub use regs::spi_v1 as spi;
235pub use regs::syscfg_f4 as syscfg; 263pub use regs::syscfg_f4 as syscfg;
236pub use regs::usart_v1 as usart; 264pub use regs::usart_v1 as usart;
237mod regs; 265mod regs;
@@ -249,7 +277,7 @@ peripherals!(
249 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 277 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
250 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 278 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
251 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 279 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
252 PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3, USART6 280 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3, USART6
253); 281);
254 282
255pub mod interrupt { 283pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f415vg.rs b/embassy-stm32/src/pac/stm32f415vg.rs
index 46f5b252c..212f6befd 100644
--- a/embassy-stm32/src/pac/stm32f415vg.rs
+++ b/embassy-stm32/src/pac/stm32f415vg.rs
@@ -178,7 +178,34 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, HASH_RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA5, 5);
185impl_spi_pin!(SPI1, MisoPin, PA6, 5);
186impl_spi_pin!(SPI1, MosiPin, PA7, 5);
187impl_spi_pin!(SPI1, SckPin, PB3, 5);
188impl_spi_pin!(SPI1, MisoPin, PB4, 5);
189impl_spi_pin!(SPI1, MosiPin, PB5, 5);
190pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
191impl_spi!(SPI2, APB1);
192impl_spi_pin!(SPI2, SckPin, PB10, 5);
193impl_spi_pin!(SPI2, SckPin, PB13, 5);
194impl_spi_pin!(SPI2, MisoPin, PB14, 5);
195impl_spi_pin!(SPI2, MosiPin, PB15, 5);
196impl_spi_pin!(SPI2, MisoPin, PC2, 5);
197impl_spi_pin!(SPI2, MosiPin, PC3, 5);
198impl_spi_pin!(SPI2, SckPin, PI1, 5);
199impl_spi_pin!(SPI2, MisoPin, PI2, 5);
200impl_spi_pin!(SPI2, MosiPin, PI3, 5);
201pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
202impl_spi!(SPI3, APB1);
203impl_spi_pin!(SPI3, SckPin, PB3, 6);
204impl_spi_pin!(SPI3, MisoPin, PB4, 6);
205impl_spi_pin!(SPI3, MosiPin, PB5, 6);
206impl_spi_pin!(SPI3, SckPin, PC10, 6);
207impl_spi_pin!(SPI3, MisoPin, PC11, 6);
208impl_spi_pin!(SPI3, MosiPin, PC12, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 209pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
183pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 210pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
184impl_usart!(USART1); 211impl_usart!(USART1);
@@ -232,6 +259,7 @@ pub use regs::dma_v2 as dma;
232pub use regs::exti_v1 as exti; 259pub use regs::exti_v1 as exti;
233pub use regs::gpio_v2 as gpio; 260pub use regs::gpio_v2 as gpio;
234pub use regs::rng_v1 as rng; 261pub use regs::rng_v1 as rng;
262pub use regs::spi_v1 as spi;
235pub use regs::syscfg_f4 as syscfg; 263pub use regs::syscfg_f4 as syscfg;
236pub use regs::usart_v1 as usart; 264pub use regs::usart_v1 as usart;
237mod regs; 265mod regs;
@@ -249,7 +277,7 @@ peripherals!(
249 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 277 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
250 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 278 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
251 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 279 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
252 PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3, USART6 280 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3, USART6
253); 281);
254 282
255pub mod interrupt { 283pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f415zg.rs b/embassy-stm32/src/pac/stm32f415zg.rs
index 46f5b252c..212f6befd 100644
--- a/embassy-stm32/src/pac/stm32f415zg.rs
+++ b/embassy-stm32/src/pac/stm32f415zg.rs
@@ -178,7 +178,34 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, HASH_RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA5, 5);
185impl_spi_pin!(SPI1, MisoPin, PA6, 5);
186impl_spi_pin!(SPI1, MosiPin, PA7, 5);
187impl_spi_pin!(SPI1, SckPin, PB3, 5);
188impl_spi_pin!(SPI1, MisoPin, PB4, 5);
189impl_spi_pin!(SPI1, MosiPin, PB5, 5);
190pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
191impl_spi!(SPI2, APB1);
192impl_spi_pin!(SPI2, SckPin, PB10, 5);
193impl_spi_pin!(SPI2, SckPin, PB13, 5);
194impl_spi_pin!(SPI2, MisoPin, PB14, 5);
195impl_spi_pin!(SPI2, MosiPin, PB15, 5);
196impl_spi_pin!(SPI2, MisoPin, PC2, 5);
197impl_spi_pin!(SPI2, MosiPin, PC3, 5);
198impl_spi_pin!(SPI2, SckPin, PI1, 5);
199impl_spi_pin!(SPI2, MisoPin, PI2, 5);
200impl_spi_pin!(SPI2, MosiPin, PI3, 5);
201pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
202impl_spi!(SPI3, APB1);
203impl_spi_pin!(SPI3, SckPin, PB3, 6);
204impl_spi_pin!(SPI3, MisoPin, PB4, 6);
205impl_spi_pin!(SPI3, MosiPin, PB5, 6);
206impl_spi_pin!(SPI3, SckPin, PC10, 6);
207impl_spi_pin!(SPI3, MisoPin, PC11, 6);
208impl_spi_pin!(SPI3, MosiPin, PC12, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 209pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
183pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 210pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
184impl_usart!(USART1); 211impl_usart!(USART1);
@@ -232,6 +259,7 @@ pub use regs::dma_v2 as dma;
232pub use regs::exti_v1 as exti; 259pub use regs::exti_v1 as exti;
233pub use regs::gpio_v2 as gpio; 260pub use regs::gpio_v2 as gpio;
234pub use regs::rng_v1 as rng; 261pub use regs::rng_v1 as rng;
262pub use regs::spi_v1 as spi;
235pub use regs::syscfg_f4 as syscfg; 263pub use regs::syscfg_f4 as syscfg;
236pub use regs::usart_v1 as usart; 264pub use regs::usart_v1 as usart;
237mod regs; 265mod regs;
@@ -249,7 +277,7 @@ peripherals!(
249 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 277 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
250 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 278 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
251 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 279 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
252 PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3, USART6 280 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3, USART6
253); 281);
254 282
255pub mod interrupt { 283pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f417ie.rs b/embassy-stm32/src/pac/stm32f417ie.rs
index 1a528a3ca..4cdc36b6c 100644
--- a/embassy-stm32/src/pac/stm32f417ie.rs
+++ b/embassy-stm32/src/pac/stm32f417ie.rs
@@ -178,7 +178,34 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, HASH_RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA5, 5);
185impl_spi_pin!(SPI1, MisoPin, PA6, 5);
186impl_spi_pin!(SPI1, MosiPin, PA7, 5);
187impl_spi_pin!(SPI1, SckPin, PB3, 5);
188impl_spi_pin!(SPI1, MisoPin, PB4, 5);
189impl_spi_pin!(SPI1, MosiPin, PB5, 5);
190pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
191impl_spi!(SPI2, APB1);
192impl_spi_pin!(SPI2, SckPin, PB10, 5);
193impl_spi_pin!(SPI2, SckPin, PB13, 5);
194impl_spi_pin!(SPI2, MisoPin, PB14, 5);
195impl_spi_pin!(SPI2, MosiPin, PB15, 5);
196impl_spi_pin!(SPI2, MisoPin, PC2, 5);
197impl_spi_pin!(SPI2, MosiPin, PC3, 5);
198impl_spi_pin!(SPI2, SckPin, PI1, 5);
199impl_spi_pin!(SPI2, MisoPin, PI2, 5);
200impl_spi_pin!(SPI2, MosiPin, PI3, 5);
201pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
202impl_spi!(SPI3, APB1);
203impl_spi_pin!(SPI3, SckPin, PB3, 6);
204impl_spi_pin!(SPI3, MisoPin, PB4, 6);
205impl_spi_pin!(SPI3, MosiPin, PB5, 6);
206impl_spi_pin!(SPI3, SckPin, PC10, 6);
207impl_spi_pin!(SPI3, MisoPin, PC11, 6);
208impl_spi_pin!(SPI3, MosiPin, PC12, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 209pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
183pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 210pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
184impl_usart!(USART1); 211impl_usart!(USART1);
@@ -232,6 +259,7 @@ pub use regs::dma_v2 as dma;
232pub use regs::exti_v1 as exti; 259pub use regs::exti_v1 as exti;
233pub use regs::gpio_v2 as gpio; 260pub use regs::gpio_v2 as gpio;
234pub use regs::rng_v1 as rng; 261pub use regs::rng_v1 as rng;
262pub use regs::spi_v1 as spi;
235pub use regs::syscfg_f4 as syscfg; 263pub use regs::syscfg_f4 as syscfg;
236pub use regs::usart_v1 as usart; 264pub use regs::usart_v1 as usart;
237mod regs; 265mod regs;
@@ -249,7 +277,7 @@ peripherals!(
249 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 277 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
250 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 278 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
251 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 279 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
252 PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3, USART6 280 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3, USART6
253); 281);
254 282
255pub mod interrupt { 283pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f417ig.rs b/embassy-stm32/src/pac/stm32f417ig.rs
index 1a528a3ca..4cdc36b6c 100644
--- a/embassy-stm32/src/pac/stm32f417ig.rs
+++ b/embassy-stm32/src/pac/stm32f417ig.rs
@@ -178,7 +178,34 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, HASH_RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA5, 5);
185impl_spi_pin!(SPI1, MisoPin, PA6, 5);
186impl_spi_pin!(SPI1, MosiPin, PA7, 5);
187impl_spi_pin!(SPI1, SckPin, PB3, 5);
188impl_spi_pin!(SPI1, MisoPin, PB4, 5);
189impl_spi_pin!(SPI1, MosiPin, PB5, 5);
190pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
191impl_spi!(SPI2, APB1);
192impl_spi_pin!(SPI2, SckPin, PB10, 5);
193impl_spi_pin!(SPI2, SckPin, PB13, 5);
194impl_spi_pin!(SPI2, MisoPin, PB14, 5);
195impl_spi_pin!(SPI2, MosiPin, PB15, 5);
196impl_spi_pin!(SPI2, MisoPin, PC2, 5);
197impl_spi_pin!(SPI2, MosiPin, PC3, 5);
198impl_spi_pin!(SPI2, SckPin, PI1, 5);
199impl_spi_pin!(SPI2, MisoPin, PI2, 5);
200impl_spi_pin!(SPI2, MosiPin, PI3, 5);
201pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
202impl_spi!(SPI3, APB1);
203impl_spi_pin!(SPI3, SckPin, PB3, 6);
204impl_spi_pin!(SPI3, MisoPin, PB4, 6);
205impl_spi_pin!(SPI3, MosiPin, PB5, 6);
206impl_spi_pin!(SPI3, SckPin, PC10, 6);
207impl_spi_pin!(SPI3, MisoPin, PC11, 6);
208impl_spi_pin!(SPI3, MosiPin, PC12, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 209pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
183pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 210pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
184impl_usart!(USART1); 211impl_usart!(USART1);
@@ -232,6 +259,7 @@ pub use regs::dma_v2 as dma;
232pub use regs::exti_v1 as exti; 259pub use regs::exti_v1 as exti;
233pub use regs::gpio_v2 as gpio; 260pub use regs::gpio_v2 as gpio;
234pub use regs::rng_v1 as rng; 261pub use regs::rng_v1 as rng;
262pub use regs::spi_v1 as spi;
235pub use regs::syscfg_f4 as syscfg; 263pub use regs::syscfg_f4 as syscfg;
236pub use regs::usart_v1 as usart; 264pub use regs::usart_v1 as usart;
237mod regs; 265mod regs;
@@ -249,7 +277,7 @@ peripherals!(
249 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 277 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
250 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 278 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
251 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 279 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
252 PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3, USART6 280 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3, USART6
253); 281);
254 282
255pub mod interrupt { 283pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f417ve.rs b/embassy-stm32/src/pac/stm32f417ve.rs
index 1a528a3ca..4cdc36b6c 100644
--- a/embassy-stm32/src/pac/stm32f417ve.rs
+++ b/embassy-stm32/src/pac/stm32f417ve.rs
@@ -178,7 +178,34 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, HASH_RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA5, 5);
185impl_spi_pin!(SPI1, MisoPin, PA6, 5);
186impl_spi_pin!(SPI1, MosiPin, PA7, 5);
187impl_spi_pin!(SPI1, SckPin, PB3, 5);
188impl_spi_pin!(SPI1, MisoPin, PB4, 5);
189impl_spi_pin!(SPI1, MosiPin, PB5, 5);
190pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
191impl_spi!(SPI2, APB1);
192impl_spi_pin!(SPI2, SckPin, PB10, 5);
193impl_spi_pin!(SPI2, SckPin, PB13, 5);
194impl_spi_pin!(SPI2, MisoPin, PB14, 5);
195impl_spi_pin!(SPI2, MosiPin, PB15, 5);
196impl_spi_pin!(SPI2, MisoPin, PC2, 5);
197impl_spi_pin!(SPI2, MosiPin, PC3, 5);
198impl_spi_pin!(SPI2, SckPin, PI1, 5);
199impl_spi_pin!(SPI2, MisoPin, PI2, 5);
200impl_spi_pin!(SPI2, MosiPin, PI3, 5);
201pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
202impl_spi!(SPI3, APB1);
203impl_spi_pin!(SPI3, SckPin, PB3, 6);
204impl_spi_pin!(SPI3, MisoPin, PB4, 6);
205impl_spi_pin!(SPI3, MosiPin, PB5, 6);
206impl_spi_pin!(SPI3, SckPin, PC10, 6);
207impl_spi_pin!(SPI3, MisoPin, PC11, 6);
208impl_spi_pin!(SPI3, MosiPin, PC12, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 209pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
183pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 210pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
184impl_usart!(USART1); 211impl_usart!(USART1);
@@ -232,6 +259,7 @@ pub use regs::dma_v2 as dma;
232pub use regs::exti_v1 as exti; 259pub use regs::exti_v1 as exti;
233pub use regs::gpio_v2 as gpio; 260pub use regs::gpio_v2 as gpio;
234pub use regs::rng_v1 as rng; 261pub use regs::rng_v1 as rng;
262pub use regs::spi_v1 as spi;
235pub use regs::syscfg_f4 as syscfg; 263pub use regs::syscfg_f4 as syscfg;
236pub use regs::usart_v1 as usart; 264pub use regs::usart_v1 as usart;
237mod regs; 265mod regs;
@@ -249,7 +277,7 @@ peripherals!(
249 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 277 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
250 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 278 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
251 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 279 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
252 PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3, USART6 280 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3, USART6
253); 281);
254 282
255pub mod interrupt { 283pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f417vg.rs b/embassy-stm32/src/pac/stm32f417vg.rs
index 1a528a3ca..4cdc36b6c 100644
--- a/embassy-stm32/src/pac/stm32f417vg.rs
+++ b/embassy-stm32/src/pac/stm32f417vg.rs
@@ -178,7 +178,34 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, HASH_RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA5, 5);
185impl_spi_pin!(SPI1, MisoPin, PA6, 5);
186impl_spi_pin!(SPI1, MosiPin, PA7, 5);
187impl_spi_pin!(SPI1, SckPin, PB3, 5);
188impl_spi_pin!(SPI1, MisoPin, PB4, 5);
189impl_spi_pin!(SPI1, MosiPin, PB5, 5);
190pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
191impl_spi!(SPI2, APB1);
192impl_spi_pin!(SPI2, SckPin, PB10, 5);
193impl_spi_pin!(SPI2, SckPin, PB13, 5);
194impl_spi_pin!(SPI2, MisoPin, PB14, 5);
195impl_spi_pin!(SPI2, MosiPin, PB15, 5);
196impl_spi_pin!(SPI2, MisoPin, PC2, 5);
197impl_spi_pin!(SPI2, MosiPin, PC3, 5);
198impl_spi_pin!(SPI2, SckPin, PI1, 5);
199impl_spi_pin!(SPI2, MisoPin, PI2, 5);
200impl_spi_pin!(SPI2, MosiPin, PI3, 5);
201pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
202impl_spi!(SPI3, APB1);
203impl_spi_pin!(SPI3, SckPin, PB3, 6);
204impl_spi_pin!(SPI3, MisoPin, PB4, 6);
205impl_spi_pin!(SPI3, MosiPin, PB5, 6);
206impl_spi_pin!(SPI3, SckPin, PC10, 6);
207impl_spi_pin!(SPI3, MisoPin, PC11, 6);
208impl_spi_pin!(SPI3, MosiPin, PC12, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 209pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
183pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 210pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
184impl_usart!(USART1); 211impl_usart!(USART1);
@@ -232,6 +259,7 @@ pub use regs::dma_v2 as dma;
232pub use regs::exti_v1 as exti; 259pub use regs::exti_v1 as exti;
233pub use regs::gpio_v2 as gpio; 260pub use regs::gpio_v2 as gpio;
234pub use regs::rng_v1 as rng; 261pub use regs::rng_v1 as rng;
262pub use regs::spi_v1 as spi;
235pub use regs::syscfg_f4 as syscfg; 263pub use regs::syscfg_f4 as syscfg;
236pub use regs::usart_v1 as usart; 264pub use regs::usart_v1 as usart;
237mod regs; 265mod regs;
@@ -249,7 +277,7 @@ peripherals!(
249 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 277 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
250 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 278 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
251 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 279 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
252 PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3, USART6 280 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3, USART6
253); 281);
254 282
255pub mod interrupt { 283pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f417ze.rs b/embassy-stm32/src/pac/stm32f417ze.rs
index 1a528a3ca..4cdc36b6c 100644
--- a/embassy-stm32/src/pac/stm32f417ze.rs
+++ b/embassy-stm32/src/pac/stm32f417ze.rs
@@ -178,7 +178,34 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, HASH_RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA5, 5);
185impl_spi_pin!(SPI1, MisoPin, PA6, 5);
186impl_spi_pin!(SPI1, MosiPin, PA7, 5);
187impl_spi_pin!(SPI1, SckPin, PB3, 5);
188impl_spi_pin!(SPI1, MisoPin, PB4, 5);
189impl_spi_pin!(SPI1, MosiPin, PB5, 5);
190pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
191impl_spi!(SPI2, APB1);
192impl_spi_pin!(SPI2, SckPin, PB10, 5);
193impl_spi_pin!(SPI2, SckPin, PB13, 5);
194impl_spi_pin!(SPI2, MisoPin, PB14, 5);
195impl_spi_pin!(SPI2, MosiPin, PB15, 5);
196impl_spi_pin!(SPI2, MisoPin, PC2, 5);
197impl_spi_pin!(SPI2, MosiPin, PC3, 5);
198impl_spi_pin!(SPI2, SckPin, PI1, 5);
199impl_spi_pin!(SPI2, MisoPin, PI2, 5);
200impl_spi_pin!(SPI2, MosiPin, PI3, 5);
201pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
202impl_spi!(SPI3, APB1);
203impl_spi_pin!(SPI3, SckPin, PB3, 6);
204impl_spi_pin!(SPI3, MisoPin, PB4, 6);
205impl_spi_pin!(SPI3, MosiPin, PB5, 6);
206impl_spi_pin!(SPI3, SckPin, PC10, 6);
207impl_spi_pin!(SPI3, MisoPin, PC11, 6);
208impl_spi_pin!(SPI3, MosiPin, PC12, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 209pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
183pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 210pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
184impl_usart!(USART1); 211impl_usart!(USART1);
@@ -232,6 +259,7 @@ pub use regs::dma_v2 as dma;
232pub use regs::exti_v1 as exti; 259pub use regs::exti_v1 as exti;
233pub use regs::gpio_v2 as gpio; 260pub use regs::gpio_v2 as gpio;
234pub use regs::rng_v1 as rng; 261pub use regs::rng_v1 as rng;
262pub use regs::spi_v1 as spi;
235pub use regs::syscfg_f4 as syscfg; 263pub use regs::syscfg_f4 as syscfg;
236pub use regs::usart_v1 as usart; 264pub use regs::usart_v1 as usart;
237mod regs; 265mod regs;
@@ -249,7 +277,7 @@ peripherals!(
249 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 277 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
250 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 278 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
251 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 279 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
252 PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3, USART6 280 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3, USART6
253); 281);
254 282
255pub mod interrupt { 283pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f417zg.rs b/embassy-stm32/src/pac/stm32f417zg.rs
index 1a528a3ca..4cdc36b6c 100644
--- a/embassy-stm32/src/pac/stm32f417zg.rs
+++ b/embassy-stm32/src/pac/stm32f417zg.rs
@@ -178,7 +178,34 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, HASH_RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA5, 5);
185impl_spi_pin!(SPI1, MisoPin, PA6, 5);
186impl_spi_pin!(SPI1, MosiPin, PA7, 5);
187impl_spi_pin!(SPI1, SckPin, PB3, 5);
188impl_spi_pin!(SPI1, MisoPin, PB4, 5);
189impl_spi_pin!(SPI1, MosiPin, PB5, 5);
190pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
191impl_spi!(SPI2, APB1);
192impl_spi_pin!(SPI2, SckPin, PB10, 5);
193impl_spi_pin!(SPI2, SckPin, PB13, 5);
194impl_spi_pin!(SPI2, MisoPin, PB14, 5);
195impl_spi_pin!(SPI2, MosiPin, PB15, 5);
196impl_spi_pin!(SPI2, MisoPin, PC2, 5);
197impl_spi_pin!(SPI2, MosiPin, PC3, 5);
198impl_spi_pin!(SPI2, SckPin, PI1, 5);
199impl_spi_pin!(SPI2, MisoPin, PI2, 5);
200impl_spi_pin!(SPI2, MosiPin, PI3, 5);
201pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
202impl_spi!(SPI3, APB1);
203impl_spi_pin!(SPI3, SckPin, PB3, 6);
204impl_spi_pin!(SPI3, MisoPin, PB4, 6);
205impl_spi_pin!(SPI3, MosiPin, PB5, 6);
206impl_spi_pin!(SPI3, SckPin, PC10, 6);
207impl_spi_pin!(SPI3, MisoPin, PC11, 6);
208impl_spi_pin!(SPI3, MosiPin, PC12, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 209pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
183pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 210pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
184impl_usart!(USART1); 211impl_usart!(USART1);
@@ -232,6 +259,7 @@ pub use regs::dma_v2 as dma;
232pub use regs::exti_v1 as exti; 259pub use regs::exti_v1 as exti;
233pub use regs::gpio_v2 as gpio; 260pub use regs::gpio_v2 as gpio;
234pub use regs::rng_v1 as rng; 261pub use regs::rng_v1 as rng;
262pub use regs::spi_v1 as spi;
235pub use regs::syscfg_f4 as syscfg; 263pub use regs::syscfg_f4 as syscfg;
236pub use regs::usart_v1 as usart; 264pub use regs::usart_v1 as usart;
237mod regs; 265mod regs;
@@ -249,7 +277,7 @@ peripherals!(
249 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 277 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
250 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 278 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
251 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 279 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
252 PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3, USART6 280 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3, USART6
253); 281);
254 282
255pub mod interrupt { 283pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f423ch.rs b/embassy-stm32/src/pac/stm32f423ch.rs
index 887aa7126..5ba7b6eb5 100644
--- a/embassy-stm32/src/pac/stm32f423ch.rs
+++ b/embassy-stm32/src/pac/stm32f423ch.rs
@@ -161,7 +161,61 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
164impl_rng!(RNG); 164impl_rng!(RNG, RNG);
165pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
166impl_spi!(SPI1, APB2);
167impl_spi_pin!(SPI1, SckPin, PA5, 5);
168impl_spi_pin!(SPI1, MisoPin, PA6, 5);
169impl_spi_pin!(SPI1, MosiPin, PA7, 5);
170impl_spi_pin!(SPI1, SckPin, PB3, 5);
171impl_spi_pin!(SPI1, MisoPin, PB4, 5);
172impl_spi_pin!(SPI1, MosiPin, PB5, 5);
173pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
174impl_spi!(SPI2, APB1);
175impl_spi_pin!(SPI2, MosiPin, PA10, 5);
176impl_spi_pin!(SPI2, MisoPin, PA12, 5);
177impl_spi_pin!(SPI2, SckPin, PA9, 5);
178impl_spi_pin!(SPI2, SckPin, PB10, 5);
179impl_spi_pin!(SPI2, SckPin, PB13, 5);
180impl_spi_pin!(SPI2, MisoPin, PB14, 5);
181impl_spi_pin!(SPI2, MosiPin, PB15, 5);
182impl_spi_pin!(SPI2, MisoPin, PC2, 5);
183impl_spi_pin!(SPI2, MosiPin, PC3, 5);
184impl_spi_pin!(SPI2, SckPin, PC7, 5);
185impl_spi_pin!(SPI2, SckPin, PD3, 5);
186pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
187impl_spi!(SPI3, APB1);
188impl_spi_pin!(SPI3, SckPin, PB12, 7);
189impl_spi_pin!(SPI3, SckPin, PB3, 6);
190impl_spi_pin!(SPI3, MisoPin, PB4, 6);
191impl_spi_pin!(SPI3, MosiPin, PB5, 6);
192impl_spi_pin!(SPI3, SckPin, PC10, 6);
193impl_spi_pin!(SPI3, MisoPin, PC11, 6);
194impl_spi_pin!(SPI3, MosiPin, PC12, 6);
195impl_spi_pin!(SPI3, MosiPin, PD6, 5);
196pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
197impl_spi!(SPI4, APB2);
198impl_spi_pin!(SPI4, MosiPin, PA1, 5);
199impl_spi_pin!(SPI4, MisoPin, PA11, 6);
200impl_spi_pin!(SPI4, SckPin, PB13, 6);
201impl_spi_pin!(SPI4, SckPin, PE12, 5);
202impl_spi_pin!(SPI4, MisoPin, PE13, 5);
203impl_spi_pin!(SPI4, MosiPin, PE14, 5);
204impl_spi_pin!(SPI4, SckPin, PE2, 5);
205impl_spi_pin!(SPI4, MisoPin, PE5, 5);
206impl_spi_pin!(SPI4, MosiPin, PE6, 5);
207pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
208impl_spi!(SPI5, APB2);
209impl_spi_pin!(SPI5, MosiPin, PA10, 6);
210impl_spi_pin!(SPI5, MisoPin, PA12, 6);
211impl_spi_pin!(SPI5, SckPin, PB0, 6);
212impl_spi_pin!(SPI5, MosiPin, PB8, 6);
213impl_spi_pin!(SPI5, SckPin, PE12, 6);
214impl_spi_pin!(SPI5, MisoPin, PE13, 6);
215impl_spi_pin!(SPI5, MosiPin, PE14, 6);
216impl_spi_pin!(SPI5, SckPin, PE2, 6);
217impl_spi_pin!(SPI5, MisoPin, PE5, 6);
218impl_spi_pin!(SPI5, MosiPin, PE6, 6);
165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 219pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
166pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 220pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
167impl_usart!(USART1); 221impl_usart!(USART1);
@@ -204,6 +258,7 @@ pub use regs::dma_v2 as dma;
204pub use regs::exti_v1 as exti; 258pub use regs::exti_v1 as exti;
205pub use regs::gpio_v2 as gpio; 259pub use regs::gpio_v2 as gpio;
206pub use regs::rng_v1 as rng; 260pub use regs::rng_v1 as rng;
261pub use regs::spi_v1 as spi;
207pub use regs::syscfg_f4 as syscfg; 262pub use regs::syscfg_f4 as syscfg;
208pub use regs::usart_v1 as usart; 263pub use regs::usart_v1 as usart;
209mod regs; 264mod regs;
@@ -220,7 +275,7 @@ peripherals!(
220 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, 275 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9,
221 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 276 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
222 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 277 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
223 PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART6 278 PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART6
224); 279);
225 280
226pub mod interrupt { 281pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f423mh.rs b/embassy-stm32/src/pac/stm32f423mh.rs
index 00c927ce2..5f6f0feee 100644
--- a/embassy-stm32/src/pac/stm32f423mh.rs
+++ b/embassy-stm32/src/pac/stm32f423mh.rs
@@ -161,7 +161,61 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
164impl_rng!(RNG); 164impl_rng!(RNG, RNG);
165pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
166impl_spi!(SPI1, APB2);
167impl_spi_pin!(SPI1, SckPin, PA5, 5);
168impl_spi_pin!(SPI1, MisoPin, PA6, 5);
169impl_spi_pin!(SPI1, MosiPin, PA7, 5);
170impl_spi_pin!(SPI1, SckPin, PB3, 5);
171impl_spi_pin!(SPI1, MisoPin, PB4, 5);
172impl_spi_pin!(SPI1, MosiPin, PB5, 5);
173pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
174impl_spi!(SPI2, APB1);
175impl_spi_pin!(SPI2, MosiPin, PA10, 5);
176impl_spi_pin!(SPI2, MisoPin, PA12, 5);
177impl_spi_pin!(SPI2, SckPin, PA9, 5);
178impl_spi_pin!(SPI2, SckPin, PB10, 5);
179impl_spi_pin!(SPI2, SckPin, PB13, 5);
180impl_spi_pin!(SPI2, MisoPin, PB14, 5);
181impl_spi_pin!(SPI2, MosiPin, PB15, 5);
182impl_spi_pin!(SPI2, MisoPin, PC2, 5);
183impl_spi_pin!(SPI2, MosiPin, PC3, 5);
184impl_spi_pin!(SPI2, SckPin, PC7, 5);
185impl_spi_pin!(SPI2, SckPin, PD3, 5);
186pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
187impl_spi!(SPI3, APB1);
188impl_spi_pin!(SPI3, SckPin, PB12, 7);
189impl_spi_pin!(SPI3, SckPin, PB3, 6);
190impl_spi_pin!(SPI3, MisoPin, PB4, 6);
191impl_spi_pin!(SPI3, MosiPin, PB5, 6);
192impl_spi_pin!(SPI3, SckPin, PC10, 6);
193impl_spi_pin!(SPI3, MisoPin, PC11, 6);
194impl_spi_pin!(SPI3, MosiPin, PC12, 6);
195impl_spi_pin!(SPI3, MosiPin, PD6, 5);
196pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
197impl_spi!(SPI4, APB2);
198impl_spi_pin!(SPI4, MosiPin, PA1, 5);
199impl_spi_pin!(SPI4, MisoPin, PA11, 6);
200impl_spi_pin!(SPI4, SckPin, PB13, 6);
201impl_spi_pin!(SPI4, SckPin, PE12, 5);
202impl_spi_pin!(SPI4, MisoPin, PE13, 5);
203impl_spi_pin!(SPI4, MosiPin, PE14, 5);
204impl_spi_pin!(SPI4, SckPin, PE2, 5);
205impl_spi_pin!(SPI4, MisoPin, PE5, 5);
206impl_spi_pin!(SPI4, MosiPin, PE6, 5);
207pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
208impl_spi!(SPI5, APB2);
209impl_spi_pin!(SPI5, MosiPin, PA10, 6);
210impl_spi_pin!(SPI5, MisoPin, PA12, 6);
211impl_spi_pin!(SPI5, SckPin, PB0, 6);
212impl_spi_pin!(SPI5, MosiPin, PB8, 6);
213impl_spi_pin!(SPI5, SckPin, PE12, 6);
214impl_spi_pin!(SPI5, MisoPin, PE13, 6);
215impl_spi_pin!(SPI5, MosiPin, PE14, 6);
216impl_spi_pin!(SPI5, SckPin, PE2, 6);
217impl_spi_pin!(SPI5, MisoPin, PE5, 6);
218impl_spi_pin!(SPI5, MosiPin, PE6, 6);
165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 219pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
166pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 220pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
167impl_usart!(USART1); 221impl_usart!(USART1);
@@ -220,6 +274,7 @@ pub use regs::dma_v2 as dma;
220pub use regs::exti_v1 as exti; 274pub use regs::exti_v1 as exti;
221pub use regs::gpio_v2 as gpio; 275pub use regs::gpio_v2 as gpio;
222pub use regs::rng_v1 as rng; 276pub use regs::rng_v1 as rng;
277pub use regs::spi_v1 as spi;
223pub use regs::syscfg_f4 as syscfg; 278pub use regs::syscfg_f4 as syscfg;
224pub use regs::usart_v1 as usart; 279pub use regs::usart_v1 as usart;
225mod regs; 280mod regs;
@@ -236,7 +291,8 @@ peripherals!(
236 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, 291 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9,
237 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 292 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
238 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 293 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
239 PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART3, USART6 294 PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART3,
295 USART6
240); 296);
241 297
242pub mod interrupt { 298pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f423rh.rs b/embassy-stm32/src/pac/stm32f423rh.rs
index 00c927ce2..5f6f0feee 100644
--- a/embassy-stm32/src/pac/stm32f423rh.rs
+++ b/embassy-stm32/src/pac/stm32f423rh.rs
@@ -161,7 +161,61 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
164impl_rng!(RNG); 164impl_rng!(RNG, RNG);
165pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
166impl_spi!(SPI1, APB2);
167impl_spi_pin!(SPI1, SckPin, PA5, 5);
168impl_spi_pin!(SPI1, MisoPin, PA6, 5);
169impl_spi_pin!(SPI1, MosiPin, PA7, 5);
170impl_spi_pin!(SPI1, SckPin, PB3, 5);
171impl_spi_pin!(SPI1, MisoPin, PB4, 5);
172impl_spi_pin!(SPI1, MosiPin, PB5, 5);
173pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
174impl_spi!(SPI2, APB1);
175impl_spi_pin!(SPI2, MosiPin, PA10, 5);
176impl_spi_pin!(SPI2, MisoPin, PA12, 5);
177impl_spi_pin!(SPI2, SckPin, PA9, 5);
178impl_spi_pin!(SPI2, SckPin, PB10, 5);
179impl_spi_pin!(SPI2, SckPin, PB13, 5);
180impl_spi_pin!(SPI2, MisoPin, PB14, 5);
181impl_spi_pin!(SPI2, MosiPin, PB15, 5);
182impl_spi_pin!(SPI2, MisoPin, PC2, 5);
183impl_spi_pin!(SPI2, MosiPin, PC3, 5);
184impl_spi_pin!(SPI2, SckPin, PC7, 5);
185impl_spi_pin!(SPI2, SckPin, PD3, 5);
186pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
187impl_spi!(SPI3, APB1);
188impl_spi_pin!(SPI3, SckPin, PB12, 7);
189impl_spi_pin!(SPI3, SckPin, PB3, 6);
190impl_spi_pin!(SPI3, MisoPin, PB4, 6);
191impl_spi_pin!(SPI3, MosiPin, PB5, 6);
192impl_spi_pin!(SPI3, SckPin, PC10, 6);
193impl_spi_pin!(SPI3, MisoPin, PC11, 6);
194impl_spi_pin!(SPI3, MosiPin, PC12, 6);
195impl_spi_pin!(SPI3, MosiPin, PD6, 5);
196pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
197impl_spi!(SPI4, APB2);
198impl_spi_pin!(SPI4, MosiPin, PA1, 5);
199impl_spi_pin!(SPI4, MisoPin, PA11, 6);
200impl_spi_pin!(SPI4, SckPin, PB13, 6);
201impl_spi_pin!(SPI4, SckPin, PE12, 5);
202impl_spi_pin!(SPI4, MisoPin, PE13, 5);
203impl_spi_pin!(SPI4, MosiPin, PE14, 5);
204impl_spi_pin!(SPI4, SckPin, PE2, 5);
205impl_spi_pin!(SPI4, MisoPin, PE5, 5);
206impl_spi_pin!(SPI4, MosiPin, PE6, 5);
207pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
208impl_spi!(SPI5, APB2);
209impl_spi_pin!(SPI5, MosiPin, PA10, 6);
210impl_spi_pin!(SPI5, MisoPin, PA12, 6);
211impl_spi_pin!(SPI5, SckPin, PB0, 6);
212impl_spi_pin!(SPI5, MosiPin, PB8, 6);
213impl_spi_pin!(SPI5, SckPin, PE12, 6);
214impl_spi_pin!(SPI5, MisoPin, PE13, 6);
215impl_spi_pin!(SPI5, MosiPin, PE14, 6);
216impl_spi_pin!(SPI5, SckPin, PE2, 6);
217impl_spi_pin!(SPI5, MisoPin, PE5, 6);
218impl_spi_pin!(SPI5, MosiPin, PE6, 6);
165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 219pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
166pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 220pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
167impl_usart!(USART1); 221impl_usart!(USART1);
@@ -220,6 +274,7 @@ pub use regs::dma_v2 as dma;
220pub use regs::exti_v1 as exti; 274pub use regs::exti_v1 as exti;
221pub use regs::gpio_v2 as gpio; 275pub use regs::gpio_v2 as gpio;
222pub use regs::rng_v1 as rng; 276pub use regs::rng_v1 as rng;
277pub use regs::spi_v1 as spi;
223pub use regs::syscfg_f4 as syscfg; 278pub use regs::syscfg_f4 as syscfg;
224pub use regs::usart_v1 as usart; 279pub use regs::usart_v1 as usart;
225mod regs; 280mod regs;
@@ -236,7 +291,8 @@ peripherals!(
236 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, 291 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9,
237 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 292 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
238 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 293 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
239 PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART3, USART6 294 PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART3,
295 USART6
240); 296);
241 297
242pub mod interrupt { 298pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f423vh.rs b/embassy-stm32/src/pac/stm32f423vh.rs
index 00c927ce2..5f6f0feee 100644
--- a/embassy-stm32/src/pac/stm32f423vh.rs
+++ b/embassy-stm32/src/pac/stm32f423vh.rs
@@ -161,7 +161,61 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
164impl_rng!(RNG); 164impl_rng!(RNG, RNG);
165pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
166impl_spi!(SPI1, APB2);
167impl_spi_pin!(SPI1, SckPin, PA5, 5);
168impl_spi_pin!(SPI1, MisoPin, PA6, 5);
169impl_spi_pin!(SPI1, MosiPin, PA7, 5);
170impl_spi_pin!(SPI1, SckPin, PB3, 5);
171impl_spi_pin!(SPI1, MisoPin, PB4, 5);
172impl_spi_pin!(SPI1, MosiPin, PB5, 5);
173pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
174impl_spi!(SPI2, APB1);
175impl_spi_pin!(SPI2, MosiPin, PA10, 5);
176impl_spi_pin!(SPI2, MisoPin, PA12, 5);
177impl_spi_pin!(SPI2, SckPin, PA9, 5);
178impl_spi_pin!(SPI2, SckPin, PB10, 5);
179impl_spi_pin!(SPI2, SckPin, PB13, 5);
180impl_spi_pin!(SPI2, MisoPin, PB14, 5);
181impl_spi_pin!(SPI2, MosiPin, PB15, 5);
182impl_spi_pin!(SPI2, MisoPin, PC2, 5);
183impl_spi_pin!(SPI2, MosiPin, PC3, 5);
184impl_spi_pin!(SPI2, SckPin, PC7, 5);
185impl_spi_pin!(SPI2, SckPin, PD3, 5);
186pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
187impl_spi!(SPI3, APB1);
188impl_spi_pin!(SPI3, SckPin, PB12, 7);
189impl_spi_pin!(SPI3, SckPin, PB3, 6);
190impl_spi_pin!(SPI3, MisoPin, PB4, 6);
191impl_spi_pin!(SPI3, MosiPin, PB5, 6);
192impl_spi_pin!(SPI3, SckPin, PC10, 6);
193impl_spi_pin!(SPI3, MisoPin, PC11, 6);
194impl_spi_pin!(SPI3, MosiPin, PC12, 6);
195impl_spi_pin!(SPI3, MosiPin, PD6, 5);
196pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
197impl_spi!(SPI4, APB2);
198impl_spi_pin!(SPI4, MosiPin, PA1, 5);
199impl_spi_pin!(SPI4, MisoPin, PA11, 6);
200impl_spi_pin!(SPI4, SckPin, PB13, 6);
201impl_spi_pin!(SPI4, SckPin, PE12, 5);
202impl_spi_pin!(SPI4, MisoPin, PE13, 5);
203impl_spi_pin!(SPI4, MosiPin, PE14, 5);
204impl_spi_pin!(SPI4, SckPin, PE2, 5);
205impl_spi_pin!(SPI4, MisoPin, PE5, 5);
206impl_spi_pin!(SPI4, MosiPin, PE6, 5);
207pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
208impl_spi!(SPI5, APB2);
209impl_spi_pin!(SPI5, MosiPin, PA10, 6);
210impl_spi_pin!(SPI5, MisoPin, PA12, 6);
211impl_spi_pin!(SPI5, SckPin, PB0, 6);
212impl_spi_pin!(SPI5, MosiPin, PB8, 6);
213impl_spi_pin!(SPI5, SckPin, PE12, 6);
214impl_spi_pin!(SPI5, MisoPin, PE13, 6);
215impl_spi_pin!(SPI5, MosiPin, PE14, 6);
216impl_spi_pin!(SPI5, SckPin, PE2, 6);
217impl_spi_pin!(SPI5, MisoPin, PE5, 6);
218impl_spi_pin!(SPI5, MosiPin, PE6, 6);
165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 219pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
166pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 220pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
167impl_usart!(USART1); 221impl_usart!(USART1);
@@ -220,6 +274,7 @@ pub use regs::dma_v2 as dma;
220pub use regs::exti_v1 as exti; 274pub use regs::exti_v1 as exti;
221pub use regs::gpio_v2 as gpio; 275pub use regs::gpio_v2 as gpio;
222pub use regs::rng_v1 as rng; 276pub use regs::rng_v1 as rng;
277pub use regs::spi_v1 as spi;
223pub use regs::syscfg_f4 as syscfg; 278pub use regs::syscfg_f4 as syscfg;
224pub use regs::usart_v1 as usart; 279pub use regs::usart_v1 as usart;
225mod regs; 280mod regs;
@@ -236,7 +291,8 @@ peripherals!(
236 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, 291 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9,
237 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 292 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
238 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 293 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
239 PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART3, USART6 294 PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART3,
295 USART6
240); 296);
241 297
242pub mod interrupt { 298pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f423zh.rs b/embassy-stm32/src/pac/stm32f423zh.rs
index 00c927ce2..5f6f0feee 100644
--- a/embassy-stm32/src/pac/stm32f423zh.rs
+++ b/embassy-stm32/src/pac/stm32f423zh.rs
@@ -161,7 +161,61 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
164impl_rng!(RNG); 164impl_rng!(RNG, RNG);
165pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
166impl_spi!(SPI1, APB2);
167impl_spi_pin!(SPI1, SckPin, PA5, 5);
168impl_spi_pin!(SPI1, MisoPin, PA6, 5);
169impl_spi_pin!(SPI1, MosiPin, PA7, 5);
170impl_spi_pin!(SPI1, SckPin, PB3, 5);
171impl_spi_pin!(SPI1, MisoPin, PB4, 5);
172impl_spi_pin!(SPI1, MosiPin, PB5, 5);
173pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
174impl_spi!(SPI2, APB1);
175impl_spi_pin!(SPI2, MosiPin, PA10, 5);
176impl_spi_pin!(SPI2, MisoPin, PA12, 5);
177impl_spi_pin!(SPI2, SckPin, PA9, 5);
178impl_spi_pin!(SPI2, SckPin, PB10, 5);
179impl_spi_pin!(SPI2, SckPin, PB13, 5);
180impl_spi_pin!(SPI2, MisoPin, PB14, 5);
181impl_spi_pin!(SPI2, MosiPin, PB15, 5);
182impl_spi_pin!(SPI2, MisoPin, PC2, 5);
183impl_spi_pin!(SPI2, MosiPin, PC3, 5);
184impl_spi_pin!(SPI2, SckPin, PC7, 5);
185impl_spi_pin!(SPI2, SckPin, PD3, 5);
186pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
187impl_spi!(SPI3, APB1);
188impl_spi_pin!(SPI3, SckPin, PB12, 7);
189impl_spi_pin!(SPI3, SckPin, PB3, 6);
190impl_spi_pin!(SPI3, MisoPin, PB4, 6);
191impl_spi_pin!(SPI3, MosiPin, PB5, 6);
192impl_spi_pin!(SPI3, SckPin, PC10, 6);
193impl_spi_pin!(SPI3, MisoPin, PC11, 6);
194impl_spi_pin!(SPI3, MosiPin, PC12, 6);
195impl_spi_pin!(SPI3, MosiPin, PD6, 5);
196pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
197impl_spi!(SPI4, APB2);
198impl_spi_pin!(SPI4, MosiPin, PA1, 5);
199impl_spi_pin!(SPI4, MisoPin, PA11, 6);
200impl_spi_pin!(SPI4, SckPin, PB13, 6);
201impl_spi_pin!(SPI4, SckPin, PE12, 5);
202impl_spi_pin!(SPI4, MisoPin, PE13, 5);
203impl_spi_pin!(SPI4, MosiPin, PE14, 5);
204impl_spi_pin!(SPI4, SckPin, PE2, 5);
205impl_spi_pin!(SPI4, MisoPin, PE5, 5);
206impl_spi_pin!(SPI4, MosiPin, PE6, 5);
207pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
208impl_spi!(SPI5, APB2);
209impl_spi_pin!(SPI5, MosiPin, PA10, 6);
210impl_spi_pin!(SPI5, MisoPin, PA12, 6);
211impl_spi_pin!(SPI5, SckPin, PB0, 6);
212impl_spi_pin!(SPI5, MosiPin, PB8, 6);
213impl_spi_pin!(SPI5, SckPin, PE12, 6);
214impl_spi_pin!(SPI5, MisoPin, PE13, 6);
215impl_spi_pin!(SPI5, MosiPin, PE14, 6);
216impl_spi_pin!(SPI5, SckPin, PE2, 6);
217impl_spi_pin!(SPI5, MisoPin, PE5, 6);
218impl_spi_pin!(SPI5, MosiPin, PE6, 6);
165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 219pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
166pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 220pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
167impl_usart!(USART1); 221impl_usart!(USART1);
@@ -220,6 +274,7 @@ pub use regs::dma_v2 as dma;
220pub use regs::exti_v1 as exti; 274pub use regs::exti_v1 as exti;
221pub use regs::gpio_v2 as gpio; 275pub use regs::gpio_v2 as gpio;
222pub use regs::rng_v1 as rng; 276pub use regs::rng_v1 as rng;
277pub use regs::spi_v1 as spi;
223pub use regs::syscfg_f4 as syscfg; 278pub use regs::syscfg_f4 as syscfg;
224pub use regs::usart_v1 as usart; 279pub use regs::usart_v1 as usart;
225mod regs; 280mod regs;
@@ -236,7 +291,8 @@ peripherals!(
236 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, 291 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9,
237 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 292 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
238 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 293 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
239 PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART3, USART6 294 PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART3,
295 USART6
240); 296);
241 297
242pub mod interrupt { 298pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f427ag.rs b/embassy-stm32/src/pac/stm32f427ag.rs
index 61acdfec2..482d05539 100644
--- a/embassy-stm32/src/pac/stm32f427ag.rs
+++ b/embassy-stm32/src/pac/stm32f427ag.rs
@@ -212,7 +212,52 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
217impl_spi!(SPI1, APB2);
218impl_spi_pin!(SPI1, SckPin, PA5, 5);
219impl_spi_pin!(SPI1, MisoPin, PA6, 5);
220impl_spi_pin!(SPI1, MosiPin, PA7, 5);
221impl_spi_pin!(SPI1, SckPin, PB3, 5);
222impl_spi_pin!(SPI1, MisoPin, PB4, 5);
223impl_spi_pin!(SPI1, MosiPin, PB5, 5);
224pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
225impl_spi!(SPI2, APB1);
226impl_spi_pin!(SPI2, SckPin, PB10, 5);
227impl_spi_pin!(SPI2, SckPin, PB13, 5);
228impl_spi_pin!(SPI2, MisoPin, PB14, 5);
229impl_spi_pin!(SPI2, MosiPin, PB15, 5);
230impl_spi_pin!(SPI2, MisoPin, PC2, 5);
231impl_spi_pin!(SPI2, MosiPin, PC3, 5);
232impl_spi_pin!(SPI2, SckPin, PD3, 5);
233impl_spi_pin!(SPI2, SckPin, PI1, 5);
234impl_spi_pin!(SPI2, MisoPin, PI2, 5);
235impl_spi_pin!(SPI2, MosiPin, PI3, 5);
236pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
237impl_spi!(SPI3, APB1);
238impl_spi_pin!(SPI3, SckPin, PB3, 6);
239impl_spi_pin!(SPI3, MisoPin, PB4, 6);
240impl_spi_pin!(SPI3, MosiPin, PB5, 6);
241impl_spi_pin!(SPI3, SckPin, PC10, 6);
242impl_spi_pin!(SPI3, MisoPin, PC11, 6);
243impl_spi_pin!(SPI3, MosiPin, PC12, 6);
244impl_spi_pin!(SPI3, MosiPin, PD6, 5);
245pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
246impl_spi!(SPI4, APB2);
247impl_spi_pin!(SPI4, SckPin, PE12, 5);
248impl_spi_pin!(SPI4, MisoPin, PE13, 5);
249impl_spi_pin!(SPI4, MosiPin, PE14, 5);
250impl_spi_pin!(SPI4, SckPin, PE2, 5);
251impl_spi_pin!(SPI4, MisoPin, PE5, 5);
252impl_spi_pin!(SPI4, MosiPin, PE6, 5);
253pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
254impl_spi!(SPI5, APB2);
255impl_spi_pin!(SPI5, MosiPin, PF11, 5);
256impl_spi_pin!(SPI5, SckPin, PF7, 5);
257impl_spi_pin!(SPI5, MisoPin, PF8, 5);
258impl_spi_pin!(SPI5, MosiPin, PF9, 5);
259impl_spi_pin!(SPI5, SckPin, PH6, 5);
260impl_spi_pin!(SPI5, MisoPin, PH7, 5);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 261pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 262pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 263impl_usart!(USART1);
@@ -266,6 +311,7 @@ pub use regs::dma_v2 as dma;
266pub use regs::exti_v1 as exti; 311pub use regs::exti_v1 as exti;
267pub use regs::gpio_v2 as gpio; 312pub use regs::gpio_v2 as gpio;
268pub use regs::rng_v1 as rng; 313pub use regs::rng_v1 as rng;
314pub use regs::spi_v1 as spi;
269pub use regs::syscfg_f4 as syscfg; 315pub use regs::syscfg_f4 as syscfg;
270pub use regs::usart_v1 as usart; 316pub use regs::usart_v1 as usart;
271mod regs; 317mod regs;
@@ -285,7 +331,7 @@ peripherals!(
285 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 331 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
286 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, 332 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
287 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, 333 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
288 PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 334 PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART3, USART6
289); 335);
290 336
291pub mod interrupt { 337pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f427ai.rs b/embassy-stm32/src/pac/stm32f427ai.rs
index 61acdfec2..482d05539 100644
--- a/embassy-stm32/src/pac/stm32f427ai.rs
+++ b/embassy-stm32/src/pac/stm32f427ai.rs
@@ -212,7 +212,52 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
217impl_spi!(SPI1, APB2);
218impl_spi_pin!(SPI1, SckPin, PA5, 5);
219impl_spi_pin!(SPI1, MisoPin, PA6, 5);
220impl_spi_pin!(SPI1, MosiPin, PA7, 5);
221impl_spi_pin!(SPI1, SckPin, PB3, 5);
222impl_spi_pin!(SPI1, MisoPin, PB4, 5);
223impl_spi_pin!(SPI1, MosiPin, PB5, 5);
224pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
225impl_spi!(SPI2, APB1);
226impl_spi_pin!(SPI2, SckPin, PB10, 5);
227impl_spi_pin!(SPI2, SckPin, PB13, 5);
228impl_spi_pin!(SPI2, MisoPin, PB14, 5);
229impl_spi_pin!(SPI2, MosiPin, PB15, 5);
230impl_spi_pin!(SPI2, MisoPin, PC2, 5);
231impl_spi_pin!(SPI2, MosiPin, PC3, 5);
232impl_spi_pin!(SPI2, SckPin, PD3, 5);
233impl_spi_pin!(SPI2, SckPin, PI1, 5);
234impl_spi_pin!(SPI2, MisoPin, PI2, 5);
235impl_spi_pin!(SPI2, MosiPin, PI3, 5);
236pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
237impl_spi!(SPI3, APB1);
238impl_spi_pin!(SPI3, SckPin, PB3, 6);
239impl_spi_pin!(SPI3, MisoPin, PB4, 6);
240impl_spi_pin!(SPI3, MosiPin, PB5, 6);
241impl_spi_pin!(SPI3, SckPin, PC10, 6);
242impl_spi_pin!(SPI3, MisoPin, PC11, 6);
243impl_spi_pin!(SPI3, MosiPin, PC12, 6);
244impl_spi_pin!(SPI3, MosiPin, PD6, 5);
245pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
246impl_spi!(SPI4, APB2);
247impl_spi_pin!(SPI4, SckPin, PE12, 5);
248impl_spi_pin!(SPI4, MisoPin, PE13, 5);
249impl_spi_pin!(SPI4, MosiPin, PE14, 5);
250impl_spi_pin!(SPI4, SckPin, PE2, 5);
251impl_spi_pin!(SPI4, MisoPin, PE5, 5);
252impl_spi_pin!(SPI4, MosiPin, PE6, 5);
253pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
254impl_spi!(SPI5, APB2);
255impl_spi_pin!(SPI5, MosiPin, PF11, 5);
256impl_spi_pin!(SPI5, SckPin, PF7, 5);
257impl_spi_pin!(SPI5, MisoPin, PF8, 5);
258impl_spi_pin!(SPI5, MosiPin, PF9, 5);
259impl_spi_pin!(SPI5, SckPin, PH6, 5);
260impl_spi_pin!(SPI5, MisoPin, PH7, 5);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 261pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 262pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 263impl_usart!(USART1);
@@ -266,6 +311,7 @@ pub use regs::dma_v2 as dma;
266pub use regs::exti_v1 as exti; 311pub use regs::exti_v1 as exti;
267pub use regs::gpio_v2 as gpio; 312pub use regs::gpio_v2 as gpio;
268pub use regs::rng_v1 as rng; 313pub use regs::rng_v1 as rng;
314pub use regs::spi_v1 as spi;
269pub use regs::syscfg_f4 as syscfg; 315pub use regs::syscfg_f4 as syscfg;
270pub use regs::usart_v1 as usart; 316pub use regs::usart_v1 as usart;
271mod regs; 317mod regs;
@@ -285,7 +331,7 @@ peripherals!(
285 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 331 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
286 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, 332 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
287 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, 333 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
288 PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 334 PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART3, USART6
289); 335);
290 336
291pub mod interrupt { 337pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f427ig.rs b/embassy-stm32/src/pac/stm32f427ig.rs
index 61acdfec2..264fb1751 100644
--- a/embassy-stm32/src/pac/stm32f427ig.rs
+++ b/embassy-stm32/src/pac/stm32f427ig.rs
@@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
217impl_spi!(SPI1, APB2);
218impl_spi_pin!(SPI1, SckPin, PA5, 5);
219impl_spi_pin!(SPI1, MisoPin, PA6, 5);
220impl_spi_pin!(SPI1, MosiPin, PA7, 5);
221impl_spi_pin!(SPI1, SckPin, PB3, 5);
222impl_spi_pin!(SPI1, MisoPin, PB4, 5);
223impl_spi_pin!(SPI1, MosiPin, PB5, 5);
224pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
225impl_spi!(SPI2, APB1);
226impl_spi_pin!(SPI2, SckPin, PB10, 5);
227impl_spi_pin!(SPI2, SckPin, PB13, 5);
228impl_spi_pin!(SPI2, MisoPin, PB14, 5);
229impl_spi_pin!(SPI2, MosiPin, PB15, 5);
230impl_spi_pin!(SPI2, MisoPin, PC2, 5);
231impl_spi_pin!(SPI2, MosiPin, PC3, 5);
232impl_spi_pin!(SPI2, SckPin, PD3, 5);
233impl_spi_pin!(SPI2, SckPin, PI1, 5);
234impl_spi_pin!(SPI2, MisoPin, PI2, 5);
235impl_spi_pin!(SPI2, MosiPin, PI3, 5);
236pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
237impl_spi!(SPI3, APB1);
238impl_spi_pin!(SPI3, SckPin, PB3, 6);
239impl_spi_pin!(SPI3, MisoPin, PB4, 6);
240impl_spi_pin!(SPI3, MosiPin, PB5, 6);
241impl_spi_pin!(SPI3, SckPin, PC10, 6);
242impl_spi_pin!(SPI3, MisoPin, PC11, 6);
243impl_spi_pin!(SPI3, MosiPin, PC12, 6);
244impl_spi_pin!(SPI3, MosiPin, PD6, 5);
245pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
246impl_spi!(SPI4, APB2);
247impl_spi_pin!(SPI4, SckPin, PE12, 5);
248impl_spi_pin!(SPI4, MisoPin, PE13, 5);
249impl_spi_pin!(SPI4, MosiPin, PE14, 5);
250impl_spi_pin!(SPI4, SckPin, PE2, 5);
251impl_spi_pin!(SPI4, MisoPin, PE5, 5);
252impl_spi_pin!(SPI4, MosiPin, PE6, 5);
253pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
254impl_spi!(SPI5, APB2);
255impl_spi_pin!(SPI5, MosiPin, PF11, 5);
256impl_spi_pin!(SPI5, SckPin, PF7, 5);
257impl_spi_pin!(SPI5, MisoPin, PF8, 5);
258impl_spi_pin!(SPI5, MosiPin, PF9, 5);
259impl_spi_pin!(SPI5, SckPin, PH6, 5);
260impl_spi_pin!(SPI5, MisoPin, PH7, 5);
261pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _);
262impl_spi!(SPI6, APB2);
263impl_spi_pin!(SPI6, MisoPin, PG12, 5);
264impl_spi_pin!(SPI6, SckPin, PG13, 5);
265impl_spi_pin!(SPI6, MosiPin, PG14, 5);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 266pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 267pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 268impl_usart!(USART1);
@@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma;
266pub use regs::exti_v1 as exti; 316pub use regs::exti_v1 as exti;
267pub use regs::gpio_v2 as gpio; 317pub use regs::gpio_v2 as gpio;
268pub use regs::rng_v1 as rng; 318pub use regs::rng_v1 as rng;
319pub use regs::spi_v1 as spi;
269pub use regs::syscfg_f4 as syscfg; 320pub use regs::syscfg_f4 as syscfg;
270pub use regs::usart_v1 as usart; 321pub use regs::usart_v1 as usart;
271mod regs; 322mod regs;
@@ -285,7 +336,7 @@ peripherals!(
285 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 336 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
286 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, 337 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
287 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, 338 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
288 PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 339 PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6
289); 340);
290 341
291pub mod interrupt { 342pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f427ii.rs b/embassy-stm32/src/pac/stm32f427ii.rs
index 61acdfec2..264fb1751 100644
--- a/embassy-stm32/src/pac/stm32f427ii.rs
+++ b/embassy-stm32/src/pac/stm32f427ii.rs
@@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
217impl_spi!(SPI1, APB2);
218impl_spi_pin!(SPI1, SckPin, PA5, 5);
219impl_spi_pin!(SPI1, MisoPin, PA6, 5);
220impl_spi_pin!(SPI1, MosiPin, PA7, 5);
221impl_spi_pin!(SPI1, SckPin, PB3, 5);
222impl_spi_pin!(SPI1, MisoPin, PB4, 5);
223impl_spi_pin!(SPI1, MosiPin, PB5, 5);
224pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
225impl_spi!(SPI2, APB1);
226impl_spi_pin!(SPI2, SckPin, PB10, 5);
227impl_spi_pin!(SPI2, SckPin, PB13, 5);
228impl_spi_pin!(SPI2, MisoPin, PB14, 5);
229impl_spi_pin!(SPI2, MosiPin, PB15, 5);
230impl_spi_pin!(SPI2, MisoPin, PC2, 5);
231impl_spi_pin!(SPI2, MosiPin, PC3, 5);
232impl_spi_pin!(SPI2, SckPin, PD3, 5);
233impl_spi_pin!(SPI2, SckPin, PI1, 5);
234impl_spi_pin!(SPI2, MisoPin, PI2, 5);
235impl_spi_pin!(SPI2, MosiPin, PI3, 5);
236pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
237impl_spi!(SPI3, APB1);
238impl_spi_pin!(SPI3, SckPin, PB3, 6);
239impl_spi_pin!(SPI3, MisoPin, PB4, 6);
240impl_spi_pin!(SPI3, MosiPin, PB5, 6);
241impl_spi_pin!(SPI3, SckPin, PC10, 6);
242impl_spi_pin!(SPI3, MisoPin, PC11, 6);
243impl_spi_pin!(SPI3, MosiPin, PC12, 6);
244impl_spi_pin!(SPI3, MosiPin, PD6, 5);
245pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
246impl_spi!(SPI4, APB2);
247impl_spi_pin!(SPI4, SckPin, PE12, 5);
248impl_spi_pin!(SPI4, MisoPin, PE13, 5);
249impl_spi_pin!(SPI4, MosiPin, PE14, 5);
250impl_spi_pin!(SPI4, SckPin, PE2, 5);
251impl_spi_pin!(SPI4, MisoPin, PE5, 5);
252impl_spi_pin!(SPI4, MosiPin, PE6, 5);
253pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
254impl_spi!(SPI5, APB2);
255impl_spi_pin!(SPI5, MosiPin, PF11, 5);
256impl_spi_pin!(SPI5, SckPin, PF7, 5);
257impl_spi_pin!(SPI5, MisoPin, PF8, 5);
258impl_spi_pin!(SPI5, MosiPin, PF9, 5);
259impl_spi_pin!(SPI5, SckPin, PH6, 5);
260impl_spi_pin!(SPI5, MisoPin, PH7, 5);
261pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _);
262impl_spi!(SPI6, APB2);
263impl_spi_pin!(SPI6, MisoPin, PG12, 5);
264impl_spi_pin!(SPI6, SckPin, PG13, 5);
265impl_spi_pin!(SPI6, MosiPin, PG14, 5);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 266pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 267pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 268impl_usart!(USART1);
@@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma;
266pub use regs::exti_v1 as exti; 316pub use regs::exti_v1 as exti;
267pub use regs::gpio_v2 as gpio; 317pub use regs::gpio_v2 as gpio;
268pub use regs::rng_v1 as rng; 318pub use regs::rng_v1 as rng;
319pub use regs::spi_v1 as spi;
269pub use regs::syscfg_f4 as syscfg; 320pub use regs::syscfg_f4 as syscfg;
270pub use regs::usart_v1 as usart; 321pub use regs::usart_v1 as usart;
271mod regs; 322mod regs;
@@ -285,7 +336,7 @@ peripherals!(
285 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 336 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
286 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, 337 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
287 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, 338 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
288 PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 339 PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6
289); 340);
290 341
291pub mod interrupt { 342pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f427vg.rs b/embassy-stm32/src/pac/stm32f427vg.rs
index 61acdfec2..91b33ba5d 100644
--- a/embassy-stm32/src/pac/stm32f427vg.rs
+++ b/embassy-stm32/src/pac/stm32f427vg.rs
@@ -212,7 +212,44 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
217impl_spi!(SPI1, APB2);
218impl_spi_pin!(SPI1, SckPin, PA5, 5);
219impl_spi_pin!(SPI1, MisoPin, PA6, 5);
220impl_spi_pin!(SPI1, MosiPin, PA7, 5);
221impl_spi_pin!(SPI1, SckPin, PB3, 5);
222impl_spi_pin!(SPI1, MisoPin, PB4, 5);
223impl_spi_pin!(SPI1, MosiPin, PB5, 5);
224pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
225impl_spi!(SPI2, APB1);
226impl_spi_pin!(SPI2, SckPin, PB10, 5);
227impl_spi_pin!(SPI2, SckPin, PB13, 5);
228impl_spi_pin!(SPI2, MisoPin, PB14, 5);
229impl_spi_pin!(SPI2, MosiPin, PB15, 5);
230impl_spi_pin!(SPI2, MisoPin, PC2, 5);
231impl_spi_pin!(SPI2, MosiPin, PC3, 5);
232impl_spi_pin!(SPI2, SckPin, PD3, 5);
233impl_spi_pin!(SPI2, SckPin, PI1, 5);
234impl_spi_pin!(SPI2, MisoPin, PI2, 5);
235impl_spi_pin!(SPI2, MosiPin, PI3, 5);
236pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
237impl_spi!(SPI3, APB1);
238impl_spi_pin!(SPI3, SckPin, PB3, 6);
239impl_spi_pin!(SPI3, MisoPin, PB4, 6);
240impl_spi_pin!(SPI3, MosiPin, PB5, 6);
241impl_spi_pin!(SPI3, SckPin, PC10, 6);
242impl_spi_pin!(SPI3, MisoPin, PC11, 6);
243impl_spi_pin!(SPI3, MosiPin, PC12, 6);
244impl_spi_pin!(SPI3, MosiPin, PD6, 5);
245pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
246impl_spi!(SPI4, APB2);
247impl_spi_pin!(SPI4, SckPin, PE12, 5);
248impl_spi_pin!(SPI4, MisoPin, PE13, 5);
249impl_spi_pin!(SPI4, MosiPin, PE14, 5);
250impl_spi_pin!(SPI4, SckPin, PE2, 5);
251impl_spi_pin!(SPI4, MisoPin, PE5, 5);
252impl_spi_pin!(SPI4, MosiPin, PE6, 5);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 253pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 254pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 255impl_usart!(USART1);
@@ -266,6 +303,7 @@ pub use regs::dma_v2 as dma;
266pub use regs::exti_v1 as exti; 303pub use regs::exti_v1 as exti;
267pub use regs::gpio_v2 as gpio; 304pub use regs::gpio_v2 as gpio;
268pub use regs::rng_v1 as rng; 305pub use regs::rng_v1 as rng;
306pub use regs::spi_v1 as spi;
269pub use regs::syscfg_f4 as syscfg; 307pub use regs::syscfg_f4 as syscfg;
270pub use regs::usart_v1 as usart; 308pub use regs::usart_v1 as usart;
271mod regs; 309mod regs;
@@ -285,7 +323,7 @@ peripherals!(
285 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 323 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
286 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, 324 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
287 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, 325 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
288 PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 326 PK15, RNG, SPI1, SPI2, SPI3, SPI4, SYSCFG, USART1, USART2, USART3, USART6
289); 327);
290 328
291pub mod interrupt { 329pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f427vi.rs b/embassy-stm32/src/pac/stm32f427vi.rs
index 61acdfec2..91b33ba5d 100644
--- a/embassy-stm32/src/pac/stm32f427vi.rs
+++ b/embassy-stm32/src/pac/stm32f427vi.rs
@@ -212,7 +212,44 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
217impl_spi!(SPI1, APB2);
218impl_spi_pin!(SPI1, SckPin, PA5, 5);
219impl_spi_pin!(SPI1, MisoPin, PA6, 5);
220impl_spi_pin!(SPI1, MosiPin, PA7, 5);
221impl_spi_pin!(SPI1, SckPin, PB3, 5);
222impl_spi_pin!(SPI1, MisoPin, PB4, 5);
223impl_spi_pin!(SPI1, MosiPin, PB5, 5);
224pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
225impl_spi!(SPI2, APB1);
226impl_spi_pin!(SPI2, SckPin, PB10, 5);
227impl_spi_pin!(SPI2, SckPin, PB13, 5);
228impl_spi_pin!(SPI2, MisoPin, PB14, 5);
229impl_spi_pin!(SPI2, MosiPin, PB15, 5);
230impl_spi_pin!(SPI2, MisoPin, PC2, 5);
231impl_spi_pin!(SPI2, MosiPin, PC3, 5);
232impl_spi_pin!(SPI2, SckPin, PD3, 5);
233impl_spi_pin!(SPI2, SckPin, PI1, 5);
234impl_spi_pin!(SPI2, MisoPin, PI2, 5);
235impl_spi_pin!(SPI2, MosiPin, PI3, 5);
236pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
237impl_spi!(SPI3, APB1);
238impl_spi_pin!(SPI3, SckPin, PB3, 6);
239impl_spi_pin!(SPI3, MisoPin, PB4, 6);
240impl_spi_pin!(SPI3, MosiPin, PB5, 6);
241impl_spi_pin!(SPI3, SckPin, PC10, 6);
242impl_spi_pin!(SPI3, MisoPin, PC11, 6);
243impl_spi_pin!(SPI3, MosiPin, PC12, 6);
244impl_spi_pin!(SPI3, MosiPin, PD6, 5);
245pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
246impl_spi!(SPI4, APB2);
247impl_spi_pin!(SPI4, SckPin, PE12, 5);
248impl_spi_pin!(SPI4, MisoPin, PE13, 5);
249impl_spi_pin!(SPI4, MosiPin, PE14, 5);
250impl_spi_pin!(SPI4, SckPin, PE2, 5);
251impl_spi_pin!(SPI4, MisoPin, PE5, 5);
252impl_spi_pin!(SPI4, MosiPin, PE6, 5);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 253pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 254pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 255impl_usart!(USART1);
@@ -266,6 +303,7 @@ pub use regs::dma_v2 as dma;
266pub use regs::exti_v1 as exti; 303pub use regs::exti_v1 as exti;
267pub use regs::gpio_v2 as gpio; 304pub use regs::gpio_v2 as gpio;
268pub use regs::rng_v1 as rng; 305pub use regs::rng_v1 as rng;
306pub use regs::spi_v1 as spi;
269pub use regs::syscfg_f4 as syscfg; 307pub use regs::syscfg_f4 as syscfg;
270pub use regs::usart_v1 as usart; 308pub use regs::usart_v1 as usart;
271mod regs; 309mod regs;
@@ -285,7 +323,7 @@ peripherals!(
285 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 323 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
286 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, 324 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
287 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, 325 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
288 PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 326 PK15, RNG, SPI1, SPI2, SPI3, SPI4, SYSCFG, USART1, USART2, USART3, USART6
289); 327);
290 328
291pub mod interrupt { 329pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f427zg.rs b/embassy-stm32/src/pac/stm32f427zg.rs
index 61acdfec2..264fb1751 100644
--- a/embassy-stm32/src/pac/stm32f427zg.rs
+++ b/embassy-stm32/src/pac/stm32f427zg.rs
@@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
217impl_spi!(SPI1, APB2);
218impl_spi_pin!(SPI1, SckPin, PA5, 5);
219impl_spi_pin!(SPI1, MisoPin, PA6, 5);
220impl_spi_pin!(SPI1, MosiPin, PA7, 5);
221impl_spi_pin!(SPI1, SckPin, PB3, 5);
222impl_spi_pin!(SPI1, MisoPin, PB4, 5);
223impl_spi_pin!(SPI1, MosiPin, PB5, 5);
224pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
225impl_spi!(SPI2, APB1);
226impl_spi_pin!(SPI2, SckPin, PB10, 5);
227impl_spi_pin!(SPI2, SckPin, PB13, 5);
228impl_spi_pin!(SPI2, MisoPin, PB14, 5);
229impl_spi_pin!(SPI2, MosiPin, PB15, 5);
230impl_spi_pin!(SPI2, MisoPin, PC2, 5);
231impl_spi_pin!(SPI2, MosiPin, PC3, 5);
232impl_spi_pin!(SPI2, SckPin, PD3, 5);
233impl_spi_pin!(SPI2, SckPin, PI1, 5);
234impl_spi_pin!(SPI2, MisoPin, PI2, 5);
235impl_spi_pin!(SPI2, MosiPin, PI3, 5);
236pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
237impl_spi!(SPI3, APB1);
238impl_spi_pin!(SPI3, SckPin, PB3, 6);
239impl_spi_pin!(SPI3, MisoPin, PB4, 6);
240impl_spi_pin!(SPI3, MosiPin, PB5, 6);
241impl_spi_pin!(SPI3, SckPin, PC10, 6);
242impl_spi_pin!(SPI3, MisoPin, PC11, 6);
243impl_spi_pin!(SPI3, MosiPin, PC12, 6);
244impl_spi_pin!(SPI3, MosiPin, PD6, 5);
245pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
246impl_spi!(SPI4, APB2);
247impl_spi_pin!(SPI4, SckPin, PE12, 5);
248impl_spi_pin!(SPI4, MisoPin, PE13, 5);
249impl_spi_pin!(SPI4, MosiPin, PE14, 5);
250impl_spi_pin!(SPI4, SckPin, PE2, 5);
251impl_spi_pin!(SPI4, MisoPin, PE5, 5);
252impl_spi_pin!(SPI4, MosiPin, PE6, 5);
253pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
254impl_spi!(SPI5, APB2);
255impl_spi_pin!(SPI5, MosiPin, PF11, 5);
256impl_spi_pin!(SPI5, SckPin, PF7, 5);
257impl_spi_pin!(SPI5, MisoPin, PF8, 5);
258impl_spi_pin!(SPI5, MosiPin, PF9, 5);
259impl_spi_pin!(SPI5, SckPin, PH6, 5);
260impl_spi_pin!(SPI5, MisoPin, PH7, 5);
261pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _);
262impl_spi!(SPI6, APB2);
263impl_spi_pin!(SPI6, MisoPin, PG12, 5);
264impl_spi_pin!(SPI6, SckPin, PG13, 5);
265impl_spi_pin!(SPI6, MosiPin, PG14, 5);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 266pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 267pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 268impl_usart!(USART1);
@@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma;
266pub use regs::exti_v1 as exti; 316pub use regs::exti_v1 as exti;
267pub use regs::gpio_v2 as gpio; 317pub use regs::gpio_v2 as gpio;
268pub use regs::rng_v1 as rng; 318pub use regs::rng_v1 as rng;
319pub use regs::spi_v1 as spi;
269pub use regs::syscfg_f4 as syscfg; 320pub use regs::syscfg_f4 as syscfg;
270pub use regs::usart_v1 as usart; 321pub use regs::usart_v1 as usart;
271mod regs; 322mod regs;
@@ -285,7 +336,7 @@ peripherals!(
285 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 336 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
286 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, 337 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
287 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, 338 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
288 PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 339 PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6
289); 340);
290 341
291pub mod interrupt { 342pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f427zi.rs b/embassy-stm32/src/pac/stm32f427zi.rs
index 61acdfec2..264fb1751 100644
--- a/embassy-stm32/src/pac/stm32f427zi.rs
+++ b/embassy-stm32/src/pac/stm32f427zi.rs
@@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
217impl_spi!(SPI1, APB2);
218impl_spi_pin!(SPI1, SckPin, PA5, 5);
219impl_spi_pin!(SPI1, MisoPin, PA6, 5);
220impl_spi_pin!(SPI1, MosiPin, PA7, 5);
221impl_spi_pin!(SPI1, SckPin, PB3, 5);
222impl_spi_pin!(SPI1, MisoPin, PB4, 5);
223impl_spi_pin!(SPI1, MosiPin, PB5, 5);
224pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
225impl_spi!(SPI2, APB1);
226impl_spi_pin!(SPI2, SckPin, PB10, 5);
227impl_spi_pin!(SPI2, SckPin, PB13, 5);
228impl_spi_pin!(SPI2, MisoPin, PB14, 5);
229impl_spi_pin!(SPI2, MosiPin, PB15, 5);
230impl_spi_pin!(SPI2, MisoPin, PC2, 5);
231impl_spi_pin!(SPI2, MosiPin, PC3, 5);
232impl_spi_pin!(SPI2, SckPin, PD3, 5);
233impl_spi_pin!(SPI2, SckPin, PI1, 5);
234impl_spi_pin!(SPI2, MisoPin, PI2, 5);
235impl_spi_pin!(SPI2, MosiPin, PI3, 5);
236pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
237impl_spi!(SPI3, APB1);
238impl_spi_pin!(SPI3, SckPin, PB3, 6);
239impl_spi_pin!(SPI3, MisoPin, PB4, 6);
240impl_spi_pin!(SPI3, MosiPin, PB5, 6);
241impl_spi_pin!(SPI3, SckPin, PC10, 6);
242impl_spi_pin!(SPI3, MisoPin, PC11, 6);
243impl_spi_pin!(SPI3, MosiPin, PC12, 6);
244impl_spi_pin!(SPI3, MosiPin, PD6, 5);
245pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
246impl_spi!(SPI4, APB2);
247impl_spi_pin!(SPI4, SckPin, PE12, 5);
248impl_spi_pin!(SPI4, MisoPin, PE13, 5);
249impl_spi_pin!(SPI4, MosiPin, PE14, 5);
250impl_spi_pin!(SPI4, SckPin, PE2, 5);
251impl_spi_pin!(SPI4, MisoPin, PE5, 5);
252impl_spi_pin!(SPI4, MosiPin, PE6, 5);
253pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
254impl_spi!(SPI5, APB2);
255impl_spi_pin!(SPI5, MosiPin, PF11, 5);
256impl_spi_pin!(SPI5, SckPin, PF7, 5);
257impl_spi_pin!(SPI5, MisoPin, PF8, 5);
258impl_spi_pin!(SPI5, MosiPin, PF9, 5);
259impl_spi_pin!(SPI5, SckPin, PH6, 5);
260impl_spi_pin!(SPI5, MisoPin, PH7, 5);
261pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _);
262impl_spi!(SPI6, APB2);
263impl_spi_pin!(SPI6, MisoPin, PG12, 5);
264impl_spi_pin!(SPI6, SckPin, PG13, 5);
265impl_spi_pin!(SPI6, MosiPin, PG14, 5);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 266pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 267pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 268impl_usart!(USART1);
@@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma;
266pub use regs::exti_v1 as exti; 316pub use regs::exti_v1 as exti;
267pub use regs::gpio_v2 as gpio; 317pub use regs::gpio_v2 as gpio;
268pub use regs::rng_v1 as rng; 318pub use regs::rng_v1 as rng;
319pub use regs::spi_v1 as spi;
269pub use regs::syscfg_f4 as syscfg; 320pub use regs::syscfg_f4 as syscfg;
270pub use regs::usart_v1 as usart; 321pub use regs::usart_v1 as usart;
271mod regs; 322mod regs;
@@ -285,7 +336,7 @@ peripherals!(
285 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 336 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
286 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, 337 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
287 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, 338 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
288 PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 339 PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6
289); 340);
290 341
291pub mod interrupt { 342pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f429ag.rs b/embassy-stm32/src/pac/stm32f429ag.rs
index a1a3ab422..ce1caee68 100644
--- a/embassy-stm32/src/pac/stm32f429ag.rs
+++ b/embassy-stm32/src/pac/stm32f429ag.rs
@@ -212,7 +212,52 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
217impl_spi!(SPI1, APB2);
218impl_spi_pin!(SPI1, SckPin, PA5, 5);
219impl_spi_pin!(SPI1, MisoPin, PA6, 5);
220impl_spi_pin!(SPI1, MosiPin, PA7, 5);
221impl_spi_pin!(SPI1, SckPin, PB3, 5);
222impl_spi_pin!(SPI1, MisoPin, PB4, 5);
223impl_spi_pin!(SPI1, MosiPin, PB5, 5);
224pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
225impl_spi!(SPI2, APB1);
226impl_spi_pin!(SPI2, SckPin, PB10, 5);
227impl_spi_pin!(SPI2, SckPin, PB13, 5);
228impl_spi_pin!(SPI2, MisoPin, PB14, 5);
229impl_spi_pin!(SPI2, MosiPin, PB15, 5);
230impl_spi_pin!(SPI2, MisoPin, PC2, 5);
231impl_spi_pin!(SPI2, MosiPin, PC3, 5);
232impl_spi_pin!(SPI2, SckPin, PD3, 5);
233impl_spi_pin!(SPI2, SckPin, PI1, 5);
234impl_spi_pin!(SPI2, MisoPin, PI2, 5);
235impl_spi_pin!(SPI2, MosiPin, PI3, 5);
236pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
237impl_spi!(SPI3, APB1);
238impl_spi_pin!(SPI3, SckPin, PB3, 6);
239impl_spi_pin!(SPI3, MisoPin, PB4, 6);
240impl_spi_pin!(SPI3, MosiPin, PB5, 6);
241impl_spi_pin!(SPI3, SckPin, PC10, 6);
242impl_spi_pin!(SPI3, MisoPin, PC11, 6);
243impl_spi_pin!(SPI3, MosiPin, PC12, 6);
244impl_spi_pin!(SPI3, MosiPin, PD6, 5);
245pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
246impl_spi!(SPI4, APB2);
247impl_spi_pin!(SPI4, SckPin, PE12, 5);
248impl_spi_pin!(SPI4, MisoPin, PE13, 5);
249impl_spi_pin!(SPI4, MosiPin, PE14, 5);
250impl_spi_pin!(SPI4, SckPin, PE2, 5);
251impl_spi_pin!(SPI4, MisoPin, PE5, 5);
252impl_spi_pin!(SPI4, MosiPin, PE6, 5);
253pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
254impl_spi!(SPI5, APB2);
255impl_spi_pin!(SPI5, MosiPin, PF11, 5);
256impl_spi_pin!(SPI5, SckPin, PF7, 5);
257impl_spi_pin!(SPI5, MisoPin, PF8, 5);
258impl_spi_pin!(SPI5, MosiPin, PF9, 5);
259impl_spi_pin!(SPI5, SckPin, PH6, 5);
260impl_spi_pin!(SPI5, MisoPin, PH7, 5);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 261pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 262pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 263impl_usart!(USART1);
@@ -266,6 +311,7 @@ pub use regs::dma_v2 as dma;
266pub use regs::exti_v1 as exti; 311pub use regs::exti_v1 as exti;
267pub use regs::gpio_v2 as gpio; 312pub use regs::gpio_v2 as gpio;
268pub use regs::rng_v1 as rng; 313pub use regs::rng_v1 as rng;
314pub use regs::spi_v1 as spi;
269pub use regs::syscfg_f4 as syscfg; 315pub use regs::syscfg_f4 as syscfg;
270pub use regs::usart_v1 as usart; 316pub use regs::usart_v1 as usart;
271mod regs; 317mod regs;
@@ -285,7 +331,7 @@ peripherals!(
285 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 331 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
286 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, 332 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
287 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, 333 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
288 PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 334 PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART3, USART6
289); 335);
290 336
291pub mod interrupt { 337pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f429ai.rs b/embassy-stm32/src/pac/stm32f429ai.rs
index a1a3ab422..ce1caee68 100644
--- a/embassy-stm32/src/pac/stm32f429ai.rs
+++ b/embassy-stm32/src/pac/stm32f429ai.rs
@@ -212,7 +212,52 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
217impl_spi!(SPI1, APB2);
218impl_spi_pin!(SPI1, SckPin, PA5, 5);
219impl_spi_pin!(SPI1, MisoPin, PA6, 5);
220impl_spi_pin!(SPI1, MosiPin, PA7, 5);
221impl_spi_pin!(SPI1, SckPin, PB3, 5);
222impl_spi_pin!(SPI1, MisoPin, PB4, 5);
223impl_spi_pin!(SPI1, MosiPin, PB5, 5);
224pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
225impl_spi!(SPI2, APB1);
226impl_spi_pin!(SPI2, SckPin, PB10, 5);
227impl_spi_pin!(SPI2, SckPin, PB13, 5);
228impl_spi_pin!(SPI2, MisoPin, PB14, 5);
229impl_spi_pin!(SPI2, MosiPin, PB15, 5);
230impl_spi_pin!(SPI2, MisoPin, PC2, 5);
231impl_spi_pin!(SPI2, MosiPin, PC3, 5);
232impl_spi_pin!(SPI2, SckPin, PD3, 5);
233impl_spi_pin!(SPI2, SckPin, PI1, 5);
234impl_spi_pin!(SPI2, MisoPin, PI2, 5);
235impl_spi_pin!(SPI2, MosiPin, PI3, 5);
236pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
237impl_spi!(SPI3, APB1);
238impl_spi_pin!(SPI3, SckPin, PB3, 6);
239impl_spi_pin!(SPI3, MisoPin, PB4, 6);
240impl_spi_pin!(SPI3, MosiPin, PB5, 6);
241impl_spi_pin!(SPI3, SckPin, PC10, 6);
242impl_spi_pin!(SPI3, MisoPin, PC11, 6);
243impl_spi_pin!(SPI3, MosiPin, PC12, 6);
244impl_spi_pin!(SPI3, MosiPin, PD6, 5);
245pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
246impl_spi!(SPI4, APB2);
247impl_spi_pin!(SPI4, SckPin, PE12, 5);
248impl_spi_pin!(SPI4, MisoPin, PE13, 5);
249impl_spi_pin!(SPI4, MosiPin, PE14, 5);
250impl_spi_pin!(SPI4, SckPin, PE2, 5);
251impl_spi_pin!(SPI4, MisoPin, PE5, 5);
252impl_spi_pin!(SPI4, MosiPin, PE6, 5);
253pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
254impl_spi!(SPI5, APB2);
255impl_spi_pin!(SPI5, MosiPin, PF11, 5);
256impl_spi_pin!(SPI5, SckPin, PF7, 5);
257impl_spi_pin!(SPI5, MisoPin, PF8, 5);
258impl_spi_pin!(SPI5, MosiPin, PF9, 5);
259impl_spi_pin!(SPI5, SckPin, PH6, 5);
260impl_spi_pin!(SPI5, MisoPin, PH7, 5);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 261pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 262pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 263impl_usart!(USART1);
@@ -266,6 +311,7 @@ pub use regs::dma_v2 as dma;
266pub use regs::exti_v1 as exti; 311pub use regs::exti_v1 as exti;
267pub use regs::gpio_v2 as gpio; 312pub use regs::gpio_v2 as gpio;
268pub use regs::rng_v1 as rng; 313pub use regs::rng_v1 as rng;
314pub use regs::spi_v1 as spi;
269pub use regs::syscfg_f4 as syscfg; 315pub use regs::syscfg_f4 as syscfg;
270pub use regs::usart_v1 as usart; 316pub use regs::usart_v1 as usart;
271mod regs; 317mod regs;
@@ -285,7 +331,7 @@ peripherals!(
285 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 331 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
286 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, 332 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
287 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, 333 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
288 PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 334 PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART3, USART6
289); 335);
290 336
291pub mod interrupt { 337pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f429be.rs b/embassy-stm32/src/pac/stm32f429be.rs
index a1a3ab422..656c87e07 100644
--- a/embassy-stm32/src/pac/stm32f429be.rs
+++ b/embassy-stm32/src/pac/stm32f429be.rs
@@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
217impl_spi!(SPI1, APB2);
218impl_spi_pin!(SPI1, SckPin, PA5, 5);
219impl_spi_pin!(SPI1, MisoPin, PA6, 5);
220impl_spi_pin!(SPI1, MosiPin, PA7, 5);
221impl_spi_pin!(SPI1, SckPin, PB3, 5);
222impl_spi_pin!(SPI1, MisoPin, PB4, 5);
223impl_spi_pin!(SPI1, MosiPin, PB5, 5);
224pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
225impl_spi!(SPI2, APB1);
226impl_spi_pin!(SPI2, SckPin, PB10, 5);
227impl_spi_pin!(SPI2, SckPin, PB13, 5);
228impl_spi_pin!(SPI2, MisoPin, PB14, 5);
229impl_spi_pin!(SPI2, MosiPin, PB15, 5);
230impl_spi_pin!(SPI2, MisoPin, PC2, 5);
231impl_spi_pin!(SPI2, MosiPin, PC3, 5);
232impl_spi_pin!(SPI2, SckPin, PD3, 5);
233impl_spi_pin!(SPI2, SckPin, PI1, 5);
234impl_spi_pin!(SPI2, MisoPin, PI2, 5);
235impl_spi_pin!(SPI2, MosiPin, PI3, 5);
236pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
237impl_spi!(SPI3, APB1);
238impl_spi_pin!(SPI3, SckPin, PB3, 6);
239impl_spi_pin!(SPI3, MisoPin, PB4, 6);
240impl_spi_pin!(SPI3, MosiPin, PB5, 6);
241impl_spi_pin!(SPI3, SckPin, PC10, 6);
242impl_spi_pin!(SPI3, MisoPin, PC11, 6);
243impl_spi_pin!(SPI3, MosiPin, PC12, 6);
244impl_spi_pin!(SPI3, MosiPin, PD6, 5);
245pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
246impl_spi!(SPI4, APB2);
247impl_spi_pin!(SPI4, SckPin, PE12, 5);
248impl_spi_pin!(SPI4, MisoPin, PE13, 5);
249impl_spi_pin!(SPI4, MosiPin, PE14, 5);
250impl_spi_pin!(SPI4, SckPin, PE2, 5);
251impl_spi_pin!(SPI4, MisoPin, PE5, 5);
252impl_spi_pin!(SPI4, MosiPin, PE6, 5);
253pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
254impl_spi!(SPI5, APB2);
255impl_spi_pin!(SPI5, MosiPin, PF11, 5);
256impl_spi_pin!(SPI5, SckPin, PF7, 5);
257impl_spi_pin!(SPI5, MisoPin, PF8, 5);
258impl_spi_pin!(SPI5, MosiPin, PF9, 5);
259impl_spi_pin!(SPI5, SckPin, PH6, 5);
260impl_spi_pin!(SPI5, MisoPin, PH7, 5);
261pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _);
262impl_spi!(SPI6, APB2);
263impl_spi_pin!(SPI6, MisoPin, PG12, 5);
264impl_spi_pin!(SPI6, SckPin, PG13, 5);
265impl_spi_pin!(SPI6, MosiPin, PG14, 5);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 266pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 267pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 268impl_usart!(USART1);
@@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma;
266pub use regs::exti_v1 as exti; 316pub use regs::exti_v1 as exti;
267pub use regs::gpio_v2 as gpio; 317pub use regs::gpio_v2 as gpio;
268pub use regs::rng_v1 as rng; 318pub use regs::rng_v1 as rng;
319pub use regs::spi_v1 as spi;
269pub use regs::syscfg_f4 as syscfg; 320pub use regs::syscfg_f4 as syscfg;
270pub use regs::usart_v1 as usart; 321pub use regs::usart_v1 as usart;
271mod regs; 322mod regs;
@@ -285,7 +336,7 @@ peripherals!(
285 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 336 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
286 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, 337 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
287 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, 338 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
288 PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 339 PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6
289); 340);
290 341
291pub mod interrupt { 342pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f429bg.rs b/embassy-stm32/src/pac/stm32f429bg.rs
index a1a3ab422..656c87e07 100644
--- a/embassy-stm32/src/pac/stm32f429bg.rs
+++ b/embassy-stm32/src/pac/stm32f429bg.rs
@@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
217impl_spi!(SPI1, APB2);
218impl_spi_pin!(SPI1, SckPin, PA5, 5);
219impl_spi_pin!(SPI1, MisoPin, PA6, 5);
220impl_spi_pin!(SPI1, MosiPin, PA7, 5);
221impl_spi_pin!(SPI1, SckPin, PB3, 5);
222impl_spi_pin!(SPI1, MisoPin, PB4, 5);
223impl_spi_pin!(SPI1, MosiPin, PB5, 5);
224pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
225impl_spi!(SPI2, APB1);
226impl_spi_pin!(SPI2, SckPin, PB10, 5);
227impl_spi_pin!(SPI2, SckPin, PB13, 5);
228impl_spi_pin!(SPI2, MisoPin, PB14, 5);
229impl_spi_pin!(SPI2, MosiPin, PB15, 5);
230impl_spi_pin!(SPI2, MisoPin, PC2, 5);
231impl_spi_pin!(SPI2, MosiPin, PC3, 5);
232impl_spi_pin!(SPI2, SckPin, PD3, 5);
233impl_spi_pin!(SPI2, SckPin, PI1, 5);
234impl_spi_pin!(SPI2, MisoPin, PI2, 5);
235impl_spi_pin!(SPI2, MosiPin, PI3, 5);
236pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
237impl_spi!(SPI3, APB1);
238impl_spi_pin!(SPI3, SckPin, PB3, 6);
239impl_spi_pin!(SPI3, MisoPin, PB4, 6);
240impl_spi_pin!(SPI3, MosiPin, PB5, 6);
241impl_spi_pin!(SPI3, SckPin, PC10, 6);
242impl_spi_pin!(SPI3, MisoPin, PC11, 6);
243impl_spi_pin!(SPI3, MosiPin, PC12, 6);
244impl_spi_pin!(SPI3, MosiPin, PD6, 5);
245pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
246impl_spi!(SPI4, APB2);
247impl_spi_pin!(SPI4, SckPin, PE12, 5);
248impl_spi_pin!(SPI4, MisoPin, PE13, 5);
249impl_spi_pin!(SPI4, MosiPin, PE14, 5);
250impl_spi_pin!(SPI4, SckPin, PE2, 5);
251impl_spi_pin!(SPI4, MisoPin, PE5, 5);
252impl_spi_pin!(SPI4, MosiPin, PE6, 5);
253pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
254impl_spi!(SPI5, APB2);
255impl_spi_pin!(SPI5, MosiPin, PF11, 5);
256impl_spi_pin!(SPI5, SckPin, PF7, 5);
257impl_spi_pin!(SPI5, MisoPin, PF8, 5);
258impl_spi_pin!(SPI5, MosiPin, PF9, 5);
259impl_spi_pin!(SPI5, SckPin, PH6, 5);
260impl_spi_pin!(SPI5, MisoPin, PH7, 5);
261pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _);
262impl_spi!(SPI6, APB2);
263impl_spi_pin!(SPI6, MisoPin, PG12, 5);
264impl_spi_pin!(SPI6, SckPin, PG13, 5);
265impl_spi_pin!(SPI6, MosiPin, PG14, 5);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 266pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 267pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 268impl_usart!(USART1);
@@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma;
266pub use regs::exti_v1 as exti; 316pub use regs::exti_v1 as exti;
267pub use regs::gpio_v2 as gpio; 317pub use regs::gpio_v2 as gpio;
268pub use regs::rng_v1 as rng; 318pub use regs::rng_v1 as rng;
319pub use regs::spi_v1 as spi;
269pub use regs::syscfg_f4 as syscfg; 320pub use regs::syscfg_f4 as syscfg;
270pub use regs::usart_v1 as usart; 321pub use regs::usart_v1 as usart;
271mod regs; 322mod regs;
@@ -285,7 +336,7 @@ peripherals!(
285 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 336 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
286 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, 337 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
287 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, 338 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
288 PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 339 PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6
289); 340);
290 341
291pub mod interrupt { 342pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f429bi.rs b/embassy-stm32/src/pac/stm32f429bi.rs
index a1a3ab422..656c87e07 100644
--- a/embassy-stm32/src/pac/stm32f429bi.rs
+++ b/embassy-stm32/src/pac/stm32f429bi.rs
@@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
217impl_spi!(SPI1, APB2);
218impl_spi_pin!(SPI1, SckPin, PA5, 5);
219impl_spi_pin!(SPI1, MisoPin, PA6, 5);
220impl_spi_pin!(SPI1, MosiPin, PA7, 5);
221impl_spi_pin!(SPI1, SckPin, PB3, 5);
222impl_spi_pin!(SPI1, MisoPin, PB4, 5);
223impl_spi_pin!(SPI1, MosiPin, PB5, 5);
224pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
225impl_spi!(SPI2, APB1);
226impl_spi_pin!(SPI2, SckPin, PB10, 5);
227impl_spi_pin!(SPI2, SckPin, PB13, 5);
228impl_spi_pin!(SPI2, MisoPin, PB14, 5);
229impl_spi_pin!(SPI2, MosiPin, PB15, 5);
230impl_spi_pin!(SPI2, MisoPin, PC2, 5);
231impl_spi_pin!(SPI2, MosiPin, PC3, 5);
232impl_spi_pin!(SPI2, SckPin, PD3, 5);
233impl_spi_pin!(SPI2, SckPin, PI1, 5);
234impl_spi_pin!(SPI2, MisoPin, PI2, 5);
235impl_spi_pin!(SPI2, MosiPin, PI3, 5);
236pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
237impl_spi!(SPI3, APB1);
238impl_spi_pin!(SPI3, SckPin, PB3, 6);
239impl_spi_pin!(SPI3, MisoPin, PB4, 6);
240impl_spi_pin!(SPI3, MosiPin, PB5, 6);
241impl_spi_pin!(SPI3, SckPin, PC10, 6);
242impl_spi_pin!(SPI3, MisoPin, PC11, 6);
243impl_spi_pin!(SPI3, MosiPin, PC12, 6);
244impl_spi_pin!(SPI3, MosiPin, PD6, 5);
245pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
246impl_spi!(SPI4, APB2);
247impl_spi_pin!(SPI4, SckPin, PE12, 5);
248impl_spi_pin!(SPI4, MisoPin, PE13, 5);
249impl_spi_pin!(SPI4, MosiPin, PE14, 5);
250impl_spi_pin!(SPI4, SckPin, PE2, 5);
251impl_spi_pin!(SPI4, MisoPin, PE5, 5);
252impl_spi_pin!(SPI4, MosiPin, PE6, 5);
253pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
254impl_spi!(SPI5, APB2);
255impl_spi_pin!(SPI5, MosiPin, PF11, 5);
256impl_spi_pin!(SPI5, SckPin, PF7, 5);
257impl_spi_pin!(SPI5, MisoPin, PF8, 5);
258impl_spi_pin!(SPI5, MosiPin, PF9, 5);
259impl_spi_pin!(SPI5, SckPin, PH6, 5);
260impl_spi_pin!(SPI5, MisoPin, PH7, 5);
261pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _);
262impl_spi!(SPI6, APB2);
263impl_spi_pin!(SPI6, MisoPin, PG12, 5);
264impl_spi_pin!(SPI6, SckPin, PG13, 5);
265impl_spi_pin!(SPI6, MosiPin, PG14, 5);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 266pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 267pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 268impl_usart!(USART1);
@@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma;
266pub use regs::exti_v1 as exti; 316pub use regs::exti_v1 as exti;
267pub use regs::gpio_v2 as gpio; 317pub use regs::gpio_v2 as gpio;
268pub use regs::rng_v1 as rng; 318pub use regs::rng_v1 as rng;
319pub use regs::spi_v1 as spi;
269pub use regs::syscfg_f4 as syscfg; 320pub use regs::syscfg_f4 as syscfg;
270pub use regs::usart_v1 as usart; 321pub use regs::usart_v1 as usart;
271mod regs; 322mod regs;
@@ -285,7 +336,7 @@ peripherals!(
285 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 336 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
286 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, 337 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
287 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, 338 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
288 PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 339 PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6
289); 340);
290 341
291pub mod interrupt { 342pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f429ie.rs b/embassy-stm32/src/pac/stm32f429ie.rs
index a1a3ab422..656c87e07 100644
--- a/embassy-stm32/src/pac/stm32f429ie.rs
+++ b/embassy-stm32/src/pac/stm32f429ie.rs
@@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
217impl_spi!(SPI1, APB2);
218impl_spi_pin!(SPI1, SckPin, PA5, 5);
219impl_spi_pin!(SPI1, MisoPin, PA6, 5);
220impl_spi_pin!(SPI1, MosiPin, PA7, 5);
221impl_spi_pin!(SPI1, SckPin, PB3, 5);
222impl_spi_pin!(SPI1, MisoPin, PB4, 5);
223impl_spi_pin!(SPI1, MosiPin, PB5, 5);
224pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
225impl_spi!(SPI2, APB1);
226impl_spi_pin!(SPI2, SckPin, PB10, 5);
227impl_spi_pin!(SPI2, SckPin, PB13, 5);
228impl_spi_pin!(SPI2, MisoPin, PB14, 5);
229impl_spi_pin!(SPI2, MosiPin, PB15, 5);
230impl_spi_pin!(SPI2, MisoPin, PC2, 5);
231impl_spi_pin!(SPI2, MosiPin, PC3, 5);
232impl_spi_pin!(SPI2, SckPin, PD3, 5);
233impl_spi_pin!(SPI2, SckPin, PI1, 5);
234impl_spi_pin!(SPI2, MisoPin, PI2, 5);
235impl_spi_pin!(SPI2, MosiPin, PI3, 5);
236pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
237impl_spi!(SPI3, APB1);
238impl_spi_pin!(SPI3, SckPin, PB3, 6);
239impl_spi_pin!(SPI3, MisoPin, PB4, 6);
240impl_spi_pin!(SPI3, MosiPin, PB5, 6);
241impl_spi_pin!(SPI3, SckPin, PC10, 6);
242impl_spi_pin!(SPI3, MisoPin, PC11, 6);
243impl_spi_pin!(SPI3, MosiPin, PC12, 6);
244impl_spi_pin!(SPI3, MosiPin, PD6, 5);
245pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
246impl_spi!(SPI4, APB2);
247impl_spi_pin!(SPI4, SckPin, PE12, 5);
248impl_spi_pin!(SPI4, MisoPin, PE13, 5);
249impl_spi_pin!(SPI4, MosiPin, PE14, 5);
250impl_spi_pin!(SPI4, SckPin, PE2, 5);
251impl_spi_pin!(SPI4, MisoPin, PE5, 5);
252impl_spi_pin!(SPI4, MosiPin, PE6, 5);
253pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
254impl_spi!(SPI5, APB2);
255impl_spi_pin!(SPI5, MosiPin, PF11, 5);
256impl_spi_pin!(SPI5, SckPin, PF7, 5);
257impl_spi_pin!(SPI5, MisoPin, PF8, 5);
258impl_spi_pin!(SPI5, MosiPin, PF9, 5);
259impl_spi_pin!(SPI5, SckPin, PH6, 5);
260impl_spi_pin!(SPI5, MisoPin, PH7, 5);
261pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _);
262impl_spi!(SPI6, APB2);
263impl_spi_pin!(SPI6, MisoPin, PG12, 5);
264impl_spi_pin!(SPI6, SckPin, PG13, 5);
265impl_spi_pin!(SPI6, MosiPin, PG14, 5);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 266pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 267pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 268impl_usart!(USART1);
@@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma;
266pub use regs::exti_v1 as exti; 316pub use regs::exti_v1 as exti;
267pub use regs::gpio_v2 as gpio; 317pub use regs::gpio_v2 as gpio;
268pub use regs::rng_v1 as rng; 318pub use regs::rng_v1 as rng;
319pub use regs::spi_v1 as spi;
269pub use regs::syscfg_f4 as syscfg; 320pub use regs::syscfg_f4 as syscfg;
270pub use regs::usart_v1 as usart; 321pub use regs::usart_v1 as usart;
271mod regs; 322mod regs;
@@ -285,7 +336,7 @@ peripherals!(
285 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 336 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
286 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, 337 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
287 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, 338 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
288 PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 339 PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6
289); 340);
290 341
291pub mod interrupt { 342pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f429ig.rs b/embassy-stm32/src/pac/stm32f429ig.rs
index a1a3ab422..656c87e07 100644
--- a/embassy-stm32/src/pac/stm32f429ig.rs
+++ b/embassy-stm32/src/pac/stm32f429ig.rs
@@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
217impl_spi!(SPI1, APB2);
218impl_spi_pin!(SPI1, SckPin, PA5, 5);
219impl_spi_pin!(SPI1, MisoPin, PA6, 5);
220impl_spi_pin!(SPI1, MosiPin, PA7, 5);
221impl_spi_pin!(SPI1, SckPin, PB3, 5);
222impl_spi_pin!(SPI1, MisoPin, PB4, 5);
223impl_spi_pin!(SPI1, MosiPin, PB5, 5);
224pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
225impl_spi!(SPI2, APB1);
226impl_spi_pin!(SPI2, SckPin, PB10, 5);
227impl_spi_pin!(SPI2, SckPin, PB13, 5);
228impl_spi_pin!(SPI2, MisoPin, PB14, 5);
229impl_spi_pin!(SPI2, MosiPin, PB15, 5);
230impl_spi_pin!(SPI2, MisoPin, PC2, 5);
231impl_spi_pin!(SPI2, MosiPin, PC3, 5);
232impl_spi_pin!(SPI2, SckPin, PD3, 5);
233impl_spi_pin!(SPI2, SckPin, PI1, 5);
234impl_spi_pin!(SPI2, MisoPin, PI2, 5);
235impl_spi_pin!(SPI2, MosiPin, PI3, 5);
236pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
237impl_spi!(SPI3, APB1);
238impl_spi_pin!(SPI3, SckPin, PB3, 6);
239impl_spi_pin!(SPI3, MisoPin, PB4, 6);
240impl_spi_pin!(SPI3, MosiPin, PB5, 6);
241impl_spi_pin!(SPI3, SckPin, PC10, 6);
242impl_spi_pin!(SPI3, MisoPin, PC11, 6);
243impl_spi_pin!(SPI3, MosiPin, PC12, 6);
244impl_spi_pin!(SPI3, MosiPin, PD6, 5);
245pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
246impl_spi!(SPI4, APB2);
247impl_spi_pin!(SPI4, SckPin, PE12, 5);
248impl_spi_pin!(SPI4, MisoPin, PE13, 5);
249impl_spi_pin!(SPI4, MosiPin, PE14, 5);
250impl_spi_pin!(SPI4, SckPin, PE2, 5);
251impl_spi_pin!(SPI4, MisoPin, PE5, 5);
252impl_spi_pin!(SPI4, MosiPin, PE6, 5);
253pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
254impl_spi!(SPI5, APB2);
255impl_spi_pin!(SPI5, MosiPin, PF11, 5);
256impl_spi_pin!(SPI5, SckPin, PF7, 5);
257impl_spi_pin!(SPI5, MisoPin, PF8, 5);
258impl_spi_pin!(SPI5, MosiPin, PF9, 5);
259impl_spi_pin!(SPI5, SckPin, PH6, 5);
260impl_spi_pin!(SPI5, MisoPin, PH7, 5);
261pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _);
262impl_spi!(SPI6, APB2);
263impl_spi_pin!(SPI6, MisoPin, PG12, 5);
264impl_spi_pin!(SPI6, SckPin, PG13, 5);
265impl_spi_pin!(SPI6, MosiPin, PG14, 5);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 266pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 267pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 268impl_usart!(USART1);
@@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma;
266pub use regs::exti_v1 as exti; 316pub use regs::exti_v1 as exti;
267pub use regs::gpio_v2 as gpio; 317pub use regs::gpio_v2 as gpio;
268pub use regs::rng_v1 as rng; 318pub use regs::rng_v1 as rng;
319pub use regs::spi_v1 as spi;
269pub use regs::syscfg_f4 as syscfg; 320pub use regs::syscfg_f4 as syscfg;
270pub use regs::usart_v1 as usart; 321pub use regs::usart_v1 as usart;
271mod regs; 322mod regs;
@@ -285,7 +336,7 @@ peripherals!(
285 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 336 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
286 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, 337 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
287 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, 338 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
288 PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 339 PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6
289); 340);
290 341
291pub mod interrupt { 342pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f429ii.rs b/embassy-stm32/src/pac/stm32f429ii.rs
index a1a3ab422..656c87e07 100644
--- a/embassy-stm32/src/pac/stm32f429ii.rs
+++ b/embassy-stm32/src/pac/stm32f429ii.rs
@@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
217impl_spi!(SPI1, APB2);
218impl_spi_pin!(SPI1, SckPin, PA5, 5);
219impl_spi_pin!(SPI1, MisoPin, PA6, 5);
220impl_spi_pin!(SPI1, MosiPin, PA7, 5);
221impl_spi_pin!(SPI1, SckPin, PB3, 5);
222impl_spi_pin!(SPI1, MisoPin, PB4, 5);
223impl_spi_pin!(SPI1, MosiPin, PB5, 5);
224pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
225impl_spi!(SPI2, APB1);
226impl_spi_pin!(SPI2, SckPin, PB10, 5);
227impl_spi_pin!(SPI2, SckPin, PB13, 5);
228impl_spi_pin!(SPI2, MisoPin, PB14, 5);
229impl_spi_pin!(SPI2, MosiPin, PB15, 5);
230impl_spi_pin!(SPI2, MisoPin, PC2, 5);
231impl_spi_pin!(SPI2, MosiPin, PC3, 5);
232impl_spi_pin!(SPI2, SckPin, PD3, 5);
233impl_spi_pin!(SPI2, SckPin, PI1, 5);
234impl_spi_pin!(SPI2, MisoPin, PI2, 5);
235impl_spi_pin!(SPI2, MosiPin, PI3, 5);
236pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
237impl_spi!(SPI3, APB1);
238impl_spi_pin!(SPI3, SckPin, PB3, 6);
239impl_spi_pin!(SPI3, MisoPin, PB4, 6);
240impl_spi_pin!(SPI3, MosiPin, PB5, 6);
241impl_spi_pin!(SPI3, SckPin, PC10, 6);
242impl_spi_pin!(SPI3, MisoPin, PC11, 6);
243impl_spi_pin!(SPI3, MosiPin, PC12, 6);
244impl_spi_pin!(SPI3, MosiPin, PD6, 5);
245pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
246impl_spi!(SPI4, APB2);
247impl_spi_pin!(SPI4, SckPin, PE12, 5);
248impl_spi_pin!(SPI4, MisoPin, PE13, 5);
249impl_spi_pin!(SPI4, MosiPin, PE14, 5);
250impl_spi_pin!(SPI4, SckPin, PE2, 5);
251impl_spi_pin!(SPI4, MisoPin, PE5, 5);
252impl_spi_pin!(SPI4, MosiPin, PE6, 5);
253pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
254impl_spi!(SPI5, APB2);
255impl_spi_pin!(SPI5, MosiPin, PF11, 5);
256impl_spi_pin!(SPI5, SckPin, PF7, 5);
257impl_spi_pin!(SPI5, MisoPin, PF8, 5);
258impl_spi_pin!(SPI5, MosiPin, PF9, 5);
259impl_spi_pin!(SPI5, SckPin, PH6, 5);
260impl_spi_pin!(SPI5, MisoPin, PH7, 5);
261pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _);
262impl_spi!(SPI6, APB2);
263impl_spi_pin!(SPI6, MisoPin, PG12, 5);
264impl_spi_pin!(SPI6, SckPin, PG13, 5);
265impl_spi_pin!(SPI6, MosiPin, PG14, 5);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 266pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 267pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 268impl_usart!(USART1);
@@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma;
266pub use regs::exti_v1 as exti; 316pub use regs::exti_v1 as exti;
267pub use regs::gpio_v2 as gpio; 317pub use regs::gpio_v2 as gpio;
268pub use regs::rng_v1 as rng; 318pub use regs::rng_v1 as rng;
319pub use regs::spi_v1 as spi;
269pub use regs::syscfg_f4 as syscfg; 320pub use regs::syscfg_f4 as syscfg;
270pub use regs::usart_v1 as usart; 321pub use regs::usart_v1 as usart;
271mod regs; 322mod regs;
@@ -285,7 +336,7 @@ peripherals!(
285 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 336 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
286 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, 337 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
287 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, 338 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
288 PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 339 PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6
289); 340);
290 341
291pub mod interrupt { 342pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f429ne.rs b/embassy-stm32/src/pac/stm32f429ne.rs
index a1a3ab422..656c87e07 100644
--- a/embassy-stm32/src/pac/stm32f429ne.rs
+++ b/embassy-stm32/src/pac/stm32f429ne.rs
@@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
217impl_spi!(SPI1, APB2);
218impl_spi_pin!(SPI1, SckPin, PA5, 5);
219impl_spi_pin!(SPI1, MisoPin, PA6, 5);
220impl_spi_pin!(SPI1, MosiPin, PA7, 5);
221impl_spi_pin!(SPI1, SckPin, PB3, 5);
222impl_spi_pin!(SPI1, MisoPin, PB4, 5);
223impl_spi_pin!(SPI1, MosiPin, PB5, 5);
224pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
225impl_spi!(SPI2, APB1);
226impl_spi_pin!(SPI2, SckPin, PB10, 5);
227impl_spi_pin!(SPI2, SckPin, PB13, 5);
228impl_spi_pin!(SPI2, MisoPin, PB14, 5);
229impl_spi_pin!(SPI2, MosiPin, PB15, 5);
230impl_spi_pin!(SPI2, MisoPin, PC2, 5);
231impl_spi_pin!(SPI2, MosiPin, PC3, 5);
232impl_spi_pin!(SPI2, SckPin, PD3, 5);
233impl_spi_pin!(SPI2, SckPin, PI1, 5);
234impl_spi_pin!(SPI2, MisoPin, PI2, 5);
235impl_spi_pin!(SPI2, MosiPin, PI3, 5);
236pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
237impl_spi!(SPI3, APB1);
238impl_spi_pin!(SPI3, SckPin, PB3, 6);
239impl_spi_pin!(SPI3, MisoPin, PB4, 6);
240impl_spi_pin!(SPI3, MosiPin, PB5, 6);
241impl_spi_pin!(SPI3, SckPin, PC10, 6);
242impl_spi_pin!(SPI3, MisoPin, PC11, 6);
243impl_spi_pin!(SPI3, MosiPin, PC12, 6);
244impl_spi_pin!(SPI3, MosiPin, PD6, 5);
245pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
246impl_spi!(SPI4, APB2);
247impl_spi_pin!(SPI4, SckPin, PE12, 5);
248impl_spi_pin!(SPI4, MisoPin, PE13, 5);
249impl_spi_pin!(SPI4, MosiPin, PE14, 5);
250impl_spi_pin!(SPI4, SckPin, PE2, 5);
251impl_spi_pin!(SPI4, MisoPin, PE5, 5);
252impl_spi_pin!(SPI4, MosiPin, PE6, 5);
253pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
254impl_spi!(SPI5, APB2);
255impl_spi_pin!(SPI5, MosiPin, PF11, 5);
256impl_spi_pin!(SPI5, SckPin, PF7, 5);
257impl_spi_pin!(SPI5, MisoPin, PF8, 5);
258impl_spi_pin!(SPI5, MosiPin, PF9, 5);
259impl_spi_pin!(SPI5, SckPin, PH6, 5);
260impl_spi_pin!(SPI5, MisoPin, PH7, 5);
261pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _);
262impl_spi!(SPI6, APB2);
263impl_spi_pin!(SPI6, MisoPin, PG12, 5);
264impl_spi_pin!(SPI6, SckPin, PG13, 5);
265impl_spi_pin!(SPI6, MosiPin, PG14, 5);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 266pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 267pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 268impl_usart!(USART1);
@@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma;
266pub use regs::exti_v1 as exti; 316pub use regs::exti_v1 as exti;
267pub use regs::gpio_v2 as gpio; 317pub use regs::gpio_v2 as gpio;
268pub use regs::rng_v1 as rng; 318pub use regs::rng_v1 as rng;
319pub use regs::spi_v1 as spi;
269pub use regs::syscfg_f4 as syscfg; 320pub use regs::syscfg_f4 as syscfg;
270pub use regs::usart_v1 as usart; 321pub use regs::usart_v1 as usart;
271mod regs; 322mod regs;
@@ -285,7 +336,7 @@ peripherals!(
285 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 336 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
286 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, 337 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
287 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, 338 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
288 PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 339 PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6
289); 340);
290 341
291pub mod interrupt { 342pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f429ng.rs b/embassy-stm32/src/pac/stm32f429ng.rs
index a1a3ab422..656c87e07 100644
--- a/embassy-stm32/src/pac/stm32f429ng.rs
+++ b/embassy-stm32/src/pac/stm32f429ng.rs
@@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
217impl_spi!(SPI1, APB2);
218impl_spi_pin!(SPI1, SckPin, PA5, 5);
219impl_spi_pin!(SPI1, MisoPin, PA6, 5);
220impl_spi_pin!(SPI1, MosiPin, PA7, 5);
221impl_spi_pin!(SPI1, SckPin, PB3, 5);
222impl_spi_pin!(SPI1, MisoPin, PB4, 5);
223impl_spi_pin!(SPI1, MosiPin, PB5, 5);
224pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
225impl_spi!(SPI2, APB1);
226impl_spi_pin!(SPI2, SckPin, PB10, 5);
227impl_spi_pin!(SPI2, SckPin, PB13, 5);
228impl_spi_pin!(SPI2, MisoPin, PB14, 5);
229impl_spi_pin!(SPI2, MosiPin, PB15, 5);
230impl_spi_pin!(SPI2, MisoPin, PC2, 5);
231impl_spi_pin!(SPI2, MosiPin, PC3, 5);
232impl_spi_pin!(SPI2, SckPin, PD3, 5);
233impl_spi_pin!(SPI2, SckPin, PI1, 5);
234impl_spi_pin!(SPI2, MisoPin, PI2, 5);
235impl_spi_pin!(SPI2, MosiPin, PI3, 5);
236pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
237impl_spi!(SPI3, APB1);
238impl_spi_pin!(SPI3, SckPin, PB3, 6);
239impl_spi_pin!(SPI3, MisoPin, PB4, 6);
240impl_spi_pin!(SPI3, MosiPin, PB5, 6);
241impl_spi_pin!(SPI3, SckPin, PC10, 6);
242impl_spi_pin!(SPI3, MisoPin, PC11, 6);
243impl_spi_pin!(SPI3, MosiPin, PC12, 6);
244impl_spi_pin!(SPI3, MosiPin, PD6, 5);
245pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
246impl_spi!(SPI4, APB2);
247impl_spi_pin!(SPI4, SckPin, PE12, 5);
248impl_spi_pin!(SPI4, MisoPin, PE13, 5);
249impl_spi_pin!(SPI4, MosiPin, PE14, 5);
250impl_spi_pin!(SPI4, SckPin, PE2, 5);
251impl_spi_pin!(SPI4, MisoPin, PE5, 5);
252impl_spi_pin!(SPI4, MosiPin, PE6, 5);
253pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
254impl_spi!(SPI5, APB2);
255impl_spi_pin!(SPI5, MosiPin, PF11, 5);
256impl_spi_pin!(SPI5, SckPin, PF7, 5);
257impl_spi_pin!(SPI5, MisoPin, PF8, 5);
258impl_spi_pin!(SPI5, MosiPin, PF9, 5);
259impl_spi_pin!(SPI5, SckPin, PH6, 5);
260impl_spi_pin!(SPI5, MisoPin, PH7, 5);
261pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _);
262impl_spi!(SPI6, APB2);
263impl_spi_pin!(SPI6, MisoPin, PG12, 5);
264impl_spi_pin!(SPI6, SckPin, PG13, 5);
265impl_spi_pin!(SPI6, MosiPin, PG14, 5);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 266pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 267pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 268impl_usart!(USART1);
@@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma;
266pub use regs::exti_v1 as exti; 316pub use regs::exti_v1 as exti;
267pub use regs::gpio_v2 as gpio; 317pub use regs::gpio_v2 as gpio;
268pub use regs::rng_v1 as rng; 318pub use regs::rng_v1 as rng;
319pub use regs::spi_v1 as spi;
269pub use regs::syscfg_f4 as syscfg; 320pub use regs::syscfg_f4 as syscfg;
270pub use regs::usart_v1 as usart; 321pub use regs::usart_v1 as usart;
271mod regs; 322mod regs;
@@ -285,7 +336,7 @@ peripherals!(
285 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 336 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
286 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, 337 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
287 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, 338 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
288 PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 339 PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6
289); 340);
290 341
291pub mod interrupt { 342pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f429ni.rs b/embassy-stm32/src/pac/stm32f429ni.rs
index a1a3ab422..656c87e07 100644
--- a/embassy-stm32/src/pac/stm32f429ni.rs
+++ b/embassy-stm32/src/pac/stm32f429ni.rs
@@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
217impl_spi!(SPI1, APB2);
218impl_spi_pin!(SPI1, SckPin, PA5, 5);
219impl_spi_pin!(SPI1, MisoPin, PA6, 5);
220impl_spi_pin!(SPI1, MosiPin, PA7, 5);
221impl_spi_pin!(SPI1, SckPin, PB3, 5);
222impl_spi_pin!(SPI1, MisoPin, PB4, 5);
223impl_spi_pin!(SPI1, MosiPin, PB5, 5);
224pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
225impl_spi!(SPI2, APB1);
226impl_spi_pin!(SPI2, SckPin, PB10, 5);
227impl_spi_pin!(SPI2, SckPin, PB13, 5);
228impl_spi_pin!(SPI2, MisoPin, PB14, 5);
229impl_spi_pin!(SPI2, MosiPin, PB15, 5);
230impl_spi_pin!(SPI2, MisoPin, PC2, 5);
231impl_spi_pin!(SPI2, MosiPin, PC3, 5);
232impl_spi_pin!(SPI2, SckPin, PD3, 5);
233impl_spi_pin!(SPI2, SckPin, PI1, 5);
234impl_spi_pin!(SPI2, MisoPin, PI2, 5);
235impl_spi_pin!(SPI2, MosiPin, PI3, 5);
236pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
237impl_spi!(SPI3, APB1);
238impl_spi_pin!(SPI3, SckPin, PB3, 6);
239impl_spi_pin!(SPI3, MisoPin, PB4, 6);
240impl_spi_pin!(SPI3, MosiPin, PB5, 6);
241impl_spi_pin!(SPI3, SckPin, PC10, 6);
242impl_spi_pin!(SPI3, MisoPin, PC11, 6);
243impl_spi_pin!(SPI3, MosiPin, PC12, 6);
244impl_spi_pin!(SPI3, MosiPin, PD6, 5);
245pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
246impl_spi!(SPI4, APB2);
247impl_spi_pin!(SPI4, SckPin, PE12, 5);
248impl_spi_pin!(SPI4, MisoPin, PE13, 5);
249impl_spi_pin!(SPI4, MosiPin, PE14, 5);
250impl_spi_pin!(SPI4, SckPin, PE2, 5);
251impl_spi_pin!(SPI4, MisoPin, PE5, 5);
252impl_spi_pin!(SPI4, MosiPin, PE6, 5);
253pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
254impl_spi!(SPI5, APB2);
255impl_spi_pin!(SPI5, MosiPin, PF11, 5);
256impl_spi_pin!(SPI5, SckPin, PF7, 5);
257impl_spi_pin!(SPI5, MisoPin, PF8, 5);
258impl_spi_pin!(SPI5, MosiPin, PF9, 5);
259impl_spi_pin!(SPI5, SckPin, PH6, 5);
260impl_spi_pin!(SPI5, MisoPin, PH7, 5);
261pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _);
262impl_spi!(SPI6, APB2);
263impl_spi_pin!(SPI6, MisoPin, PG12, 5);
264impl_spi_pin!(SPI6, SckPin, PG13, 5);
265impl_spi_pin!(SPI6, MosiPin, PG14, 5);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 266pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 267pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 268impl_usart!(USART1);
@@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma;
266pub use regs::exti_v1 as exti; 316pub use regs::exti_v1 as exti;
267pub use regs::gpio_v2 as gpio; 317pub use regs::gpio_v2 as gpio;
268pub use regs::rng_v1 as rng; 318pub use regs::rng_v1 as rng;
319pub use regs::spi_v1 as spi;
269pub use regs::syscfg_f4 as syscfg; 320pub use regs::syscfg_f4 as syscfg;
270pub use regs::usart_v1 as usart; 321pub use regs::usart_v1 as usart;
271mod regs; 322mod regs;
@@ -285,7 +336,7 @@ peripherals!(
285 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 336 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
286 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, 337 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
287 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, 338 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
288 PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 339 PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6
289); 340);
290 341
291pub mod interrupt { 342pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f429ve.rs b/embassy-stm32/src/pac/stm32f429ve.rs
index a1a3ab422..1d8b1c7c4 100644
--- a/embassy-stm32/src/pac/stm32f429ve.rs
+++ b/embassy-stm32/src/pac/stm32f429ve.rs
@@ -212,7 +212,44 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
217impl_spi!(SPI1, APB2);
218impl_spi_pin!(SPI1, SckPin, PA5, 5);
219impl_spi_pin!(SPI1, MisoPin, PA6, 5);
220impl_spi_pin!(SPI1, MosiPin, PA7, 5);
221impl_spi_pin!(SPI1, SckPin, PB3, 5);
222impl_spi_pin!(SPI1, MisoPin, PB4, 5);
223impl_spi_pin!(SPI1, MosiPin, PB5, 5);
224pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
225impl_spi!(SPI2, APB1);
226impl_spi_pin!(SPI2, SckPin, PB10, 5);
227impl_spi_pin!(SPI2, SckPin, PB13, 5);
228impl_spi_pin!(SPI2, MisoPin, PB14, 5);
229impl_spi_pin!(SPI2, MosiPin, PB15, 5);
230impl_spi_pin!(SPI2, MisoPin, PC2, 5);
231impl_spi_pin!(SPI2, MosiPin, PC3, 5);
232impl_spi_pin!(SPI2, SckPin, PD3, 5);
233impl_spi_pin!(SPI2, SckPin, PI1, 5);
234impl_spi_pin!(SPI2, MisoPin, PI2, 5);
235impl_spi_pin!(SPI2, MosiPin, PI3, 5);
236pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
237impl_spi!(SPI3, APB1);
238impl_spi_pin!(SPI3, SckPin, PB3, 6);
239impl_spi_pin!(SPI3, MisoPin, PB4, 6);
240impl_spi_pin!(SPI3, MosiPin, PB5, 6);
241impl_spi_pin!(SPI3, SckPin, PC10, 6);
242impl_spi_pin!(SPI3, MisoPin, PC11, 6);
243impl_spi_pin!(SPI3, MosiPin, PC12, 6);
244impl_spi_pin!(SPI3, MosiPin, PD6, 5);
245pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
246impl_spi!(SPI4, APB2);
247impl_spi_pin!(SPI4, SckPin, PE12, 5);
248impl_spi_pin!(SPI4, MisoPin, PE13, 5);
249impl_spi_pin!(SPI4, MosiPin, PE14, 5);
250impl_spi_pin!(SPI4, SckPin, PE2, 5);
251impl_spi_pin!(SPI4, MisoPin, PE5, 5);
252impl_spi_pin!(SPI4, MosiPin, PE6, 5);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 253pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 254pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 255impl_usart!(USART1);
@@ -266,6 +303,7 @@ pub use regs::dma_v2 as dma;
266pub use regs::exti_v1 as exti; 303pub use regs::exti_v1 as exti;
267pub use regs::gpio_v2 as gpio; 304pub use regs::gpio_v2 as gpio;
268pub use regs::rng_v1 as rng; 305pub use regs::rng_v1 as rng;
306pub use regs::spi_v1 as spi;
269pub use regs::syscfg_f4 as syscfg; 307pub use regs::syscfg_f4 as syscfg;
270pub use regs::usart_v1 as usart; 308pub use regs::usart_v1 as usart;
271mod regs; 309mod regs;
@@ -285,7 +323,7 @@ peripherals!(
285 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 323 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
286 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, 324 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
287 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, 325 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
288 PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 326 PK15, RNG, SPI1, SPI2, SPI3, SPI4, SYSCFG, USART1, USART2, USART3, USART6
289); 327);
290 328
291pub mod interrupt { 329pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f429vg.rs b/embassy-stm32/src/pac/stm32f429vg.rs
index a1a3ab422..1d8b1c7c4 100644
--- a/embassy-stm32/src/pac/stm32f429vg.rs
+++ b/embassy-stm32/src/pac/stm32f429vg.rs
@@ -212,7 +212,44 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
217impl_spi!(SPI1, APB2);
218impl_spi_pin!(SPI1, SckPin, PA5, 5);
219impl_spi_pin!(SPI1, MisoPin, PA6, 5);
220impl_spi_pin!(SPI1, MosiPin, PA7, 5);
221impl_spi_pin!(SPI1, SckPin, PB3, 5);
222impl_spi_pin!(SPI1, MisoPin, PB4, 5);
223impl_spi_pin!(SPI1, MosiPin, PB5, 5);
224pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
225impl_spi!(SPI2, APB1);
226impl_spi_pin!(SPI2, SckPin, PB10, 5);
227impl_spi_pin!(SPI2, SckPin, PB13, 5);
228impl_spi_pin!(SPI2, MisoPin, PB14, 5);
229impl_spi_pin!(SPI2, MosiPin, PB15, 5);
230impl_spi_pin!(SPI2, MisoPin, PC2, 5);
231impl_spi_pin!(SPI2, MosiPin, PC3, 5);
232impl_spi_pin!(SPI2, SckPin, PD3, 5);
233impl_spi_pin!(SPI2, SckPin, PI1, 5);
234impl_spi_pin!(SPI2, MisoPin, PI2, 5);
235impl_spi_pin!(SPI2, MosiPin, PI3, 5);
236pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
237impl_spi!(SPI3, APB1);
238impl_spi_pin!(SPI3, SckPin, PB3, 6);
239impl_spi_pin!(SPI3, MisoPin, PB4, 6);
240impl_spi_pin!(SPI3, MosiPin, PB5, 6);
241impl_spi_pin!(SPI3, SckPin, PC10, 6);
242impl_spi_pin!(SPI3, MisoPin, PC11, 6);
243impl_spi_pin!(SPI3, MosiPin, PC12, 6);
244impl_spi_pin!(SPI3, MosiPin, PD6, 5);
245pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
246impl_spi!(SPI4, APB2);
247impl_spi_pin!(SPI4, SckPin, PE12, 5);
248impl_spi_pin!(SPI4, MisoPin, PE13, 5);
249impl_spi_pin!(SPI4, MosiPin, PE14, 5);
250impl_spi_pin!(SPI4, SckPin, PE2, 5);
251impl_spi_pin!(SPI4, MisoPin, PE5, 5);
252impl_spi_pin!(SPI4, MosiPin, PE6, 5);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 253pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 254pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 255impl_usart!(USART1);
@@ -266,6 +303,7 @@ pub use regs::dma_v2 as dma;
266pub use regs::exti_v1 as exti; 303pub use regs::exti_v1 as exti;
267pub use regs::gpio_v2 as gpio; 304pub use regs::gpio_v2 as gpio;
268pub use regs::rng_v1 as rng; 305pub use regs::rng_v1 as rng;
306pub use regs::spi_v1 as spi;
269pub use regs::syscfg_f4 as syscfg; 307pub use regs::syscfg_f4 as syscfg;
270pub use regs::usart_v1 as usart; 308pub use regs::usart_v1 as usart;
271mod regs; 309mod regs;
@@ -285,7 +323,7 @@ peripherals!(
285 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 323 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
286 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, 324 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
287 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, 325 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
288 PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 326 PK15, RNG, SPI1, SPI2, SPI3, SPI4, SYSCFG, USART1, USART2, USART3, USART6
289); 327);
290 328
291pub mod interrupt { 329pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f429vi.rs b/embassy-stm32/src/pac/stm32f429vi.rs
index a1a3ab422..1d8b1c7c4 100644
--- a/embassy-stm32/src/pac/stm32f429vi.rs
+++ b/embassy-stm32/src/pac/stm32f429vi.rs
@@ -212,7 +212,44 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
217impl_spi!(SPI1, APB2);
218impl_spi_pin!(SPI1, SckPin, PA5, 5);
219impl_spi_pin!(SPI1, MisoPin, PA6, 5);
220impl_spi_pin!(SPI1, MosiPin, PA7, 5);
221impl_spi_pin!(SPI1, SckPin, PB3, 5);
222impl_spi_pin!(SPI1, MisoPin, PB4, 5);
223impl_spi_pin!(SPI1, MosiPin, PB5, 5);
224pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
225impl_spi!(SPI2, APB1);
226impl_spi_pin!(SPI2, SckPin, PB10, 5);
227impl_spi_pin!(SPI2, SckPin, PB13, 5);
228impl_spi_pin!(SPI2, MisoPin, PB14, 5);
229impl_spi_pin!(SPI2, MosiPin, PB15, 5);
230impl_spi_pin!(SPI2, MisoPin, PC2, 5);
231impl_spi_pin!(SPI2, MosiPin, PC3, 5);
232impl_spi_pin!(SPI2, SckPin, PD3, 5);
233impl_spi_pin!(SPI2, SckPin, PI1, 5);
234impl_spi_pin!(SPI2, MisoPin, PI2, 5);
235impl_spi_pin!(SPI2, MosiPin, PI3, 5);
236pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
237impl_spi!(SPI3, APB1);
238impl_spi_pin!(SPI3, SckPin, PB3, 6);
239impl_spi_pin!(SPI3, MisoPin, PB4, 6);
240impl_spi_pin!(SPI3, MosiPin, PB5, 6);
241impl_spi_pin!(SPI3, SckPin, PC10, 6);
242impl_spi_pin!(SPI3, MisoPin, PC11, 6);
243impl_spi_pin!(SPI3, MosiPin, PC12, 6);
244impl_spi_pin!(SPI3, MosiPin, PD6, 5);
245pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
246impl_spi!(SPI4, APB2);
247impl_spi_pin!(SPI4, SckPin, PE12, 5);
248impl_spi_pin!(SPI4, MisoPin, PE13, 5);
249impl_spi_pin!(SPI4, MosiPin, PE14, 5);
250impl_spi_pin!(SPI4, SckPin, PE2, 5);
251impl_spi_pin!(SPI4, MisoPin, PE5, 5);
252impl_spi_pin!(SPI4, MosiPin, PE6, 5);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 253pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 254pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 255impl_usart!(USART1);
@@ -266,6 +303,7 @@ pub use regs::dma_v2 as dma;
266pub use regs::exti_v1 as exti; 303pub use regs::exti_v1 as exti;
267pub use regs::gpio_v2 as gpio; 304pub use regs::gpio_v2 as gpio;
268pub use regs::rng_v1 as rng; 305pub use regs::rng_v1 as rng;
306pub use regs::spi_v1 as spi;
269pub use regs::syscfg_f4 as syscfg; 307pub use regs::syscfg_f4 as syscfg;
270pub use regs::usart_v1 as usart; 308pub use regs::usart_v1 as usart;
271mod regs; 309mod regs;
@@ -285,7 +323,7 @@ peripherals!(
285 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 323 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
286 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, 324 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
287 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, 325 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
288 PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 326 PK15, RNG, SPI1, SPI2, SPI3, SPI4, SYSCFG, USART1, USART2, USART3, USART6
289); 327);
290 328
291pub mod interrupt { 329pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f429ze.rs b/embassy-stm32/src/pac/stm32f429ze.rs
index a1a3ab422..656c87e07 100644
--- a/embassy-stm32/src/pac/stm32f429ze.rs
+++ b/embassy-stm32/src/pac/stm32f429ze.rs
@@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
217impl_spi!(SPI1, APB2);
218impl_spi_pin!(SPI1, SckPin, PA5, 5);
219impl_spi_pin!(SPI1, MisoPin, PA6, 5);
220impl_spi_pin!(SPI1, MosiPin, PA7, 5);
221impl_spi_pin!(SPI1, SckPin, PB3, 5);
222impl_spi_pin!(SPI1, MisoPin, PB4, 5);
223impl_spi_pin!(SPI1, MosiPin, PB5, 5);
224pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
225impl_spi!(SPI2, APB1);
226impl_spi_pin!(SPI2, SckPin, PB10, 5);
227impl_spi_pin!(SPI2, SckPin, PB13, 5);
228impl_spi_pin!(SPI2, MisoPin, PB14, 5);
229impl_spi_pin!(SPI2, MosiPin, PB15, 5);
230impl_spi_pin!(SPI2, MisoPin, PC2, 5);
231impl_spi_pin!(SPI2, MosiPin, PC3, 5);
232impl_spi_pin!(SPI2, SckPin, PD3, 5);
233impl_spi_pin!(SPI2, SckPin, PI1, 5);
234impl_spi_pin!(SPI2, MisoPin, PI2, 5);
235impl_spi_pin!(SPI2, MosiPin, PI3, 5);
236pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
237impl_spi!(SPI3, APB1);
238impl_spi_pin!(SPI3, SckPin, PB3, 6);
239impl_spi_pin!(SPI3, MisoPin, PB4, 6);
240impl_spi_pin!(SPI3, MosiPin, PB5, 6);
241impl_spi_pin!(SPI3, SckPin, PC10, 6);
242impl_spi_pin!(SPI3, MisoPin, PC11, 6);
243impl_spi_pin!(SPI3, MosiPin, PC12, 6);
244impl_spi_pin!(SPI3, MosiPin, PD6, 5);
245pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
246impl_spi!(SPI4, APB2);
247impl_spi_pin!(SPI4, SckPin, PE12, 5);
248impl_spi_pin!(SPI4, MisoPin, PE13, 5);
249impl_spi_pin!(SPI4, MosiPin, PE14, 5);
250impl_spi_pin!(SPI4, SckPin, PE2, 5);
251impl_spi_pin!(SPI4, MisoPin, PE5, 5);
252impl_spi_pin!(SPI4, MosiPin, PE6, 5);
253pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
254impl_spi!(SPI5, APB2);
255impl_spi_pin!(SPI5, MosiPin, PF11, 5);
256impl_spi_pin!(SPI5, SckPin, PF7, 5);
257impl_spi_pin!(SPI5, MisoPin, PF8, 5);
258impl_spi_pin!(SPI5, MosiPin, PF9, 5);
259impl_spi_pin!(SPI5, SckPin, PH6, 5);
260impl_spi_pin!(SPI5, MisoPin, PH7, 5);
261pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _);
262impl_spi!(SPI6, APB2);
263impl_spi_pin!(SPI6, MisoPin, PG12, 5);
264impl_spi_pin!(SPI6, SckPin, PG13, 5);
265impl_spi_pin!(SPI6, MosiPin, PG14, 5);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 266pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 267pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 268impl_usart!(USART1);
@@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma;
266pub use regs::exti_v1 as exti; 316pub use regs::exti_v1 as exti;
267pub use regs::gpio_v2 as gpio; 317pub use regs::gpio_v2 as gpio;
268pub use regs::rng_v1 as rng; 318pub use regs::rng_v1 as rng;
319pub use regs::spi_v1 as spi;
269pub use regs::syscfg_f4 as syscfg; 320pub use regs::syscfg_f4 as syscfg;
270pub use regs::usart_v1 as usart; 321pub use regs::usart_v1 as usart;
271mod regs; 322mod regs;
@@ -285,7 +336,7 @@ peripherals!(
285 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 336 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
286 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, 337 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
287 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, 338 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
288 PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 339 PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6
289); 340);
290 341
291pub mod interrupt { 342pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f429zg.rs b/embassy-stm32/src/pac/stm32f429zg.rs
index a1a3ab422..656c87e07 100644
--- a/embassy-stm32/src/pac/stm32f429zg.rs
+++ b/embassy-stm32/src/pac/stm32f429zg.rs
@@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
217impl_spi!(SPI1, APB2);
218impl_spi_pin!(SPI1, SckPin, PA5, 5);
219impl_spi_pin!(SPI1, MisoPin, PA6, 5);
220impl_spi_pin!(SPI1, MosiPin, PA7, 5);
221impl_spi_pin!(SPI1, SckPin, PB3, 5);
222impl_spi_pin!(SPI1, MisoPin, PB4, 5);
223impl_spi_pin!(SPI1, MosiPin, PB5, 5);
224pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
225impl_spi!(SPI2, APB1);
226impl_spi_pin!(SPI2, SckPin, PB10, 5);
227impl_spi_pin!(SPI2, SckPin, PB13, 5);
228impl_spi_pin!(SPI2, MisoPin, PB14, 5);
229impl_spi_pin!(SPI2, MosiPin, PB15, 5);
230impl_spi_pin!(SPI2, MisoPin, PC2, 5);
231impl_spi_pin!(SPI2, MosiPin, PC3, 5);
232impl_spi_pin!(SPI2, SckPin, PD3, 5);
233impl_spi_pin!(SPI2, SckPin, PI1, 5);
234impl_spi_pin!(SPI2, MisoPin, PI2, 5);
235impl_spi_pin!(SPI2, MosiPin, PI3, 5);
236pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
237impl_spi!(SPI3, APB1);
238impl_spi_pin!(SPI3, SckPin, PB3, 6);
239impl_spi_pin!(SPI3, MisoPin, PB4, 6);
240impl_spi_pin!(SPI3, MosiPin, PB5, 6);
241impl_spi_pin!(SPI3, SckPin, PC10, 6);
242impl_spi_pin!(SPI3, MisoPin, PC11, 6);
243impl_spi_pin!(SPI3, MosiPin, PC12, 6);
244impl_spi_pin!(SPI3, MosiPin, PD6, 5);
245pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
246impl_spi!(SPI4, APB2);
247impl_spi_pin!(SPI4, SckPin, PE12, 5);
248impl_spi_pin!(SPI4, MisoPin, PE13, 5);
249impl_spi_pin!(SPI4, MosiPin, PE14, 5);
250impl_spi_pin!(SPI4, SckPin, PE2, 5);
251impl_spi_pin!(SPI4, MisoPin, PE5, 5);
252impl_spi_pin!(SPI4, MosiPin, PE6, 5);
253pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
254impl_spi!(SPI5, APB2);
255impl_spi_pin!(SPI5, MosiPin, PF11, 5);
256impl_spi_pin!(SPI5, SckPin, PF7, 5);
257impl_spi_pin!(SPI5, MisoPin, PF8, 5);
258impl_spi_pin!(SPI5, MosiPin, PF9, 5);
259impl_spi_pin!(SPI5, SckPin, PH6, 5);
260impl_spi_pin!(SPI5, MisoPin, PH7, 5);
261pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _);
262impl_spi!(SPI6, APB2);
263impl_spi_pin!(SPI6, MisoPin, PG12, 5);
264impl_spi_pin!(SPI6, SckPin, PG13, 5);
265impl_spi_pin!(SPI6, MosiPin, PG14, 5);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 266pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 267pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 268impl_usart!(USART1);
@@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma;
266pub use regs::exti_v1 as exti; 316pub use regs::exti_v1 as exti;
267pub use regs::gpio_v2 as gpio; 317pub use regs::gpio_v2 as gpio;
268pub use regs::rng_v1 as rng; 318pub use regs::rng_v1 as rng;
319pub use regs::spi_v1 as spi;
269pub use regs::syscfg_f4 as syscfg; 320pub use regs::syscfg_f4 as syscfg;
270pub use regs::usart_v1 as usart; 321pub use regs::usart_v1 as usart;
271mod regs; 322mod regs;
@@ -285,7 +336,7 @@ peripherals!(
285 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 336 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
286 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, 337 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
287 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, 338 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
288 PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 339 PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6
289); 340);
290 341
291pub mod interrupt { 342pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f429zi.rs b/embassy-stm32/src/pac/stm32f429zi.rs
index a1a3ab422..656c87e07 100644
--- a/embassy-stm32/src/pac/stm32f429zi.rs
+++ b/embassy-stm32/src/pac/stm32f429zi.rs
@@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
217impl_spi!(SPI1, APB2);
218impl_spi_pin!(SPI1, SckPin, PA5, 5);
219impl_spi_pin!(SPI1, MisoPin, PA6, 5);
220impl_spi_pin!(SPI1, MosiPin, PA7, 5);
221impl_spi_pin!(SPI1, SckPin, PB3, 5);
222impl_spi_pin!(SPI1, MisoPin, PB4, 5);
223impl_spi_pin!(SPI1, MosiPin, PB5, 5);
224pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
225impl_spi!(SPI2, APB1);
226impl_spi_pin!(SPI2, SckPin, PB10, 5);
227impl_spi_pin!(SPI2, SckPin, PB13, 5);
228impl_spi_pin!(SPI2, MisoPin, PB14, 5);
229impl_spi_pin!(SPI2, MosiPin, PB15, 5);
230impl_spi_pin!(SPI2, MisoPin, PC2, 5);
231impl_spi_pin!(SPI2, MosiPin, PC3, 5);
232impl_spi_pin!(SPI2, SckPin, PD3, 5);
233impl_spi_pin!(SPI2, SckPin, PI1, 5);
234impl_spi_pin!(SPI2, MisoPin, PI2, 5);
235impl_spi_pin!(SPI2, MosiPin, PI3, 5);
236pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
237impl_spi!(SPI3, APB1);
238impl_spi_pin!(SPI3, SckPin, PB3, 6);
239impl_spi_pin!(SPI3, MisoPin, PB4, 6);
240impl_spi_pin!(SPI3, MosiPin, PB5, 6);
241impl_spi_pin!(SPI3, SckPin, PC10, 6);
242impl_spi_pin!(SPI3, MisoPin, PC11, 6);
243impl_spi_pin!(SPI3, MosiPin, PC12, 6);
244impl_spi_pin!(SPI3, MosiPin, PD6, 5);
245pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
246impl_spi!(SPI4, APB2);
247impl_spi_pin!(SPI4, SckPin, PE12, 5);
248impl_spi_pin!(SPI4, MisoPin, PE13, 5);
249impl_spi_pin!(SPI4, MosiPin, PE14, 5);
250impl_spi_pin!(SPI4, SckPin, PE2, 5);
251impl_spi_pin!(SPI4, MisoPin, PE5, 5);
252impl_spi_pin!(SPI4, MosiPin, PE6, 5);
253pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
254impl_spi!(SPI5, APB2);
255impl_spi_pin!(SPI5, MosiPin, PF11, 5);
256impl_spi_pin!(SPI5, SckPin, PF7, 5);
257impl_spi_pin!(SPI5, MisoPin, PF8, 5);
258impl_spi_pin!(SPI5, MosiPin, PF9, 5);
259impl_spi_pin!(SPI5, SckPin, PH6, 5);
260impl_spi_pin!(SPI5, MisoPin, PH7, 5);
261pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _);
262impl_spi!(SPI6, APB2);
263impl_spi_pin!(SPI6, MisoPin, PG12, 5);
264impl_spi_pin!(SPI6, SckPin, PG13, 5);
265impl_spi_pin!(SPI6, MosiPin, PG14, 5);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 266pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 267pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 268impl_usart!(USART1);
@@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma;
266pub use regs::exti_v1 as exti; 316pub use regs::exti_v1 as exti;
267pub use regs::gpio_v2 as gpio; 317pub use regs::gpio_v2 as gpio;
268pub use regs::rng_v1 as rng; 318pub use regs::rng_v1 as rng;
319pub use regs::spi_v1 as spi;
269pub use regs::syscfg_f4 as syscfg; 320pub use regs::syscfg_f4 as syscfg;
270pub use regs::usart_v1 as usart; 321pub use regs::usart_v1 as usart;
271mod regs; 322mod regs;
@@ -285,7 +336,7 @@ peripherals!(
285 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 336 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
286 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, 337 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
287 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, 338 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
288 PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 339 PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6
289); 340);
290 341
291pub mod interrupt { 342pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f437ai.rs b/embassy-stm32/src/pac/stm32f437ai.rs
index 3c30eec9a..6d5351b44 100644
--- a/embassy-stm32/src/pac/stm32f437ai.rs
+++ b/embassy-stm32/src/pac/stm32f437ai.rs
@@ -212,7 +212,52 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
217impl_spi!(SPI1, APB2);
218impl_spi_pin!(SPI1, SckPin, PA5, 5);
219impl_spi_pin!(SPI1, MisoPin, PA6, 5);
220impl_spi_pin!(SPI1, MosiPin, PA7, 5);
221impl_spi_pin!(SPI1, SckPin, PB3, 5);
222impl_spi_pin!(SPI1, MisoPin, PB4, 5);
223impl_spi_pin!(SPI1, MosiPin, PB5, 5);
224pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
225impl_spi!(SPI2, APB1);
226impl_spi_pin!(SPI2, SckPin, PB10, 5);
227impl_spi_pin!(SPI2, SckPin, PB13, 5);
228impl_spi_pin!(SPI2, MisoPin, PB14, 5);
229impl_spi_pin!(SPI2, MosiPin, PB15, 5);
230impl_spi_pin!(SPI2, MisoPin, PC2, 5);
231impl_spi_pin!(SPI2, MosiPin, PC3, 5);
232impl_spi_pin!(SPI2, SckPin, PD3, 5);
233impl_spi_pin!(SPI2, SckPin, PI1, 5);
234impl_spi_pin!(SPI2, MisoPin, PI2, 5);
235impl_spi_pin!(SPI2, MosiPin, PI3, 5);
236pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
237impl_spi!(SPI3, APB1);
238impl_spi_pin!(SPI3, SckPin, PB3, 6);
239impl_spi_pin!(SPI3, MisoPin, PB4, 6);
240impl_spi_pin!(SPI3, MosiPin, PB5, 6);
241impl_spi_pin!(SPI3, SckPin, PC10, 6);
242impl_spi_pin!(SPI3, MisoPin, PC11, 6);
243impl_spi_pin!(SPI3, MosiPin, PC12, 6);
244impl_spi_pin!(SPI3, MosiPin, PD6, 5);
245pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
246impl_spi!(SPI4, APB2);
247impl_spi_pin!(SPI4, SckPin, PE12, 5);
248impl_spi_pin!(SPI4, MisoPin, PE13, 5);
249impl_spi_pin!(SPI4, MosiPin, PE14, 5);
250impl_spi_pin!(SPI4, SckPin, PE2, 5);
251impl_spi_pin!(SPI4, MisoPin, PE5, 5);
252impl_spi_pin!(SPI4, MosiPin, PE6, 5);
253pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
254impl_spi!(SPI5, APB2);
255impl_spi_pin!(SPI5, MosiPin, PF11, 5);
256impl_spi_pin!(SPI5, SckPin, PF7, 5);
257impl_spi_pin!(SPI5, MisoPin, PF8, 5);
258impl_spi_pin!(SPI5, MosiPin, PF9, 5);
259impl_spi_pin!(SPI5, SckPin, PH6, 5);
260impl_spi_pin!(SPI5, MisoPin, PH7, 5);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 261pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 262pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 263impl_usart!(USART1);
@@ -266,6 +311,7 @@ pub use regs::dma_v2 as dma;
266pub use regs::exti_v1 as exti; 311pub use regs::exti_v1 as exti;
267pub use regs::gpio_v2 as gpio; 312pub use regs::gpio_v2 as gpio;
268pub use regs::rng_v1 as rng; 313pub use regs::rng_v1 as rng;
314pub use regs::spi_v1 as spi;
269pub use regs::syscfg_f4 as syscfg; 315pub use regs::syscfg_f4 as syscfg;
270pub use regs::usart_v1 as usart; 316pub use regs::usart_v1 as usart;
271mod regs; 317mod regs;
@@ -285,7 +331,7 @@ peripherals!(
285 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 331 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
286 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, 332 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
287 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, 333 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
288 PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 334 PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART3, USART6
289); 335);
290 336
291pub mod interrupt { 337pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f437ig.rs b/embassy-stm32/src/pac/stm32f437ig.rs
index 3c30eec9a..8bdfb2d0d 100644
--- a/embassy-stm32/src/pac/stm32f437ig.rs
+++ b/embassy-stm32/src/pac/stm32f437ig.rs
@@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
217impl_spi!(SPI1, APB2);
218impl_spi_pin!(SPI1, SckPin, PA5, 5);
219impl_spi_pin!(SPI1, MisoPin, PA6, 5);
220impl_spi_pin!(SPI1, MosiPin, PA7, 5);
221impl_spi_pin!(SPI1, SckPin, PB3, 5);
222impl_spi_pin!(SPI1, MisoPin, PB4, 5);
223impl_spi_pin!(SPI1, MosiPin, PB5, 5);
224pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
225impl_spi!(SPI2, APB1);
226impl_spi_pin!(SPI2, SckPin, PB10, 5);
227impl_spi_pin!(SPI2, SckPin, PB13, 5);
228impl_spi_pin!(SPI2, MisoPin, PB14, 5);
229impl_spi_pin!(SPI2, MosiPin, PB15, 5);
230impl_spi_pin!(SPI2, MisoPin, PC2, 5);
231impl_spi_pin!(SPI2, MosiPin, PC3, 5);
232impl_spi_pin!(SPI2, SckPin, PD3, 5);
233impl_spi_pin!(SPI2, SckPin, PI1, 5);
234impl_spi_pin!(SPI2, MisoPin, PI2, 5);
235impl_spi_pin!(SPI2, MosiPin, PI3, 5);
236pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
237impl_spi!(SPI3, APB1);
238impl_spi_pin!(SPI3, SckPin, PB3, 6);
239impl_spi_pin!(SPI3, MisoPin, PB4, 6);
240impl_spi_pin!(SPI3, MosiPin, PB5, 6);
241impl_spi_pin!(SPI3, SckPin, PC10, 6);
242impl_spi_pin!(SPI3, MisoPin, PC11, 6);
243impl_spi_pin!(SPI3, MosiPin, PC12, 6);
244impl_spi_pin!(SPI3, MosiPin, PD6, 5);
245pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
246impl_spi!(SPI4, APB2);
247impl_spi_pin!(SPI4, SckPin, PE12, 5);
248impl_spi_pin!(SPI4, MisoPin, PE13, 5);
249impl_spi_pin!(SPI4, MosiPin, PE14, 5);
250impl_spi_pin!(SPI4, SckPin, PE2, 5);
251impl_spi_pin!(SPI4, MisoPin, PE5, 5);
252impl_spi_pin!(SPI4, MosiPin, PE6, 5);
253pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
254impl_spi!(SPI5, APB2);
255impl_spi_pin!(SPI5, MosiPin, PF11, 5);
256impl_spi_pin!(SPI5, SckPin, PF7, 5);
257impl_spi_pin!(SPI5, MisoPin, PF8, 5);
258impl_spi_pin!(SPI5, MosiPin, PF9, 5);
259impl_spi_pin!(SPI5, SckPin, PH6, 5);
260impl_spi_pin!(SPI5, MisoPin, PH7, 5);
261pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _);
262impl_spi!(SPI6, APB2);
263impl_spi_pin!(SPI6, MisoPin, PG12, 5);
264impl_spi_pin!(SPI6, SckPin, PG13, 5);
265impl_spi_pin!(SPI6, MosiPin, PG14, 5);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 266pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 267pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 268impl_usart!(USART1);
@@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma;
266pub use regs::exti_v1 as exti; 316pub use regs::exti_v1 as exti;
267pub use regs::gpio_v2 as gpio; 317pub use regs::gpio_v2 as gpio;
268pub use regs::rng_v1 as rng; 318pub use regs::rng_v1 as rng;
319pub use regs::spi_v1 as spi;
269pub use regs::syscfg_f4 as syscfg; 320pub use regs::syscfg_f4 as syscfg;
270pub use regs::usart_v1 as usart; 321pub use regs::usart_v1 as usart;
271mod regs; 322mod regs;
@@ -285,7 +336,7 @@ peripherals!(
285 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 336 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
286 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, 337 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
287 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, 338 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
288 PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 339 PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6
289); 340);
290 341
291pub mod interrupt { 342pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f437ii.rs b/embassy-stm32/src/pac/stm32f437ii.rs
index 3c30eec9a..8bdfb2d0d 100644
--- a/embassy-stm32/src/pac/stm32f437ii.rs
+++ b/embassy-stm32/src/pac/stm32f437ii.rs
@@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
217impl_spi!(SPI1, APB2);
218impl_spi_pin!(SPI1, SckPin, PA5, 5);
219impl_spi_pin!(SPI1, MisoPin, PA6, 5);
220impl_spi_pin!(SPI1, MosiPin, PA7, 5);
221impl_spi_pin!(SPI1, SckPin, PB3, 5);
222impl_spi_pin!(SPI1, MisoPin, PB4, 5);
223impl_spi_pin!(SPI1, MosiPin, PB5, 5);
224pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
225impl_spi!(SPI2, APB1);
226impl_spi_pin!(SPI2, SckPin, PB10, 5);
227impl_spi_pin!(SPI2, SckPin, PB13, 5);
228impl_spi_pin!(SPI2, MisoPin, PB14, 5);
229impl_spi_pin!(SPI2, MosiPin, PB15, 5);
230impl_spi_pin!(SPI2, MisoPin, PC2, 5);
231impl_spi_pin!(SPI2, MosiPin, PC3, 5);
232impl_spi_pin!(SPI2, SckPin, PD3, 5);
233impl_spi_pin!(SPI2, SckPin, PI1, 5);
234impl_spi_pin!(SPI2, MisoPin, PI2, 5);
235impl_spi_pin!(SPI2, MosiPin, PI3, 5);
236pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
237impl_spi!(SPI3, APB1);
238impl_spi_pin!(SPI3, SckPin, PB3, 6);
239impl_spi_pin!(SPI3, MisoPin, PB4, 6);
240impl_spi_pin!(SPI3, MosiPin, PB5, 6);
241impl_spi_pin!(SPI3, SckPin, PC10, 6);
242impl_spi_pin!(SPI3, MisoPin, PC11, 6);
243impl_spi_pin!(SPI3, MosiPin, PC12, 6);
244impl_spi_pin!(SPI3, MosiPin, PD6, 5);
245pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
246impl_spi!(SPI4, APB2);
247impl_spi_pin!(SPI4, SckPin, PE12, 5);
248impl_spi_pin!(SPI4, MisoPin, PE13, 5);
249impl_spi_pin!(SPI4, MosiPin, PE14, 5);
250impl_spi_pin!(SPI4, SckPin, PE2, 5);
251impl_spi_pin!(SPI4, MisoPin, PE5, 5);
252impl_spi_pin!(SPI4, MosiPin, PE6, 5);
253pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
254impl_spi!(SPI5, APB2);
255impl_spi_pin!(SPI5, MosiPin, PF11, 5);
256impl_spi_pin!(SPI5, SckPin, PF7, 5);
257impl_spi_pin!(SPI5, MisoPin, PF8, 5);
258impl_spi_pin!(SPI5, MosiPin, PF9, 5);
259impl_spi_pin!(SPI5, SckPin, PH6, 5);
260impl_spi_pin!(SPI5, MisoPin, PH7, 5);
261pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _);
262impl_spi!(SPI6, APB2);
263impl_spi_pin!(SPI6, MisoPin, PG12, 5);
264impl_spi_pin!(SPI6, SckPin, PG13, 5);
265impl_spi_pin!(SPI6, MosiPin, PG14, 5);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 266pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 267pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 268impl_usart!(USART1);
@@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma;
266pub use regs::exti_v1 as exti; 316pub use regs::exti_v1 as exti;
267pub use regs::gpio_v2 as gpio; 317pub use regs::gpio_v2 as gpio;
268pub use regs::rng_v1 as rng; 318pub use regs::rng_v1 as rng;
319pub use regs::spi_v1 as spi;
269pub use regs::syscfg_f4 as syscfg; 320pub use regs::syscfg_f4 as syscfg;
270pub use regs::usart_v1 as usart; 321pub use regs::usart_v1 as usart;
271mod regs; 322mod regs;
@@ -285,7 +336,7 @@ peripherals!(
285 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 336 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
286 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, 337 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
287 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, 338 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
288 PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 339 PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6
289); 340);
290 341
291pub mod interrupt { 342pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f437vg.rs b/embassy-stm32/src/pac/stm32f437vg.rs
index 3c30eec9a..f3d6048db 100644
--- a/embassy-stm32/src/pac/stm32f437vg.rs
+++ b/embassy-stm32/src/pac/stm32f437vg.rs
@@ -212,7 +212,44 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
217impl_spi!(SPI1, APB2);
218impl_spi_pin!(SPI1, SckPin, PA5, 5);
219impl_spi_pin!(SPI1, MisoPin, PA6, 5);
220impl_spi_pin!(SPI1, MosiPin, PA7, 5);
221impl_spi_pin!(SPI1, SckPin, PB3, 5);
222impl_spi_pin!(SPI1, MisoPin, PB4, 5);
223impl_spi_pin!(SPI1, MosiPin, PB5, 5);
224pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
225impl_spi!(SPI2, APB1);
226impl_spi_pin!(SPI2, SckPin, PB10, 5);
227impl_spi_pin!(SPI2, SckPin, PB13, 5);
228impl_spi_pin!(SPI2, MisoPin, PB14, 5);
229impl_spi_pin!(SPI2, MosiPin, PB15, 5);
230impl_spi_pin!(SPI2, MisoPin, PC2, 5);
231impl_spi_pin!(SPI2, MosiPin, PC3, 5);
232impl_spi_pin!(SPI2, SckPin, PD3, 5);
233impl_spi_pin!(SPI2, SckPin, PI1, 5);
234impl_spi_pin!(SPI2, MisoPin, PI2, 5);
235impl_spi_pin!(SPI2, MosiPin, PI3, 5);
236pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
237impl_spi!(SPI3, APB1);
238impl_spi_pin!(SPI3, SckPin, PB3, 6);
239impl_spi_pin!(SPI3, MisoPin, PB4, 6);
240impl_spi_pin!(SPI3, MosiPin, PB5, 6);
241impl_spi_pin!(SPI3, SckPin, PC10, 6);
242impl_spi_pin!(SPI3, MisoPin, PC11, 6);
243impl_spi_pin!(SPI3, MosiPin, PC12, 6);
244impl_spi_pin!(SPI3, MosiPin, PD6, 5);
245pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
246impl_spi!(SPI4, APB2);
247impl_spi_pin!(SPI4, SckPin, PE12, 5);
248impl_spi_pin!(SPI4, MisoPin, PE13, 5);
249impl_spi_pin!(SPI4, MosiPin, PE14, 5);
250impl_spi_pin!(SPI4, SckPin, PE2, 5);
251impl_spi_pin!(SPI4, MisoPin, PE5, 5);
252impl_spi_pin!(SPI4, MosiPin, PE6, 5);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 253pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 254pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 255impl_usart!(USART1);
@@ -266,6 +303,7 @@ pub use regs::dma_v2 as dma;
266pub use regs::exti_v1 as exti; 303pub use regs::exti_v1 as exti;
267pub use regs::gpio_v2 as gpio; 304pub use regs::gpio_v2 as gpio;
268pub use regs::rng_v1 as rng; 305pub use regs::rng_v1 as rng;
306pub use regs::spi_v1 as spi;
269pub use regs::syscfg_f4 as syscfg; 307pub use regs::syscfg_f4 as syscfg;
270pub use regs::usart_v1 as usart; 308pub use regs::usart_v1 as usart;
271mod regs; 309mod regs;
@@ -285,7 +323,7 @@ peripherals!(
285 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 323 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
286 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, 324 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
287 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, 325 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
288 PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 326 PK15, RNG, SPI1, SPI2, SPI3, SPI4, SYSCFG, USART1, USART2, USART3, USART6
289); 327);
290 328
291pub mod interrupt { 329pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f437vi.rs b/embassy-stm32/src/pac/stm32f437vi.rs
index 3c30eec9a..f3d6048db 100644
--- a/embassy-stm32/src/pac/stm32f437vi.rs
+++ b/embassy-stm32/src/pac/stm32f437vi.rs
@@ -212,7 +212,44 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
217impl_spi!(SPI1, APB2);
218impl_spi_pin!(SPI1, SckPin, PA5, 5);
219impl_spi_pin!(SPI1, MisoPin, PA6, 5);
220impl_spi_pin!(SPI1, MosiPin, PA7, 5);
221impl_spi_pin!(SPI1, SckPin, PB3, 5);
222impl_spi_pin!(SPI1, MisoPin, PB4, 5);
223impl_spi_pin!(SPI1, MosiPin, PB5, 5);
224pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
225impl_spi!(SPI2, APB1);
226impl_spi_pin!(SPI2, SckPin, PB10, 5);
227impl_spi_pin!(SPI2, SckPin, PB13, 5);
228impl_spi_pin!(SPI2, MisoPin, PB14, 5);
229impl_spi_pin!(SPI2, MosiPin, PB15, 5);
230impl_spi_pin!(SPI2, MisoPin, PC2, 5);
231impl_spi_pin!(SPI2, MosiPin, PC3, 5);
232impl_spi_pin!(SPI2, SckPin, PD3, 5);
233impl_spi_pin!(SPI2, SckPin, PI1, 5);
234impl_spi_pin!(SPI2, MisoPin, PI2, 5);
235impl_spi_pin!(SPI2, MosiPin, PI3, 5);
236pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
237impl_spi!(SPI3, APB1);
238impl_spi_pin!(SPI3, SckPin, PB3, 6);
239impl_spi_pin!(SPI3, MisoPin, PB4, 6);
240impl_spi_pin!(SPI3, MosiPin, PB5, 6);
241impl_spi_pin!(SPI3, SckPin, PC10, 6);
242impl_spi_pin!(SPI3, MisoPin, PC11, 6);
243impl_spi_pin!(SPI3, MosiPin, PC12, 6);
244impl_spi_pin!(SPI3, MosiPin, PD6, 5);
245pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
246impl_spi!(SPI4, APB2);
247impl_spi_pin!(SPI4, SckPin, PE12, 5);
248impl_spi_pin!(SPI4, MisoPin, PE13, 5);
249impl_spi_pin!(SPI4, MosiPin, PE14, 5);
250impl_spi_pin!(SPI4, SckPin, PE2, 5);
251impl_spi_pin!(SPI4, MisoPin, PE5, 5);
252impl_spi_pin!(SPI4, MosiPin, PE6, 5);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 253pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 254pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 255impl_usart!(USART1);
@@ -266,6 +303,7 @@ pub use regs::dma_v2 as dma;
266pub use regs::exti_v1 as exti; 303pub use regs::exti_v1 as exti;
267pub use regs::gpio_v2 as gpio; 304pub use regs::gpio_v2 as gpio;
268pub use regs::rng_v1 as rng; 305pub use regs::rng_v1 as rng;
306pub use regs::spi_v1 as spi;
269pub use regs::syscfg_f4 as syscfg; 307pub use regs::syscfg_f4 as syscfg;
270pub use regs::usart_v1 as usart; 308pub use regs::usart_v1 as usart;
271mod regs; 309mod regs;
@@ -285,7 +323,7 @@ peripherals!(
285 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 323 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
286 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, 324 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
287 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, 325 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
288 PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 326 PK15, RNG, SPI1, SPI2, SPI3, SPI4, SYSCFG, USART1, USART2, USART3, USART6
289); 327);
290 328
291pub mod interrupt { 329pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f437zg.rs b/embassy-stm32/src/pac/stm32f437zg.rs
index 3c30eec9a..8bdfb2d0d 100644
--- a/embassy-stm32/src/pac/stm32f437zg.rs
+++ b/embassy-stm32/src/pac/stm32f437zg.rs
@@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
217impl_spi!(SPI1, APB2);
218impl_spi_pin!(SPI1, SckPin, PA5, 5);
219impl_spi_pin!(SPI1, MisoPin, PA6, 5);
220impl_spi_pin!(SPI1, MosiPin, PA7, 5);
221impl_spi_pin!(SPI1, SckPin, PB3, 5);
222impl_spi_pin!(SPI1, MisoPin, PB4, 5);
223impl_spi_pin!(SPI1, MosiPin, PB5, 5);
224pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
225impl_spi!(SPI2, APB1);
226impl_spi_pin!(SPI2, SckPin, PB10, 5);
227impl_spi_pin!(SPI2, SckPin, PB13, 5);
228impl_spi_pin!(SPI2, MisoPin, PB14, 5);
229impl_spi_pin!(SPI2, MosiPin, PB15, 5);
230impl_spi_pin!(SPI2, MisoPin, PC2, 5);
231impl_spi_pin!(SPI2, MosiPin, PC3, 5);
232impl_spi_pin!(SPI2, SckPin, PD3, 5);
233impl_spi_pin!(SPI2, SckPin, PI1, 5);
234impl_spi_pin!(SPI2, MisoPin, PI2, 5);
235impl_spi_pin!(SPI2, MosiPin, PI3, 5);
236pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
237impl_spi!(SPI3, APB1);
238impl_spi_pin!(SPI3, SckPin, PB3, 6);
239impl_spi_pin!(SPI3, MisoPin, PB4, 6);
240impl_spi_pin!(SPI3, MosiPin, PB5, 6);
241impl_spi_pin!(SPI3, SckPin, PC10, 6);
242impl_spi_pin!(SPI3, MisoPin, PC11, 6);
243impl_spi_pin!(SPI3, MosiPin, PC12, 6);
244impl_spi_pin!(SPI3, MosiPin, PD6, 5);
245pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
246impl_spi!(SPI4, APB2);
247impl_spi_pin!(SPI4, SckPin, PE12, 5);
248impl_spi_pin!(SPI4, MisoPin, PE13, 5);
249impl_spi_pin!(SPI4, MosiPin, PE14, 5);
250impl_spi_pin!(SPI4, SckPin, PE2, 5);
251impl_spi_pin!(SPI4, MisoPin, PE5, 5);
252impl_spi_pin!(SPI4, MosiPin, PE6, 5);
253pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
254impl_spi!(SPI5, APB2);
255impl_spi_pin!(SPI5, MosiPin, PF11, 5);
256impl_spi_pin!(SPI5, SckPin, PF7, 5);
257impl_spi_pin!(SPI5, MisoPin, PF8, 5);
258impl_spi_pin!(SPI5, MosiPin, PF9, 5);
259impl_spi_pin!(SPI5, SckPin, PH6, 5);
260impl_spi_pin!(SPI5, MisoPin, PH7, 5);
261pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _);
262impl_spi!(SPI6, APB2);
263impl_spi_pin!(SPI6, MisoPin, PG12, 5);
264impl_spi_pin!(SPI6, SckPin, PG13, 5);
265impl_spi_pin!(SPI6, MosiPin, PG14, 5);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 266pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 267pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 268impl_usart!(USART1);
@@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma;
266pub use regs::exti_v1 as exti; 316pub use regs::exti_v1 as exti;
267pub use regs::gpio_v2 as gpio; 317pub use regs::gpio_v2 as gpio;
268pub use regs::rng_v1 as rng; 318pub use regs::rng_v1 as rng;
319pub use regs::spi_v1 as spi;
269pub use regs::syscfg_f4 as syscfg; 320pub use regs::syscfg_f4 as syscfg;
270pub use regs::usart_v1 as usart; 321pub use regs::usart_v1 as usart;
271mod regs; 322mod regs;
@@ -285,7 +336,7 @@ peripherals!(
285 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 336 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
286 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, 337 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
287 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, 338 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
288 PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 339 PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6
289); 340);
290 341
291pub mod interrupt { 342pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f437zi.rs b/embassy-stm32/src/pac/stm32f437zi.rs
index 3c30eec9a..8bdfb2d0d 100644
--- a/embassy-stm32/src/pac/stm32f437zi.rs
+++ b/embassy-stm32/src/pac/stm32f437zi.rs
@@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
217impl_spi!(SPI1, APB2);
218impl_spi_pin!(SPI1, SckPin, PA5, 5);
219impl_spi_pin!(SPI1, MisoPin, PA6, 5);
220impl_spi_pin!(SPI1, MosiPin, PA7, 5);
221impl_spi_pin!(SPI1, SckPin, PB3, 5);
222impl_spi_pin!(SPI1, MisoPin, PB4, 5);
223impl_spi_pin!(SPI1, MosiPin, PB5, 5);
224pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
225impl_spi!(SPI2, APB1);
226impl_spi_pin!(SPI2, SckPin, PB10, 5);
227impl_spi_pin!(SPI2, SckPin, PB13, 5);
228impl_spi_pin!(SPI2, MisoPin, PB14, 5);
229impl_spi_pin!(SPI2, MosiPin, PB15, 5);
230impl_spi_pin!(SPI2, MisoPin, PC2, 5);
231impl_spi_pin!(SPI2, MosiPin, PC3, 5);
232impl_spi_pin!(SPI2, SckPin, PD3, 5);
233impl_spi_pin!(SPI2, SckPin, PI1, 5);
234impl_spi_pin!(SPI2, MisoPin, PI2, 5);
235impl_spi_pin!(SPI2, MosiPin, PI3, 5);
236pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
237impl_spi!(SPI3, APB1);
238impl_spi_pin!(SPI3, SckPin, PB3, 6);
239impl_spi_pin!(SPI3, MisoPin, PB4, 6);
240impl_spi_pin!(SPI3, MosiPin, PB5, 6);
241impl_spi_pin!(SPI3, SckPin, PC10, 6);
242impl_spi_pin!(SPI3, MisoPin, PC11, 6);
243impl_spi_pin!(SPI3, MosiPin, PC12, 6);
244impl_spi_pin!(SPI3, MosiPin, PD6, 5);
245pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
246impl_spi!(SPI4, APB2);
247impl_spi_pin!(SPI4, SckPin, PE12, 5);
248impl_spi_pin!(SPI4, MisoPin, PE13, 5);
249impl_spi_pin!(SPI4, MosiPin, PE14, 5);
250impl_spi_pin!(SPI4, SckPin, PE2, 5);
251impl_spi_pin!(SPI4, MisoPin, PE5, 5);
252impl_spi_pin!(SPI4, MosiPin, PE6, 5);
253pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
254impl_spi!(SPI5, APB2);
255impl_spi_pin!(SPI5, MosiPin, PF11, 5);
256impl_spi_pin!(SPI5, SckPin, PF7, 5);
257impl_spi_pin!(SPI5, MisoPin, PF8, 5);
258impl_spi_pin!(SPI5, MosiPin, PF9, 5);
259impl_spi_pin!(SPI5, SckPin, PH6, 5);
260impl_spi_pin!(SPI5, MisoPin, PH7, 5);
261pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _);
262impl_spi!(SPI6, APB2);
263impl_spi_pin!(SPI6, MisoPin, PG12, 5);
264impl_spi_pin!(SPI6, SckPin, PG13, 5);
265impl_spi_pin!(SPI6, MosiPin, PG14, 5);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 266pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 267pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 268impl_usart!(USART1);
@@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma;
266pub use regs::exti_v1 as exti; 316pub use regs::exti_v1 as exti;
267pub use regs::gpio_v2 as gpio; 317pub use regs::gpio_v2 as gpio;
268pub use regs::rng_v1 as rng; 318pub use regs::rng_v1 as rng;
319pub use regs::spi_v1 as spi;
269pub use regs::syscfg_f4 as syscfg; 320pub use regs::syscfg_f4 as syscfg;
270pub use regs::usart_v1 as usart; 321pub use regs::usart_v1 as usart;
271mod regs; 322mod regs;
@@ -285,7 +336,7 @@ peripherals!(
285 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 336 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
286 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, 337 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
287 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, 338 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
288 PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 339 PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6
289); 340);
290 341
291pub mod interrupt { 342pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f439ai.rs b/embassy-stm32/src/pac/stm32f439ai.rs
index 379a3d707..cd06ea3a6 100644
--- a/embassy-stm32/src/pac/stm32f439ai.rs
+++ b/embassy-stm32/src/pac/stm32f439ai.rs
@@ -212,7 +212,52 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
217impl_spi!(SPI1, APB2);
218impl_spi_pin!(SPI1, SckPin, PA5, 5);
219impl_spi_pin!(SPI1, MisoPin, PA6, 5);
220impl_spi_pin!(SPI1, MosiPin, PA7, 5);
221impl_spi_pin!(SPI1, SckPin, PB3, 5);
222impl_spi_pin!(SPI1, MisoPin, PB4, 5);
223impl_spi_pin!(SPI1, MosiPin, PB5, 5);
224pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
225impl_spi!(SPI2, APB1);
226impl_spi_pin!(SPI2, SckPin, PB10, 5);
227impl_spi_pin!(SPI2, SckPin, PB13, 5);
228impl_spi_pin!(SPI2, MisoPin, PB14, 5);
229impl_spi_pin!(SPI2, MosiPin, PB15, 5);
230impl_spi_pin!(SPI2, MisoPin, PC2, 5);
231impl_spi_pin!(SPI2, MosiPin, PC3, 5);
232impl_spi_pin!(SPI2, SckPin, PD3, 5);
233impl_spi_pin!(SPI2, SckPin, PI1, 5);
234impl_spi_pin!(SPI2, MisoPin, PI2, 5);
235impl_spi_pin!(SPI2, MosiPin, PI3, 5);
236pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
237impl_spi!(SPI3, APB1);
238impl_spi_pin!(SPI3, SckPin, PB3, 6);
239impl_spi_pin!(SPI3, MisoPin, PB4, 6);
240impl_spi_pin!(SPI3, MosiPin, PB5, 6);
241impl_spi_pin!(SPI3, SckPin, PC10, 6);
242impl_spi_pin!(SPI3, MisoPin, PC11, 6);
243impl_spi_pin!(SPI3, MosiPin, PC12, 6);
244impl_spi_pin!(SPI3, MosiPin, PD6, 5);
245pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
246impl_spi!(SPI4, APB2);
247impl_spi_pin!(SPI4, SckPin, PE12, 5);
248impl_spi_pin!(SPI4, MisoPin, PE13, 5);
249impl_spi_pin!(SPI4, MosiPin, PE14, 5);
250impl_spi_pin!(SPI4, SckPin, PE2, 5);
251impl_spi_pin!(SPI4, MisoPin, PE5, 5);
252impl_spi_pin!(SPI4, MosiPin, PE6, 5);
253pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
254impl_spi!(SPI5, APB2);
255impl_spi_pin!(SPI5, MosiPin, PF11, 5);
256impl_spi_pin!(SPI5, SckPin, PF7, 5);
257impl_spi_pin!(SPI5, MisoPin, PF8, 5);
258impl_spi_pin!(SPI5, MosiPin, PF9, 5);
259impl_spi_pin!(SPI5, SckPin, PH6, 5);
260impl_spi_pin!(SPI5, MisoPin, PH7, 5);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 261pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 262pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 263impl_usart!(USART1);
@@ -266,6 +311,7 @@ pub use regs::dma_v2 as dma;
266pub use regs::exti_v1 as exti; 311pub use regs::exti_v1 as exti;
267pub use regs::gpio_v2 as gpio; 312pub use regs::gpio_v2 as gpio;
268pub use regs::rng_v1 as rng; 313pub use regs::rng_v1 as rng;
314pub use regs::spi_v1 as spi;
269pub use regs::syscfg_f4 as syscfg; 315pub use regs::syscfg_f4 as syscfg;
270pub use regs::usart_v1 as usart; 316pub use regs::usart_v1 as usart;
271mod regs; 317mod regs;
@@ -285,7 +331,7 @@ peripherals!(
285 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 331 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
286 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, 332 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
287 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, 333 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
288 PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 334 PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART3, USART6
289); 335);
290 336
291pub mod interrupt { 337pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f439bg.rs b/embassy-stm32/src/pac/stm32f439bg.rs
index 379a3d707..5a0019b3b 100644
--- a/embassy-stm32/src/pac/stm32f439bg.rs
+++ b/embassy-stm32/src/pac/stm32f439bg.rs
@@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
217impl_spi!(SPI1, APB2);
218impl_spi_pin!(SPI1, SckPin, PA5, 5);
219impl_spi_pin!(SPI1, MisoPin, PA6, 5);
220impl_spi_pin!(SPI1, MosiPin, PA7, 5);
221impl_spi_pin!(SPI1, SckPin, PB3, 5);
222impl_spi_pin!(SPI1, MisoPin, PB4, 5);
223impl_spi_pin!(SPI1, MosiPin, PB5, 5);
224pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
225impl_spi!(SPI2, APB1);
226impl_spi_pin!(SPI2, SckPin, PB10, 5);
227impl_spi_pin!(SPI2, SckPin, PB13, 5);
228impl_spi_pin!(SPI2, MisoPin, PB14, 5);
229impl_spi_pin!(SPI2, MosiPin, PB15, 5);
230impl_spi_pin!(SPI2, MisoPin, PC2, 5);
231impl_spi_pin!(SPI2, MosiPin, PC3, 5);
232impl_spi_pin!(SPI2, SckPin, PD3, 5);
233impl_spi_pin!(SPI2, SckPin, PI1, 5);
234impl_spi_pin!(SPI2, MisoPin, PI2, 5);
235impl_spi_pin!(SPI2, MosiPin, PI3, 5);
236pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
237impl_spi!(SPI3, APB1);
238impl_spi_pin!(SPI3, SckPin, PB3, 6);
239impl_spi_pin!(SPI3, MisoPin, PB4, 6);
240impl_spi_pin!(SPI3, MosiPin, PB5, 6);
241impl_spi_pin!(SPI3, SckPin, PC10, 6);
242impl_spi_pin!(SPI3, MisoPin, PC11, 6);
243impl_spi_pin!(SPI3, MosiPin, PC12, 6);
244impl_spi_pin!(SPI3, MosiPin, PD6, 5);
245pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
246impl_spi!(SPI4, APB2);
247impl_spi_pin!(SPI4, SckPin, PE12, 5);
248impl_spi_pin!(SPI4, MisoPin, PE13, 5);
249impl_spi_pin!(SPI4, MosiPin, PE14, 5);
250impl_spi_pin!(SPI4, SckPin, PE2, 5);
251impl_spi_pin!(SPI4, MisoPin, PE5, 5);
252impl_spi_pin!(SPI4, MosiPin, PE6, 5);
253pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
254impl_spi!(SPI5, APB2);
255impl_spi_pin!(SPI5, MosiPin, PF11, 5);
256impl_spi_pin!(SPI5, SckPin, PF7, 5);
257impl_spi_pin!(SPI5, MisoPin, PF8, 5);
258impl_spi_pin!(SPI5, MosiPin, PF9, 5);
259impl_spi_pin!(SPI5, SckPin, PH6, 5);
260impl_spi_pin!(SPI5, MisoPin, PH7, 5);
261pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _);
262impl_spi!(SPI6, APB2);
263impl_spi_pin!(SPI6, MisoPin, PG12, 5);
264impl_spi_pin!(SPI6, SckPin, PG13, 5);
265impl_spi_pin!(SPI6, MosiPin, PG14, 5);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 266pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 267pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 268impl_usart!(USART1);
@@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma;
266pub use regs::exti_v1 as exti; 316pub use regs::exti_v1 as exti;
267pub use regs::gpio_v2 as gpio; 317pub use regs::gpio_v2 as gpio;
268pub use regs::rng_v1 as rng; 318pub use regs::rng_v1 as rng;
319pub use regs::spi_v1 as spi;
269pub use regs::syscfg_f4 as syscfg; 320pub use regs::syscfg_f4 as syscfg;
270pub use regs::usart_v1 as usart; 321pub use regs::usart_v1 as usart;
271mod regs; 322mod regs;
@@ -285,7 +336,7 @@ peripherals!(
285 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 336 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
286 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, 337 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
287 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, 338 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
288 PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 339 PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6
289); 340);
290 341
291pub mod interrupt { 342pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f439bi.rs b/embassy-stm32/src/pac/stm32f439bi.rs
index 379a3d707..5a0019b3b 100644
--- a/embassy-stm32/src/pac/stm32f439bi.rs
+++ b/embassy-stm32/src/pac/stm32f439bi.rs
@@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
217impl_spi!(SPI1, APB2);
218impl_spi_pin!(SPI1, SckPin, PA5, 5);
219impl_spi_pin!(SPI1, MisoPin, PA6, 5);
220impl_spi_pin!(SPI1, MosiPin, PA7, 5);
221impl_spi_pin!(SPI1, SckPin, PB3, 5);
222impl_spi_pin!(SPI1, MisoPin, PB4, 5);
223impl_spi_pin!(SPI1, MosiPin, PB5, 5);
224pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
225impl_spi!(SPI2, APB1);
226impl_spi_pin!(SPI2, SckPin, PB10, 5);
227impl_spi_pin!(SPI2, SckPin, PB13, 5);
228impl_spi_pin!(SPI2, MisoPin, PB14, 5);
229impl_spi_pin!(SPI2, MosiPin, PB15, 5);
230impl_spi_pin!(SPI2, MisoPin, PC2, 5);
231impl_spi_pin!(SPI2, MosiPin, PC3, 5);
232impl_spi_pin!(SPI2, SckPin, PD3, 5);
233impl_spi_pin!(SPI2, SckPin, PI1, 5);
234impl_spi_pin!(SPI2, MisoPin, PI2, 5);
235impl_spi_pin!(SPI2, MosiPin, PI3, 5);
236pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
237impl_spi!(SPI3, APB1);
238impl_spi_pin!(SPI3, SckPin, PB3, 6);
239impl_spi_pin!(SPI3, MisoPin, PB4, 6);
240impl_spi_pin!(SPI3, MosiPin, PB5, 6);
241impl_spi_pin!(SPI3, SckPin, PC10, 6);
242impl_spi_pin!(SPI3, MisoPin, PC11, 6);
243impl_spi_pin!(SPI3, MosiPin, PC12, 6);
244impl_spi_pin!(SPI3, MosiPin, PD6, 5);
245pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
246impl_spi!(SPI4, APB2);
247impl_spi_pin!(SPI4, SckPin, PE12, 5);
248impl_spi_pin!(SPI4, MisoPin, PE13, 5);
249impl_spi_pin!(SPI4, MosiPin, PE14, 5);
250impl_spi_pin!(SPI4, SckPin, PE2, 5);
251impl_spi_pin!(SPI4, MisoPin, PE5, 5);
252impl_spi_pin!(SPI4, MosiPin, PE6, 5);
253pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
254impl_spi!(SPI5, APB2);
255impl_spi_pin!(SPI5, MosiPin, PF11, 5);
256impl_spi_pin!(SPI5, SckPin, PF7, 5);
257impl_spi_pin!(SPI5, MisoPin, PF8, 5);
258impl_spi_pin!(SPI5, MosiPin, PF9, 5);
259impl_spi_pin!(SPI5, SckPin, PH6, 5);
260impl_spi_pin!(SPI5, MisoPin, PH7, 5);
261pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _);
262impl_spi!(SPI6, APB2);
263impl_spi_pin!(SPI6, MisoPin, PG12, 5);
264impl_spi_pin!(SPI6, SckPin, PG13, 5);
265impl_spi_pin!(SPI6, MosiPin, PG14, 5);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 266pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 267pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 268impl_usart!(USART1);
@@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma;
266pub use regs::exti_v1 as exti; 316pub use regs::exti_v1 as exti;
267pub use regs::gpio_v2 as gpio; 317pub use regs::gpio_v2 as gpio;
268pub use regs::rng_v1 as rng; 318pub use regs::rng_v1 as rng;
319pub use regs::spi_v1 as spi;
269pub use regs::syscfg_f4 as syscfg; 320pub use regs::syscfg_f4 as syscfg;
270pub use regs::usart_v1 as usart; 321pub use regs::usart_v1 as usart;
271mod regs; 322mod regs;
@@ -285,7 +336,7 @@ peripherals!(
285 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 336 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
286 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, 337 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
287 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, 338 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
288 PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 339 PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6
289); 340);
290 341
291pub mod interrupt { 342pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f439ig.rs b/embassy-stm32/src/pac/stm32f439ig.rs
index 379a3d707..5a0019b3b 100644
--- a/embassy-stm32/src/pac/stm32f439ig.rs
+++ b/embassy-stm32/src/pac/stm32f439ig.rs
@@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
217impl_spi!(SPI1, APB2);
218impl_spi_pin!(SPI1, SckPin, PA5, 5);
219impl_spi_pin!(SPI1, MisoPin, PA6, 5);
220impl_spi_pin!(SPI1, MosiPin, PA7, 5);
221impl_spi_pin!(SPI1, SckPin, PB3, 5);
222impl_spi_pin!(SPI1, MisoPin, PB4, 5);
223impl_spi_pin!(SPI1, MosiPin, PB5, 5);
224pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
225impl_spi!(SPI2, APB1);
226impl_spi_pin!(SPI2, SckPin, PB10, 5);
227impl_spi_pin!(SPI2, SckPin, PB13, 5);
228impl_spi_pin!(SPI2, MisoPin, PB14, 5);
229impl_spi_pin!(SPI2, MosiPin, PB15, 5);
230impl_spi_pin!(SPI2, MisoPin, PC2, 5);
231impl_spi_pin!(SPI2, MosiPin, PC3, 5);
232impl_spi_pin!(SPI2, SckPin, PD3, 5);
233impl_spi_pin!(SPI2, SckPin, PI1, 5);
234impl_spi_pin!(SPI2, MisoPin, PI2, 5);
235impl_spi_pin!(SPI2, MosiPin, PI3, 5);
236pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
237impl_spi!(SPI3, APB1);
238impl_spi_pin!(SPI3, SckPin, PB3, 6);
239impl_spi_pin!(SPI3, MisoPin, PB4, 6);
240impl_spi_pin!(SPI3, MosiPin, PB5, 6);
241impl_spi_pin!(SPI3, SckPin, PC10, 6);
242impl_spi_pin!(SPI3, MisoPin, PC11, 6);
243impl_spi_pin!(SPI3, MosiPin, PC12, 6);
244impl_spi_pin!(SPI3, MosiPin, PD6, 5);
245pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
246impl_spi!(SPI4, APB2);
247impl_spi_pin!(SPI4, SckPin, PE12, 5);
248impl_spi_pin!(SPI4, MisoPin, PE13, 5);
249impl_spi_pin!(SPI4, MosiPin, PE14, 5);
250impl_spi_pin!(SPI4, SckPin, PE2, 5);
251impl_spi_pin!(SPI4, MisoPin, PE5, 5);
252impl_spi_pin!(SPI4, MosiPin, PE6, 5);
253pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
254impl_spi!(SPI5, APB2);
255impl_spi_pin!(SPI5, MosiPin, PF11, 5);
256impl_spi_pin!(SPI5, SckPin, PF7, 5);
257impl_spi_pin!(SPI5, MisoPin, PF8, 5);
258impl_spi_pin!(SPI5, MosiPin, PF9, 5);
259impl_spi_pin!(SPI5, SckPin, PH6, 5);
260impl_spi_pin!(SPI5, MisoPin, PH7, 5);
261pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _);
262impl_spi!(SPI6, APB2);
263impl_spi_pin!(SPI6, MisoPin, PG12, 5);
264impl_spi_pin!(SPI6, SckPin, PG13, 5);
265impl_spi_pin!(SPI6, MosiPin, PG14, 5);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 266pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 267pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 268impl_usart!(USART1);
@@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma;
266pub use regs::exti_v1 as exti; 316pub use regs::exti_v1 as exti;
267pub use regs::gpio_v2 as gpio; 317pub use regs::gpio_v2 as gpio;
268pub use regs::rng_v1 as rng; 318pub use regs::rng_v1 as rng;
319pub use regs::spi_v1 as spi;
269pub use regs::syscfg_f4 as syscfg; 320pub use regs::syscfg_f4 as syscfg;
270pub use regs::usart_v1 as usart; 321pub use regs::usart_v1 as usart;
271mod regs; 322mod regs;
@@ -285,7 +336,7 @@ peripherals!(
285 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 336 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
286 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, 337 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
287 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, 338 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
288 PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 339 PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6
289); 340);
290 341
291pub mod interrupt { 342pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f439ii.rs b/embassy-stm32/src/pac/stm32f439ii.rs
index 379a3d707..5a0019b3b 100644
--- a/embassy-stm32/src/pac/stm32f439ii.rs
+++ b/embassy-stm32/src/pac/stm32f439ii.rs
@@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
217impl_spi!(SPI1, APB2);
218impl_spi_pin!(SPI1, SckPin, PA5, 5);
219impl_spi_pin!(SPI1, MisoPin, PA6, 5);
220impl_spi_pin!(SPI1, MosiPin, PA7, 5);
221impl_spi_pin!(SPI1, SckPin, PB3, 5);
222impl_spi_pin!(SPI1, MisoPin, PB4, 5);
223impl_spi_pin!(SPI1, MosiPin, PB5, 5);
224pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
225impl_spi!(SPI2, APB1);
226impl_spi_pin!(SPI2, SckPin, PB10, 5);
227impl_spi_pin!(SPI2, SckPin, PB13, 5);
228impl_spi_pin!(SPI2, MisoPin, PB14, 5);
229impl_spi_pin!(SPI2, MosiPin, PB15, 5);
230impl_spi_pin!(SPI2, MisoPin, PC2, 5);
231impl_spi_pin!(SPI2, MosiPin, PC3, 5);
232impl_spi_pin!(SPI2, SckPin, PD3, 5);
233impl_spi_pin!(SPI2, SckPin, PI1, 5);
234impl_spi_pin!(SPI2, MisoPin, PI2, 5);
235impl_spi_pin!(SPI2, MosiPin, PI3, 5);
236pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
237impl_spi!(SPI3, APB1);
238impl_spi_pin!(SPI3, SckPin, PB3, 6);
239impl_spi_pin!(SPI3, MisoPin, PB4, 6);
240impl_spi_pin!(SPI3, MosiPin, PB5, 6);
241impl_spi_pin!(SPI3, SckPin, PC10, 6);
242impl_spi_pin!(SPI3, MisoPin, PC11, 6);
243impl_spi_pin!(SPI3, MosiPin, PC12, 6);
244impl_spi_pin!(SPI3, MosiPin, PD6, 5);
245pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
246impl_spi!(SPI4, APB2);
247impl_spi_pin!(SPI4, SckPin, PE12, 5);
248impl_spi_pin!(SPI4, MisoPin, PE13, 5);
249impl_spi_pin!(SPI4, MosiPin, PE14, 5);
250impl_spi_pin!(SPI4, SckPin, PE2, 5);
251impl_spi_pin!(SPI4, MisoPin, PE5, 5);
252impl_spi_pin!(SPI4, MosiPin, PE6, 5);
253pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
254impl_spi!(SPI5, APB2);
255impl_spi_pin!(SPI5, MosiPin, PF11, 5);
256impl_spi_pin!(SPI5, SckPin, PF7, 5);
257impl_spi_pin!(SPI5, MisoPin, PF8, 5);
258impl_spi_pin!(SPI5, MosiPin, PF9, 5);
259impl_spi_pin!(SPI5, SckPin, PH6, 5);
260impl_spi_pin!(SPI5, MisoPin, PH7, 5);
261pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _);
262impl_spi!(SPI6, APB2);
263impl_spi_pin!(SPI6, MisoPin, PG12, 5);
264impl_spi_pin!(SPI6, SckPin, PG13, 5);
265impl_spi_pin!(SPI6, MosiPin, PG14, 5);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 266pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 267pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 268impl_usart!(USART1);
@@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma;
266pub use regs::exti_v1 as exti; 316pub use regs::exti_v1 as exti;
267pub use regs::gpio_v2 as gpio; 317pub use regs::gpio_v2 as gpio;
268pub use regs::rng_v1 as rng; 318pub use regs::rng_v1 as rng;
319pub use regs::spi_v1 as spi;
269pub use regs::syscfg_f4 as syscfg; 320pub use regs::syscfg_f4 as syscfg;
270pub use regs::usart_v1 as usart; 321pub use regs::usart_v1 as usart;
271mod regs; 322mod regs;
@@ -285,7 +336,7 @@ peripherals!(
285 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 336 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
286 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, 337 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
287 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, 338 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
288 PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 339 PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6
289); 340);
290 341
291pub mod interrupt { 342pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f439ng.rs b/embassy-stm32/src/pac/stm32f439ng.rs
index 379a3d707..5a0019b3b 100644
--- a/embassy-stm32/src/pac/stm32f439ng.rs
+++ b/embassy-stm32/src/pac/stm32f439ng.rs
@@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
217impl_spi!(SPI1, APB2);
218impl_spi_pin!(SPI1, SckPin, PA5, 5);
219impl_spi_pin!(SPI1, MisoPin, PA6, 5);
220impl_spi_pin!(SPI1, MosiPin, PA7, 5);
221impl_spi_pin!(SPI1, SckPin, PB3, 5);
222impl_spi_pin!(SPI1, MisoPin, PB4, 5);
223impl_spi_pin!(SPI1, MosiPin, PB5, 5);
224pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
225impl_spi!(SPI2, APB1);
226impl_spi_pin!(SPI2, SckPin, PB10, 5);
227impl_spi_pin!(SPI2, SckPin, PB13, 5);
228impl_spi_pin!(SPI2, MisoPin, PB14, 5);
229impl_spi_pin!(SPI2, MosiPin, PB15, 5);
230impl_spi_pin!(SPI2, MisoPin, PC2, 5);
231impl_spi_pin!(SPI2, MosiPin, PC3, 5);
232impl_spi_pin!(SPI2, SckPin, PD3, 5);
233impl_spi_pin!(SPI2, SckPin, PI1, 5);
234impl_spi_pin!(SPI2, MisoPin, PI2, 5);
235impl_spi_pin!(SPI2, MosiPin, PI3, 5);
236pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
237impl_spi!(SPI3, APB1);
238impl_spi_pin!(SPI3, SckPin, PB3, 6);
239impl_spi_pin!(SPI3, MisoPin, PB4, 6);
240impl_spi_pin!(SPI3, MosiPin, PB5, 6);
241impl_spi_pin!(SPI3, SckPin, PC10, 6);
242impl_spi_pin!(SPI3, MisoPin, PC11, 6);
243impl_spi_pin!(SPI3, MosiPin, PC12, 6);
244impl_spi_pin!(SPI3, MosiPin, PD6, 5);
245pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
246impl_spi!(SPI4, APB2);
247impl_spi_pin!(SPI4, SckPin, PE12, 5);
248impl_spi_pin!(SPI4, MisoPin, PE13, 5);
249impl_spi_pin!(SPI4, MosiPin, PE14, 5);
250impl_spi_pin!(SPI4, SckPin, PE2, 5);
251impl_spi_pin!(SPI4, MisoPin, PE5, 5);
252impl_spi_pin!(SPI4, MosiPin, PE6, 5);
253pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
254impl_spi!(SPI5, APB2);
255impl_spi_pin!(SPI5, MosiPin, PF11, 5);
256impl_spi_pin!(SPI5, SckPin, PF7, 5);
257impl_spi_pin!(SPI5, MisoPin, PF8, 5);
258impl_spi_pin!(SPI5, MosiPin, PF9, 5);
259impl_spi_pin!(SPI5, SckPin, PH6, 5);
260impl_spi_pin!(SPI5, MisoPin, PH7, 5);
261pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _);
262impl_spi!(SPI6, APB2);
263impl_spi_pin!(SPI6, MisoPin, PG12, 5);
264impl_spi_pin!(SPI6, SckPin, PG13, 5);
265impl_spi_pin!(SPI6, MosiPin, PG14, 5);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 266pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 267pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 268impl_usart!(USART1);
@@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma;
266pub use regs::exti_v1 as exti; 316pub use regs::exti_v1 as exti;
267pub use regs::gpio_v2 as gpio; 317pub use regs::gpio_v2 as gpio;
268pub use regs::rng_v1 as rng; 318pub use regs::rng_v1 as rng;
319pub use regs::spi_v1 as spi;
269pub use regs::syscfg_f4 as syscfg; 320pub use regs::syscfg_f4 as syscfg;
270pub use regs::usart_v1 as usart; 321pub use regs::usart_v1 as usart;
271mod regs; 322mod regs;
@@ -285,7 +336,7 @@ peripherals!(
285 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 336 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
286 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, 337 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
287 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, 338 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
288 PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 339 PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6
289); 340);
290 341
291pub mod interrupt { 342pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f439ni.rs b/embassy-stm32/src/pac/stm32f439ni.rs
index 379a3d707..5a0019b3b 100644
--- a/embassy-stm32/src/pac/stm32f439ni.rs
+++ b/embassy-stm32/src/pac/stm32f439ni.rs
@@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
217impl_spi!(SPI1, APB2);
218impl_spi_pin!(SPI1, SckPin, PA5, 5);
219impl_spi_pin!(SPI1, MisoPin, PA6, 5);
220impl_spi_pin!(SPI1, MosiPin, PA7, 5);
221impl_spi_pin!(SPI1, SckPin, PB3, 5);
222impl_spi_pin!(SPI1, MisoPin, PB4, 5);
223impl_spi_pin!(SPI1, MosiPin, PB5, 5);
224pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
225impl_spi!(SPI2, APB1);
226impl_spi_pin!(SPI2, SckPin, PB10, 5);
227impl_spi_pin!(SPI2, SckPin, PB13, 5);
228impl_spi_pin!(SPI2, MisoPin, PB14, 5);
229impl_spi_pin!(SPI2, MosiPin, PB15, 5);
230impl_spi_pin!(SPI2, MisoPin, PC2, 5);
231impl_spi_pin!(SPI2, MosiPin, PC3, 5);
232impl_spi_pin!(SPI2, SckPin, PD3, 5);
233impl_spi_pin!(SPI2, SckPin, PI1, 5);
234impl_spi_pin!(SPI2, MisoPin, PI2, 5);
235impl_spi_pin!(SPI2, MosiPin, PI3, 5);
236pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
237impl_spi!(SPI3, APB1);
238impl_spi_pin!(SPI3, SckPin, PB3, 6);
239impl_spi_pin!(SPI3, MisoPin, PB4, 6);
240impl_spi_pin!(SPI3, MosiPin, PB5, 6);
241impl_spi_pin!(SPI3, SckPin, PC10, 6);
242impl_spi_pin!(SPI3, MisoPin, PC11, 6);
243impl_spi_pin!(SPI3, MosiPin, PC12, 6);
244impl_spi_pin!(SPI3, MosiPin, PD6, 5);
245pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
246impl_spi!(SPI4, APB2);
247impl_spi_pin!(SPI4, SckPin, PE12, 5);
248impl_spi_pin!(SPI4, MisoPin, PE13, 5);
249impl_spi_pin!(SPI4, MosiPin, PE14, 5);
250impl_spi_pin!(SPI4, SckPin, PE2, 5);
251impl_spi_pin!(SPI4, MisoPin, PE5, 5);
252impl_spi_pin!(SPI4, MosiPin, PE6, 5);
253pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
254impl_spi!(SPI5, APB2);
255impl_spi_pin!(SPI5, MosiPin, PF11, 5);
256impl_spi_pin!(SPI5, SckPin, PF7, 5);
257impl_spi_pin!(SPI5, MisoPin, PF8, 5);
258impl_spi_pin!(SPI5, MosiPin, PF9, 5);
259impl_spi_pin!(SPI5, SckPin, PH6, 5);
260impl_spi_pin!(SPI5, MisoPin, PH7, 5);
261pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _);
262impl_spi!(SPI6, APB2);
263impl_spi_pin!(SPI6, MisoPin, PG12, 5);
264impl_spi_pin!(SPI6, SckPin, PG13, 5);
265impl_spi_pin!(SPI6, MosiPin, PG14, 5);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 266pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 267pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 268impl_usart!(USART1);
@@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma;
266pub use regs::exti_v1 as exti; 316pub use regs::exti_v1 as exti;
267pub use regs::gpio_v2 as gpio; 317pub use regs::gpio_v2 as gpio;
268pub use regs::rng_v1 as rng; 318pub use regs::rng_v1 as rng;
319pub use regs::spi_v1 as spi;
269pub use regs::syscfg_f4 as syscfg; 320pub use regs::syscfg_f4 as syscfg;
270pub use regs::usart_v1 as usart; 321pub use regs::usart_v1 as usart;
271mod regs; 322mod regs;
@@ -285,7 +336,7 @@ peripherals!(
285 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 336 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
286 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, 337 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
287 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, 338 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
288 PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 339 PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6
289); 340);
290 341
291pub mod interrupt { 342pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f439vg.rs b/embassy-stm32/src/pac/stm32f439vg.rs
index 379a3d707..15642387b 100644
--- a/embassy-stm32/src/pac/stm32f439vg.rs
+++ b/embassy-stm32/src/pac/stm32f439vg.rs
@@ -212,7 +212,44 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
217impl_spi!(SPI1, APB2);
218impl_spi_pin!(SPI1, SckPin, PA5, 5);
219impl_spi_pin!(SPI1, MisoPin, PA6, 5);
220impl_spi_pin!(SPI1, MosiPin, PA7, 5);
221impl_spi_pin!(SPI1, SckPin, PB3, 5);
222impl_spi_pin!(SPI1, MisoPin, PB4, 5);
223impl_spi_pin!(SPI1, MosiPin, PB5, 5);
224pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
225impl_spi!(SPI2, APB1);
226impl_spi_pin!(SPI2, SckPin, PB10, 5);
227impl_spi_pin!(SPI2, SckPin, PB13, 5);
228impl_spi_pin!(SPI2, MisoPin, PB14, 5);
229impl_spi_pin!(SPI2, MosiPin, PB15, 5);
230impl_spi_pin!(SPI2, MisoPin, PC2, 5);
231impl_spi_pin!(SPI2, MosiPin, PC3, 5);
232impl_spi_pin!(SPI2, SckPin, PD3, 5);
233impl_spi_pin!(SPI2, SckPin, PI1, 5);
234impl_spi_pin!(SPI2, MisoPin, PI2, 5);
235impl_spi_pin!(SPI2, MosiPin, PI3, 5);
236pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
237impl_spi!(SPI3, APB1);
238impl_spi_pin!(SPI3, SckPin, PB3, 6);
239impl_spi_pin!(SPI3, MisoPin, PB4, 6);
240impl_spi_pin!(SPI3, MosiPin, PB5, 6);
241impl_spi_pin!(SPI3, SckPin, PC10, 6);
242impl_spi_pin!(SPI3, MisoPin, PC11, 6);
243impl_spi_pin!(SPI3, MosiPin, PC12, 6);
244impl_spi_pin!(SPI3, MosiPin, PD6, 5);
245pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
246impl_spi!(SPI4, APB2);
247impl_spi_pin!(SPI4, SckPin, PE12, 5);
248impl_spi_pin!(SPI4, MisoPin, PE13, 5);
249impl_spi_pin!(SPI4, MosiPin, PE14, 5);
250impl_spi_pin!(SPI4, SckPin, PE2, 5);
251impl_spi_pin!(SPI4, MisoPin, PE5, 5);
252impl_spi_pin!(SPI4, MosiPin, PE6, 5);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 253pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 254pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 255impl_usart!(USART1);
@@ -266,6 +303,7 @@ pub use regs::dma_v2 as dma;
266pub use regs::exti_v1 as exti; 303pub use regs::exti_v1 as exti;
267pub use regs::gpio_v2 as gpio; 304pub use regs::gpio_v2 as gpio;
268pub use regs::rng_v1 as rng; 305pub use regs::rng_v1 as rng;
306pub use regs::spi_v1 as spi;
269pub use regs::syscfg_f4 as syscfg; 307pub use regs::syscfg_f4 as syscfg;
270pub use regs::usart_v1 as usart; 308pub use regs::usart_v1 as usart;
271mod regs; 309mod regs;
@@ -285,7 +323,7 @@ peripherals!(
285 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 323 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
286 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, 324 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
287 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, 325 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
288 PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 326 PK15, RNG, SPI1, SPI2, SPI3, SPI4, SYSCFG, USART1, USART2, USART3, USART6
289); 327);
290 328
291pub mod interrupt { 329pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f439vi.rs b/embassy-stm32/src/pac/stm32f439vi.rs
index 379a3d707..15642387b 100644
--- a/embassy-stm32/src/pac/stm32f439vi.rs
+++ b/embassy-stm32/src/pac/stm32f439vi.rs
@@ -212,7 +212,44 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
217impl_spi!(SPI1, APB2);
218impl_spi_pin!(SPI1, SckPin, PA5, 5);
219impl_spi_pin!(SPI1, MisoPin, PA6, 5);
220impl_spi_pin!(SPI1, MosiPin, PA7, 5);
221impl_spi_pin!(SPI1, SckPin, PB3, 5);
222impl_spi_pin!(SPI1, MisoPin, PB4, 5);
223impl_spi_pin!(SPI1, MosiPin, PB5, 5);
224pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
225impl_spi!(SPI2, APB1);
226impl_spi_pin!(SPI2, SckPin, PB10, 5);
227impl_spi_pin!(SPI2, SckPin, PB13, 5);
228impl_spi_pin!(SPI2, MisoPin, PB14, 5);
229impl_spi_pin!(SPI2, MosiPin, PB15, 5);
230impl_spi_pin!(SPI2, MisoPin, PC2, 5);
231impl_spi_pin!(SPI2, MosiPin, PC3, 5);
232impl_spi_pin!(SPI2, SckPin, PD3, 5);
233impl_spi_pin!(SPI2, SckPin, PI1, 5);
234impl_spi_pin!(SPI2, MisoPin, PI2, 5);
235impl_spi_pin!(SPI2, MosiPin, PI3, 5);
236pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
237impl_spi!(SPI3, APB1);
238impl_spi_pin!(SPI3, SckPin, PB3, 6);
239impl_spi_pin!(SPI3, MisoPin, PB4, 6);
240impl_spi_pin!(SPI3, MosiPin, PB5, 6);
241impl_spi_pin!(SPI3, SckPin, PC10, 6);
242impl_spi_pin!(SPI3, MisoPin, PC11, 6);
243impl_spi_pin!(SPI3, MosiPin, PC12, 6);
244impl_spi_pin!(SPI3, MosiPin, PD6, 5);
245pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
246impl_spi!(SPI4, APB2);
247impl_spi_pin!(SPI4, SckPin, PE12, 5);
248impl_spi_pin!(SPI4, MisoPin, PE13, 5);
249impl_spi_pin!(SPI4, MosiPin, PE14, 5);
250impl_spi_pin!(SPI4, SckPin, PE2, 5);
251impl_spi_pin!(SPI4, MisoPin, PE5, 5);
252impl_spi_pin!(SPI4, MosiPin, PE6, 5);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 253pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 254pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 255impl_usart!(USART1);
@@ -266,6 +303,7 @@ pub use regs::dma_v2 as dma;
266pub use regs::exti_v1 as exti; 303pub use regs::exti_v1 as exti;
267pub use regs::gpio_v2 as gpio; 304pub use regs::gpio_v2 as gpio;
268pub use regs::rng_v1 as rng; 305pub use regs::rng_v1 as rng;
306pub use regs::spi_v1 as spi;
269pub use regs::syscfg_f4 as syscfg; 307pub use regs::syscfg_f4 as syscfg;
270pub use regs::usart_v1 as usart; 308pub use regs::usart_v1 as usart;
271mod regs; 309mod regs;
@@ -285,7 +323,7 @@ peripherals!(
285 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 323 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
286 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, 324 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
287 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, 325 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
288 PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 326 PK15, RNG, SPI1, SPI2, SPI3, SPI4, SYSCFG, USART1, USART2, USART3, USART6
289); 327);
290 328
291pub mod interrupt { 329pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f439zg.rs b/embassy-stm32/src/pac/stm32f439zg.rs
index 379a3d707..5a0019b3b 100644
--- a/embassy-stm32/src/pac/stm32f439zg.rs
+++ b/embassy-stm32/src/pac/stm32f439zg.rs
@@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
217impl_spi!(SPI1, APB2);
218impl_spi_pin!(SPI1, SckPin, PA5, 5);
219impl_spi_pin!(SPI1, MisoPin, PA6, 5);
220impl_spi_pin!(SPI1, MosiPin, PA7, 5);
221impl_spi_pin!(SPI1, SckPin, PB3, 5);
222impl_spi_pin!(SPI1, MisoPin, PB4, 5);
223impl_spi_pin!(SPI1, MosiPin, PB5, 5);
224pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
225impl_spi!(SPI2, APB1);
226impl_spi_pin!(SPI2, SckPin, PB10, 5);
227impl_spi_pin!(SPI2, SckPin, PB13, 5);
228impl_spi_pin!(SPI2, MisoPin, PB14, 5);
229impl_spi_pin!(SPI2, MosiPin, PB15, 5);
230impl_spi_pin!(SPI2, MisoPin, PC2, 5);
231impl_spi_pin!(SPI2, MosiPin, PC3, 5);
232impl_spi_pin!(SPI2, SckPin, PD3, 5);
233impl_spi_pin!(SPI2, SckPin, PI1, 5);
234impl_spi_pin!(SPI2, MisoPin, PI2, 5);
235impl_spi_pin!(SPI2, MosiPin, PI3, 5);
236pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
237impl_spi!(SPI3, APB1);
238impl_spi_pin!(SPI3, SckPin, PB3, 6);
239impl_spi_pin!(SPI3, MisoPin, PB4, 6);
240impl_spi_pin!(SPI3, MosiPin, PB5, 6);
241impl_spi_pin!(SPI3, SckPin, PC10, 6);
242impl_spi_pin!(SPI3, MisoPin, PC11, 6);
243impl_spi_pin!(SPI3, MosiPin, PC12, 6);
244impl_spi_pin!(SPI3, MosiPin, PD6, 5);
245pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
246impl_spi!(SPI4, APB2);
247impl_spi_pin!(SPI4, SckPin, PE12, 5);
248impl_spi_pin!(SPI4, MisoPin, PE13, 5);
249impl_spi_pin!(SPI4, MosiPin, PE14, 5);
250impl_spi_pin!(SPI4, SckPin, PE2, 5);
251impl_spi_pin!(SPI4, MisoPin, PE5, 5);
252impl_spi_pin!(SPI4, MosiPin, PE6, 5);
253pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
254impl_spi!(SPI5, APB2);
255impl_spi_pin!(SPI5, MosiPin, PF11, 5);
256impl_spi_pin!(SPI5, SckPin, PF7, 5);
257impl_spi_pin!(SPI5, MisoPin, PF8, 5);
258impl_spi_pin!(SPI5, MosiPin, PF9, 5);
259impl_spi_pin!(SPI5, SckPin, PH6, 5);
260impl_spi_pin!(SPI5, MisoPin, PH7, 5);
261pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _);
262impl_spi!(SPI6, APB2);
263impl_spi_pin!(SPI6, MisoPin, PG12, 5);
264impl_spi_pin!(SPI6, SckPin, PG13, 5);
265impl_spi_pin!(SPI6, MosiPin, PG14, 5);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 266pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 267pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 268impl_usart!(USART1);
@@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma;
266pub use regs::exti_v1 as exti; 316pub use regs::exti_v1 as exti;
267pub use regs::gpio_v2 as gpio; 317pub use regs::gpio_v2 as gpio;
268pub use regs::rng_v1 as rng; 318pub use regs::rng_v1 as rng;
319pub use regs::spi_v1 as spi;
269pub use regs::syscfg_f4 as syscfg; 320pub use regs::syscfg_f4 as syscfg;
270pub use regs::usart_v1 as usart; 321pub use regs::usart_v1 as usart;
271mod regs; 322mod regs;
@@ -285,7 +336,7 @@ peripherals!(
285 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 336 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
286 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, 337 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
287 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, 338 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
288 PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 339 PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6
289); 340);
290 341
291pub mod interrupt { 342pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f439zi.rs b/embassy-stm32/src/pac/stm32f439zi.rs
index 379a3d707..5a0019b3b 100644
--- a/embassy-stm32/src/pac/stm32f439zi.rs
+++ b/embassy-stm32/src/pac/stm32f439zi.rs
@@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
217impl_spi!(SPI1, APB2);
218impl_spi_pin!(SPI1, SckPin, PA5, 5);
219impl_spi_pin!(SPI1, MisoPin, PA6, 5);
220impl_spi_pin!(SPI1, MosiPin, PA7, 5);
221impl_spi_pin!(SPI1, SckPin, PB3, 5);
222impl_spi_pin!(SPI1, MisoPin, PB4, 5);
223impl_spi_pin!(SPI1, MosiPin, PB5, 5);
224pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
225impl_spi!(SPI2, APB1);
226impl_spi_pin!(SPI2, SckPin, PB10, 5);
227impl_spi_pin!(SPI2, SckPin, PB13, 5);
228impl_spi_pin!(SPI2, MisoPin, PB14, 5);
229impl_spi_pin!(SPI2, MosiPin, PB15, 5);
230impl_spi_pin!(SPI2, MisoPin, PC2, 5);
231impl_spi_pin!(SPI2, MosiPin, PC3, 5);
232impl_spi_pin!(SPI2, SckPin, PD3, 5);
233impl_spi_pin!(SPI2, SckPin, PI1, 5);
234impl_spi_pin!(SPI2, MisoPin, PI2, 5);
235impl_spi_pin!(SPI2, MosiPin, PI3, 5);
236pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
237impl_spi!(SPI3, APB1);
238impl_spi_pin!(SPI3, SckPin, PB3, 6);
239impl_spi_pin!(SPI3, MisoPin, PB4, 6);
240impl_spi_pin!(SPI3, MosiPin, PB5, 6);
241impl_spi_pin!(SPI3, SckPin, PC10, 6);
242impl_spi_pin!(SPI3, MisoPin, PC11, 6);
243impl_spi_pin!(SPI3, MosiPin, PC12, 6);
244impl_spi_pin!(SPI3, MosiPin, PD6, 5);
245pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
246impl_spi!(SPI4, APB2);
247impl_spi_pin!(SPI4, SckPin, PE12, 5);
248impl_spi_pin!(SPI4, MisoPin, PE13, 5);
249impl_spi_pin!(SPI4, MosiPin, PE14, 5);
250impl_spi_pin!(SPI4, SckPin, PE2, 5);
251impl_spi_pin!(SPI4, MisoPin, PE5, 5);
252impl_spi_pin!(SPI4, MosiPin, PE6, 5);
253pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _);
254impl_spi!(SPI5, APB2);
255impl_spi_pin!(SPI5, MosiPin, PF11, 5);
256impl_spi_pin!(SPI5, SckPin, PF7, 5);
257impl_spi_pin!(SPI5, MisoPin, PF8, 5);
258impl_spi_pin!(SPI5, MosiPin, PF9, 5);
259impl_spi_pin!(SPI5, SckPin, PH6, 5);
260impl_spi_pin!(SPI5, MisoPin, PH7, 5);
261pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _);
262impl_spi!(SPI6, APB2);
263impl_spi_pin!(SPI6, MisoPin, PG12, 5);
264impl_spi_pin!(SPI6, SckPin, PG13, 5);
265impl_spi_pin!(SPI6, MosiPin, PG14, 5);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 266pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 267pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 268impl_usart!(USART1);
@@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma;
266pub use regs::exti_v1 as exti; 316pub use regs::exti_v1 as exti;
267pub use regs::gpio_v2 as gpio; 317pub use regs::gpio_v2 as gpio;
268pub use regs::rng_v1 as rng; 318pub use regs::rng_v1 as rng;
319pub use regs::spi_v1 as spi;
269pub use regs::syscfg_f4 as syscfg; 320pub use regs::syscfg_f4 as syscfg;
270pub use regs::usart_v1 as usart; 321pub use regs::usart_v1 as usart;
271mod regs; 322mod regs;
@@ -285,7 +336,7 @@ peripherals!(
285 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 336 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
286 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, 337 PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
287 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, 338 PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
288 PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 339 PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6
289); 340);
290 341
291pub mod interrupt { 342pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f446mc.rs b/embassy-stm32/src/pac/stm32f446mc.rs
index 99da317ff..349fc72e1 100644
--- a/embassy-stm32/src/pac/stm32f446mc.rs
+++ b/embassy-stm32/src/pac/stm32f446mc.rs
@@ -160,6 +160,51 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
160impl_gpio_pin!(PH13, 7, 13, EXTI13); 160impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
164impl_spi!(SPI1, APB2);
165impl_spi_pin!(SPI1, SckPin, PA5, 5);
166impl_spi_pin!(SPI1, MisoPin, PA6, 5);
167impl_spi_pin!(SPI1, MosiPin, PA7, 5);
168impl_spi_pin!(SPI1, SckPin, PB3, 5);
169impl_spi_pin!(SPI1, MisoPin, PB4, 5);
170impl_spi_pin!(SPI1, MosiPin, PB5, 5);
171pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
172impl_spi!(SPI2, APB1);
173impl_spi_pin!(SPI2, SckPin, PA9, 5);
174impl_spi_pin!(SPI2, SckPin, PB10, 5);
175impl_spi_pin!(SPI2, SckPin, PB13, 5);
176impl_spi_pin!(SPI2, MisoPin, PB14, 5);
177impl_spi_pin!(SPI2, MosiPin, PB15, 5);
178impl_spi_pin!(SPI2, MosiPin, PC1, 7);
179impl_spi_pin!(SPI2, MisoPin, PC2, 5);
180impl_spi_pin!(SPI2, MosiPin, PC3, 5);
181impl_spi_pin!(SPI2, SckPin, PC7, 5);
182impl_spi_pin!(SPI2, SckPin, PD3, 5);
183pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
184impl_spi!(SPI3, APB1);
185impl_spi_pin!(SPI3, MosiPin, PB0, 7);
186impl_spi_pin!(SPI3, MosiPin, PB2, 7);
187impl_spi_pin!(SPI3, SckPin, PB3, 6);
188impl_spi_pin!(SPI3, MisoPin, PB4, 6);
189impl_spi_pin!(SPI3, MosiPin, PB5, 6);
190impl_spi_pin!(SPI3, MosiPin, PC1, 5);
191impl_spi_pin!(SPI3, SckPin, PC10, 6);
192impl_spi_pin!(SPI3, MisoPin, PC11, 6);
193impl_spi_pin!(SPI3, MosiPin, PC12, 6);
194impl_spi_pin!(SPI3, MosiPin, PD0, 6);
195impl_spi_pin!(SPI3, MosiPin, PD6, 5);
196pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
197impl_spi!(SPI4, APB2);
198impl_spi_pin!(SPI4, MisoPin, PD0, 5);
199impl_spi_pin!(SPI4, SckPin, PE12, 5);
200impl_spi_pin!(SPI4, MisoPin, PE13, 5);
201impl_spi_pin!(SPI4, MosiPin, PE14, 5);
202impl_spi_pin!(SPI4, SckPin, PE2, 5);
203impl_spi_pin!(SPI4, MisoPin, PE5, 5);
204impl_spi_pin!(SPI4, MosiPin, PE6, 5);
205impl_spi_pin!(SPI4, SckPin, PG11, 6);
206impl_spi_pin!(SPI4, MisoPin, PG12, 6);
207impl_spi_pin!(SPI4, MosiPin, PG13, 6);
163pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 208pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
164pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 209pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
165impl_usart!(USART1); 210impl_usart!(USART1);
@@ -213,6 +258,7 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
213pub use regs::dma_v2 as dma; 258pub use regs::dma_v2 as dma;
214pub use regs::exti_v1 as exti; 259pub use regs::exti_v1 as exti;
215pub use regs::gpio_v2 as gpio; 260pub use regs::gpio_v2 as gpio;
261pub use regs::spi_v1 as spi;
216pub use regs::syscfg_f4 as syscfg; 262pub use regs::syscfg_f4 as syscfg;
217pub use regs::usart_v1 as usart; 263pub use regs::usart_v1 as usart;
218mod regs; 264mod regs;
@@ -229,7 +275,7 @@ peripherals!(
229 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, 275 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9,
230 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 276 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
231 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 277 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
232 PH12, PH13, PH14, PH15, SYSCFG, USART1, USART2, USART3, USART6 278 PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SPI4, SYSCFG, USART1, USART2, USART3, USART6
233); 279);
234 280
235pub mod interrupt { 281pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f446me.rs b/embassy-stm32/src/pac/stm32f446me.rs
index 99da317ff..349fc72e1 100644
--- a/embassy-stm32/src/pac/stm32f446me.rs
+++ b/embassy-stm32/src/pac/stm32f446me.rs
@@ -160,6 +160,51 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
160impl_gpio_pin!(PH13, 7, 13, EXTI13); 160impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
164impl_spi!(SPI1, APB2);
165impl_spi_pin!(SPI1, SckPin, PA5, 5);
166impl_spi_pin!(SPI1, MisoPin, PA6, 5);
167impl_spi_pin!(SPI1, MosiPin, PA7, 5);
168impl_spi_pin!(SPI1, SckPin, PB3, 5);
169impl_spi_pin!(SPI1, MisoPin, PB4, 5);
170impl_spi_pin!(SPI1, MosiPin, PB5, 5);
171pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
172impl_spi!(SPI2, APB1);
173impl_spi_pin!(SPI2, SckPin, PA9, 5);
174impl_spi_pin!(SPI2, SckPin, PB10, 5);
175impl_spi_pin!(SPI2, SckPin, PB13, 5);
176impl_spi_pin!(SPI2, MisoPin, PB14, 5);
177impl_spi_pin!(SPI2, MosiPin, PB15, 5);
178impl_spi_pin!(SPI2, MosiPin, PC1, 7);
179impl_spi_pin!(SPI2, MisoPin, PC2, 5);
180impl_spi_pin!(SPI2, MosiPin, PC3, 5);
181impl_spi_pin!(SPI2, SckPin, PC7, 5);
182impl_spi_pin!(SPI2, SckPin, PD3, 5);
183pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
184impl_spi!(SPI3, APB1);
185impl_spi_pin!(SPI3, MosiPin, PB0, 7);
186impl_spi_pin!(SPI3, MosiPin, PB2, 7);
187impl_spi_pin!(SPI3, SckPin, PB3, 6);
188impl_spi_pin!(SPI3, MisoPin, PB4, 6);
189impl_spi_pin!(SPI3, MosiPin, PB5, 6);
190impl_spi_pin!(SPI3, MosiPin, PC1, 5);
191impl_spi_pin!(SPI3, SckPin, PC10, 6);
192impl_spi_pin!(SPI3, MisoPin, PC11, 6);
193impl_spi_pin!(SPI3, MosiPin, PC12, 6);
194impl_spi_pin!(SPI3, MosiPin, PD0, 6);
195impl_spi_pin!(SPI3, MosiPin, PD6, 5);
196pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
197impl_spi!(SPI4, APB2);
198impl_spi_pin!(SPI4, MisoPin, PD0, 5);
199impl_spi_pin!(SPI4, SckPin, PE12, 5);
200impl_spi_pin!(SPI4, MisoPin, PE13, 5);
201impl_spi_pin!(SPI4, MosiPin, PE14, 5);
202impl_spi_pin!(SPI4, SckPin, PE2, 5);
203impl_spi_pin!(SPI4, MisoPin, PE5, 5);
204impl_spi_pin!(SPI4, MosiPin, PE6, 5);
205impl_spi_pin!(SPI4, SckPin, PG11, 6);
206impl_spi_pin!(SPI4, MisoPin, PG12, 6);
207impl_spi_pin!(SPI4, MosiPin, PG13, 6);
163pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 208pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
164pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 209pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
165impl_usart!(USART1); 210impl_usart!(USART1);
@@ -213,6 +258,7 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
213pub use regs::dma_v2 as dma; 258pub use regs::dma_v2 as dma;
214pub use regs::exti_v1 as exti; 259pub use regs::exti_v1 as exti;
215pub use regs::gpio_v2 as gpio; 260pub use regs::gpio_v2 as gpio;
261pub use regs::spi_v1 as spi;
216pub use regs::syscfg_f4 as syscfg; 262pub use regs::syscfg_f4 as syscfg;
217pub use regs::usart_v1 as usart; 263pub use regs::usart_v1 as usart;
218mod regs; 264mod regs;
@@ -229,7 +275,7 @@ peripherals!(
229 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, 275 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9,
230 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 276 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
231 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 277 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
232 PH12, PH13, PH14, PH15, SYSCFG, USART1, USART2, USART3, USART6 278 PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SPI4, SYSCFG, USART1, USART2, USART3, USART6
233); 279);
234 280
235pub mod interrupt { 281pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f446rc.rs b/embassy-stm32/src/pac/stm32f446rc.rs
index 99da317ff..84c114821 100644
--- a/embassy-stm32/src/pac/stm32f446rc.rs
+++ b/embassy-stm32/src/pac/stm32f446rc.rs
@@ -160,6 +160,39 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
160impl_gpio_pin!(PH13, 7, 13, EXTI13); 160impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
164impl_spi!(SPI1, APB2);
165impl_spi_pin!(SPI1, SckPin, PA5, 5);
166impl_spi_pin!(SPI1, MisoPin, PA6, 5);
167impl_spi_pin!(SPI1, MosiPin, PA7, 5);
168impl_spi_pin!(SPI1, SckPin, PB3, 5);
169impl_spi_pin!(SPI1, MisoPin, PB4, 5);
170impl_spi_pin!(SPI1, MosiPin, PB5, 5);
171pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
172impl_spi!(SPI2, APB1);
173impl_spi_pin!(SPI2, SckPin, PA9, 5);
174impl_spi_pin!(SPI2, SckPin, PB10, 5);
175impl_spi_pin!(SPI2, SckPin, PB13, 5);
176impl_spi_pin!(SPI2, MisoPin, PB14, 5);
177impl_spi_pin!(SPI2, MosiPin, PB15, 5);
178impl_spi_pin!(SPI2, MosiPin, PC1, 7);
179impl_spi_pin!(SPI2, MisoPin, PC2, 5);
180impl_spi_pin!(SPI2, MosiPin, PC3, 5);
181impl_spi_pin!(SPI2, SckPin, PC7, 5);
182impl_spi_pin!(SPI2, SckPin, PD3, 5);
183pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
184impl_spi!(SPI3, APB1);
185impl_spi_pin!(SPI3, MosiPin, PB0, 7);
186impl_spi_pin!(SPI3, MosiPin, PB2, 7);
187impl_spi_pin!(SPI3, SckPin, PB3, 6);
188impl_spi_pin!(SPI3, MisoPin, PB4, 6);
189impl_spi_pin!(SPI3, MosiPin, PB5, 6);
190impl_spi_pin!(SPI3, MosiPin, PC1, 5);
191impl_spi_pin!(SPI3, SckPin, PC10, 6);
192impl_spi_pin!(SPI3, MisoPin, PC11, 6);
193impl_spi_pin!(SPI3, MosiPin, PC12, 6);
194impl_spi_pin!(SPI3, MosiPin, PD0, 6);
195impl_spi_pin!(SPI3, MosiPin, PD6, 5);
163pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 196pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
164pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 197pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
165impl_usart!(USART1); 198impl_usart!(USART1);
@@ -213,6 +246,7 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
213pub use regs::dma_v2 as dma; 246pub use regs::dma_v2 as dma;
214pub use regs::exti_v1 as exti; 247pub use regs::exti_v1 as exti;
215pub use regs::gpio_v2 as gpio; 248pub use regs::gpio_v2 as gpio;
249pub use regs::spi_v1 as spi;
216pub use regs::syscfg_f4 as syscfg; 250pub use regs::syscfg_f4 as syscfg;
217pub use regs::usart_v1 as usart; 251pub use regs::usart_v1 as usart;
218mod regs; 252mod regs;
@@ -229,7 +263,7 @@ peripherals!(
229 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, 263 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9,
230 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 264 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
231 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 265 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
232 PH12, PH13, PH14, PH15, SYSCFG, USART1, USART2, USART3, USART6 266 PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3, USART6
233); 267);
234 268
235pub mod interrupt { 269pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f446re.rs b/embassy-stm32/src/pac/stm32f446re.rs
index 99da317ff..84c114821 100644
--- a/embassy-stm32/src/pac/stm32f446re.rs
+++ b/embassy-stm32/src/pac/stm32f446re.rs
@@ -160,6 +160,39 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
160impl_gpio_pin!(PH13, 7, 13, EXTI13); 160impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
164impl_spi!(SPI1, APB2);
165impl_spi_pin!(SPI1, SckPin, PA5, 5);
166impl_spi_pin!(SPI1, MisoPin, PA6, 5);
167impl_spi_pin!(SPI1, MosiPin, PA7, 5);
168impl_spi_pin!(SPI1, SckPin, PB3, 5);
169impl_spi_pin!(SPI1, MisoPin, PB4, 5);
170impl_spi_pin!(SPI1, MosiPin, PB5, 5);
171pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
172impl_spi!(SPI2, APB1);
173impl_spi_pin!(SPI2, SckPin, PA9, 5);
174impl_spi_pin!(SPI2, SckPin, PB10, 5);
175impl_spi_pin!(SPI2, SckPin, PB13, 5);
176impl_spi_pin!(SPI2, MisoPin, PB14, 5);
177impl_spi_pin!(SPI2, MosiPin, PB15, 5);
178impl_spi_pin!(SPI2, MosiPin, PC1, 7);
179impl_spi_pin!(SPI2, MisoPin, PC2, 5);
180impl_spi_pin!(SPI2, MosiPin, PC3, 5);
181impl_spi_pin!(SPI2, SckPin, PC7, 5);
182impl_spi_pin!(SPI2, SckPin, PD3, 5);
183pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
184impl_spi!(SPI3, APB1);
185impl_spi_pin!(SPI3, MosiPin, PB0, 7);
186impl_spi_pin!(SPI3, MosiPin, PB2, 7);
187impl_spi_pin!(SPI3, SckPin, PB3, 6);
188impl_spi_pin!(SPI3, MisoPin, PB4, 6);
189impl_spi_pin!(SPI3, MosiPin, PB5, 6);
190impl_spi_pin!(SPI3, MosiPin, PC1, 5);
191impl_spi_pin!(SPI3, SckPin, PC10, 6);
192impl_spi_pin!(SPI3, MisoPin, PC11, 6);
193impl_spi_pin!(SPI3, MosiPin, PC12, 6);
194impl_spi_pin!(SPI3, MosiPin, PD0, 6);
195impl_spi_pin!(SPI3, MosiPin, PD6, 5);
163pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 196pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
164pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 197pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
165impl_usart!(USART1); 198impl_usart!(USART1);
@@ -213,6 +246,7 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
213pub use regs::dma_v2 as dma; 246pub use regs::dma_v2 as dma;
214pub use regs::exti_v1 as exti; 247pub use regs::exti_v1 as exti;
215pub use regs::gpio_v2 as gpio; 248pub use regs::gpio_v2 as gpio;
249pub use regs::spi_v1 as spi;
216pub use regs::syscfg_f4 as syscfg; 250pub use regs::syscfg_f4 as syscfg;
217pub use regs::usart_v1 as usart; 251pub use regs::usart_v1 as usart;
218mod regs; 252mod regs;
@@ -229,7 +263,7 @@ peripherals!(
229 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, 263 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9,
230 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 264 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
231 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 265 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
232 PH12, PH13, PH14, PH15, SYSCFG, USART1, USART2, USART3, USART6 266 PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3, USART6
233); 267);
234 268
235pub mod interrupt { 269pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f446vc.rs b/embassy-stm32/src/pac/stm32f446vc.rs
index 99da317ff..349fc72e1 100644
--- a/embassy-stm32/src/pac/stm32f446vc.rs
+++ b/embassy-stm32/src/pac/stm32f446vc.rs
@@ -160,6 +160,51 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
160impl_gpio_pin!(PH13, 7, 13, EXTI13); 160impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
164impl_spi!(SPI1, APB2);
165impl_spi_pin!(SPI1, SckPin, PA5, 5);
166impl_spi_pin!(SPI1, MisoPin, PA6, 5);
167impl_spi_pin!(SPI1, MosiPin, PA7, 5);
168impl_spi_pin!(SPI1, SckPin, PB3, 5);
169impl_spi_pin!(SPI1, MisoPin, PB4, 5);
170impl_spi_pin!(SPI1, MosiPin, PB5, 5);
171pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
172impl_spi!(SPI2, APB1);
173impl_spi_pin!(SPI2, SckPin, PA9, 5);
174impl_spi_pin!(SPI2, SckPin, PB10, 5);
175impl_spi_pin!(SPI2, SckPin, PB13, 5);
176impl_spi_pin!(SPI2, MisoPin, PB14, 5);
177impl_spi_pin!(SPI2, MosiPin, PB15, 5);
178impl_spi_pin!(SPI2, MosiPin, PC1, 7);
179impl_spi_pin!(SPI2, MisoPin, PC2, 5);
180impl_spi_pin!(SPI2, MosiPin, PC3, 5);
181impl_spi_pin!(SPI2, SckPin, PC7, 5);
182impl_spi_pin!(SPI2, SckPin, PD3, 5);
183pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
184impl_spi!(SPI3, APB1);
185impl_spi_pin!(SPI3, MosiPin, PB0, 7);
186impl_spi_pin!(SPI3, MosiPin, PB2, 7);
187impl_spi_pin!(SPI3, SckPin, PB3, 6);
188impl_spi_pin!(SPI3, MisoPin, PB4, 6);
189impl_spi_pin!(SPI3, MosiPin, PB5, 6);
190impl_spi_pin!(SPI3, MosiPin, PC1, 5);
191impl_spi_pin!(SPI3, SckPin, PC10, 6);
192impl_spi_pin!(SPI3, MisoPin, PC11, 6);
193impl_spi_pin!(SPI3, MosiPin, PC12, 6);
194impl_spi_pin!(SPI3, MosiPin, PD0, 6);
195impl_spi_pin!(SPI3, MosiPin, PD6, 5);
196pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
197impl_spi!(SPI4, APB2);
198impl_spi_pin!(SPI4, MisoPin, PD0, 5);
199impl_spi_pin!(SPI4, SckPin, PE12, 5);
200impl_spi_pin!(SPI4, MisoPin, PE13, 5);
201impl_spi_pin!(SPI4, MosiPin, PE14, 5);
202impl_spi_pin!(SPI4, SckPin, PE2, 5);
203impl_spi_pin!(SPI4, MisoPin, PE5, 5);
204impl_spi_pin!(SPI4, MosiPin, PE6, 5);
205impl_spi_pin!(SPI4, SckPin, PG11, 6);
206impl_spi_pin!(SPI4, MisoPin, PG12, 6);
207impl_spi_pin!(SPI4, MosiPin, PG13, 6);
163pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 208pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
164pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 209pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
165impl_usart!(USART1); 210impl_usart!(USART1);
@@ -213,6 +258,7 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
213pub use regs::dma_v2 as dma; 258pub use regs::dma_v2 as dma;
214pub use regs::exti_v1 as exti; 259pub use regs::exti_v1 as exti;
215pub use regs::gpio_v2 as gpio; 260pub use regs::gpio_v2 as gpio;
261pub use regs::spi_v1 as spi;
216pub use regs::syscfg_f4 as syscfg; 262pub use regs::syscfg_f4 as syscfg;
217pub use regs::usart_v1 as usart; 263pub use regs::usart_v1 as usart;
218mod regs; 264mod regs;
@@ -229,7 +275,7 @@ peripherals!(
229 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, 275 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9,
230 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 276 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
231 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 277 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
232 PH12, PH13, PH14, PH15, SYSCFG, USART1, USART2, USART3, USART6 278 PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SPI4, SYSCFG, USART1, USART2, USART3, USART6
233); 279);
234 280
235pub mod interrupt { 281pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f446ve.rs b/embassy-stm32/src/pac/stm32f446ve.rs
index 99da317ff..349fc72e1 100644
--- a/embassy-stm32/src/pac/stm32f446ve.rs
+++ b/embassy-stm32/src/pac/stm32f446ve.rs
@@ -160,6 +160,51 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
160impl_gpio_pin!(PH13, 7, 13, EXTI13); 160impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
164impl_spi!(SPI1, APB2);
165impl_spi_pin!(SPI1, SckPin, PA5, 5);
166impl_spi_pin!(SPI1, MisoPin, PA6, 5);
167impl_spi_pin!(SPI1, MosiPin, PA7, 5);
168impl_spi_pin!(SPI1, SckPin, PB3, 5);
169impl_spi_pin!(SPI1, MisoPin, PB4, 5);
170impl_spi_pin!(SPI1, MosiPin, PB5, 5);
171pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
172impl_spi!(SPI2, APB1);
173impl_spi_pin!(SPI2, SckPin, PA9, 5);
174impl_spi_pin!(SPI2, SckPin, PB10, 5);
175impl_spi_pin!(SPI2, SckPin, PB13, 5);
176impl_spi_pin!(SPI2, MisoPin, PB14, 5);
177impl_spi_pin!(SPI2, MosiPin, PB15, 5);
178impl_spi_pin!(SPI2, MosiPin, PC1, 7);
179impl_spi_pin!(SPI2, MisoPin, PC2, 5);
180impl_spi_pin!(SPI2, MosiPin, PC3, 5);
181impl_spi_pin!(SPI2, SckPin, PC7, 5);
182impl_spi_pin!(SPI2, SckPin, PD3, 5);
183pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
184impl_spi!(SPI3, APB1);
185impl_spi_pin!(SPI3, MosiPin, PB0, 7);
186impl_spi_pin!(SPI3, MosiPin, PB2, 7);
187impl_spi_pin!(SPI3, SckPin, PB3, 6);
188impl_spi_pin!(SPI3, MisoPin, PB4, 6);
189impl_spi_pin!(SPI3, MosiPin, PB5, 6);
190impl_spi_pin!(SPI3, MosiPin, PC1, 5);
191impl_spi_pin!(SPI3, SckPin, PC10, 6);
192impl_spi_pin!(SPI3, MisoPin, PC11, 6);
193impl_spi_pin!(SPI3, MosiPin, PC12, 6);
194impl_spi_pin!(SPI3, MosiPin, PD0, 6);
195impl_spi_pin!(SPI3, MosiPin, PD6, 5);
196pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
197impl_spi!(SPI4, APB2);
198impl_spi_pin!(SPI4, MisoPin, PD0, 5);
199impl_spi_pin!(SPI4, SckPin, PE12, 5);
200impl_spi_pin!(SPI4, MisoPin, PE13, 5);
201impl_spi_pin!(SPI4, MosiPin, PE14, 5);
202impl_spi_pin!(SPI4, SckPin, PE2, 5);
203impl_spi_pin!(SPI4, MisoPin, PE5, 5);
204impl_spi_pin!(SPI4, MosiPin, PE6, 5);
205impl_spi_pin!(SPI4, SckPin, PG11, 6);
206impl_spi_pin!(SPI4, MisoPin, PG12, 6);
207impl_spi_pin!(SPI4, MosiPin, PG13, 6);
163pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 208pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
164pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 209pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
165impl_usart!(USART1); 210impl_usart!(USART1);
@@ -213,6 +258,7 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
213pub use regs::dma_v2 as dma; 258pub use regs::dma_v2 as dma;
214pub use regs::exti_v1 as exti; 259pub use regs::exti_v1 as exti;
215pub use regs::gpio_v2 as gpio; 260pub use regs::gpio_v2 as gpio;
261pub use regs::spi_v1 as spi;
216pub use regs::syscfg_f4 as syscfg; 262pub use regs::syscfg_f4 as syscfg;
217pub use regs::usart_v1 as usart; 263pub use regs::usart_v1 as usart;
218mod regs; 264mod regs;
@@ -229,7 +275,7 @@ peripherals!(
229 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, 275 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9,
230 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 276 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
231 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 277 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
232 PH12, PH13, PH14, PH15, SYSCFG, USART1, USART2, USART3, USART6 278 PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SPI4, SYSCFG, USART1, USART2, USART3, USART6
233); 279);
234 280
235pub mod interrupt { 281pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f446zc.rs b/embassy-stm32/src/pac/stm32f446zc.rs
index 99da317ff..349fc72e1 100644
--- a/embassy-stm32/src/pac/stm32f446zc.rs
+++ b/embassy-stm32/src/pac/stm32f446zc.rs
@@ -160,6 +160,51 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
160impl_gpio_pin!(PH13, 7, 13, EXTI13); 160impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
164impl_spi!(SPI1, APB2);
165impl_spi_pin!(SPI1, SckPin, PA5, 5);
166impl_spi_pin!(SPI1, MisoPin, PA6, 5);
167impl_spi_pin!(SPI1, MosiPin, PA7, 5);
168impl_spi_pin!(SPI1, SckPin, PB3, 5);
169impl_spi_pin!(SPI1, MisoPin, PB4, 5);
170impl_spi_pin!(SPI1, MosiPin, PB5, 5);
171pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
172impl_spi!(SPI2, APB1);
173impl_spi_pin!(SPI2, SckPin, PA9, 5);
174impl_spi_pin!(SPI2, SckPin, PB10, 5);
175impl_spi_pin!(SPI2, SckPin, PB13, 5);
176impl_spi_pin!(SPI2, MisoPin, PB14, 5);
177impl_spi_pin!(SPI2, MosiPin, PB15, 5);
178impl_spi_pin!(SPI2, MosiPin, PC1, 7);
179impl_spi_pin!(SPI2, MisoPin, PC2, 5);
180impl_spi_pin!(SPI2, MosiPin, PC3, 5);
181impl_spi_pin!(SPI2, SckPin, PC7, 5);
182impl_spi_pin!(SPI2, SckPin, PD3, 5);
183pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
184impl_spi!(SPI3, APB1);
185impl_spi_pin!(SPI3, MosiPin, PB0, 7);
186impl_spi_pin!(SPI3, MosiPin, PB2, 7);
187impl_spi_pin!(SPI3, SckPin, PB3, 6);
188impl_spi_pin!(SPI3, MisoPin, PB4, 6);
189impl_spi_pin!(SPI3, MosiPin, PB5, 6);
190impl_spi_pin!(SPI3, MosiPin, PC1, 5);
191impl_spi_pin!(SPI3, SckPin, PC10, 6);
192impl_spi_pin!(SPI3, MisoPin, PC11, 6);
193impl_spi_pin!(SPI3, MosiPin, PC12, 6);
194impl_spi_pin!(SPI3, MosiPin, PD0, 6);
195impl_spi_pin!(SPI3, MosiPin, PD6, 5);
196pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
197impl_spi!(SPI4, APB2);
198impl_spi_pin!(SPI4, MisoPin, PD0, 5);
199impl_spi_pin!(SPI4, SckPin, PE12, 5);
200impl_spi_pin!(SPI4, MisoPin, PE13, 5);
201impl_spi_pin!(SPI4, MosiPin, PE14, 5);
202impl_spi_pin!(SPI4, SckPin, PE2, 5);
203impl_spi_pin!(SPI4, MisoPin, PE5, 5);
204impl_spi_pin!(SPI4, MosiPin, PE6, 5);
205impl_spi_pin!(SPI4, SckPin, PG11, 6);
206impl_spi_pin!(SPI4, MisoPin, PG12, 6);
207impl_spi_pin!(SPI4, MosiPin, PG13, 6);
163pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 208pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
164pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 209pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
165impl_usart!(USART1); 210impl_usart!(USART1);
@@ -213,6 +258,7 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
213pub use regs::dma_v2 as dma; 258pub use regs::dma_v2 as dma;
214pub use regs::exti_v1 as exti; 259pub use regs::exti_v1 as exti;
215pub use regs::gpio_v2 as gpio; 260pub use regs::gpio_v2 as gpio;
261pub use regs::spi_v1 as spi;
216pub use regs::syscfg_f4 as syscfg; 262pub use regs::syscfg_f4 as syscfg;
217pub use regs::usart_v1 as usart; 263pub use regs::usart_v1 as usart;
218mod regs; 264mod regs;
@@ -229,7 +275,7 @@ peripherals!(
229 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, 275 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9,
230 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 276 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
231 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 277 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
232 PH12, PH13, PH14, PH15, SYSCFG, USART1, USART2, USART3, USART6 278 PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SPI4, SYSCFG, USART1, USART2, USART3, USART6
233); 279);
234 280
235pub mod interrupt { 281pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f446ze.rs b/embassy-stm32/src/pac/stm32f446ze.rs
index 99da317ff..349fc72e1 100644
--- a/embassy-stm32/src/pac/stm32f446ze.rs
+++ b/embassy-stm32/src/pac/stm32f446ze.rs
@@ -160,6 +160,51 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
160impl_gpio_pin!(PH13, 7, 13, EXTI13); 160impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
164impl_spi!(SPI1, APB2);
165impl_spi_pin!(SPI1, SckPin, PA5, 5);
166impl_spi_pin!(SPI1, MisoPin, PA6, 5);
167impl_spi_pin!(SPI1, MosiPin, PA7, 5);
168impl_spi_pin!(SPI1, SckPin, PB3, 5);
169impl_spi_pin!(SPI1, MisoPin, PB4, 5);
170impl_spi_pin!(SPI1, MosiPin, PB5, 5);
171pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
172impl_spi!(SPI2, APB1);
173impl_spi_pin!(SPI2, SckPin, PA9, 5);
174impl_spi_pin!(SPI2, SckPin, PB10, 5);
175impl_spi_pin!(SPI2, SckPin, PB13, 5);
176impl_spi_pin!(SPI2, MisoPin, PB14, 5);
177impl_spi_pin!(SPI2, MosiPin, PB15, 5);
178impl_spi_pin!(SPI2, MosiPin, PC1, 7);
179impl_spi_pin!(SPI2, MisoPin, PC2, 5);
180impl_spi_pin!(SPI2, MosiPin, PC3, 5);
181impl_spi_pin!(SPI2, SckPin, PC7, 5);
182impl_spi_pin!(SPI2, SckPin, PD3, 5);
183pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
184impl_spi!(SPI3, APB1);
185impl_spi_pin!(SPI3, MosiPin, PB0, 7);
186impl_spi_pin!(SPI3, MosiPin, PB2, 7);
187impl_spi_pin!(SPI3, SckPin, PB3, 6);
188impl_spi_pin!(SPI3, MisoPin, PB4, 6);
189impl_spi_pin!(SPI3, MosiPin, PB5, 6);
190impl_spi_pin!(SPI3, MosiPin, PC1, 5);
191impl_spi_pin!(SPI3, SckPin, PC10, 6);
192impl_spi_pin!(SPI3, MisoPin, PC11, 6);
193impl_spi_pin!(SPI3, MosiPin, PC12, 6);
194impl_spi_pin!(SPI3, MosiPin, PD0, 6);
195impl_spi_pin!(SPI3, MosiPin, PD6, 5);
196pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _);
197impl_spi!(SPI4, APB2);
198impl_spi_pin!(SPI4, MisoPin, PD0, 5);
199impl_spi_pin!(SPI4, SckPin, PE12, 5);
200impl_spi_pin!(SPI4, MisoPin, PE13, 5);
201impl_spi_pin!(SPI4, MosiPin, PE14, 5);
202impl_spi_pin!(SPI4, SckPin, PE2, 5);
203impl_spi_pin!(SPI4, MisoPin, PE5, 5);
204impl_spi_pin!(SPI4, MosiPin, PE6, 5);
205impl_spi_pin!(SPI4, SckPin, PG11, 6);
206impl_spi_pin!(SPI4, MisoPin, PG12, 6);
207impl_spi_pin!(SPI4, MosiPin, PG13, 6);
163pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 208pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
164pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 209pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
165impl_usart!(USART1); 210impl_usart!(USART1);
@@ -213,6 +258,7 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
213pub use regs::dma_v2 as dma; 258pub use regs::dma_v2 as dma;
214pub use regs::exti_v1 as exti; 259pub use regs::exti_v1 as exti;
215pub use regs::gpio_v2 as gpio; 260pub use regs::gpio_v2 as gpio;
261pub use regs::spi_v1 as spi;
216pub use regs::syscfg_f4 as syscfg; 262pub use regs::syscfg_f4 as syscfg;
217pub use regs::usart_v1 as usart; 263pub use regs::usart_v1 as usart;
218mod regs; 264mod regs;
@@ -229,7 +275,7 @@ peripherals!(
229 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, 275 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9,
230 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 276 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
231 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 277 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
232 PH12, PH13, PH14, PH15, SYSCFG, USART1, USART2, USART3, USART6 278 PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SPI4, SYSCFG, USART1, USART2, USART3, USART6
233); 279);
234 280
235pub mod interrupt { 281pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32f469ae.rs b/embassy-stm32/src/pac/stm32f469ae.rs
index bf68c2f6f..c44fd8eee 100644
--- a/embassy-stm32/src/pac/stm32f469ae.rs
+++ b/embassy-stm32/src/pac/stm32f469ae.rs
@@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 218impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f469ag.rs b/embassy-stm32/src/pac/stm32f469ag.rs
index bf68c2f6f..c44fd8eee 100644
--- a/embassy-stm32/src/pac/stm32f469ag.rs
+++ b/embassy-stm32/src/pac/stm32f469ag.rs
@@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 218impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f469ai.rs b/embassy-stm32/src/pac/stm32f469ai.rs
index bf68c2f6f..c44fd8eee 100644
--- a/embassy-stm32/src/pac/stm32f469ai.rs
+++ b/embassy-stm32/src/pac/stm32f469ai.rs
@@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 218impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f469be.rs b/embassy-stm32/src/pac/stm32f469be.rs
index bf68c2f6f..c44fd8eee 100644
--- a/embassy-stm32/src/pac/stm32f469be.rs
+++ b/embassy-stm32/src/pac/stm32f469be.rs
@@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 218impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f469bg.rs b/embassy-stm32/src/pac/stm32f469bg.rs
index bf68c2f6f..c44fd8eee 100644
--- a/embassy-stm32/src/pac/stm32f469bg.rs
+++ b/embassy-stm32/src/pac/stm32f469bg.rs
@@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 218impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f469bi.rs b/embassy-stm32/src/pac/stm32f469bi.rs
index bf68c2f6f..c44fd8eee 100644
--- a/embassy-stm32/src/pac/stm32f469bi.rs
+++ b/embassy-stm32/src/pac/stm32f469bi.rs
@@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 218impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f469ie.rs b/embassy-stm32/src/pac/stm32f469ie.rs
index bf68c2f6f..c44fd8eee 100644
--- a/embassy-stm32/src/pac/stm32f469ie.rs
+++ b/embassy-stm32/src/pac/stm32f469ie.rs
@@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 218impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f469ig.rs b/embassy-stm32/src/pac/stm32f469ig.rs
index bf68c2f6f..c44fd8eee 100644
--- a/embassy-stm32/src/pac/stm32f469ig.rs
+++ b/embassy-stm32/src/pac/stm32f469ig.rs
@@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 218impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f469ii.rs b/embassy-stm32/src/pac/stm32f469ii.rs
index bf68c2f6f..c44fd8eee 100644
--- a/embassy-stm32/src/pac/stm32f469ii.rs
+++ b/embassy-stm32/src/pac/stm32f469ii.rs
@@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 218impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f469ne.rs b/embassy-stm32/src/pac/stm32f469ne.rs
index bf68c2f6f..c44fd8eee 100644
--- a/embassy-stm32/src/pac/stm32f469ne.rs
+++ b/embassy-stm32/src/pac/stm32f469ne.rs
@@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 218impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f469ng.rs b/embassy-stm32/src/pac/stm32f469ng.rs
index bf68c2f6f..c44fd8eee 100644
--- a/embassy-stm32/src/pac/stm32f469ng.rs
+++ b/embassy-stm32/src/pac/stm32f469ng.rs
@@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 218impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f469ni.rs b/embassy-stm32/src/pac/stm32f469ni.rs
index bf68c2f6f..c44fd8eee 100644
--- a/embassy-stm32/src/pac/stm32f469ni.rs
+++ b/embassy-stm32/src/pac/stm32f469ni.rs
@@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 218impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f469ve.rs b/embassy-stm32/src/pac/stm32f469ve.rs
index bf68c2f6f..c44fd8eee 100644
--- a/embassy-stm32/src/pac/stm32f469ve.rs
+++ b/embassy-stm32/src/pac/stm32f469ve.rs
@@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 218impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f469vg.rs b/embassy-stm32/src/pac/stm32f469vg.rs
index bf68c2f6f..c44fd8eee 100644
--- a/embassy-stm32/src/pac/stm32f469vg.rs
+++ b/embassy-stm32/src/pac/stm32f469vg.rs
@@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 218impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f469vi.rs b/embassy-stm32/src/pac/stm32f469vi.rs
index bf68c2f6f..c44fd8eee 100644
--- a/embassy-stm32/src/pac/stm32f469vi.rs
+++ b/embassy-stm32/src/pac/stm32f469vi.rs
@@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 218impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f469ze.rs b/embassy-stm32/src/pac/stm32f469ze.rs
index bf68c2f6f..c44fd8eee 100644
--- a/embassy-stm32/src/pac/stm32f469ze.rs
+++ b/embassy-stm32/src/pac/stm32f469ze.rs
@@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 218impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f469zg.rs b/embassy-stm32/src/pac/stm32f469zg.rs
index bf68c2f6f..c44fd8eee 100644
--- a/embassy-stm32/src/pac/stm32f469zg.rs
+++ b/embassy-stm32/src/pac/stm32f469zg.rs
@@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 218impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f469zi.rs b/embassy-stm32/src/pac/stm32f469zi.rs
index bf68c2f6f..c44fd8eee 100644
--- a/embassy-stm32/src/pac/stm32f469zi.rs
+++ b/embassy-stm32/src/pac/stm32f469zi.rs
@@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 218impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f479ag.rs b/embassy-stm32/src/pac/stm32f479ag.rs
index 67bdb0390..fbb2b54cc 100644
--- a/embassy-stm32/src/pac/stm32f479ag.rs
+++ b/embassy-stm32/src/pac/stm32f479ag.rs
@@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 218impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f479ai.rs b/embassy-stm32/src/pac/stm32f479ai.rs
index 67bdb0390..fbb2b54cc 100644
--- a/embassy-stm32/src/pac/stm32f479ai.rs
+++ b/embassy-stm32/src/pac/stm32f479ai.rs
@@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 218impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f479bg.rs b/embassy-stm32/src/pac/stm32f479bg.rs
index 67bdb0390..fbb2b54cc 100644
--- a/embassy-stm32/src/pac/stm32f479bg.rs
+++ b/embassy-stm32/src/pac/stm32f479bg.rs
@@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 218impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f479bi.rs b/embassy-stm32/src/pac/stm32f479bi.rs
index 67bdb0390..fbb2b54cc 100644
--- a/embassy-stm32/src/pac/stm32f479bi.rs
+++ b/embassy-stm32/src/pac/stm32f479bi.rs
@@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 218impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f479ig.rs b/embassy-stm32/src/pac/stm32f479ig.rs
index 67bdb0390..fbb2b54cc 100644
--- a/embassy-stm32/src/pac/stm32f479ig.rs
+++ b/embassy-stm32/src/pac/stm32f479ig.rs
@@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 218impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f479ii.rs b/embassy-stm32/src/pac/stm32f479ii.rs
index 67bdb0390..fbb2b54cc 100644
--- a/embassy-stm32/src/pac/stm32f479ii.rs
+++ b/embassy-stm32/src/pac/stm32f479ii.rs
@@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 218impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f479ng.rs b/embassy-stm32/src/pac/stm32f479ng.rs
index 67bdb0390..fbb2b54cc 100644
--- a/embassy-stm32/src/pac/stm32f479ng.rs
+++ b/embassy-stm32/src/pac/stm32f479ng.rs
@@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 218impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f479ni.rs b/embassy-stm32/src/pac/stm32f479ni.rs
index 67bdb0390..fbb2b54cc 100644
--- a/embassy-stm32/src/pac/stm32f479ni.rs
+++ b/embassy-stm32/src/pac/stm32f479ni.rs
@@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 218impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f479vg.rs b/embassy-stm32/src/pac/stm32f479vg.rs
index 67bdb0390..fbb2b54cc 100644
--- a/embassy-stm32/src/pac/stm32f479vg.rs
+++ b/embassy-stm32/src/pac/stm32f479vg.rs
@@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 218impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f479vi.rs b/embassy-stm32/src/pac/stm32f479vi.rs
index 67bdb0390..fbb2b54cc 100644
--- a/embassy-stm32/src/pac/stm32f479vi.rs
+++ b/embassy-stm32/src/pac/stm32f479vi.rs
@@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 218impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f479zg.rs b/embassy-stm32/src/pac/stm32f479zg.rs
index 67bdb0390..fbb2b54cc 100644
--- a/embassy-stm32/src/pac/stm32f479zg.rs
+++ b/embassy-stm32/src/pac/stm32f479zg.rs
@@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 218impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32f479zi.rs b/embassy-stm32/src/pac/stm32f479zi.rs
index 67bdb0390..fbb2b54cc 100644
--- a/embassy-stm32/src/pac/stm32f479zi.rs
+++ b/embassy-stm32/src/pac/stm32f479zi.rs
@@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13);
212impl_gpio_pin!(PK14, 10, 14, EXTI14); 212impl_gpio_pin!(PK14, 10, 14, EXTI14);
213impl_gpio_pin!(PK15, 10, 15, EXTI15); 213impl_gpio_pin!(PK15, 10, 15, EXTI15);
214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 214pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
215impl_rng!(RNG); 215impl_rng!(RNG, HASH_RNG);
216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); 216pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); 217pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
218impl_usart!(USART1); 218impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l412c8.rs b/embassy-stm32/src/pac/stm32l412c8.rs
index 5478ea82e..6f7f9d3b4 100644
--- a/embassy-stm32/src/pac/stm32l412c8.rs
+++ b/embassy-stm32/src/pac/stm32l412c8.rs
@@ -110,7 +110,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
110impl_gpio_pin!(PH14, 7, 14, EXTI14); 110impl_gpio_pin!(PH14, 7, 14, EXTI14);
111impl_gpio_pin!(PH15, 7, 15, EXTI15); 111impl_gpio_pin!(PH15, 7, 15, EXTI15);
112pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 112pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
113impl_rng!(RNG); 113impl_rng!(RNG, RNG);
114pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 114pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
115pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 115pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
116impl_usart!(USART1); 116impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l412cb.rs b/embassy-stm32/src/pac/stm32l412cb.rs
index 5478ea82e..6f7f9d3b4 100644
--- a/embassy-stm32/src/pac/stm32l412cb.rs
+++ b/embassy-stm32/src/pac/stm32l412cb.rs
@@ -110,7 +110,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
110impl_gpio_pin!(PH14, 7, 14, EXTI14); 110impl_gpio_pin!(PH14, 7, 14, EXTI14);
111impl_gpio_pin!(PH15, 7, 15, EXTI15); 111impl_gpio_pin!(PH15, 7, 15, EXTI15);
112pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 112pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
113impl_rng!(RNG); 113impl_rng!(RNG, RNG);
114pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 114pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
115pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 115pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
116impl_usart!(USART1); 116impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l412k8.rs b/embassy-stm32/src/pac/stm32l412k8.rs
index f7027eeac..a8f1ee4bc 100644
--- a/embassy-stm32/src/pac/stm32l412k8.rs
+++ b/embassy-stm32/src/pac/stm32l412k8.rs
@@ -110,7 +110,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
110impl_gpio_pin!(PH14, 7, 14, EXTI14); 110impl_gpio_pin!(PH14, 7, 14, EXTI14);
111impl_gpio_pin!(PH15, 7, 15, EXTI15); 111impl_gpio_pin!(PH15, 7, 15, EXTI15);
112pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 112pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
113impl_rng!(RNG); 113impl_rng!(RNG, RNG);
114pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 114pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
115pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 115pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
116impl_usart!(USART1); 116impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l412kb.rs b/embassy-stm32/src/pac/stm32l412kb.rs
index f7027eeac..a8f1ee4bc 100644
--- a/embassy-stm32/src/pac/stm32l412kb.rs
+++ b/embassy-stm32/src/pac/stm32l412kb.rs
@@ -110,7 +110,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
110impl_gpio_pin!(PH14, 7, 14, EXTI14); 110impl_gpio_pin!(PH14, 7, 14, EXTI14);
111impl_gpio_pin!(PH15, 7, 15, EXTI15); 111impl_gpio_pin!(PH15, 7, 15, EXTI15);
112pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 112pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
113impl_rng!(RNG); 113impl_rng!(RNG, RNG);
114pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 114pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
115pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 115pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
116impl_usart!(USART1); 116impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l412r8.rs b/embassy-stm32/src/pac/stm32l412r8.rs
index 5478ea82e..6f7f9d3b4 100644
--- a/embassy-stm32/src/pac/stm32l412r8.rs
+++ b/embassy-stm32/src/pac/stm32l412r8.rs
@@ -110,7 +110,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
110impl_gpio_pin!(PH14, 7, 14, EXTI14); 110impl_gpio_pin!(PH14, 7, 14, EXTI14);
111impl_gpio_pin!(PH15, 7, 15, EXTI15); 111impl_gpio_pin!(PH15, 7, 15, EXTI15);
112pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 112pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
113impl_rng!(RNG); 113impl_rng!(RNG, RNG);
114pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 114pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
115pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 115pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
116impl_usart!(USART1); 116impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l412rb.rs b/embassy-stm32/src/pac/stm32l412rb.rs
index 5478ea82e..6f7f9d3b4 100644
--- a/embassy-stm32/src/pac/stm32l412rb.rs
+++ b/embassy-stm32/src/pac/stm32l412rb.rs
@@ -110,7 +110,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
110impl_gpio_pin!(PH14, 7, 14, EXTI14); 110impl_gpio_pin!(PH14, 7, 14, EXTI14);
111impl_gpio_pin!(PH15, 7, 15, EXTI15); 111impl_gpio_pin!(PH15, 7, 15, EXTI15);
112pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 112pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
113impl_rng!(RNG); 113impl_rng!(RNG, RNG);
114pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 114pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
115pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 115pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
116impl_usart!(USART1); 116impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l412t8.rs b/embassy-stm32/src/pac/stm32l412t8.rs
index f7027eeac..a8f1ee4bc 100644
--- a/embassy-stm32/src/pac/stm32l412t8.rs
+++ b/embassy-stm32/src/pac/stm32l412t8.rs
@@ -110,7 +110,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
110impl_gpio_pin!(PH14, 7, 14, EXTI14); 110impl_gpio_pin!(PH14, 7, 14, EXTI14);
111impl_gpio_pin!(PH15, 7, 15, EXTI15); 111impl_gpio_pin!(PH15, 7, 15, EXTI15);
112pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 112pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
113impl_rng!(RNG); 113impl_rng!(RNG, RNG);
114pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 114pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
115pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 115pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
116impl_usart!(USART1); 116impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l412tb.rs b/embassy-stm32/src/pac/stm32l412tb.rs
index f7027eeac..a8f1ee4bc 100644
--- a/embassy-stm32/src/pac/stm32l412tb.rs
+++ b/embassy-stm32/src/pac/stm32l412tb.rs
@@ -110,7 +110,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
110impl_gpio_pin!(PH14, 7, 14, EXTI14); 110impl_gpio_pin!(PH14, 7, 14, EXTI14);
111impl_gpio_pin!(PH15, 7, 15, EXTI15); 111impl_gpio_pin!(PH15, 7, 15, EXTI15);
112pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 112pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
113impl_rng!(RNG); 113impl_rng!(RNG, RNG);
114pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 114pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
115pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 115pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
116impl_usart!(USART1); 116impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l422cb.rs b/embassy-stm32/src/pac/stm32l422cb.rs
index 7a85aca7c..2faebe71e 100644
--- a/embassy-stm32/src/pac/stm32l422cb.rs
+++ b/embassy-stm32/src/pac/stm32l422cb.rs
@@ -110,7 +110,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
110impl_gpio_pin!(PH14, 7, 14, EXTI14); 110impl_gpio_pin!(PH14, 7, 14, EXTI14);
111impl_gpio_pin!(PH15, 7, 15, EXTI15); 111impl_gpio_pin!(PH15, 7, 15, EXTI15);
112pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 112pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
113impl_rng!(RNG); 113impl_rng!(RNG, RNG);
114pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 114pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
115pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 115pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
116impl_usart!(USART1); 116impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l422kb.rs b/embassy-stm32/src/pac/stm32l422kb.rs
index 7de35a6c1..36dca78dd 100644
--- a/embassy-stm32/src/pac/stm32l422kb.rs
+++ b/embassy-stm32/src/pac/stm32l422kb.rs
@@ -110,7 +110,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
110impl_gpio_pin!(PH14, 7, 14, EXTI14); 110impl_gpio_pin!(PH14, 7, 14, EXTI14);
111impl_gpio_pin!(PH15, 7, 15, EXTI15); 111impl_gpio_pin!(PH15, 7, 15, EXTI15);
112pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 112pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
113impl_rng!(RNG); 113impl_rng!(RNG, RNG);
114pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 114pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
115pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 115pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
116impl_usart!(USART1); 116impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l422rb.rs b/embassy-stm32/src/pac/stm32l422rb.rs
index 7a85aca7c..2faebe71e 100644
--- a/embassy-stm32/src/pac/stm32l422rb.rs
+++ b/embassy-stm32/src/pac/stm32l422rb.rs
@@ -110,7 +110,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
110impl_gpio_pin!(PH14, 7, 14, EXTI14); 110impl_gpio_pin!(PH14, 7, 14, EXTI14);
111impl_gpio_pin!(PH15, 7, 15, EXTI15); 111impl_gpio_pin!(PH15, 7, 15, EXTI15);
112pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 112pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
113impl_rng!(RNG); 113impl_rng!(RNG, RNG);
114pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 114pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
115pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 115pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
116impl_usart!(USART1); 116impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l422tb.rs b/embassy-stm32/src/pac/stm32l422tb.rs
index 7de35a6c1..36dca78dd 100644
--- a/embassy-stm32/src/pac/stm32l422tb.rs
+++ b/embassy-stm32/src/pac/stm32l422tb.rs
@@ -110,7 +110,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
110impl_gpio_pin!(PH14, 7, 14, EXTI14); 110impl_gpio_pin!(PH14, 7, 14, EXTI14);
111impl_gpio_pin!(PH15, 7, 15, EXTI15); 111impl_gpio_pin!(PH15, 7, 15, EXTI15);
112pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 112pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
113impl_rng!(RNG); 113impl_rng!(RNG, RNG);
114pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 114pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
115pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 115pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
116impl_usart!(USART1); 116impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l431cb.rs b/embassy-stm32/src/pac/stm32l431cb.rs
index cab88d7ae..73f31d278 100644
--- a/embassy-stm32/src/pac/stm32l431cb.rs
+++ b/embassy-stm32/src/pac/stm32l431cb.rs
@@ -127,7 +127,40 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
127impl_gpio_pin!(PH14, 7, 14, EXTI14); 127impl_gpio_pin!(PH14, 7, 14, EXTI14);
128impl_gpio_pin!(PH15, 7, 15, EXTI15); 128impl_gpio_pin!(PH15, 7, 15, EXTI15);
129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
130impl_rng!(RNG); 130impl_rng!(RNG, RNG);
131pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
132impl_spi!(SPI1, APB2);
133impl_spi_pin!(SPI1, SckPin, PA1, 5);
134impl_spi_pin!(SPI1, MisoPin, PA11, 5);
135impl_spi_pin!(SPI1, MosiPin, PA12, 5);
136impl_spi_pin!(SPI1, SckPin, PA5, 5);
137impl_spi_pin!(SPI1, MisoPin, PA6, 5);
138impl_spi_pin!(SPI1, MosiPin, PA7, 5);
139impl_spi_pin!(SPI1, SckPin, PB3, 5);
140impl_spi_pin!(SPI1, MisoPin, PB4, 5);
141impl_spi_pin!(SPI1, MosiPin, PB5, 5);
142impl_spi_pin!(SPI1, SckPin, PE13, 5);
143impl_spi_pin!(SPI1, MisoPin, PE14, 5);
144impl_spi_pin!(SPI1, MosiPin, PE15, 5);
145pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
146impl_spi!(SPI2, APB1);
147impl_spi_pin!(SPI2, SckPin, PB10, 5);
148impl_spi_pin!(SPI2, SckPin, PB13, 5);
149impl_spi_pin!(SPI2, MisoPin, PB14, 5);
150impl_spi_pin!(SPI2, MosiPin, PB15, 5);
151impl_spi_pin!(SPI2, MisoPin, PC2, 5);
152impl_spi_pin!(SPI2, MosiPin, PC3, 5);
153impl_spi_pin!(SPI2, SckPin, PD1, 5);
154impl_spi_pin!(SPI2, MisoPin, PD3, 5);
155impl_spi_pin!(SPI2, MosiPin, PD4, 5);
156pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
157impl_spi!(SPI3, APB1);
158impl_spi_pin!(SPI3, SckPin, PB3, 6);
159impl_spi_pin!(SPI3, MisoPin, PB4, 6);
160impl_spi_pin!(SPI3, MosiPin, PB5, 6);
161impl_spi_pin!(SPI3, SckPin, PC10, 6);
162impl_spi_pin!(SPI3, MisoPin, PC11, 6);
163impl_spi_pin!(SPI3, MosiPin, PC12, 6);
131pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
132pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 165pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
133impl_usart!(USART1); 166impl_usart!(USART1);
@@ -180,6 +213,7 @@ pub use regs::dma_v1 as dma;
180pub use regs::exti_v1 as exti; 213pub use regs::exti_v1 as exti;
181pub use regs::gpio_v2 as gpio; 214pub use regs::gpio_v2 as gpio;
182pub use regs::rng_v1 as rng; 215pub use regs::rng_v1 as rng;
216pub use regs::spi_v2 as spi;
183pub use regs::syscfg_l4 as syscfg; 217pub use regs::syscfg_l4 as syscfg;
184pub use regs::usart_v2 as usart; 218pub use regs::usart_v2 as usart;
185mod regs; 219mod regs;
@@ -194,7 +228,7 @@ peripherals!(
194 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, 228 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5,
195 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, 229 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7,
196 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, 230 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9,
197 PH10, PH11, PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART3 231 PH10, PH11, PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3
198); 232);
199 233
200pub mod interrupt { 234pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l431cc.rs b/embassy-stm32/src/pac/stm32l431cc.rs
index cab88d7ae..73f31d278 100644
--- a/embassy-stm32/src/pac/stm32l431cc.rs
+++ b/embassy-stm32/src/pac/stm32l431cc.rs
@@ -127,7 +127,40 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
127impl_gpio_pin!(PH14, 7, 14, EXTI14); 127impl_gpio_pin!(PH14, 7, 14, EXTI14);
128impl_gpio_pin!(PH15, 7, 15, EXTI15); 128impl_gpio_pin!(PH15, 7, 15, EXTI15);
129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
130impl_rng!(RNG); 130impl_rng!(RNG, RNG);
131pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
132impl_spi!(SPI1, APB2);
133impl_spi_pin!(SPI1, SckPin, PA1, 5);
134impl_spi_pin!(SPI1, MisoPin, PA11, 5);
135impl_spi_pin!(SPI1, MosiPin, PA12, 5);
136impl_spi_pin!(SPI1, SckPin, PA5, 5);
137impl_spi_pin!(SPI1, MisoPin, PA6, 5);
138impl_spi_pin!(SPI1, MosiPin, PA7, 5);
139impl_spi_pin!(SPI1, SckPin, PB3, 5);
140impl_spi_pin!(SPI1, MisoPin, PB4, 5);
141impl_spi_pin!(SPI1, MosiPin, PB5, 5);
142impl_spi_pin!(SPI1, SckPin, PE13, 5);
143impl_spi_pin!(SPI1, MisoPin, PE14, 5);
144impl_spi_pin!(SPI1, MosiPin, PE15, 5);
145pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
146impl_spi!(SPI2, APB1);
147impl_spi_pin!(SPI2, SckPin, PB10, 5);
148impl_spi_pin!(SPI2, SckPin, PB13, 5);
149impl_spi_pin!(SPI2, MisoPin, PB14, 5);
150impl_spi_pin!(SPI2, MosiPin, PB15, 5);
151impl_spi_pin!(SPI2, MisoPin, PC2, 5);
152impl_spi_pin!(SPI2, MosiPin, PC3, 5);
153impl_spi_pin!(SPI2, SckPin, PD1, 5);
154impl_spi_pin!(SPI2, MisoPin, PD3, 5);
155impl_spi_pin!(SPI2, MosiPin, PD4, 5);
156pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
157impl_spi!(SPI3, APB1);
158impl_spi_pin!(SPI3, SckPin, PB3, 6);
159impl_spi_pin!(SPI3, MisoPin, PB4, 6);
160impl_spi_pin!(SPI3, MosiPin, PB5, 6);
161impl_spi_pin!(SPI3, SckPin, PC10, 6);
162impl_spi_pin!(SPI3, MisoPin, PC11, 6);
163impl_spi_pin!(SPI3, MosiPin, PC12, 6);
131pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
132pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 165pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
133impl_usart!(USART1); 166impl_usart!(USART1);
@@ -180,6 +213,7 @@ pub use regs::dma_v1 as dma;
180pub use regs::exti_v1 as exti; 213pub use regs::exti_v1 as exti;
181pub use regs::gpio_v2 as gpio; 214pub use regs::gpio_v2 as gpio;
182pub use regs::rng_v1 as rng; 215pub use regs::rng_v1 as rng;
216pub use regs::spi_v2 as spi;
183pub use regs::syscfg_l4 as syscfg; 217pub use regs::syscfg_l4 as syscfg;
184pub use regs::usart_v2 as usart; 218pub use regs::usart_v2 as usart;
185mod regs; 219mod regs;
@@ -194,7 +228,7 @@ peripherals!(
194 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, 228 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5,
195 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, 229 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7,
196 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, 230 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9,
197 PH10, PH11, PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART3 231 PH10, PH11, PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3
198); 232);
199 233
200pub mod interrupt { 234pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l431kb.rs b/embassy-stm32/src/pac/stm32l431kb.rs
index cb3c2eb5e..f4fe06052 100644
--- a/embassy-stm32/src/pac/stm32l431kb.rs
+++ b/embassy-stm32/src/pac/stm32l431kb.rs
@@ -127,7 +127,29 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
127impl_gpio_pin!(PH14, 7, 14, EXTI14); 127impl_gpio_pin!(PH14, 7, 14, EXTI14);
128impl_gpio_pin!(PH15, 7, 15, EXTI15); 128impl_gpio_pin!(PH15, 7, 15, EXTI15);
129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
130impl_rng!(RNG); 130impl_rng!(RNG, RNG);
131pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
132impl_spi!(SPI1, APB2);
133impl_spi_pin!(SPI1, SckPin, PA1, 5);
134impl_spi_pin!(SPI1, MisoPin, PA11, 5);
135impl_spi_pin!(SPI1, MosiPin, PA12, 5);
136impl_spi_pin!(SPI1, SckPin, PA5, 5);
137impl_spi_pin!(SPI1, MisoPin, PA6, 5);
138impl_spi_pin!(SPI1, MosiPin, PA7, 5);
139impl_spi_pin!(SPI1, SckPin, PB3, 5);
140impl_spi_pin!(SPI1, MisoPin, PB4, 5);
141impl_spi_pin!(SPI1, MosiPin, PB5, 5);
142impl_spi_pin!(SPI1, SckPin, PE13, 5);
143impl_spi_pin!(SPI1, MisoPin, PE14, 5);
144impl_spi_pin!(SPI1, MosiPin, PE15, 5);
145pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
146impl_spi!(SPI3, APB1);
147impl_spi_pin!(SPI3, SckPin, PB3, 6);
148impl_spi_pin!(SPI3, MisoPin, PB4, 6);
149impl_spi_pin!(SPI3, MosiPin, PB5, 6);
150impl_spi_pin!(SPI3, SckPin, PC10, 6);
151impl_spi_pin!(SPI3, MisoPin, PC11, 6);
152impl_spi_pin!(SPI3, MosiPin, PC12, 6);
131pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 153pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
132pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 154pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
133impl_usart!(USART1); 155impl_usart!(USART1);
@@ -158,6 +180,7 @@ pub use regs::dma_v1 as dma;
158pub use regs::exti_v1 as exti; 180pub use regs::exti_v1 as exti;
159pub use regs::gpio_v2 as gpio; 181pub use regs::gpio_v2 as gpio;
160pub use regs::rng_v1 as rng; 182pub use regs::rng_v1 as rng;
183pub use regs::spi_v2 as spi;
161pub use regs::syscfg_l4 as syscfg; 184pub use regs::syscfg_l4 as syscfg;
162pub use regs::usart_v2 as usart; 185pub use regs::usart_v2 as usart;
163mod regs; 186mod regs;
@@ -172,7 +195,7 @@ peripherals!(
172 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, 195 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5,
173 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, 196 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7,
174 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, 197 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9,
175 PH10, PH11, PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2 198 PH10, PH11, PH12, PH13, PH14, PH15, RNG, SPI1, SPI3, SYSCFG, USART1, USART2
176); 199);
177 200
178pub mod interrupt { 201pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l431kc.rs b/embassy-stm32/src/pac/stm32l431kc.rs
index cb3c2eb5e..f4fe06052 100644
--- a/embassy-stm32/src/pac/stm32l431kc.rs
+++ b/embassy-stm32/src/pac/stm32l431kc.rs
@@ -127,7 +127,29 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
127impl_gpio_pin!(PH14, 7, 14, EXTI14); 127impl_gpio_pin!(PH14, 7, 14, EXTI14);
128impl_gpio_pin!(PH15, 7, 15, EXTI15); 128impl_gpio_pin!(PH15, 7, 15, EXTI15);
129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
130impl_rng!(RNG); 130impl_rng!(RNG, RNG);
131pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
132impl_spi!(SPI1, APB2);
133impl_spi_pin!(SPI1, SckPin, PA1, 5);
134impl_spi_pin!(SPI1, MisoPin, PA11, 5);
135impl_spi_pin!(SPI1, MosiPin, PA12, 5);
136impl_spi_pin!(SPI1, SckPin, PA5, 5);
137impl_spi_pin!(SPI1, MisoPin, PA6, 5);
138impl_spi_pin!(SPI1, MosiPin, PA7, 5);
139impl_spi_pin!(SPI1, SckPin, PB3, 5);
140impl_spi_pin!(SPI1, MisoPin, PB4, 5);
141impl_spi_pin!(SPI1, MosiPin, PB5, 5);
142impl_spi_pin!(SPI1, SckPin, PE13, 5);
143impl_spi_pin!(SPI1, MisoPin, PE14, 5);
144impl_spi_pin!(SPI1, MosiPin, PE15, 5);
145pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
146impl_spi!(SPI3, APB1);
147impl_spi_pin!(SPI3, SckPin, PB3, 6);
148impl_spi_pin!(SPI3, MisoPin, PB4, 6);
149impl_spi_pin!(SPI3, MosiPin, PB5, 6);
150impl_spi_pin!(SPI3, SckPin, PC10, 6);
151impl_spi_pin!(SPI3, MisoPin, PC11, 6);
152impl_spi_pin!(SPI3, MosiPin, PC12, 6);
131pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 153pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
132pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 154pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
133impl_usart!(USART1); 155impl_usart!(USART1);
@@ -158,6 +180,7 @@ pub use regs::dma_v1 as dma;
158pub use regs::exti_v1 as exti; 180pub use regs::exti_v1 as exti;
159pub use regs::gpio_v2 as gpio; 181pub use regs::gpio_v2 as gpio;
160pub use regs::rng_v1 as rng; 182pub use regs::rng_v1 as rng;
183pub use regs::spi_v2 as spi;
161pub use regs::syscfg_l4 as syscfg; 184pub use regs::syscfg_l4 as syscfg;
162pub use regs::usart_v2 as usart; 185pub use regs::usart_v2 as usart;
163mod regs; 186mod regs;
@@ -172,7 +195,7 @@ peripherals!(
172 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, 195 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5,
173 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, 196 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7,
174 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, 197 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9,
175 PH10, PH11, PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2 198 PH10, PH11, PH12, PH13, PH14, PH15, RNG, SPI1, SPI3, SYSCFG, USART1, USART2
176); 199);
177 200
178pub mod interrupt { 201pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l431rb.rs b/embassy-stm32/src/pac/stm32l431rb.rs
index cab88d7ae..73f31d278 100644
--- a/embassy-stm32/src/pac/stm32l431rb.rs
+++ b/embassy-stm32/src/pac/stm32l431rb.rs
@@ -127,7 +127,40 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
127impl_gpio_pin!(PH14, 7, 14, EXTI14); 127impl_gpio_pin!(PH14, 7, 14, EXTI14);
128impl_gpio_pin!(PH15, 7, 15, EXTI15); 128impl_gpio_pin!(PH15, 7, 15, EXTI15);
129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
130impl_rng!(RNG); 130impl_rng!(RNG, RNG);
131pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
132impl_spi!(SPI1, APB2);
133impl_spi_pin!(SPI1, SckPin, PA1, 5);
134impl_spi_pin!(SPI1, MisoPin, PA11, 5);
135impl_spi_pin!(SPI1, MosiPin, PA12, 5);
136impl_spi_pin!(SPI1, SckPin, PA5, 5);
137impl_spi_pin!(SPI1, MisoPin, PA6, 5);
138impl_spi_pin!(SPI1, MosiPin, PA7, 5);
139impl_spi_pin!(SPI1, SckPin, PB3, 5);
140impl_spi_pin!(SPI1, MisoPin, PB4, 5);
141impl_spi_pin!(SPI1, MosiPin, PB5, 5);
142impl_spi_pin!(SPI1, SckPin, PE13, 5);
143impl_spi_pin!(SPI1, MisoPin, PE14, 5);
144impl_spi_pin!(SPI1, MosiPin, PE15, 5);
145pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
146impl_spi!(SPI2, APB1);
147impl_spi_pin!(SPI2, SckPin, PB10, 5);
148impl_spi_pin!(SPI2, SckPin, PB13, 5);
149impl_spi_pin!(SPI2, MisoPin, PB14, 5);
150impl_spi_pin!(SPI2, MosiPin, PB15, 5);
151impl_spi_pin!(SPI2, MisoPin, PC2, 5);
152impl_spi_pin!(SPI2, MosiPin, PC3, 5);
153impl_spi_pin!(SPI2, SckPin, PD1, 5);
154impl_spi_pin!(SPI2, MisoPin, PD3, 5);
155impl_spi_pin!(SPI2, MosiPin, PD4, 5);
156pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
157impl_spi!(SPI3, APB1);
158impl_spi_pin!(SPI3, SckPin, PB3, 6);
159impl_spi_pin!(SPI3, MisoPin, PB4, 6);
160impl_spi_pin!(SPI3, MosiPin, PB5, 6);
161impl_spi_pin!(SPI3, SckPin, PC10, 6);
162impl_spi_pin!(SPI3, MisoPin, PC11, 6);
163impl_spi_pin!(SPI3, MosiPin, PC12, 6);
131pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
132pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 165pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
133impl_usart!(USART1); 166impl_usart!(USART1);
@@ -180,6 +213,7 @@ pub use regs::dma_v1 as dma;
180pub use regs::exti_v1 as exti; 213pub use regs::exti_v1 as exti;
181pub use regs::gpio_v2 as gpio; 214pub use regs::gpio_v2 as gpio;
182pub use regs::rng_v1 as rng; 215pub use regs::rng_v1 as rng;
216pub use regs::spi_v2 as spi;
183pub use regs::syscfg_l4 as syscfg; 217pub use regs::syscfg_l4 as syscfg;
184pub use regs::usart_v2 as usart; 218pub use regs::usart_v2 as usart;
185mod regs; 219mod regs;
@@ -194,7 +228,7 @@ peripherals!(
194 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, 228 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5,
195 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, 229 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7,
196 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, 230 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9,
197 PH10, PH11, PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART3 231 PH10, PH11, PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3
198); 232);
199 233
200pub mod interrupt { 234pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l431rc.rs b/embassy-stm32/src/pac/stm32l431rc.rs
index cab88d7ae..73f31d278 100644
--- a/embassy-stm32/src/pac/stm32l431rc.rs
+++ b/embassy-stm32/src/pac/stm32l431rc.rs
@@ -127,7 +127,40 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
127impl_gpio_pin!(PH14, 7, 14, EXTI14); 127impl_gpio_pin!(PH14, 7, 14, EXTI14);
128impl_gpio_pin!(PH15, 7, 15, EXTI15); 128impl_gpio_pin!(PH15, 7, 15, EXTI15);
129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
130impl_rng!(RNG); 130impl_rng!(RNG, RNG);
131pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
132impl_spi!(SPI1, APB2);
133impl_spi_pin!(SPI1, SckPin, PA1, 5);
134impl_spi_pin!(SPI1, MisoPin, PA11, 5);
135impl_spi_pin!(SPI1, MosiPin, PA12, 5);
136impl_spi_pin!(SPI1, SckPin, PA5, 5);
137impl_spi_pin!(SPI1, MisoPin, PA6, 5);
138impl_spi_pin!(SPI1, MosiPin, PA7, 5);
139impl_spi_pin!(SPI1, SckPin, PB3, 5);
140impl_spi_pin!(SPI1, MisoPin, PB4, 5);
141impl_spi_pin!(SPI1, MosiPin, PB5, 5);
142impl_spi_pin!(SPI1, SckPin, PE13, 5);
143impl_spi_pin!(SPI1, MisoPin, PE14, 5);
144impl_spi_pin!(SPI1, MosiPin, PE15, 5);
145pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
146impl_spi!(SPI2, APB1);
147impl_spi_pin!(SPI2, SckPin, PB10, 5);
148impl_spi_pin!(SPI2, SckPin, PB13, 5);
149impl_spi_pin!(SPI2, MisoPin, PB14, 5);
150impl_spi_pin!(SPI2, MosiPin, PB15, 5);
151impl_spi_pin!(SPI2, MisoPin, PC2, 5);
152impl_spi_pin!(SPI2, MosiPin, PC3, 5);
153impl_spi_pin!(SPI2, SckPin, PD1, 5);
154impl_spi_pin!(SPI2, MisoPin, PD3, 5);
155impl_spi_pin!(SPI2, MosiPin, PD4, 5);
156pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
157impl_spi!(SPI3, APB1);
158impl_spi_pin!(SPI3, SckPin, PB3, 6);
159impl_spi_pin!(SPI3, MisoPin, PB4, 6);
160impl_spi_pin!(SPI3, MosiPin, PB5, 6);
161impl_spi_pin!(SPI3, SckPin, PC10, 6);
162impl_spi_pin!(SPI3, MisoPin, PC11, 6);
163impl_spi_pin!(SPI3, MosiPin, PC12, 6);
131pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
132pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 165pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
133impl_usart!(USART1); 166impl_usart!(USART1);
@@ -180,6 +213,7 @@ pub use regs::dma_v1 as dma;
180pub use regs::exti_v1 as exti; 213pub use regs::exti_v1 as exti;
181pub use regs::gpio_v2 as gpio; 214pub use regs::gpio_v2 as gpio;
182pub use regs::rng_v1 as rng; 215pub use regs::rng_v1 as rng;
216pub use regs::spi_v2 as spi;
183pub use regs::syscfg_l4 as syscfg; 217pub use regs::syscfg_l4 as syscfg;
184pub use regs::usart_v2 as usart; 218pub use regs::usart_v2 as usart;
185mod regs; 219mod regs;
@@ -194,7 +228,7 @@ peripherals!(
194 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, 228 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5,
195 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, 229 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7,
196 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, 230 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9,
197 PH10, PH11, PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART3 231 PH10, PH11, PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3
198); 232);
199 233
200pub mod interrupt { 234pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l431vc.rs b/embassy-stm32/src/pac/stm32l431vc.rs
index cab88d7ae..73f31d278 100644
--- a/embassy-stm32/src/pac/stm32l431vc.rs
+++ b/embassy-stm32/src/pac/stm32l431vc.rs
@@ -127,7 +127,40 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
127impl_gpio_pin!(PH14, 7, 14, EXTI14); 127impl_gpio_pin!(PH14, 7, 14, EXTI14);
128impl_gpio_pin!(PH15, 7, 15, EXTI15); 128impl_gpio_pin!(PH15, 7, 15, EXTI15);
129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
130impl_rng!(RNG); 130impl_rng!(RNG, RNG);
131pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
132impl_spi!(SPI1, APB2);
133impl_spi_pin!(SPI1, SckPin, PA1, 5);
134impl_spi_pin!(SPI1, MisoPin, PA11, 5);
135impl_spi_pin!(SPI1, MosiPin, PA12, 5);
136impl_spi_pin!(SPI1, SckPin, PA5, 5);
137impl_spi_pin!(SPI1, MisoPin, PA6, 5);
138impl_spi_pin!(SPI1, MosiPin, PA7, 5);
139impl_spi_pin!(SPI1, SckPin, PB3, 5);
140impl_spi_pin!(SPI1, MisoPin, PB4, 5);
141impl_spi_pin!(SPI1, MosiPin, PB5, 5);
142impl_spi_pin!(SPI1, SckPin, PE13, 5);
143impl_spi_pin!(SPI1, MisoPin, PE14, 5);
144impl_spi_pin!(SPI1, MosiPin, PE15, 5);
145pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
146impl_spi!(SPI2, APB1);
147impl_spi_pin!(SPI2, SckPin, PB10, 5);
148impl_spi_pin!(SPI2, SckPin, PB13, 5);
149impl_spi_pin!(SPI2, MisoPin, PB14, 5);
150impl_spi_pin!(SPI2, MosiPin, PB15, 5);
151impl_spi_pin!(SPI2, MisoPin, PC2, 5);
152impl_spi_pin!(SPI2, MosiPin, PC3, 5);
153impl_spi_pin!(SPI2, SckPin, PD1, 5);
154impl_spi_pin!(SPI2, MisoPin, PD3, 5);
155impl_spi_pin!(SPI2, MosiPin, PD4, 5);
156pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
157impl_spi!(SPI3, APB1);
158impl_spi_pin!(SPI3, SckPin, PB3, 6);
159impl_spi_pin!(SPI3, MisoPin, PB4, 6);
160impl_spi_pin!(SPI3, MosiPin, PB5, 6);
161impl_spi_pin!(SPI3, SckPin, PC10, 6);
162impl_spi_pin!(SPI3, MisoPin, PC11, 6);
163impl_spi_pin!(SPI3, MosiPin, PC12, 6);
131pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
132pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 165pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
133impl_usart!(USART1); 166impl_usart!(USART1);
@@ -180,6 +213,7 @@ pub use regs::dma_v1 as dma;
180pub use regs::exti_v1 as exti; 213pub use regs::exti_v1 as exti;
181pub use regs::gpio_v2 as gpio; 214pub use regs::gpio_v2 as gpio;
182pub use regs::rng_v1 as rng; 215pub use regs::rng_v1 as rng;
216pub use regs::spi_v2 as spi;
183pub use regs::syscfg_l4 as syscfg; 217pub use regs::syscfg_l4 as syscfg;
184pub use regs::usart_v2 as usart; 218pub use regs::usart_v2 as usart;
185mod regs; 219mod regs;
@@ -194,7 +228,7 @@ peripherals!(
194 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, 228 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5,
195 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, 229 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7,
196 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, 230 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9,
197 PH10, PH11, PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART3 231 PH10, PH11, PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3
198); 232);
199 233
200pub mod interrupt { 234pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l432kb.rs b/embassy-stm32/src/pac/stm32l432kb.rs
index 78ef53b1f..6f49490e1 100644
--- a/embassy-stm32/src/pac/stm32l432kb.rs
+++ b/embassy-stm32/src/pac/stm32l432kb.rs
@@ -93,7 +93,26 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
93impl_gpio_pin!(PH14, 7, 14, EXTI14); 93impl_gpio_pin!(PH14, 7, 14, EXTI14);
94impl_gpio_pin!(PH15, 7, 15, EXTI15); 94impl_gpio_pin!(PH15, 7, 15, EXTI15);
95pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 95pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
96impl_rng!(RNG); 96impl_rng!(RNG, RNG);
97pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
98impl_spi!(SPI1, APB2);
99impl_spi_pin!(SPI1, SckPin, PA1, 5);
100impl_spi_pin!(SPI1, MisoPin, PA11, 5);
101impl_spi_pin!(SPI1, MosiPin, PA12, 5);
102impl_spi_pin!(SPI1, SckPin, PA5, 5);
103impl_spi_pin!(SPI1, MisoPin, PA6, 5);
104impl_spi_pin!(SPI1, MosiPin, PA7, 5);
105impl_spi_pin!(SPI1, SckPin, PB3, 5);
106impl_spi_pin!(SPI1, MisoPin, PB4, 5);
107impl_spi_pin!(SPI1, MosiPin, PB5, 5);
108pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
109impl_spi!(SPI3, APB1);
110impl_spi_pin!(SPI3, SckPin, PB3, 6);
111impl_spi_pin!(SPI3, MisoPin, PB4, 6);
112impl_spi_pin!(SPI3, MosiPin, PB5, 6);
113impl_spi_pin!(SPI3, SckPin, PC10, 6);
114impl_spi_pin!(SPI3, MisoPin, PC11, 6);
115impl_spi_pin!(SPI3, MosiPin, PC12, 6);
97pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 116pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
98pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 117pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
99impl_usart!(USART1); 118impl_usart!(USART1);
@@ -119,6 +138,7 @@ pub use regs::dma_v1 as dma;
119pub use regs::exti_v1 as exti; 138pub use regs::exti_v1 as exti;
120pub use regs::gpio_v2 as gpio; 139pub use regs::gpio_v2 as gpio;
121pub use regs::rng_v1 as rng; 140pub use regs::rng_v1 as rng;
141pub use regs::spi_v2 as spi;
122pub use regs::syscfg_l4 as syscfg; 142pub use regs::syscfg_l4 as syscfg;
123pub use regs::usart_v2 as usart; 143pub use regs::usart_v2 as usart;
124mod regs; 144mod regs;
@@ -131,7 +151,8 @@ peripherals!(
131 PA0, PA1, PA2, PA3, PA4, PA5, PA6, PA7, PA8, PA9, PA10, PA11, PA12, PA13, PA14, PA15, PB0, PB1, 151 PA0, PA1, PA2, PA3, PA4, PA5, PA6, PA7, PA8, PA9, PA10, PA11, PA12, PA13, PA14, PA15, PB0, PB1,
132 PB2, PB3, PB4, PB5, PB6, PB7, PB8, PB9, PB10, PB11, PB12, PB13, PB14, PB15, PC0, PC1, PC2, PC3, 152 PB2, PB3, PB4, PB5, PB6, PB7, PB8, PB9, PB10, PB11, PB12, PB13, PB14, PB15, PC0, PC1, PC2, PC3,
133 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PH0, PH1, PH2, PH3, PH4, PH5, 153 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PH0, PH1, PH2, PH3, PH4, PH5,
134 PH6, PH7, PH8, PH9, PH10, PH11, PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2 154 PH6, PH7, PH8, PH9, PH10, PH11, PH12, PH13, PH14, PH15, RNG, SPI1, SPI3, SYSCFG, USART1,
155 USART2
135); 156);
136 157
137pub mod interrupt { 158pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l432kc.rs b/embassy-stm32/src/pac/stm32l432kc.rs
index 78ef53b1f..6f49490e1 100644
--- a/embassy-stm32/src/pac/stm32l432kc.rs
+++ b/embassy-stm32/src/pac/stm32l432kc.rs
@@ -93,7 +93,26 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
93impl_gpio_pin!(PH14, 7, 14, EXTI14); 93impl_gpio_pin!(PH14, 7, 14, EXTI14);
94impl_gpio_pin!(PH15, 7, 15, EXTI15); 94impl_gpio_pin!(PH15, 7, 15, EXTI15);
95pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 95pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
96impl_rng!(RNG); 96impl_rng!(RNG, RNG);
97pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
98impl_spi!(SPI1, APB2);
99impl_spi_pin!(SPI1, SckPin, PA1, 5);
100impl_spi_pin!(SPI1, MisoPin, PA11, 5);
101impl_spi_pin!(SPI1, MosiPin, PA12, 5);
102impl_spi_pin!(SPI1, SckPin, PA5, 5);
103impl_spi_pin!(SPI1, MisoPin, PA6, 5);
104impl_spi_pin!(SPI1, MosiPin, PA7, 5);
105impl_spi_pin!(SPI1, SckPin, PB3, 5);
106impl_spi_pin!(SPI1, MisoPin, PB4, 5);
107impl_spi_pin!(SPI1, MosiPin, PB5, 5);
108pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
109impl_spi!(SPI3, APB1);
110impl_spi_pin!(SPI3, SckPin, PB3, 6);
111impl_spi_pin!(SPI3, MisoPin, PB4, 6);
112impl_spi_pin!(SPI3, MosiPin, PB5, 6);
113impl_spi_pin!(SPI3, SckPin, PC10, 6);
114impl_spi_pin!(SPI3, MisoPin, PC11, 6);
115impl_spi_pin!(SPI3, MosiPin, PC12, 6);
97pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 116pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
98pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 117pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
99impl_usart!(USART1); 118impl_usart!(USART1);
@@ -119,6 +138,7 @@ pub use regs::dma_v1 as dma;
119pub use regs::exti_v1 as exti; 138pub use regs::exti_v1 as exti;
120pub use regs::gpio_v2 as gpio; 139pub use regs::gpio_v2 as gpio;
121pub use regs::rng_v1 as rng; 140pub use regs::rng_v1 as rng;
141pub use regs::spi_v2 as spi;
122pub use regs::syscfg_l4 as syscfg; 142pub use regs::syscfg_l4 as syscfg;
123pub use regs::usart_v2 as usart; 143pub use regs::usart_v2 as usart;
124mod regs; 144mod regs;
@@ -131,7 +151,8 @@ peripherals!(
131 PA0, PA1, PA2, PA3, PA4, PA5, PA6, PA7, PA8, PA9, PA10, PA11, PA12, PA13, PA14, PA15, PB0, PB1, 151 PA0, PA1, PA2, PA3, PA4, PA5, PA6, PA7, PA8, PA9, PA10, PA11, PA12, PA13, PA14, PA15, PB0, PB1,
132 PB2, PB3, PB4, PB5, PB6, PB7, PB8, PB9, PB10, PB11, PB12, PB13, PB14, PB15, PC0, PC1, PC2, PC3, 152 PB2, PB3, PB4, PB5, PB6, PB7, PB8, PB9, PB10, PB11, PB12, PB13, PB14, PB15, PC0, PC1, PC2, PC3,
133 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PH0, PH1, PH2, PH3, PH4, PH5, 153 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PH0, PH1, PH2, PH3, PH4, PH5,
134 PH6, PH7, PH8, PH9, PH10, PH11, PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2 154 PH6, PH7, PH8, PH9, PH10, PH11, PH12, PH13, PH14, PH15, RNG, SPI1, SPI3, SYSCFG, USART1,
155 USART2
135); 156);
136 157
137pub mod interrupt { 158pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l433cb.rs b/embassy-stm32/src/pac/stm32l433cb.rs
index 2736824db..523c14eb5 100644
--- a/embassy-stm32/src/pac/stm32l433cb.rs
+++ b/embassy-stm32/src/pac/stm32l433cb.rs
@@ -127,7 +127,40 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
127impl_gpio_pin!(PH14, 7, 14, EXTI14); 127impl_gpio_pin!(PH14, 7, 14, EXTI14);
128impl_gpio_pin!(PH15, 7, 15, EXTI15); 128impl_gpio_pin!(PH15, 7, 15, EXTI15);
129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
130impl_rng!(RNG); 130impl_rng!(RNG, RNG);
131pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
132impl_spi!(SPI1, APB2);
133impl_spi_pin!(SPI1, SckPin, PA1, 5);
134impl_spi_pin!(SPI1, MisoPin, PA11, 5);
135impl_spi_pin!(SPI1, MosiPin, PA12, 5);
136impl_spi_pin!(SPI1, SckPin, PA5, 5);
137impl_spi_pin!(SPI1, MisoPin, PA6, 5);
138impl_spi_pin!(SPI1, MosiPin, PA7, 5);
139impl_spi_pin!(SPI1, SckPin, PB3, 5);
140impl_spi_pin!(SPI1, MisoPin, PB4, 5);
141impl_spi_pin!(SPI1, MosiPin, PB5, 5);
142impl_spi_pin!(SPI1, SckPin, PE13, 5);
143impl_spi_pin!(SPI1, MisoPin, PE14, 5);
144impl_spi_pin!(SPI1, MosiPin, PE15, 5);
145pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
146impl_spi!(SPI2, APB1);
147impl_spi_pin!(SPI2, SckPin, PB10, 5);
148impl_spi_pin!(SPI2, SckPin, PB13, 5);
149impl_spi_pin!(SPI2, MisoPin, PB14, 5);
150impl_spi_pin!(SPI2, MosiPin, PB15, 5);
151impl_spi_pin!(SPI2, MisoPin, PC2, 5);
152impl_spi_pin!(SPI2, MosiPin, PC3, 5);
153impl_spi_pin!(SPI2, SckPin, PD1, 5);
154impl_spi_pin!(SPI2, MisoPin, PD3, 5);
155impl_spi_pin!(SPI2, MosiPin, PD4, 5);
156pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
157impl_spi!(SPI3, APB1);
158impl_spi_pin!(SPI3, SckPin, PB3, 6);
159impl_spi_pin!(SPI3, MisoPin, PB4, 6);
160impl_spi_pin!(SPI3, MosiPin, PB5, 6);
161impl_spi_pin!(SPI3, SckPin, PC10, 6);
162impl_spi_pin!(SPI3, MisoPin, PC11, 6);
163impl_spi_pin!(SPI3, MosiPin, PC12, 6);
131pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
132pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 165pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
133impl_usart!(USART1); 166impl_usart!(USART1);
@@ -180,6 +213,7 @@ pub use regs::dma_v1 as dma;
180pub use regs::exti_v1 as exti; 213pub use regs::exti_v1 as exti;
181pub use regs::gpio_v2 as gpio; 214pub use regs::gpio_v2 as gpio;
182pub use regs::rng_v1 as rng; 215pub use regs::rng_v1 as rng;
216pub use regs::spi_v2 as spi;
183pub use regs::syscfg_l4 as syscfg; 217pub use regs::syscfg_l4 as syscfg;
184pub use regs::usart_v2 as usart; 218pub use regs::usart_v2 as usart;
185mod regs; 219mod regs;
@@ -194,7 +228,7 @@ peripherals!(
194 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, 228 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5,
195 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, 229 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7,
196 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, 230 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9,
197 PH10, PH11, PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART3 231 PH10, PH11, PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3
198); 232);
199 233
200pub mod interrupt { 234pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l433cc.rs b/embassy-stm32/src/pac/stm32l433cc.rs
index 2736824db..523c14eb5 100644
--- a/embassy-stm32/src/pac/stm32l433cc.rs
+++ b/embassy-stm32/src/pac/stm32l433cc.rs
@@ -127,7 +127,40 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
127impl_gpio_pin!(PH14, 7, 14, EXTI14); 127impl_gpio_pin!(PH14, 7, 14, EXTI14);
128impl_gpio_pin!(PH15, 7, 15, EXTI15); 128impl_gpio_pin!(PH15, 7, 15, EXTI15);
129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
130impl_rng!(RNG); 130impl_rng!(RNG, RNG);
131pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
132impl_spi!(SPI1, APB2);
133impl_spi_pin!(SPI1, SckPin, PA1, 5);
134impl_spi_pin!(SPI1, MisoPin, PA11, 5);
135impl_spi_pin!(SPI1, MosiPin, PA12, 5);
136impl_spi_pin!(SPI1, SckPin, PA5, 5);
137impl_spi_pin!(SPI1, MisoPin, PA6, 5);
138impl_spi_pin!(SPI1, MosiPin, PA7, 5);
139impl_spi_pin!(SPI1, SckPin, PB3, 5);
140impl_spi_pin!(SPI1, MisoPin, PB4, 5);
141impl_spi_pin!(SPI1, MosiPin, PB5, 5);
142impl_spi_pin!(SPI1, SckPin, PE13, 5);
143impl_spi_pin!(SPI1, MisoPin, PE14, 5);
144impl_spi_pin!(SPI1, MosiPin, PE15, 5);
145pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
146impl_spi!(SPI2, APB1);
147impl_spi_pin!(SPI2, SckPin, PB10, 5);
148impl_spi_pin!(SPI2, SckPin, PB13, 5);
149impl_spi_pin!(SPI2, MisoPin, PB14, 5);
150impl_spi_pin!(SPI2, MosiPin, PB15, 5);
151impl_spi_pin!(SPI2, MisoPin, PC2, 5);
152impl_spi_pin!(SPI2, MosiPin, PC3, 5);
153impl_spi_pin!(SPI2, SckPin, PD1, 5);
154impl_spi_pin!(SPI2, MisoPin, PD3, 5);
155impl_spi_pin!(SPI2, MosiPin, PD4, 5);
156pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
157impl_spi!(SPI3, APB1);
158impl_spi_pin!(SPI3, SckPin, PB3, 6);
159impl_spi_pin!(SPI3, MisoPin, PB4, 6);
160impl_spi_pin!(SPI3, MosiPin, PB5, 6);
161impl_spi_pin!(SPI3, SckPin, PC10, 6);
162impl_spi_pin!(SPI3, MisoPin, PC11, 6);
163impl_spi_pin!(SPI3, MosiPin, PC12, 6);
131pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
132pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 165pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
133impl_usart!(USART1); 166impl_usart!(USART1);
@@ -180,6 +213,7 @@ pub use regs::dma_v1 as dma;
180pub use regs::exti_v1 as exti; 213pub use regs::exti_v1 as exti;
181pub use regs::gpio_v2 as gpio; 214pub use regs::gpio_v2 as gpio;
182pub use regs::rng_v1 as rng; 215pub use regs::rng_v1 as rng;
216pub use regs::spi_v2 as spi;
183pub use regs::syscfg_l4 as syscfg; 217pub use regs::syscfg_l4 as syscfg;
184pub use regs::usart_v2 as usart; 218pub use regs::usart_v2 as usart;
185mod regs; 219mod regs;
@@ -194,7 +228,7 @@ peripherals!(
194 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, 228 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5,
195 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, 229 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7,
196 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, 230 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9,
197 PH10, PH11, PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART3 231 PH10, PH11, PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3
198); 232);
199 233
200pub mod interrupt { 234pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l433rb.rs b/embassy-stm32/src/pac/stm32l433rb.rs
index 2736824db..523c14eb5 100644
--- a/embassy-stm32/src/pac/stm32l433rb.rs
+++ b/embassy-stm32/src/pac/stm32l433rb.rs
@@ -127,7 +127,40 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
127impl_gpio_pin!(PH14, 7, 14, EXTI14); 127impl_gpio_pin!(PH14, 7, 14, EXTI14);
128impl_gpio_pin!(PH15, 7, 15, EXTI15); 128impl_gpio_pin!(PH15, 7, 15, EXTI15);
129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
130impl_rng!(RNG); 130impl_rng!(RNG, RNG);
131pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
132impl_spi!(SPI1, APB2);
133impl_spi_pin!(SPI1, SckPin, PA1, 5);
134impl_spi_pin!(SPI1, MisoPin, PA11, 5);
135impl_spi_pin!(SPI1, MosiPin, PA12, 5);
136impl_spi_pin!(SPI1, SckPin, PA5, 5);
137impl_spi_pin!(SPI1, MisoPin, PA6, 5);
138impl_spi_pin!(SPI1, MosiPin, PA7, 5);
139impl_spi_pin!(SPI1, SckPin, PB3, 5);
140impl_spi_pin!(SPI1, MisoPin, PB4, 5);
141impl_spi_pin!(SPI1, MosiPin, PB5, 5);
142impl_spi_pin!(SPI1, SckPin, PE13, 5);
143impl_spi_pin!(SPI1, MisoPin, PE14, 5);
144impl_spi_pin!(SPI1, MosiPin, PE15, 5);
145pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
146impl_spi!(SPI2, APB1);
147impl_spi_pin!(SPI2, SckPin, PB10, 5);
148impl_spi_pin!(SPI2, SckPin, PB13, 5);
149impl_spi_pin!(SPI2, MisoPin, PB14, 5);
150impl_spi_pin!(SPI2, MosiPin, PB15, 5);
151impl_spi_pin!(SPI2, MisoPin, PC2, 5);
152impl_spi_pin!(SPI2, MosiPin, PC3, 5);
153impl_spi_pin!(SPI2, SckPin, PD1, 5);
154impl_spi_pin!(SPI2, MisoPin, PD3, 5);
155impl_spi_pin!(SPI2, MosiPin, PD4, 5);
156pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
157impl_spi!(SPI3, APB1);
158impl_spi_pin!(SPI3, SckPin, PB3, 6);
159impl_spi_pin!(SPI3, MisoPin, PB4, 6);
160impl_spi_pin!(SPI3, MosiPin, PB5, 6);
161impl_spi_pin!(SPI3, SckPin, PC10, 6);
162impl_spi_pin!(SPI3, MisoPin, PC11, 6);
163impl_spi_pin!(SPI3, MosiPin, PC12, 6);
131pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
132pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 165pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
133impl_usart!(USART1); 166impl_usart!(USART1);
@@ -180,6 +213,7 @@ pub use regs::dma_v1 as dma;
180pub use regs::exti_v1 as exti; 213pub use regs::exti_v1 as exti;
181pub use regs::gpio_v2 as gpio; 214pub use regs::gpio_v2 as gpio;
182pub use regs::rng_v1 as rng; 215pub use regs::rng_v1 as rng;
216pub use regs::spi_v2 as spi;
183pub use regs::syscfg_l4 as syscfg; 217pub use regs::syscfg_l4 as syscfg;
184pub use regs::usart_v2 as usart; 218pub use regs::usart_v2 as usart;
185mod regs; 219mod regs;
@@ -194,7 +228,7 @@ peripherals!(
194 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, 228 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5,
195 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, 229 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7,
196 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, 230 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9,
197 PH10, PH11, PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART3 231 PH10, PH11, PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3
198); 232);
199 233
200pub mod interrupt { 234pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l433rc.rs b/embassy-stm32/src/pac/stm32l433rc.rs
index 2736824db..523c14eb5 100644
--- a/embassy-stm32/src/pac/stm32l433rc.rs
+++ b/embassy-stm32/src/pac/stm32l433rc.rs
@@ -127,7 +127,40 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
127impl_gpio_pin!(PH14, 7, 14, EXTI14); 127impl_gpio_pin!(PH14, 7, 14, EXTI14);
128impl_gpio_pin!(PH15, 7, 15, EXTI15); 128impl_gpio_pin!(PH15, 7, 15, EXTI15);
129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
130impl_rng!(RNG); 130impl_rng!(RNG, RNG);
131pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
132impl_spi!(SPI1, APB2);
133impl_spi_pin!(SPI1, SckPin, PA1, 5);
134impl_spi_pin!(SPI1, MisoPin, PA11, 5);
135impl_spi_pin!(SPI1, MosiPin, PA12, 5);
136impl_spi_pin!(SPI1, SckPin, PA5, 5);
137impl_spi_pin!(SPI1, MisoPin, PA6, 5);
138impl_spi_pin!(SPI1, MosiPin, PA7, 5);
139impl_spi_pin!(SPI1, SckPin, PB3, 5);
140impl_spi_pin!(SPI1, MisoPin, PB4, 5);
141impl_spi_pin!(SPI1, MosiPin, PB5, 5);
142impl_spi_pin!(SPI1, SckPin, PE13, 5);
143impl_spi_pin!(SPI1, MisoPin, PE14, 5);
144impl_spi_pin!(SPI1, MosiPin, PE15, 5);
145pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
146impl_spi!(SPI2, APB1);
147impl_spi_pin!(SPI2, SckPin, PB10, 5);
148impl_spi_pin!(SPI2, SckPin, PB13, 5);
149impl_spi_pin!(SPI2, MisoPin, PB14, 5);
150impl_spi_pin!(SPI2, MosiPin, PB15, 5);
151impl_spi_pin!(SPI2, MisoPin, PC2, 5);
152impl_spi_pin!(SPI2, MosiPin, PC3, 5);
153impl_spi_pin!(SPI2, SckPin, PD1, 5);
154impl_spi_pin!(SPI2, MisoPin, PD3, 5);
155impl_spi_pin!(SPI2, MosiPin, PD4, 5);
156pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
157impl_spi!(SPI3, APB1);
158impl_spi_pin!(SPI3, SckPin, PB3, 6);
159impl_spi_pin!(SPI3, MisoPin, PB4, 6);
160impl_spi_pin!(SPI3, MosiPin, PB5, 6);
161impl_spi_pin!(SPI3, SckPin, PC10, 6);
162impl_spi_pin!(SPI3, MisoPin, PC11, 6);
163impl_spi_pin!(SPI3, MosiPin, PC12, 6);
131pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
132pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 165pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
133impl_usart!(USART1); 166impl_usart!(USART1);
@@ -180,6 +213,7 @@ pub use regs::dma_v1 as dma;
180pub use regs::exti_v1 as exti; 213pub use regs::exti_v1 as exti;
181pub use regs::gpio_v2 as gpio; 214pub use regs::gpio_v2 as gpio;
182pub use regs::rng_v1 as rng; 215pub use regs::rng_v1 as rng;
216pub use regs::spi_v2 as spi;
183pub use regs::syscfg_l4 as syscfg; 217pub use regs::syscfg_l4 as syscfg;
184pub use regs::usart_v2 as usart; 218pub use regs::usart_v2 as usart;
185mod regs; 219mod regs;
@@ -194,7 +228,7 @@ peripherals!(
194 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, 228 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5,
195 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, 229 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7,
196 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, 230 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9,
197 PH10, PH11, PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART3 231 PH10, PH11, PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3
198); 232);
199 233
200pub mod interrupt { 234pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l433vc.rs b/embassy-stm32/src/pac/stm32l433vc.rs
index 2736824db..523c14eb5 100644
--- a/embassy-stm32/src/pac/stm32l433vc.rs
+++ b/embassy-stm32/src/pac/stm32l433vc.rs
@@ -127,7 +127,40 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
127impl_gpio_pin!(PH14, 7, 14, EXTI14); 127impl_gpio_pin!(PH14, 7, 14, EXTI14);
128impl_gpio_pin!(PH15, 7, 15, EXTI15); 128impl_gpio_pin!(PH15, 7, 15, EXTI15);
129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
130impl_rng!(RNG); 130impl_rng!(RNG, RNG);
131pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
132impl_spi!(SPI1, APB2);
133impl_spi_pin!(SPI1, SckPin, PA1, 5);
134impl_spi_pin!(SPI1, MisoPin, PA11, 5);
135impl_spi_pin!(SPI1, MosiPin, PA12, 5);
136impl_spi_pin!(SPI1, SckPin, PA5, 5);
137impl_spi_pin!(SPI1, MisoPin, PA6, 5);
138impl_spi_pin!(SPI1, MosiPin, PA7, 5);
139impl_spi_pin!(SPI1, SckPin, PB3, 5);
140impl_spi_pin!(SPI1, MisoPin, PB4, 5);
141impl_spi_pin!(SPI1, MosiPin, PB5, 5);
142impl_spi_pin!(SPI1, SckPin, PE13, 5);
143impl_spi_pin!(SPI1, MisoPin, PE14, 5);
144impl_spi_pin!(SPI1, MosiPin, PE15, 5);
145pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
146impl_spi!(SPI2, APB1);
147impl_spi_pin!(SPI2, SckPin, PB10, 5);
148impl_spi_pin!(SPI2, SckPin, PB13, 5);
149impl_spi_pin!(SPI2, MisoPin, PB14, 5);
150impl_spi_pin!(SPI2, MosiPin, PB15, 5);
151impl_spi_pin!(SPI2, MisoPin, PC2, 5);
152impl_spi_pin!(SPI2, MosiPin, PC3, 5);
153impl_spi_pin!(SPI2, SckPin, PD1, 5);
154impl_spi_pin!(SPI2, MisoPin, PD3, 5);
155impl_spi_pin!(SPI2, MosiPin, PD4, 5);
156pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
157impl_spi!(SPI3, APB1);
158impl_spi_pin!(SPI3, SckPin, PB3, 6);
159impl_spi_pin!(SPI3, MisoPin, PB4, 6);
160impl_spi_pin!(SPI3, MosiPin, PB5, 6);
161impl_spi_pin!(SPI3, SckPin, PC10, 6);
162impl_spi_pin!(SPI3, MisoPin, PC11, 6);
163impl_spi_pin!(SPI3, MosiPin, PC12, 6);
131pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
132pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 165pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
133impl_usart!(USART1); 166impl_usart!(USART1);
@@ -180,6 +213,7 @@ pub use regs::dma_v1 as dma;
180pub use regs::exti_v1 as exti; 213pub use regs::exti_v1 as exti;
181pub use regs::gpio_v2 as gpio; 214pub use regs::gpio_v2 as gpio;
182pub use regs::rng_v1 as rng; 215pub use regs::rng_v1 as rng;
216pub use regs::spi_v2 as spi;
183pub use regs::syscfg_l4 as syscfg; 217pub use regs::syscfg_l4 as syscfg;
184pub use regs::usart_v2 as usart; 218pub use regs::usart_v2 as usart;
185mod regs; 219mod regs;
@@ -194,7 +228,7 @@ peripherals!(
194 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, 228 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5,
195 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, 229 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7,
196 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, 230 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9,
197 PH10, PH11, PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART3 231 PH10, PH11, PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3
198); 232);
199 233
200pub mod interrupt { 234pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l442kc.rs b/embassy-stm32/src/pac/stm32l442kc.rs
index 2bcd51e9f..43847827e 100644
--- a/embassy-stm32/src/pac/stm32l442kc.rs
+++ b/embassy-stm32/src/pac/stm32l442kc.rs
@@ -93,7 +93,26 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
93impl_gpio_pin!(PH14, 7, 14, EXTI14); 93impl_gpio_pin!(PH14, 7, 14, EXTI14);
94impl_gpio_pin!(PH15, 7, 15, EXTI15); 94impl_gpio_pin!(PH15, 7, 15, EXTI15);
95pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 95pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
96impl_rng!(RNG); 96impl_rng!(RNG, RNG);
97pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
98impl_spi!(SPI1, APB2);
99impl_spi_pin!(SPI1, SckPin, PA1, 5);
100impl_spi_pin!(SPI1, MisoPin, PA11, 5);
101impl_spi_pin!(SPI1, MosiPin, PA12, 5);
102impl_spi_pin!(SPI1, SckPin, PA5, 5);
103impl_spi_pin!(SPI1, MisoPin, PA6, 5);
104impl_spi_pin!(SPI1, MosiPin, PA7, 5);
105impl_spi_pin!(SPI1, SckPin, PB3, 5);
106impl_spi_pin!(SPI1, MisoPin, PB4, 5);
107impl_spi_pin!(SPI1, MosiPin, PB5, 5);
108pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
109impl_spi!(SPI3, APB1);
110impl_spi_pin!(SPI3, SckPin, PB3, 6);
111impl_spi_pin!(SPI3, MisoPin, PB4, 6);
112impl_spi_pin!(SPI3, MosiPin, PB5, 6);
113impl_spi_pin!(SPI3, SckPin, PC10, 6);
114impl_spi_pin!(SPI3, MisoPin, PC11, 6);
115impl_spi_pin!(SPI3, MosiPin, PC12, 6);
97pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 116pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
98pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 117pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
99impl_usart!(USART1); 118impl_usart!(USART1);
@@ -119,6 +138,7 @@ pub use regs::dma_v1 as dma;
119pub use regs::exti_v1 as exti; 138pub use regs::exti_v1 as exti;
120pub use regs::gpio_v2 as gpio; 139pub use regs::gpio_v2 as gpio;
121pub use regs::rng_v1 as rng; 140pub use regs::rng_v1 as rng;
141pub use regs::spi_v2 as spi;
122pub use regs::syscfg_l4 as syscfg; 142pub use regs::syscfg_l4 as syscfg;
123pub use regs::usart_v2 as usart; 143pub use regs::usart_v2 as usart;
124mod regs; 144mod regs;
@@ -131,7 +151,8 @@ peripherals!(
131 PA0, PA1, PA2, PA3, PA4, PA5, PA6, PA7, PA8, PA9, PA10, PA11, PA12, PA13, PA14, PA15, PB0, PB1, 151 PA0, PA1, PA2, PA3, PA4, PA5, PA6, PA7, PA8, PA9, PA10, PA11, PA12, PA13, PA14, PA15, PB0, PB1,
132 PB2, PB3, PB4, PB5, PB6, PB7, PB8, PB9, PB10, PB11, PB12, PB13, PB14, PB15, PC0, PC1, PC2, PC3, 152 PB2, PB3, PB4, PB5, PB6, PB7, PB8, PB9, PB10, PB11, PB12, PB13, PB14, PB15, PC0, PC1, PC2, PC3,
133 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PH0, PH1, PH2, PH3, PH4, PH5, 153 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PH0, PH1, PH2, PH3, PH4, PH5,
134 PH6, PH7, PH8, PH9, PH10, PH11, PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2 154 PH6, PH7, PH8, PH9, PH10, PH11, PH12, PH13, PH14, PH15, RNG, SPI1, SPI3, SYSCFG, USART1,
155 USART2
135); 156);
136 157
137pub mod interrupt { 158pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l443cc.rs b/embassy-stm32/src/pac/stm32l443cc.rs
index 93f7c8bfa..221a674a0 100644
--- a/embassy-stm32/src/pac/stm32l443cc.rs
+++ b/embassy-stm32/src/pac/stm32l443cc.rs
@@ -127,7 +127,40 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
127impl_gpio_pin!(PH14, 7, 14, EXTI14); 127impl_gpio_pin!(PH14, 7, 14, EXTI14);
128impl_gpio_pin!(PH15, 7, 15, EXTI15); 128impl_gpio_pin!(PH15, 7, 15, EXTI15);
129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
130impl_rng!(RNG); 130impl_rng!(RNG, RNG);
131pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
132impl_spi!(SPI1, APB2);
133impl_spi_pin!(SPI1, SckPin, PA1, 5);
134impl_spi_pin!(SPI1, MisoPin, PA11, 5);
135impl_spi_pin!(SPI1, MosiPin, PA12, 5);
136impl_spi_pin!(SPI1, SckPin, PA5, 5);
137impl_spi_pin!(SPI1, MisoPin, PA6, 5);
138impl_spi_pin!(SPI1, MosiPin, PA7, 5);
139impl_spi_pin!(SPI1, SckPin, PB3, 5);
140impl_spi_pin!(SPI1, MisoPin, PB4, 5);
141impl_spi_pin!(SPI1, MosiPin, PB5, 5);
142impl_spi_pin!(SPI1, SckPin, PE13, 5);
143impl_spi_pin!(SPI1, MisoPin, PE14, 5);
144impl_spi_pin!(SPI1, MosiPin, PE15, 5);
145pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
146impl_spi!(SPI2, APB1);
147impl_spi_pin!(SPI2, SckPin, PB10, 5);
148impl_spi_pin!(SPI2, SckPin, PB13, 5);
149impl_spi_pin!(SPI2, MisoPin, PB14, 5);
150impl_spi_pin!(SPI2, MosiPin, PB15, 5);
151impl_spi_pin!(SPI2, MisoPin, PC2, 5);
152impl_spi_pin!(SPI2, MosiPin, PC3, 5);
153impl_spi_pin!(SPI2, SckPin, PD1, 5);
154impl_spi_pin!(SPI2, MisoPin, PD3, 5);
155impl_spi_pin!(SPI2, MosiPin, PD4, 5);
156pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
157impl_spi!(SPI3, APB1);
158impl_spi_pin!(SPI3, SckPin, PB3, 6);
159impl_spi_pin!(SPI3, MisoPin, PB4, 6);
160impl_spi_pin!(SPI3, MosiPin, PB5, 6);
161impl_spi_pin!(SPI3, SckPin, PC10, 6);
162impl_spi_pin!(SPI3, MisoPin, PC11, 6);
163impl_spi_pin!(SPI3, MosiPin, PC12, 6);
131pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
132pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 165pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
133impl_usart!(USART1); 166impl_usart!(USART1);
@@ -180,6 +213,7 @@ pub use regs::dma_v1 as dma;
180pub use regs::exti_v1 as exti; 213pub use regs::exti_v1 as exti;
181pub use regs::gpio_v2 as gpio; 214pub use regs::gpio_v2 as gpio;
182pub use regs::rng_v1 as rng; 215pub use regs::rng_v1 as rng;
216pub use regs::spi_v2 as spi;
183pub use regs::syscfg_l4 as syscfg; 217pub use regs::syscfg_l4 as syscfg;
184pub use regs::usart_v2 as usart; 218pub use regs::usart_v2 as usart;
185mod regs; 219mod regs;
@@ -194,7 +228,7 @@ peripherals!(
194 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, 228 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5,
195 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, 229 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7,
196 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, 230 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9,
197 PH10, PH11, PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART3 231 PH10, PH11, PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3
198); 232);
199 233
200pub mod interrupt { 234pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l443rc.rs b/embassy-stm32/src/pac/stm32l443rc.rs
index 93f7c8bfa..221a674a0 100644
--- a/embassy-stm32/src/pac/stm32l443rc.rs
+++ b/embassy-stm32/src/pac/stm32l443rc.rs
@@ -127,7 +127,40 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
127impl_gpio_pin!(PH14, 7, 14, EXTI14); 127impl_gpio_pin!(PH14, 7, 14, EXTI14);
128impl_gpio_pin!(PH15, 7, 15, EXTI15); 128impl_gpio_pin!(PH15, 7, 15, EXTI15);
129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
130impl_rng!(RNG); 130impl_rng!(RNG, RNG);
131pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
132impl_spi!(SPI1, APB2);
133impl_spi_pin!(SPI1, SckPin, PA1, 5);
134impl_spi_pin!(SPI1, MisoPin, PA11, 5);
135impl_spi_pin!(SPI1, MosiPin, PA12, 5);
136impl_spi_pin!(SPI1, SckPin, PA5, 5);
137impl_spi_pin!(SPI1, MisoPin, PA6, 5);
138impl_spi_pin!(SPI1, MosiPin, PA7, 5);
139impl_spi_pin!(SPI1, SckPin, PB3, 5);
140impl_spi_pin!(SPI1, MisoPin, PB4, 5);
141impl_spi_pin!(SPI1, MosiPin, PB5, 5);
142impl_spi_pin!(SPI1, SckPin, PE13, 5);
143impl_spi_pin!(SPI1, MisoPin, PE14, 5);
144impl_spi_pin!(SPI1, MosiPin, PE15, 5);
145pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
146impl_spi!(SPI2, APB1);
147impl_spi_pin!(SPI2, SckPin, PB10, 5);
148impl_spi_pin!(SPI2, SckPin, PB13, 5);
149impl_spi_pin!(SPI2, MisoPin, PB14, 5);
150impl_spi_pin!(SPI2, MosiPin, PB15, 5);
151impl_spi_pin!(SPI2, MisoPin, PC2, 5);
152impl_spi_pin!(SPI2, MosiPin, PC3, 5);
153impl_spi_pin!(SPI2, SckPin, PD1, 5);
154impl_spi_pin!(SPI2, MisoPin, PD3, 5);
155impl_spi_pin!(SPI2, MosiPin, PD4, 5);
156pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
157impl_spi!(SPI3, APB1);
158impl_spi_pin!(SPI3, SckPin, PB3, 6);
159impl_spi_pin!(SPI3, MisoPin, PB4, 6);
160impl_spi_pin!(SPI3, MosiPin, PB5, 6);
161impl_spi_pin!(SPI3, SckPin, PC10, 6);
162impl_spi_pin!(SPI3, MisoPin, PC11, 6);
163impl_spi_pin!(SPI3, MosiPin, PC12, 6);
131pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
132pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 165pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
133impl_usart!(USART1); 166impl_usart!(USART1);
@@ -180,6 +213,7 @@ pub use regs::dma_v1 as dma;
180pub use regs::exti_v1 as exti; 213pub use regs::exti_v1 as exti;
181pub use regs::gpio_v2 as gpio; 214pub use regs::gpio_v2 as gpio;
182pub use regs::rng_v1 as rng; 215pub use regs::rng_v1 as rng;
216pub use regs::spi_v2 as spi;
183pub use regs::syscfg_l4 as syscfg; 217pub use regs::syscfg_l4 as syscfg;
184pub use regs::usart_v2 as usart; 218pub use regs::usart_v2 as usart;
185mod regs; 219mod regs;
@@ -194,7 +228,7 @@ peripherals!(
194 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, 228 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5,
195 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, 229 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7,
196 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, 230 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9,
197 PH10, PH11, PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART3 231 PH10, PH11, PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3
198); 232);
199 233
200pub mod interrupt { 234pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l443vc.rs b/embassy-stm32/src/pac/stm32l443vc.rs
index 93f7c8bfa..221a674a0 100644
--- a/embassy-stm32/src/pac/stm32l443vc.rs
+++ b/embassy-stm32/src/pac/stm32l443vc.rs
@@ -127,7 +127,40 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
127impl_gpio_pin!(PH14, 7, 14, EXTI14); 127impl_gpio_pin!(PH14, 7, 14, EXTI14);
128impl_gpio_pin!(PH15, 7, 15, EXTI15); 128impl_gpio_pin!(PH15, 7, 15, EXTI15);
129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
130impl_rng!(RNG); 130impl_rng!(RNG, RNG);
131pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
132impl_spi!(SPI1, APB2);
133impl_spi_pin!(SPI1, SckPin, PA1, 5);
134impl_spi_pin!(SPI1, MisoPin, PA11, 5);
135impl_spi_pin!(SPI1, MosiPin, PA12, 5);
136impl_spi_pin!(SPI1, SckPin, PA5, 5);
137impl_spi_pin!(SPI1, MisoPin, PA6, 5);
138impl_spi_pin!(SPI1, MosiPin, PA7, 5);
139impl_spi_pin!(SPI1, SckPin, PB3, 5);
140impl_spi_pin!(SPI1, MisoPin, PB4, 5);
141impl_spi_pin!(SPI1, MosiPin, PB5, 5);
142impl_spi_pin!(SPI1, SckPin, PE13, 5);
143impl_spi_pin!(SPI1, MisoPin, PE14, 5);
144impl_spi_pin!(SPI1, MosiPin, PE15, 5);
145pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
146impl_spi!(SPI2, APB1);
147impl_spi_pin!(SPI2, SckPin, PB10, 5);
148impl_spi_pin!(SPI2, SckPin, PB13, 5);
149impl_spi_pin!(SPI2, MisoPin, PB14, 5);
150impl_spi_pin!(SPI2, MosiPin, PB15, 5);
151impl_spi_pin!(SPI2, MisoPin, PC2, 5);
152impl_spi_pin!(SPI2, MosiPin, PC3, 5);
153impl_spi_pin!(SPI2, SckPin, PD1, 5);
154impl_spi_pin!(SPI2, MisoPin, PD3, 5);
155impl_spi_pin!(SPI2, MosiPin, PD4, 5);
156pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
157impl_spi!(SPI3, APB1);
158impl_spi_pin!(SPI3, SckPin, PB3, 6);
159impl_spi_pin!(SPI3, MisoPin, PB4, 6);
160impl_spi_pin!(SPI3, MosiPin, PB5, 6);
161impl_spi_pin!(SPI3, SckPin, PC10, 6);
162impl_spi_pin!(SPI3, MisoPin, PC11, 6);
163impl_spi_pin!(SPI3, MosiPin, PC12, 6);
131pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 164pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
132pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 165pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
133impl_usart!(USART1); 166impl_usart!(USART1);
@@ -180,6 +213,7 @@ pub use regs::dma_v1 as dma;
180pub use regs::exti_v1 as exti; 213pub use regs::exti_v1 as exti;
181pub use regs::gpio_v2 as gpio; 214pub use regs::gpio_v2 as gpio;
182pub use regs::rng_v1 as rng; 215pub use regs::rng_v1 as rng;
216pub use regs::spi_v2 as spi;
183pub use regs::syscfg_l4 as syscfg; 217pub use regs::syscfg_l4 as syscfg;
184pub use regs::usart_v2 as usart; 218pub use regs::usart_v2 as usart;
185mod regs; 219mod regs;
@@ -194,7 +228,7 @@ peripherals!(
194 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, 228 PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5,
195 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, 229 PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7,
196 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, 230 PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9,
197 PH10, PH11, PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART3 231 PH10, PH11, PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3
198); 232);
199 233
200pub mod interrupt { 234pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l451cc.rs b/embassy-stm32/src/pac/stm32l451cc.rs
index 031a9af00..f574c379c 100644
--- a/embassy-stm32/src/pac/stm32l451cc.rs
+++ b/embassy-stm32/src/pac/stm32l451cc.rs
@@ -127,7 +127,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
127impl_gpio_pin!(PH14, 7, 14, EXTI14); 127impl_gpio_pin!(PH14, 7, 14, EXTI14);
128impl_gpio_pin!(PH15, 7, 15, EXTI15); 128impl_gpio_pin!(PH15, 7, 15, EXTI15);
129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
130impl_rng!(RNG); 130impl_rng!(RNG, RNG);
131pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 131pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
132pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 132pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
133impl_usart!(USART1); 133impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l451ce.rs b/embassy-stm32/src/pac/stm32l451ce.rs
index 031a9af00..f574c379c 100644
--- a/embassy-stm32/src/pac/stm32l451ce.rs
+++ b/embassy-stm32/src/pac/stm32l451ce.rs
@@ -127,7 +127,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
127impl_gpio_pin!(PH14, 7, 14, EXTI14); 127impl_gpio_pin!(PH14, 7, 14, EXTI14);
128impl_gpio_pin!(PH15, 7, 15, EXTI15); 128impl_gpio_pin!(PH15, 7, 15, EXTI15);
129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
130impl_rng!(RNG); 130impl_rng!(RNG, RNG);
131pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 131pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
132pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 132pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
133impl_usart!(USART1); 133impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l451rc.rs b/embassy-stm32/src/pac/stm32l451rc.rs
index 031a9af00..f574c379c 100644
--- a/embassy-stm32/src/pac/stm32l451rc.rs
+++ b/embassy-stm32/src/pac/stm32l451rc.rs
@@ -127,7 +127,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
127impl_gpio_pin!(PH14, 7, 14, EXTI14); 127impl_gpio_pin!(PH14, 7, 14, EXTI14);
128impl_gpio_pin!(PH15, 7, 15, EXTI15); 128impl_gpio_pin!(PH15, 7, 15, EXTI15);
129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
130impl_rng!(RNG); 130impl_rng!(RNG, RNG);
131pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 131pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
132pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 132pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
133impl_usart!(USART1); 133impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l451re.rs b/embassy-stm32/src/pac/stm32l451re.rs
index 031a9af00..f574c379c 100644
--- a/embassy-stm32/src/pac/stm32l451re.rs
+++ b/embassy-stm32/src/pac/stm32l451re.rs
@@ -127,7 +127,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
127impl_gpio_pin!(PH14, 7, 14, EXTI14); 127impl_gpio_pin!(PH14, 7, 14, EXTI14);
128impl_gpio_pin!(PH15, 7, 15, EXTI15); 128impl_gpio_pin!(PH15, 7, 15, EXTI15);
129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
130impl_rng!(RNG); 130impl_rng!(RNG, RNG);
131pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 131pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
132pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 132pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
133impl_usart!(USART1); 133impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l451vc.rs b/embassy-stm32/src/pac/stm32l451vc.rs
index 031a9af00..f574c379c 100644
--- a/embassy-stm32/src/pac/stm32l451vc.rs
+++ b/embassy-stm32/src/pac/stm32l451vc.rs
@@ -127,7 +127,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
127impl_gpio_pin!(PH14, 7, 14, EXTI14); 127impl_gpio_pin!(PH14, 7, 14, EXTI14);
128impl_gpio_pin!(PH15, 7, 15, EXTI15); 128impl_gpio_pin!(PH15, 7, 15, EXTI15);
129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
130impl_rng!(RNG); 130impl_rng!(RNG, RNG);
131pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 131pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
132pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 132pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
133impl_usart!(USART1); 133impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l451ve.rs b/embassy-stm32/src/pac/stm32l451ve.rs
index 031a9af00..f574c379c 100644
--- a/embassy-stm32/src/pac/stm32l451ve.rs
+++ b/embassy-stm32/src/pac/stm32l451ve.rs
@@ -127,7 +127,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
127impl_gpio_pin!(PH14, 7, 14, EXTI14); 127impl_gpio_pin!(PH14, 7, 14, EXTI14);
128impl_gpio_pin!(PH15, 7, 15, EXTI15); 128impl_gpio_pin!(PH15, 7, 15, EXTI15);
129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
130impl_rng!(RNG); 130impl_rng!(RNG, RNG);
131pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 131pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
132pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 132pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
133impl_usart!(USART1); 133impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l452cc.rs b/embassy-stm32/src/pac/stm32l452cc.rs
index 70c0e7e4e..fdb8f0e75 100644
--- a/embassy-stm32/src/pac/stm32l452cc.rs
+++ b/embassy-stm32/src/pac/stm32l452cc.rs
@@ -127,7 +127,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
127impl_gpio_pin!(PH14, 7, 14, EXTI14); 127impl_gpio_pin!(PH14, 7, 14, EXTI14);
128impl_gpio_pin!(PH15, 7, 15, EXTI15); 128impl_gpio_pin!(PH15, 7, 15, EXTI15);
129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
130impl_rng!(RNG); 130impl_rng!(RNG, RNG);
131pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 131pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
132pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 132pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
133impl_usart!(USART1); 133impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l452ce.rs b/embassy-stm32/src/pac/stm32l452ce.rs
index 70c0e7e4e..fdb8f0e75 100644
--- a/embassy-stm32/src/pac/stm32l452ce.rs
+++ b/embassy-stm32/src/pac/stm32l452ce.rs
@@ -127,7 +127,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
127impl_gpio_pin!(PH14, 7, 14, EXTI14); 127impl_gpio_pin!(PH14, 7, 14, EXTI14);
128impl_gpio_pin!(PH15, 7, 15, EXTI15); 128impl_gpio_pin!(PH15, 7, 15, EXTI15);
129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
130impl_rng!(RNG); 130impl_rng!(RNG, RNG);
131pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 131pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
132pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 132pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
133impl_usart!(USART1); 133impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l452rc.rs b/embassy-stm32/src/pac/stm32l452rc.rs
index 70c0e7e4e..fdb8f0e75 100644
--- a/embassy-stm32/src/pac/stm32l452rc.rs
+++ b/embassy-stm32/src/pac/stm32l452rc.rs
@@ -127,7 +127,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
127impl_gpio_pin!(PH14, 7, 14, EXTI14); 127impl_gpio_pin!(PH14, 7, 14, EXTI14);
128impl_gpio_pin!(PH15, 7, 15, EXTI15); 128impl_gpio_pin!(PH15, 7, 15, EXTI15);
129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
130impl_rng!(RNG); 130impl_rng!(RNG, RNG);
131pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 131pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
132pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 132pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
133impl_usart!(USART1); 133impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l452re.rs b/embassy-stm32/src/pac/stm32l452re.rs
index 70c0e7e4e..fdb8f0e75 100644
--- a/embassy-stm32/src/pac/stm32l452re.rs
+++ b/embassy-stm32/src/pac/stm32l452re.rs
@@ -127,7 +127,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
127impl_gpio_pin!(PH14, 7, 14, EXTI14); 127impl_gpio_pin!(PH14, 7, 14, EXTI14);
128impl_gpio_pin!(PH15, 7, 15, EXTI15); 128impl_gpio_pin!(PH15, 7, 15, EXTI15);
129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
130impl_rng!(RNG); 130impl_rng!(RNG, RNG);
131pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 131pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
132pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 132pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
133impl_usart!(USART1); 133impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l452vc.rs b/embassy-stm32/src/pac/stm32l452vc.rs
index 70c0e7e4e..fdb8f0e75 100644
--- a/embassy-stm32/src/pac/stm32l452vc.rs
+++ b/embassy-stm32/src/pac/stm32l452vc.rs
@@ -127,7 +127,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
127impl_gpio_pin!(PH14, 7, 14, EXTI14); 127impl_gpio_pin!(PH14, 7, 14, EXTI14);
128impl_gpio_pin!(PH15, 7, 15, EXTI15); 128impl_gpio_pin!(PH15, 7, 15, EXTI15);
129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
130impl_rng!(RNG); 130impl_rng!(RNG, RNG);
131pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 131pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
132pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 132pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
133impl_usart!(USART1); 133impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l452ve.rs b/embassy-stm32/src/pac/stm32l452ve.rs
index 70c0e7e4e..fdb8f0e75 100644
--- a/embassy-stm32/src/pac/stm32l452ve.rs
+++ b/embassy-stm32/src/pac/stm32l452ve.rs
@@ -127,7 +127,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
127impl_gpio_pin!(PH14, 7, 14, EXTI14); 127impl_gpio_pin!(PH14, 7, 14, EXTI14);
128impl_gpio_pin!(PH15, 7, 15, EXTI15); 128impl_gpio_pin!(PH15, 7, 15, EXTI15);
129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
130impl_rng!(RNG); 130impl_rng!(RNG, RNG);
131pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 131pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
132pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 132pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
133impl_usart!(USART1); 133impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l462ce.rs b/embassy-stm32/src/pac/stm32l462ce.rs
index 5eff9047e..c039d6a86 100644
--- a/embassy-stm32/src/pac/stm32l462ce.rs
+++ b/embassy-stm32/src/pac/stm32l462ce.rs
@@ -127,7 +127,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
127impl_gpio_pin!(PH14, 7, 14, EXTI14); 127impl_gpio_pin!(PH14, 7, 14, EXTI14);
128impl_gpio_pin!(PH15, 7, 15, EXTI15); 128impl_gpio_pin!(PH15, 7, 15, EXTI15);
129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
130impl_rng!(RNG); 130impl_rng!(RNG, RNG);
131pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 131pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
132pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 132pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
133impl_usart!(USART1); 133impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l462re.rs b/embassy-stm32/src/pac/stm32l462re.rs
index 5eff9047e..c039d6a86 100644
--- a/embassy-stm32/src/pac/stm32l462re.rs
+++ b/embassy-stm32/src/pac/stm32l462re.rs
@@ -127,7 +127,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
127impl_gpio_pin!(PH14, 7, 14, EXTI14); 127impl_gpio_pin!(PH14, 7, 14, EXTI14);
128impl_gpio_pin!(PH15, 7, 15, EXTI15); 128impl_gpio_pin!(PH15, 7, 15, EXTI15);
129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
130impl_rng!(RNG); 130impl_rng!(RNG, RNG);
131pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 131pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
132pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 132pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
133impl_usart!(USART1); 133impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l462ve.rs b/embassy-stm32/src/pac/stm32l462ve.rs
index 5eff9047e..c039d6a86 100644
--- a/embassy-stm32/src/pac/stm32l462ve.rs
+++ b/embassy-stm32/src/pac/stm32l462ve.rs
@@ -127,7 +127,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
127impl_gpio_pin!(PH14, 7, 14, EXTI14); 127impl_gpio_pin!(PH14, 7, 14, EXTI14);
128impl_gpio_pin!(PH15, 7, 15, EXTI15); 128impl_gpio_pin!(PH15, 7, 15, EXTI15);
129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 129pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
130impl_rng!(RNG); 130impl_rng!(RNG, RNG);
131pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 131pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
132pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 132pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
133impl_usart!(USART1); 133impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l471qe.rs b/embassy-stm32/src/pac/stm32l471qe.rs
index 719376864..2a9444a62 100644
--- a/embassy-stm32/src/pac/stm32l471qe.rs
+++ b/embassy-stm32/src/pac/stm32l471qe.rs
@@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
164impl_rng!(RNG); 164impl_rng!(RNG, RNG);
165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
167impl_usart!(USART1); 167impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l471qg.rs b/embassy-stm32/src/pac/stm32l471qg.rs
index 719376864..2a9444a62 100644
--- a/embassy-stm32/src/pac/stm32l471qg.rs
+++ b/embassy-stm32/src/pac/stm32l471qg.rs
@@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
164impl_rng!(RNG); 164impl_rng!(RNG, RNG);
165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
167impl_usart!(USART1); 167impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l471re.rs b/embassy-stm32/src/pac/stm32l471re.rs
index 719376864..2a9444a62 100644
--- a/embassy-stm32/src/pac/stm32l471re.rs
+++ b/embassy-stm32/src/pac/stm32l471re.rs
@@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
164impl_rng!(RNG); 164impl_rng!(RNG, RNG);
165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
167impl_usart!(USART1); 167impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l471rg.rs b/embassy-stm32/src/pac/stm32l471rg.rs
index 719376864..2a9444a62 100644
--- a/embassy-stm32/src/pac/stm32l471rg.rs
+++ b/embassy-stm32/src/pac/stm32l471rg.rs
@@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
164impl_rng!(RNG); 164impl_rng!(RNG, RNG);
165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
167impl_usart!(USART1); 167impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l471ve.rs b/embassy-stm32/src/pac/stm32l471ve.rs
index 719376864..2a9444a62 100644
--- a/embassy-stm32/src/pac/stm32l471ve.rs
+++ b/embassy-stm32/src/pac/stm32l471ve.rs
@@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
164impl_rng!(RNG); 164impl_rng!(RNG, RNG);
165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
167impl_usart!(USART1); 167impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l471vg.rs b/embassy-stm32/src/pac/stm32l471vg.rs
index 719376864..2a9444a62 100644
--- a/embassy-stm32/src/pac/stm32l471vg.rs
+++ b/embassy-stm32/src/pac/stm32l471vg.rs
@@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
164impl_rng!(RNG); 164impl_rng!(RNG, RNG);
165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
167impl_usart!(USART1); 167impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l471ze.rs b/embassy-stm32/src/pac/stm32l471ze.rs
index 719376864..2a9444a62 100644
--- a/embassy-stm32/src/pac/stm32l471ze.rs
+++ b/embassy-stm32/src/pac/stm32l471ze.rs
@@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
164impl_rng!(RNG); 164impl_rng!(RNG, RNG);
165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
167impl_usart!(USART1); 167impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l471zg.rs b/embassy-stm32/src/pac/stm32l471zg.rs
index 719376864..2a9444a62 100644
--- a/embassy-stm32/src/pac/stm32l471zg.rs
+++ b/embassy-stm32/src/pac/stm32l471zg.rs
@@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
164impl_rng!(RNG); 164impl_rng!(RNG, RNG);
165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
167impl_usart!(USART1); 167impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l475rc.rs b/embassy-stm32/src/pac/stm32l475rc.rs
index 5b9937410..40de9ba86 100644
--- a/embassy-stm32/src/pac/stm32l475rc.rs
+++ b/embassy-stm32/src/pac/stm32l475rc.rs
@@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
164impl_rng!(RNG); 164impl_rng!(RNG, RNG);
165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
167impl_usart!(USART1); 167impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l475re.rs b/embassy-stm32/src/pac/stm32l475re.rs
index 5b9937410..40de9ba86 100644
--- a/embassy-stm32/src/pac/stm32l475re.rs
+++ b/embassy-stm32/src/pac/stm32l475re.rs
@@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
164impl_rng!(RNG); 164impl_rng!(RNG, RNG);
165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
167impl_usart!(USART1); 167impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l475rg.rs b/embassy-stm32/src/pac/stm32l475rg.rs
index 5b9937410..40de9ba86 100644
--- a/embassy-stm32/src/pac/stm32l475rg.rs
+++ b/embassy-stm32/src/pac/stm32l475rg.rs
@@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
164impl_rng!(RNG); 164impl_rng!(RNG, RNG);
165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
167impl_usart!(USART1); 167impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l475vc.rs b/embassy-stm32/src/pac/stm32l475vc.rs
index 5b9937410..40de9ba86 100644
--- a/embassy-stm32/src/pac/stm32l475vc.rs
+++ b/embassy-stm32/src/pac/stm32l475vc.rs
@@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
164impl_rng!(RNG); 164impl_rng!(RNG, RNG);
165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
167impl_usart!(USART1); 167impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l475ve.rs b/embassy-stm32/src/pac/stm32l475ve.rs
index 5b9937410..40de9ba86 100644
--- a/embassy-stm32/src/pac/stm32l475ve.rs
+++ b/embassy-stm32/src/pac/stm32l475ve.rs
@@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
164impl_rng!(RNG); 164impl_rng!(RNG, RNG);
165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
167impl_usart!(USART1); 167impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l475vg.rs b/embassy-stm32/src/pac/stm32l475vg.rs
index 5b9937410..40de9ba86 100644
--- a/embassy-stm32/src/pac/stm32l475vg.rs
+++ b/embassy-stm32/src/pac/stm32l475vg.rs
@@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
164impl_rng!(RNG); 164impl_rng!(RNG, RNG);
165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
167impl_usart!(USART1); 167impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l476je.rs b/embassy-stm32/src/pac/stm32l476je.rs
index 1c16aaaba..c2230994a 100644
--- a/embassy-stm32/src/pac/stm32l476je.rs
+++ b/embassy-stm32/src/pac/stm32l476je.rs
@@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
164impl_rng!(RNG); 164impl_rng!(RNG, RNG);
165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
167impl_usart!(USART1); 167impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l476jg.rs b/embassy-stm32/src/pac/stm32l476jg.rs
index 1c16aaaba..c2230994a 100644
--- a/embassy-stm32/src/pac/stm32l476jg.rs
+++ b/embassy-stm32/src/pac/stm32l476jg.rs
@@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
164impl_rng!(RNG); 164impl_rng!(RNG, RNG);
165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
167impl_usart!(USART1); 167impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l476me.rs b/embassy-stm32/src/pac/stm32l476me.rs
index 1c16aaaba..c2230994a 100644
--- a/embassy-stm32/src/pac/stm32l476me.rs
+++ b/embassy-stm32/src/pac/stm32l476me.rs
@@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
164impl_rng!(RNG); 164impl_rng!(RNG, RNG);
165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
167impl_usart!(USART1); 167impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l476mg.rs b/embassy-stm32/src/pac/stm32l476mg.rs
index 1c16aaaba..c2230994a 100644
--- a/embassy-stm32/src/pac/stm32l476mg.rs
+++ b/embassy-stm32/src/pac/stm32l476mg.rs
@@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
164impl_rng!(RNG); 164impl_rng!(RNG, RNG);
165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
167impl_usart!(USART1); 167impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l476qe.rs b/embassy-stm32/src/pac/stm32l476qe.rs
index 1c16aaaba..c2230994a 100644
--- a/embassy-stm32/src/pac/stm32l476qe.rs
+++ b/embassy-stm32/src/pac/stm32l476qe.rs
@@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
164impl_rng!(RNG); 164impl_rng!(RNG, RNG);
165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
167impl_usart!(USART1); 167impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l476qg.rs b/embassy-stm32/src/pac/stm32l476qg.rs
index 1c16aaaba..c2230994a 100644
--- a/embassy-stm32/src/pac/stm32l476qg.rs
+++ b/embassy-stm32/src/pac/stm32l476qg.rs
@@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
164impl_rng!(RNG); 164impl_rng!(RNG, RNG);
165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
167impl_usart!(USART1); 167impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l476rc.rs b/embassy-stm32/src/pac/stm32l476rc.rs
index 1c16aaaba..c2230994a 100644
--- a/embassy-stm32/src/pac/stm32l476rc.rs
+++ b/embassy-stm32/src/pac/stm32l476rc.rs
@@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
164impl_rng!(RNG); 164impl_rng!(RNG, RNG);
165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
167impl_usart!(USART1); 167impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l476re.rs b/embassy-stm32/src/pac/stm32l476re.rs
index 1c16aaaba..c2230994a 100644
--- a/embassy-stm32/src/pac/stm32l476re.rs
+++ b/embassy-stm32/src/pac/stm32l476re.rs
@@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
164impl_rng!(RNG); 164impl_rng!(RNG, RNG);
165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
167impl_usart!(USART1); 167impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l476rg.rs b/embassy-stm32/src/pac/stm32l476rg.rs
index 1c16aaaba..c2230994a 100644
--- a/embassy-stm32/src/pac/stm32l476rg.rs
+++ b/embassy-stm32/src/pac/stm32l476rg.rs
@@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
164impl_rng!(RNG); 164impl_rng!(RNG, RNG);
165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
167impl_usart!(USART1); 167impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l476vc.rs b/embassy-stm32/src/pac/stm32l476vc.rs
index 1c16aaaba..c2230994a 100644
--- a/embassy-stm32/src/pac/stm32l476vc.rs
+++ b/embassy-stm32/src/pac/stm32l476vc.rs
@@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
164impl_rng!(RNG); 164impl_rng!(RNG, RNG);
165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
167impl_usart!(USART1); 167impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l476ve.rs b/embassy-stm32/src/pac/stm32l476ve.rs
index 1c16aaaba..c2230994a 100644
--- a/embassy-stm32/src/pac/stm32l476ve.rs
+++ b/embassy-stm32/src/pac/stm32l476ve.rs
@@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
164impl_rng!(RNG); 164impl_rng!(RNG, RNG);
165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
167impl_usart!(USART1); 167impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l476vg.rs b/embassy-stm32/src/pac/stm32l476vg.rs
index 1c16aaaba..c2230994a 100644
--- a/embassy-stm32/src/pac/stm32l476vg.rs
+++ b/embassy-stm32/src/pac/stm32l476vg.rs
@@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
164impl_rng!(RNG); 164impl_rng!(RNG, RNG);
165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
167impl_usart!(USART1); 167impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l476ze.rs b/embassy-stm32/src/pac/stm32l476ze.rs
index 1c16aaaba..c2230994a 100644
--- a/embassy-stm32/src/pac/stm32l476ze.rs
+++ b/embassy-stm32/src/pac/stm32l476ze.rs
@@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
164impl_rng!(RNG); 164impl_rng!(RNG, RNG);
165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
167impl_usart!(USART1); 167impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l476zg.rs b/embassy-stm32/src/pac/stm32l476zg.rs
index 1c16aaaba..c2230994a 100644
--- a/embassy-stm32/src/pac/stm32l476zg.rs
+++ b/embassy-stm32/src/pac/stm32l476zg.rs
@@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
164impl_rng!(RNG); 164impl_rng!(RNG, RNG);
165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
167impl_usart!(USART1); 167impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l485jc.rs b/embassy-stm32/src/pac/stm32l485jc.rs
index c5fb8087f..bab45b914 100644
--- a/embassy-stm32/src/pac/stm32l485jc.rs
+++ b/embassy-stm32/src/pac/stm32l485jc.rs
@@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
164impl_rng!(RNG); 164impl_rng!(RNG, RNG);
165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
167impl_usart!(USART1); 167impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l485je.rs b/embassy-stm32/src/pac/stm32l485je.rs
index c5fb8087f..bab45b914 100644
--- a/embassy-stm32/src/pac/stm32l485je.rs
+++ b/embassy-stm32/src/pac/stm32l485je.rs
@@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
164impl_rng!(RNG); 164impl_rng!(RNG, RNG);
165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
167impl_usart!(USART1); 167impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l486jg.rs b/embassy-stm32/src/pac/stm32l486jg.rs
index d791c148d..89067584a 100644
--- a/embassy-stm32/src/pac/stm32l486jg.rs
+++ b/embassy-stm32/src/pac/stm32l486jg.rs
@@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
164impl_rng!(RNG); 164impl_rng!(RNG, RNG);
165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
167impl_usart!(USART1); 167impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l486qg.rs b/embassy-stm32/src/pac/stm32l486qg.rs
index d791c148d..89067584a 100644
--- a/embassy-stm32/src/pac/stm32l486qg.rs
+++ b/embassy-stm32/src/pac/stm32l486qg.rs
@@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
164impl_rng!(RNG); 164impl_rng!(RNG, RNG);
165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
167impl_usart!(USART1); 167impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l486rg.rs b/embassy-stm32/src/pac/stm32l486rg.rs
index d791c148d..89067584a 100644
--- a/embassy-stm32/src/pac/stm32l486rg.rs
+++ b/embassy-stm32/src/pac/stm32l486rg.rs
@@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
164impl_rng!(RNG); 164impl_rng!(RNG, RNG);
165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
167impl_usart!(USART1); 167impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l486vg.rs b/embassy-stm32/src/pac/stm32l486vg.rs
index d791c148d..89067584a 100644
--- a/embassy-stm32/src/pac/stm32l486vg.rs
+++ b/embassy-stm32/src/pac/stm32l486vg.rs
@@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
164impl_rng!(RNG); 164impl_rng!(RNG, RNG);
165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
167impl_usart!(USART1); 167impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l486zg.rs b/embassy-stm32/src/pac/stm32l486zg.rs
index d791c148d..89067584a 100644
--- a/embassy-stm32/src/pac/stm32l486zg.rs
+++ b/embassy-stm32/src/pac/stm32l486zg.rs
@@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13);
161impl_gpio_pin!(PH14, 7, 14, EXTI14); 161impl_gpio_pin!(PH14, 7, 14, EXTI14);
162impl_gpio_pin!(PH15, 7, 15, EXTI15); 162impl_gpio_pin!(PH15, 7, 15, EXTI15);
163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 163pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
164impl_rng!(RNG); 164impl_rng!(RNG, RNG);
165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 165pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 166pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
167impl_usart!(USART1); 167impl_usart!(USART1);
diff --git a/embassy-stm32/src/pac/stm32l496ae.rs b/embassy-stm32/src/pac/stm32l496ae.rs
index 336533a16..1b48e2042 100644
--- a/embassy-stm32/src/pac/stm32l496ae.rs
+++ b/embassy-stm32/src/pac/stm32l496ae.rs
@@ -178,7 +178,52 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MisoPin, PG10, 6);
225impl_spi_pin!(SPI3, MosiPin, PG11, 6);
226impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 227pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 228pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
184impl_usart!(USART1); 229impl_usart!(USART1);
@@ -236,6 +281,7 @@ pub use regs::dma_v1 as dma;
236pub use regs::exti_v1 as exti; 281pub use regs::exti_v1 as exti;
237pub use regs::gpio_v2 as gpio; 282pub use regs::gpio_v2 as gpio;
238pub use regs::rng_v1 as rng; 283pub use regs::rng_v1 as rng;
284pub use regs::spi_v2 as spi;
239pub use regs::syscfg_l4 as syscfg; 285pub use regs::syscfg_l4 as syscfg;
240pub use regs::usart_v2 as usart; 286pub use regs::usart_v2 as usart;
241mod regs; 287mod regs;
@@ -253,7 +299,7 @@ peripherals!(
253 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 299 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
254 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 300 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
255 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 301 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
256 PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3 302 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3
257); 303);
258 304
259pub mod interrupt { 305pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l496ag.rs b/embassy-stm32/src/pac/stm32l496ag.rs
index 336533a16..1b48e2042 100644
--- a/embassy-stm32/src/pac/stm32l496ag.rs
+++ b/embassy-stm32/src/pac/stm32l496ag.rs
@@ -178,7 +178,52 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MisoPin, PG10, 6);
225impl_spi_pin!(SPI3, MosiPin, PG11, 6);
226impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 227pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 228pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
184impl_usart!(USART1); 229impl_usart!(USART1);
@@ -236,6 +281,7 @@ pub use regs::dma_v1 as dma;
236pub use regs::exti_v1 as exti; 281pub use regs::exti_v1 as exti;
237pub use regs::gpio_v2 as gpio; 282pub use regs::gpio_v2 as gpio;
238pub use regs::rng_v1 as rng; 283pub use regs::rng_v1 as rng;
284pub use regs::spi_v2 as spi;
239pub use regs::syscfg_l4 as syscfg; 285pub use regs::syscfg_l4 as syscfg;
240pub use regs::usart_v2 as usart; 286pub use regs::usart_v2 as usart;
241mod regs; 287mod regs;
@@ -253,7 +299,7 @@ peripherals!(
253 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 299 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
254 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 300 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
255 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 301 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
256 PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3 302 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3
257); 303);
258 304
259pub mod interrupt { 305pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l496qe.rs b/embassy-stm32/src/pac/stm32l496qe.rs
index 336533a16..1b48e2042 100644
--- a/embassy-stm32/src/pac/stm32l496qe.rs
+++ b/embassy-stm32/src/pac/stm32l496qe.rs
@@ -178,7 +178,52 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MisoPin, PG10, 6);
225impl_spi_pin!(SPI3, MosiPin, PG11, 6);
226impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 227pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 228pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
184impl_usart!(USART1); 229impl_usart!(USART1);
@@ -236,6 +281,7 @@ pub use regs::dma_v1 as dma;
236pub use regs::exti_v1 as exti; 281pub use regs::exti_v1 as exti;
237pub use regs::gpio_v2 as gpio; 282pub use regs::gpio_v2 as gpio;
238pub use regs::rng_v1 as rng; 283pub use regs::rng_v1 as rng;
284pub use regs::spi_v2 as spi;
239pub use regs::syscfg_l4 as syscfg; 285pub use regs::syscfg_l4 as syscfg;
240pub use regs::usart_v2 as usart; 286pub use regs::usart_v2 as usart;
241mod regs; 287mod regs;
@@ -253,7 +299,7 @@ peripherals!(
253 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 299 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
254 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 300 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
255 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 301 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
256 PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3 302 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3
257); 303);
258 304
259pub mod interrupt { 305pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l496qg.rs b/embassy-stm32/src/pac/stm32l496qg.rs
index 336533a16..1b48e2042 100644
--- a/embassy-stm32/src/pac/stm32l496qg.rs
+++ b/embassy-stm32/src/pac/stm32l496qg.rs
@@ -178,7 +178,52 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MisoPin, PG10, 6);
225impl_spi_pin!(SPI3, MosiPin, PG11, 6);
226impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 227pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 228pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
184impl_usart!(USART1); 229impl_usart!(USART1);
@@ -236,6 +281,7 @@ pub use regs::dma_v1 as dma;
236pub use regs::exti_v1 as exti; 281pub use regs::exti_v1 as exti;
237pub use regs::gpio_v2 as gpio; 282pub use regs::gpio_v2 as gpio;
238pub use regs::rng_v1 as rng; 283pub use regs::rng_v1 as rng;
284pub use regs::spi_v2 as spi;
239pub use regs::syscfg_l4 as syscfg; 285pub use regs::syscfg_l4 as syscfg;
240pub use regs::usart_v2 as usart; 286pub use regs::usart_v2 as usart;
241mod regs; 287mod regs;
@@ -253,7 +299,7 @@ peripherals!(
253 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 299 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
254 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 300 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
255 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 301 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
256 PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3 302 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3
257); 303);
258 304
259pub mod interrupt { 305pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l496re.rs b/embassy-stm32/src/pac/stm32l496re.rs
index 336533a16..1b48e2042 100644
--- a/embassy-stm32/src/pac/stm32l496re.rs
+++ b/embassy-stm32/src/pac/stm32l496re.rs
@@ -178,7 +178,52 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MisoPin, PG10, 6);
225impl_spi_pin!(SPI3, MosiPin, PG11, 6);
226impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 227pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 228pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
184impl_usart!(USART1); 229impl_usart!(USART1);
@@ -236,6 +281,7 @@ pub use regs::dma_v1 as dma;
236pub use regs::exti_v1 as exti; 281pub use regs::exti_v1 as exti;
237pub use regs::gpio_v2 as gpio; 282pub use regs::gpio_v2 as gpio;
238pub use regs::rng_v1 as rng; 283pub use regs::rng_v1 as rng;
284pub use regs::spi_v2 as spi;
239pub use regs::syscfg_l4 as syscfg; 285pub use regs::syscfg_l4 as syscfg;
240pub use regs::usart_v2 as usart; 286pub use regs::usart_v2 as usart;
241mod regs; 287mod regs;
@@ -253,7 +299,7 @@ peripherals!(
253 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 299 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
254 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 300 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
255 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 301 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
256 PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3 302 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3
257); 303);
258 304
259pub mod interrupt { 305pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l496rg.rs b/embassy-stm32/src/pac/stm32l496rg.rs
index 336533a16..1b48e2042 100644
--- a/embassy-stm32/src/pac/stm32l496rg.rs
+++ b/embassy-stm32/src/pac/stm32l496rg.rs
@@ -178,7 +178,52 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MisoPin, PG10, 6);
225impl_spi_pin!(SPI3, MosiPin, PG11, 6);
226impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 227pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 228pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
184impl_usart!(USART1); 229impl_usart!(USART1);
@@ -236,6 +281,7 @@ pub use regs::dma_v1 as dma;
236pub use regs::exti_v1 as exti; 281pub use regs::exti_v1 as exti;
237pub use regs::gpio_v2 as gpio; 282pub use regs::gpio_v2 as gpio;
238pub use regs::rng_v1 as rng; 283pub use regs::rng_v1 as rng;
284pub use regs::spi_v2 as spi;
239pub use regs::syscfg_l4 as syscfg; 285pub use regs::syscfg_l4 as syscfg;
240pub use regs::usart_v2 as usart; 286pub use regs::usart_v2 as usart;
241mod regs; 287mod regs;
@@ -253,7 +299,7 @@ peripherals!(
253 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 299 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
254 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 300 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
255 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 301 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
256 PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3 302 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3
257); 303);
258 304
259pub mod interrupt { 305pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l496ve.rs b/embassy-stm32/src/pac/stm32l496ve.rs
index 336533a16..1b48e2042 100644
--- a/embassy-stm32/src/pac/stm32l496ve.rs
+++ b/embassy-stm32/src/pac/stm32l496ve.rs
@@ -178,7 +178,52 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MisoPin, PG10, 6);
225impl_spi_pin!(SPI3, MosiPin, PG11, 6);
226impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 227pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 228pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
184impl_usart!(USART1); 229impl_usart!(USART1);
@@ -236,6 +281,7 @@ pub use regs::dma_v1 as dma;
236pub use regs::exti_v1 as exti; 281pub use regs::exti_v1 as exti;
237pub use regs::gpio_v2 as gpio; 282pub use regs::gpio_v2 as gpio;
238pub use regs::rng_v1 as rng; 283pub use regs::rng_v1 as rng;
284pub use regs::spi_v2 as spi;
239pub use regs::syscfg_l4 as syscfg; 285pub use regs::syscfg_l4 as syscfg;
240pub use regs::usart_v2 as usart; 286pub use regs::usart_v2 as usart;
241mod regs; 287mod regs;
@@ -253,7 +299,7 @@ peripherals!(
253 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 299 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
254 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 300 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
255 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 301 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
256 PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3 302 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3
257); 303);
258 304
259pub mod interrupt { 305pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l496vg.rs b/embassy-stm32/src/pac/stm32l496vg.rs
index 336533a16..1b48e2042 100644
--- a/embassy-stm32/src/pac/stm32l496vg.rs
+++ b/embassy-stm32/src/pac/stm32l496vg.rs
@@ -178,7 +178,52 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MisoPin, PG10, 6);
225impl_spi_pin!(SPI3, MosiPin, PG11, 6);
226impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 227pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 228pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
184impl_usart!(USART1); 229impl_usart!(USART1);
@@ -236,6 +281,7 @@ pub use regs::dma_v1 as dma;
236pub use regs::exti_v1 as exti; 281pub use regs::exti_v1 as exti;
237pub use regs::gpio_v2 as gpio; 282pub use regs::gpio_v2 as gpio;
238pub use regs::rng_v1 as rng; 283pub use regs::rng_v1 as rng;
284pub use regs::spi_v2 as spi;
239pub use regs::syscfg_l4 as syscfg; 285pub use regs::syscfg_l4 as syscfg;
240pub use regs::usart_v2 as usart; 286pub use regs::usart_v2 as usart;
241mod regs; 287mod regs;
@@ -253,7 +299,7 @@ peripherals!(
253 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 299 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
254 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 300 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
255 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 301 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
256 PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3 302 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3
257); 303);
258 304
259pub mod interrupt { 305pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l496wg.rs b/embassy-stm32/src/pac/stm32l496wg.rs
index 336533a16..1b48e2042 100644
--- a/embassy-stm32/src/pac/stm32l496wg.rs
+++ b/embassy-stm32/src/pac/stm32l496wg.rs
@@ -178,7 +178,52 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MisoPin, PG10, 6);
225impl_spi_pin!(SPI3, MosiPin, PG11, 6);
226impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 227pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 228pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
184impl_usart!(USART1); 229impl_usart!(USART1);
@@ -236,6 +281,7 @@ pub use regs::dma_v1 as dma;
236pub use regs::exti_v1 as exti; 281pub use regs::exti_v1 as exti;
237pub use regs::gpio_v2 as gpio; 282pub use regs::gpio_v2 as gpio;
238pub use regs::rng_v1 as rng; 283pub use regs::rng_v1 as rng;
284pub use regs::spi_v2 as spi;
239pub use regs::syscfg_l4 as syscfg; 285pub use regs::syscfg_l4 as syscfg;
240pub use regs::usart_v2 as usart; 286pub use regs::usart_v2 as usart;
241mod regs; 287mod regs;
@@ -253,7 +299,7 @@ peripherals!(
253 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 299 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
254 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 300 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
255 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 301 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
256 PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3 302 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3
257); 303);
258 304
259pub mod interrupt { 305pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l496ze.rs b/embassy-stm32/src/pac/stm32l496ze.rs
index 336533a16..1b48e2042 100644
--- a/embassy-stm32/src/pac/stm32l496ze.rs
+++ b/embassy-stm32/src/pac/stm32l496ze.rs
@@ -178,7 +178,52 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MisoPin, PG10, 6);
225impl_spi_pin!(SPI3, MosiPin, PG11, 6);
226impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 227pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 228pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
184impl_usart!(USART1); 229impl_usart!(USART1);
@@ -236,6 +281,7 @@ pub use regs::dma_v1 as dma;
236pub use regs::exti_v1 as exti; 281pub use regs::exti_v1 as exti;
237pub use regs::gpio_v2 as gpio; 282pub use regs::gpio_v2 as gpio;
238pub use regs::rng_v1 as rng; 283pub use regs::rng_v1 as rng;
284pub use regs::spi_v2 as spi;
239pub use regs::syscfg_l4 as syscfg; 285pub use regs::syscfg_l4 as syscfg;
240pub use regs::usart_v2 as usart; 286pub use regs::usart_v2 as usart;
241mod regs; 287mod regs;
@@ -253,7 +299,7 @@ peripherals!(
253 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 299 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
254 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 300 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
255 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 301 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
256 PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3 302 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3
257); 303);
258 304
259pub mod interrupt { 305pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l496zg.rs b/embassy-stm32/src/pac/stm32l496zg.rs
index 336533a16..1b48e2042 100644
--- a/embassy-stm32/src/pac/stm32l496zg.rs
+++ b/embassy-stm32/src/pac/stm32l496zg.rs
@@ -178,7 +178,52 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MisoPin, PG10, 6);
225impl_spi_pin!(SPI3, MosiPin, PG11, 6);
226impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 227pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 228pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
184impl_usart!(USART1); 229impl_usart!(USART1);
@@ -236,6 +281,7 @@ pub use regs::dma_v1 as dma;
236pub use regs::exti_v1 as exti; 281pub use regs::exti_v1 as exti;
237pub use regs::gpio_v2 as gpio; 282pub use regs::gpio_v2 as gpio;
238pub use regs::rng_v1 as rng; 283pub use regs::rng_v1 as rng;
284pub use regs::spi_v2 as spi;
239pub use regs::syscfg_l4 as syscfg; 285pub use regs::syscfg_l4 as syscfg;
240pub use regs::usart_v2 as usart; 286pub use regs::usart_v2 as usart;
241mod regs; 287mod regs;
@@ -253,7 +299,7 @@ peripherals!(
253 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 299 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
254 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 300 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
255 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 301 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
256 PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3 302 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3
257); 303);
258 304
259pub mod interrupt { 305pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l4a6ag.rs b/embassy-stm32/src/pac/stm32l4a6ag.rs
index 2bc671656..250bd6d9c 100644
--- a/embassy-stm32/src/pac/stm32l4a6ag.rs
+++ b/embassy-stm32/src/pac/stm32l4a6ag.rs
@@ -178,7 +178,52 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, HASH_RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MisoPin, PG10, 6);
225impl_spi_pin!(SPI3, MosiPin, PG11, 6);
226impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 227pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 228pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
184impl_usart!(USART1); 229impl_usart!(USART1);
@@ -236,6 +281,7 @@ pub use regs::dma_v1 as dma;
236pub use regs::exti_v1 as exti; 281pub use regs::exti_v1 as exti;
237pub use regs::gpio_v2 as gpio; 282pub use regs::gpio_v2 as gpio;
238pub use regs::rng_v1 as rng; 283pub use regs::rng_v1 as rng;
284pub use regs::spi_v2 as spi;
239pub use regs::syscfg_l4 as syscfg; 285pub use regs::syscfg_l4 as syscfg;
240pub use regs::usart_v2 as usart; 286pub use regs::usart_v2 as usart;
241mod regs; 287mod regs;
@@ -253,7 +299,7 @@ peripherals!(
253 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 299 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
254 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 300 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
255 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 301 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
256 PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3 302 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3
257); 303);
258 304
259pub mod interrupt { 305pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l4a6qg.rs b/embassy-stm32/src/pac/stm32l4a6qg.rs
index 2bc671656..250bd6d9c 100644
--- a/embassy-stm32/src/pac/stm32l4a6qg.rs
+++ b/embassy-stm32/src/pac/stm32l4a6qg.rs
@@ -178,7 +178,52 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, HASH_RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MisoPin, PG10, 6);
225impl_spi_pin!(SPI3, MosiPin, PG11, 6);
226impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 227pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 228pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
184impl_usart!(USART1); 229impl_usart!(USART1);
@@ -236,6 +281,7 @@ pub use regs::dma_v1 as dma;
236pub use regs::exti_v1 as exti; 281pub use regs::exti_v1 as exti;
237pub use regs::gpio_v2 as gpio; 282pub use regs::gpio_v2 as gpio;
238pub use regs::rng_v1 as rng; 283pub use regs::rng_v1 as rng;
284pub use regs::spi_v2 as spi;
239pub use regs::syscfg_l4 as syscfg; 285pub use regs::syscfg_l4 as syscfg;
240pub use regs::usart_v2 as usart; 286pub use regs::usart_v2 as usart;
241mod regs; 287mod regs;
@@ -253,7 +299,7 @@ peripherals!(
253 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 299 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
254 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 300 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
255 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 301 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
256 PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3 302 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3
257); 303);
258 304
259pub mod interrupt { 305pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l4a6rg.rs b/embassy-stm32/src/pac/stm32l4a6rg.rs
index 2bc671656..250bd6d9c 100644
--- a/embassy-stm32/src/pac/stm32l4a6rg.rs
+++ b/embassy-stm32/src/pac/stm32l4a6rg.rs
@@ -178,7 +178,52 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, HASH_RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MisoPin, PG10, 6);
225impl_spi_pin!(SPI3, MosiPin, PG11, 6);
226impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 227pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 228pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
184impl_usart!(USART1); 229impl_usart!(USART1);
@@ -236,6 +281,7 @@ pub use regs::dma_v1 as dma;
236pub use regs::exti_v1 as exti; 281pub use regs::exti_v1 as exti;
237pub use regs::gpio_v2 as gpio; 282pub use regs::gpio_v2 as gpio;
238pub use regs::rng_v1 as rng; 283pub use regs::rng_v1 as rng;
284pub use regs::spi_v2 as spi;
239pub use regs::syscfg_l4 as syscfg; 285pub use regs::syscfg_l4 as syscfg;
240pub use regs::usart_v2 as usart; 286pub use regs::usart_v2 as usart;
241mod regs; 287mod regs;
@@ -253,7 +299,7 @@ peripherals!(
253 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 299 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
254 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 300 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
255 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 301 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
256 PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3 302 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3
257); 303);
258 304
259pub mod interrupt { 305pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l4a6vg.rs b/embassy-stm32/src/pac/stm32l4a6vg.rs
index 2bc671656..250bd6d9c 100644
--- a/embassy-stm32/src/pac/stm32l4a6vg.rs
+++ b/embassy-stm32/src/pac/stm32l4a6vg.rs
@@ -178,7 +178,52 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, HASH_RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MisoPin, PG10, 6);
225impl_spi_pin!(SPI3, MosiPin, PG11, 6);
226impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 227pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 228pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
184impl_usart!(USART1); 229impl_usart!(USART1);
@@ -236,6 +281,7 @@ pub use regs::dma_v1 as dma;
236pub use regs::exti_v1 as exti; 281pub use regs::exti_v1 as exti;
237pub use regs::gpio_v2 as gpio; 282pub use regs::gpio_v2 as gpio;
238pub use regs::rng_v1 as rng; 283pub use regs::rng_v1 as rng;
284pub use regs::spi_v2 as spi;
239pub use regs::syscfg_l4 as syscfg; 285pub use regs::syscfg_l4 as syscfg;
240pub use regs::usart_v2 as usart; 286pub use regs::usart_v2 as usart;
241mod regs; 287mod regs;
@@ -253,7 +299,7 @@ peripherals!(
253 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 299 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
254 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 300 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
255 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 301 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
256 PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3 302 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3
257); 303);
258 304
259pub mod interrupt { 305pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l4a6zg.rs b/embassy-stm32/src/pac/stm32l4a6zg.rs
index 2bc671656..250bd6d9c 100644
--- a/embassy-stm32/src/pac/stm32l4a6zg.rs
+++ b/embassy-stm32/src/pac/stm32l4a6zg.rs
@@ -178,7 +178,52 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, HASH_RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MisoPin, PG10, 6);
225impl_spi_pin!(SPI3, MosiPin, PG11, 6);
226impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 227pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); 228pub const USART1: usart::Usart = usart::Usart(0x40013800 as _);
184impl_usart!(USART1); 229impl_usart!(USART1);
@@ -236,6 +281,7 @@ pub use regs::dma_v1 as dma;
236pub use regs::exti_v1 as exti; 281pub use regs::exti_v1 as exti;
237pub use regs::gpio_v2 as gpio; 282pub use regs::gpio_v2 as gpio;
238pub use regs::rng_v1 as rng; 283pub use regs::rng_v1 as rng;
284pub use regs::spi_v2 as spi;
239pub use regs::syscfg_l4 as syscfg; 285pub use regs::syscfg_l4 as syscfg;
240pub use regs::usart_v2 as usart; 286pub use regs::usart_v2 as usart;
241mod regs; 287mod regs;
@@ -253,7 +299,7 @@ peripherals!(
253 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 299 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
254 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 300 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
255 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 301 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
256 PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3 302 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3
257); 303);
258 304
259pub mod interrupt { 305pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l4p5ae.rs b/embassy-stm32/src/pac/stm32l4p5ae.rs
index 7d8ca0863..44abb83bc 100644
--- a/embassy-stm32/src/pac/stm32l4p5ae.rs
+++ b/embassy-stm32/src/pac/stm32l4p5ae.rs
@@ -178,12 +178,59 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MosiPin, PD6, 5);
225impl_spi_pin!(SPI3, MisoPin, PG10, 6);
226impl_spi_pin!(SPI3, MosiPin, PG11, 6);
227impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 228pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub use regs::dma_v1 as dma; 229pub use regs::dma_v1 as dma;
184pub use regs::exti_v1 as exti; 230pub use regs::exti_v1 as exti;
185pub use regs::gpio_v2 as gpio; 231pub use regs::gpio_v2 as gpio;
186pub use regs::rng_v1 as rng; 232pub use regs::rng_v1 as rng;
233pub use regs::spi_v2 as spi;
187pub use regs::syscfg_l4 as syscfg; 234pub use regs::syscfg_l4 as syscfg;
188mod regs; 235mod regs;
189use embassy_extras::peripherals; 236use embassy_extras::peripherals;
@@ -200,7 +247,7 @@ peripherals!(
200 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 247 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
201 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 248 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
202 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 249 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
203 PI13, PI14, PI15, RNG, SYSCFG 250 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG
204); 251);
205 252
206pub mod interrupt { 253pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l4p5ag.rs b/embassy-stm32/src/pac/stm32l4p5ag.rs
index 7d8ca0863..44abb83bc 100644
--- a/embassy-stm32/src/pac/stm32l4p5ag.rs
+++ b/embassy-stm32/src/pac/stm32l4p5ag.rs
@@ -178,12 +178,59 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MosiPin, PD6, 5);
225impl_spi_pin!(SPI3, MisoPin, PG10, 6);
226impl_spi_pin!(SPI3, MosiPin, PG11, 6);
227impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 228pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub use regs::dma_v1 as dma; 229pub use regs::dma_v1 as dma;
184pub use regs::exti_v1 as exti; 230pub use regs::exti_v1 as exti;
185pub use regs::gpio_v2 as gpio; 231pub use regs::gpio_v2 as gpio;
186pub use regs::rng_v1 as rng; 232pub use regs::rng_v1 as rng;
233pub use regs::spi_v2 as spi;
187pub use regs::syscfg_l4 as syscfg; 234pub use regs::syscfg_l4 as syscfg;
188mod regs; 235mod regs;
189use embassy_extras::peripherals; 236use embassy_extras::peripherals;
@@ -200,7 +247,7 @@ peripherals!(
200 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 247 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
201 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 248 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
202 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 249 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
203 PI13, PI14, PI15, RNG, SYSCFG 250 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG
204); 251);
205 252
206pub mod interrupt { 253pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l4p5ce.rs b/embassy-stm32/src/pac/stm32l4p5ce.rs
index 7d8ca0863..44abb83bc 100644
--- a/embassy-stm32/src/pac/stm32l4p5ce.rs
+++ b/embassy-stm32/src/pac/stm32l4p5ce.rs
@@ -178,12 +178,59 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MosiPin, PD6, 5);
225impl_spi_pin!(SPI3, MisoPin, PG10, 6);
226impl_spi_pin!(SPI3, MosiPin, PG11, 6);
227impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 228pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub use regs::dma_v1 as dma; 229pub use regs::dma_v1 as dma;
184pub use regs::exti_v1 as exti; 230pub use regs::exti_v1 as exti;
185pub use regs::gpio_v2 as gpio; 231pub use regs::gpio_v2 as gpio;
186pub use regs::rng_v1 as rng; 232pub use regs::rng_v1 as rng;
233pub use regs::spi_v2 as spi;
187pub use regs::syscfg_l4 as syscfg; 234pub use regs::syscfg_l4 as syscfg;
188mod regs; 235mod regs;
189use embassy_extras::peripherals; 236use embassy_extras::peripherals;
@@ -200,7 +247,7 @@ peripherals!(
200 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 247 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
201 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 248 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
202 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 249 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
203 PI13, PI14, PI15, RNG, SYSCFG 250 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG
204); 251);
205 252
206pub mod interrupt { 253pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l4p5cg.rs b/embassy-stm32/src/pac/stm32l4p5cg.rs
index 7d8ca0863..44abb83bc 100644
--- a/embassy-stm32/src/pac/stm32l4p5cg.rs
+++ b/embassy-stm32/src/pac/stm32l4p5cg.rs
@@ -178,12 +178,59 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MosiPin, PD6, 5);
225impl_spi_pin!(SPI3, MisoPin, PG10, 6);
226impl_spi_pin!(SPI3, MosiPin, PG11, 6);
227impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 228pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub use regs::dma_v1 as dma; 229pub use regs::dma_v1 as dma;
184pub use regs::exti_v1 as exti; 230pub use regs::exti_v1 as exti;
185pub use regs::gpio_v2 as gpio; 231pub use regs::gpio_v2 as gpio;
186pub use regs::rng_v1 as rng; 232pub use regs::rng_v1 as rng;
233pub use regs::spi_v2 as spi;
187pub use regs::syscfg_l4 as syscfg; 234pub use regs::syscfg_l4 as syscfg;
188mod regs; 235mod regs;
189use embassy_extras::peripherals; 236use embassy_extras::peripherals;
@@ -200,7 +247,7 @@ peripherals!(
200 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 247 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
201 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 248 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
202 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 249 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
203 PI13, PI14, PI15, RNG, SYSCFG 250 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG
204); 251);
205 252
206pub mod interrupt { 253pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l4p5qe.rs b/embassy-stm32/src/pac/stm32l4p5qe.rs
index 7d8ca0863..44abb83bc 100644
--- a/embassy-stm32/src/pac/stm32l4p5qe.rs
+++ b/embassy-stm32/src/pac/stm32l4p5qe.rs
@@ -178,12 +178,59 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MosiPin, PD6, 5);
225impl_spi_pin!(SPI3, MisoPin, PG10, 6);
226impl_spi_pin!(SPI3, MosiPin, PG11, 6);
227impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 228pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub use regs::dma_v1 as dma; 229pub use regs::dma_v1 as dma;
184pub use regs::exti_v1 as exti; 230pub use regs::exti_v1 as exti;
185pub use regs::gpio_v2 as gpio; 231pub use regs::gpio_v2 as gpio;
186pub use regs::rng_v1 as rng; 232pub use regs::rng_v1 as rng;
233pub use regs::spi_v2 as spi;
187pub use regs::syscfg_l4 as syscfg; 234pub use regs::syscfg_l4 as syscfg;
188mod regs; 235mod regs;
189use embassy_extras::peripherals; 236use embassy_extras::peripherals;
@@ -200,7 +247,7 @@ peripherals!(
200 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 247 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
201 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 248 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
202 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 249 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
203 PI13, PI14, PI15, RNG, SYSCFG 250 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG
204); 251);
205 252
206pub mod interrupt { 253pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l4p5qg.rs b/embassy-stm32/src/pac/stm32l4p5qg.rs
index 7d8ca0863..44abb83bc 100644
--- a/embassy-stm32/src/pac/stm32l4p5qg.rs
+++ b/embassy-stm32/src/pac/stm32l4p5qg.rs
@@ -178,12 +178,59 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MosiPin, PD6, 5);
225impl_spi_pin!(SPI3, MisoPin, PG10, 6);
226impl_spi_pin!(SPI3, MosiPin, PG11, 6);
227impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 228pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub use regs::dma_v1 as dma; 229pub use regs::dma_v1 as dma;
184pub use regs::exti_v1 as exti; 230pub use regs::exti_v1 as exti;
185pub use regs::gpio_v2 as gpio; 231pub use regs::gpio_v2 as gpio;
186pub use regs::rng_v1 as rng; 232pub use regs::rng_v1 as rng;
233pub use regs::spi_v2 as spi;
187pub use regs::syscfg_l4 as syscfg; 234pub use regs::syscfg_l4 as syscfg;
188mod regs; 235mod regs;
189use embassy_extras::peripherals; 236use embassy_extras::peripherals;
@@ -200,7 +247,7 @@ peripherals!(
200 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 247 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
201 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 248 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
202 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 249 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
203 PI13, PI14, PI15, RNG, SYSCFG 250 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG
204); 251);
205 252
206pub mod interrupt { 253pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l4p5re.rs b/embassy-stm32/src/pac/stm32l4p5re.rs
index 7d8ca0863..44abb83bc 100644
--- a/embassy-stm32/src/pac/stm32l4p5re.rs
+++ b/embassy-stm32/src/pac/stm32l4p5re.rs
@@ -178,12 +178,59 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MosiPin, PD6, 5);
225impl_spi_pin!(SPI3, MisoPin, PG10, 6);
226impl_spi_pin!(SPI3, MosiPin, PG11, 6);
227impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 228pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub use regs::dma_v1 as dma; 229pub use regs::dma_v1 as dma;
184pub use regs::exti_v1 as exti; 230pub use regs::exti_v1 as exti;
185pub use regs::gpio_v2 as gpio; 231pub use regs::gpio_v2 as gpio;
186pub use regs::rng_v1 as rng; 232pub use regs::rng_v1 as rng;
233pub use regs::spi_v2 as spi;
187pub use regs::syscfg_l4 as syscfg; 234pub use regs::syscfg_l4 as syscfg;
188mod regs; 235mod regs;
189use embassy_extras::peripherals; 236use embassy_extras::peripherals;
@@ -200,7 +247,7 @@ peripherals!(
200 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 247 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
201 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 248 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
202 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 249 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
203 PI13, PI14, PI15, RNG, SYSCFG 250 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG
204); 251);
205 252
206pub mod interrupt { 253pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l4p5rg.rs b/embassy-stm32/src/pac/stm32l4p5rg.rs
index 7d8ca0863..44abb83bc 100644
--- a/embassy-stm32/src/pac/stm32l4p5rg.rs
+++ b/embassy-stm32/src/pac/stm32l4p5rg.rs
@@ -178,12 +178,59 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MosiPin, PD6, 5);
225impl_spi_pin!(SPI3, MisoPin, PG10, 6);
226impl_spi_pin!(SPI3, MosiPin, PG11, 6);
227impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 228pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub use regs::dma_v1 as dma; 229pub use regs::dma_v1 as dma;
184pub use regs::exti_v1 as exti; 230pub use regs::exti_v1 as exti;
185pub use regs::gpio_v2 as gpio; 231pub use regs::gpio_v2 as gpio;
186pub use regs::rng_v1 as rng; 232pub use regs::rng_v1 as rng;
233pub use regs::spi_v2 as spi;
187pub use regs::syscfg_l4 as syscfg; 234pub use regs::syscfg_l4 as syscfg;
188mod regs; 235mod regs;
189use embassy_extras::peripherals; 236use embassy_extras::peripherals;
@@ -200,7 +247,7 @@ peripherals!(
200 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 247 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
201 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 248 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
202 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 249 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
203 PI13, PI14, PI15, RNG, SYSCFG 250 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG
204); 251);
205 252
206pub mod interrupt { 253pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l4p5ve.rs b/embassy-stm32/src/pac/stm32l4p5ve.rs
index 7d8ca0863..44abb83bc 100644
--- a/embassy-stm32/src/pac/stm32l4p5ve.rs
+++ b/embassy-stm32/src/pac/stm32l4p5ve.rs
@@ -178,12 +178,59 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MosiPin, PD6, 5);
225impl_spi_pin!(SPI3, MisoPin, PG10, 6);
226impl_spi_pin!(SPI3, MosiPin, PG11, 6);
227impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 228pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub use regs::dma_v1 as dma; 229pub use regs::dma_v1 as dma;
184pub use regs::exti_v1 as exti; 230pub use regs::exti_v1 as exti;
185pub use regs::gpio_v2 as gpio; 231pub use regs::gpio_v2 as gpio;
186pub use regs::rng_v1 as rng; 232pub use regs::rng_v1 as rng;
233pub use regs::spi_v2 as spi;
187pub use regs::syscfg_l4 as syscfg; 234pub use regs::syscfg_l4 as syscfg;
188mod regs; 235mod regs;
189use embassy_extras::peripherals; 236use embassy_extras::peripherals;
@@ -200,7 +247,7 @@ peripherals!(
200 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 247 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
201 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 248 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
202 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 249 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
203 PI13, PI14, PI15, RNG, SYSCFG 250 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG
204); 251);
205 252
206pub mod interrupt { 253pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l4p5vg.rs b/embassy-stm32/src/pac/stm32l4p5vg.rs
index 7d8ca0863..44abb83bc 100644
--- a/embassy-stm32/src/pac/stm32l4p5vg.rs
+++ b/embassy-stm32/src/pac/stm32l4p5vg.rs
@@ -178,12 +178,59 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MosiPin, PD6, 5);
225impl_spi_pin!(SPI3, MisoPin, PG10, 6);
226impl_spi_pin!(SPI3, MosiPin, PG11, 6);
227impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 228pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub use regs::dma_v1 as dma; 229pub use regs::dma_v1 as dma;
184pub use regs::exti_v1 as exti; 230pub use regs::exti_v1 as exti;
185pub use regs::gpio_v2 as gpio; 231pub use regs::gpio_v2 as gpio;
186pub use regs::rng_v1 as rng; 232pub use regs::rng_v1 as rng;
233pub use regs::spi_v2 as spi;
187pub use regs::syscfg_l4 as syscfg; 234pub use regs::syscfg_l4 as syscfg;
188mod regs; 235mod regs;
189use embassy_extras::peripherals; 236use embassy_extras::peripherals;
@@ -200,7 +247,7 @@ peripherals!(
200 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 247 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
201 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 248 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
202 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 249 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
203 PI13, PI14, PI15, RNG, SYSCFG 250 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG
204); 251);
205 252
206pub mod interrupt { 253pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l4p5ze.rs b/embassy-stm32/src/pac/stm32l4p5ze.rs
index 7d8ca0863..44abb83bc 100644
--- a/embassy-stm32/src/pac/stm32l4p5ze.rs
+++ b/embassy-stm32/src/pac/stm32l4p5ze.rs
@@ -178,12 +178,59 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MosiPin, PD6, 5);
225impl_spi_pin!(SPI3, MisoPin, PG10, 6);
226impl_spi_pin!(SPI3, MosiPin, PG11, 6);
227impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 228pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub use regs::dma_v1 as dma; 229pub use regs::dma_v1 as dma;
184pub use regs::exti_v1 as exti; 230pub use regs::exti_v1 as exti;
185pub use regs::gpio_v2 as gpio; 231pub use regs::gpio_v2 as gpio;
186pub use regs::rng_v1 as rng; 232pub use regs::rng_v1 as rng;
233pub use regs::spi_v2 as spi;
187pub use regs::syscfg_l4 as syscfg; 234pub use regs::syscfg_l4 as syscfg;
188mod regs; 235mod regs;
189use embassy_extras::peripherals; 236use embassy_extras::peripherals;
@@ -200,7 +247,7 @@ peripherals!(
200 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 247 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
201 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 248 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
202 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 249 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
203 PI13, PI14, PI15, RNG, SYSCFG 250 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG
204); 251);
205 252
206pub mod interrupt { 253pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l4p5zg.rs b/embassy-stm32/src/pac/stm32l4p5zg.rs
index 7d8ca0863..44abb83bc 100644
--- a/embassy-stm32/src/pac/stm32l4p5zg.rs
+++ b/embassy-stm32/src/pac/stm32l4p5zg.rs
@@ -178,12 +178,59 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MosiPin, PD6, 5);
225impl_spi_pin!(SPI3, MisoPin, PG10, 6);
226impl_spi_pin!(SPI3, MosiPin, PG11, 6);
227impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 228pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub use regs::dma_v1 as dma; 229pub use regs::dma_v1 as dma;
184pub use regs::exti_v1 as exti; 230pub use regs::exti_v1 as exti;
185pub use regs::gpio_v2 as gpio; 231pub use regs::gpio_v2 as gpio;
186pub use regs::rng_v1 as rng; 232pub use regs::rng_v1 as rng;
233pub use regs::spi_v2 as spi;
187pub use regs::syscfg_l4 as syscfg; 234pub use regs::syscfg_l4 as syscfg;
188mod regs; 235mod regs;
189use embassy_extras::peripherals; 236use embassy_extras::peripherals;
@@ -200,7 +247,7 @@ peripherals!(
200 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 247 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
201 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 248 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
202 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 249 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
203 PI13, PI14, PI15, RNG, SYSCFG 250 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG
204); 251);
205 252
206pub mod interrupt { 253pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l4q5ag.rs b/embassy-stm32/src/pac/stm32l4q5ag.rs
index 03c5b6793..e302792a2 100644
--- a/embassy-stm32/src/pac/stm32l4q5ag.rs
+++ b/embassy-stm32/src/pac/stm32l4q5ag.rs
@@ -178,12 +178,59 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MosiPin, PD6, 5);
225impl_spi_pin!(SPI3, MisoPin, PG10, 6);
226impl_spi_pin!(SPI3, MosiPin, PG11, 6);
227impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 228pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub use regs::dma_v1 as dma; 229pub use regs::dma_v1 as dma;
184pub use regs::exti_v1 as exti; 230pub use regs::exti_v1 as exti;
185pub use regs::gpio_v2 as gpio; 231pub use regs::gpio_v2 as gpio;
186pub use regs::rng_v1 as rng; 232pub use regs::rng_v1 as rng;
233pub use regs::spi_v2 as spi;
187pub use regs::syscfg_l4 as syscfg; 234pub use regs::syscfg_l4 as syscfg;
188mod regs; 235mod regs;
189use embassy_extras::peripherals; 236use embassy_extras::peripherals;
@@ -200,7 +247,7 @@ peripherals!(
200 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 247 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
201 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 248 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
202 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 249 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
203 PI13, PI14, PI15, RNG, SYSCFG 250 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG
204); 251);
205 252
206pub mod interrupt { 253pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l4q5cg.rs b/embassy-stm32/src/pac/stm32l4q5cg.rs
index 03c5b6793..e302792a2 100644
--- a/embassy-stm32/src/pac/stm32l4q5cg.rs
+++ b/embassy-stm32/src/pac/stm32l4q5cg.rs
@@ -178,12 +178,59 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MosiPin, PD6, 5);
225impl_spi_pin!(SPI3, MisoPin, PG10, 6);
226impl_spi_pin!(SPI3, MosiPin, PG11, 6);
227impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 228pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub use regs::dma_v1 as dma; 229pub use regs::dma_v1 as dma;
184pub use regs::exti_v1 as exti; 230pub use regs::exti_v1 as exti;
185pub use regs::gpio_v2 as gpio; 231pub use regs::gpio_v2 as gpio;
186pub use regs::rng_v1 as rng; 232pub use regs::rng_v1 as rng;
233pub use regs::spi_v2 as spi;
187pub use regs::syscfg_l4 as syscfg; 234pub use regs::syscfg_l4 as syscfg;
188mod regs; 235mod regs;
189use embassy_extras::peripherals; 236use embassy_extras::peripherals;
@@ -200,7 +247,7 @@ peripherals!(
200 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 247 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
201 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 248 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
202 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 249 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
203 PI13, PI14, PI15, RNG, SYSCFG 250 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG
204); 251);
205 252
206pub mod interrupt { 253pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l4q5qg.rs b/embassy-stm32/src/pac/stm32l4q5qg.rs
index 03c5b6793..e302792a2 100644
--- a/embassy-stm32/src/pac/stm32l4q5qg.rs
+++ b/embassy-stm32/src/pac/stm32l4q5qg.rs
@@ -178,12 +178,59 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MosiPin, PD6, 5);
225impl_spi_pin!(SPI3, MisoPin, PG10, 6);
226impl_spi_pin!(SPI3, MosiPin, PG11, 6);
227impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 228pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub use regs::dma_v1 as dma; 229pub use regs::dma_v1 as dma;
184pub use regs::exti_v1 as exti; 230pub use regs::exti_v1 as exti;
185pub use regs::gpio_v2 as gpio; 231pub use regs::gpio_v2 as gpio;
186pub use regs::rng_v1 as rng; 232pub use regs::rng_v1 as rng;
233pub use regs::spi_v2 as spi;
187pub use regs::syscfg_l4 as syscfg; 234pub use regs::syscfg_l4 as syscfg;
188mod regs; 235mod regs;
189use embassy_extras::peripherals; 236use embassy_extras::peripherals;
@@ -200,7 +247,7 @@ peripherals!(
200 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 247 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
201 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 248 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
202 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 249 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
203 PI13, PI14, PI15, RNG, SYSCFG 250 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG
204); 251);
205 252
206pub mod interrupt { 253pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l4q5rg.rs b/embassy-stm32/src/pac/stm32l4q5rg.rs
index 03c5b6793..e302792a2 100644
--- a/embassy-stm32/src/pac/stm32l4q5rg.rs
+++ b/embassy-stm32/src/pac/stm32l4q5rg.rs
@@ -178,12 +178,59 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MosiPin, PD6, 5);
225impl_spi_pin!(SPI3, MisoPin, PG10, 6);
226impl_spi_pin!(SPI3, MosiPin, PG11, 6);
227impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 228pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub use regs::dma_v1 as dma; 229pub use regs::dma_v1 as dma;
184pub use regs::exti_v1 as exti; 230pub use regs::exti_v1 as exti;
185pub use regs::gpio_v2 as gpio; 231pub use regs::gpio_v2 as gpio;
186pub use regs::rng_v1 as rng; 232pub use regs::rng_v1 as rng;
233pub use regs::spi_v2 as spi;
187pub use regs::syscfg_l4 as syscfg; 234pub use regs::syscfg_l4 as syscfg;
188mod regs; 235mod regs;
189use embassy_extras::peripherals; 236use embassy_extras::peripherals;
@@ -200,7 +247,7 @@ peripherals!(
200 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 247 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
201 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 248 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
202 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 249 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
203 PI13, PI14, PI15, RNG, SYSCFG 250 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG
204); 251);
205 252
206pub mod interrupt { 253pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l4q5vg.rs b/embassy-stm32/src/pac/stm32l4q5vg.rs
index 03c5b6793..e302792a2 100644
--- a/embassy-stm32/src/pac/stm32l4q5vg.rs
+++ b/embassy-stm32/src/pac/stm32l4q5vg.rs
@@ -178,12 +178,59 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MosiPin, PD6, 5);
225impl_spi_pin!(SPI3, MisoPin, PG10, 6);
226impl_spi_pin!(SPI3, MosiPin, PG11, 6);
227impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 228pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub use regs::dma_v1 as dma; 229pub use regs::dma_v1 as dma;
184pub use regs::exti_v1 as exti; 230pub use regs::exti_v1 as exti;
185pub use regs::gpio_v2 as gpio; 231pub use regs::gpio_v2 as gpio;
186pub use regs::rng_v1 as rng; 232pub use regs::rng_v1 as rng;
233pub use regs::spi_v2 as spi;
187pub use regs::syscfg_l4 as syscfg; 234pub use regs::syscfg_l4 as syscfg;
188mod regs; 235mod regs;
189use embassy_extras::peripherals; 236use embassy_extras::peripherals;
@@ -200,7 +247,7 @@ peripherals!(
200 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 247 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
201 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 248 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
202 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 249 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
203 PI13, PI14, PI15, RNG, SYSCFG 250 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG
204); 251);
205 252
206pub mod interrupt { 253pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l4q5zg.rs b/embassy-stm32/src/pac/stm32l4q5zg.rs
index 03c5b6793..e302792a2 100644
--- a/embassy-stm32/src/pac/stm32l4q5zg.rs
+++ b/embassy-stm32/src/pac/stm32l4q5zg.rs
@@ -178,12 +178,59 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MosiPin, PD6, 5);
225impl_spi_pin!(SPI3, MisoPin, PG10, 6);
226impl_spi_pin!(SPI3, MosiPin, PG11, 6);
227impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 228pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub use regs::dma_v1 as dma; 229pub use regs::dma_v1 as dma;
184pub use regs::exti_v1 as exti; 230pub use regs::exti_v1 as exti;
185pub use regs::gpio_v2 as gpio; 231pub use regs::gpio_v2 as gpio;
186pub use regs::rng_v1 as rng; 232pub use regs::rng_v1 as rng;
233pub use regs::spi_v2 as spi;
187pub use regs::syscfg_l4 as syscfg; 234pub use regs::syscfg_l4 as syscfg;
188mod regs; 235mod regs;
189use embassy_extras::peripherals; 236use embassy_extras::peripherals;
@@ -200,7 +247,7 @@ peripherals!(
200 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 247 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
201 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 248 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
202 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 249 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
203 PI13, PI14, PI15, RNG, SYSCFG 250 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG
204); 251);
205 252
206pub mod interrupt { 253pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l4r5ag.rs b/embassy-stm32/src/pac/stm32l4r5ag.rs
index 70339417f..588b46839 100644
--- a/embassy-stm32/src/pac/stm32l4r5ag.rs
+++ b/embassy-stm32/src/pac/stm32l4r5ag.rs
@@ -178,12 +178,59 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MosiPin, PD6, 5);
225impl_spi_pin!(SPI3, MisoPin, PG10, 6);
226impl_spi_pin!(SPI3, MosiPin, PG11, 6);
227impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 228pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub use regs::dma_v1 as dma; 229pub use regs::dma_v1 as dma;
184pub use regs::exti_v1 as exti; 230pub use regs::exti_v1 as exti;
185pub use regs::gpio_v2 as gpio; 231pub use regs::gpio_v2 as gpio;
186pub use regs::rng_v1 as rng; 232pub use regs::rng_v1 as rng;
233pub use regs::spi_v2 as spi;
187pub use regs::syscfg_l4 as syscfg; 234pub use regs::syscfg_l4 as syscfg;
188mod regs; 235mod regs;
189use embassy_extras::peripherals; 236use embassy_extras::peripherals;
@@ -200,7 +247,7 @@ peripherals!(
200 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 247 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
201 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 248 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
202 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 249 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
203 PI13, PI14, PI15, RNG, SYSCFG 250 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG
204); 251);
205 252
206pub mod interrupt { 253pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l4r5ai.rs b/embassy-stm32/src/pac/stm32l4r5ai.rs
index 70339417f..588b46839 100644
--- a/embassy-stm32/src/pac/stm32l4r5ai.rs
+++ b/embassy-stm32/src/pac/stm32l4r5ai.rs
@@ -178,12 +178,59 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MosiPin, PD6, 5);
225impl_spi_pin!(SPI3, MisoPin, PG10, 6);
226impl_spi_pin!(SPI3, MosiPin, PG11, 6);
227impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 228pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub use regs::dma_v1 as dma; 229pub use regs::dma_v1 as dma;
184pub use regs::exti_v1 as exti; 230pub use regs::exti_v1 as exti;
185pub use regs::gpio_v2 as gpio; 231pub use regs::gpio_v2 as gpio;
186pub use regs::rng_v1 as rng; 232pub use regs::rng_v1 as rng;
233pub use regs::spi_v2 as spi;
187pub use regs::syscfg_l4 as syscfg; 234pub use regs::syscfg_l4 as syscfg;
188mod regs; 235mod regs;
189use embassy_extras::peripherals; 236use embassy_extras::peripherals;
@@ -200,7 +247,7 @@ peripherals!(
200 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 247 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
201 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 248 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
202 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 249 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
203 PI13, PI14, PI15, RNG, SYSCFG 250 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG
204); 251);
205 252
206pub mod interrupt { 253pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l4r5qg.rs b/embassy-stm32/src/pac/stm32l4r5qg.rs
index 70339417f..588b46839 100644
--- a/embassy-stm32/src/pac/stm32l4r5qg.rs
+++ b/embassy-stm32/src/pac/stm32l4r5qg.rs
@@ -178,12 +178,59 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MosiPin, PD6, 5);
225impl_spi_pin!(SPI3, MisoPin, PG10, 6);
226impl_spi_pin!(SPI3, MosiPin, PG11, 6);
227impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 228pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub use regs::dma_v1 as dma; 229pub use regs::dma_v1 as dma;
184pub use regs::exti_v1 as exti; 230pub use regs::exti_v1 as exti;
185pub use regs::gpio_v2 as gpio; 231pub use regs::gpio_v2 as gpio;
186pub use regs::rng_v1 as rng; 232pub use regs::rng_v1 as rng;
233pub use regs::spi_v2 as spi;
187pub use regs::syscfg_l4 as syscfg; 234pub use regs::syscfg_l4 as syscfg;
188mod regs; 235mod regs;
189use embassy_extras::peripherals; 236use embassy_extras::peripherals;
@@ -200,7 +247,7 @@ peripherals!(
200 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 247 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
201 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 248 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
202 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 249 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
203 PI13, PI14, PI15, RNG, SYSCFG 250 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG
204); 251);
205 252
206pub mod interrupt { 253pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l4r5qi.rs b/embassy-stm32/src/pac/stm32l4r5qi.rs
index 70339417f..588b46839 100644
--- a/embassy-stm32/src/pac/stm32l4r5qi.rs
+++ b/embassy-stm32/src/pac/stm32l4r5qi.rs
@@ -178,12 +178,59 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MosiPin, PD6, 5);
225impl_spi_pin!(SPI3, MisoPin, PG10, 6);
226impl_spi_pin!(SPI3, MosiPin, PG11, 6);
227impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 228pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub use regs::dma_v1 as dma; 229pub use regs::dma_v1 as dma;
184pub use regs::exti_v1 as exti; 230pub use regs::exti_v1 as exti;
185pub use regs::gpio_v2 as gpio; 231pub use regs::gpio_v2 as gpio;
186pub use regs::rng_v1 as rng; 232pub use regs::rng_v1 as rng;
233pub use regs::spi_v2 as spi;
187pub use regs::syscfg_l4 as syscfg; 234pub use regs::syscfg_l4 as syscfg;
188mod regs; 235mod regs;
189use embassy_extras::peripherals; 236use embassy_extras::peripherals;
@@ -200,7 +247,7 @@ peripherals!(
200 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 247 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
201 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 248 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
202 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 249 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
203 PI13, PI14, PI15, RNG, SYSCFG 250 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG
204); 251);
205 252
206pub mod interrupt { 253pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l4r5vg.rs b/embassy-stm32/src/pac/stm32l4r5vg.rs
index 70339417f..588b46839 100644
--- a/embassy-stm32/src/pac/stm32l4r5vg.rs
+++ b/embassy-stm32/src/pac/stm32l4r5vg.rs
@@ -178,12 +178,59 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MosiPin, PD6, 5);
225impl_spi_pin!(SPI3, MisoPin, PG10, 6);
226impl_spi_pin!(SPI3, MosiPin, PG11, 6);
227impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 228pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub use regs::dma_v1 as dma; 229pub use regs::dma_v1 as dma;
184pub use regs::exti_v1 as exti; 230pub use regs::exti_v1 as exti;
185pub use regs::gpio_v2 as gpio; 231pub use regs::gpio_v2 as gpio;
186pub use regs::rng_v1 as rng; 232pub use regs::rng_v1 as rng;
233pub use regs::spi_v2 as spi;
187pub use regs::syscfg_l4 as syscfg; 234pub use regs::syscfg_l4 as syscfg;
188mod regs; 235mod regs;
189use embassy_extras::peripherals; 236use embassy_extras::peripherals;
@@ -200,7 +247,7 @@ peripherals!(
200 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 247 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
201 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 248 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
202 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 249 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
203 PI13, PI14, PI15, RNG, SYSCFG 250 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG
204); 251);
205 252
206pub mod interrupt { 253pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l4r5vi.rs b/embassy-stm32/src/pac/stm32l4r5vi.rs
index 70339417f..588b46839 100644
--- a/embassy-stm32/src/pac/stm32l4r5vi.rs
+++ b/embassy-stm32/src/pac/stm32l4r5vi.rs
@@ -178,12 +178,59 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MosiPin, PD6, 5);
225impl_spi_pin!(SPI3, MisoPin, PG10, 6);
226impl_spi_pin!(SPI3, MosiPin, PG11, 6);
227impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 228pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub use regs::dma_v1 as dma; 229pub use regs::dma_v1 as dma;
184pub use regs::exti_v1 as exti; 230pub use regs::exti_v1 as exti;
185pub use regs::gpio_v2 as gpio; 231pub use regs::gpio_v2 as gpio;
186pub use regs::rng_v1 as rng; 232pub use regs::rng_v1 as rng;
233pub use regs::spi_v2 as spi;
187pub use regs::syscfg_l4 as syscfg; 234pub use regs::syscfg_l4 as syscfg;
188mod regs; 235mod regs;
189use embassy_extras::peripherals; 236use embassy_extras::peripherals;
@@ -200,7 +247,7 @@ peripherals!(
200 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 247 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
201 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 248 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
202 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 249 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
203 PI13, PI14, PI15, RNG, SYSCFG 250 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG
204); 251);
205 252
206pub mod interrupt { 253pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l4r5zg.rs b/embassy-stm32/src/pac/stm32l4r5zg.rs
index 70339417f..588b46839 100644
--- a/embassy-stm32/src/pac/stm32l4r5zg.rs
+++ b/embassy-stm32/src/pac/stm32l4r5zg.rs
@@ -178,12 +178,59 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MosiPin, PD6, 5);
225impl_spi_pin!(SPI3, MisoPin, PG10, 6);
226impl_spi_pin!(SPI3, MosiPin, PG11, 6);
227impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 228pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub use regs::dma_v1 as dma; 229pub use regs::dma_v1 as dma;
184pub use regs::exti_v1 as exti; 230pub use regs::exti_v1 as exti;
185pub use regs::gpio_v2 as gpio; 231pub use regs::gpio_v2 as gpio;
186pub use regs::rng_v1 as rng; 232pub use regs::rng_v1 as rng;
233pub use regs::spi_v2 as spi;
187pub use regs::syscfg_l4 as syscfg; 234pub use regs::syscfg_l4 as syscfg;
188mod regs; 235mod regs;
189use embassy_extras::peripherals; 236use embassy_extras::peripherals;
@@ -200,7 +247,7 @@ peripherals!(
200 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 247 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
201 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 248 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
202 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 249 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
203 PI13, PI14, PI15, RNG, SYSCFG 250 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG
204); 251);
205 252
206pub mod interrupt { 253pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l4r5zi.rs b/embassy-stm32/src/pac/stm32l4r5zi.rs
index 70339417f..588b46839 100644
--- a/embassy-stm32/src/pac/stm32l4r5zi.rs
+++ b/embassy-stm32/src/pac/stm32l4r5zi.rs
@@ -178,12 +178,59 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MosiPin, PD6, 5);
225impl_spi_pin!(SPI3, MisoPin, PG10, 6);
226impl_spi_pin!(SPI3, MosiPin, PG11, 6);
227impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 228pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub use regs::dma_v1 as dma; 229pub use regs::dma_v1 as dma;
184pub use regs::exti_v1 as exti; 230pub use regs::exti_v1 as exti;
185pub use regs::gpio_v2 as gpio; 231pub use regs::gpio_v2 as gpio;
186pub use regs::rng_v1 as rng; 232pub use regs::rng_v1 as rng;
233pub use regs::spi_v2 as spi;
187pub use regs::syscfg_l4 as syscfg; 234pub use regs::syscfg_l4 as syscfg;
188mod regs; 235mod regs;
189use embassy_extras::peripherals; 236use embassy_extras::peripherals;
@@ -200,7 +247,7 @@ peripherals!(
200 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 247 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
201 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 248 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
202 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 249 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
203 PI13, PI14, PI15, RNG, SYSCFG 250 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG
204); 251);
205 252
206pub mod interrupt { 253pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l4r7ai.rs b/embassy-stm32/src/pac/stm32l4r7ai.rs
index 9d88e59af..39c03935b 100644
--- a/embassy-stm32/src/pac/stm32l4r7ai.rs
+++ b/embassy-stm32/src/pac/stm32l4r7ai.rs
@@ -178,12 +178,59 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MosiPin, PD6, 5);
225impl_spi_pin!(SPI3, MisoPin, PG10, 6);
226impl_spi_pin!(SPI3, MosiPin, PG11, 6);
227impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 228pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub use regs::dma_v1 as dma; 229pub use regs::dma_v1 as dma;
184pub use regs::exti_v1 as exti; 230pub use regs::exti_v1 as exti;
185pub use regs::gpio_v2 as gpio; 231pub use regs::gpio_v2 as gpio;
186pub use regs::rng_v1 as rng; 232pub use regs::rng_v1 as rng;
233pub use regs::spi_v2 as spi;
187pub use regs::syscfg_l4 as syscfg; 234pub use regs::syscfg_l4 as syscfg;
188mod regs; 235mod regs;
189use embassy_extras::peripherals; 236use embassy_extras::peripherals;
@@ -200,7 +247,7 @@ peripherals!(
200 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 247 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
201 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 248 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
202 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 249 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
203 PI13, PI14, PI15, RNG, SYSCFG 250 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG
204); 251);
205 252
206pub mod interrupt { 253pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l4r7vi.rs b/embassy-stm32/src/pac/stm32l4r7vi.rs
index 9d88e59af..39c03935b 100644
--- a/embassy-stm32/src/pac/stm32l4r7vi.rs
+++ b/embassy-stm32/src/pac/stm32l4r7vi.rs
@@ -178,12 +178,59 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MosiPin, PD6, 5);
225impl_spi_pin!(SPI3, MisoPin, PG10, 6);
226impl_spi_pin!(SPI3, MosiPin, PG11, 6);
227impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 228pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub use regs::dma_v1 as dma; 229pub use regs::dma_v1 as dma;
184pub use regs::exti_v1 as exti; 230pub use regs::exti_v1 as exti;
185pub use regs::gpio_v2 as gpio; 231pub use regs::gpio_v2 as gpio;
186pub use regs::rng_v1 as rng; 232pub use regs::rng_v1 as rng;
233pub use regs::spi_v2 as spi;
187pub use regs::syscfg_l4 as syscfg; 234pub use regs::syscfg_l4 as syscfg;
188mod regs; 235mod regs;
189use embassy_extras::peripherals; 236use embassy_extras::peripherals;
@@ -200,7 +247,7 @@ peripherals!(
200 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 247 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
201 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 248 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
202 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 249 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
203 PI13, PI14, PI15, RNG, SYSCFG 250 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG
204); 251);
205 252
206pub mod interrupt { 253pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l4r7zi.rs b/embassy-stm32/src/pac/stm32l4r7zi.rs
index 9d88e59af..39c03935b 100644
--- a/embassy-stm32/src/pac/stm32l4r7zi.rs
+++ b/embassy-stm32/src/pac/stm32l4r7zi.rs
@@ -178,12 +178,59 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MosiPin, PD6, 5);
225impl_spi_pin!(SPI3, MisoPin, PG10, 6);
226impl_spi_pin!(SPI3, MosiPin, PG11, 6);
227impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 228pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub use regs::dma_v1 as dma; 229pub use regs::dma_v1 as dma;
184pub use regs::exti_v1 as exti; 230pub use regs::exti_v1 as exti;
185pub use regs::gpio_v2 as gpio; 231pub use regs::gpio_v2 as gpio;
186pub use regs::rng_v1 as rng; 232pub use regs::rng_v1 as rng;
233pub use regs::spi_v2 as spi;
187pub use regs::syscfg_l4 as syscfg; 234pub use regs::syscfg_l4 as syscfg;
188mod regs; 235mod regs;
189use embassy_extras::peripherals; 236use embassy_extras::peripherals;
@@ -200,7 +247,7 @@ peripherals!(
200 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 247 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
201 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 248 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
202 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 249 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
203 PI13, PI14, PI15, RNG, SYSCFG 250 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG
204); 251);
205 252
206pub mod interrupt { 253pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l4r9ag.rs b/embassy-stm32/src/pac/stm32l4r9ag.rs
index edb5287c2..d4bc778fd 100644
--- a/embassy-stm32/src/pac/stm32l4r9ag.rs
+++ b/embassy-stm32/src/pac/stm32l4r9ag.rs
@@ -178,12 +178,59 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MosiPin, PD6, 5);
225impl_spi_pin!(SPI3, MisoPin, PG10, 6);
226impl_spi_pin!(SPI3, MosiPin, PG11, 6);
227impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 228pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub use regs::dma_v1 as dma; 229pub use regs::dma_v1 as dma;
184pub use regs::exti_v1 as exti; 230pub use regs::exti_v1 as exti;
185pub use regs::gpio_v2 as gpio; 231pub use regs::gpio_v2 as gpio;
186pub use regs::rng_v1 as rng; 232pub use regs::rng_v1 as rng;
233pub use regs::spi_v2 as spi;
187pub use regs::syscfg_l4 as syscfg; 234pub use regs::syscfg_l4 as syscfg;
188mod regs; 235mod regs;
189use embassy_extras::peripherals; 236use embassy_extras::peripherals;
@@ -200,7 +247,7 @@ peripherals!(
200 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 247 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
201 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 248 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
202 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 249 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
203 PI13, PI14, PI15, RNG, SYSCFG 250 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG
204); 251);
205 252
206pub mod interrupt { 253pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l4r9ai.rs b/embassy-stm32/src/pac/stm32l4r9ai.rs
index edb5287c2..d4bc778fd 100644
--- a/embassy-stm32/src/pac/stm32l4r9ai.rs
+++ b/embassy-stm32/src/pac/stm32l4r9ai.rs
@@ -178,12 +178,59 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MosiPin, PD6, 5);
225impl_spi_pin!(SPI3, MisoPin, PG10, 6);
226impl_spi_pin!(SPI3, MosiPin, PG11, 6);
227impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 228pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub use regs::dma_v1 as dma; 229pub use regs::dma_v1 as dma;
184pub use regs::exti_v1 as exti; 230pub use regs::exti_v1 as exti;
185pub use regs::gpio_v2 as gpio; 231pub use regs::gpio_v2 as gpio;
186pub use regs::rng_v1 as rng; 232pub use regs::rng_v1 as rng;
233pub use regs::spi_v2 as spi;
187pub use regs::syscfg_l4 as syscfg; 234pub use regs::syscfg_l4 as syscfg;
188mod regs; 235mod regs;
189use embassy_extras::peripherals; 236use embassy_extras::peripherals;
@@ -200,7 +247,7 @@ peripherals!(
200 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 247 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
201 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 248 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
202 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 249 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
203 PI13, PI14, PI15, RNG, SYSCFG 250 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG
204); 251);
205 252
206pub mod interrupt { 253pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l4r9vg.rs b/embassy-stm32/src/pac/stm32l4r9vg.rs
index edb5287c2..d4bc778fd 100644
--- a/embassy-stm32/src/pac/stm32l4r9vg.rs
+++ b/embassy-stm32/src/pac/stm32l4r9vg.rs
@@ -178,12 +178,59 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MosiPin, PD6, 5);
225impl_spi_pin!(SPI3, MisoPin, PG10, 6);
226impl_spi_pin!(SPI3, MosiPin, PG11, 6);
227impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 228pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub use regs::dma_v1 as dma; 229pub use regs::dma_v1 as dma;
184pub use regs::exti_v1 as exti; 230pub use regs::exti_v1 as exti;
185pub use regs::gpio_v2 as gpio; 231pub use regs::gpio_v2 as gpio;
186pub use regs::rng_v1 as rng; 232pub use regs::rng_v1 as rng;
233pub use regs::spi_v2 as spi;
187pub use regs::syscfg_l4 as syscfg; 234pub use regs::syscfg_l4 as syscfg;
188mod regs; 235mod regs;
189use embassy_extras::peripherals; 236use embassy_extras::peripherals;
@@ -200,7 +247,7 @@ peripherals!(
200 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 247 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
201 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 248 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
202 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 249 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
203 PI13, PI14, PI15, RNG, SYSCFG 250 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG
204); 251);
205 252
206pub mod interrupt { 253pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l4r9vi.rs b/embassy-stm32/src/pac/stm32l4r9vi.rs
index edb5287c2..d4bc778fd 100644
--- a/embassy-stm32/src/pac/stm32l4r9vi.rs
+++ b/embassy-stm32/src/pac/stm32l4r9vi.rs
@@ -178,12 +178,59 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MosiPin, PD6, 5);
225impl_spi_pin!(SPI3, MisoPin, PG10, 6);
226impl_spi_pin!(SPI3, MosiPin, PG11, 6);
227impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 228pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub use regs::dma_v1 as dma; 229pub use regs::dma_v1 as dma;
184pub use regs::exti_v1 as exti; 230pub use regs::exti_v1 as exti;
185pub use regs::gpio_v2 as gpio; 231pub use regs::gpio_v2 as gpio;
186pub use regs::rng_v1 as rng; 232pub use regs::rng_v1 as rng;
233pub use regs::spi_v2 as spi;
187pub use regs::syscfg_l4 as syscfg; 234pub use regs::syscfg_l4 as syscfg;
188mod regs; 235mod regs;
189use embassy_extras::peripherals; 236use embassy_extras::peripherals;
@@ -200,7 +247,7 @@ peripherals!(
200 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 247 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
201 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 248 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
202 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 249 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
203 PI13, PI14, PI15, RNG, SYSCFG 250 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG
204); 251);
205 252
206pub mod interrupt { 253pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l4r9zg.rs b/embassy-stm32/src/pac/stm32l4r9zg.rs
index edb5287c2..d4bc778fd 100644
--- a/embassy-stm32/src/pac/stm32l4r9zg.rs
+++ b/embassy-stm32/src/pac/stm32l4r9zg.rs
@@ -178,12 +178,59 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MosiPin, PD6, 5);
225impl_spi_pin!(SPI3, MisoPin, PG10, 6);
226impl_spi_pin!(SPI3, MosiPin, PG11, 6);
227impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 228pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub use regs::dma_v1 as dma; 229pub use regs::dma_v1 as dma;
184pub use regs::exti_v1 as exti; 230pub use regs::exti_v1 as exti;
185pub use regs::gpio_v2 as gpio; 231pub use regs::gpio_v2 as gpio;
186pub use regs::rng_v1 as rng; 232pub use regs::rng_v1 as rng;
233pub use regs::spi_v2 as spi;
187pub use regs::syscfg_l4 as syscfg; 234pub use regs::syscfg_l4 as syscfg;
188mod regs; 235mod regs;
189use embassy_extras::peripherals; 236use embassy_extras::peripherals;
@@ -200,7 +247,7 @@ peripherals!(
200 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 247 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
201 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 248 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
202 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 249 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
203 PI13, PI14, PI15, RNG, SYSCFG 250 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG
204); 251);
205 252
206pub mod interrupt { 253pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l4r9zi.rs b/embassy-stm32/src/pac/stm32l4r9zi.rs
index edb5287c2..d4bc778fd 100644
--- a/embassy-stm32/src/pac/stm32l4r9zi.rs
+++ b/embassy-stm32/src/pac/stm32l4r9zi.rs
@@ -178,12 +178,59 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MosiPin, PD6, 5);
225impl_spi_pin!(SPI3, MisoPin, PG10, 6);
226impl_spi_pin!(SPI3, MosiPin, PG11, 6);
227impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 228pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub use regs::dma_v1 as dma; 229pub use regs::dma_v1 as dma;
184pub use regs::exti_v1 as exti; 230pub use regs::exti_v1 as exti;
185pub use regs::gpio_v2 as gpio; 231pub use regs::gpio_v2 as gpio;
186pub use regs::rng_v1 as rng; 232pub use regs::rng_v1 as rng;
233pub use regs::spi_v2 as spi;
187pub use regs::syscfg_l4 as syscfg; 234pub use regs::syscfg_l4 as syscfg;
188mod regs; 235mod regs;
189use embassy_extras::peripherals; 236use embassy_extras::peripherals;
@@ -200,7 +247,7 @@ peripherals!(
200 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 247 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
201 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 248 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
202 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 249 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
203 PI13, PI14, PI15, RNG, SYSCFG 250 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG
204); 251);
205 252
206pub mod interrupt { 253pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l4s5ai.rs b/embassy-stm32/src/pac/stm32l4s5ai.rs
index e7d2eb0ce..86caf9c50 100644
--- a/embassy-stm32/src/pac/stm32l4s5ai.rs
+++ b/embassy-stm32/src/pac/stm32l4s5ai.rs
@@ -178,12 +178,59 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MosiPin, PD6, 5);
225impl_spi_pin!(SPI3, MisoPin, PG10, 6);
226impl_spi_pin!(SPI3, MosiPin, PG11, 6);
227impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 228pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub use regs::dma_v1 as dma; 229pub use regs::dma_v1 as dma;
184pub use regs::exti_v1 as exti; 230pub use regs::exti_v1 as exti;
185pub use regs::gpio_v2 as gpio; 231pub use regs::gpio_v2 as gpio;
186pub use regs::rng_v1 as rng; 232pub use regs::rng_v1 as rng;
233pub use regs::spi_v2 as spi;
187pub use regs::syscfg_l4 as syscfg; 234pub use regs::syscfg_l4 as syscfg;
188mod regs; 235mod regs;
189use embassy_extras::peripherals; 236use embassy_extras::peripherals;
@@ -200,7 +247,7 @@ peripherals!(
200 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 247 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
201 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 248 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
202 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 249 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
203 PI13, PI14, PI15, RNG, SYSCFG 250 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG
204); 251);
205 252
206pub mod interrupt { 253pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l4s5qi.rs b/embassy-stm32/src/pac/stm32l4s5qi.rs
index e7d2eb0ce..86caf9c50 100644
--- a/embassy-stm32/src/pac/stm32l4s5qi.rs
+++ b/embassy-stm32/src/pac/stm32l4s5qi.rs
@@ -178,12 +178,59 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MosiPin, PD6, 5);
225impl_spi_pin!(SPI3, MisoPin, PG10, 6);
226impl_spi_pin!(SPI3, MosiPin, PG11, 6);
227impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 228pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub use regs::dma_v1 as dma; 229pub use regs::dma_v1 as dma;
184pub use regs::exti_v1 as exti; 230pub use regs::exti_v1 as exti;
185pub use regs::gpio_v2 as gpio; 231pub use regs::gpio_v2 as gpio;
186pub use regs::rng_v1 as rng; 232pub use regs::rng_v1 as rng;
233pub use regs::spi_v2 as spi;
187pub use regs::syscfg_l4 as syscfg; 234pub use regs::syscfg_l4 as syscfg;
188mod regs; 235mod regs;
189use embassy_extras::peripherals; 236use embassy_extras::peripherals;
@@ -200,7 +247,7 @@ peripherals!(
200 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 247 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
201 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 248 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
202 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 249 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
203 PI13, PI14, PI15, RNG, SYSCFG 250 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG
204); 251);
205 252
206pub mod interrupt { 253pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l4s5vi.rs b/embassy-stm32/src/pac/stm32l4s5vi.rs
index e7d2eb0ce..86caf9c50 100644
--- a/embassy-stm32/src/pac/stm32l4s5vi.rs
+++ b/embassy-stm32/src/pac/stm32l4s5vi.rs
@@ -178,12 +178,59 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MosiPin, PD6, 5);
225impl_spi_pin!(SPI3, MisoPin, PG10, 6);
226impl_spi_pin!(SPI3, MosiPin, PG11, 6);
227impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 228pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub use regs::dma_v1 as dma; 229pub use regs::dma_v1 as dma;
184pub use regs::exti_v1 as exti; 230pub use regs::exti_v1 as exti;
185pub use regs::gpio_v2 as gpio; 231pub use regs::gpio_v2 as gpio;
186pub use regs::rng_v1 as rng; 232pub use regs::rng_v1 as rng;
233pub use regs::spi_v2 as spi;
187pub use regs::syscfg_l4 as syscfg; 234pub use regs::syscfg_l4 as syscfg;
188mod regs; 235mod regs;
189use embassy_extras::peripherals; 236use embassy_extras::peripherals;
@@ -200,7 +247,7 @@ peripherals!(
200 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 247 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
201 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 248 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
202 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 249 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
203 PI13, PI14, PI15, RNG, SYSCFG 250 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG
204); 251);
205 252
206pub mod interrupt { 253pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l4s5zi.rs b/embassy-stm32/src/pac/stm32l4s5zi.rs
index e7d2eb0ce..86caf9c50 100644
--- a/embassy-stm32/src/pac/stm32l4s5zi.rs
+++ b/embassy-stm32/src/pac/stm32l4s5zi.rs
@@ -178,12 +178,59 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MosiPin, PD6, 5);
225impl_spi_pin!(SPI3, MisoPin, PG10, 6);
226impl_spi_pin!(SPI3, MosiPin, PG11, 6);
227impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 228pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub use regs::dma_v1 as dma; 229pub use regs::dma_v1 as dma;
184pub use regs::exti_v1 as exti; 230pub use regs::exti_v1 as exti;
185pub use regs::gpio_v2 as gpio; 231pub use regs::gpio_v2 as gpio;
186pub use regs::rng_v1 as rng; 232pub use regs::rng_v1 as rng;
233pub use regs::spi_v2 as spi;
187pub use regs::syscfg_l4 as syscfg; 234pub use regs::syscfg_l4 as syscfg;
188mod regs; 235mod regs;
189use embassy_extras::peripherals; 236use embassy_extras::peripherals;
@@ -200,7 +247,7 @@ peripherals!(
200 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 247 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
201 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 248 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
202 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 249 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
203 PI13, PI14, PI15, RNG, SYSCFG 250 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG
204); 251);
205 252
206pub mod interrupt { 253pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l4s7ai.rs b/embassy-stm32/src/pac/stm32l4s7ai.rs
index 072ffc23b..abee0fd92 100644
--- a/embassy-stm32/src/pac/stm32l4s7ai.rs
+++ b/embassy-stm32/src/pac/stm32l4s7ai.rs
@@ -178,12 +178,59 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MosiPin, PD6, 5);
225impl_spi_pin!(SPI3, MisoPin, PG10, 6);
226impl_spi_pin!(SPI3, MosiPin, PG11, 6);
227impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 228pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub use regs::dma_v1 as dma; 229pub use regs::dma_v1 as dma;
184pub use regs::exti_v1 as exti; 230pub use regs::exti_v1 as exti;
185pub use regs::gpio_v2 as gpio; 231pub use regs::gpio_v2 as gpio;
186pub use regs::rng_v1 as rng; 232pub use regs::rng_v1 as rng;
233pub use regs::spi_v2 as spi;
187pub use regs::syscfg_l4 as syscfg; 234pub use regs::syscfg_l4 as syscfg;
188mod regs; 235mod regs;
189use embassy_extras::peripherals; 236use embassy_extras::peripherals;
@@ -200,7 +247,7 @@ peripherals!(
200 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 247 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
201 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 248 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
202 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 249 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
203 PI13, PI14, PI15, RNG, SYSCFG 250 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG
204); 251);
205 252
206pub mod interrupt { 253pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l4s7vi.rs b/embassy-stm32/src/pac/stm32l4s7vi.rs
index 072ffc23b..abee0fd92 100644
--- a/embassy-stm32/src/pac/stm32l4s7vi.rs
+++ b/embassy-stm32/src/pac/stm32l4s7vi.rs
@@ -178,12 +178,59 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MosiPin, PD6, 5);
225impl_spi_pin!(SPI3, MisoPin, PG10, 6);
226impl_spi_pin!(SPI3, MosiPin, PG11, 6);
227impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 228pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub use regs::dma_v1 as dma; 229pub use regs::dma_v1 as dma;
184pub use regs::exti_v1 as exti; 230pub use regs::exti_v1 as exti;
185pub use regs::gpio_v2 as gpio; 231pub use regs::gpio_v2 as gpio;
186pub use regs::rng_v1 as rng; 232pub use regs::rng_v1 as rng;
233pub use regs::spi_v2 as spi;
187pub use regs::syscfg_l4 as syscfg; 234pub use regs::syscfg_l4 as syscfg;
188mod regs; 235mod regs;
189use embassy_extras::peripherals; 236use embassy_extras::peripherals;
@@ -200,7 +247,7 @@ peripherals!(
200 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 247 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
201 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 248 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
202 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 249 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
203 PI13, PI14, PI15, RNG, SYSCFG 250 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG
204); 251);
205 252
206pub mod interrupt { 253pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l4s7zi.rs b/embassy-stm32/src/pac/stm32l4s7zi.rs
index 072ffc23b..abee0fd92 100644
--- a/embassy-stm32/src/pac/stm32l4s7zi.rs
+++ b/embassy-stm32/src/pac/stm32l4s7zi.rs
@@ -178,12 +178,59 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MosiPin, PD6, 5);
225impl_spi_pin!(SPI3, MisoPin, PG10, 6);
226impl_spi_pin!(SPI3, MosiPin, PG11, 6);
227impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 228pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub use regs::dma_v1 as dma; 229pub use regs::dma_v1 as dma;
184pub use regs::exti_v1 as exti; 230pub use regs::exti_v1 as exti;
185pub use regs::gpio_v2 as gpio; 231pub use regs::gpio_v2 as gpio;
186pub use regs::rng_v1 as rng; 232pub use regs::rng_v1 as rng;
233pub use regs::spi_v2 as spi;
187pub use regs::syscfg_l4 as syscfg; 234pub use regs::syscfg_l4 as syscfg;
188mod regs; 235mod regs;
189use embassy_extras::peripherals; 236use embassy_extras::peripherals;
@@ -200,7 +247,7 @@ peripherals!(
200 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 247 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
201 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 248 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
202 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 249 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
203 PI13, PI14, PI15, RNG, SYSCFG 250 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG
204); 251);
205 252
206pub mod interrupt { 253pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l4s9ai.rs b/embassy-stm32/src/pac/stm32l4s9ai.rs
index c3ef398d3..1207d866c 100644
--- a/embassy-stm32/src/pac/stm32l4s9ai.rs
+++ b/embassy-stm32/src/pac/stm32l4s9ai.rs
@@ -178,12 +178,59 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MosiPin, PD6, 5);
225impl_spi_pin!(SPI3, MisoPin, PG10, 6);
226impl_spi_pin!(SPI3, MosiPin, PG11, 6);
227impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 228pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub use regs::dma_v1 as dma; 229pub use regs::dma_v1 as dma;
184pub use regs::exti_v1 as exti; 230pub use regs::exti_v1 as exti;
185pub use regs::gpio_v2 as gpio; 231pub use regs::gpio_v2 as gpio;
186pub use regs::rng_v1 as rng; 232pub use regs::rng_v1 as rng;
233pub use regs::spi_v2 as spi;
187pub use regs::syscfg_l4 as syscfg; 234pub use regs::syscfg_l4 as syscfg;
188mod regs; 235mod regs;
189use embassy_extras::peripherals; 236use embassy_extras::peripherals;
@@ -200,7 +247,7 @@ peripherals!(
200 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 247 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
201 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 248 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
202 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 249 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
203 PI13, PI14, PI15, RNG, SYSCFG 250 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG
204); 251);
205 252
206pub mod interrupt { 253pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l4s9vi.rs b/embassy-stm32/src/pac/stm32l4s9vi.rs
index c3ef398d3..1207d866c 100644
--- a/embassy-stm32/src/pac/stm32l4s9vi.rs
+++ b/embassy-stm32/src/pac/stm32l4s9vi.rs
@@ -178,12 +178,59 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MosiPin, PD6, 5);
225impl_spi_pin!(SPI3, MisoPin, PG10, 6);
226impl_spi_pin!(SPI3, MosiPin, PG11, 6);
227impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 228pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub use regs::dma_v1 as dma; 229pub use regs::dma_v1 as dma;
184pub use regs::exti_v1 as exti; 230pub use regs::exti_v1 as exti;
185pub use regs::gpio_v2 as gpio; 231pub use regs::gpio_v2 as gpio;
186pub use regs::rng_v1 as rng; 232pub use regs::rng_v1 as rng;
233pub use regs::spi_v2 as spi;
187pub use regs::syscfg_l4 as syscfg; 234pub use regs::syscfg_l4 as syscfg;
188mod regs; 235mod regs;
189use embassy_extras::peripherals; 236use embassy_extras::peripherals;
@@ -200,7 +247,7 @@ peripherals!(
200 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 247 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
201 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 248 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
202 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 249 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
203 PI13, PI14, PI15, RNG, SYSCFG 250 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG
204); 251);
205 252
206pub mod interrupt { 253pub mod interrupt {
diff --git a/embassy-stm32/src/pac/stm32l4s9zi.rs b/embassy-stm32/src/pac/stm32l4s9zi.rs
index c3ef398d3..1207d866c 100644
--- a/embassy-stm32/src/pac/stm32l4s9zi.rs
+++ b/embassy-stm32/src/pac/stm32l4s9zi.rs
@@ -178,12 +178,59 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13);
178impl_gpio_pin!(PI14, 8, 14, EXTI14); 178impl_gpio_pin!(PI14, 8, 14, EXTI14);
179impl_gpio_pin!(PI15, 8, 15, EXTI15); 179impl_gpio_pin!(PI15, 8, 15, EXTI15);
180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); 180pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
181impl_rng!(RNG); 181impl_rng!(RNG, RNG);
182pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
183impl_spi!(SPI1, APB2);
184impl_spi_pin!(SPI1, SckPin, PA1, 5);
185impl_spi_pin!(SPI1, MisoPin, PA11, 5);
186impl_spi_pin!(SPI1, MosiPin, PA12, 5);
187impl_spi_pin!(SPI1, SckPin, PA5, 5);
188impl_spi_pin!(SPI1, MisoPin, PA6, 5);
189impl_spi_pin!(SPI1, MosiPin, PA7, 5);
190impl_spi_pin!(SPI1, SckPin, PB3, 5);
191impl_spi_pin!(SPI1, MisoPin, PB4, 5);
192impl_spi_pin!(SPI1, MosiPin, PB5, 5);
193impl_spi_pin!(SPI1, SckPin, PE13, 5);
194impl_spi_pin!(SPI1, MisoPin, PE14, 5);
195impl_spi_pin!(SPI1, MosiPin, PE15, 5);
196impl_spi_pin!(SPI1, SckPin, PG2, 5);
197impl_spi_pin!(SPI1, MisoPin, PG3, 5);
198impl_spi_pin!(SPI1, MosiPin, PG4, 5);
199pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
200impl_spi!(SPI2, APB1);
201impl_spi_pin!(SPI2, SckPin, PA9, 3);
202impl_spi_pin!(SPI2, SckPin, PB10, 5);
203impl_spi_pin!(SPI2, SckPin, PB13, 5);
204impl_spi_pin!(SPI2, MisoPin, PB14, 5);
205impl_spi_pin!(SPI2, MosiPin, PB15, 5);
206impl_spi_pin!(SPI2, MosiPin, PC1, 3);
207impl_spi_pin!(SPI2, MisoPin, PC2, 5);
208impl_spi_pin!(SPI2, MosiPin, PC3, 5);
209impl_spi_pin!(SPI2, SckPin, PD1, 5);
210impl_spi_pin!(SPI2, SckPin, PD3, 3);
211impl_spi_pin!(SPI2, MisoPin, PD3, 5);
212impl_spi_pin!(SPI2, MosiPin, PD4, 5);
213impl_spi_pin!(SPI2, SckPin, PI1, 5);
214impl_spi_pin!(SPI2, MisoPin, PI2, 5);
215impl_spi_pin!(SPI2, MosiPin, PI3, 5);
216pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
217impl_spi!(SPI3, APB1);
218impl_spi_pin!(SPI3, SckPin, PB3, 6);
219impl_spi_pin!(SPI3, MisoPin, PB4, 6);
220impl_spi_pin!(SPI3, MosiPin, PB5, 6);
221impl_spi_pin!(SPI3, SckPin, PC10, 6);
222impl_spi_pin!(SPI3, MisoPin, PC11, 6);
223impl_spi_pin!(SPI3, MosiPin, PC12, 6);
224impl_spi_pin!(SPI3, MosiPin, PD6, 5);
225impl_spi_pin!(SPI3, MisoPin, PG10, 6);
226impl_spi_pin!(SPI3, MosiPin, PG11, 6);
227impl_spi_pin!(SPI3, SckPin, PG9, 6);
182pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); 228pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _);
183pub use regs::dma_v1 as dma; 229pub use regs::dma_v1 as dma;
184pub use regs::exti_v1 as exti; 230pub use regs::exti_v1 as exti;
185pub use regs::gpio_v2 as gpio; 231pub use regs::gpio_v2 as gpio;
186pub use regs::rng_v1 as rng; 232pub use regs::rng_v1 as rng;
233pub use regs::spi_v2 as spi;
187pub use regs::syscfg_l4 as syscfg; 234pub use regs::syscfg_l4 as syscfg;
188mod regs; 235mod regs;
189use embassy_extras::peripherals; 236use embassy_extras::peripherals;
@@ -200,7 +247,7 @@ peripherals!(
200 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, 247 PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
201 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, 248 PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
202 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, 249 PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
203 PI13, PI14, PI15, RNG, SYSCFG 250 PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG
204); 251);
205 252
206pub mod interrupt { 253pub mod interrupt {
diff --git a/embassy-stm32/src/rng.rs b/embassy-stm32/src/rng.rs
index af527cd53..bc613e0a3 100644
--- a/embassy-stm32/src/rng.rs
+++ b/embassy-stm32/src/rng.rs
@@ -2,7 +2,6 @@
2 2
3use core::future::Future; 3use core::future::Future;
4use core::task::Poll; 4use core::task::Poll;
5use defmt::*;
6use embassy::traits; 5use embassy::traits;
7use embassy::util::{AtomicWaker, Unborrow}; 6use embassy::util::{AtomicWaker, Unborrow};
8use embassy_extras::unborrow; 7use embassy_extras::unborrow;
@@ -12,15 +11,11 @@ use rand_core::{CryptoRng, RngCore};
12use crate::interrupt; 11use crate::interrupt;
13use crate::pac; 12use crate::pac;
14 13
15static RNG_WAKER: AtomicWaker = AtomicWaker::new(); 14pub(crate) static RNG_WAKER: AtomicWaker = AtomicWaker::new();
16 15
17#[interrupt] 16pub enum Error {
18unsafe fn RNG() { 17 SeedError,
19 let bits = crate::pac::RNG.sr().read(); 18 ClockError,
20 if bits.drdy() || bits.seis() || bits.ceis() {
21 crate::pac::RNG.cr().write(|reg| reg.set_ie(false));
22 RNG_WAKER.wake();
23 }
24} 19}
25 20
26pub struct Random<T: Instance> { 21pub struct Random<T: Instance> {
@@ -84,11 +79,6 @@ impl<T: Instance> RngCore for Random<T> {
84 79
85impl<T: Instance> CryptoRng for Random<T> {} 80impl<T: Instance> CryptoRng for Random<T> {}
86 81
87pub enum Error {
88 SeedError,
89 ClockError,
90}
91
92impl<T: Instance> traits::rng::Rng for Random<T> { 82impl<T: Instance> traits::rng::Rng for Random<T> {
93 type Error = Error; 83 type Error = Error;
94 #[rustfmt::skip] 84 #[rustfmt::skip]
@@ -146,7 +136,7 @@ pub(crate) mod sealed {
146pub trait Instance: sealed::Instance {} 136pub trait Instance: sealed::Instance {}
147 137
148macro_rules! impl_rng { 138macro_rules! impl_rng {
149 ($inst:ident) => { 139 ($inst:ident, $irq:ident) => {
150 impl crate::rng::sealed::Instance for peripherals::RNG { 140 impl crate::rng::sealed::Instance for peripherals::RNG {
151 fn regs() -> crate::pac::chip::rng::Rng { 141 fn regs() -> crate::pac::chip::rng::Rng {
152 crate::pac::RNG 142 crate::pac::RNG
@@ -154,5 +144,18 @@ macro_rules! impl_rng {
154 } 144 }
155 145
156 impl crate::rng::Instance for peripherals::RNG {} 146 impl crate::rng::Instance for peripherals::RNG {}
147
148 mod rng_irq {
149 use crate::interrupt;
150
151 #[interrupt]
152 unsafe fn $irq() {
153 let bits = $crate::pac::RNG.sr().read();
154 if bits.drdy() || bits.seis() || bits.ceis() {
155 $crate::pac::RNG.cr().write(|reg| reg.set_ie(false));
156 $crate::rng::RNG_WAKER.wake();
157 }
158 }
159 }
157 }; 160 };
158} 161}
diff --git a/embassy-stm32/src/spi/mod.rs b/embassy-stm32/src/spi/mod.rs
new file mode 100644
index 000000000..3e00fdd4e
--- /dev/null
+++ b/embassy-stm32/src/spi/mod.rs
@@ -0,0 +1,101 @@
1#![macro_use]
2
3#[cfg_attr(feature = "_spi_v1", path = "spi_v1.rs")]
4#[cfg_attr(feature = "_spi_v2", path = "spi_v2.rs")]
5mod spi;
6
7pub use spi::*;
8
9pub enum Error {
10 Framing,
11 Crc,
12 Overrun,
13}
14
15// TODO move upwards in the tree
16pub enum ByteOrder {
17 LsbFirst,
18 MsbFirst,
19}
20
21#[derive(Copy, Clone, PartialOrd, PartialEq)]
22enum WordSize {
23 EightBit,
24 SixteenBit,
25}
26
27#[non_exhaustive]
28pub struct Config {
29 pub mode: Mode,
30 pub byte_order: ByteOrder,
31}
32
33impl Default for Config {
34 fn default() -> Self {
35 Self {
36 mode: MODE_0,
37 byte_order: ByteOrder::MsbFirst,
38 }
39 }
40}
41
42pub(crate) mod sealed {
43 use super::*;
44 use crate::gpio::Pin;
45 use embassy::util::AtomicWaker;
46
47 pub trait Instance {
48 fn regs() -> &'static crate::pac::spi::Spi;
49 }
50
51 pub trait SckPin<T: Instance>: Pin {
52 const AF: u8;
53 fn af(&self) -> u8 {
54 Self::AF
55 }
56 }
57
58 pub trait MosiPin<T: Instance>: Pin {
59 const AF: u8;
60 fn af(&self) -> u8 {
61 Self::AF
62 }
63 }
64
65 pub trait MisoPin<T: Instance>: Pin {
66 const AF: u8;
67 fn af(&self) -> u8 {
68 Self::AF
69 }
70 }
71}
72
73pub trait Instance: sealed::Instance + 'static {}
74
75pub trait SckPin<T: Instance>: sealed::SckPin<T> + 'static {}
76
77pub trait MosiPin<T: Instance>: sealed::MosiPin<T> + 'static {}
78
79pub trait MisoPin<T: Instance>: sealed::MisoPin<T> + 'static {}
80
81macro_rules! impl_spi {
82 ($inst:ident, $clk:ident) => {
83 impl crate::spi::sealed::Instance for peripherals::$inst {
84 fn regs() -> &'static crate::pac::spi::Spi {
85 &crate::pac::$inst
86 }
87 }
88
89 impl crate::spi::Instance for peripherals::$inst {}
90 };
91}
92
93macro_rules! impl_spi_pin {
94 ($inst:ident, $pin_func:ident, $pin:ident, $af:expr) => {
95 impl crate::spi::$pin_func<peripherals::$inst> for peripherals::$pin {}
96
97 impl crate::spi::sealed::$pin_func<peripherals::$inst> for peripherals::$pin {
98 const AF: u8 = $af;
99 }
100 };
101}
diff --git a/embassy-stm32/src/spi/spi_v1.rs b/embassy-stm32/src/spi/spi_v1.rs
new file mode 100644
index 000000000..002fe207e
--- /dev/null
+++ b/embassy-stm32/src/spi/spi_v1.rs
@@ -0,0 +1,291 @@
1#![macro_use]
2
3use crate::gpio::{AnyPin, Pin};
4use crate::pac::gpio::vals::{Afr, Moder};
5use crate::pac::gpio::Gpio;
6use crate::pac::spi;
7use crate::spi::{ByteOrder, Config, Error, Instance, MisoPin, MosiPin, SckPin, WordSize};
8use crate::time::Hertz;
9use core::marker::PhantomData;
10use embassy::util::Unborrow;
11use embassy_extras::unborrow;
12pub use embedded_hal::spi::{Mode, Phase, Polarity, MODE_0, MODE_1, MODE_2, MODE_3};
13
14impl WordSize {
15 fn dff(&self) -> spi::vals::Dff {
16 match self {
17 WordSize::EightBit => spi::vals::Dff::EIGHTBIT,
18 WordSize::SixteenBit => spi::vals::Dff::SIXTEENBIT,
19 }
20 }
21}
22
23pub struct Spi<'d, T: Instance> {
24 //peri: T,
25 sck: AnyPin,
26 mosi: AnyPin,
27 miso: AnyPin,
28 current_word_size: WordSize,
29 phantom: PhantomData<&'d mut T>,
30}
31
32impl<'d, T: Instance> Spi<'d, T> {
33 pub fn new<F>(
34 pclk: Hertz,
35 peri: impl Unborrow<Target = T> + 'd,
36 sck: impl Unborrow<Target = impl SckPin<T>>,
37 mosi: impl Unborrow<Target = impl MosiPin<T>>,
38 miso: impl Unborrow<Target = impl MisoPin<T>>,
39 freq: F,
40 config: Config,
41 ) -> Self
42 where
43 F: Into<Hertz>,
44 {
45 unborrow!(peri);
46 unborrow!(sck, mosi, miso);
47
48 unsafe {
49 Self::configure_pin(sck.block(), sck.pin() as _, sck.af());
50 Self::configure_pin(mosi.block(), mosi.pin() as _, mosi.af());
51 Self::configure_pin(miso.block(), miso.pin() as _, miso.af());
52 }
53
54 let sck = sck.degrade();
55 let mosi = mosi.degrade();
56 let miso = miso.degrade();
57
58 unsafe {
59 T::regs().cr2().write(|w| {
60 w.set_ssoe(false);
61 });
62 }
63
64 let br = Self::compute_baud_rate(pclk, freq.into());
65
66 unsafe {
67 T::regs().cr1().write(|w| {
68 w.set_cpha(
69 match config.mode.phase == Phase::CaptureOnSecondTransition {
70 true => spi::vals::Cpha::SECONDEDGE,
71 false => spi::vals::Cpha::FIRSTEDGE,
72 },
73 );
74 w.set_cpol(match config.mode.polarity == Polarity::IdleHigh {
75 true => spi::vals::Cpol::IDLEHIGH,
76 false => spi::vals::Cpol::IDLELOW,
77 });
78
79 w.set_mstr(spi::vals::Mstr::MASTER);
80 w.set_br(spi::vals::Br(br));
81 w.set_spe(true);
82 w.set_lsbfirst(match config.byte_order {
83 ByteOrder::LsbFirst => spi::vals::Lsbfirst::LSBFIRST,
84 ByteOrder::MsbFirst => spi::vals::Lsbfirst::MSBFIRST,
85 });
86 w.set_ssi(true);
87 w.set_ssm(true);
88 w.set_crcen(false);
89 w.set_bidimode(spi::vals::Bidimode::UNIDIRECTIONAL);
90 w.set_dff(WordSize::EightBit.dff())
91 });
92 }
93
94 Self {
95 //peri,
96 sck,
97 mosi,
98 miso,
99 current_word_size: WordSize::EightBit,
100 phantom: PhantomData,
101 }
102 }
103
104 unsafe fn configure_pin(block: Gpio, pin: usize, af_num: u8) {
105 let (afr, n_af) = if pin < 8 { (0, pin) } else { (1, pin - 8) };
106 block.moder().modify(|w| w.set_moder(pin, Moder::ALTERNATE));
107 block.afr(afr).modify(|w| w.set_afr(n_af, Afr(af_num)));
108 }
109
110 unsafe fn unconfigure_pin(block: Gpio, pin: usize) {
111 block.moder().modify(|w| w.set_moder(pin, Moder::ANALOG));
112 }
113
114 fn compute_baud_rate(clocks: Hertz, freq: Hertz) -> u8 {
115 match clocks.0 / freq.0 {
116 0 => unreachable!(),
117 1..=2 => 0b000,
118 3..=5 => 0b001,
119 6..=11 => 0b010,
120 12..=23 => 0b011,
121 24..=39 => 0b100,
122 40..=95 => 0b101,
123 96..=191 => 0b110,
124 _ => 0b111,
125 }
126 }
127
128 fn set_word_size(&mut self, word_size: WordSize) {
129 if self.current_word_size == word_size {
130 return;
131 }
132 unsafe {
133 T::regs().cr1().modify(|reg| {
134 reg.set_spe(false);
135 reg.set_dff(word_size.dff())
136 });
137 T::regs().cr1().modify(|reg| {
138 reg.set_spe(true);
139 });
140 self.current_word_size = word_size;
141 }
142 }
143}
144
145impl<'d, T: Instance> Drop for Spi<'d, T> {
146 fn drop(&mut self) {
147 unsafe {
148 Self::unconfigure_pin(self.sck.block(), self.sck.pin() as _);
149 Self::unconfigure_pin(self.mosi.block(), self.mosi.pin() as _);
150 Self::unconfigure_pin(self.miso.block(), self.miso.pin() as _);
151 }
152 }
153}
154
155impl<'d, T: Instance> embedded_hal::blocking::spi::Write<u8> for Spi<'d, T> {
156 type Error = Error;
157
158 fn write(&mut self, words: &[u8]) -> Result<(), Self::Error> {
159 self.set_word_size(WordSize::EightBit);
160 let regs = T::regs();
161
162 for word in words.iter() {
163 while unsafe { !regs.sr().read().txe() } {
164 // spin
165 }
166 unsafe {
167 regs.dr().write(|reg| reg.0 = *word as u32);
168 }
169 loop {
170 let sr = unsafe { regs.sr().read() };
171 if sr.fre() {
172 return Err(Error::Framing);
173 }
174 if sr.ovr() {
175 return Err(Error::Overrun);
176 }
177 if sr.crcerr() {
178 return Err(Error::Crc);
179 }
180 if !sr.txe() {
181 // loop waiting for TXE
182 }
183 }
184 }
185
186 Ok(())
187 }
188}
189
190impl<'d, T: Instance> embedded_hal::blocking::spi::Transfer<u8> for Spi<'d, T> {
191 type Error = Error;
192
193 fn transfer<'w>(&mut self, words: &'w mut [u8]) -> Result<&'w [u8], Self::Error> {
194 self.set_word_size(WordSize::EightBit);
195 let regs = T::regs();
196
197 for word in words.iter_mut() {
198 while unsafe { !regs.sr().read().txe() } {
199 // spin
200 }
201 unsafe {
202 regs.dr().write(|reg| reg.0 = *word as u32);
203 }
204 while unsafe { !regs.sr().read().rxne() } {
205 // spin waiting for inbound to shift in.
206 }
207 *word = unsafe { regs.dr().read().0 as u8 };
208 let sr = unsafe { regs.sr().read() };
209 if sr.fre() {
210 return Err(Error::Framing);
211 }
212 if sr.ovr() {
213 return Err(Error::Overrun);
214 }
215 if sr.crcerr() {
216 return Err(Error::Crc);
217 }
218 }
219
220 Ok(words)
221 }
222}
223
224impl<'d, T: Instance> embedded_hal::blocking::spi::Write<u16> for Spi<'d, T> {
225 type Error = Error;
226
227 fn write(&mut self, words: &[u16]) -> Result<(), Self::Error> {
228 self.set_word_size(WordSize::SixteenBit);
229 let regs = T::regs();
230
231 for word in words.iter() {
232 while unsafe { !regs.sr().read().txe() } {
233 // spin
234 }
235 unsafe {
236 regs.dr().write(|reg| reg.0 = *word as u32);
237 }
238 loop {
239 let sr = unsafe { regs.sr().read() };
240 if sr.fre() {
241 return Err(Error::Framing);
242 }
243 if sr.ovr() {
244 return Err(Error::Overrun);
245 }
246 if sr.crcerr() {
247 return Err(Error::Crc);
248 }
249 if !sr.txe() {
250 // loop waiting for TXE
251 }
252 }
253 }
254
255 Ok(())
256 }
257}
258
259impl<'d, T: Instance> embedded_hal::blocking::spi::Transfer<u16> for Spi<'d, T> {
260 type Error = Error;
261
262 fn transfer<'w>(&mut self, words: &'w mut [u16]) -> Result<&'w [u16], Self::Error> {
263 self.set_word_size(WordSize::SixteenBit);
264 let regs = T::regs();
265
266 for word in words.iter_mut() {
267 while unsafe { !regs.sr().read().txe() } {
268 // spin
269 }
270 unsafe {
271 regs.dr().write(|reg| reg.0 = *word as u32);
272 }
273 while unsafe { !regs.sr().read().rxne() } {
274 // spin waiting for inbound to shift in.
275 }
276 *word = unsafe { regs.dr().read().0 as u16 };
277 let sr = unsafe { regs.sr().read() };
278 if sr.fre() {
279 return Err(Error::Framing);
280 }
281 if sr.ovr() {
282 return Err(Error::Overrun);
283 }
284 if sr.crcerr() {
285 return Err(Error::Crc);
286 }
287 }
288
289 Ok(words)
290 }
291}
diff --git a/embassy-stm32/src/spi/spi_v2.rs b/embassy-stm32/src/spi/spi_v2.rs
new file mode 100644
index 000000000..b6ae8b275
--- /dev/null
+++ b/embassy-stm32/src/spi/spi_v2.rs
@@ -0,0 +1,294 @@
1#![macro_use]
2
3use crate::gpio::{AnyPin, Pin};
4use crate::pac::gpio::vals::{Afr, Moder};
5use crate::pac::gpio::Gpio;
6use crate::pac::spi;
7use crate::spi::{ByteOrder, Config, Instance, MisoPin, MosiPin, SckPin, WordSize};
8use crate::time::Hertz;
9use core::marker::PhantomData;
10use embassy::util::Unborrow;
11use embassy_extras::unborrow;
12pub use embedded_hal::spi::{Mode, Phase, Polarity, MODE_0, MODE_1, MODE_2, MODE_3};
13
14impl WordSize {
15 fn ds(&self) -> spi::vals::Ds {
16 match self {
17 WordSize::EightBit => spi::vals::Ds::EIGHTBIT,
18 WordSize::SixteenBit => spi::vals::Ds::SIXTEENBIT,
19 }
20 }
21
22 fn frxth(&self) -> spi::vals::Frxth {
23 match self {
24 WordSize::EightBit => spi::vals::Frxth::QUARTER,
25 WordSize::SixteenBit => spi::vals::Frxth::HALF,
26 }
27 }
28}
29
30pub struct Spi<'d, T: Instance> {
31 //peri: T,
32 sck: AnyPin,
33 mosi: AnyPin,
34 miso: AnyPin,
35 phantom: PhantomData<&'d mut T>,
36}
37
38impl<'d, T: Instance> Spi<'d, T> {
39 pub fn new<F>(
40 pclk: Hertz,
41 peri: impl Unborrow<Target = T> + 'd,
42 sck: impl Unborrow<Target = impl SckPin<T>>,
43 mosi: impl Unborrow<Target = impl MosiPin<T>>,
44 miso: impl Unborrow<Target = impl MisoPin<T>>,
45 freq: F,
46 config: Config,
47 ) -> Self
48 where
49 F: Into<Hertz>,
50 {
51 unborrow!(peri);
52 unborrow!(sck, mosi, miso);
53
54 unsafe {
55 Self::configure_pin(sck.block(), sck.pin() as _, sck.af());
56 Self::configure_pin(mosi.block(), mosi.pin() as _, mosi.af());
57 Self::configure_pin(miso.block(), miso.pin() as _, miso.af());
58 }
59
60 let sck = sck.degrade();
61 let mosi = mosi.degrade();
62 let miso = miso.degrade();
63
64 unsafe {
65 T::regs().cr2().write(|w| {
66 w.set_ssoe(false);
67 });
68 }
69
70 let br = Self::compute_baud_rate(pclk, freq.into());
71
72 unsafe {
73 T::regs().cr1().write(|w| {
74 w.set_cpha(
75 match config.mode.phase == Phase::CaptureOnSecondTransition {
76 true => spi::vals::Cpha::SECONDEDGE,
77 false => spi::vals::Cpha::FIRSTEDGE,
78 },
79 );
80 w.set_cpol(match config.mode.polarity == Polarity::IdleHigh {
81 true => spi::vals::Cpol::IDLEHIGH,
82 false => spi::vals::Cpol::IDLELOW,
83 });
84
85 w.set_mstr(spi::vals::Mstr::MASTER);
86 w.set_br(spi::vals::Br(br));
87 w.set_spe(true);
88 w.set_lsbfirst(match config.byte_order {
89 ByteOrder::LsbFirst => spi::vals::Lsbfirst::LSBFIRST,
90 ByteOrder::MsbFirst => spi::vals::Lsbfirst::MSBFIRST,
91 });
92 w.set_ssi(true);
93 w.set_ssm(true);
94 w.set_crcen(false);
95 w.set_bidimode(spi::vals::Bidimode::UNIDIRECTIONAL);
96 });
97 }
98
99 Self {
100 //peri,
101 sck,
102 mosi,
103 miso,
104 phantom: PhantomData,
105 }
106 }
107
108 unsafe fn configure_pin(block: Gpio, pin: usize, af_num: u8) {
109 let (afr, n_af) = if pin < 8 { (0, pin) } else { (1, pin - 8) };
110 block.moder().modify(|w| w.set_moder(pin, Moder::ALTERNATE));
111 block.afr(afr).modify(|w| w.set_afr(n_af, Afr(af_num)));
112 }
113
114 unsafe fn unconfigure_pin(block: Gpio, pin: usize) {
115 block.moder().modify(|w| w.set_moder(pin, Moder::ANALOG));
116 }
117
118 fn compute_baud_rate(clocks: Hertz, freq: Hertz) -> u8 {
119 match clocks.0 / freq.0 {
120 0 => unreachable!(),
121 1..=2 => 0b000,
122 3..=5 => 0b001,
123 6..=11 => 0b010,
124 12..=23 => 0b011,
125 24..=39 => 0b100,
126 40..=95 => 0b101,
127 96..=191 => 0b110,
128 _ => 0b111,
129 }
130 }
131
132 fn set_word_size(word_size: WordSize) {
133 unsafe {
134 T::regs().cr2().write(|w| {
135 w.set_ds(word_size.ds());
136 w.set_frxth(word_size.frxth());
137 });
138 }
139 }
140}
141
142impl<'d, T: Instance> Drop for Spi<'d, T> {
143 fn drop(&mut self) {
144 unsafe {
145 Self::unconfigure_pin(self.sck.block(), self.sck.pin() as _);
146 Self::unconfigure_pin(self.mosi.block(), self.mosi.pin() as _);
147 Self::unconfigure_pin(self.miso.block(), self.miso.pin() as _);
148 }
149 }
150}
151
152pub enum Error {
153 Framing,
154 Crc,
155 Overrun,
156}
157
158impl<'d, T: Instance> embedded_hal::blocking::spi::Write<u8> for Spi<'d, T> {
159 type Error = Error;
160
161 fn write(&mut self, words: &[u8]) -> Result<(), Self::Error> {
162 Self::set_word_size(WordSize::EightBit);
163 let regs = T::regs();
164
165 for word in words.iter() {
166 while unsafe { !regs.sr().read().txe() } {
167 // spin
168 }
169 unsafe {
170 regs.dr().write(|reg| reg.0 = *word as u32);
171 }
172 loop {
173 let sr = unsafe { regs.sr().read() };
174 if sr.fre() {
175 return Err(Error::Framing);
176 }
177 if sr.ovr() {
178 return Err(Error::Overrun);
179 }
180 if sr.crcerr() {
181 return Err(Error::Crc);
182 }
183 if !sr.txe() {
184 // loop waiting for TXE
185 }
186 }
187 }
188
189 Ok(())
190 }
191}
192
193impl<'d, T: Instance> embedded_hal::blocking::spi::Transfer<u8> for Spi<'d, T> {
194 type Error = Error;
195
196 fn transfer<'w>(&mut self, words: &'w mut [u8]) -> Result<&'w [u8], Self::Error> {
197 Self::set_word_size(WordSize::EightBit);
198 let regs = T::regs();
199
200 for word in words.iter_mut() {
201 while unsafe { !regs.sr().read().txe() } {
202 // spin
203 }
204 unsafe {
205 regs.dr().write(|reg| reg.0 = *word as u32);
206 }
207 while unsafe { !regs.sr().read().rxne() } {
208 // spin waiting for inbound to shift in.
209 }
210 *word = unsafe { regs.dr().read().0 as u8 };
211 let sr = unsafe { regs.sr().read() };
212 if sr.fre() {
213 return Err(Error::Framing);
214 }
215 if sr.ovr() {
216 return Err(Error::Overrun);
217 }
218 if sr.crcerr() {
219 return Err(Error::Crc);
220 }
221 }
222
223 Ok(words)
224 }
225}
226
227impl<'d, T: Instance> embedded_hal::blocking::spi::Write<u16> for Spi<'d, T> {
228 type Error = Error;
229
230 fn write(&mut self, words: &[u16]) -> Result<(), Self::Error> {
231 Self::set_word_size(WordSize::SixteenBit);
232 let regs = T::regs();
233
234 for word in words.iter() {
235 while unsafe { !regs.sr().read().txe() } {
236 // spin
237 }
238 unsafe {
239 regs.dr().write(|reg| reg.0 = *word as u32);
240 }
241 loop {
242 let sr = unsafe { regs.sr().read() };
243 if sr.fre() {
244 return Err(Error::Framing);
245 }
246 if sr.ovr() {
247 return Err(Error::Overrun);
248 }
249 if sr.crcerr() {
250 return Err(Error::Crc);
251 }
252 if !sr.txe() {
253 // loop waiting for TXE
254 }
255 }
256 }
257
258 Ok(())
259 }
260}
261
262impl<'d, T: Instance> embedded_hal::blocking::spi::Transfer<u16> for Spi<'d, T> {
263 type Error = Error;
264
265 fn transfer<'w>(&mut self, words: &'w mut [u16]) -> Result<&'w [u16], Self::Error> {
266 Self::set_word_size(WordSize::SixteenBit);
267 let regs = T::regs();
268
269 for word in words.iter_mut() {
270 while unsafe { !regs.sr().read().txe() } {
271 // spin
272 }
273 unsafe {
274 regs.dr().write(|reg| reg.0 = *word as u32);
275 }
276 while unsafe { !regs.sr().read().rxne() } {
277 // spin waiting for inbound to shift in.
278 }
279 *word = unsafe { regs.dr().read().0 as u16 };
280 let sr = unsafe { regs.sr().read() };
281 if sr.fre() {
282 return Err(Error::Framing);
283 }
284 if sr.ovr() {
285 return Err(Error::Overrun);
286 }
287 if sr.crcerr() {
288 return Err(Error::Crc);
289 }
290 }
291
292 Ok(words)
293 }
294}
diff --git a/embassy-stm32/src/time.rs b/embassy-stm32/src/time.rs
new file mode 100644
index 000000000..c131415c4
--- /dev/null
+++ b/embassy-stm32/src/time.rs
@@ -0,0 +1,126 @@
1//! Time units
2
3/// Bits per second
4#[derive(PartialEq, PartialOrd, Clone, Copy, Debug)]
5pub struct Bps(pub u32);
6
7/// Hertz
8#[derive(PartialEq, PartialOrd, Clone, Copy, Debug)]
9pub struct Hertz(pub u32);
10
11/// KiloHertz
12#[derive(PartialEq, PartialOrd, Clone, Copy, Debug)]
13pub struct KiloHertz(pub u32);
14
15/// MegaHertz
16#[derive(PartialEq, PartialOrd, Clone, Copy, Debug)]
17pub struct MegaHertz(pub u32);
18
19/// MilliSeconds
20#[derive(PartialEq, PartialOrd, Clone, Copy, Debug)]
21pub struct MilliSeconds(pub u32);
22
23/// MicroSeconds
24#[derive(PartialEq, PartialOrd, Clone, Copy, Debug)]
25pub struct MicroSeconds(pub u32);
26
27/// NanoSeconds
28#[derive(PartialEq, PartialOrd, Clone, Copy, Debug)]
29pub struct NanoSeconds(pub u32);
30
31/// Extension trait that adds convenience methods to the `u32` type
32pub trait U32Ext {
33 /// Wrap in `Bps`
34 fn bps(self) -> Bps;
35
36 /// Wrap in `Hertz`
37 fn hz(self) -> Hertz;
38
39 /// Wrap in `KiloHertz`
40 fn khz(self) -> KiloHertz;
41
42 /// Wrap in `MegaHertz`
43 fn mhz(self) -> MegaHertz;
44
45 /// Wrap in "MilliSeconds"
46 fn ms(self) -> MilliSeconds;
47
48 /// Wrap in "MicroSeconds"
49 fn us(self) -> MicroSeconds;
50
51 /// Wrap in "NanoSeconds"
52 fn ns(self) -> NanoSeconds;
53}
54
55impl U32Ext for u32 {
56 fn bps(self) -> Bps {
57 Bps(self)
58 }
59
60 fn hz(self) -> Hertz {
61 Hertz(self)
62 }
63
64 fn khz(self) -> KiloHertz {
65 KiloHertz(self)
66 }
67
68 fn mhz(self) -> MegaHertz {
69 MegaHertz(self)
70 }
71
72 fn ms(self) -> MilliSeconds {
73 MilliSeconds(self)
74 }
75
76 fn us(self) -> MicroSeconds {
77 MicroSeconds(self)
78 }
79
80 fn ns(self) -> NanoSeconds {
81 NanoSeconds(self)
82 }
83}
84
85// Unit conversions
86impl Into<Hertz> for Bps {
87 fn into(self) -> Hertz {
88 Hertz(self.0)
89 }
90}
91
92impl Into<Hertz> for KiloHertz {
93 fn into(self) -> Hertz {
94 Hertz(self.0 * 1_000)
95 }
96}
97
98impl Into<Hertz> for MegaHertz {
99 fn into(self) -> Hertz {
100 Hertz(self.0 * 1_000_000)
101 }
102}
103
104impl Into<KiloHertz> for MegaHertz {
105 fn into(self) -> KiloHertz {
106 KiloHertz(self.0 * 1_000)
107 }
108}
109
110impl Into<NanoSeconds> for MicroSeconds {
111 fn into(self) -> NanoSeconds {
112 NanoSeconds(self.0 * 1_000)
113 }
114}
115
116impl Into<NanoSeconds> for MilliSeconds {
117 fn into(self) -> NanoSeconds {
118 NanoSeconds(self.0 * 1_000_000)
119 }
120}
121
122impl Into<MicroSeconds> for MilliSeconds {
123 fn into(self) -> MicroSeconds {
124 MicroSeconds(self.0 * 1_000)
125 }
126}
diff --git a/embassy-stm32/stm32-data b/embassy-stm32/stm32-data
Subproject 10f86e022b297069c0da9069814e7b811f19d2e Subproject 500cb4b31aa767347f6360c6002c8a89adabd3b