aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--embassy-stm32/gen.py3
-rw-r--r--embassy-stm32/src/pac/regs.rs12380
-rw-r--r--embassy-stm32/src/pac/stm32f401cb.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f401cc.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f401cd.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f401ce.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f401rb.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f401rc.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f401rd.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f401re.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f401vb.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f401vc.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f401vd.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f401ve.rs32
-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.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f410cb.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f410r8.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f410rb.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f410t8.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f410tb.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f411cc.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f411ce.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f411rc.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f411re.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f411vc.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f411ve.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f412ce.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f412cg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f412re.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f412rg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f412ve.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f412vg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f412ze.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f412zg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f413cg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f413ch.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f413mg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f413mh.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f413rg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f413rh.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f413vg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f413vh.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f413zg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f413zh.rs32
-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.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f423mh.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f423rh.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f423vh.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f423zh.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f427ag.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f427ai.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f427ig.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f427ii.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f427vg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f427vi.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f427zg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f427zi.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f429ag.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f429ai.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f429be.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f429bg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f429bi.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f429ie.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f429ig.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f429ii.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f429ne.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f429ng.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f429ni.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f429ve.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f429vg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f429vi.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f429ze.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f429zg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f437ai.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f437ig.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f437ii.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f437vg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f437vi.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f437zg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f437zi.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f439ai.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f439bg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f439bi.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f439ig.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f439ii.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f439ng.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f439ni.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f439vg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f439vi.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f439zg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f439zi.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f446mc.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f446me.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f446rc.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f446re.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f446vc.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f446ve.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f446zc.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f446ze.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f469ae.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f469ag.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f469ai.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f469be.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f469bg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f469bi.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f469ie.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f469ig.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f469ii.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f469ne.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f469ng.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f469ni.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f469ve.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f469vg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f469vi.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f469ze.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f469zg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f469zi.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f479ag.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f479ai.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f479bg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f479bi.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f479ig.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f479ii.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f479ng.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f479ni.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f479vg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f479vi.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f479zg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32f479zi.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l412c8.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l412cb.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l412k8.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l412kb.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l412r8.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l412rb.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l412t8.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l412tb.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l422cb.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l422kb.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l422rb.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l422tb.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l431cb.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l431cc.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l431kb.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l431kc.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l431rb.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l431rc.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l431vc.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l432kb.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l432kc.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l433cb.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l433cc.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l433rb.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l433rc.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l433vc.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l442kc.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l443cc.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l443rc.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l443vc.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l451cc.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l451ce.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l451rc.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l451re.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l451vc.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l451ve.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l452cc.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l452ce.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l452rc.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l452re.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l452vc.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l452ve.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l462ce.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l462re.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l462ve.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l471qe.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l471qg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l471re.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l471rg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l471ve.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l471vg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l471ze.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l471zg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l475rc.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l475re.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l475rg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l475vc.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l475ve.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l475vg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l476je.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l476jg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l476me.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l476mg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l476qe.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l476qg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l476rc.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l476re.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l476rg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l476vc.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l476ve.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l476vg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l476ze.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l476zg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l485jc.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l485je.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l486jg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l486qg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l486rg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l486vg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l486zg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l496ae.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l496ag.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l496qe.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l496qg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l496re.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l496rg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l496ve.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l496vg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l496wg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l496ze.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l496zg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l4a6ag.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l4a6qg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l4a6rg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l4a6vg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l4a6zg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l4p5ae.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l4p5ag.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l4p5ce.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l4p5cg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l4p5qe.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l4p5qg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l4p5re.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l4p5rg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l4p5ve.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l4p5vg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l4p5ze.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l4p5zg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l4q5ag.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l4q5cg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l4q5qg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l4q5rg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l4q5vg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l4q5zg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l4r5ag.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l4r5ai.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l4r5qg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l4r5qi.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l4r5vg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l4r5vi.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l4r5zg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l4r5zi.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l4r7ai.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l4r7vi.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l4r7zi.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l4r9ag.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l4r9ai.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l4r9vg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l4r9vi.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l4r9zg.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l4r9zi.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l4s5ai.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l4s5qi.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l4s5vi.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l4s5zi.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l4s7ai.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l4s7vi.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l4s7zi.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l4s9ai.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l4s9vi.rs32
-rw-r--r--embassy-stm32/src/pac/stm32l4s9zi.rs32
291 files changed, 10815 insertions, 10816 deletions
diff --git a/embassy-stm32/gen.py b/embassy-stm32/gen.py
index 63585870c..ce4bdc1df 100644
--- a/embassy-stm32/gen.py
+++ b/embassy-stm32/gen.py
@@ -130,11 +130,10 @@ for chip in chips.values():
130 130
131 if block_mod == 'dma': 131 if block_mod == 'dma':
132 custom_singletons = True 132 custom_singletons = True
133 inst_num = int(name[3:])
134 for ch_num in range(8): 133 for ch_num in range(8):
135 channel = f'{name}_CH{ch_num}' 134 channel = f'{name}_CH{ch_num}'
136 peripheral_names.append(channel) 135 peripheral_names.append(channel)
137 f.write(f'impl_dma_channel!({channel}, {inst_num}, {ch_num});') 136 f.write(f'impl_dma_channel!({channel}, {name}, {ch_num});')
138 137
139 if not custom_singletons: 138 if not custom_singletons:
140 peripheral_names.append(name) 139 peripheral_names.append(name)
diff --git a/embassy-stm32/src/pac/regs.rs b/embassy-stm32/src/pac/regs.rs
index 572a0a8a9..38ce5981f 100644
--- a/embassy-stm32/src/pac/regs.rs
+++ b/embassy-stm32/src/pac/regs.rs
@@ -1,50 +1,71 @@
1#![no_std] 1#![no_std]
2#![doc = "Peripheral access API (generated using svd2rust v0.17.0 (507115a 2021-04-19))"] 2#![doc = "Peripheral access API (generated using svd2rust v0.17.0 (22741fa 2021-04-20))"]
3pub mod rng_v1 { 3pub mod gpio_v1 {
4 use crate::generic::*; 4 use crate::generic::*;
5 #[doc = "Random number generator"] 5 #[doc = "General purpose I/O"]
6 #[derive(Copy, Clone)] 6 #[derive(Copy, Clone)]
7 pub struct Rng(pub *mut u8); 7 pub struct Gpio(pub *mut u8);
8 unsafe impl Send for Rng {} 8 unsafe impl Send for Gpio {}
9 unsafe impl Sync for Rng {} 9 unsafe impl Sync for Gpio {}
10 impl Rng { 10 impl Gpio {
11 #[doc = "control register"] 11 #[doc = "Port configuration register low (GPIOn_CRL)"]
12 pub fn cr(self) -> Reg<regs::Cr, RW> { 12 pub fn cr(self, n: usize) -> Reg<regs::Cr, RW> {
13 unsafe { Reg::from_ptr(self.0.add(0usize)) } 13 assert!(n < 2usize);
14 } 14 unsafe { Reg::from_ptr(self.0.add(0usize + n * 4usize)) }
15 #[doc = "status register"]
16 pub fn sr(self) -> Reg<regs::Sr, RW> {
17 unsafe { Reg::from_ptr(self.0.add(4usize)) }
18 } 15 }
19 #[doc = "data register"] 16 #[doc = "Port input data register (GPIOn_IDR)"]
20 pub fn dr(self) -> Reg<u32, R> { 17 pub fn idr(self) -> Reg<regs::Idr, R> {
21 unsafe { Reg::from_ptr(self.0.add(8usize)) } 18 unsafe { Reg::from_ptr(self.0.add(8usize)) }
22 } 19 }
20 #[doc = "Port output data register (GPIOn_ODR)"]
21 pub fn odr(self) -> Reg<regs::Odr, RW> {
22 unsafe { Reg::from_ptr(self.0.add(12usize)) }
23 }
24 #[doc = "Port bit set/reset register (GPIOn_BSRR)"]
25 pub fn bsrr(self) -> Reg<regs::Bsrr, W> {
26 unsafe { Reg::from_ptr(self.0.add(16usize)) }
27 }
28 #[doc = "Port bit reset register (GPIOn_BRR)"]
29 pub fn brr(self) -> Reg<regs::Brr, W> {
30 unsafe { Reg::from_ptr(self.0.add(20usize)) }
31 }
32 #[doc = "Port configuration lock register"]
33 pub fn lckr(self) -> Reg<regs::Lckr, RW> {
34 unsafe { Reg::from_ptr(self.0.add(24usize)) }
35 }
23 } 36 }
24 pub mod regs { 37 pub mod regs {
25 use crate::generic::*; 38 use crate::generic::*;
26 #[doc = "control register"] 39 #[doc = "Port configuration register (GPIOn_CRx)"]
27 #[repr(transparent)] 40 #[repr(transparent)]
28 #[derive(Copy, Clone, Eq, PartialEq)] 41 #[derive(Copy, Clone, Eq, PartialEq)]
29 pub struct Cr(pub u32); 42 pub struct Cr(pub u32);
30 impl Cr { 43 impl Cr {
31 #[doc = "Random number generator enable"] 44 #[doc = "Port n mode bits"]
32 pub const fn rngen(&self) -> bool { 45 pub fn mode(&self, n: usize) -> super::vals::Mode {
33 let val = (self.0 >> 2usize) & 0x01; 46 assert!(n < 8usize);
34 val != 0 47 let offs = 0usize + n * 4usize;
48 let val = (self.0 >> offs) & 0x03;
49 super::vals::Mode(val as u8)
35 } 50 }
36 #[doc = "Random number generator enable"] 51 #[doc = "Port n mode bits"]
37 pub fn set_rngen(&mut self, val: bool) { 52 pub fn set_mode(&mut self, n: usize, val: super::vals::Mode) {
38 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); 53 assert!(n < 8usize);
54 let offs = 0usize + n * 4usize;
55 self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs);
39 } 56 }
40 #[doc = "Interrupt enable"] 57 #[doc = "Port n configuration bits"]
41 pub const fn ie(&self) -> bool { 58 pub fn cnf(&self, n: usize) -> super::vals::Cnf {
42 let val = (self.0 >> 3usize) & 0x01; 59 assert!(n < 8usize);
43 val != 0 60 let offs = 2usize + n * 4usize;
61 let val = (self.0 >> offs) & 0x03;
62 super::vals::Cnf(val as u8)
44 } 63 }
45 #[doc = "Interrupt enable"] 64 #[doc = "Port n configuration bits"]
46 pub fn set_ie(&mut self, val: bool) { 65 pub fn set_cnf(&mut self, n: usize, val: super::vals::Cnf) {
47 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); 66 assert!(n < 8usize);
67 let offs = 2usize + n * 4usize;
68 self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs);
48 } 69 }
49 } 70 }
50 impl Default for Cr { 71 impl Default for Cr {
@@ -52,741 +73,627 @@ pub mod rng_v1 {
52 Cr(0) 73 Cr(0)
53 } 74 }
54 } 75 }
55 #[doc = "status register"] 76 #[doc = "Port bit set/reset register (GPIOn_BSRR)"]
56 #[repr(transparent)] 77 #[repr(transparent)]
57 #[derive(Copy, Clone, Eq, PartialEq)] 78 #[derive(Copy, Clone, Eq, PartialEq)]
58 pub struct Sr(pub u32); 79 pub struct Bsrr(pub u32);
59 impl Sr { 80 impl Bsrr {
60 #[doc = "Data ready"] 81 #[doc = "Set bit"]
61 pub const fn drdy(&self) -> bool { 82 pub fn bs(&self, n: usize) -> bool {
62 let val = (self.0 >> 0usize) & 0x01; 83 assert!(n < 16usize);
84 let offs = 0usize + n * 1usize;
85 let val = (self.0 >> offs) & 0x01;
63 val != 0 86 val != 0
64 } 87 }
65 #[doc = "Data ready"] 88 #[doc = "Set bit"]
66 pub fn set_drdy(&mut self, val: bool) { 89 pub fn set_bs(&mut self, n: usize, val: bool) {
67 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 90 assert!(n < 16usize);
91 let offs = 0usize + n * 1usize;
92 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
68 } 93 }
69 #[doc = "Clock error current status"] 94 #[doc = "Reset bit"]
70 pub const fn cecs(&self) -> bool { 95 pub fn br(&self, n: usize) -> bool {
71 let val = (self.0 >> 1usize) & 0x01; 96 assert!(n < 16usize);
97 let offs = 16usize + n * 1usize;
98 let val = (self.0 >> offs) & 0x01;
72 val != 0 99 val != 0
73 } 100 }
74 #[doc = "Clock error current status"] 101 #[doc = "Reset bit"]
75 pub fn set_cecs(&mut self, val: bool) { 102 pub fn set_br(&mut self, n: usize, val: bool) {
76 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); 103 assert!(n < 16usize);
104 let offs = 16usize + n * 1usize;
105 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
77 } 106 }
78 #[doc = "Seed error current status"] 107 }
79 pub const fn secs(&self) -> bool { 108 impl Default for Bsrr {
80 let val = (self.0 >> 2usize) & 0x01; 109 fn default() -> Bsrr {
81 val != 0 110 Bsrr(0)
82 } 111 }
83 #[doc = "Seed error current status"] 112 }
84 pub fn set_secs(&mut self, val: bool) { 113 #[doc = "Port input data register (GPIOn_IDR)"]
85 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); 114 #[repr(transparent)]
115 #[derive(Copy, Clone, Eq, PartialEq)]
116 pub struct Idr(pub u32);
117 impl Idr {
118 #[doc = "Port input data"]
119 pub fn idr(&self, n: usize) -> super::vals::Idr {
120 assert!(n < 16usize);
121 let offs = 0usize + n * 1usize;
122 let val = (self.0 >> offs) & 0x01;
123 super::vals::Idr(val as u8)
86 } 124 }
87 #[doc = "Clock error interrupt status"] 125 #[doc = "Port input data"]
88 pub const fn ceis(&self) -> bool { 126 pub fn set_idr(&mut self, n: usize, val: super::vals::Idr) {
89 let val = (self.0 >> 5usize) & 0x01; 127 assert!(n < 16usize);
90 val != 0 128 let offs = 0usize + n * 1usize;
129 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs);
91 } 130 }
92 #[doc = "Clock error interrupt status"] 131 }
93 pub fn set_ceis(&mut self, val: bool) { 132 impl Default for Idr {
94 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); 133 fn default() -> Idr {
134 Idr(0)
95 } 135 }
96 #[doc = "Seed error interrupt status"] 136 }
97 pub const fn seis(&self) -> bool { 137 #[doc = "Port bit reset register (GPIOn_BRR)"]
98 let val = (self.0 >> 6usize) & 0x01; 138 #[repr(transparent)]
139 #[derive(Copy, Clone, Eq, PartialEq)]
140 pub struct Brr(pub u32);
141 impl Brr {
142 #[doc = "Reset bit"]
143 pub fn br(&self, n: usize) -> bool {
144 assert!(n < 16usize);
145 let offs = 0usize + n * 1usize;
146 let val = (self.0 >> offs) & 0x01;
99 val != 0 147 val != 0
100 } 148 }
101 #[doc = "Seed error interrupt status"] 149 #[doc = "Reset bit"]
102 pub fn set_seis(&mut self, val: bool) { 150 pub fn set_br(&mut self, n: usize, val: bool) {
103 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); 151 assert!(n < 16usize);
152 let offs = 0usize + n * 1usize;
153 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
104 } 154 }
105 } 155 }
106 impl Default for Sr { 156 impl Default for Brr {
107 fn default() -> Sr { 157 fn default() -> Brr {
108 Sr(0) 158 Brr(0)
109 } 159 }
110 } 160 }
111 } 161 #[doc = "Port output data register (GPIOn_ODR)"]
112} 162 #[repr(transparent)]
113pub mod spi_v2 { 163 #[derive(Copy, Clone, Eq, PartialEq)]
114 use crate::generic::*; 164 pub struct Odr(pub u32);
115 #[doc = "Serial peripheral interface"] 165 impl Odr {
116 #[derive(Copy, Clone)] 166 #[doc = "Port output data"]
117 pub struct Spi(pub *mut u8); 167 pub fn odr(&self, n: usize) -> super::vals::Odr {
118 unsafe impl Send for Spi {} 168 assert!(n < 16usize);
119 unsafe impl Sync for Spi {} 169 let offs = 0usize + n * 1usize;
120 impl Spi { 170 let val = (self.0 >> offs) & 0x01;
121 #[doc = "control register 1"] 171 super::vals::Odr(val as u8)
122 pub fn cr1(self) -> Reg<regs::Cr1, RW> { 172 }
123 unsafe { Reg::from_ptr(self.0.add(0usize)) } 173 #[doc = "Port output data"]
124 } 174 pub fn set_odr(&mut self, n: usize, val: super::vals::Odr) {
125 #[doc = "control register 2"] 175 assert!(n < 16usize);
126 pub fn cr2(self) -> Reg<regs::Cr2, RW> { 176 let offs = 0usize + n * 1usize;
127 unsafe { Reg::from_ptr(self.0.add(4usize)) } 177 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs);
128 } 178 }
129 #[doc = "status register"]
130 pub fn sr(self) -> Reg<regs::Sr, RW> {
131 unsafe { Reg::from_ptr(self.0.add(8usize)) }
132 }
133 #[doc = "data register"]
134 pub fn dr(self) -> Reg<regs::Dr, RW> {
135 unsafe { Reg::from_ptr(self.0.add(12usize)) }
136 } 179 }
137 #[doc = "CRC polynomial register"] 180 impl Default for Odr {
138 pub fn crcpr(self) -> Reg<regs::Crcpr, RW> { 181 fn default() -> Odr {
139 unsafe { Reg::from_ptr(self.0.add(16usize)) } 182 Odr(0)
183 }
140 } 184 }
141 #[doc = "RX CRC register"] 185 #[doc = "Port configuration lock register"]
142 pub fn rxcrcr(self) -> Reg<regs::Rxcrcr, R> { 186 #[repr(transparent)]
143 unsafe { Reg::from_ptr(self.0.add(20usize)) } 187 #[derive(Copy, Clone, Eq, PartialEq)]
188 pub struct Lckr(pub u32);
189 impl Lckr {
190 #[doc = "Port A Lock bit"]
191 pub fn lck(&self, n: usize) -> super::vals::Lck {
192 assert!(n < 16usize);
193 let offs = 0usize + n * 1usize;
194 let val = (self.0 >> offs) & 0x01;
195 super::vals::Lck(val as u8)
196 }
197 #[doc = "Port A Lock bit"]
198 pub fn set_lck(&mut self, n: usize, val: super::vals::Lck) {
199 assert!(n < 16usize);
200 let offs = 0usize + n * 1usize;
201 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs);
202 }
203 #[doc = "Lock key"]
204 pub const fn lckk(&self) -> super::vals::Lckk {
205 let val = (self.0 >> 16usize) & 0x01;
206 super::vals::Lckk(val as u8)
207 }
208 #[doc = "Lock key"]
209 pub fn set_lckk(&mut self, val: super::vals::Lckk) {
210 self.0 = (self.0 & !(0x01 << 16usize)) | (((val.0 as u32) & 0x01) << 16usize);
211 }
144 } 212 }
145 #[doc = "TX CRC register"] 213 impl Default for Lckr {
146 pub fn txcrcr(self) -> Reg<regs::Txcrcr, R> { 214 fn default() -> Lckr {
147 unsafe { Reg::from_ptr(self.0.add(24usize)) } 215 Lckr(0)
216 }
148 } 217 }
149 } 218 }
150 pub mod vals { 219 pub mod vals {
151 use crate::generic::*; 220 use crate::generic::*;
152 #[repr(transparent)] 221 #[repr(transparent)]
153 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 222 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
154 pub struct Frer(pub u8); 223 pub struct Bsw(pub u8);
155 impl Frer { 224 impl Bsw {
156 #[doc = "No frame format error"] 225 #[doc = "No action on the corresponding ODx bit"]
157 pub const NOERROR: Self = Self(0); 226 pub const NOACTION: Self = Self(0);
158 #[doc = "A frame format error occurred"] 227 #[doc = "Sets the corresponding ODRx bit"]
159 pub const ERROR: Self = Self(0x01); 228 pub const SET: Self = Self(0x01);
160 }
161 #[repr(transparent)]
162 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
163 pub struct Crcnext(pub u8);
164 impl Crcnext {
165 #[doc = "Next transmit value is from Tx buffer"]
166 pub const TXBUFFER: Self = Self(0);
167 #[doc = "Next transmit value is from Tx CRC register"]
168 pub const CRC: Self = Self(0x01);
169 }
170 #[repr(transparent)]
171 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
172 pub struct Bidimode(pub u8);
173 impl Bidimode {
174 #[doc = "2-line unidirectional data mode selected"]
175 pub const UNIDIRECTIONAL: Self = Self(0);
176 #[doc = "1-line bidirectional data mode selected"]
177 pub const BIDIRECTIONAL: Self = Self(0x01);
178 }
179 #[repr(transparent)]
180 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
181 pub struct Frlvlr(pub u8);
182 impl Frlvlr {
183 #[doc = "Rx FIFO Empty"]
184 pub const EMPTY: Self = Self(0);
185 #[doc = "Rx 1/4 FIFO"]
186 pub const QUARTER: Self = Self(0x01);
187 #[doc = "Rx 1/2 FIFO"]
188 pub const HALF: Self = Self(0x02);
189 #[doc = "Rx FIFO full"]
190 pub const FULL: Self = Self(0x03);
191 }
192 #[repr(transparent)]
193 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
194 pub struct Mstr(pub u8);
195 impl Mstr {
196 #[doc = "Slave configuration"]
197 pub const SLAVE: Self = Self(0);
198 #[doc = "Master configuration"]
199 pub const MASTER: Self = Self(0x01);
200 }
201 #[repr(transparent)]
202 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
203 pub struct Frf(pub u8);
204 impl Frf {
205 #[doc = "SPI Motorola mode"]
206 pub const MOTOROLA: Self = Self(0);
207 #[doc = "SPI TI mode"]
208 pub const TI: Self = Self(0x01);
209 }
210 #[repr(transparent)]
211 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
212 pub struct Rxonly(pub u8);
213 impl Rxonly {
214 #[doc = "Full duplex (Transmit and receive)"]
215 pub const FULLDUPLEX: Self = Self(0);
216 #[doc = "Output disabled (Receive-only mode)"]
217 pub const OUTPUTDISABLED: Self = Self(0x01);
218 } 229 }
219 #[repr(transparent)] 230 #[repr(transparent)]
220 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 231 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
221 pub struct Cpha(pub u8); 232 pub struct Lckk(pub u8);
222 impl Cpha { 233 impl Lckk {
223 #[doc = "The first clock transition is the first data capture edge"] 234 #[doc = "Port configuration lock key not active"]
224 pub const FIRSTEDGE: Self = Self(0); 235 pub const NOTACTIVE: Self = Self(0);
225 #[doc = "The second clock transition is the first data capture edge"] 236 #[doc = "Port configuration lock key active"]
226 pub const SECONDEDGE: Self = Self(0x01); 237 pub const ACTIVE: Self = Self(0x01);
227 } 238 }
228 #[repr(transparent)] 239 #[repr(transparent)]
229 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 240 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
230 pub struct Lsbfirst(pub u8); 241 pub struct Odr(pub u8);
231 impl Lsbfirst { 242 impl Odr {
232 #[doc = "Data is transmitted/received with the MSB first"] 243 #[doc = "Set output to logic low"]
233 pub const MSBFIRST: Self = Self(0); 244 pub const LOW: Self = Self(0);
234 #[doc = "Data is transmitted/received with the LSB first"] 245 #[doc = "Set output to logic high"]
235 pub const LSBFIRST: Self = Self(0x01); 246 pub const HIGH: Self = Self(0x01);
236 } 247 }
237 #[repr(transparent)] 248 #[repr(transparent)]
238 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 249 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
239 pub struct Cpol(pub u8); 250 pub struct Idr(pub u8);
240 impl Cpol { 251 impl Idr {
241 #[doc = "CK to 0 when idle"] 252 #[doc = "Input is logic low"]
242 pub const IDLELOW: Self = Self(0); 253 pub const LOW: Self = Self(0);
243 #[doc = "CK to 1 when idle"] 254 #[doc = "Input is logic high"]
244 pub const IDLEHIGH: Self = Self(0x01); 255 pub const HIGH: Self = Self(0x01);
245 } 256 }
246 #[repr(transparent)] 257 #[repr(transparent)]
247 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 258 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
248 pub struct Br(pub u8); 259 pub struct Mode(pub u8);
249 impl Br { 260 impl Mode {
250 #[doc = "f_PCLK / 2"] 261 #[doc = "Input mode (reset state)"]
251 pub const DIV2: Self = Self(0); 262 pub const INPUT: Self = Self(0);
252 #[doc = "f_PCLK / 4"] 263 #[doc = "Output mode 10 MHz"]
253 pub const DIV4: Self = Self(0x01); 264 pub const OUTPUT: Self = Self(0x01);
254 #[doc = "f_PCLK / 8"] 265 #[doc = "Output mode 2 MHz"]
255 pub const DIV8: Self = Self(0x02); 266 pub const OUTPUT2: Self = Self(0x02);
256 #[doc = "f_PCLK / 16"] 267 #[doc = "Output mode 50 MHz"]
257 pub const DIV16: Self = Self(0x03); 268 pub const OUTPUT50: Self = Self(0x03);
258 #[doc = "f_PCLK / 32"]
259 pub const DIV32: Self = Self(0x04);
260 #[doc = "f_PCLK / 64"]
261 pub const DIV64: Self = Self(0x05);
262 #[doc = "f_PCLK / 128"]
263 pub const DIV128: Self = Self(0x06);
264 #[doc = "f_PCLK / 256"]
265 pub const DIV256: Self = Self(0x07);
266 } 269 }
267 #[repr(transparent)] 270 #[repr(transparent)]
268 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 271 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
269 pub struct LdmaRx(pub u8); 272 pub struct Lck(pub u8);
270 impl LdmaRx { 273 impl Lck {
271 #[doc = "Number of data to transfer for receive is even"] 274 #[doc = "Port configuration not locked"]
272 pub const EVEN: Self = Self(0); 275 pub const UNLOCKED: Self = Self(0);
273 #[doc = "Number of data to transfer for receive is odd"] 276 #[doc = "Port configuration locked"]
274 pub const ODD: Self = Self(0x01); 277 pub const LOCKED: Self = Self(0x01);
275 } 278 }
276 #[repr(transparent)] 279 #[repr(transparent)]
277 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 280 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
278 pub struct Frxth(pub u8); 281 pub struct Cnf(pub u8);
279 impl Frxth { 282 impl Cnf {
280 #[doc = "RXNE event is generated if the FIFO level is greater than or equal to 1/2 (16-bit)"] 283 #[doc = "Analog mode / Push-Pull mode"]
281 pub const HALF: Self = Self(0); 284 pub const PUSHPULL: Self = Self(0);
282 #[doc = "RXNE event is generated if the FIFO level is greater than or equal to 1/4 (8-bit)"] 285 #[doc = "Floating input (reset state) / Open Drain-Mode"]
283 pub const QUARTER: Self = Self(0x01); 286 pub const OPENDRAIN: 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);
284 } 291 }
285 #[repr(transparent)] 292 #[repr(transparent)]
286 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 293 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
287 pub struct LdmaTx(pub u8); 294 pub struct Brw(pub u8);
288 impl LdmaTx { 295 impl Brw {
289 #[doc = "Number of data to transfer for transmit is even"] 296 #[doc = "No action on the corresponding ODx bit"]
290 pub const EVEN: Self = Self(0); 297 pub const NOACTION: Self = Self(0);
291 #[doc = "Number of data to transfer for transmit is odd"] 298 #[doc = "Reset the ODx bit"]
292 pub const ODD: Self = Self(0x01); 299 pub const RESET: Self = Self(0x01);
293 } 300 }
294 #[repr(transparent)] 301 }
295 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 302}
296 pub struct Bidioe(pub u8); 303pub mod syscfg_f4 {
297 impl Bidioe { 304 use crate::generic::*;
298 #[doc = "Output disabled (receive-only mode)"] 305 #[doc = "System configuration controller"]
299 pub const OUTPUTDISABLED: Self = Self(0); 306 #[derive(Copy, Clone)]
300 #[doc = "Output enabled (transmit-only mode)"] 307 pub struct Syscfg(pub *mut u8);
301 pub const OUTPUTENABLED: Self = Self(0x01); 308 unsafe impl Send for Syscfg {}
309 unsafe impl Sync for Syscfg {}
310 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)) }
302 } 314 }
303 #[repr(transparent)] 315 #[doc = "peripheral mode configuration register"]
304 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 316 pub fn pmc(self) -> Reg<regs::Pmc, RW> {
305 pub struct Ftlvlr(pub u8); 317 unsafe { Reg::from_ptr(self.0.add(4usize)) }
306 impl Ftlvlr {
307 #[doc = "Tx FIFO Empty"]
308 pub const EMPTY: Self = Self(0);
309 #[doc = "Tx 1/4 FIFO"]
310 pub const QUARTER: Self = Self(0x01);
311 #[doc = "Tx 1/2 FIFO"]
312 pub const HALF: Self = Self(0x02);
313 #[doc = "Tx FIFO full"]
314 pub const FULL: Self = Self(0x03);
315 } 318 }
316 #[repr(transparent)] 319 #[doc = "external interrupt configuration register"]
317 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 320 pub fn exticr(self, n: usize) -> Reg<regs::Exticr, RW> {
318 pub struct Crcl(pub u8); 321 assert!(n < 4usize);
319 impl Crcl { 322 unsafe { Reg::from_ptr(self.0.add(8usize + n * 4usize)) }
320 #[doc = "8-bit CRC length"]
321 pub const EIGHTBIT: Self = Self(0);
322 #[doc = "16-bit CRC length"]
323 pub const SIXTEENBIT: Self = Self(0x01);
324 } 323 }
325 #[repr(transparent)] 324 #[doc = "Compensation cell control register"]
326 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 325 pub fn cmpcr(self) -> Reg<regs::Cmpcr, R> {
327 pub struct Ds(pub u8); 326 unsafe { Reg::from_ptr(self.0.add(32usize)) }
328 impl Ds {
329 #[doc = "4-bit"]
330 pub const FOURBIT: Self = Self(0x03);
331 #[doc = "5-bit"]
332 pub const FIVEBIT: Self = Self(0x04);
333 #[doc = "6-bit"]
334 pub const SIXBIT: Self = Self(0x05);
335 #[doc = "7-bit"]
336 pub const SEVENBIT: Self = Self(0x06);
337 #[doc = "8-bit"]
338 pub const EIGHTBIT: Self = Self(0x07);
339 #[doc = "9-bit"]
340 pub const NINEBIT: Self = Self(0x08);
341 #[doc = "10-bit"]
342 pub const TENBIT: Self = Self(0x09);
343 #[doc = "11-bit"]
344 pub const ELEVENBIT: Self = Self(0x0a);
345 #[doc = "12-bit"]
346 pub const TWELVEBIT: Self = Self(0x0b);
347 #[doc = "13-bit"]
348 pub const THIRTEENBIT: Self = Self(0x0c);
349 #[doc = "14-bit"]
350 pub const FOURTEENBIT: Self = Self(0x0d);
351 #[doc = "15-bit"]
352 pub const FIFTEENBIT: Self = Self(0x0e);
353 #[doc = "16-bit"]
354 pub const SIXTEENBIT: Self = Self(0x0f);
355 } 327 }
356 } 328 }
357 pub mod regs { 329 pub mod regs {
358 use crate::generic::*; 330 use crate::generic::*;
359 #[doc = "data register"] 331 #[doc = "memory remap register"]
360 #[repr(transparent)]
361 #[derive(Copy, Clone, Eq, PartialEq)]
362 pub struct Dr(pub u32);
363 impl Dr {
364 #[doc = "Data register"]
365 pub const fn dr(&self) -> u16 {
366 let val = (self.0 >> 0usize) & 0xffff;
367 val as u16
368 }
369 #[doc = "Data register"]
370 pub fn set_dr(&mut self, val: u16) {
371 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
372 }
373 }
374 impl Default for Dr {
375 fn default() -> Dr {
376 Dr(0)
377 }
378 }
379 #[doc = "control register 2"]
380 #[repr(transparent)] 332 #[repr(transparent)]
381 #[derive(Copy, Clone, Eq, PartialEq)] 333 #[derive(Copy, Clone, Eq, PartialEq)]
382 pub struct Cr2(pub u32); 334 pub struct Memrm(pub u32);
383 impl Cr2 { 335 impl Memrm {
384 #[doc = "Rx buffer DMA enable"] 336 #[doc = "Memory mapping selection"]
385 pub const fn rxdmaen(&self) -> bool { 337 pub const fn mem_mode(&self) -> u8 {
386 let val = (self.0 >> 0usize) & 0x01; 338 let val = (self.0 >> 0usize) & 0x07;
387 val != 0 339 val as u8
388 }
389 #[doc = "Rx buffer DMA enable"]
390 pub fn set_rxdmaen(&mut self, val: bool) {
391 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
392 }
393 #[doc = "Tx buffer DMA enable"]
394 pub const fn txdmaen(&self) -> bool {
395 let val = (self.0 >> 1usize) & 0x01;
396 val != 0
397 }
398 #[doc = "Tx buffer DMA enable"]
399 pub fn set_txdmaen(&mut self, val: bool) {
400 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
401 }
402 #[doc = "SS output enable"]
403 pub const fn ssoe(&self) -> bool {
404 let val = (self.0 >> 2usize) & 0x01;
405 val != 0
406 }
407 #[doc = "SS output enable"]
408 pub fn set_ssoe(&mut self, val: bool) {
409 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
410 }
411 #[doc = "NSS pulse management"]
412 pub const fn nssp(&self) -> bool {
413 let val = (self.0 >> 3usize) & 0x01;
414 val != 0
415 }
416 #[doc = "NSS pulse management"]
417 pub fn set_nssp(&mut self, val: bool) {
418 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
419 }
420 #[doc = "Frame format"]
421 pub const fn frf(&self) -> super::vals::Frf {
422 let val = (self.0 >> 4usize) & 0x01;
423 super::vals::Frf(val as u8)
424 }
425 #[doc = "Frame format"]
426 pub fn set_frf(&mut self, val: super::vals::Frf) {
427 self.0 = (self.0 & !(0x01 << 4usize)) | (((val.0 as u32) & 0x01) << 4usize);
428 }
429 #[doc = "Error interrupt enable"]
430 pub const fn errie(&self) -> bool {
431 let val = (self.0 >> 5usize) & 0x01;
432 val != 0
433 }
434 #[doc = "Error interrupt enable"]
435 pub fn set_errie(&mut self, val: bool) {
436 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
437 }
438 #[doc = "RX buffer not empty interrupt enable"]
439 pub const fn rxneie(&self) -> bool {
440 let val = (self.0 >> 6usize) & 0x01;
441 val != 0
442 } 340 }
443 #[doc = "RX buffer not empty interrupt enable"] 341 #[doc = "Memory mapping selection"]
444 pub fn set_rxneie(&mut self, val: bool) { 342 pub fn set_mem_mode(&mut self, val: u8) {
445 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); 343 self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize);
446 } 344 }
447 #[doc = "Tx buffer empty interrupt enable"] 345 #[doc = "Flash bank mode selection"]
448 pub const fn txeie(&self) -> bool { 346 pub const fn fb_mode(&self) -> bool {
449 let val = (self.0 >> 7usize) & 0x01; 347 let val = (self.0 >> 8usize) & 0x01;
450 val != 0 348 val != 0
451 } 349 }
452 #[doc = "Tx buffer empty interrupt enable"] 350 #[doc = "Flash bank mode selection"]
453 pub fn set_txeie(&mut self, val: bool) { 351 pub fn set_fb_mode(&mut self, val: bool) {
454 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); 352 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
455 }
456 #[doc = "Data size"]
457 pub const fn ds(&self) -> super::vals::Ds {
458 let val = (self.0 >> 8usize) & 0x0f;
459 super::vals::Ds(val as u8)
460 }
461 #[doc = "Data size"]
462 pub fn set_ds(&mut self, val: super::vals::Ds) {
463 self.0 = (self.0 & !(0x0f << 8usize)) | (((val.0 as u32) & 0x0f) << 8usize);
464 }
465 #[doc = "FIFO reception threshold"]
466 pub const fn frxth(&self) -> super::vals::Frxth {
467 let val = (self.0 >> 12usize) & 0x01;
468 super::vals::Frxth(val as u8)
469 }
470 #[doc = "FIFO reception threshold"]
471 pub fn set_frxth(&mut self, val: super::vals::Frxth) {
472 self.0 = (self.0 & !(0x01 << 12usize)) | (((val.0 as u32) & 0x01) << 12usize);
473 }
474 #[doc = "Last DMA transfer for reception"]
475 pub const fn ldma_rx(&self) -> super::vals::LdmaRx {
476 let val = (self.0 >> 13usize) & 0x01;
477 super::vals::LdmaRx(val as u8)
478 }
479 #[doc = "Last DMA transfer for reception"]
480 pub fn set_ldma_rx(&mut self, val: super::vals::LdmaRx) {
481 self.0 = (self.0 & !(0x01 << 13usize)) | (((val.0 as u32) & 0x01) << 13usize);
482 } 353 }
483 #[doc = "Last DMA transfer for transmission"] 354 #[doc = "FMC memory mapping swap"]
484 pub const fn ldma_tx(&self) -> super::vals::LdmaTx { 355 pub const fn swp_fmc(&self) -> u8 {
485 let val = (self.0 >> 14usize) & 0x01; 356 let val = (self.0 >> 10usize) & 0x03;
486 super::vals::LdmaTx(val as u8) 357 val as u8
487 } 358 }
488 #[doc = "Last DMA transfer for transmission"] 359 #[doc = "FMC memory mapping swap"]
489 pub fn set_ldma_tx(&mut self, val: super::vals::LdmaTx) { 360 pub fn set_swp_fmc(&mut self, val: u8) {
490 self.0 = (self.0 & !(0x01 << 14usize)) | (((val.0 as u32) & 0x01) << 14usize); 361 self.0 = (self.0 & !(0x03 << 10usize)) | (((val as u32) & 0x03) << 10usize);
491 } 362 }
492 } 363 }
493 impl Default for Cr2 { 364 impl Default for Memrm {
494 fn default() -> Cr2 { 365 fn default() -> Memrm {
495 Cr2(0) 366 Memrm(0)
496 } 367 }
497 } 368 }
498 #[doc = "status register"] 369 #[doc = "Compensation cell control register"]
499 #[repr(transparent)] 370 #[repr(transparent)]
500 #[derive(Copy, Clone, Eq, PartialEq)] 371 #[derive(Copy, Clone, Eq, PartialEq)]
501 pub struct Sr(pub u32); 372 pub struct Cmpcr(pub u32);
502 impl Sr { 373 impl Cmpcr {
503 #[doc = "Receive buffer not empty"] 374 #[doc = "Compensation cell power-down"]
504 pub const fn rxne(&self) -> bool { 375 pub const fn cmp_pd(&self) -> bool {
505 let val = (self.0 >> 0usize) & 0x01; 376 let val = (self.0 >> 0usize) & 0x01;
506 val != 0 377 val != 0
507 } 378 }
508 #[doc = "Receive buffer not empty"] 379 #[doc = "Compensation cell power-down"]
509 pub fn set_rxne(&mut self, val: bool) { 380 pub fn set_cmp_pd(&mut self, val: bool) {
510 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 381 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
511 } 382 }
512 #[doc = "Transmit buffer empty"] 383 #[doc = "READY"]
513 pub const fn txe(&self) -> bool { 384 pub const fn ready(&self) -> bool {
514 let val = (self.0 >> 1usize) & 0x01; 385 let val = (self.0 >> 8usize) & 0x01;
515 val != 0 386 val != 0
516 } 387 }
517 #[doc = "Transmit buffer empty"] 388 #[doc = "READY"]
518 pub fn set_txe(&mut self, val: bool) { 389 pub fn set_ready(&mut self, val: bool) {
519 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); 390 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
520 }
521 #[doc = "CRC error flag"]
522 pub const fn crcerr(&self) -> bool {
523 let val = (self.0 >> 4usize) & 0x01;
524 val != 0
525 } 391 }
526 #[doc = "CRC error flag"] 392 }
527 pub fn set_crcerr(&mut self, val: bool) { 393 impl Default for Cmpcr {
528 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); 394 fn default() -> Cmpcr {
395 Cmpcr(0)
529 } 396 }
530 #[doc = "Mode fault"] 397 }
531 pub const fn modf(&self) -> bool { 398 #[doc = "peripheral mode configuration register"]
532 let val = (self.0 >> 5usize) & 0x01; 399 #[repr(transparent)]
400 #[derive(Copy, Clone, Eq, PartialEq)]
401 pub struct Pmc(pub u32);
402 impl Pmc {
403 #[doc = "ADC1DC2"]
404 pub const fn adc1dc2(&self) -> bool {
405 let val = (self.0 >> 16usize) & 0x01;
533 val != 0 406 val != 0
534 } 407 }
535 #[doc = "Mode fault"] 408 #[doc = "ADC1DC2"]
536 pub fn set_modf(&mut self, val: bool) { 409 pub fn set_adc1dc2(&mut self, val: bool) {
537 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); 410 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
538 } 411 }
539 #[doc = "Overrun flag"] 412 #[doc = "ADC2DC2"]
540 pub const fn ovr(&self) -> bool { 413 pub const fn adc2dc2(&self) -> bool {
541 let val = (self.0 >> 6usize) & 0x01; 414 let val = (self.0 >> 17usize) & 0x01;
542 val != 0 415 val != 0
543 } 416 }
544 #[doc = "Overrun flag"] 417 #[doc = "ADC2DC2"]
545 pub fn set_ovr(&mut self, val: bool) { 418 pub fn set_adc2dc2(&mut self, val: bool) {
546 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); 419 self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize);
547 } 420 }
548 #[doc = "Busy flag"] 421 #[doc = "ADC3DC2"]
549 pub const fn bsy(&self) -> bool { 422 pub const fn adc3dc2(&self) -> bool {
550 let val = (self.0 >> 7usize) & 0x01; 423 let val = (self.0 >> 18usize) & 0x01;
551 val != 0 424 val != 0
552 } 425 }
553 #[doc = "Busy flag"] 426 #[doc = "ADC3DC2"]
554 pub fn set_bsy(&mut self, val: bool) { 427 pub fn set_adc3dc2(&mut self, val: bool) {
555 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); 428 self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize);
556 } 429 }
557 #[doc = "Frame format error"] 430 #[doc = "Ethernet PHY interface selection"]
558 pub const fn fre(&self) -> bool { 431 pub const fn mii_rmii_sel(&self) -> bool {
559 let val = (self.0 >> 8usize) & 0x01; 432 let val = (self.0 >> 23usize) & 0x01;
560 val != 0 433 val != 0
561 } 434 }
562 #[doc = "Frame format error"] 435 #[doc = "Ethernet PHY interface selection"]
563 pub fn set_fre(&mut self, val: bool) { 436 pub fn set_mii_rmii_sel(&mut self, val: bool) {
564 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); 437 self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize);
565 }
566 #[doc = "FIFO reception level"]
567 pub const fn frlvl(&self) -> u8 {
568 let val = (self.0 >> 9usize) & 0x03;
569 val as u8
570 }
571 #[doc = "FIFO reception level"]
572 pub fn set_frlvl(&mut self, val: u8) {
573 self.0 = (self.0 & !(0x03 << 9usize)) | (((val as u32) & 0x03) << 9usize);
574 }
575 #[doc = "FIFO Transmission Level"]
576 pub const fn ftlvl(&self) -> u8 {
577 let val = (self.0 >> 11usize) & 0x03;
578 val as u8
579 }
580 #[doc = "FIFO Transmission Level"]
581 pub fn set_ftlvl(&mut self, val: u8) {
582 self.0 = (self.0 & !(0x03 << 11usize)) | (((val as u32) & 0x03) << 11usize);
583 } 438 }
584 } 439 }
585 impl Default for Sr { 440 impl Default for Pmc {
586 fn default() -> Sr { 441 fn default() -> Pmc {
587 Sr(0) 442 Pmc(0)
588 } 443 }
589 } 444 }
590 #[doc = "CRC polynomial register"] 445 #[doc = "external interrupt configuration register"]
591 #[repr(transparent)] 446 #[repr(transparent)]
592 #[derive(Copy, Clone, Eq, PartialEq)] 447 #[derive(Copy, Clone, Eq, PartialEq)]
593 pub struct Crcpr(pub u32); 448 pub struct Exticr(pub u32);
594 impl Crcpr { 449 impl Exticr {
595 #[doc = "CRC polynomial register"] 450 #[doc = "EXTI x configuration"]
596 pub const fn crcpoly(&self) -> u16 { 451 pub fn exti(&self, n: usize) -> u8 {
597 let val = (self.0 >> 0usize) & 0xffff; 452 assert!(n < 4usize);
598 val as u16 453 let offs = 0usize + n * 4usize;
454 let val = (self.0 >> offs) & 0x0f;
455 val as u8
599 } 456 }
600 #[doc = "CRC polynomial register"] 457 #[doc = "EXTI x configuration"]
601 pub fn set_crcpoly(&mut self, val: u16) { 458 pub fn set_exti(&mut self, n: usize, val: u8) {
602 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); 459 assert!(n < 4usize);
460 let offs = 0usize + n * 4usize;
461 self.0 = (self.0 & !(0x0f << offs)) | (((val as u32) & 0x0f) << offs);
603 } 462 }
604 } 463 }
605 impl Default for Crcpr { 464 impl Default for Exticr {
606 fn default() -> Crcpr { 465 fn default() -> Exticr {
607 Crcpr(0) 466 Exticr(0)
608 } 467 }
609 } 468 }
610 #[doc = "RX CRC register"] 469 }
470}
471pub mod exti_v1 {
472 use crate::generic::*;
473 #[doc = "External interrupt/event controller"]
474 #[derive(Copy, Clone)]
475 pub struct Exti(pub *mut u8);
476 unsafe impl Send for Exti {}
477 unsafe impl Sync for Exti {}
478 impl Exti {
479 #[doc = "Interrupt mask register (EXTI_IMR)"]
480 pub fn imr(self) -> Reg<regs::Imr, RW> {
481 unsafe { Reg::from_ptr(self.0.add(0usize)) }
482 }
483 #[doc = "Event mask register (EXTI_EMR)"]
484 pub fn emr(self) -> Reg<regs::Emr, RW> {
485 unsafe { Reg::from_ptr(self.0.add(4usize)) }
486 }
487 #[doc = "Rising Trigger selection register (EXTI_RTSR)"]
488 pub fn rtsr(self) -> Reg<regs::Rtsr, RW> {
489 unsafe { Reg::from_ptr(self.0.add(8usize)) }
490 }
491 #[doc = "Falling Trigger selection register (EXTI_FTSR)"]
492 pub fn ftsr(self) -> Reg<regs::Ftsr, RW> {
493 unsafe { Reg::from_ptr(self.0.add(12usize)) }
494 }
495 #[doc = "Software interrupt event register (EXTI_SWIER)"]
496 pub fn swier(self) -> Reg<regs::Swier, RW> {
497 unsafe { Reg::from_ptr(self.0.add(16usize)) }
498 }
499 #[doc = "Pending register (EXTI_PR)"]
500 pub fn pr(self) -> Reg<regs::Pr, RW> {
501 unsafe { Reg::from_ptr(self.0.add(20usize)) }
502 }
503 }
504 pub mod regs {
505 use crate::generic::*;
506 #[doc = "Falling Trigger selection register (EXTI_FTSR)"]
611 #[repr(transparent)] 507 #[repr(transparent)]
612 #[derive(Copy, Clone, Eq, PartialEq)] 508 #[derive(Copy, Clone, Eq, PartialEq)]
613 pub struct Rxcrcr(pub u32); 509 pub struct Ftsr(pub u32);
614 impl Rxcrcr { 510 impl Ftsr {
615 #[doc = "Rx CRC register"] 511 #[doc = "Falling trigger event configuration of line 0"]
616 pub const fn rx_crc(&self) -> u16 { 512 pub fn tr(&self, n: usize) -> super::vals::Tr {
617 let val = (self.0 >> 0usize) & 0xffff; 513 assert!(n < 23usize);
618 val as u16 514 let offs = 0usize + n * 1usize;
515 let val = (self.0 >> offs) & 0x01;
516 super::vals::Tr(val as u8)
619 } 517 }
620 #[doc = "Rx CRC register"] 518 #[doc = "Falling trigger event configuration of line 0"]
621 pub fn set_rx_crc(&mut self, val: u16) { 519 pub fn set_tr(&mut self, n: usize, val: super::vals::Tr) {
622 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); 520 assert!(n < 23usize);
521 let offs = 0usize + n * 1usize;
522 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs);
623 } 523 }
624 } 524 }
625 impl Default for Rxcrcr { 525 impl Default for Ftsr {
626 fn default() -> Rxcrcr { 526 fn default() -> Ftsr {
627 Rxcrcr(0) 527 Ftsr(0)
628 } 528 }
629 } 529 }
630 #[doc = "TX CRC register"] 530 #[doc = "Event mask register (EXTI_EMR)"]
631 #[repr(transparent)] 531 #[repr(transparent)]
632 #[derive(Copy, Clone, Eq, PartialEq)] 532 #[derive(Copy, Clone, Eq, PartialEq)]
633 pub struct Txcrcr(pub u32); 533 pub struct Emr(pub u32);
634 impl Txcrcr { 534 impl Emr {
635 #[doc = "Tx CRC register"] 535 #[doc = "Event Mask on line 0"]
636 pub const fn tx_crc(&self) -> u16 { 536 pub fn mr(&self, n: usize) -> super::vals::Mr {
637 let val = (self.0 >> 0usize) & 0xffff; 537 assert!(n < 23usize);
638 val as u16 538 let offs = 0usize + n * 1usize;
539 let val = (self.0 >> offs) & 0x01;
540 super::vals::Mr(val as u8)
639 } 541 }
640 #[doc = "Tx CRC register"] 542 #[doc = "Event Mask on line 0"]
641 pub fn set_tx_crc(&mut self, val: u16) { 543 pub fn set_mr(&mut self, n: usize, val: super::vals::Mr) {
642 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); 544 assert!(n < 23usize);
545 let offs = 0usize + n * 1usize;
546 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs);
643 } 547 }
644 } 548 }
645 impl Default for Txcrcr { 549 impl Default for Emr {
646 fn default() -> Txcrcr { 550 fn default() -> Emr {
647 Txcrcr(0) 551 Emr(0)
648 } 552 }
649 } 553 }
650 #[doc = "control register 1"] 554 #[doc = "Software interrupt event register (EXTI_SWIER)"]
651 #[repr(transparent)] 555 #[repr(transparent)]
652 #[derive(Copy, Clone, Eq, PartialEq)] 556 #[derive(Copy, Clone, Eq, PartialEq)]
653 pub struct Cr1(pub u32); 557 pub struct Swier(pub u32);
654 impl Cr1 { 558 impl Swier {
655 #[doc = "Clock phase"] 559 #[doc = "Software Interrupt on line 0"]
656 pub const fn cpha(&self) -> super::vals::Cpha { 560 pub fn swier(&self, n: usize) -> bool {
657 let val = (self.0 >> 0usize) & 0x01; 561 assert!(n < 23usize);
658 super::vals::Cpha(val as u8) 562 let offs = 0usize + n * 1usize;
659 } 563 let val = (self.0 >> offs) & 0x01;
660 #[doc = "Clock phase"]
661 pub fn set_cpha(&mut self, val: super::vals::Cpha) {
662 self.0 = (self.0 & !(0x01 << 0usize)) | (((val.0 as u32) & 0x01) << 0usize);
663 }
664 #[doc = "Clock polarity"]
665 pub const fn cpol(&self) -> super::vals::Cpol {
666 let val = (self.0 >> 1usize) & 0x01;
667 super::vals::Cpol(val as u8)
668 }
669 #[doc = "Clock polarity"]
670 pub fn set_cpol(&mut self, val: super::vals::Cpol) {
671 self.0 = (self.0 & !(0x01 << 1usize)) | (((val.0 as u32) & 0x01) << 1usize);
672 }
673 #[doc = "Master selection"]
674 pub const fn mstr(&self) -> super::vals::Mstr {
675 let val = (self.0 >> 2usize) & 0x01;
676 super::vals::Mstr(val as u8)
677 }
678 #[doc = "Master selection"]
679 pub fn set_mstr(&mut self, val: super::vals::Mstr) {
680 self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize);
681 }
682 #[doc = "Baud rate control"]
683 pub const fn br(&self) -> super::vals::Br {
684 let val = (self.0 >> 3usize) & 0x07;
685 super::vals::Br(val as u8)
686 }
687 #[doc = "Baud rate control"]
688 pub fn set_br(&mut self, val: super::vals::Br) {
689 self.0 = (self.0 & !(0x07 << 3usize)) | (((val.0 as u32) & 0x07) << 3usize);
690 }
691 #[doc = "SPI enable"]
692 pub const fn spe(&self) -> bool {
693 let val = (self.0 >> 6usize) & 0x01;
694 val != 0
695 }
696 #[doc = "SPI enable"]
697 pub fn set_spe(&mut self, val: bool) {
698 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
699 }
700 #[doc = "Frame format"]
701 pub const fn lsbfirst(&self) -> super::vals::Lsbfirst {
702 let val = (self.0 >> 7usize) & 0x01;
703 super::vals::Lsbfirst(val as u8)
704 }
705 #[doc = "Frame format"]
706 pub fn set_lsbfirst(&mut self, val: super::vals::Lsbfirst) {
707 self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize);
708 }
709 #[doc = "Internal slave select"]
710 pub const fn ssi(&self) -> bool {
711 let val = (self.0 >> 8usize) & 0x01;
712 val != 0 564 val != 0
713 } 565 }
714 #[doc = "Internal slave select"] 566 #[doc = "Software Interrupt on line 0"]
715 pub fn set_ssi(&mut self, val: bool) { 567 pub fn set_swier(&mut self, n: usize, val: bool) {
716 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); 568 assert!(n < 23usize);
717 } 569 let offs = 0usize + n * 1usize;
718 #[doc = "Software slave management"] 570 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
719 pub const fn ssm(&self) -> bool {
720 let val = (self.0 >> 9usize) & 0x01;
721 val != 0
722 } 571 }
723 #[doc = "Software slave management"] 572 }
724 pub fn set_ssm(&mut self, val: bool) { 573 impl Default for Swier {
725 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); 574 fn default() -> Swier {
575 Swier(0)
726 } 576 }
727 #[doc = "Receive only"] 577 }
728 pub const fn rxonly(&self) -> super::vals::Rxonly { 578 #[doc = "Rising Trigger selection register (EXTI_RTSR)"]
729 let val = (self.0 >> 10usize) & 0x01; 579 #[repr(transparent)]
730 super::vals::Rxonly(val as u8) 580 #[derive(Copy, Clone, Eq, PartialEq)]
581 pub struct Rtsr(pub u32);
582 impl Rtsr {
583 #[doc = "Rising trigger event configuration of line 0"]
584 pub fn tr(&self, n: usize) -> super::vals::Tr {
585 assert!(n < 23usize);
586 let offs = 0usize + n * 1usize;
587 let val = (self.0 >> offs) & 0x01;
588 super::vals::Tr(val as u8)
731 } 589 }
732 #[doc = "Receive only"] 590 #[doc = "Rising trigger event configuration of line 0"]
733 pub fn set_rxonly(&mut self, val: super::vals::Rxonly) { 591 pub fn set_tr(&mut self, n: usize, val: super::vals::Tr) {
734 self.0 = (self.0 & !(0x01 << 10usize)) | (((val.0 as u32) & 0x01) << 10usize); 592 assert!(n < 23usize);
593 let offs = 0usize + n * 1usize;
594 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs);
735 } 595 }
736 #[doc = "CRC length"] 596 }
737 pub const fn crcl(&self) -> super::vals::Crcl { 597 impl Default for Rtsr {
738 let val = (self.0 >> 11usize) & 0x01; 598 fn default() -> Rtsr {
739 super::vals::Crcl(val as u8) 599 Rtsr(0)
740 } 600 }
741 #[doc = "CRC length"] 601 }
742 pub fn set_crcl(&mut self, val: super::vals::Crcl) { 602 #[doc = "Interrupt mask register (EXTI_IMR)"]
743 self.0 = (self.0 & !(0x01 << 11usize)) | (((val.0 as u32) & 0x01) << 11usize); 603 #[repr(transparent)]
604 #[derive(Copy, Clone, Eq, PartialEq)]
605 pub struct Imr(pub u32);
606 impl Imr {
607 #[doc = "Interrupt Mask on line 0"]
608 pub fn mr(&self, n: usize) -> super::vals::Mr {
609 assert!(n < 23usize);
610 let offs = 0usize + n * 1usize;
611 let val = (self.0 >> offs) & 0x01;
612 super::vals::Mr(val as u8)
744 } 613 }
745 #[doc = "CRC transfer next"] 614 #[doc = "Interrupt Mask on line 0"]
746 pub const fn crcnext(&self) -> super::vals::Crcnext { 615 pub fn set_mr(&mut self, n: usize, val: super::vals::Mr) {
747 let val = (self.0 >> 12usize) & 0x01; 616 assert!(n < 23usize);
748 super::vals::Crcnext(val as u8) 617 let offs = 0usize + n * 1usize;
618 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs);
749 } 619 }
750 #[doc = "CRC transfer next"] 620 }
751 pub fn set_crcnext(&mut self, val: super::vals::Crcnext) { 621 impl Default for Imr {
752 self.0 = (self.0 & !(0x01 << 12usize)) | (((val.0 as u32) & 0x01) << 12usize); 622 fn default() -> Imr {
623 Imr(0)
753 } 624 }
754 #[doc = "Hardware CRC calculation enable"] 625 }
755 pub const fn crcen(&self) -> bool { 626 #[doc = "Pending register (EXTI_PR)"]
756 let val = (self.0 >> 13usize) & 0x01; 627 #[repr(transparent)]
628 #[derive(Copy, Clone, Eq, PartialEq)]
629 pub struct Pr(pub u32);
630 impl Pr {
631 #[doc = "Pending bit 0"]
632 pub fn pr(&self, n: usize) -> bool {
633 assert!(n < 23usize);
634 let offs = 0usize + n * 1usize;
635 let val = (self.0 >> offs) & 0x01;
757 val != 0 636 val != 0
758 } 637 }
759 #[doc = "Hardware CRC calculation enable"] 638 #[doc = "Pending bit 0"]
760 pub fn set_crcen(&mut self, val: bool) { 639 pub fn set_pr(&mut self, n: usize, val: bool) {
761 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); 640 assert!(n < 23usize);
762 } 641 let offs = 0usize + n * 1usize;
763 #[doc = "Output enable in bidirectional mode"] 642 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
764 pub const fn bidioe(&self) -> super::vals::Bidioe {
765 let val = (self.0 >> 14usize) & 0x01;
766 super::vals::Bidioe(val as u8)
767 }
768 #[doc = "Output enable in bidirectional mode"]
769 pub fn set_bidioe(&mut self, val: super::vals::Bidioe) {
770 self.0 = (self.0 & !(0x01 << 14usize)) | (((val.0 as u32) & 0x01) << 14usize);
771 }
772 #[doc = "Bidirectional data mode enable"]
773 pub const fn bidimode(&self) -> super::vals::Bidimode {
774 let val = (self.0 >> 15usize) & 0x01;
775 super::vals::Bidimode(val as u8)
776 }
777 #[doc = "Bidirectional data mode enable"]
778 pub fn set_bidimode(&mut self, val: super::vals::Bidimode) {
779 self.0 = (self.0 & !(0x01 << 15usize)) | (((val.0 as u32) & 0x01) << 15usize);
780 } 643 }
781 } 644 }
782 impl Default for Cr1 { 645 impl Default for Pr {
783 fn default() -> Cr1 { 646 fn default() -> Pr {
784 Cr1(0) 647 Pr(0)
785 } 648 }
786 } 649 }
787 } 650 }
651 pub mod vals {
652 use crate::generic::*;
653 #[repr(transparent)]
654 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
655 pub struct Mr(pub u8);
656 impl Mr {
657 #[doc = "Interrupt request line is masked"]
658 pub const MASKED: Self = Self(0);
659 #[doc = "Interrupt request line is unmasked"]
660 pub const UNMASKED: Self = Self(0x01);
661 }
662 #[repr(transparent)]
663 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
664 pub struct Prw(pub u8);
665 impl Prw {
666 #[doc = "Clears pending bit"]
667 pub const CLEAR: Self = Self(0x01);
668 }
669 #[repr(transparent)]
670 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
671 pub struct Swierw(pub u8);
672 impl Swierw {
673 #[doc = "Generates an interrupt request"]
674 pub const PEND: Self = Self(0x01);
675 }
676 #[repr(transparent)]
677 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
678 pub struct Tr(pub u8);
679 impl Tr {
680 #[doc = "Falling edge trigger is disabled"]
681 pub const DISABLED: Self = Self(0);
682 #[doc = "Falling edge trigger is enabled"]
683 pub const ENABLED: Self = Self(0x01);
684 }
685 #[repr(transparent)]
686 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
687 pub struct Prr(pub u8);
688 impl Prr {
689 #[doc = "No trigger request occurred"]
690 pub const NOTPENDING: Self = Self(0);
691 #[doc = "Selected trigger request occurred"]
692 pub const PENDING: Self = Self(0x01);
693 }
694 }
788} 695}
789pub mod dma_v2 { 696pub mod dma_v1 {
790 use crate::generic::*; 697 use crate::generic::*;
791 #[doc = "DMA controller"] 698 #[doc = "DMA controller"]
792 #[derive(Copy, Clone)] 699 #[derive(Copy, Clone)]
@@ -794,267 +701,226 @@ pub mod dma_v2 {
794 unsafe impl Send for Dma {} 701 unsafe impl Send for Dma {}
795 unsafe impl Sync for Dma {} 702 unsafe impl Sync for Dma {}
796 impl Dma { 703 impl Dma {
797 #[doc = "low interrupt status register"] 704 #[doc = "DMA interrupt status register (DMA_ISR)"]
798 pub fn isr(self, n: usize) -> Reg<regs::Isr, R> { 705 pub fn isr(self) -> Reg<regs::Isr, R> {
799 assert!(n < 2usize); 706 unsafe { Reg::from_ptr(self.0.add(0usize)) }
800 unsafe { Reg::from_ptr(self.0.add(0usize + n * 4usize)) }
801 } 707 }
802 #[doc = "low interrupt flag clear register"] 708 #[doc = "DMA interrupt flag clear register (DMA_IFCR)"]
803 pub fn ifcr(self, n: usize) -> Reg<regs::Ifcr, W> { 709 pub fn ifcr(self) -> Reg<regs::Ifcr, W> {
804 assert!(n < 2usize); 710 unsafe { Reg::from_ptr(self.0.add(4usize)) }
805 unsafe { Reg::from_ptr(self.0.add(8usize + n * 4usize)) }
806 } 711 }
807 #[doc = "Stream cluster: S?CR, S?NDTR, S?M0AR, S?M1AR and S?FCR registers"] 712 #[doc = "Channel cluster: CCR?, CNDTR?, CPAR?, and CMAR? registers"]
808 pub fn st(self, n: usize) -> St { 713 pub fn ch(self, n: usize) -> Ch {
809 assert!(n < 8usize); 714 assert!(n < 7usize);
810 unsafe { St(self.0.add(16usize + n * 24usize)) } 715 unsafe { Ch(self.0.add(8usize + n * 20usize)) }
811 } 716 }
812 } 717 }
813 #[doc = "Stream cluster: S?CR, S?NDTR, S?M0AR, S?M1AR and S?FCR registers"] 718 #[doc = "Channel cluster: CCR?, CNDTR?, CPAR?, and CMAR? registers"]
814 #[derive(Copy, Clone)] 719 #[derive(Copy, Clone)]
815 pub struct St(pub *mut u8); 720 pub struct Ch(pub *mut u8);
816 unsafe impl Send for St {} 721 unsafe impl Send for Ch {}
817 unsafe impl Sync for St {} 722 unsafe impl Sync for Ch {}
818 impl St { 723 impl Ch {
819 #[doc = "stream x configuration register"] 724 #[doc = "DMA channel configuration register (DMA_CCR)"]
820 pub fn cr(self) -> Reg<regs::Cr, RW> { 725 pub fn cr(self) -> Reg<regs::Cr, RW> {
821 unsafe { Reg::from_ptr(self.0.add(0usize)) } 726 unsafe { Reg::from_ptr(self.0.add(0usize)) }
822 } 727 }
823 #[doc = "stream x number of data register"] 728 #[doc = "DMA channel 1 number of data register"]
824 pub fn ndtr(self) -> Reg<regs::Ndtr, RW> { 729 pub fn ndtr(self) -> Reg<regs::Ndtr, RW> {
825 unsafe { Reg::from_ptr(self.0.add(4usize)) } 730 unsafe { Reg::from_ptr(self.0.add(4usize)) }
826 } 731 }
827 #[doc = "stream x peripheral address register"] 732 #[doc = "DMA channel 1 peripheral address register"]
828 pub fn par(self) -> Reg<u32, RW> { 733 pub fn par(self) -> Reg<u32, RW> {
829 unsafe { Reg::from_ptr(self.0.add(8usize)) } 734 unsafe { Reg::from_ptr(self.0.add(8usize)) }
830 } 735 }
831 #[doc = "stream x memory 0 address register"] 736 #[doc = "DMA channel 1 memory address register"]
832 pub fn m0ar(self) -> Reg<u32, RW> { 737 pub fn mar(self) -> Reg<u32, RW> {
833 unsafe { Reg::from_ptr(self.0.add(12usize)) } 738 unsafe { Reg::from_ptr(self.0.add(12usize)) }
834 } 739 }
835 #[doc = "stream x memory 1 address register"]
836 pub fn m1ar(self) -> Reg<u32, RW> {
837 unsafe { Reg::from_ptr(self.0.add(16usize)) }
838 }
839 #[doc = "stream x FIFO control register"]
840 pub fn fcr(self) -> Reg<regs::Fcr, RW> {
841 unsafe { Reg::from_ptr(self.0.add(20usize)) }
842 }
843 } 740 }
844 pub mod vals { 741 pub mod vals {
845 use crate::generic::*; 742 use crate::generic::*;
846 #[repr(transparent)] 743 #[repr(transparent)]
847 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 744 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
745 pub struct Pl(pub u8);
746 impl Pl {
747 #[doc = "Low priority"]
748 pub const LOW: Self = Self(0);
749 #[doc = "Medium priority"]
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)]
848 pub struct Circ(pub u8); 758 pub struct Circ(pub u8);
849 impl Circ { 759 impl Circ {
850 #[doc = "Circular mode disabled"] 760 #[doc = "Circular buffer disabled"]
851 pub const DISABLED: Self = Self(0); 761 pub const DISABLED: Self = Self(0);
852 #[doc = "Circular mode enabled"] 762 #[doc = "Circular buffer enabled"]
853 pub const ENABLED: Self = Self(0x01); 763 pub const ENABLED: Self = Self(0x01);
854 } 764 }
855 #[repr(transparent)] 765 #[repr(transparent)]
856 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 766 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
857 pub struct Inc(pub u8); 767 pub struct Inc(pub u8);
858 impl Inc { 768 impl Inc {
859 #[doc = "Address pointer is fixed"] 769 #[doc = "Increment mode disabled"]
860 pub const FIXED: Self = Self(0);
861 #[doc = "Address pointer is incremented after each data transfer"]
862 pub const INCREMENTED: Self = Self(0x01);
863 }
864 #[repr(transparent)]
865 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
866 pub struct Dbm(pub u8);
867 impl Dbm {
868 #[doc = "No buffer switching at the end of transfer"]
869 pub const DISABLED: Self = Self(0); 770 pub const DISABLED: Self = Self(0);
870 #[doc = "Memory target switched at the end of the DMA transfer"] 771 #[doc = "Increment mode enabled"]
871 pub const ENABLED: Self = Self(0x01); 772 pub const ENABLED: Self = Self(0x01);
872 } 773 }
873 #[repr(transparent)] 774 #[repr(transparent)]
874 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 775 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
875 pub struct Fth(pub u8);
876 impl Fth {
877 #[doc = "1/4 full FIFO"]
878 pub const QUARTER: Self = Self(0);
879 #[doc = "1/2 full FIFO"]
880 pub const HALF: Self = Self(0x01);
881 #[doc = "3/4 full FIFO"]
882 pub const THREEQUARTERS: Self = Self(0x02);
883 #[doc = "Full FIFO"]
884 pub const FULL: Self = Self(0x03);
885 }
886 #[repr(transparent)]
887 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
888 pub struct Size(pub u8); 776 pub struct Size(pub u8);
889 impl Size { 777 impl Size {
890 #[doc = "Byte (8-bit)"] 778 #[doc = "8-bit size"]
891 pub const BITS8: Self = Self(0); 779 pub const BITS8: Self = Self(0);
892 #[doc = "Half-word (16-bit)"] 780 #[doc = "16-bit size"]
893 pub const BITS16: Self = Self(0x01); 781 pub const BITS16: Self = Self(0x01);
894 #[doc = "Word (32-bit)"] 782 #[doc = "32-bit size"]
895 pub const BITS32: Self = Self(0x02); 783 pub const BITS32: Self = Self(0x02);
896 } 784 }
897 #[repr(transparent)] 785 #[repr(transparent)]
898 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 786 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
899 pub struct Pl(pub u8); 787 pub struct Memmem(pub u8);
900 impl Pl { 788 impl Memmem {
901 #[doc = "Low"] 789 #[doc = "Memory to memory mode disabled"]
902 pub const LOW: Self = Self(0); 790 pub const DISABLED: Self = Self(0);
903 #[doc = "Medium"] 791 #[doc = "Memory to memory mode enabled"]
904 pub const MEDIUM: Self = Self(0x01); 792 pub const ENABLED: Self = Self(0x01);
905 #[doc = "High"]
906 pub const HIGH: Self = Self(0x02);
907 #[doc = "Very high"]
908 pub const VERYHIGH: Self = Self(0x03);
909 }
910 #[repr(transparent)]
911 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
912 pub struct Dmdis(pub u8);
913 impl Dmdis {
914 #[doc = "Direct mode is enabled"]
915 pub const ENABLED: Self = Self(0);
916 #[doc = "Direct mode is disabled"]
917 pub const DISABLED: Self = Self(0x01);
918 }
919 #[repr(transparent)]
920 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
921 pub struct Pincos(pub u8);
922 impl Pincos {
923 #[doc = "The offset size for the peripheral address calculation is linked to the PSIZE"]
924 pub const PSIZE: Self = Self(0);
925 #[doc = "The offset size for the peripheral address calculation is fixed to 4 (32-bit alignment)"]
926 pub const FIXED4: Self = Self(0x01);
927 } 793 }
928 #[repr(transparent)] 794 #[repr(transparent)]
929 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 795 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
930 pub struct Dir(pub u8); 796 pub struct Dir(pub u8);
931 impl Dir { 797 impl Dir {
932 #[doc = "Peripheral-to-memory"] 798 #[doc = "Read from peripheral"]
933 pub const PERIPHERALTOMEMORY: Self = Self(0); 799 pub const FROMPERIPHERAL: Self = Self(0);
934 #[doc = "Memory-to-peripheral"] 800 #[doc = "Read from memory"]
935 pub const MEMORYTOPERIPHERAL: Self = Self(0x01); 801 pub const FROMMEMORY: Self = Self(0x01);
936 #[doc = "Memory-to-memory"]
937 pub const MEMORYTOMEMORY: Self = Self(0x02);
938 }
939 #[repr(transparent)]
940 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
941 pub struct Pfctrl(pub u8);
942 impl Pfctrl {
943 #[doc = "The DMA is the flow controller"]
944 pub const DMA: Self = Self(0);
945 #[doc = "The peripheral is the flow controller"]
946 pub const PERIPHERAL: Self = Self(0x01);
947 }
948 #[repr(transparent)]
949 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
950 pub struct Ct(pub u8);
951 impl Ct {
952 #[doc = "The current target memory is Memory 0"]
953 pub const MEMORY0: Self = Self(0);
954 #[doc = "The current target memory is Memory 1"]
955 pub const MEMORY1: Self = Self(0x01);
956 }
957 #[repr(transparent)]
958 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
959 pub struct Fs(pub u8);
960 impl Fs {
961 #[doc = "0 < fifo_level < 1/4"]
962 pub const QUARTER1: Self = Self(0);
963 #[doc = "1/4 <= fifo_level < 1/2"]
964 pub const QUARTER2: Self = Self(0x01);
965 #[doc = "1/2 <= fifo_level < 3/4"]
966 pub const QUARTER3: Self = Self(0x02);
967 #[doc = "3/4 <= fifo_level < full"]
968 pub const QUARTER4: Self = Self(0x03);
969 #[doc = "FIFO is empty"]
970 pub const EMPTY: Self = Self(0x04);
971 #[doc = "FIFO is full"]
972 pub const FULL: Self = Self(0x05);
973 }
974 #[repr(transparent)]
975 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
976 pub struct Burst(pub u8);
977 impl Burst {
978 #[doc = "Single transfer"]
979 pub const SINGLE: Self = Self(0);
980 #[doc = "Incremental burst of 4 beats"]
981 pub const INCR4: Self = Self(0x01);
982 #[doc = "Incremental burst of 8 beats"]
983 pub const INCR8: Self = Self(0x02);
984 #[doc = "Incremental burst of 16 beats"]
985 pub const INCR16: Self = Self(0x03);
986 } 802 }
987 } 803 }
988 pub mod regs { 804 pub mod regs {
989 use crate::generic::*; 805 use crate::generic::*;
990 #[doc = "low interrupt flag clear register"] 806 #[doc = "DMA interrupt status register (DMA_ISR)"]
991 #[repr(transparent)] 807 #[repr(transparent)]
992 #[derive(Copy, Clone, Eq, PartialEq)] 808 #[derive(Copy, Clone, Eq, PartialEq)]
993 pub struct Ifcr(pub u32); 809 pub struct Isr(pub u32);
994 impl Ifcr { 810 impl Isr {
995 #[doc = "Stream x clear FIFO error interrupt flag (x = 3..0)"] 811 #[doc = "Channel 1 Global interrupt flag"]
996 pub fn cfeif(&self, n: usize) -> bool { 812 pub fn gif(&self, n: usize) -> bool {
997 assert!(n < 4usize); 813 assert!(n < 7usize);
998 let offs = 0usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); 814 let offs = 0usize + n * 4usize;
999 let val = (self.0 >> offs) & 0x01; 815 let val = (self.0 >> offs) & 0x01;
1000 val != 0 816 val != 0
1001 } 817 }
1002 #[doc = "Stream x clear FIFO error interrupt flag (x = 3..0)"] 818 #[doc = "Channel 1 Global interrupt flag"]
1003 pub fn set_cfeif(&mut self, n: usize, val: bool) { 819 pub fn set_gif(&mut self, n: usize, val: bool) {
1004 assert!(n < 4usize); 820 assert!(n < 7usize);
1005 let offs = 0usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); 821 let offs = 0usize + n * 4usize;
1006 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); 822 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
1007 } 823 }
1008 #[doc = "Stream x clear direct mode error interrupt flag (x = 3..0)"] 824 #[doc = "Channel 1 Transfer Complete flag"]
1009 pub fn cdmeif(&self, n: usize) -> bool { 825 pub fn tcif(&self, n: usize) -> bool {
1010 assert!(n < 4usize); 826 assert!(n < 7usize);
1011 let offs = 2usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); 827 let offs = 1usize + n * 4usize;
1012 let val = (self.0 >> offs) & 0x01; 828 let val = (self.0 >> offs) & 0x01;
1013 val != 0 829 val != 0
1014 } 830 }
1015 #[doc = "Stream x clear direct mode error interrupt flag (x = 3..0)"] 831 #[doc = "Channel 1 Transfer Complete flag"]
1016 pub fn set_cdmeif(&mut self, n: usize, val: bool) { 832 pub fn set_tcif(&mut self, n: usize, val: bool) {
1017 assert!(n < 4usize); 833 assert!(n < 7usize);
1018 let offs = 2usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); 834 let offs = 1usize + n * 4usize;
1019 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); 835 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
1020 } 836 }
1021 #[doc = "Stream x clear transfer error interrupt flag (x = 3..0)"] 837 #[doc = "Channel 1 Half Transfer Complete flag"]
1022 pub fn cteif(&self, n: usize) -> bool { 838 pub fn htif(&self, n: usize) -> bool {
1023 assert!(n < 4usize); 839 assert!(n < 7usize);
1024 let offs = 3usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); 840 let offs = 2usize + n * 4usize;
1025 let val = (self.0 >> offs) & 0x01; 841 let val = (self.0 >> offs) & 0x01;
1026 val != 0 842 val != 0
1027 } 843 }
1028 #[doc = "Stream x clear transfer error interrupt flag (x = 3..0)"] 844 #[doc = "Channel 1 Half Transfer Complete flag"]
1029 pub fn set_cteif(&mut self, n: usize, val: bool) { 845 pub fn set_htif(&mut self, n: usize, val: bool) {
1030 assert!(n < 4usize); 846 assert!(n < 7usize);
1031 let offs = 3usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); 847 let offs = 2usize + n * 4usize;
1032 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); 848 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
1033 } 849 }
1034 #[doc = "Stream x clear half transfer interrupt flag (x = 3..0)"] 850 #[doc = "Channel 1 Transfer Error flag"]
1035 pub fn chtif(&self, n: usize) -> bool { 851 pub fn teif(&self, n: usize) -> bool {
1036 assert!(n < 4usize); 852 assert!(n < 7usize);
1037 let offs = 4usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); 853 let offs = 3usize + n * 4usize;
1038 let val = (self.0 >> offs) & 0x01; 854 let val = (self.0 >> offs) & 0x01;
1039 val != 0 855 val != 0
1040 } 856 }
1041 #[doc = "Stream x clear half transfer interrupt flag (x = 3..0)"] 857 #[doc = "Channel 1 Transfer Error flag"]
1042 pub fn set_chtif(&mut self, n: usize, val: bool) { 858 pub fn set_teif(&mut self, n: usize, val: bool) {
1043 assert!(n < 4usize); 859 assert!(n < 7usize);
1044 let offs = 4usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); 860 let offs = 3usize + n * 4usize;
1045 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); 861 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
1046 } 862 }
1047 #[doc = "Stream x clear transfer complete interrupt flag (x = 3..0)"] 863 }
864 impl Default for Isr {
865 fn default() -> Isr {
866 Isr(0)
867 }
868 }
869 #[doc = "DMA interrupt flag clear register (DMA_IFCR)"]
870 #[repr(transparent)]
871 #[derive(Copy, Clone, Eq, PartialEq)]
872 pub struct Ifcr(pub u32);
873 impl Ifcr {
874 #[doc = "Channel 1 Global interrupt clear"]
875 pub fn cgif(&self, n: usize) -> bool {
876 assert!(n < 7usize);
877 let offs = 0usize + n * 4usize;
878 let val = (self.0 >> offs) & 0x01;
879 val != 0
880 }
881 #[doc = "Channel 1 Global interrupt clear"]
882 pub fn set_cgif(&mut self, n: usize, val: bool) {
883 assert!(n < 7usize);
884 let offs = 0usize + n * 4usize;
885 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
886 }
887 #[doc = "Channel 1 Transfer Complete clear"]
1048 pub fn ctcif(&self, n: usize) -> bool { 888 pub fn ctcif(&self, n: usize) -> bool {
1049 assert!(n < 4usize); 889 assert!(n < 7usize);
1050 let offs = 5usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); 890 let offs = 1usize + n * 4usize;
1051 let val = (self.0 >> offs) & 0x01; 891 let val = (self.0 >> offs) & 0x01;
1052 val != 0 892 val != 0
1053 } 893 }
1054 #[doc = "Stream x clear transfer complete interrupt flag (x = 3..0)"] 894 #[doc = "Channel 1 Transfer Complete clear"]
1055 pub fn set_ctcif(&mut self, n: usize, val: bool) { 895 pub fn set_ctcif(&mut self, n: usize, val: bool) {
1056 assert!(n < 4usize); 896 assert!(n < 7usize);
1057 let offs = 5usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); 897 let offs = 1usize + n * 4usize;
898 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
899 }
900 #[doc = "Channel 1 Half Transfer clear"]
901 pub fn chtif(&self, n: usize) -> bool {
902 assert!(n < 7usize);
903 let offs = 2usize + n * 4usize;
904 let val = (self.0 >> offs) & 0x01;
905 val != 0
906 }
907 #[doc = "Channel 1 Half Transfer clear"]
908 pub fn set_chtif(&mut self, n: usize, val: bool) {
909 assert!(n < 7usize);
910 let offs = 2usize + n * 4usize;
911 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
912 }
913 #[doc = "Channel 1 Transfer Error clear"]
914 pub fn cteif(&self, n: usize) -> bool {
915 assert!(n < 7usize);
916 let offs = 3usize + n * 4usize;
917 let val = (self.0 >> offs) & 0x01;
918 val != 0
919 }
920 #[doc = "Channel 1 Transfer Error clear"]
921 pub fn set_cteif(&mut self, n: usize, val: bool) {
922 assert!(n < 7usize);
923 let offs = 3usize + n * 4usize;
1058 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); 924 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
1059 } 925 }
1060 } 926 }
@@ -1063,17 +929,17 @@ pub mod dma_v2 {
1063 Ifcr(0) 929 Ifcr(0)
1064 } 930 }
1065 } 931 }
1066 #[doc = "stream x number of data register"] 932 #[doc = "DMA channel 1 number of data register"]
1067 #[repr(transparent)] 933 #[repr(transparent)]
1068 #[derive(Copy, Clone, Eq, PartialEq)] 934 #[derive(Copy, Clone, Eq, PartialEq)]
1069 pub struct Ndtr(pub u32); 935 pub struct Ndtr(pub u32);
1070 impl Ndtr { 936 impl Ndtr {
1071 #[doc = "Number of data items to transfer"] 937 #[doc = "Number of data to transfer"]
1072 pub const fn ndt(&self) -> u16 { 938 pub const fn ndt(&self) -> u16 {
1073 let val = (self.0 >> 0usize) & 0xffff; 939 let val = (self.0 >> 0usize) & 0xffff;
1074 val as u16 940 val as u16
1075 } 941 }
1076 #[doc = "Number of data items to transfer"] 942 #[doc = "Number of data to transfer"]
1077 pub fn set_ndt(&mut self, val: u16) { 943 pub fn set_ndt(&mut self, val: u16) {
1078 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); 944 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
1079 } 945 }
@@ -1083,309 +949,527 @@ pub mod dma_v2 {
1083 Ndtr(0) 949 Ndtr(0)
1084 } 950 }
1085 } 951 }
1086 #[doc = "stream x configuration register"] 952 #[doc = "DMA channel configuration register (DMA_CCR)"]
1087 #[repr(transparent)] 953 #[repr(transparent)]
1088 #[derive(Copy, Clone, Eq, PartialEq)] 954 #[derive(Copy, Clone, Eq, PartialEq)]
1089 pub struct Cr(pub u32); 955 pub struct Cr(pub u32);
1090 impl Cr { 956 impl Cr {
1091 #[doc = "Stream enable / flag stream ready when read low"] 957 #[doc = "Channel enable"]
1092 pub const fn en(&self) -> bool { 958 pub const fn en(&self) -> bool {
1093 let val = (self.0 >> 0usize) & 0x01; 959 let val = (self.0 >> 0usize) & 0x01;
1094 val != 0 960 val != 0
1095 } 961 }
1096 #[doc = "Stream enable / flag stream ready when read low"] 962 #[doc = "Channel enable"]
1097 pub fn set_en(&mut self, val: bool) { 963 pub fn set_en(&mut self, val: bool) {
1098 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 964 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
1099 } 965 }
1100 #[doc = "Direct mode error interrupt enable"] 966 #[doc = "Transfer complete interrupt enable"]
1101 pub const fn dmeie(&self) -> bool { 967 pub const fn tcie(&self) -> bool {
1102 let val = (self.0 >> 1usize) & 0x01; 968 let val = (self.0 >> 1usize) & 0x01;
1103 val != 0 969 val != 0
1104 } 970 }
1105 #[doc = "Direct mode error interrupt enable"] 971 #[doc = "Transfer complete interrupt enable"]
1106 pub fn set_dmeie(&mut self, val: bool) { 972 pub fn set_tcie(&mut self, val: bool) {
1107 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); 973 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
1108 } 974 }
1109 #[doc = "Transfer error interrupt enable"] 975 #[doc = "Half Transfer interrupt enable"]
1110 pub const fn teie(&self) -> bool { 976 pub const fn htie(&self) -> bool {
1111 let val = (self.0 >> 2usize) & 0x01; 977 let val = (self.0 >> 2usize) & 0x01;
1112 val != 0 978 val != 0
1113 } 979 }
1114 #[doc = "Transfer error interrupt enable"] 980 #[doc = "Half Transfer interrupt enable"]
1115 pub fn set_teie(&mut self, val: bool) { 981 pub fn set_htie(&mut self, val: bool) {
1116 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); 982 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
1117 } 983 }
1118 #[doc = "Half transfer interrupt enable"] 984 #[doc = "Transfer error interrupt enable"]
1119 pub const fn htie(&self) -> bool { 985 pub const fn teie(&self) -> bool {
1120 let val = (self.0 >> 3usize) & 0x01; 986 let val = (self.0 >> 3usize) & 0x01;
1121 val != 0 987 val != 0
1122 } 988 }
1123 #[doc = "Half transfer interrupt enable"] 989 #[doc = "Transfer error interrupt enable"]
1124 pub fn set_htie(&mut self, val: bool) { 990 pub fn set_teie(&mut self, val: bool) {
1125 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); 991 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
1126 } 992 }
1127 #[doc = "Transfer complete interrupt enable"]
1128 pub const fn tcie(&self) -> bool {
1129 let val = (self.0 >> 4usize) & 0x01;
1130 val != 0
1131 }
1132 #[doc = "Transfer complete interrupt enable"]
1133 pub fn set_tcie(&mut self, val: bool) {
1134 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
1135 }
1136 #[doc = "Peripheral flow controller"]
1137 pub const fn pfctrl(&self) -> super::vals::Pfctrl {
1138 let val = (self.0 >> 5usize) & 0x01;
1139 super::vals::Pfctrl(val as u8)
1140 }
1141 #[doc = "Peripheral flow controller"]
1142 pub fn set_pfctrl(&mut self, val: super::vals::Pfctrl) {
1143 self.0 = (self.0 & !(0x01 << 5usize)) | (((val.0 as u32) & 0x01) << 5usize);
1144 }
1145 #[doc = "Data transfer direction"] 993 #[doc = "Data transfer direction"]
1146 pub const fn dir(&self) -> super::vals::Dir { 994 pub const fn dir(&self) -> super::vals::Dir {
1147 let val = (self.0 >> 6usize) & 0x03; 995 let val = (self.0 >> 4usize) & 0x01;
1148 super::vals::Dir(val as u8) 996 super::vals::Dir(val as u8)
1149 } 997 }
1150 #[doc = "Data transfer direction"] 998 #[doc = "Data transfer direction"]
1151 pub fn set_dir(&mut self, val: super::vals::Dir) { 999 pub fn set_dir(&mut self, val: super::vals::Dir) {
1152 self.0 = (self.0 & !(0x03 << 6usize)) | (((val.0 as u32) & 0x03) << 6usize); 1000 self.0 = (self.0 & !(0x01 << 4usize)) | (((val.0 as u32) & 0x01) << 4usize);
1153 } 1001 }
1154 #[doc = "Circular mode"] 1002 #[doc = "Circular mode"]
1155 pub const fn circ(&self) -> super::vals::Circ { 1003 pub const fn circ(&self) -> super::vals::Circ {
1156 let val = (self.0 >> 8usize) & 0x01; 1004 let val = (self.0 >> 5usize) & 0x01;
1157 super::vals::Circ(val as u8) 1005 super::vals::Circ(val as u8)
1158 } 1006 }
1159 #[doc = "Circular mode"] 1007 #[doc = "Circular mode"]
1160 pub fn set_circ(&mut self, val: super::vals::Circ) { 1008 pub fn set_circ(&mut self, val: super::vals::Circ) {
1161 self.0 = (self.0 & !(0x01 << 8usize)) | (((val.0 as u32) & 0x01) << 8usize); 1009 self.0 = (self.0 & !(0x01 << 5usize)) | (((val.0 as u32) & 0x01) << 5usize);
1162 } 1010 }
1163 #[doc = "Peripheral increment mode"] 1011 #[doc = "Peripheral increment mode"]
1164 pub const fn pinc(&self) -> super::vals::Inc { 1012 pub const fn pinc(&self) -> super::vals::Inc {
1165 let val = (self.0 >> 9usize) & 0x01; 1013 let val = (self.0 >> 6usize) & 0x01;
1166 super::vals::Inc(val as u8) 1014 super::vals::Inc(val as u8)
1167 } 1015 }
1168 #[doc = "Peripheral increment mode"] 1016 #[doc = "Peripheral increment mode"]
1169 pub fn set_pinc(&mut self, val: super::vals::Inc) { 1017 pub fn set_pinc(&mut self, val: super::vals::Inc) {
1170 self.0 = (self.0 & !(0x01 << 9usize)) | (((val.0 as u32) & 0x01) << 9usize); 1018 self.0 = (self.0 & !(0x01 << 6usize)) | (((val.0 as u32) & 0x01) << 6usize);
1171 } 1019 }
1172 #[doc = "Memory increment mode"] 1020 #[doc = "Memory increment mode"]
1173 pub const fn minc(&self) -> super::vals::Inc { 1021 pub const fn minc(&self) -> super::vals::Inc {
1174 let val = (self.0 >> 10usize) & 0x01; 1022 let val = (self.0 >> 7usize) & 0x01;
1175 super::vals::Inc(val as u8) 1023 super::vals::Inc(val as u8)
1176 } 1024 }
1177 #[doc = "Memory increment mode"] 1025 #[doc = "Memory increment mode"]
1178 pub fn set_minc(&mut self, val: super::vals::Inc) { 1026 pub fn set_minc(&mut self, val: super::vals::Inc) {
1179 self.0 = (self.0 & !(0x01 << 10usize)) | (((val.0 as u32) & 0x01) << 10usize); 1027 self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize);
1180 } 1028 }
1181 #[doc = "Peripheral data size"] 1029 #[doc = "Peripheral size"]
1182 pub const fn psize(&self) -> super::vals::Size { 1030 pub const fn psize(&self) -> super::vals::Size {
1183 let val = (self.0 >> 11usize) & 0x03; 1031 let val = (self.0 >> 8usize) & 0x03;
1184 super::vals::Size(val as u8) 1032 super::vals::Size(val as u8)
1185 } 1033 }
1186 #[doc = "Peripheral data size"] 1034 #[doc = "Peripheral size"]
1187 pub fn set_psize(&mut self, val: super::vals::Size) { 1035 pub fn set_psize(&mut self, val: super::vals::Size) {
1188 self.0 = (self.0 & !(0x03 << 11usize)) | (((val.0 as u32) & 0x03) << 11usize); 1036 self.0 = (self.0 & !(0x03 << 8usize)) | (((val.0 as u32) & 0x03) << 8usize);
1189 } 1037 }
1190 #[doc = "Memory data size"] 1038 #[doc = "Memory size"]
1191 pub const fn msize(&self) -> super::vals::Size { 1039 pub const fn msize(&self) -> super::vals::Size {
1192 let val = (self.0 >> 13usize) & 0x03; 1040 let val = (self.0 >> 10usize) & 0x03;
1193 super::vals::Size(val as u8) 1041 super::vals::Size(val as u8)
1194 } 1042 }
1195 #[doc = "Memory data size"] 1043 #[doc = "Memory size"]
1196 pub fn set_msize(&mut self, val: super::vals::Size) { 1044 pub fn set_msize(&mut self, val: super::vals::Size) {
1197 self.0 = (self.0 & !(0x03 << 13usize)) | (((val.0 as u32) & 0x03) << 13usize); 1045 self.0 = (self.0 & !(0x03 << 10usize)) | (((val.0 as u32) & 0x03) << 10usize);
1198 }
1199 #[doc = "Peripheral increment offset size"]
1200 pub const fn pincos(&self) -> super::vals::Pincos {
1201 let val = (self.0 >> 15usize) & 0x01;
1202 super::vals::Pincos(val as u8)
1203 }
1204 #[doc = "Peripheral increment offset size"]
1205 pub fn set_pincos(&mut self, val: super::vals::Pincos) {
1206 self.0 = (self.0 & !(0x01 << 15usize)) | (((val.0 as u32) & 0x01) << 15usize);
1207 } 1046 }
1208 #[doc = "Priority level"] 1047 #[doc = "Channel Priority level"]
1209 pub const fn pl(&self) -> super::vals::Pl { 1048 pub const fn pl(&self) -> super::vals::Pl {
1210 let val = (self.0 >> 16usize) & 0x03; 1049 let val = (self.0 >> 12usize) & 0x03;
1211 super::vals::Pl(val as u8) 1050 super::vals::Pl(val as u8)
1212 } 1051 }
1213 #[doc = "Priority level"] 1052 #[doc = "Channel Priority level"]
1214 pub fn set_pl(&mut self, val: super::vals::Pl) { 1053 pub fn set_pl(&mut self, val: super::vals::Pl) {
1215 self.0 = (self.0 & !(0x03 << 16usize)) | (((val.0 as u32) & 0x03) << 16usize); 1054 self.0 = (self.0 & !(0x03 << 12usize)) | (((val.0 as u32) & 0x03) << 12usize);
1216 } 1055 }
1217 #[doc = "Double buffer mode"] 1056 #[doc = "Memory to memory mode"]
1218 pub const fn dbm(&self) -> super::vals::Dbm { 1057 pub const fn mem2mem(&self) -> super::vals::Memmem {
1058 let val = (self.0 >> 14usize) & 0x01;
1059 super::vals::Memmem(val as u8)
1060 }
1061 #[doc = "Memory to memory mode"]
1062 pub fn set_mem2mem(&mut self, val: super::vals::Memmem) {
1063 self.0 = (self.0 & !(0x01 << 14usize)) | (((val.0 as u32) & 0x01) << 14usize);
1064 }
1065 }
1066 impl Default for Cr {
1067 fn default() -> Cr {
1068 Cr(0)
1069 }
1070 }
1071 }
1072}
1073pub mod generic {
1074 use core::marker::PhantomData;
1075 #[derive(Copy, Clone)]
1076 pub struct RW;
1077 #[derive(Copy, Clone)]
1078 pub struct R;
1079 #[derive(Copy, Clone)]
1080 pub struct W;
1081 mod sealed {
1082 use super::*;
1083 pub trait Access {}
1084 impl Access for R {}
1085 impl Access for W {}
1086 impl Access for RW {}
1087 }
1088 pub trait Access: sealed::Access + Copy {}
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)]
1099 pub struct Reg<T: Copy, A: Access> {
1100 ptr: *mut u8,
1101 phantom: PhantomData<*mut (T, A)>,
1102 }
1103 unsafe impl<T: Copy, A: Access> Send for Reg<T, A> {}
1104 unsafe impl<T: Copy, A: Access> Sync for Reg<T, A> {}
1105 impl<T: Copy, A: Access> Reg<T, A> {
1106 pub fn from_ptr(ptr: *mut u8) -> Self {
1107 Self {
1108 ptr,
1109 phantom: PhantomData,
1110 }
1111 }
1112 pub fn ptr(&self) -> *mut T {
1113 self.ptr as _
1114 }
1115 }
1116 impl<T: Copy, A: Read> Reg<T, A> {
1117 pub unsafe fn read(&self) -> T {
1118 (self.ptr as *mut T).read_volatile()
1119 }
1120 }
1121 impl<T: Copy, A: Write> Reg<T, A> {
1122 pub unsafe fn write_value(&self, val: T) {
1123 (self.ptr as *mut T).write_volatile(val)
1124 }
1125 }
1126 impl<T: Default + Copy, A: Write> Reg<T, A> {
1127 pub unsafe fn write<R>(&self, f: impl FnOnce(&mut T) -> R) -> R {
1128 let mut val = Default::default();
1129 let res = f(&mut val);
1130 self.write_value(val);
1131 res
1132 }
1133 }
1134 impl<T: Copy, A: Read + Write> Reg<T, A> {
1135 pub unsafe fn modify<R>(&self, f: impl FnOnce(&mut T) -> R) -> R {
1136 let mut val = self.read();
1137 let res = f(&mut val);
1138 self.write_value(val);
1139 res
1140 }
1141 }
1142}
1143pub mod syscfg_l4 {
1144 use crate::generic::*;
1145 #[doc = "System configuration controller"]
1146 #[derive(Copy, Clone)]
1147 pub struct Syscfg(pub *mut u8);
1148 unsafe impl Send for Syscfg {}
1149 unsafe impl Sync for Syscfg {}
1150 impl Syscfg {
1151 #[doc = "memory remap register"]
1152 pub fn memrmp(self) -> Reg<regs::Memrmp, RW> {
1153 unsafe { Reg::from_ptr(self.0.add(0usize)) }
1154 }
1155 #[doc = "configuration register 1"]
1156 pub fn cfgr1(self) -> Reg<regs::Cfgr1, RW> {
1157 unsafe { Reg::from_ptr(self.0.add(4usize)) }
1158 }
1159 #[doc = "external interrupt configuration register 1"]
1160 pub fn exticr(self, n: usize) -> Reg<regs::Exticr, RW> {
1161 assert!(n < 4usize);
1162 unsafe { Reg::from_ptr(self.0.add(8usize + n * 4usize)) }
1163 }
1164 #[doc = "SCSR"]
1165 pub fn scsr(self) -> Reg<regs::Scsr, RW> {
1166 unsafe { Reg::from_ptr(self.0.add(24usize)) }
1167 }
1168 #[doc = "CFGR2"]
1169 pub fn cfgr2(self) -> Reg<regs::Cfgr2, RW> {
1170 unsafe { Reg::from_ptr(self.0.add(28usize)) }
1171 }
1172 #[doc = "SWPR"]
1173 pub fn swpr(self) -> Reg<regs::Swpr, W> {
1174 unsafe { Reg::from_ptr(self.0.add(32usize)) }
1175 }
1176 #[doc = "SKR"]
1177 pub fn skr(self) -> Reg<regs::Skr, W> {
1178 unsafe { Reg::from_ptr(self.0.add(36usize)) }
1179 }
1180 }
1181 pub mod regs {
1182 use crate::generic::*;
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 }
1202 impl Default for Exticr {
1203 fn default() -> Exticr {
1204 Exticr(0)
1205 }
1206 }
1207 #[doc = "SWPR"]
1208 #[repr(transparent)]
1209 #[derive(Copy, Clone, Eq, PartialEq)]
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 }
1226 impl Default for Swpr {
1227 fn default() -> Swpr {
1228 Swpr(0)
1229 }
1230 }
1231 #[doc = "configuration register 1"]
1232 #[repr(transparent)]
1233 #[derive(Copy, Clone, Eq, PartialEq)]
1234 pub struct Cfgr1(pub u32);
1235 impl Cfgr1 {
1236 #[doc = "Firewall disable"]
1237 pub const fn fwdis(&self) -> bool {
1238 let val = (self.0 >> 0usize) & 0x01;
1239 val != 0
1240 }
1241 #[doc = "Firewall disable"]
1242 pub fn set_fwdis(&mut self, val: bool) {
1243 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
1244 }
1245 #[doc = "I/O analog switch voltage booster enable"]
1246 pub const fn boosten(&self) -> bool {
1247 let val = (self.0 >> 8usize) & 0x01;
1248 val != 0
1249 }
1250 #[doc = "I/O analog switch voltage booster enable"]
1251 pub fn set_boosten(&mut self, val: bool) {
1252 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
1253 }
1254 #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB6"]
1255 pub const fn i2c_pb6_fmp(&self) -> bool {
1256 let val = (self.0 >> 16usize) & 0x01;
1257 val != 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 }
1263 #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB7"]
1264 pub const fn i2c_pb7_fmp(&self) -> bool {
1265 let val = (self.0 >> 17usize) & 0x01;
1266 val != 0
1267 }
1268 #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB7"]
1269 pub fn set_i2c_pb7_fmp(&mut self, val: bool) {
1270 self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize);
1271 }
1272 #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB8"]
1273 pub const fn i2c_pb8_fmp(&self) -> bool {
1219 let val = (self.0 >> 18usize) & 0x01; 1274 let val = (self.0 >> 18usize) & 0x01;
1220 super::vals::Dbm(val as u8) 1275 val != 0
1221 } 1276 }
1222 #[doc = "Double buffer mode"] 1277 #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB8"]
1223 pub fn set_dbm(&mut self, val: super::vals::Dbm) { 1278 pub fn set_i2c_pb8_fmp(&mut self, val: bool) {
1224 self.0 = (self.0 & !(0x01 << 18usize)) | (((val.0 as u32) & 0x01) << 18usize); 1279 self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize);
1225 } 1280 }
1226 #[doc = "Current target (only in double buffer mode)"] 1281 #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB9"]
1227 pub const fn ct(&self) -> super::vals::Ct { 1282 pub const fn i2c_pb9_fmp(&self) -> bool {
1228 let val = (self.0 >> 19usize) & 0x01; 1283 let val = (self.0 >> 19usize) & 0x01;
1229 super::vals::Ct(val as u8) 1284 val != 0
1230 } 1285 }
1231 #[doc = "Current target (only in double buffer mode)"] 1286 #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB9"]
1232 pub fn set_ct(&mut self, val: super::vals::Ct) { 1287 pub fn set_i2c_pb9_fmp(&mut self, val: bool) {
1233 self.0 = (self.0 & !(0x01 << 19usize)) | (((val.0 as u32) & 0x01) << 19usize); 1288 self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize);
1234 } 1289 }
1235 #[doc = "Peripheral burst transfer configuration"] 1290 #[doc = "I2C1 Fast-mode Plus driving capability activation"]
1236 pub const fn pburst(&self) -> super::vals::Burst { 1291 pub const fn i2c1_fmp(&self) -> bool {
1237 let val = (self.0 >> 21usize) & 0x03; 1292 let val = (self.0 >> 20usize) & 0x01;
1238 super::vals::Burst(val as u8) 1293 val != 0
1239 } 1294 }
1240 #[doc = "Peripheral burst transfer configuration"] 1295 #[doc = "I2C1 Fast-mode Plus driving capability activation"]
1241 pub fn set_pburst(&mut self, val: super::vals::Burst) { 1296 pub fn set_i2c1_fmp(&mut self, val: bool) {
1242 self.0 = (self.0 & !(0x03 << 21usize)) | (((val.0 as u32) & 0x03) << 21usize); 1297 self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize);
1243 } 1298 }
1244 #[doc = "Memory burst transfer configuration"] 1299 #[doc = "I2C2 Fast-mode Plus driving capability activation"]
1245 pub const fn mburst(&self) -> super::vals::Burst { 1300 pub const fn i2c2_fmp(&self) -> bool {
1246 let val = (self.0 >> 23usize) & 0x03; 1301 let val = (self.0 >> 21usize) & 0x01;
1247 super::vals::Burst(val as u8) 1302 val != 0
1248 } 1303 }
1249 #[doc = "Memory burst transfer configuration"] 1304 #[doc = "I2C2 Fast-mode Plus driving capability activation"]
1250 pub fn set_mburst(&mut self, val: super::vals::Burst) { 1305 pub fn set_i2c2_fmp(&mut self, val: bool) {
1251 self.0 = (self.0 & !(0x03 << 23usize)) | (((val.0 as u32) & 0x03) << 23usize); 1306 self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize);
1252 } 1307 }
1253 #[doc = "Channel selection"] 1308 #[doc = "I2C3 Fast-mode Plus driving capability activation"]
1254 pub const fn chsel(&self) -> u8 { 1309 pub const fn i2c3_fmp(&self) -> bool {
1255 let val = (self.0 >> 25usize) & 0x0f; 1310 let val = (self.0 >> 22usize) & 0x01;
1311 val != 0
1312 }
1313 #[doc = "I2C3 Fast-mode Plus driving capability activation"]
1314 pub fn set_i2c3_fmp(&mut self, val: bool) {
1315 self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize);
1316 }
1317 #[doc = "Floating Point Unit interrupts enable bits"]
1318 pub const fn fpu_ie(&self) -> u8 {
1319 let val = (self.0 >> 26usize) & 0x3f;
1256 val as u8 1320 val as u8
1257 } 1321 }
1258 #[doc = "Channel selection"] 1322 #[doc = "Floating Point Unit interrupts enable bits"]
1259 pub fn set_chsel(&mut self, val: u8) { 1323 pub fn set_fpu_ie(&mut self, val: u8) {
1260 self.0 = (self.0 & !(0x0f << 25usize)) | (((val as u32) & 0x0f) << 25usize); 1324 self.0 = (self.0 & !(0x3f << 26usize)) | (((val as u32) & 0x3f) << 26usize);
1261 } 1325 }
1262 } 1326 }
1263 impl Default for Cr { 1327 impl Default for Cfgr1 {
1264 fn default() -> Cr { 1328 fn default() -> Cfgr1 {
1265 Cr(0) 1329 Cfgr1(0)
1266 } 1330 }
1267 } 1331 }
1268 #[doc = "stream x FIFO control register"] 1332 #[doc = "memory remap register"]
1269 #[repr(transparent)] 1333 #[repr(transparent)]
1270 #[derive(Copy, Clone, Eq, PartialEq)] 1334 #[derive(Copy, Clone, Eq, PartialEq)]
1271 pub struct Fcr(pub u32); 1335 pub struct Memrmp(pub u32);
1272 impl Fcr { 1336 impl Memrmp {
1273 #[doc = "FIFO threshold selection"] 1337 #[doc = "Memory mapping selection"]
1274 pub const fn fth(&self) -> super::vals::Fth { 1338 pub const fn mem_mode(&self) -> u8 {
1275 let val = (self.0 >> 0usize) & 0x03; 1339 let val = (self.0 >> 0usize) & 0x07;
1276 super::vals::Fth(val as u8) 1340 val as u8
1277 } 1341 }
1278 #[doc = "FIFO threshold selection"] 1342 #[doc = "Memory mapping selection"]
1279 pub fn set_fth(&mut self, val: super::vals::Fth) { 1343 pub fn set_mem_mode(&mut self, val: u8) {
1280 self.0 = (self.0 & !(0x03 << 0usize)) | (((val.0 as u32) & 0x03) << 0usize); 1344 self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize);
1281 } 1345 }
1282 #[doc = "Direct mode disable"] 1346 #[doc = "QUADSPI memory mapping swap"]
1283 pub const fn dmdis(&self) -> super::vals::Dmdis { 1347 pub const fn qfs(&self) -> bool {
1284 let val = (self.0 >> 2usize) & 0x01; 1348 let val = (self.0 >> 3usize) & 0x01;
1285 super::vals::Dmdis(val as u8) 1349 val != 0
1286 } 1350 }
1287 #[doc = "Direct mode disable"] 1351 #[doc = "QUADSPI memory mapping swap"]
1288 pub fn set_dmdis(&mut self, val: super::vals::Dmdis) { 1352 pub fn set_qfs(&mut self, val: bool) {
1289 self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize); 1353 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
1290 } 1354 }
1291 #[doc = "FIFO status"] 1355 #[doc = "Flash Bank mode selection"]
1292 pub const fn fs(&self) -> super::vals::Fs { 1356 pub const fn fb_mode(&self) -> bool {
1293 let val = (self.0 >> 3usize) & 0x07; 1357 let val = (self.0 >> 8usize) & 0x01;
1294 super::vals::Fs(val as u8) 1358 val != 0
1295 } 1359 }
1296 #[doc = "FIFO status"] 1360 #[doc = "Flash Bank mode selection"]
1297 pub fn set_fs(&mut self, val: super::vals::Fs) { 1361 pub fn set_fb_mode(&mut self, val: bool) {
1298 self.0 = (self.0 & !(0x07 << 3usize)) | (((val.0 as u32) & 0x07) << 3usize); 1362 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
1299 } 1363 }
1300 #[doc = "FIFO error interrupt enable"] 1364 }
1301 pub const fn feie(&self) -> bool { 1365 impl Default for Memrmp {
1302 let val = (self.0 >> 7usize) & 0x01; 1366 fn default() -> Memrmp {
1367 Memrmp(0)
1368 }
1369 }
1370 #[doc = "SCSR"]
1371 #[repr(transparent)]
1372 #[derive(Copy, Clone, Eq, PartialEq)]
1373 pub struct Scsr(pub u32);
1374 impl Scsr {
1375 #[doc = "SRAM2 Erase"]
1376 pub const fn sram2er(&self) -> bool {
1377 let val = (self.0 >> 0usize) & 0x01;
1303 val != 0 1378 val != 0
1304 } 1379 }
1305 #[doc = "FIFO error interrupt enable"] 1380 #[doc = "SRAM2 Erase"]
1306 pub fn set_feie(&mut self, val: bool) { 1381 pub fn set_sram2er(&mut self, val: bool) {
1307 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); 1382 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
1383 }
1384 #[doc = "SRAM2 busy by erase operation"]
1385 pub const fn sram2bsy(&self) -> bool {
1386 let val = (self.0 >> 1usize) & 0x01;
1387 val != 0
1388 }
1389 #[doc = "SRAM2 busy by erase operation"]
1390 pub fn set_sram2bsy(&mut self, val: bool) {
1391 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
1308 } 1392 }
1309 } 1393 }
1310 impl Default for Fcr { 1394 impl Default for Scsr {
1311 fn default() -> Fcr { 1395 fn default() -> Scsr {
1312 Fcr(0) 1396 Scsr(0)
1313 } 1397 }
1314 } 1398 }
1315 #[doc = "low interrupt status register"] 1399 #[doc = "SKR"]
1316 #[repr(transparent)] 1400 #[repr(transparent)]
1317 #[derive(Copy, Clone, Eq, PartialEq)] 1401 #[derive(Copy, Clone, Eq, PartialEq)]
1318 pub struct Isr(pub u32); 1402 pub struct Skr(pub u32);
1319 impl Isr { 1403 impl Skr {
1320 #[doc = "Stream x FIFO error interrupt flag (x=3..0)"] 1404 #[doc = "SRAM2 write protection key for software erase"]
1321 pub fn feif(&self, n: usize) -> bool { 1405 pub const fn key(&self) -> u8 {
1322 assert!(n < 4usize); 1406 let val = (self.0 >> 0usize) & 0xff;
1323 let offs = 0usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); 1407 val as u8
1324 let val = (self.0 >> offs) & 0x01; 1408 }
1409 #[doc = "SRAM2 write protection key for software erase"]
1410 pub fn set_key(&mut self, val: u8) {
1411 self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize);
1412 }
1413 }
1414 impl Default for Skr {
1415 fn default() -> Skr {
1416 Skr(0)
1417 }
1418 }
1419 #[doc = "CFGR2"]
1420 #[repr(transparent)]
1421 #[derive(Copy, Clone, Eq, PartialEq)]
1422 pub struct Cfgr2(pub u32);
1423 impl Cfgr2 {
1424 #[doc = "Cortex LOCKUP (Hardfault) output enable bit"]
1425 pub const fn cll(&self) -> bool {
1426 let val = (self.0 >> 0usize) & 0x01;
1325 val != 0 1427 val != 0
1326 } 1428 }
1327 #[doc = "Stream x FIFO error interrupt flag (x=3..0)"] 1429 #[doc = "Cortex LOCKUP (Hardfault) output enable bit"]
1328 pub fn set_feif(&mut self, n: usize, val: bool) { 1430 pub fn set_cll(&mut self, val: bool) {
1329 assert!(n < 4usize); 1431 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
1330 let offs = 0usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
1331 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
1332 } 1432 }
1333 #[doc = "Stream x direct mode error interrupt flag (x=3..0)"] 1433 #[doc = "SRAM2 parity lock bit"]
1334 pub fn dmeif(&self, n: usize) -> bool { 1434 pub const fn spl(&self) -> bool {
1335 assert!(n < 4usize); 1435 let val = (self.0 >> 1usize) & 0x01;
1336 let offs = 2usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
1337 let val = (self.0 >> offs) & 0x01;
1338 val != 0 1436 val != 0
1339 } 1437 }
1340 #[doc = "Stream x direct mode error interrupt flag (x=3..0)"] 1438 #[doc = "SRAM2 parity lock bit"]
1341 pub fn set_dmeif(&mut self, n: usize, val: bool) { 1439 pub fn set_spl(&mut self, val: bool) {
1342 assert!(n < 4usize); 1440 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
1343 let offs = 2usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
1344 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
1345 } 1441 }
1346 #[doc = "Stream x transfer error interrupt flag (x=3..0)"] 1442 #[doc = "PVD lock enable bit"]
1347 pub fn teif(&self, n: usize) -> bool { 1443 pub const fn pvdl(&self) -> bool {
1348 assert!(n < 4usize); 1444 let val = (self.0 >> 2usize) & 0x01;
1349 let offs = 3usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
1350 let val = (self.0 >> offs) & 0x01;
1351 val != 0 1445 val != 0
1352 } 1446 }
1353 #[doc = "Stream x transfer error interrupt flag (x=3..0)"] 1447 #[doc = "PVD lock enable bit"]
1354 pub fn set_teif(&mut self, n: usize, val: bool) { 1448 pub fn set_pvdl(&mut self, val: bool) {
1355 assert!(n < 4usize); 1449 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
1356 let offs = 3usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
1357 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
1358 } 1450 }
1359 #[doc = "Stream x half transfer interrupt flag (x=3..0)"] 1451 #[doc = "ECC Lock"]
1360 pub fn htif(&self, n: usize) -> bool { 1452 pub const fn eccl(&self) -> bool {
1361 assert!(n < 4usize); 1453 let val = (self.0 >> 3usize) & 0x01;
1362 let offs = 4usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
1363 let val = (self.0 >> offs) & 0x01;
1364 val != 0 1454 val != 0
1365 } 1455 }
1366 #[doc = "Stream x half transfer interrupt flag (x=3..0)"] 1456 #[doc = "ECC Lock"]
1367 pub fn set_htif(&mut self, n: usize, val: bool) { 1457 pub fn set_eccl(&mut self, val: bool) {
1368 assert!(n < 4usize); 1458 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
1369 let offs = 4usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
1370 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
1371 } 1459 }
1372 #[doc = "Stream x transfer complete interrupt flag (x = 3..0)"] 1460 #[doc = "SRAM2 parity error flag"]
1373 pub fn tcif(&self, n: usize) -> bool { 1461 pub const fn spf(&self) -> bool {
1374 assert!(n < 4usize); 1462 let val = (self.0 >> 8usize) & 0x01;
1375 let offs = 5usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
1376 let val = (self.0 >> offs) & 0x01;
1377 val != 0 1463 val != 0
1378 } 1464 }
1379 #[doc = "Stream x transfer complete interrupt flag (x = 3..0)"] 1465 #[doc = "SRAM2 parity error flag"]
1380 pub fn set_tcif(&mut self, n: usize, val: bool) { 1466 pub fn set_spf(&mut self, val: bool) {
1381 assert!(n < 4usize); 1467 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
1382 let offs = 5usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
1383 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
1384 } 1468 }
1385 } 1469 }
1386 impl Default for Isr { 1470 impl Default for Cfgr2 {
1387 fn default() -> Isr { 1471 fn default() -> Cfgr2 {
1388 Isr(0) 1472 Cfgr2(0)
1389 } 1473 }
1390 } 1474 }
1391 } 1475 }
@@ -1436,214 +1520,54 @@ pub mod gpio_v2 {
1436 unsafe { Reg::from_ptr(self.0.add(32usize + n * 4usize)) } 1520 unsafe { Reg::from_ptr(self.0.add(32usize + n * 4usize)) }
1437 } 1521 }
1438 } 1522 }
1439 pub mod vals {
1440 use crate::generic::*;
1441 #[repr(transparent)]
1442 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1443 pub struct Lckk(pub u8);
1444 impl Lckk {
1445 #[doc = "Port configuration lock key not active"]
1446 pub const NOTACTIVE: Self = Self(0);
1447 #[doc = "Port configuration lock key active"]
1448 pub const ACTIVE: Self = Self(0x01);
1449 }
1450 #[repr(transparent)]
1451 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1452 pub struct Afr(pub u8);
1453 impl Afr {
1454 #[doc = "AF0"]
1455 pub const AF0: Self = Self(0);
1456 #[doc = "AF1"]
1457 pub const AF1: Self = Self(0x01);
1458 #[doc = "AF2"]
1459 pub const AF2: Self = Self(0x02);
1460 #[doc = "AF3"]
1461 pub const AF3: Self = Self(0x03);
1462 #[doc = "AF4"]
1463 pub const AF4: Self = Self(0x04);
1464 #[doc = "AF5"]
1465 pub const AF5: Self = Self(0x05);
1466 #[doc = "AF6"]
1467 pub const AF6: Self = Self(0x06);
1468 #[doc = "AF7"]
1469 pub const AF7: Self = Self(0x07);
1470 #[doc = "AF8"]
1471 pub const AF8: Self = Self(0x08);
1472 #[doc = "AF9"]
1473 pub const AF9: Self = Self(0x09);
1474 #[doc = "AF10"]
1475 pub const AF10: Self = Self(0x0a);
1476 #[doc = "AF11"]
1477 pub const AF11: Self = Self(0x0b);
1478 #[doc = "AF12"]
1479 pub const AF12: Self = Self(0x0c);
1480 #[doc = "AF13"]
1481 pub const AF13: Self = Self(0x0d);
1482 #[doc = "AF14"]
1483 pub const AF14: Self = Self(0x0e);
1484 #[doc = "AF15"]
1485 pub const AF15: Self = Self(0x0f);
1486 }
1487 #[repr(transparent)]
1488 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1489 pub struct Brw(pub u8);
1490 impl Brw {
1491 #[doc = "Resets the corresponding ODRx bit"]
1492 pub const RESET: Self = Self(0x01);
1493 }
1494 #[repr(transparent)]
1495 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1496 pub struct Ospeedr(pub u8);
1497 impl Ospeedr {
1498 #[doc = "Low speed"]
1499 pub const LOWSPEED: Self = Self(0);
1500 #[doc = "Medium speed"]
1501 pub const MEDIUMSPEED: Self = Self(0x01);
1502 #[doc = "High speed"]
1503 pub const HIGHSPEED: Self = Self(0x02);
1504 #[doc = "Very high speed"]
1505 pub const VERYHIGHSPEED: Self = Self(0x03);
1506 }
1507 #[repr(transparent)]
1508 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1509 pub struct Idr(pub u8);
1510 impl Idr {
1511 #[doc = "Input is logic low"]
1512 pub const LOW: Self = Self(0);
1513 #[doc = "Input is logic high"]
1514 pub const HIGH: Self = Self(0x01);
1515 }
1516 #[repr(transparent)]
1517 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1518 pub struct Ot(pub u8);
1519 impl Ot {
1520 #[doc = "Output push-pull (reset state)"]
1521 pub const PUSHPULL: Self = Self(0);
1522 #[doc = "Output open-drain"]
1523 pub const OPENDRAIN: Self = Self(0x01);
1524 }
1525 #[repr(transparent)]
1526 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1527 pub struct Pupdr(pub u8);
1528 impl Pupdr {
1529 #[doc = "No pull-up, pull-down"]
1530 pub const FLOATING: Self = Self(0);
1531 #[doc = "Pull-up"]
1532 pub const PULLUP: Self = Self(0x01);
1533 #[doc = "Pull-down"]
1534 pub const PULLDOWN: Self = Self(0x02);
1535 }
1536 #[repr(transparent)]
1537 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1538 pub struct Moder(pub u8);
1539 impl Moder {
1540 #[doc = "Input mode (reset state)"]
1541 pub const INPUT: Self = Self(0);
1542 #[doc = "General purpose output mode"]
1543 pub const OUTPUT: Self = Self(0x01);
1544 #[doc = "Alternate function mode"]
1545 pub const ALTERNATE: Self = Self(0x02);
1546 #[doc = "Analog mode"]
1547 pub const ANALOG: Self = Self(0x03);
1548 }
1549 #[repr(transparent)]
1550 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1551 pub struct Bsw(pub u8);
1552 impl Bsw {
1553 #[doc = "Sets the corresponding ODRx bit"]
1554 pub const SET: Self = Self(0x01);
1555 }
1556 #[repr(transparent)]
1557 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1558 pub struct Lck(pub u8);
1559 impl Lck {
1560 #[doc = "Port configuration not locked"]
1561 pub const UNLOCKED: Self = Self(0);
1562 #[doc = "Port configuration locked"]
1563 pub const LOCKED: Self = Self(0x01);
1564 }
1565 #[repr(transparent)]
1566 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1567 pub struct Odr(pub u8);
1568 impl Odr {
1569 #[doc = "Set output to logic low"]
1570 pub const LOW: Self = Self(0);
1571 #[doc = "Set output to logic high"]
1572 pub const HIGH: Self = Self(0x01);
1573 }
1574 }
1575 pub mod regs { 1523 pub mod regs {
1576 use crate::generic::*; 1524 use crate::generic::*;
1577 #[doc = "GPIO port output speed register"] 1525 #[doc = "GPIO port output data register"]
1578 #[repr(transparent)]
1579 #[derive(Copy, Clone, Eq, PartialEq)]
1580 pub struct Ospeedr(pub u32);
1581 impl Ospeedr {
1582 #[doc = "Port x configuration bits (y = 0..15)"]
1583 pub fn ospeedr(&self, n: usize) -> super::vals::Ospeedr {
1584 assert!(n < 16usize);
1585 let offs = 0usize + n * 2usize;
1586 let val = (self.0 >> offs) & 0x03;
1587 super::vals::Ospeedr(val as u8)
1588 }
1589 #[doc = "Port x configuration bits (y = 0..15)"]
1590 pub fn set_ospeedr(&mut self, n: usize, val: super::vals::Ospeedr) {
1591 assert!(n < 16usize);
1592 let offs = 0usize + n * 2usize;
1593 self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs);
1594 }
1595 }
1596 impl Default for Ospeedr {
1597 fn default() -> Ospeedr {
1598 Ospeedr(0)
1599 }
1600 }
1601 #[doc = "GPIO port input data register"]
1602 #[repr(transparent)] 1526 #[repr(transparent)]
1603 #[derive(Copy, Clone, Eq, PartialEq)] 1527 #[derive(Copy, Clone, Eq, PartialEq)]
1604 pub struct Idr(pub u32); 1528 pub struct Odr(pub u32);
1605 impl Idr { 1529 impl Odr {
1606 #[doc = "Port input data (y = 0..15)"] 1530 #[doc = "Port output data (y = 0..15)"]
1607 pub fn idr(&self, n: usize) -> super::vals::Idr { 1531 pub fn odr(&self, n: usize) -> super::vals::Odr {
1608 assert!(n < 16usize); 1532 assert!(n < 16usize);
1609 let offs = 0usize + n * 1usize; 1533 let offs = 0usize + n * 1usize;
1610 let val = (self.0 >> offs) & 0x01; 1534 let val = (self.0 >> offs) & 0x01;
1611 super::vals::Idr(val as u8) 1535 super::vals::Odr(val as u8)
1612 } 1536 }
1613 #[doc = "Port input data (y = 0..15)"] 1537 #[doc = "Port output data (y = 0..15)"]
1614 pub fn set_idr(&mut self, n: usize, val: super::vals::Idr) { 1538 pub fn set_odr(&mut self, n: usize, val: super::vals::Odr) {
1615 assert!(n < 16usize); 1539 assert!(n < 16usize);
1616 let offs = 0usize + n * 1usize; 1540 let offs = 0usize + n * 1usize;
1617 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); 1541 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs);
1618 } 1542 }
1619 } 1543 }
1620 impl Default for Idr { 1544 impl Default for Odr {
1621 fn default() -> Idr { 1545 fn default() -> Odr {
1622 Idr(0) 1546 Odr(0)
1623 } 1547 }
1624 } 1548 }
1625 #[doc = "GPIO port pull-up/pull-down register"] 1549 #[doc = "GPIO alternate function register"]
1626 #[repr(transparent)] 1550 #[repr(transparent)]
1627 #[derive(Copy, Clone, Eq, PartialEq)] 1551 #[derive(Copy, Clone, Eq, PartialEq)]
1628 pub struct Pupdr(pub u32); 1552 pub struct Afr(pub u32);
1629 impl Pupdr { 1553 impl Afr {
1630 #[doc = "Port x configuration bits (y = 0..15)"] 1554 #[doc = "Alternate function selection for port x bit y (y = 0..15)"]
1631 pub fn pupdr(&self, n: usize) -> super::vals::Pupdr { 1555 pub fn afr(&self, n: usize) -> super::vals::Afr {
1632 assert!(n < 16usize); 1556 assert!(n < 8usize);
1633 let offs = 0usize + n * 2usize; 1557 let offs = 0usize + n * 4usize;
1634 let val = (self.0 >> offs) & 0x03; 1558 let val = (self.0 >> offs) & 0x0f;
1635 super::vals::Pupdr(val as u8) 1559 super::vals::Afr(val as u8)
1636 } 1560 }
1637 #[doc = "Port x configuration bits (y = 0..15)"] 1561 #[doc = "Alternate function selection for port x bit y (y = 0..15)"]
1638 pub fn set_pupdr(&mut self, n: usize, val: super::vals::Pupdr) { 1562 pub fn set_afr(&mut self, n: usize, val: super::vals::Afr) {
1639 assert!(n < 16usize); 1563 assert!(n < 8usize);
1640 let offs = 0usize + n * 2usize; 1564 let offs = 0usize + n * 4usize;
1641 self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs); 1565 self.0 = (self.0 & !(0x0f << offs)) | (((val.0 as u32) & 0x0f) << offs);
1642 } 1566 }
1643 } 1567 }
1644 impl Default for Pupdr { 1568 impl Default for Afr {
1645 fn default() -> Pupdr { 1569 fn default() -> Afr {
1646 Pupdr(0) 1570 Afr(0)
1647 } 1571 }
1648 } 1572 }
1649 #[doc = "GPIO port bit set/reset register"] 1573 #[doc = "GPIO port bit set/reset register"]
@@ -1683,28 +1607,85 @@ pub mod gpio_v2 {
1683 Bsrr(0) 1607 Bsrr(0)
1684 } 1608 }
1685 } 1609 }
1686 #[doc = "GPIO port output type register"] 1610 #[doc = "GPIO port output speed register"]
1687 #[repr(transparent)] 1611 #[repr(transparent)]
1688 #[derive(Copy, Clone, Eq, PartialEq)] 1612 #[derive(Copy, Clone, Eq, PartialEq)]
1689 pub struct Otyper(pub u32); 1613 pub struct Ospeedr(pub u32);
1690 impl Otyper { 1614 impl Ospeedr {
1691 #[doc = "Port x configuration bits (y = 0..15)"] 1615 #[doc = "Port x configuration bits (y = 0..15)"]
1692 pub fn ot(&self, n: usize) -> super::vals::Ot { 1616 pub fn ospeedr(&self, n: usize) -> super::vals::Ospeedr {
1617 assert!(n < 16usize);
1618 let offs = 0usize + n * 2usize;
1619 let val = (self.0 >> offs) & 0x03;
1620 super::vals::Ospeedr(val as u8)
1621 }
1622 #[doc = "Port x configuration bits (y = 0..15)"]
1623 pub fn set_ospeedr(&mut self, n: usize, val: super::vals::Ospeedr) {
1624 assert!(n < 16usize);
1625 let offs = 0usize + n * 2usize;
1626 self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs);
1627 }
1628 }
1629 impl Default for Ospeedr {
1630 fn default() -> Ospeedr {
1631 Ospeedr(0)
1632 }
1633 }
1634 #[doc = "GPIO port configuration lock register"]
1635 #[repr(transparent)]
1636 #[derive(Copy, Clone, Eq, PartialEq)]
1637 pub struct Lckr(pub u32);
1638 impl Lckr {
1639 #[doc = "Port x lock bit y (y= 0..15)"]
1640 pub fn lck(&self, n: usize) -> super::vals::Lck {
1693 assert!(n < 16usize); 1641 assert!(n < 16usize);
1694 let offs = 0usize + n * 1usize; 1642 let offs = 0usize + n * 1usize;
1695 let val = (self.0 >> offs) & 0x01; 1643 let val = (self.0 >> offs) & 0x01;
1696 super::vals::Ot(val as u8) 1644 super::vals::Lck(val as u8)
1697 } 1645 }
1698 #[doc = "Port x configuration bits (y = 0..15)"] 1646 #[doc = "Port x lock bit y (y= 0..15)"]
1699 pub fn set_ot(&mut self, n: usize, val: super::vals::Ot) { 1647 pub fn set_lck(&mut self, n: usize, val: super::vals::Lck) {
1700 assert!(n < 16usize); 1648 assert!(n < 16usize);
1701 let offs = 0usize + n * 1usize; 1649 let offs = 0usize + n * 1usize;
1702 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); 1650 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs);
1703 } 1651 }
1652 #[doc = "Port x lock bit y (y= 0..15)"]
1653 pub const fn lckk(&self) -> super::vals::Lckk {
1654 let val = (self.0 >> 16usize) & 0x01;
1655 super::vals::Lckk(val as u8)
1656 }
1657 #[doc = "Port x lock bit y (y= 0..15)"]
1658 pub fn set_lckk(&mut self, val: super::vals::Lckk) {
1659 self.0 = (self.0 & !(0x01 << 16usize)) | (((val.0 as u32) & 0x01) << 16usize);
1660 }
1704 } 1661 }
1705 impl Default for Otyper { 1662 impl Default for Lckr {
1706 fn default() -> Otyper { 1663 fn default() -> Lckr {
1707 Otyper(0) 1664 Lckr(0)
1665 }
1666 }
1667 #[doc = "GPIO port input data register"]
1668 #[repr(transparent)]
1669 #[derive(Copy, Clone, Eq, PartialEq)]
1670 pub struct Idr(pub u32);
1671 impl Idr {
1672 #[doc = "Port input data (y = 0..15)"]
1673 pub fn idr(&self, n: usize) -> super::vals::Idr {
1674 assert!(n < 16usize);
1675 let offs = 0usize + n * 1usize;
1676 let val = (self.0 >> offs) & 0x01;
1677 super::vals::Idr(val as u8)
1678 }
1679 #[doc = "Port input data (y = 0..15)"]
1680 pub fn set_idr(&mut self, n: usize, val: super::vals::Idr) {
1681 assert!(n < 16usize);
1682 let offs = 0usize + n * 1usize;
1683 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs);
1684 }
1685 }
1686 impl Default for Idr {
1687 fn default() -> Idr {
1688 Idr(0)
1708 } 1689 }
1709 } 1690 }
1710 #[doc = "GPIO port mode register"] 1691 #[doc = "GPIO port mode register"]
@@ -1731,2484 +1712,2614 @@ pub mod gpio_v2 {
1731 Moder(0) 1712 Moder(0)
1732 } 1713 }
1733 } 1714 }
1734 #[doc = "GPIO alternate function register"] 1715 #[doc = "GPIO port pull-up/pull-down register"]
1735 #[repr(transparent)]
1736 #[derive(Copy, Clone, Eq, PartialEq)]
1737 pub struct Afr(pub u32);
1738 impl Afr {
1739 #[doc = "Alternate function selection for port x bit y (y = 0..15)"]
1740 pub fn afr(&self, n: usize) -> super::vals::Afr {
1741 assert!(n < 8usize);
1742 let offs = 0usize + n * 4usize;
1743 let val = (self.0 >> offs) & 0x0f;
1744 super::vals::Afr(val as u8)
1745 }
1746 #[doc = "Alternate function selection for port x bit y (y = 0..15)"]
1747 pub fn set_afr(&mut self, n: usize, val: super::vals::Afr) {
1748 assert!(n < 8usize);
1749 let offs = 0usize + n * 4usize;
1750 self.0 = (self.0 & !(0x0f << offs)) | (((val.0 as u32) & 0x0f) << offs);
1751 }
1752 }
1753 impl Default for Afr {
1754 fn default() -> Afr {
1755 Afr(0)
1756 }
1757 }
1758 #[doc = "GPIO port output data register"]
1759 #[repr(transparent)] 1716 #[repr(transparent)]
1760 #[derive(Copy, Clone, Eq, PartialEq)] 1717 #[derive(Copy, Clone, Eq, PartialEq)]
1761 pub struct Odr(pub u32); 1718 pub struct Pupdr(pub u32);
1762 impl Odr { 1719 impl Pupdr {
1763 #[doc = "Port output data (y = 0..15)"] 1720 #[doc = "Port x configuration bits (y = 0..15)"]
1764 pub fn odr(&self, n: usize) -> super::vals::Odr { 1721 pub fn pupdr(&self, n: usize) -> super::vals::Pupdr {
1765 assert!(n < 16usize); 1722 assert!(n < 16usize);
1766 let offs = 0usize + n * 1usize; 1723 let offs = 0usize + n * 2usize;
1767 let val = (self.0 >> offs) & 0x01; 1724 let val = (self.0 >> offs) & 0x03;
1768 super::vals::Odr(val as u8) 1725 super::vals::Pupdr(val as u8)
1769 } 1726 }
1770 #[doc = "Port output data (y = 0..15)"] 1727 #[doc = "Port x configuration bits (y = 0..15)"]
1771 pub fn set_odr(&mut self, n: usize, val: super::vals::Odr) { 1728 pub fn set_pupdr(&mut self, n: usize, val: super::vals::Pupdr) {
1772 assert!(n < 16usize); 1729 assert!(n < 16usize);
1773 let offs = 0usize + n * 1usize; 1730 let offs = 0usize + n * 2usize;
1774 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); 1731 self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs);
1775 } 1732 }
1776 } 1733 }
1777 impl Default for Odr { 1734 impl Default for Pupdr {
1778 fn default() -> Odr { 1735 fn default() -> Pupdr {
1779 Odr(0) 1736 Pupdr(0)
1780 } 1737 }
1781 } 1738 }
1782 #[doc = "GPIO port configuration lock register"] 1739 #[doc = "GPIO port output type register"]
1783 #[repr(transparent)] 1740 #[repr(transparent)]
1784 #[derive(Copy, Clone, Eq, PartialEq)] 1741 #[derive(Copy, Clone, Eq, PartialEq)]
1785 pub struct Lckr(pub u32); 1742 pub struct Otyper(pub u32);
1786 impl Lckr { 1743 impl Otyper {
1787 #[doc = "Port x lock bit y (y= 0..15)"] 1744 #[doc = "Port x configuration bits (y = 0..15)"]
1788 pub fn lck(&self, n: usize) -> super::vals::Lck { 1745 pub fn ot(&self, n: usize) -> super::vals::Ot {
1789 assert!(n < 16usize); 1746 assert!(n < 16usize);
1790 let offs = 0usize + n * 1usize; 1747 let offs = 0usize + n * 1usize;
1791 let val = (self.0 >> offs) & 0x01; 1748 let val = (self.0 >> offs) & 0x01;
1792 super::vals::Lck(val as u8) 1749 super::vals::Ot(val as u8)
1793 } 1750 }
1794 #[doc = "Port x lock bit y (y= 0..15)"] 1751 #[doc = "Port x configuration bits (y = 0..15)"]
1795 pub fn set_lck(&mut self, n: usize, val: super::vals::Lck) { 1752 pub fn set_ot(&mut self, n: usize, val: super::vals::Ot) {
1796 assert!(n < 16usize); 1753 assert!(n < 16usize);
1797 let offs = 0usize + n * 1usize; 1754 let offs = 0usize + n * 1usize;
1798 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); 1755 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs);
1799 } 1756 }
1800 #[doc = "Port x lock bit y (y= 0..15)"]
1801 pub const fn lckk(&self) -> super::vals::Lckk {
1802 let val = (self.0 >> 16usize) & 0x01;
1803 super::vals::Lckk(val as u8)
1804 }
1805 #[doc = "Port x lock bit y (y= 0..15)"]
1806 pub fn set_lckk(&mut self, val: super::vals::Lckk) {
1807 self.0 = (self.0 & !(0x01 << 16usize)) | (((val.0 as u32) & 0x01) << 16usize);
1808 }
1809 } 1757 }
1810 impl Default for Lckr { 1758 impl Default for Otyper {
1811 fn default() -> Lckr { 1759 fn default() -> Otyper {
1812 Lckr(0) 1760 Otyper(0)
1813 } 1761 }
1814 } 1762 }
1815 } 1763 }
1816} 1764 pub mod vals {
1817pub mod timer_v1 { 1765 use crate::generic::*;
1818 use crate::generic::*; 1766 #[repr(transparent)]
1819 #[doc = "General purpose 16-bit timer"] 1767 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1820 #[derive(Copy, Clone)] 1768 pub struct Pupdr(pub u8);
1821 pub struct TimGp16(pub *mut u8); 1769 impl Pupdr {
1822 unsafe impl Send for TimGp16 {} 1770 #[doc = "No pull-up, pull-down"]
1823 unsafe impl Sync for TimGp16 {} 1771 pub const FLOATING: Self = Self(0);
1824 impl TimGp16 { 1772 #[doc = "Pull-up"]
1825 #[doc = "control register 1"] 1773 pub const PULLUP: Self = Self(0x01);
1826 pub fn cr1(self) -> Reg<regs::Cr1Gp, RW> { 1774 #[doc = "Pull-down"]
1827 unsafe { Reg::from_ptr(self.0.add(0usize)) } 1775 pub const PULLDOWN: Self = Self(0x02);
1828 }
1829 #[doc = "control register 2"]
1830 pub fn cr2(self) -> Reg<regs::Cr2Gp, RW> {
1831 unsafe { Reg::from_ptr(self.0.add(4usize)) }
1832 }
1833 #[doc = "slave mode control register"]
1834 pub fn smcr(self) -> Reg<regs::Smcr, RW> {
1835 unsafe { Reg::from_ptr(self.0.add(8usize)) }
1836 }
1837 #[doc = "DMA/Interrupt enable register"]
1838 pub fn dier(self) -> Reg<regs::DierGp, RW> {
1839 unsafe { Reg::from_ptr(self.0.add(12usize)) }
1840 }
1841 #[doc = "status register"]
1842 pub fn sr(self) -> Reg<regs::SrGp, RW> {
1843 unsafe { Reg::from_ptr(self.0.add(16usize)) }
1844 } 1776 }
1845 #[doc = "event generation register"] 1777 #[repr(transparent)]
1846 pub fn egr(self) -> Reg<regs::EgrGp, W> { 1778 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1847 unsafe { Reg::from_ptr(self.0.add(20usize)) } 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);
1848 } 1785 }
1849 #[doc = "capture/compare mode register 1 (input mode)"] 1786 #[repr(transparent)]
1850 pub fn ccmr_input(self, n: usize) -> Reg<regs::CcmrInput, RW> { 1787 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1851 assert!(n < 2usize); 1788 pub struct Afr(pub u8);
1852 unsafe { Reg::from_ptr(self.0.add(24usize + n * 4usize)) } 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);
1853 } 1822 }
1854 #[doc = "capture/compare mode register 1 (output mode)"] 1823 #[repr(transparent)]
1855 pub fn ccmr_output(self, n: usize) -> Reg<regs::CcmrOutput, RW> { 1824 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1856 assert!(n < 2usize); 1825 pub struct Brw(pub u8);
1857 unsafe { Reg::from_ptr(self.0.add(24usize + n * 4usize)) } 1826 impl Brw {
1827 #[doc = "Resets the corresponding ODRx bit"]
1828 pub const RESET: Self = Self(0x01);
1858 } 1829 }
1859 #[doc = "capture/compare enable register"] 1830 #[repr(transparent)]
1860 pub fn ccer(self) -> Reg<regs::CcerGp, RW> { 1831 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1861 unsafe { Reg::from_ptr(self.0.add(32usize)) } 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);
1862 } 1838 }
1863 #[doc = "counter"] 1839 #[repr(transparent)]
1864 pub fn cnt(self) -> Reg<regs::Cnt16, RW> { 1840 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1865 unsafe { Reg::from_ptr(self.0.add(36usize)) } 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);
1866 } 1851 }
1867 #[doc = "prescaler"] 1852 #[repr(transparent)]
1868 pub fn psc(self) -> Reg<regs::Psc, RW> { 1853 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1869 unsafe { Reg::from_ptr(self.0.add(40usize)) } 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);
1870 } 1860 }
1871 #[doc = "auto-reload register"] 1861 #[repr(transparent)]
1872 pub fn arr(self) -> Reg<regs::Arr16, RW> { 1862 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1873 unsafe { Reg::from_ptr(self.0.add(44usize)) } 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);
1874 } 1873 }
1875 #[doc = "capture/compare register"] 1874 #[repr(transparent)]
1876 pub fn ccr(self, n: usize) -> Reg<regs::Ccr16, RW> { 1875 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1877 assert!(n < 4usize); 1876 pub struct Bsw(pub u8);
1878 unsafe { Reg::from_ptr(self.0.add(52usize + n * 4usize)) } 1877 impl Bsw {
1878 #[doc = "Sets the corresponding ODRx bit"]
1879 pub const SET: Self = Self(0x01);
1879 } 1880 }
1880 #[doc = "DMA control register"] 1881 #[repr(transparent)]
1881 pub fn dcr(self) -> Reg<regs::Dcr, RW> { 1882 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1882 unsafe { Reg::from_ptr(self.0.add(72usize)) } 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);
1883 } 1889 }
1884 #[doc = "DMA address for full transfer"] 1890 #[repr(transparent)]
1885 pub fn dmar(self) -> Reg<regs::Dmar, RW> { 1891 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
1886 unsafe { Reg::from_ptr(self.0.add(76usize)) } 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);
1887 } 1898 }
1888 } 1899 }
1889 #[doc = "General purpose 32-bit timer"] 1900}
1901pub mod spi_v1 {
1902 use crate::generic::*;
1903 #[doc = "Serial peripheral interface"]
1890 #[derive(Copy, Clone)] 1904 #[derive(Copy, Clone)]
1891 pub struct TimGp32(pub *mut u8); 1905 pub struct Spi(pub *mut u8);
1892 unsafe impl Send for TimGp32 {} 1906 unsafe impl Send for Spi {}
1893 unsafe impl Sync for TimGp32 {} 1907 unsafe impl Sync for Spi {}
1894 impl TimGp32 { 1908 impl Spi {
1895 #[doc = "control register 1"] 1909 #[doc = "control register 1"]
1896 pub fn cr1(self) -> Reg<regs::Cr1Gp, RW> { 1910 pub fn cr1(self) -> Reg<regs::Cr1, RW> {
1897 unsafe { Reg::from_ptr(self.0.add(0usize)) } 1911 unsafe { Reg::from_ptr(self.0.add(0usize)) }
1898 } 1912 }
1899 #[doc = "control register 2"] 1913 #[doc = "control register 2"]
1900 pub fn cr2(self) -> Reg<regs::Cr2Gp, RW> { 1914 pub fn cr2(self) -> Reg<regs::Cr2, RW> {
1901 unsafe { Reg::from_ptr(self.0.add(4usize)) } 1915 unsafe { Reg::from_ptr(self.0.add(4usize)) }
1902 } 1916 }
1903 #[doc = "slave mode control register"]
1904 pub fn smcr(self) -> Reg<regs::Smcr, RW> {
1905 unsafe { Reg::from_ptr(self.0.add(8usize)) }
1906 }
1907 #[doc = "DMA/Interrupt enable register"]
1908 pub fn dier(self) -> Reg<regs::DierGp, RW> {
1909 unsafe { Reg::from_ptr(self.0.add(12usize)) }
1910 }
1911 #[doc = "status register"] 1917 #[doc = "status register"]
1912 pub fn sr(self) -> Reg<regs::SrGp, RW> { 1918 pub fn sr(self) -> Reg<regs::Sr, RW> {
1913 unsafe { Reg::from_ptr(self.0.add(16usize)) } 1919 unsafe { Reg::from_ptr(self.0.add(8usize)) }
1914 }
1915 #[doc = "event generation register"]
1916 pub fn egr(self) -> Reg<regs::EgrGp, W> {
1917 unsafe { Reg::from_ptr(self.0.add(20usize)) }
1918 }
1919 #[doc = "capture/compare mode register 1 (input mode)"]
1920 pub fn ccmr_input(self, n: usize) -> Reg<regs::CcmrInput, RW> {
1921 assert!(n < 2usize);
1922 unsafe { Reg::from_ptr(self.0.add(24usize + n * 4usize)) }
1923 }
1924 #[doc = "capture/compare mode register 1 (output mode)"]
1925 pub fn ccmr_output(self, n: usize) -> Reg<regs::CcmrOutput, RW> {
1926 assert!(n < 2usize);
1927 unsafe { Reg::from_ptr(self.0.add(24usize + n * 4usize)) }
1928 }
1929 #[doc = "capture/compare enable register"]
1930 pub fn ccer(self) -> Reg<regs::CcerGp, RW> {
1931 unsafe { Reg::from_ptr(self.0.add(32usize)) }
1932 }
1933 #[doc = "counter"]
1934 pub fn cnt(self) -> Reg<regs::Cnt32, RW> {
1935 unsafe { Reg::from_ptr(self.0.add(36usize)) }
1936 }
1937 #[doc = "prescaler"]
1938 pub fn psc(self) -> Reg<regs::Psc, RW> {
1939 unsafe { Reg::from_ptr(self.0.add(40usize)) }
1940 }
1941 #[doc = "auto-reload register"]
1942 pub fn arr(self) -> Reg<regs::Arr32, RW> {
1943 unsafe { Reg::from_ptr(self.0.add(44usize)) }
1944 }
1945 #[doc = "capture/compare register"]
1946 pub fn ccr(self, n: usize) -> Reg<regs::Ccr32, RW> {
1947 assert!(n < 4usize);
1948 unsafe { Reg::from_ptr(self.0.add(52usize + n * 4usize)) }
1949 }
1950 #[doc = "DMA control register"]
1951 pub fn dcr(self) -> Reg<regs::Dcr, RW> {
1952 unsafe { Reg::from_ptr(self.0.add(72usize)) }
1953 }
1954 #[doc = "DMA address for full transfer"]
1955 pub fn dmar(self) -> Reg<regs::Dmar, RW> {
1956 unsafe { Reg::from_ptr(self.0.add(76usize)) }
1957 }
1958 }
1959 #[doc = "Basic timer"]
1960 #[derive(Copy, Clone)]
1961 pub struct TimBasic(pub *mut u8);
1962 unsafe impl Send for TimBasic {}
1963 unsafe impl Sync for TimBasic {}
1964 impl TimBasic {
1965 #[doc = "control register 1"]
1966 pub fn cr1(self) -> Reg<regs::Cr1Basic, RW> {
1967 unsafe { Reg::from_ptr(self.0.add(0usize)) }
1968 }
1969 #[doc = "control register 2"]
1970 pub fn cr2(self) -> Reg<regs::Cr2Basic, RW> {
1971 unsafe { Reg::from_ptr(self.0.add(4usize)) }
1972 } 1920 }
1973 #[doc = "DMA/Interrupt enable register"] 1921 #[doc = "data register"]
1974 pub fn dier(self) -> Reg<regs::DierBasic, RW> { 1922 pub fn dr(self) -> Reg<regs::Dr, RW> {
1975 unsafe { Reg::from_ptr(self.0.add(12usize)) } 1923 unsafe { Reg::from_ptr(self.0.add(12usize)) }
1976 } 1924 }
1977 #[doc = "status register"] 1925 #[doc = "CRC polynomial register"]
1978 pub fn sr(self) -> Reg<regs::SrBasic, RW> { 1926 pub fn crcpr(self) -> Reg<regs::Crcpr, RW> {
1979 unsafe { Reg::from_ptr(self.0.add(16usize)) } 1927 unsafe { Reg::from_ptr(self.0.add(16usize)) }
1980 } 1928 }
1981 #[doc = "event generation register"] 1929 #[doc = "RX CRC register"]
1982 pub fn egr(self) -> Reg<regs::EgrBasic, W> { 1930 pub fn rxcrcr(self) -> Reg<regs::Rxcrcr, R> {
1983 unsafe { Reg::from_ptr(self.0.add(20usize)) } 1931 unsafe { Reg::from_ptr(self.0.add(20usize)) }
1984 } 1932 }
1985 #[doc = "counter"] 1933 #[doc = "TX CRC register"]
1986 pub fn cnt(self) -> Reg<regs::Cnt16, RW> { 1934 pub fn txcrcr(self) -> Reg<regs::Txcrcr, R> {
1987 unsafe { Reg::from_ptr(self.0.add(36usize)) } 1935 unsafe { Reg::from_ptr(self.0.add(24usize)) }
1988 }
1989 #[doc = "prescaler"]
1990 pub fn psc(self) -> Reg<regs::Psc, RW> {
1991 unsafe { Reg::from_ptr(self.0.add(40usize)) }
1992 }
1993 #[doc = "auto-reload register"]
1994 pub fn arr(self) -> Reg<regs::Arr16, RW> {
1995 unsafe { Reg::from_ptr(self.0.add(44usize)) }
1996 } 1936 }
1997 } 1937 }
1998 #[doc = "Advanced-timers"] 1938 pub mod vals {
1999 #[derive(Copy, Clone)] 1939 use crate::generic::*;
2000 pub struct TimAdv(pub *mut u8); 1940 #[repr(transparent)]
2001 unsafe impl Send for TimAdv {} 1941 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
2002 unsafe impl Sync for TimAdv {} 1942 pub struct Bidimode(pub u8);
2003 impl TimAdv { 1943 impl Bidimode {
2004 #[doc = "control register 1"] 1944 #[doc = "2-line unidirectional data mode selected"]
2005 pub fn cr1(self) -> Reg<regs::Cr1Gp, RW> { 1945 pub const UNIDIRECTIONAL: Self = Self(0);
2006 unsafe { Reg::from_ptr(self.0.add(0usize)) } 1946 #[doc = "1-line bidirectional data mode selected"]
2007 } 1947 pub const BIDIRECTIONAL: Self = Self(0x01);
2008 #[doc = "control register 2"]
2009 pub fn cr2(self) -> Reg<regs::Cr2Adv, RW> {
2010 unsafe { Reg::from_ptr(self.0.add(4usize)) }
2011 }
2012 #[doc = "slave mode control register"]
2013 pub fn smcr(self) -> Reg<regs::Smcr, RW> {
2014 unsafe { Reg::from_ptr(self.0.add(8usize)) }
2015 }
2016 #[doc = "DMA/Interrupt enable register"]
2017 pub fn dier(self) -> Reg<regs::DierAdv, RW> {
2018 unsafe { Reg::from_ptr(self.0.add(12usize)) }
2019 }
2020 #[doc = "status register"]
2021 pub fn sr(self) -> Reg<regs::SrAdv, RW> {
2022 unsafe { Reg::from_ptr(self.0.add(16usize)) }
2023 } 1948 }
2024 #[doc = "event generation register"] 1949 #[repr(transparent)]
2025 pub fn egr(self) -> Reg<regs::EgrAdv, W> { 1950 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
2026 unsafe { Reg::from_ptr(self.0.add(20usize)) } 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);
2027 } 1961 }
2028 #[doc = "capture/compare mode register 1 (input mode)"] 1962 #[repr(transparent)]
2029 pub fn ccmr_input(self, n: usize) -> Reg<regs::CcmrInput, RW> { 1963 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
2030 assert!(n < 2usize); 1964 pub struct Dff(pub u8);
2031 unsafe { Reg::from_ptr(self.0.add(24usize + n * 4usize)) } 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);
2032 } 1970 }
2033 #[doc = "capture/compare mode register 1 (output mode)"] 1971 #[repr(transparent)]
2034 pub fn ccmr_output(self, n: usize) -> Reg<regs::CcmrOutput, RW> { 1972 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
2035 assert!(n < 2usize); 1973 pub struct Bidioe(pub u8);
2036 unsafe { Reg::from_ptr(self.0.add(24usize + n * 4usize)) } 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);
2037 } 1979 }
2038 #[doc = "capture/compare enable register"] 1980 #[repr(transparent)]
2039 pub fn ccer(self) -> Reg<regs::CcerAdv, RW> { 1981 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
2040 unsafe { Reg::from_ptr(self.0.add(32usize)) } 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);
2041 } 1988 }
2042 #[doc = "counter"] 1989 #[repr(transparent)]
2043 pub fn cnt(self) -> Reg<regs::Cnt16, RW> { 1990 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
2044 unsafe { Reg::from_ptr(self.0.add(36usize)) } 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);
2045 } 1997 }
2046 #[doc = "prescaler"] 1998 #[repr(transparent)]
2047 pub fn psc(self) -> Reg<regs::Psc, RW> { 1999 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
2048 unsafe { Reg::from_ptr(self.0.add(40usize)) } 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);
2049 } 2006 }
2050 #[doc = "auto-reload register"] 2007 #[repr(transparent)]
2051 pub fn arr(self) -> Reg<regs::Arr16, RW> { 2008 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
2052 unsafe { Reg::from_ptr(self.0.add(44usize)) } 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);
2053 } 2015 }
2054 #[doc = "repetition counter register"] 2016 #[repr(transparent)]
2055 pub fn rcr(self) -> Reg<regs::Rcr, RW> { 2017 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
2056 unsafe { Reg::from_ptr(self.0.add(48usize)) } 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);
2057 } 2024 }
2058 #[doc = "capture/compare register"] 2025 #[repr(transparent)]
2059 pub fn ccr(self, n: usize) -> Reg<regs::Ccr16, RW> { 2026 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
2060 assert!(n < 4usize); 2027 pub struct Lsbfirst(pub u8);
2061 unsafe { Reg::from_ptr(self.0.add(52usize + n * 4usize)) } 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);
2062 } 2033 }
2063 #[doc = "break and dead-time register"] 2034 #[repr(transparent)]
2064 pub fn bdtr(self) -> Reg<regs::Bdtr, RW> { 2035 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
2065 unsafe { Reg::from_ptr(self.0.add(68usize)) } 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);
2066 } 2054 }
2067 #[doc = "DMA control register"] 2055 #[repr(transparent)]
2068 pub fn dcr(self) -> Reg<regs::Dcr, RW> { 2056 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
2069 unsafe { Reg::from_ptr(self.0.add(72usize)) } 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);
2070 } 2063 }
2071 #[doc = "DMA address for full transfer"] 2064 #[repr(transparent)]
2072 pub fn dmar(self) -> Reg<regs::Dmar, RW> { 2065 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
2073 unsafe { Reg::from_ptr(self.0.add(76usize)) } 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);
2074 } 2072 }
2075 } 2073 }
2076 pub mod regs { 2074 pub mod regs {
2077 use crate::generic::*; 2075 use crate::generic::*;
2078 #[doc = "counter"] 2076 #[doc = "control register 1"]
2079 #[repr(transparent)] 2077 #[repr(transparent)]
2080 #[derive(Copy, Clone, Eq, PartialEq)] 2078 #[derive(Copy, Clone, Eq, PartialEq)]
2081 pub struct Cnt32(pub u32); 2079 pub struct Cr1(pub u32);
2082 impl Cnt32 { 2080 impl Cr1 {
2083 #[doc = "counter value"] 2081 #[doc = "Clock phase"]
2084 pub const fn cnt(&self) -> u32 { 2082 pub const fn cpha(&self) -> super::vals::Cpha {
2085 let val = (self.0 >> 0usize) & 0xffff_ffff; 2083 let val = (self.0 >> 0usize) & 0x01;
2086 val as u32 2084 super::vals::Cpha(val as u8)
2087 } 2085 }
2088 #[doc = "counter value"] 2086 #[doc = "Clock phase"]
2089 pub fn set_cnt(&mut self, val: u32) { 2087 pub fn set_cpha(&mut self, val: super::vals::Cpha) {
2090 self.0 = 2088 self.0 = (self.0 & !(0x01 << 0usize)) | (((val.0 as u32) & 0x01) << 0usize);
2091 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
2092 } 2089 }
2093 } 2090 #[doc = "Clock polarity"]
2094 impl Default for Cnt32 { 2091 pub const fn cpol(&self) -> super::vals::Cpol {
2095 fn default() -> Cnt32 { 2092 let val = (self.0 >> 1usize) & 0x01;
2096 Cnt32(0) 2093 super::vals::Cpol(val as u8)
2097 } 2094 }
2098 } 2095 #[doc = "Clock polarity"]
2099 #[doc = "counter"] 2096 pub fn set_cpol(&mut self, val: super::vals::Cpol) {
2100 #[repr(transparent)] 2097 self.0 = (self.0 & !(0x01 << 1usize)) | (((val.0 as u32) & 0x01) << 1usize);
2101 #[derive(Copy, Clone, Eq, PartialEq)]
2102 pub struct Cnt16(pub u32);
2103 impl Cnt16 {
2104 #[doc = "counter value"]
2105 pub const fn cnt(&self) -> u16 {
2106 let val = (self.0 >> 0usize) & 0xffff;
2107 val as u16
2108 } 2098 }
2109 #[doc = "counter value"] 2099 #[doc = "Master selection"]
2110 pub fn set_cnt(&mut self, val: u16) { 2100 pub const fn mstr(&self) -> super::vals::Mstr {
2111 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); 2101 let val = (self.0 >> 2usize) & 0x01;
2102 super::vals::Mstr(val as u8)
2112 } 2103 }
2113 } 2104 #[doc = "Master selection"]
2114 impl Default for Cnt16 { 2105 pub fn set_mstr(&mut self, val: super::vals::Mstr) {
2115 fn default() -> Cnt16 { 2106 self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize);
2116 Cnt16(0)
2117 } 2107 }
2118 } 2108 #[doc = "Baud rate control"]
2119 #[doc = "capture/compare mode register 2 (output mode)"] 2109 pub const fn br(&self) -> super::vals::Br {
2120 #[repr(transparent)] 2110 let val = (self.0 >> 3usize) & 0x07;
2121 #[derive(Copy, Clone, Eq, PartialEq)] 2111 super::vals::Br(val as u8)
2122 pub struct CcmrOutput(pub u32);
2123 impl CcmrOutput {
2124 #[doc = "Capture/Compare 3 selection"]
2125 pub fn ccs(&self, n: usize) -> super::vals::CcmrOutputCcs {
2126 assert!(n < 2usize);
2127 let offs = 0usize + n * 8usize;
2128 let val = (self.0 >> offs) & 0x03;
2129 super::vals::CcmrOutputCcs(val as u8)
2130 } 2112 }
2131 #[doc = "Capture/Compare 3 selection"] 2113 #[doc = "Baud rate control"]
2132 pub fn set_ccs(&mut self, n: usize, val: super::vals::CcmrOutputCcs) { 2114 pub fn set_br(&mut self, val: super::vals::Br) {
2133 assert!(n < 2usize); 2115 self.0 = (self.0 & !(0x07 << 3usize)) | (((val.0 as u32) & 0x07) << 3usize);
2134 let offs = 0usize + n * 8usize;
2135 self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs);
2136 } 2116 }
2137 #[doc = "Output compare 3 fast enable"] 2117 #[doc = "SPI enable"]
2138 pub fn ocfe(&self, n: usize) -> bool { 2118 pub const fn spe(&self) -> bool {
2139 assert!(n < 2usize); 2119 let val = (self.0 >> 6usize) & 0x01;
2140 let offs = 2usize + n * 8usize;
2141 let val = (self.0 >> offs) & 0x01;
2142 val != 0 2120 val != 0
2143 } 2121 }
2144 #[doc = "Output compare 3 fast enable"] 2122 #[doc = "SPI enable"]
2145 pub fn set_ocfe(&mut self, n: usize, val: bool) { 2123 pub fn set_spe(&mut self, val: bool) {
2146 assert!(n < 2usize); 2124 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
2147 let offs = 2usize + n * 8usize;
2148 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
2149 }
2150 #[doc = "Output compare 3 preload enable"]
2151 pub fn ocpe(&self, n: usize) -> super::vals::Ocpe {
2152 assert!(n < 2usize);
2153 let offs = 3usize + n * 8usize;
2154 let val = (self.0 >> offs) & 0x01;
2155 super::vals::Ocpe(val as u8)
2156 }
2157 #[doc = "Output compare 3 preload enable"]
2158 pub fn set_ocpe(&mut self, n: usize, val: super::vals::Ocpe) {
2159 assert!(n < 2usize);
2160 let offs = 3usize + n * 8usize;
2161 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs);
2162 } 2125 }
2163 #[doc = "Output compare 3 mode"] 2126 #[doc = "Frame format"]
2164 pub fn ocm(&self, n: usize) -> super::vals::Ocm { 2127 pub const fn lsbfirst(&self) -> super::vals::Lsbfirst {
2165 assert!(n < 2usize); 2128 let val = (self.0 >> 7usize) & 0x01;
2166 let offs = 4usize + n * 8usize; 2129 super::vals::Lsbfirst(val as u8)
2167 let val = (self.0 >> offs) & 0x07;
2168 super::vals::Ocm(val as u8)
2169 } 2130 }
2170 #[doc = "Output compare 3 mode"] 2131 #[doc = "Frame format"]
2171 pub fn set_ocm(&mut self, n: usize, val: super::vals::Ocm) { 2132 pub fn set_lsbfirst(&mut self, val: super::vals::Lsbfirst) {
2172 assert!(n < 2usize); 2133 self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize);
2173 let offs = 4usize + n * 8usize;
2174 self.0 = (self.0 & !(0x07 << offs)) | (((val.0 as u32) & 0x07) << offs);
2175 } 2134 }
2176 #[doc = "Output compare 3 clear enable"] 2135 #[doc = "Internal slave select"]
2177 pub fn occe(&self, n: usize) -> bool { 2136 pub const fn ssi(&self) -> bool {
2178 assert!(n < 2usize); 2137 let val = (self.0 >> 8usize) & 0x01;
2179 let offs = 7usize + n * 8usize;
2180 let val = (self.0 >> offs) & 0x01;
2181 val != 0 2138 val != 0
2182 } 2139 }
2183 #[doc = "Output compare 3 clear enable"] 2140 #[doc = "Internal slave select"]
2184 pub fn set_occe(&mut self, n: usize, val: bool) { 2141 pub fn set_ssi(&mut self, val: bool) {
2185 assert!(n < 2usize); 2142 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
2186 let offs = 7usize + n * 8usize;
2187 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
2188 }
2189 }
2190 impl Default for CcmrOutput {
2191 fn default() -> CcmrOutput {
2192 CcmrOutput(0)
2193 } 2143 }
2194 } 2144 #[doc = "Software slave management"]
2195 #[doc = "DMA/Interrupt enable register"] 2145 pub const fn ssm(&self) -> bool {
2196 #[repr(transparent)] 2146 let val = (self.0 >> 9usize) & 0x01;
2197 #[derive(Copy, Clone, Eq, PartialEq)]
2198 pub struct DierGp(pub u32);
2199 impl DierGp {
2200 #[doc = "Update interrupt enable"]
2201 pub const fn uie(&self) -> bool {
2202 let val = (self.0 >> 0usize) & 0x01;
2203 val != 0 2147 val != 0
2204 } 2148 }
2205 #[doc = "Update interrupt enable"] 2149 #[doc = "Software slave management"]
2206 pub fn set_uie(&mut self, val: bool) { 2150 pub fn set_ssm(&mut self, val: bool) {
2207 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 2151 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
2208 } 2152 }
2209 #[doc = "Capture/Compare 1 interrupt enable"] 2153 #[doc = "Receive only"]
2210 pub fn ccie(&self, n: usize) -> bool { 2154 pub const fn rxonly(&self) -> super::vals::Rxonly {
2211 assert!(n < 4usize); 2155 let val = (self.0 >> 10usize) & 0x01;
2212 let offs = 1usize + n * 1usize; 2156 super::vals::Rxonly(val as u8)
2213 let val = (self.0 >> offs) & 0x01;
2214 val != 0
2215 } 2157 }
2216 #[doc = "Capture/Compare 1 interrupt enable"] 2158 #[doc = "Receive only"]
2217 pub fn set_ccie(&mut self, n: usize, val: bool) { 2159 pub fn set_rxonly(&mut self, val: super::vals::Rxonly) {
2218 assert!(n < 4usize); 2160 self.0 = (self.0 & !(0x01 << 10usize)) | (((val.0 as u32) & 0x01) << 10usize);
2219 let offs = 1usize + n * 1usize;
2220 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
2221 } 2161 }
2222 #[doc = "Trigger interrupt enable"] 2162 #[doc = "Data frame format"]
2223 pub const fn tie(&self) -> bool { 2163 pub const fn dff(&self) -> super::vals::Dff {
2224 let val = (self.0 >> 6usize) & 0x01; 2164 let val = (self.0 >> 11usize) & 0x01;
2225 val != 0 2165 super::vals::Dff(val as u8)
2226 } 2166 }
2227 #[doc = "Trigger interrupt enable"] 2167 #[doc = "Data frame format"]
2228 pub fn set_tie(&mut self, val: bool) { 2168 pub fn set_dff(&mut self, val: super::vals::Dff) {
2229 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); 2169 self.0 = (self.0 & !(0x01 << 11usize)) | (((val.0 as u32) & 0x01) << 11usize);
2230 } 2170 }
2231 #[doc = "Update DMA request enable"] 2171 #[doc = "CRC transfer next"]
2232 pub const fn ude(&self) -> bool { 2172 pub const fn crcnext(&self) -> super::vals::Crcnext {
2233 let val = (self.0 >> 8usize) & 0x01; 2173 let val = (self.0 >> 12usize) & 0x01;
2234 val != 0 2174 super::vals::Crcnext(val as u8)
2235 } 2175 }
2236 #[doc = "Update DMA request enable"] 2176 #[doc = "CRC transfer next"]
2237 pub fn set_ude(&mut self, val: bool) { 2177 pub fn set_crcnext(&mut self, val: super::vals::Crcnext) {
2238 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); 2178 self.0 = (self.0 & !(0x01 << 12usize)) | (((val.0 as u32) & 0x01) << 12usize);
2239 } 2179 }
2240 #[doc = "Capture/Compare 1 DMA request enable"] 2180 #[doc = "Hardware CRC calculation enable"]
2241 pub fn ccde(&self, n: usize) -> bool { 2181 pub const fn crcen(&self) -> bool {
2242 assert!(n < 4usize); 2182 let val = (self.0 >> 13usize) & 0x01;
2243 let offs = 9usize + n * 1usize;
2244 let val = (self.0 >> offs) & 0x01;
2245 val != 0 2183 val != 0
2246 } 2184 }
2247 #[doc = "Capture/Compare 1 DMA request enable"] 2185 #[doc = "Hardware CRC calculation enable"]
2248 pub fn set_ccde(&mut self, n: usize, val: bool) { 2186 pub fn set_crcen(&mut self, val: bool) {
2249 assert!(n < 4usize); 2187 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize);
2250 let offs = 9usize + n * 1usize;
2251 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
2252 } 2188 }
2253 #[doc = "Trigger DMA request enable"] 2189 #[doc = "Output enable in bidirectional mode"]
2254 pub const fn tde(&self) -> bool { 2190 pub const fn bidioe(&self) -> super::vals::Bidioe {
2255 let val = (self.0 >> 14usize) & 0x01; 2191 let val = (self.0 >> 14usize) & 0x01;
2256 val != 0 2192 super::vals::Bidioe(val as u8)
2257 } 2193 }
2258 #[doc = "Trigger DMA request enable"] 2194 #[doc = "Output enable in bidirectional mode"]
2259 pub fn set_tde(&mut self, val: bool) { 2195 pub fn set_bidioe(&mut self, val: super::vals::Bidioe) {
2260 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); 2196 self.0 = (self.0 & !(0x01 << 14usize)) | (((val.0 as u32) & 0x01) << 14usize);
2197 }
2198 #[doc = "Bidirectional data mode enable"]
2199 pub const fn bidimode(&self) -> super::vals::Bidimode {
2200 let val = (self.0 >> 15usize) & 0x01;
2201 super::vals::Bidimode(val as u8)
2202 }
2203 #[doc = "Bidirectional data mode enable"]
2204 pub fn set_bidimode(&mut self, val: super::vals::Bidimode) {
2205 self.0 = (self.0 & !(0x01 << 15usize)) | (((val.0 as u32) & 0x01) << 15usize);
2261 } 2206 }
2262 } 2207 }
2263 impl Default for DierGp { 2208 impl Default for Cr1 {
2264 fn default() -> DierGp { 2209 fn default() -> Cr1 {
2265 DierGp(0) 2210 Cr1(0)
2266 } 2211 }
2267 } 2212 }
2268 #[doc = "auto-reload register"] 2213 #[doc = "data register"]
2269 #[repr(transparent)] 2214 #[repr(transparent)]
2270 #[derive(Copy, Clone, Eq, PartialEq)] 2215 #[derive(Copy, Clone, Eq, PartialEq)]
2271 pub struct Arr32(pub u32); 2216 pub struct Dr(pub u32);
2272 impl Arr32 { 2217 impl Dr {
2273 #[doc = "Auto-reload value"] 2218 #[doc = "Data register"]
2274 pub const fn arr(&self) -> u32 { 2219 pub const fn dr(&self) -> u16 {
2275 let val = (self.0 >> 0usize) & 0xffff_ffff; 2220 let val = (self.0 >> 0usize) & 0xffff;
2276 val as u32 2221 val as u16
2277 } 2222 }
2278 #[doc = "Auto-reload value"] 2223 #[doc = "Data register"]
2279 pub fn set_arr(&mut self, val: u32) { 2224 pub fn set_dr(&mut self, val: u16) {
2280 self.0 = 2225 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
2281 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
2282 } 2226 }
2283 } 2227 }
2284 impl Default for Arr32 { 2228 impl Default for Dr {
2285 fn default() -> Arr32 { 2229 fn default() -> Dr {
2286 Arr32(0) 2230 Dr(0)
2287 } 2231 }
2288 } 2232 }
2289 #[doc = "control register 1"] 2233 #[doc = "CRC polynomial register"]
2290 #[repr(transparent)] 2234 #[repr(transparent)]
2291 #[derive(Copy, Clone, Eq, PartialEq)] 2235 #[derive(Copy, Clone, Eq, PartialEq)]
2292 pub struct Cr1Gp(pub u32); 2236 pub struct Crcpr(pub u32);
2293 impl Cr1Gp { 2237 impl Crcpr {
2294 #[doc = "Counter enable"] 2238 #[doc = "CRC polynomial register"]
2295 pub const fn cen(&self) -> bool { 2239 pub const fn crcpoly(&self) -> u16 {
2296 let val = (self.0 >> 0usize) & 0x01; 2240 let val = (self.0 >> 0usize) & 0xffff;
2297 val != 0 2241 val as u16
2298 }
2299 #[doc = "Counter enable"]
2300 pub fn set_cen(&mut self, val: bool) {
2301 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
2302 }
2303 #[doc = "Update disable"]
2304 pub const fn udis(&self) -> bool {
2305 let val = (self.0 >> 1usize) & 0x01;
2306 val != 0
2307 }
2308 #[doc = "Update disable"]
2309 pub fn set_udis(&mut self, val: bool) {
2310 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
2311 }
2312 #[doc = "Update request source"]
2313 pub const fn urs(&self) -> super::vals::Urs {
2314 let val = (self.0 >> 2usize) & 0x01;
2315 super::vals::Urs(val as u8)
2316 }
2317 #[doc = "Update request source"]
2318 pub fn set_urs(&mut self, val: super::vals::Urs) {
2319 self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize);
2320 }
2321 #[doc = "One-pulse mode"]
2322 pub const fn opm(&self) -> super::vals::Opm {
2323 let val = (self.0 >> 3usize) & 0x01;
2324 super::vals::Opm(val as u8)
2325 }
2326 #[doc = "One-pulse mode"]
2327 pub fn set_opm(&mut self, val: super::vals::Opm) {
2328 self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize);
2329 }
2330 #[doc = "Direction"]
2331 pub const fn dir(&self) -> super::vals::Dir {
2332 let val = (self.0 >> 4usize) & 0x01;
2333 super::vals::Dir(val as u8)
2334 }
2335 #[doc = "Direction"]
2336 pub fn set_dir(&mut self, val: super::vals::Dir) {
2337 self.0 = (self.0 & !(0x01 << 4usize)) | (((val.0 as u32) & 0x01) << 4usize);
2338 }
2339 #[doc = "Center-aligned mode selection"]
2340 pub const fn cms(&self) -> super::vals::Cms {
2341 let val = (self.0 >> 5usize) & 0x03;
2342 super::vals::Cms(val as u8)
2343 }
2344 #[doc = "Center-aligned mode selection"]
2345 pub fn set_cms(&mut self, val: super::vals::Cms) {
2346 self.0 = (self.0 & !(0x03 << 5usize)) | (((val.0 as u32) & 0x03) << 5usize);
2347 } 2242 }
2348 #[doc = "Auto-reload preload enable"] 2243 #[doc = "CRC polynomial register"]
2349 pub const fn arpe(&self) -> super::vals::Arpe { 2244 pub fn set_crcpoly(&mut self, val: u16) {
2350 let val = (self.0 >> 7usize) & 0x01; 2245 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
2351 super::vals::Arpe(val as u8)
2352 } 2246 }
2353 #[doc = "Auto-reload preload enable"] 2247 }
2354 pub fn set_arpe(&mut self, val: super::vals::Arpe) { 2248 impl Default for Crcpr {
2355 self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize); 2249 fn default() -> Crcpr {
2250 Crcpr(0)
2356 } 2251 }
2357 #[doc = "Clock division"] 2252 }
2358 pub const fn ckd(&self) -> super::vals::Ckd { 2253 #[doc = "RX CRC register"]
2359 let val = (self.0 >> 8usize) & 0x03; 2254 #[repr(transparent)]
2360 super::vals::Ckd(val as u8) 2255 #[derive(Copy, Clone, Eq, PartialEq)]
2256 pub struct Rxcrcr(pub u32);
2257 impl Rxcrcr {
2258 #[doc = "Rx CRC register"]
2259 pub const fn rx_crc(&self) -> u16 {
2260 let val = (self.0 >> 0usize) & 0xffff;
2261 val as u16
2361 } 2262 }
2362 #[doc = "Clock division"] 2263 #[doc = "Rx CRC register"]
2363 pub fn set_ckd(&mut self, val: super::vals::Ckd) { 2264 pub fn set_rx_crc(&mut self, val: u16) {
2364 self.0 = (self.0 & !(0x03 << 8usize)) | (((val.0 as u32) & 0x03) << 8usize); 2265 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
2365 } 2266 }
2366 } 2267 }
2367 impl Default for Cr1Gp { 2268 impl Default for Rxcrcr {
2368 fn default() -> Cr1Gp { 2269 fn default() -> Rxcrcr {
2369 Cr1Gp(0) 2270 Rxcrcr(0)
2370 } 2271 }
2371 } 2272 }
2372 #[doc = "event generation register"] 2273 #[doc = "TX CRC register"]
2373 #[repr(transparent)] 2274 #[repr(transparent)]
2374 #[derive(Copy, Clone, Eq, PartialEq)] 2275 #[derive(Copy, Clone, Eq, PartialEq)]
2375 pub struct EgrBasic(pub u32); 2276 pub struct Txcrcr(pub u32);
2376 impl EgrBasic { 2277 impl Txcrcr {
2377 #[doc = "Update generation"] 2278 #[doc = "Tx CRC register"]
2378 pub const fn ug(&self) -> bool { 2279 pub const fn tx_crc(&self) -> u16 {
2379 let val = (self.0 >> 0usize) & 0x01; 2280 let val = (self.0 >> 0usize) & 0xffff;
2380 val != 0 2281 val as u16
2381 } 2282 }
2382 #[doc = "Update generation"] 2283 #[doc = "Tx CRC register"]
2383 pub fn set_ug(&mut self, val: bool) { 2284 pub fn set_tx_crc(&mut self, val: u16) {
2384 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 2285 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
2385 } 2286 }
2386 } 2287 }
2387 impl Default for EgrBasic { 2288 impl Default for Txcrcr {
2388 fn default() -> EgrBasic { 2289 fn default() -> Txcrcr {
2389 EgrBasic(0) 2290 Txcrcr(0)
2390 } 2291 }
2391 } 2292 }
2392 #[doc = "event generation register"] 2293 #[doc = "status register"]
2393 #[repr(transparent)] 2294 #[repr(transparent)]
2394 #[derive(Copy, Clone, Eq, PartialEq)] 2295 #[derive(Copy, Clone, Eq, PartialEq)]
2395 pub struct EgrAdv(pub u32); 2296 pub struct Sr(pub u32);
2396 impl EgrAdv { 2297 impl Sr {
2397 #[doc = "Update generation"] 2298 #[doc = "Receive buffer not empty"]
2398 pub const fn ug(&self) -> bool { 2299 pub const fn rxne(&self) -> bool {
2399 let val = (self.0 >> 0usize) & 0x01; 2300 let val = (self.0 >> 0usize) & 0x01;
2400 val != 0 2301 val != 0
2401 } 2302 }
2402 #[doc = "Update generation"] 2303 #[doc = "Receive buffer not empty"]
2403 pub fn set_ug(&mut self, val: bool) { 2304 pub fn set_rxne(&mut self, val: bool) {
2404 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 2305 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
2405 } 2306 }
2406 #[doc = "Capture/compare 1 generation"] 2307 #[doc = "Transmit buffer empty"]
2407 pub fn ccg(&self, n: usize) -> bool { 2308 pub const fn txe(&self) -> bool {
2408 assert!(n < 4usize); 2309 let val = (self.0 >> 1usize) & 0x01;
2409 let offs = 1usize + n * 1usize;
2410 let val = (self.0 >> offs) & 0x01;
2411 val != 0 2310 val != 0
2412 } 2311 }
2413 #[doc = "Capture/compare 1 generation"] 2312 #[doc = "Transmit buffer empty"]
2414 pub fn set_ccg(&mut self, n: usize, val: bool) { 2313 pub fn set_txe(&mut self, val: bool) {
2415 assert!(n < 4usize); 2314 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
2416 let offs = 1usize + n * 1usize;
2417 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
2418 } 2315 }
2419 #[doc = "Capture/Compare control update generation"] 2316 #[doc = "CRC error flag"]
2420 pub const fn comg(&self) -> bool { 2317 pub const fn crcerr(&self) -> bool {
2318 let val = (self.0 >> 4usize) & 0x01;
2319 val != 0
2320 }
2321 #[doc = "CRC error flag"]
2322 pub fn set_crcerr(&mut self, val: bool) {
2323 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
2324 }
2325 #[doc = "Mode fault"]
2326 pub const fn modf(&self) -> bool {
2421 let val = (self.0 >> 5usize) & 0x01; 2327 let val = (self.0 >> 5usize) & 0x01;
2422 val != 0 2328 val != 0
2423 } 2329 }
2424 #[doc = "Capture/Compare control update generation"] 2330 #[doc = "Mode fault"]
2425 pub fn set_comg(&mut self, val: bool) { 2331 pub fn set_modf(&mut self, val: bool) {
2426 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); 2332 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
2427 } 2333 }
2428 #[doc = "Trigger generation"] 2334 #[doc = "Overrun flag"]
2429 pub const fn tg(&self) -> bool { 2335 pub const fn ovr(&self) -> bool {
2430 let val = (self.0 >> 6usize) & 0x01; 2336 let val = (self.0 >> 6usize) & 0x01;
2431 val != 0 2337 val != 0
2432 } 2338 }
2433 #[doc = "Trigger generation"] 2339 #[doc = "Overrun flag"]
2434 pub fn set_tg(&mut self, val: bool) { 2340 pub fn set_ovr(&mut self, val: bool) {
2435 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); 2341 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
2436 } 2342 }
2437 #[doc = "Break generation"] 2343 #[doc = "Busy flag"]
2438 pub const fn bg(&self) -> bool { 2344 pub const fn bsy(&self) -> bool {
2439 let val = (self.0 >> 7usize) & 0x01; 2345 let val = (self.0 >> 7usize) & 0x01;
2440 val != 0 2346 val != 0
2441 } 2347 }
2442 #[doc = "Break generation"] 2348 #[doc = "Busy flag"]
2443 pub fn set_bg(&mut self, val: bool) { 2349 pub fn set_bsy(&mut self, val: bool) {
2444 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); 2350 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
2445 } 2351 }
2352 #[doc = "TI frame format error"]
2353 pub const fn fre(&self) -> bool {
2354 let val = (self.0 >> 8usize) & 0x01;
2355 val != 0
2356 }
2357 #[doc = "TI frame format error"]
2358 pub fn set_fre(&mut self, val: bool) {
2359 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
2360 }
2446 } 2361 }
2447 impl Default for EgrAdv { 2362 impl Default for Sr {
2448 fn default() -> EgrAdv { 2363 fn default() -> Sr {
2449 EgrAdv(0) 2364 Sr(0)
2450 } 2365 }
2451 } 2366 }
2452 #[doc = "status register"] 2367 #[doc = "control register 2"]
2453 #[repr(transparent)] 2368 #[repr(transparent)]
2454 #[derive(Copy, Clone, Eq, PartialEq)] 2369 #[derive(Copy, Clone, Eq, PartialEq)]
2455 pub struct SrAdv(pub u32); 2370 pub struct Cr2(pub u32);
2456 impl SrAdv { 2371 impl Cr2 {
2457 #[doc = "Update interrupt flag"] 2372 #[doc = "Rx buffer DMA enable"]
2458 pub const fn uif(&self) -> bool { 2373 pub const fn rxdmaen(&self) -> bool {
2459 let val = (self.0 >> 0usize) & 0x01; 2374 let val = (self.0 >> 0usize) & 0x01;
2460 val != 0 2375 val != 0
2461 } 2376 }
2462 #[doc = "Update interrupt flag"] 2377 #[doc = "Rx buffer DMA enable"]
2463 pub fn set_uif(&mut self, val: bool) { 2378 pub fn set_rxdmaen(&mut self, val: bool) {
2464 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 2379 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
2465 } 2380 }
2466 #[doc = "Capture/compare 1 interrupt flag"] 2381 #[doc = "Tx buffer DMA enable"]
2467 pub fn ccif(&self, n: usize) -> bool { 2382 pub const fn txdmaen(&self) -> bool {
2468 assert!(n < 4usize); 2383 let val = (self.0 >> 1usize) & 0x01;
2469 let offs = 1usize + n * 1usize;
2470 let val = (self.0 >> offs) & 0x01;
2471 val != 0 2384 val != 0
2472 } 2385 }
2473 #[doc = "Capture/compare 1 interrupt flag"] 2386 #[doc = "Tx buffer DMA enable"]
2474 pub fn set_ccif(&mut self, n: usize, val: bool) { 2387 pub fn set_txdmaen(&mut self, val: bool) {
2475 assert!(n < 4usize); 2388 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
2476 let offs = 1usize + n * 1usize;
2477 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
2478 } 2389 }
2479 #[doc = "COM interrupt flag"] 2390 #[doc = "SS output enable"]
2480 pub const fn comif(&self) -> bool { 2391 pub const fn ssoe(&self) -> bool {
2392 let val = (self.0 >> 2usize) & 0x01;
2393 val != 0
2394 }
2395 #[doc = "SS output enable"]
2396 pub fn set_ssoe(&mut self, val: bool) {
2397 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
2398 }
2399 #[doc = "Frame format"]
2400 pub const fn frf(&self) -> super::vals::Frf {
2401 let val = (self.0 >> 4usize) & 0x01;
2402 super::vals::Frf(val as u8)
2403 }
2404 #[doc = "Frame format"]
2405 pub fn set_frf(&mut self, val: super::vals::Frf) {
2406 self.0 = (self.0 & !(0x01 << 4usize)) | (((val.0 as u32) & 0x01) << 4usize);
2407 }
2408 #[doc = "Error interrupt enable"]
2409 pub const fn errie(&self) -> bool {
2481 let val = (self.0 >> 5usize) & 0x01; 2410 let val = (self.0 >> 5usize) & 0x01;
2482 val != 0 2411 val != 0
2483 } 2412 }
2484 #[doc = "COM interrupt flag"] 2413 #[doc = "Error interrupt enable"]
2485 pub fn set_comif(&mut self, val: bool) { 2414 pub fn set_errie(&mut self, val: bool) {
2486 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); 2415 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
2487 } 2416 }
2488 #[doc = "Trigger interrupt flag"] 2417 #[doc = "RX buffer not empty interrupt enable"]
2489 pub const fn tif(&self) -> bool { 2418 pub const fn rxneie(&self) -> bool {
2490 let val = (self.0 >> 6usize) & 0x01; 2419 let val = (self.0 >> 6usize) & 0x01;
2491 val != 0 2420 val != 0
2492 } 2421 }
2493 #[doc = "Trigger interrupt flag"] 2422 #[doc = "RX buffer not empty interrupt enable"]
2494 pub fn set_tif(&mut self, val: bool) { 2423 pub fn set_rxneie(&mut self, val: bool) {
2495 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); 2424 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
2496 } 2425 }
2497 #[doc = "Break interrupt flag"] 2426 #[doc = "Tx buffer empty interrupt enable"]
2498 pub const fn bif(&self) -> bool { 2427 pub const fn txeie(&self) -> bool {
2499 let val = (self.0 >> 7usize) & 0x01; 2428 let val = (self.0 >> 7usize) & 0x01;
2500 val != 0 2429 val != 0
2501 } 2430 }
2502 #[doc = "Break interrupt flag"] 2431 #[doc = "Tx buffer empty interrupt enable"]
2503 pub fn set_bif(&mut self, val: bool) { 2432 pub fn set_txeie(&mut self, val: bool) {
2504 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); 2433 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
2505 } 2434 }
2506 #[doc = "Capture/Compare 1 overcapture flag"]
2507 pub fn ccof(&self, n: usize) -> bool {
2508 assert!(n < 4usize);
2509 let offs = 9usize + n * 1usize;
2510 let val = (self.0 >> offs) & 0x01;
2511 val != 0
2512 }
2513 #[doc = "Capture/Compare 1 overcapture flag"]
2514 pub fn set_ccof(&mut self, n: usize, val: bool) {
2515 assert!(n < 4usize);
2516 let offs = 9usize + n * 1usize;
2517 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
2518 }
2519 } 2435 }
2520 impl Default for SrAdv { 2436 impl Default for Cr2 {
2521 fn default() -> SrAdv { 2437 fn default() -> Cr2 {
2522 SrAdv(0) 2438 Cr2(0)
2523 } 2439 }
2524 } 2440 }
2525 #[doc = "capture/compare enable register"] 2441 }
2526 #[repr(transparent)] 2442}
2527 #[derive(Copy, Clone, Eq, PartialEq)] 2443pub mod syscfg_h7 {
2528 pub struct CcerAdv(pub u32); 2444 use crate::generic::*;
2529 impl CcerAdv { 2445 #[doc = "System configuration controller"]
2530 #[doc = "Capture/Compare 1 output enable"] 2446 #[derive(Copy, Clone)]
2531 pub fn cce(&self, n: usize) -> bool { 2447 pub struct Syscfg(pub *mut u8);
2532 assert!(n < 4usize); 2448 unsafe impl Send for Syscfg {}
2533 let offs = 0usize + n * 4usize; 2449 unsafe impl Sync for Syscfg {}
2534 let val = (self.0 >> offs) & 0x01; 2450 impl Syscfg {
2535 val != 0 2451 #[doc = "peripheral mode configuration register"]
2536 } 2452 pub fn pmcr(self) -> Reg<regs::Pmcr, RW> {
2537 #[doc = "Capture/Compare 1 output enable"] 2453 unsafe { Reg::from_ptr(self.0.add(4usize)) }
2538 pub fn set_cce(&mut self, n: usize, val: bool) {
2539 assert!(n < 4usize);
2540 let offs = 0usize + n * 4usize;
2541 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
2542 }
2543 #[doc = "Capture/Compare 1 output Polarity"]
2544 pub fn ccp(&self, n: usize) -> bool {
2545 assert!(n < 4usize);
2546 let offs = 1usize + n * 4usize;
2547 let val = (self.0 >> offs) & 0x01;
2548 val != 0
2549 }
2550 #[doc = "Capture/Compare 1 output Polarity"]
2551 pub fn set_ccp(&mut self, n: usize, val: bool) {
2552 assert!(n < 4usize);
2553 let offs = 1usize + n * 4usize;
2554 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
2555 }
2556 #[doc = "Capture/Compare 1 complementary output enable"]
2557 pub fn ccne(&self, n: usize) -> bool {
2558 assert!(n < 4usize);
2559 let offs = 2usize + n * 4usize;
2560 let val = (self.0 >> offs) & 0x01;
2561 val != 0
2562 }
2563 #[doc = "Capture/Compare 1 complementary output enable"]
2564 pub fn set_ccne(&mut self, n: usize, val: bool) {
2565 assert!(n < 4usize);
2566 let offs = 2usize + n * 4usize;
2567 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
2568 }
2569 #[doc = "Capture/Compare 1 output Polarity"]
2570 pub fn ccnp(&self, n: usize) -> bool {
2571 assert!(n < 4usize);
2572 let offs = 3usize + n * 4usize;
2573 let val = (self.0 >> offs) & 0x01;
2574 val != 0
2575 }
2576 #[doc = "Capture/Compare 1 output Polarity"]
2577 pub fn set_ccnp(&mut self, n: usize, val: bool) {
2578 assert!(n < 4usize);
2579 let offs = 3usize + n * 4usize;
2580 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
2581 }
2582 } 2454 }
2583 impl Default for CcerAdv { 2455 #[doc = "external interrupt configuration register 1"]
2584 fn default() -> CcerAdv { 2456 pub fn exticr(self, n: usize) -> Reg<regs::Exticr, RW> {
2585 CcerAdv(0) 2457 assert!(n < 4usize);
2586 } 2458 unsafe { Reg::from_ptr(self.0.add(8usize + n * 4usize)) }
2587 } 2459 }
2588 #[doc = "DMA address for full transfer"] 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 }
2548 }
2549 pub mod regs {
2550 use crate::generic::*;
2551 #[doc = "SYSCFG user register 2"]
2589 #[repr(transparent)] 2552 #[repr(transparent)]
2590 #[derive(Copy, Clone, Eq, PartialEq)] 2553 #[derive(Copy, Clone, Eq, PartialEq)]
2591 pub struct Dmar(pub u32); 2554 pub struct Ur2(pub u32);
2592 impl Dmar { 2555 impl Ur2 {
2593 #[doc = "DMA register for burst accesses"] 2556 #[doc = "BOR_LVL Brownout Reset Threshold Level"]
2594 pub const fn dmab(&self) -> u16 { 2557 pub const fn borh(&self) -> u8 {
2595 let val = (self.0 >> 0usize) & 0xffff; 2558 let val = (self.0 >> 0usize) & 0x03;
2559 val as u8
2560 }
2561 #[doc = "BOR_LVL Brownout Reset Threshold Level"]
2562 pub fn set_borh(&mut self, val: u8) {
2563 self.0 = (self.0 & !(0x03 << 0usize)) | (((val as u32) & 0x03) << 0usize);
2564 }
2565 #[doc = "Boot Address 0"]
2566 pub const fn boot_add0(&self) -> u16 {
2567 let val = (self.0 >> 16usize) & 0xffff;
2596 val as u16 2568 val as u16
2597 } 2569 }
2598 #[doc = "DMA register for burst accesses"] 2570 #[doc = "Boot Address 0"]
2599 pub fn set_dmab(&mut self, val: u16) { 2571 pub fn set_boot_add0(&mut self, val: u16) {
2600 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); 2572 self.0 = (self.0 & !(0xffff << 16usize)) | (((val as u32) & 0xffff) << 16usize);
2601 } 2573 }
2602 } 2574 }
2603 impl Default for Dmar { 2575 impl Default for Ur2 {
2604 fn default() -> Dmar { 2576 fn default() -> Ur2 {
2605 Dmar(0) 2577 Ur2(0)
2606 } 2578 }
2607 } 2579 }
2608 #[doc = "control register 1"] 2580 #[doc = "SYSCFG user register 8"]
2609 #[repr(transparent)] 2581 #[repr(transparent)]
2610 #[derive(Copy, Clone, Eq, PartialEq)] 2582 #[derive(Copy, Clone, Eq, PartialEq)]
2611 pub struct Cr1Basic(pub u32); 2583 pub struct Ur8(pub u32);
2612 impl Cr1Basic { 2584 impl Ur8 {
2613 #[doc = "Counter enable"] 2585 #[doc = "Mass erase protected area disabled for bank 2"]
2614 pub const fn cen(&self) -> bool { 2586 pub const fn mepad_2(&self) -> bool {
2615 let val = (self.0 >> 0usize) & 0x01; 2587 let val = (self.0 >> 0usize) & 0x01;
2616 val != 0 2588 val != 0
2617 } 2589 }
2618 #[doc = "Counter enable"] 2590 #[doc = "Mass erase protected area disabled for bank 2"]
2619 pub fn set_cen(&mut self, val: bool) { 2591 pub fn set_mepad_2(&mut self, val: bool) {
2620 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 2592 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
2621 } 2593 }
2622 #[doc = "Update disable"] 2594 #[doc = "Mass erase secured area disabled for bank 2"]
2623 pub const fn udis(&self) -> bool { 2595 pub const fn mesad_2(&self) -> bool {
2624 let val = (self.0 >> 1usize) & 0x01; 2596 let val = (self.0 >> 16usize) & 0x01;
2625 val != 0 2597 val != 0
2626 } 2598 }
2627 #[doc = "Update disable"] 2599 #[doc = "Mass erase secured area disabled for bank 2"]
2628 pub fn set_udis(&mut self, val: bool) { 2600 pub fn set_mesad_2(&mut self, val: bool) {
2629 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); 2601 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
2630 }
2631 #[doc = "Update request source"]
2632 pub const fn urs(&self) -> super::vals::Urs {
2633 let val = (self.0 >> 2usize) & 0x01;
2634 super::vals::Urs(val as u8)
2635 }
2636 #[doc = "Update request source"]
2637 pub fn set_urs(&mut self, val: super::vals::Urs) {
2638 self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize);
2639 }
2640 #[doc = "One-pulse mode"]
2641 pub const fn opm(&self) -> super::vals::Opm {
2642 let val = (self.0 >> 3usize) & 0x01;
2643 super::vals::Opm(val as u8)
2644 }
2645 #[doc = "One-pulse mode"]
2646 pub fn set_opm(&mut self, val: super::vals::Opm) {
2647 self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize);
2648 }
2649 #[doc = "Auto-reload preload enable"]
2650 pub const fn arpe(&self) -> super::vals::Arpe {
2651 let val = (self.0 >> 7usize) & 0x01;
2652 super::vals::Arpe(val as u8)
2653 }
2654 #[doc = "Auto-reload preload enable"]
2655 pub fn set_arpe(&mut self, val: super::vals::Arpe) {
2656 self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize);
2657 } 2602 }
2658 } 2603 }
2659 impl Default for Cr1Basic { 2604 impl Default for Ur8 {
2660 fn default() -> Cr1Basic { 2605 fn default() -> Ur8 {
2661 Cr1Basic(0) 2606 Ur8(0)
2662 } 2607 }
2663 } 2608 }
2664 #[doc = "repetition counter register"] 2609 #[doc = "SYSCFG user register 9"]
2665 #[repr(transparent)] 2610 #[repr(transparent)]
2666 #[derive(Copy, Clone, Eq, PartialEq)] 2611 #[derive(Copy, Clone, Eq, PartialEq)]
2667 pub struct Rcr(pub u32); 2612 pub struct Ur9(pub u32);
2668 impl Rcr { 2613 impl Ur9 {
2669 #[doc = "Repetition counter value"] 2614 #[doc = "Write protection for flash bank 2"]
2670 pub const fn rep(&self) -> u8 { 2615 pub const fn wrpn_2(&self) -> u8 {
2671 let val = (self.0 >> 0usize) & 0xff; 2616 let val = (self.0 >> 0usize) & 0xff;
2672 val as u8 2617 val as u8
2673 } 2618 }
2674 #[doc = "Repetition counter value"] 2619 #[doc = "Write protection for flash bank 2"]
2675 pub fn set_rep(&mut self, val: u8) { 2620 pub fn set_wrpn_2(&mut self, val: u8) {
2676 self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); 2621 self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize);
2677 } 2622 }
2623 #[doc = "Protected area start address for bank 2"]
2624 pub const fn pa_beg_2(&self) -> u16 {
2625 let val = (self.0 >> 16usize) & 0x0fff;
2626 val as u16
2627 }
2628 #[doc = "Protected area start address for bank 2"]
2629 pub fn set_pa_beg_2(&mut self, val: u16) {
2630 self.0 = (self.0 & !(0x0fff << 16usize)) | (((val as u32) & 0x0fff) << 16usize);
2631 }
2678 } 2632 }
2679 impl Default for Rcr { 2633 impl Default for Ur9 {
2680 fn default() -> Rcr { 2634 fn default() -> Ur9 {
2681 Rcr(0) 2635 Ur9(0)
2682 } 2636 }
2683 } 2637 }
2684 #[doc = "capture/compare mode register 1 (input mode)"] 2638 #[doc = "SYSCFG compensation cell code register"]
2685 #[repr(transparent)] 2639 #[repr(transparent)]
2686 #[derive(Copy, Clone, Eq, PartialEq)] 2640 #[derive(Copy, Clone, Eq, PartialEq)]
2687 pub struct CcmrInput(pub u32); 2641 pub struct Cccr(pub u32);
2688 impl CcmrInput { 2642 impl Cccr {
2689 #[doc = "Capture/Compare 1 selection"] 2643 #[doc = "NMOS compensation code"]
2690 pub fn ccs(&self, n: usize) -> super::vals::CcmrInputCcs { 2644 pub const fn ncc(&self) -> u8 {
2691 assert!(n < 2usize); 2645 let val = (self.0 >> 0usize) & 0x0f;
2692 let offs = 0usize + n * 8usize;
2693 let val = (self.0 >> offs) & 0x03;
2694 super::vals::CcmrInputCcs(val as u8)
2695 }
2696 #[doc = "Capture/Compare 1 selection"]
2697 pub fn set_ccs(&mut self, n: usize, val: super::vals::CcmrInputCcs) {
2698 assert!(n < 2usize);
2699 let offs = 0usize + n * 8usize;
2700 self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs);
2701 }
2702 #[doc = "Input capture 1 prescaler"]
2703 pub fn icpsc(&self, n: usize) -> u8 {
2704 assert!(n < 2usize);
2705 let offs = 2usize + n * 8usize;
2706 let val = (self.0 >> offs) & 0x03;
2707 val as u8 2646 val as u8
2708 } 2647 }
2709 #[doc = "Input capture 1 prescaler"] 2648 #[doc = "NMOS compensation code"]
2710 pub fn set_icpsc(&mut self, n: usize, val: u8) { 2649 pub fn set_ncc(&mut self, val: u8) {
2711 assert!(n < 2usize); 2650 self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize);
2712 let offs = 2usize + n * 8usize;
2713 self.0 = (self.0 & !(0x03 << offs)) | (((val as u32) & 0x03) << offs);
2714 } 2651 }
2715 #[doc = "Input capture 1 filter"] 2652 #[doc = "PMOS compensation code"]
2716 pub fn icf(&self, n: usize) -> super::vals::Icf { 2653 pub const fn pcc(&self) -> u8 {
2717 assert!(n < 2usize); 2654 let val = (self.0 >> 4usize) & 0x0f;
2718 let offs = 4usize + n * 8usize; 2655 val as u8
2719 let val = (self.0 >> offs) & 0x0f;
2720 super::vals::Icf(val as u8)
2721 } 2656 }
2722 #[doc = "Input capture 1 filter"] 2657 #[doc = "PMOS compensation code"]
2723 pub fn set_icf(&mut self, n: usize, val: super::vals::Icf) { 2658 pub fn set_pcc(&mut self, val: u8) {
2724 assert!(n < 2usize); 2659 self.0 = (self.0 & !(0x0f << 4usize)) | (((val as u32) & 0x0f) << 4usize);
2725 let offs = 4usize + n * 8usize;
2726 self.0 = (self.0 & !(0x0f << offs)) | (((val.0 as u32) & 0x0f) << offs);
2727 } 2660 }
2728 } 2661 }
2729 impl Default for CcmrInput { 2662 impl Default for Cccr {
2730 fn default() -> CcmrInput { 2663 fn default() -> Cccr {
2731 CcmrInput(0) 2664 Cccr(0)
2732 } 2665 }
2733 } 2666 }
2734 #[doc = "control register 2"] 2667 #[doc = "SYSCFG user register 17"]
2735 #[repr(transparent)] 2668 #[repr(transparent)]
2736 #[derive(Copy, Clone, Eq, PartialEq)] 2669 #[derive(Copy, Clone, Eq, PartialEq)]
2737 pub struct Cr2Gp(pub u32); 2670 pub struct Ur17(pub u32);
2738 impl Cr2Gp { 2671 impl Ur17 {
2739 #[doc = "Capture/compare DMA selection"] 2672 #[doc = "I/O high speed / low voltage"]
2740 pub const fn ccds(&self) -> super::vals::Ccds { 2673 pub const fn io_hslv(&self) -> bool {
2741 let val = (self.0 >> 3usize) & 0x01; 2674 let val = (self.0 >> 0usize) & 0x01;
2742 super::vals::Ccds(val as u8) 2675 val != 0
2743 }
2744 #[doc = "Capture/compare DMA selection"]
2745 pub fn set_ccds(&mut self, val: super::vals::Ccds) {
2746 self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize);
2747 }
2748 #[doc = "Master mode selection"]
2749 pub const fn mms(&self) -> super::vals::Mms {
2750 let val = (self.0 >> 4usize) & 0x07;
2751 super::vals::Mms(val as u8)
2752 }
2753 #[doc = "Master mode selection"]
2754 pub fn set_mms(&mut self, val: super::vals::Mms) {
2755 self.0 = (self.0 & !(0x07 << 4usize)) | (((val.0 as u32) & 0x07) << 4usize);
2756 }
2757 #[doc = "TI1 selection"]
2758 pub const fn ti1s(&self) -> super::vals::Tis {
2759 let val = (self.0 >> 7usize) & 0x01;
2760 super::vals::Tis(val as u8)
2761 } 2676 }
2762 #[doc = "TI1 selection"] 2677 #[doc = "I/O high speed / low voltage"]
2763 pub fn set_ti1s(&mut self, val: super::vals::Tis) { 2678 pub fn set_io_hslv(&mut self, val: bool) {
2764 self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize); 2679 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
2765 } 2680 }
2766 } 2681 }
2767 impl Default for Cr2Gp { 2682 impl Default for Ur17 {
2768 fn default() -> Cr2Gp { 2683 fn default() -> Ur17 {
2769 Cr2Gp(0) 2684 Ur17(0)
2770 } 2685 }
2771 } 2686 }
2772 #[doc = "break and dead-time register"] 2687 #[doc = "SYSCFG user register 14"]
2773 #[repr(transparent)] 2688 #[repr(transparent)]
2774 #[derive(Copy, Clone, Eq, PartialEq)] 2689 #[derive(Copy, Clone, Eq, PartialEq)]
2775 pub struct Bdtr(pub u32); 2690 pub struct Ur14(pub u32);
2776 impl Bdtr { 2691 impl Ur14 {
2777 #[doc = "Dead-time generator setup"] 2692 #[doc = "D1 Stop Reset"]
2778 pub const fn dtg(&self) -> u8 { 2693 pub const fn d1stprst(&self) -> bool {
2779 let val = (self.0 >> 0usize) & 0xff; 2694 let val = (self.0 >> 0usize) & 0x01;
2780 val as u8 2695 val != 0
2781 } 2696 }
2782 #[doc = "Dead-time generator setup"] 2697 #[doc = "D1 Stop Reset"]
2783 pub fn set_dtg(&mut self, val: u8) { 2698 pub fn set_d1stprst(&mut self, val: bool) {
2784 self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); 2699 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
2785 } 2700 }
2786 #[doc = "Lock configuration"] 2701 }
2787 pub const fn lock(&self) -> u8 { 2702 impl Default for Ur14 {
2788 let val = (self.0 >> 8usize) & 0x03; 2703 fn default() -> Ur14 {
2789 val as u8 2704 Ur14(0)
2790 } 2705 }
2791 #[doc = "Lock configuration"] 2706 }
2792 pub fn set_lock(&mut self, val: u8) { 2707 #[doc = "SYSCFG user register 7"]
2793 self.0 = (self.0 & !(0x03 << 8usize)) | (((val as u32) & 0x03) << 8usize); 2708 #[repr(transparent)]
2709 #[derive(Copy, Clone, Eq, PartialEq)]
2710 pub struct Ur7(pub u32);
2711 impl Ur7 {
2712 #[doc = "Secured area start address for bank 1"]
2713 pub const fn sa_beg_1(&self) -> u16 {
2714 let val = (self.0 >> 0usize) & 0x0fff;
2715 val as u16
2794 } 2716 }
2795 #[doc = "Off-state selection for Idle mode"] 2717 #[doc = "Secured area start address for bank 1"]
2796 pub const fn ossi(&self) -> super::vals::Ossi { 2718 pub fn set_sa_beg_1(&mut self, val: u16) {
2797 let val = (self.0 >> 10usize) & 0x01; 2719 self.0 = (self.0 & !(0x0fff << 0usize)) | (((val as u32) & 0x0fff) << 0usize);
2798 super::vals::Ossi(val as u8)
2799 } 2720 }
2800 #[doc = "Off-state selection for Idle mode"] 2721 #[doc = "Secured area end address for bank 1"]
2801 pub fn set_ossi(&mut self, val: super::vals::Ossi) { 2722 pub const fn sa_end_1(&self) -> u16 {
2802 self.0 = (self.0 & !(0x01 << 10usize)) | (((val.0 as u32) & 0x01) << 10usize); 2723 let val = (self.0 >> 16usize) & 0x0fff;
2724 val as u16
2803 } 2725 }
2804 #[doc = "Off-state selection for Run mode"] 2726 #[doc = "Secured area end address for bank 1"]
2805 pub const fn ossr(&self) -> super::vals::Ossr { 2727 pub fn set_sa_end_1(&mut self, val: u16) {
2806 let val = (self.0 >> 11usize) & 0x01; 2728 self.0 = (self.0 & !(0x0fff << 16usize)) | (((val as u32) & 0x0fff) << 16usize);
2807 super::vals::Ossr(val as u8)
2808 } 2729 }
2809 #[doc = "Off-state selection for Run mode"] 2730 }
2810 pub fn set_ossr(&mut self, val: super::vals::Ossr) { 2731 impl Default for Ur7 {
2811 self.0 = (self.0 & !(0x01 << 11usize)) | (((val.0 as u32) & 0x01) << 11usize); 2732 fn default() -> Ur7 {
2733 Ur7(0)
2812 } 2734 }
2813 #[doc = "Break enable"] 2735 }
2814 pub const fn bke(&self) -> bool { 2736 #[doc = "SYSCFG user register 12"]
2815 let val = (self.0 >> 12usize) & 0x01; 2737 #[repr(transparent)]
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;
2816 val != 0 2744 val != 0
2817 } 2745 }
2818 #[doc = "Break enable"] 2746 #[doc = "Secure mode"]
2819 pub fn set_bke(&mut self, val: bool) { 2747 pub fn set_secure(&mut self, val: bool) {
2820 self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); 2748 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
2821 }
2822 #[doc = "Break polarity"]
2823 pub const fn bkp(&self) -> bool {
2824 let val = (self.0 >> 13usize) & 0x01;
2825 val != 0
2826 } 2749 }
2827 #[doc = "Break polarity"] 2750 }
2828 pub fn set_bkp(&mut self, val: bool) { 2751 impl Default for Ur12 {
2829 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); 2752 fn default() -> Ur12 {
2753 Ur12(0)
2830 } 2754 }
2831 #[doc = "Automatic output enable"] 2755 }
2832 pub const fn aoe(&self) -> bool { 2756 #[doc = "SYSCFG user register 0"]
2833 let val = (self.0 >> 14usize) & 0x01; 2757 #[repr(transparent)]
2758 #[derive(Copy, Clone, Eq, PartialEq)]
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;
2834 val != 0 2764 val != 0
2835 } 2765 }
2836 #[doc = "Automatic output enable"] 2766 #[doc = "Bank Swap"]
2837 pub fn set_aoe(&mut self, val: bool) { 2767 pub fn set_bks(&mut self, val: bool) {
2838 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); 2768 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
2839 } 2769 }
2840 #[doc = "Main output enable"] 2770 #[doc = "Readout protection"]
2841 pub const fn moe(&self) -> bool { 2771 pub const fn rdp(&self) -> u8 {
2842 let val = (self.0 >> 15usize) & 0x01; 2772 let val = (self.0 >> 16usize) & 0xff;
2843 val != 0 2773 val as u8
2844 } 2774 }
2845 #[doc = "Main output enable"] 2775 #[doc = "Readout protection"]
2846 pub fn set_moe(&mut self, val: bool) { 2776 pub fn set_rdp(&mut self, val: u8) {
2847 self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); 2777 self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize);
2848 } 2778 }
2849 } 2779 }
2850 impl Default for Bdtr { 2780 impl Default for Ur0 {
2851 fn default() -> Bdtr { 2781 fn default() -> Ur0 {
2852 Bdtr(0) 2782 Ur0(0)
2853 } 2783 }
2854 } 2784 }
2855 #[doc = "auto-reload register"] 2785 #[doc = "SYSCFG user register 11"]
2856 #[repr(transparent)] 2786 #[repr(transparent)]
2857 #[derive(Copy, Clone, Eq, PartialEq)] 2787 #[derive(Copy, Clone, Eq, PartialEq)]
2858 pub struct Arr16(pub u32); 2788 pub struct Ur11(pub u32);
2859 impl Arr16 { 2789 impl Ur11 {
2860 #[doc = "Auto-reload value"] 2790 #[doc = "Secured area end address for bank 2"]
2861 pub const fn arr(&self) -> u16 { 2791 pub const fn sa_end_2(&self) -> u16 {
2862 let val = (self.0 >> 0usize) & 0xffff; 2792 let val = (self.0 >> 0usize) & 0x0fff;
2863 val as u16 2793 val as u16
2864 } 2794 }
2865 #[doc = "Auto-reload value"] 2795 #[doc = "Secured area end address for bank 2"]
2866 pub fn set_arr(&mut self, val: u16) { 2796 pub fn set_sa_end_2(&mut self, val: u16) {
2867 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); 2797 self.0 = (self.0 & !(0x0fff << 0usize)) | (((val as u32) & 0x0fff) << 0usize);
2798 }
2799 #[doc = "Independent Watchdog 1 mode"]
2800 pub const fn iwdg1m(&self) -> bool {
2801 let val = (self.0 >> 16usize) & 0x01;
2802 val != 0
2803 }
2804 #[doc = "Independent Watchdog 1 mode"]
2805 pub fn set_iwdg1m(&mut self, val: bool) {
2806 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
2868 } 2807 }
2869 } 2808 }
2870 impl Default for Arr16 { 2809 impl Default for Ur11 {
2871 fn default() -> Arr16 { 2810 fn default() -> Ur11 {
2872 Arr16(0) 2811 Ur11(0)
2873 } 2812 }
2874 } 2813 }
2875 #[doc = "event generation register"] 2814 #[doc = "SYSCFG user register 16"]
2876 #[repr(transparent)] 2815 #[repr(transparent)]
2877 #[derive(Copy, Clone, Eq, PartialEq)] 2816 #[derive(Copy, Clone, Eq, PartialEq)]
2878 pub struct EgrGp(pub u32); 2817 pub struct Ur16(pub u32);
2879 impl EgrGp { 2818 impl Ur16 {
2880 #[doc = "Update generation"] 2819 #[doc = "Freeze independent watchdog in Stop mode"]
2881 pub const fn ug(&self) -> bool { 2820 pub const fn fziwdgstp(&self) -> bool {
2882 let val = (self.0 >> 0usize) & 0x01; 2821 let val = (self.0 >> 0usize) & 0x01;
2883 val != 0 2822 val != 0
2884 } 2823 }
2885 #[doc = "Update generation"] 2824 #[doc = "Freeze independent watchdog in Stop mode"]
2886 pub fn set_ug(&mut self, val: bool) { 2825 pub fn set_fziwdgstp(&mut self, val: bool) {
2887 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 2826 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
2888 } 2827 }
2889 #[doc = "Capture/compare 1 generation"] 2828 #[doc = "Private key programmed"]
2890 pub fn ccg(&self, n: usize) -> bool { 2829 pub const fn pkp(&self) -> bool {
2891 assert!(n < 4usize); 2830 let val = (self.0 >> 16usize) & 0x01;
2892 let offs = 1usize + n * 1usize;
2893 let val = (self.0 >> offs) & 0x01;
2894 val != 0 2831 val != 0
2895 } 2832 }
2896 #[doc = "Capture/compare 1 generation"] 2833 #[doc = "Private key programmed"]
2897 pub fn set_ccg(&mut self, n: usize, val: bool) { 2834 pub fn set_pkp(&mut self, val: bool) {
2898 assert!(n < 4usize); 2835 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
2899 let offs = 1usize + n * 1usize;
2900 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
2901 }
2902 #[doc = "Capture/Compare control update generation"]
2903 pub const fn comg(&self) -> bool {
2904 let val = (self.0 >> 5usize) & 0x01;
2905 val != 0
2906 } 2836 }
2907 #[doc = "Capture/Compare control update generation"] 2837 }
2908 pub fn set_comg(&mut self, val: bool) { 2838 impl Default for Ur16 {
2909 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); 2839 fn default() -> Ur16 {
2840 Ur16(0)
2910 } 2841 }
2911 #[doc = "Trigger generation"] 2842 }
2912 pub const fn tg(&self) -> bool { 2843 #[doc = "SYSCFG user register 13"]
2913 let val = (self.0 >> 6usize) & 0x01; 2844 #[repr(transparent)]
2914 val != 0 2845 #[derive(Copy, Clone, Eq, PartialEq)]
2846 pub struct Ur13(pub u32);
2847 impl Ur13 {
2848 #[doc = "Secured DTCM RAM Size"]
2849 pub const fn sdrs(&self) -> u8 {
2850 let val = (self.0 >> 0usize) & 0x03;
2851 val as u8
2915 } 2852 }
2916 #[doc = "Trigger generation"] 2853 #[doc = "Secured DTCM RAM Size"]
2917 pub fn set_tg(&mut self, val: bool) { 2854 pub fn set_sdrs(&mut self, val: u8) {
2918 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); 2855 self.0 = (self.0 & !(0x03 << 0usize)) | (((val as u32) & 0x03) << 0usize);
2919 } 2856 }
2920 #[doc = "Break generation"] 2857 #[doc = "D1 Standby reset"]
2921 pub const fn bg(&self) -> bool { 2858 pub const fn d1sbrst(&self) -> bool {
2922 let val = (self.0 >> 7usize) & 0x01; 2859 let val = (self.0 >> 16usize) & 0x01;
2923 val != 0 2860 val != 0
2924 } 2861 }
2925 #[doc = "Break generation"] 2862 #[doc = "D1 Standby reset"]
2926 pub fn set_bg(&mut self, val: bool) { 2863 pub fn set_d1sbrst(&mut self, val: bool) {
2927 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); 2864 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
2928 } 2865 }
2929 } 2866 }
2930 impl Default for EgrGp { 2867 impl Default for Ur13 {
2931 fn default() -> EgrGp { 2868 fn default() -> Ur13 {
2932 EgrGp(0) 2869 Ur13(0)
2933 } 2870 }
2934 } 2871 }
2935 #[doc = "DMA control register"] 2872 #[doc = "SYSCFG user register 5"]
2936 #[repr(transparent)] 2873 #[repr(transparent)]
2937 #[derive(Copy, Clone, Eq, PartialEq)] 2874 #[derive(Copy, Clone, Eq, PartialEq)]
2938 pub struct Dcr(pub u32); 2875 pub struct Ur5(pub u32);
2939 impl Dcr { 2876 impl Ur5 {
2940 #[doc = "DMA base address"] 2877 #[doc = "Mass erase secured area disabled for bank 1"]
2941 pub const fn dba(&self) -> u8 { 2878 pub const fn mesad_1(&self) -> bool {
2942 let val = (self.0 >> 0usize) & 0x1f; 2879 let val = (self.0 >> 0usize) & 0x01;
2943 val as u8 2880 val != 0
2944 } 2881 }
2945 #[doc = "DMA base address"] 2882 #[doc = "Mass erase secured area disabled for bank 1"]
2946 pub fn set_dba(&mut self, val: u8) { 2883 pub fn set_mesad_1(&mut self, val: bool) {
2947 self.0 = (self.0 & !(0x1f << 0usize)) | (((val as u32) & 0x1f) << 0usize); 2884 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
2948 } 2885 }
2949 #[doc = "DMA burst length"] 2886 #[doc = "Write protection for flash bank 1"]
2950 pub const fn dbl(&self) -> u8 { 2887 pub const fn wrpn_1(&self) -> u8 {
2951 let val = (self.0 >> 8usize) & 0x1f; 2888 let val = (self.0 >> 16usize) & 0xff;
2952 val as u8 2889 val as u8
2953 } 2890 }
2954 #[doc = "DMA burst length"] 2891 #[doc = "Write protection for flash bank 1"]
2955 pub fn set_dbl(&mut self, val: u8) { 2892 pub fn set_wrpn_1(&mut self, val: u8) {
2956 self.0 = (self.0 & !(0x1f << 8usize)) | (((val as u32) & 0x1f) << 8usize); 2893 self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize);
2957 } 2894 }
2958 } 2895 }
2959 impl Default for Dcr { 2896 impl Default for Ur5 {
2960 fn default() -> Dcr { 2897 fn default() -> Ur5 {
2961 Dcr(0) 2898 Ur5(0)
2962 } 2899 }
2963 } 2900 }
2964 #[doc = "slave mode control register"] 2901 #[doc = "compensation cell control/status register"]
2965 #[repr(transparent)] 2902 #[repr(transparent)]
2966 #[derive(Copy, Clone, Eq, PartialEq)] 2903 #[derive(Copy, Clone, Eq, PartialEq)]
2967 pub struct Smcr(pub u32); 2904 pub struct Cccsr(pub u32);
2968 impl Smcr { 2905 impl Cccsr {
2969 #[doc = "Slave mode selection"] 2906 #[doc = "enable"]
2970 pub const fn sms(&self) -> super::vals::Sms { 2907 pub const fn en(&self) -> bool {
2971 let val = (self.0 >> 0usize) & 0x07; 2908 let val = (self.0 >> 0usize) & 0x01;
2972 super::vals::Sms(val as u8) 2909 val != 0
2973 }
2974 #[doc = "Slave mode selection"]
2975 pub fn set_sms(&mut self, val: super::vals::Sms) {
2976 self.0 = (self.0 & !(0x07 << 0usize)) | (((val.0 as u32) & 0x07) << 0usize);
2977 }
2978 #[doc = "Trigger selection"]
2979 pub const fn ts(&self) -> super::vals::Ts {
2980 let val = (self.0 >> 4usize) & 0x07;
2981 super::vals::Ts(val as u8)
2982 }
2983 #[doc = "Trigger selection"]
2984 pub fn set_ts(&mut self, val: super::vals::Ts) {
2985 self.0 = (self.0 & !(0x07 << 4usize)) | (((val.0 as u32) & 0x07) << 4usize);
2986 } 2910 }
2987 #[doc = "Master/Slave mode"] 2911 #[doc = "enable"]
2988 pub const fn msm(&self) -> super::vals::Msm { 2912 pub fn set_en(&mut self, val: bool) {
2989 let val = (self.0 >> 7usize) & 0x01; 2913 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
2990 super::vals::Msm(val as u8)
2991 } 2914 }
2992 #[doc = "Master/Slave mode"] 2915 #[doc = "Code selection"]
2993 pub fn set_msm(&mut self, val: super::vals::Msm) { 2916 pub const fn cs(&self) -> bool {
2994 self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize); 2917 let val = (self.0 >> 1usize) & 0x01;
2918 val != 0
2995 } 2919 }
2996 #[doc = "External trigger filter"] 2920 #[doc = "Code selection"]
2997 pub const fn etf(&self) -> super::vals::Etf { 2921 pub fn set_cs(&mut self, val: bool) {
2998 let val = (self.0 >> 8usize) & 0x0f; 2922 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
2999 super::vals::Etf(val as u8)
3000 } 2923 }
3001 #[doc = "External trigger filter"] 2924 #[doc = "Compensation cell ready flag"]
3002 pub fn set_etf(&mut self, val: super::vals::Etf) { 2925 pub const fn ready(&self) -> bool {
3003 self.0 = (self.0 & !(0x0f << 8usize)) | (((val.0 as u32) & 0x0f) << 8usize); 2926 let val = (self.0 >> 8usize) & 0x01;
2927 val != 0
3004 } 2928 }
3005 #[doc = "External trigger prescaler"] 2929 #[doc = "Compensation cell ready flag"]
3006 pub const fn etps(&self) -> super::vals::Etps { 2930 pub fn set_ready(&mut self, val: bool) {
3007 let val = (self.0 >> 12usize) & 0x03; 2931 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
3008 super::vals::Etps(val as u8)
3009 } 2932 }
3010 #[doc = "External trigger prescaler"] 2933 #[doc = "High-speed at low-voltage"]
3011 pub fn set_etps(&mut self, val: super::vals::Etps) { 2934 pub const fn hslv(&self) -> bool {
3012 self.0 = (self.0 & !(0x03 << 12usize)) | (((val.0 as u32) & 0x03) << 12usize); 2935 let val = (self.0 >> 16usize) & 0x01;
2936 val != 0
3013 } 2937 }
3014 #[doc = "External clock enable"] 2938 #[doc = "High-speed at low-voltage"]
3015 pub const fn ece(&self) -> super::vals::Ece { 2939 pub fn set_hslv(&mut self, val: bool) {
3016 let val = (self.0 >> 14usize) & 0x01; 2940 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
3017 super::vals::Ece(val as u8)
3018 } 2941 }
3019 #[doc = "External clock enable"] 2942 }
3020 pub fn set_ece(&mut self, val: super::vals::Ece) { 2943 impl Default for Cccsr {
3021 self.0 = (self.0 & !(0x01 << 14usize)) | (((val.0 as u32) & 0x01) << 14usize); 2944 fn default() -> Cccsr {
2945 Cccsr(0)
3022 } 2946 }
3023 #[doc = "External trigger polarity"] 2947 }
3024 pub const fn etp(&self) -> super::vals::Etp { 2948 #[doc = "SYSCFG user register 4"]
3025 let val = (self.0 >> 15usize) & 0x01; 2949 #[repr(transparent)]
3026 super::vals::Etp(val as u8) 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
3027 } 2957 }
3028 #[doc = "External trigger polarity"] 2958 #[doc = "Mass Erase Protected Area Disabled for bank 1"]
3029 pub fn set_etp(&mut self, val: super::vals::Etp) { 2959 pub fn set_mepad_1(&mut self, val: bool) {
3030 self.0 = (self.0 & !(0x01 << 15usize)) | (((val.0 as u32) & 0x01) << 15usize); 2960 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
3031 } 2961 }
3032 } 2962 }
3033 impl Default for Smcr { 2963 impl Default for Ur4 {
3034 fn default() -> Smcr { 2964 fn default() -> Ur4 {
3035 Smcr(0) 2965 Ur4(0)
3036 } 2966 }
3037 } 2967 }
3038 #[doc = "DMA/Interrupt enable register"] 2968 #[doc = "SYSCFG user register 10"]
3039 #[repr(transparent)] 2969 #[repr(transparent)]
3040 #[derive(Copy, Clone, Eq, PartialEq)] 2970 #[derive(Copy, Clone, Eq, PartialEq)]
3041 pub struct DierBasic(pub u32); 2971 pub struct Ur10(pub u32);
3042 impl DierBasic { 2972 impl Ur10 {
3043 #[doc = "Update interrupt enable"] 2973 #[doc = "Protected area end address for bank 2"]
3044 pub const fn uie(&self) -> bool { 2974 pub const fn pa_end_2(&self) -> u16 {
3045 let val = (self.0 >> 0usize) & 0x01; 2975 let val = (self.0 >> 0usize) & 0x0fff;
3046 val != 0 2976 val as u16
3047 } 2977 }
3048 #[doc = "Update interrupt enable"] 2978 #[doc = "Protected area end address for bank 2"]
3049 pub fn set_uie(&mut self, val: bool) { 2979 pub fn set_pa_end_2(&mut self, val: u16) {
3050 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 2980 self.0 = (self.0 & !(0x0fff << 0usize)) | (((val as u32) & 0x0fff) << 0usize);
3051 } 2981 }
3052 #[doc = "Update DMA request enable"] 2982 #[doc = "Secured area start address for bank 2"]
3053 pub const fn ude(&self) -> bool { 2983 pub const fn sa_beg_2(&self) -> u16 {
3054 let val = (self.0 >> 8usize) & 0x01; 2984 let val = (self.0 >> 16usize) & 0x0fff;
3055 val != 0 2985 val as u16
3056 } 2986 }
3057 #[doc = "Update DMA request enable"] 2987 #[doc = "Secured area start address for bank 2"]
3058 pub fn set_ude(&mut self, val: bool) { 2988 pub fn set_sa_beg_2(&mut self, val: u16) {
3059 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); 2989 self.0 = (self.0 & !(0x0fff << 16usize)) | (((val as u32) & 0x0fff) << 16usize);
3060 } 2990 }
3061 } 2991 }
3062 impl Default for DierBasic { 2992 impl Default for Ur10 {
3063 fn default() -> DierBasic { 2993 fn default() -> Ur10 {
3064 DierBasic(0) 2994 Ur10(0)
3065 } 2995 }
3066 } 2996 }
3067 #[doc = "control register 2"] 2997 #[doc = "SYSCFG user register 15"]
3068 #[repr(transparent)] 2998 #[repr(transparent)]
3069 #[derive(Copy, Clone, Eq, PartialEq)] 2999 #[derive(Copy, Clone, Eq, PartialEq)]
3070 pub struct Cr2Adv(pub u32); 3000 pub struct Ur15(pub u32);
3071 impl Cr2Adv { 3001 impl Ur15 {
3072 #[doc = "Capture/compare preloaded control"] 3002 #[doc = "Freeze independent watchdog in Standby mode"]
3073 pub const fn ccpc(&self) -> bool { 3003 pub const fn fziwdgstb(&self) -> bool {
3074 let val = (self.0 >> 0usize) & 0x01; 3004 let val = (self.0 >> 16usize) & 0x01;
3075 val != 0
3076 }
3077 #[doc = "Capture/compare preloaded control"]
3078 pub fn set_ccpc(&mut self, val: bool) {
3079 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
3080 }
3081 #[doc = "Capture/compare control update selection"]
3082 pub const fn ccus(&self) -> bool {
3083 let val = (self.0 >> 2usize) & 0x01;
3084 val != 0 3005 val != 0
3085 } 3006 }
3086 #[doc = "Capture/compare control update selection"] 3007 #[doc = "Freeze independent watchdog in Standby mode"]
3087 pub fn set_ccus(&mut self, val: bool) { 3008 pub fn set_fziwdgstb(&mut self, val: bool) {
3088 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); 3009 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
3089 } 3010 }
3090 #[doc = "Capture/compare DMA selection"] 3011 }
3091 pub const fn ccds(&self) -> super::vals::Ccds { 3012 impl Default for Ur15 {
3092 let val = (self.0 >> 3usize) & 0x01; 3013 fn default() -> Ur15 {
3093 super::vals::Ccds(val as u8) 3014 Ur15(0)
3094 } 3015 }
3095 #[doc = "Capture/compare DMA selection"] 3016 }
3096 pub fn set_ccds(&mut self, val: super::vals::Ccds) { 3017 #[doc = "SYSCFG user register 3"]
3097 self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize); 3018 #[repr(transparent)]
3019 #[derive(Copy, Clone, Eq, PartialEq)]
3020 pub struct Ur3(pub u32);
3021 impl Ur3 {
3022 #[doc = "Boot Address 1"]
3023 pub const fn boot_add1(&self) -> u16 {
3024 let val = (self.0 >> 16usize) & 0xffff;
3025 val as u16
3098 } 3026 }
3099 #[doc = "Master mode selection"] 3027 #[doc = "Boot Address 1"]
3100 pub const fn mms(&self) -> super::vals::Mms { 3028 pub fn set_boot_add1(&mut self, val: u16) {
3101 let val = (self.0 >> 4usize) & 0x07; 3029 self.0 = (self.0 & !(0xffff << 16usize)) | (((val as u32) & 0xffff) << 16usize);
3102 super::vals::Mms(val as u8)
3103 } 3030 }
3104 #[doc = "Master mode selection"] 3031 }
3105 pub fn set_mms(&mut self, val: super::vals::Mms) { 3032 impl Default for Ur3 {
3106 self.0 = (self.0 & !(0x07 << 4usize)) | (((val.0 as u32) & 0x07) << 4usize); 3033 fn default() -> Ur3 {
3034 Ur3(0)
3107 } 3035 }
3108 #[doc = "TI1 selection"] 3036 }
3109 pub const fn ti1s(&self) -> super::vals::Tis { 3037 #[doc = "SYSCFG package register"]
3110 let val = (self.0 >> 7usize) & 0x01; 3038 #[repr(transparent)]
3111 super::vals::Tis(val as u8) 3039 #[derive(Copy, Clone, Eq, PartialEq)]
3040 pub struct Pkgr(pub u32);
3041 impl Pkgr {
3042 #[doc = "Package"]
3043 pub const fn pkg(&self) -> u8 {
3044 let val = (self.0 >> 0usize) & 0x0f;
3045 val as u8
3112 } 3046 }
3113 #[doc = "TI1 selection"] 3047 #[doc = "Package"]
3114 pub fn set_ti1s(&mut self, val: super::vals::Tis) { 3048 pub fn set_pkg(&mut self, val: u8) {
3115 self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize); 3049 self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize);
3116 } 3050 }
3117 #[doc = "Output Idle state 1"] 3051 }
3118 pub fn ois(&self, n: usize) -> bool { 3052 impl Default for Pkgr {
3119 assert!(n < 4usize); 3053 fn default() -> Pkgr {
3120 let offs = 8usize + n * 2usize; 3054 Pkgr(0)
3121 let val = (self.0 >> offs) & 0x01;
3122 val != 0
3123 } 3055 }
3124 #[doc = "Output Idle state 1"] 3056 }
3125 pub fn set_ois(&mut self, n: usize, val: bool) { 3057 #[doc = "SYSCFG user register 6"]
3126 assert!(n < 4usize); 3058 #[repr(transparent)]
3127 let offs = 8usize + n * 2usize; 3059 #[derive(Copy, Clone, Eq, PartialEq)]
3128 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); 3060 pub struct Ur6(pub u32);
3061 impl Ur6 {
3062 #[doc = "Protected area start address for bank 1"]
3063 pub const fn pa_beg_1(&self) -> u16 {
3064 let val = (self.0 >> 0usize) & 0x0fff;
3065 val as u16
3129 } 3066 }
3130 #[doc = "Output Idle state 1"] 3067 #[doc = "Protected area start address for bank 1"]
3131 pub const fn ois1n(&self) -> bool { 3068 pub fn set_pa_beg_1(&mut self, val: u16) {
3132 let val = (self.0 >> 9usize) & 0x01; 3069 self.0 = (self.0 & !(0x0fff << 0usize)) | (((val as u32) & 0x0fff) << 0usize);
3133 val != 0
3134 } 3070 }
3135 #[doc = "Output Idle state 1"] 3071 #[doc = "Protected area end address for bank 1"]
3136 pub fn set_ois1n(&mut self, val: bool) { 3072 pub const fn pa_end_1(&self) -> u16 {
3137 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); 3073 let val = (self.0 >> 16usize) & 0x0fff;
3074 val as u16
3138 } 3075 }
3139 #[doc = "Output Idle state 2"] 3076 #[doc = "Protected area end address for bank 1"]
3140 pub const fn ois2n(&self) -> bool { 3077 pub fn set_pa_end_1(&mut self, val: u16) {
3141 let val = (self.0 >> 11usize) & 0x01; 3078 self.0 = (self.0 & !(0x0fff << 16usize)) | (((val as u32) & 0x0fff) << 16usize);
3142 val != 0
3143 } 3079 }
3144 #[doc = "Output Idle state 2"] 3080 }
3145 pub fn set_ois2n(&mut self, val: bool) { 3081 impl Default for Ur6 {
3146 self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); 3082 fn default() -> Ur6 {
3083 Ur6(0)
3147 } 3084 }
3148 #[doc = "Output Idle state 3"] 3085 }
3149 pub const fn ois3n(&self) -> bool { 3086 #[doc = "external interrupt configuration register 2"]
3150 let val = (self.0 >> 13usize) & 0x01; 3087 #[repr(transparent)]
3151 val != 0 3088 #[derive(Copy, Clone, Eq, PartialEq)]
3089 pub struct Exticr(pub u32);
3090 impl Exticr {
3091 #[doc = "EXTI x configuration (x = 4 to 7)"]
3092 pub fn exti(&self, n: usize) -> u8 {
3093 assert!(n < 4usize);
3094 let offs = 0usize + n * 4usize;
3095 let val = (self.0 >> offs) & 0x0f;
3096 val as u8
3152 } 3097 }
3153 #[doc = "Output Idle state 3"] 3098 #[doc = "EXTI x configuration (x = 4 to 7)"]
3154 pub fn set_ois3n(&mut self, val: bool) { 3099 pub fn set_exti(&mut self, n: usize, val: u8) {
3155 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); 3100 assert!(n < 4usize);
3101 let offs = 0usize + n * 4usize;
3102 self.0 = (self.0 & !(0x0f << offs)) | (((val as u32) & 0x0f) << offs);
3156 } 3103 }
3157 } 3104 }
3158 impl Default for Cr2Adv { 3105 impl Default for Exticr {
3159 fn default() -> Cr2Adv { 3106 fn default() -> Exticr {
3160 Cr2Adv(0) 3107 Exticr(0)
3161 } 3108 }
3162 } 3109 }
3163 #[doc = "status register"] 3110 #[doc = "SYSCFG compensation cell value register"]
3164 #[repr(transparent)] 3111 #[repr(transparent)]
3165 #[derive(Copy, Clone, Eq, PartialEq)] 3112 #[derive(Copy, Clone, Eq, PartialEq)]
3166 pub struct SrBasic(pub u32); 3113 pub struct Ccvr(pub u32);
3167 impl SrBasic { 3114 impl Ccvr {
3168 #[doc = "Update interrupt flag"] 3115 #[doc = "NMOS compensation value"]
3169 pub const fn uif(&self) -> bool { 3116 pub const fn ncv(&self) -> u8 {
3170 let val = (self.0 >> 0usize) & 0x01; 3117 let val = (self.0 >> 0usize) & 0x0f;
3171 val != 0 3118 val as u8
3172 } 3119 }
3173 #[doc = "Update interrupt flag"] 3120 #[doc = "NMOS compensation value"]
3174 pub fn set_uif(&mut self, val: bool) { 3121 pub fn set_ncv(&mut self, val: u8) {
3175 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 3122 self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize);
3123 }
3124 #[doc = "PMOS compensation value"]
3125 pub const fn pcv(&self) -> u8 {
3126 let val = (self.0 >> 4usize) & 0x0f;
3127 val as u8
3128 }
3129 #[doc = "PMOS compensation value"]
3130 pub fn set_pcv(&mut self, val: u8) {
3131 self.0 = (self.0 & !(0x0f << 4usize)) | (((val as u32) & 0x0f) << 4usize);
3176 } 3132 }
3177 } 3133 }
3178 impl Default for SrBasic { 3134 impl Default for Ccvr {
3179 fn default() -> SrBasic { 3135 fn default() -> Ccvr {
3180 SrBasic(0) 3136 Ccvr(0)
3181 } 3137 }
3182 } 3138 }
3183 #[doc = "DMA/Interrupt enable register"] 3139 #[doc = "peripheral mode configuration register"]
3184 #[repr(transparent)] 3140 #[repr(transparent)]
3185 #[derive(Copy, Clone, Eq, PartialEq)] 3141 #[derive(Copy, Clone, Eq, PartialEq)]
3186 pub struct DierAdv(pub u32); 3142 pub struct Pmcr(pub u32);
3187 impl DierAdv { 3143 impl Pmcr {
3188 #[doc = "Update interrupt enable"] 3144 #[doc = "I2C1 Fm+"]
3189 pub const fn uie(&self) -> bool { 3145 pub const fn i2c1fmp(&self) -> bool {
3190 let val = (self.0 >> 0usize) & 0x01; 3146 let val = (self.0 >> 0usize) & 0x01;
3191 val != 0 3147 val != 0
3192 } 3148 }
3193 #[doc = "Update interrupt enable"] 3149 #[doc = "I2C1 Fm+"]
3194 pub fn set_uie(&mut self, val: bool) { 3150 pub fn set_i2c1fmp(&mut self, val: bool) {
3195 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 3151 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
3196 } 3152 }
3197 #[doc = "Capture/Compare 1 interrupt enable"] 3153 #[doc = "I2C2 Fm+"]
3198 pub fn ccie(&self, n: usize) -> bool { 3154 pub const fn i2c2fmp(&self) -> bool {
3199 assert!(n < 4usize); 3155 let val = (self.0 >> 1usize) & 0x01;
3200 let offs = 1usize + n * 1usize;
3201 let val = (self.0 >> offs) & 0x01;
3202 val != 0 3156 val != 0
3203 } 3157 }
3204 #[doc = "Capture/Compare 1 interrupt enable"] 3158 #[doc = "I2C2 Fm+"]
3205 pub fn set_ccie(&mut self, n: usize, val: bool) { 3159 pub fn set_i2c2fmp(&mut self, val: bool) {
3206 assert!(n < 4usize); 3160 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
3207 let offs = 1usize + n * 1usize;
3208 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
3209 } 3161 }
3210 #[doc = "COM interrupt enable"] 3162 #[doc = "I2C3 Fm+"]
3211 pub const fn comie(&self) -> bool { 3163 pub const fn i2c3fmp(&self) -> bool {
3212 let val = (self.0 >> 5usize) & 0x01; 3164 let val = (self.0 >> 2usize) & 0x01;
3213 val != 0 3165 val != 0
3214 } 3166 }
3215 #[doc = "COM interrupt enable"] 3167 #[doc = "I2C3 Fm+"]
3216 pub fn set_comie(&mut self, val: bool) { 3168 pub fn set_i2c3fmp(&mut self, val: bool) {
3217 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); 3169 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
3218 } 3170 }
3219 #[doc = "Trigger interrupt enable"] 3171 #[doc = "I2C4 Fm+"]
3220 pub const fn tie(&self) -> bool { 3172 pub const fn i2c4fmp(&self) -> bool {
3221 let val = (self.0 >> 6usize) & 0x01; 3173 let val = (self.0 >> 3usize) & 0x01;
3222 val != 0 3174 val != 0
3223 } 3175 }
3224 #[doc = "Trigger interrupt enable"] 3176 #[doc = "I2C4 Fm+"]
3225 pub fn set_tie(&mut self, val: bool) { 3177 pub fn set_i2c4fmp(&mut self, val: bool) {
3226 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); 3178 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
3227 } 3179 }
3228 #[doc = "Break interrupt enable"] 3180 #[doc = "PB(6) Fm+"]
3229 pub const fn bie(&self) -> bool { 3181 pub const fn pb6fmp(&self) -> bool {
3230 let val = (self.0 >> 7usize) & 0x01; 3182 let val = (self.0 >> 4usize) & 0x01;
3231 val != 0 3183 val != 0
3232 } 3184 }
3233 #[doc = "Break interrupt enable"] 3185 #[doc = "PB(6) Fm+"]
3234 pub fn set_bie(&mut self, val: bool) { 3186 pub fn set_pb6fmp(&mut self, val: bool) {
3235 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); 3187 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
3236 } 3188 }
3237 #[doc = "Update DMA request enable"] 3189 #[doc = "PB(7) Fast Mode Plus"]
3238 pub const fn ude(&self) -> bool { 3190 pub const fn pb7fmp(&self) -> bool {
3239 let val = (self.0 >> 8usize) & 0x01; 3191 let val = (self.0 >> 5usize) & 0x01;
3240 val != 0 3192 val != 0
3241 } 3193 }
3242 #[doc = "Update DMA request enable"] 3194 #[doc = "PB(7) Fast Mode Plus"]
3243 pub fn set_ude(&mut self, val: bool) { 3195 pub fn set_pb7fmp(&mut self, val: bool) {
3244 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); 3196 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
3245 } 3197 }
3246 #[doc = "Capture/Compare 1 DMA request enable"] 3198 #[doc = "PB(8) Fast Mode Plus"]
3247 pub fn ccde(&self, n: usize) -> bool { 3199 pub const fn pb8fmp(&self) -> bool {
3248 assert!(n < 4usize); 3200 let val = (self.0 >> 6usize) & 0x01;
3249 let offs = 9usize + n * 1usize;
3250 let val = (self.0 >> offs) & 0x01;
3251 val != 0 3201 val != 0
3252 } 3202 }
3253 #[doc = "Capture/Compare 1 DMA request enable"] 3203 #[doc = "PB(8) Fast Mode Plus"]
3254 pub fn set_ccde(&mut self, n: usize, val: bool) { 3204 pub fn set_pb8fmp(&mut self, val: bool) {
3255 assert!(n < 4usize); 3205 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
3256 let offs = 9usize + n * 1usize;
3257 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
3258 } 3206 }
3259 #[doc = "COM DMA request enable"] 3207 #[doc = "PB(9) Fm+"]
3260 pub const fn comde(&self) -> bool { 3208 pub const fn pb9fmp(&self) -> bool {
3261 let val = (self.0 >> 13usize) & 0x01; 3209 let val = (self.0 >> 7usize) & 0x01;
3262 val != 0 3210 val != 0
3263 } 3211 }
3264 #[doc = "COM DMA request enable"] 3212 #[doc = "PB(9) Fm+"]
3265 pub fn set_comde(&mut self, val: bool) { 3213 pub fn set_pb9fmp(&mut self, val: bool) {
3266 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); 3214 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
3267 } 3215 }
3268 #[doc = "Trigger DMA request enable"] 3216 #[doc = "Booster Enable"]
3269 pub const fn tde(&self) -> bool { 3217 pub const fn booste(&self) -> bool {
3270 let val = (self.0 >> 14usize) & 0x01; 3218 let val = (self.0 >> 8usize) & 0x01;
3271 val != 0 3219 val != 0
3272 } 3220 }
3273 #[doc = "Trigger DMA request enable"] 3221 #[doc = "Booster Enable"]
3274 pub fn set_tde(&mut self, val: bool) { 3222 pub fn set_booste(&mut self, val: bool) {
3275 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); 3223 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
3276 }
3277 }
3278 impl Default for DierAdv {
3279 fn default() -> DierAdv {
3280 DierAdv(0)
3281 } 3224 }
3282 } 3225 #[doc = "Analog switch supply voltage selection"]
3283 #[doc = "status register"] 3226 pub const fn boostvddsel(&self) -> bool {
3284 #[repr(transparent)] 3227 let val = (self.0 >> 9usize) & 0x01;
3285 #[derive(Copy, Clone, Eq, PartialEq)]
3286 pub struct SrGp(pub u32);
3287 impl SrGp {
3288 #[doc = "Update interrupt flag"]
3289 pub const fn uif(&self) -> bool {
3290 let val = (self.0 >> 0usize) & 0x01;
3291 val != 0 3228 val != 0
3292 } 3229 }
3293 #[doc = "Update interrupt flag"] 3230 #[doc = "Analog switch supply voltage selection"]
3294 pub fn set_uif(&mut self, val: bool) { 3231 pub fn set_boostvddsel(&mut self, val: bool) {
3295 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 3232 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
3296 } 3233 }
3297 #[doc = "Capture/compare 1 interrupt flag"] 3234 #[doc = "Ethernet PHY Interface Selection"]
3298 pub fn ccif(&self, n: usize) -> bool { 3235 pub const fn epis(&self) -> u8 {
3299 assert!(n < 4usize); 3236 let val = (self.0 >> 21usize) & 0x07;
3300 let offs = 1usize + n * 1usize; 3237 val as u8
3301 let val = (self.0 >> offs) & 0x01;
3302 val != 0
3303 } 3238 }
3304 #[doc = "Capture/compare 1 interrupt flag"] 3239 #[doc = "Ethernet PHY Interface Selection"]
3305 pub fn set_ccif(&mut self, n: usize, val: bool) { 3240 pub fn set_epis(&mut self, val: u8) {
3306 assert!(n < 4usize); 3241 self.0 = (self.0 & !(0x07 << 21usize)) | (((val as u32) & 0x07) << 21usize);
3307 let offs = 1usize + n * 1usize;
3308 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
3309 } 3242 }
3310 #[doc = "COM interrupt flag"] 3243 #[doc = "PA0 Switch Open"]
3311 pub const fn comif(&self) -> bool { 3244 pub const fn pa0so(&self) -> bool {
3312 let val = (self.0 >> 5usize) & 0x01; 3245 let val = (self.0 >> 24usize) & 0x01;
3313 val != 0 3246 val != 0
3314 } 3247 }
3315 #[doc = "COM interrupt flag"] 3248 #[doc = "PA0 Switch Open"]
3316 pub fn set_comif(&mut self, val: bool) { 3249 pub fn set_pa0so(&mut self, val: bool) {
3317 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); 3250 self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize);
3318 } 3251 }
3319 #[doc = "Trigger interrupt flag"] 3252 #[doc = "PA1 Switch Open"]
3320 pub const fn tif(&self) -> bool { 3253 pub const fn pa1so(&self) -> bool {
3321 let val = (self.0 >> 6usize) & 0x01; 3254 let val = (self.0 >> 25usize) & 0x01;
3322 val != 0 3255 val != 0
3323 } 3256 }
3324 #[doc = "Trigger interrupt flag"] 3257 #[doc = "PA1 Switch Open"]
3325 pub fn set_tif(&mut self, val: bool) { 3258 pub fn set_pa1so(&mut self, val: bool) {
3326 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); 3259 self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize);
3327 } 3260 }
3328 #[doc = "Break interrupt flag"] 3261 #[doc = "PC2 Switch Open"]
3329 pub const fn bif(&self) -> bool { 3262 pub const fn pc2so(&self) -> bool {
3330 let val = (self.0 >> 7usize) & 0x01; 3263 let val = (self.0 >> 26usize) & 0x01;
3331 val != 0 3264 val != 0
3332 } 3265 }
3333 #[doc = "Break interrupt flag"] 3266 #[doc = "PC2 Switch Open"]
3334 pub fn set_bif(&mut self, val: bool) { 3267 pub fn set_pc2so(&mut self, val: bool) {
3335 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); 3268 self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize);
3336 } 3269 }
3337 #[doc = "Capture/Compare 1 overcapture flag"] 3270 #[doc = "PC3 Switch Open"]
3338 pub fn ccof(&self, n: usize) -> bool { 3271 pub const fn pc3so(&self) -> bool {
3339 assert!(n < 4usize); 3272 let val = (self.0 >> 27usize) & 0x01;
3340 let offs = 9usize + n * 1usize;
3341 let val = (self.0 >> offs) & 0x01;
3342 val != 0 3273 val != 0
3343 } 3274 }
3344 #[doc = "Capture/Compare 1 overcapture flag"] 3275 #[doc = "PC3 Switch Open"]
3345 pub fn set_ccof(&mut self, n: usize, val: bool) { 3276 pub fn set_pc3so(&mut self, val: bool) {
3346 assert!(n < 4usize); 3277 self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize);
3347 let offs = 9usize + n * 1usize;
3348 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
3349 } 3278 }
3350 } 3279 }
3351 impl Default for SrGp { 3280 impl Default for Pmcr {
3352 fn default() -> SrGp { 3281 fn default() -> Pmcr {
3353 SrGp(0) 3282 Pmcr(0)
3354 } 3283 }
3355 } 3284 }
3356 #[doc = "capture/compare register 1"] 3285 #[doc = "SYSCFG power control register"]
3357 #[repr(transparent)] 3286 #[repr(transparent)]
3358 #[derive(Copy, Clone, Eq, PartialEq)] 3287 #[derive(Copy, Clone, Eq, PartialEq)]
3359 pub struct Ccr32(pub u32); 3288 pub struct Pwrcr(pub u32);
3360 impl Ccr32 { 3289 impl Pwrcr {
3361 #[doc = "Capture/Compare 1 value"] 3290 #[doc = "Overdrive enable"]
3362 pub const fn ccr(&self) -> u32 { 3291 pub const fn oden(&self) -> u8 {
3363 let val = (self.0 >> 0usize) & 0xffff_ffff; 3292 let val = (self.0 >> 0usize) & 0x0f;
3364 val as u32 3293 val as u8
3365 } 3294 }
3366 #[doc = "Capture/Compare 1 value"] 3295 #[doc = "Overdrive enable"]
3367 pub fn set_ccr(&mut self, val: u32) { 3296 pub fn set_oden(&mut self, val: u8) {
3368 self.0 = 3297 self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize);
3369 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
3370 } 3298 }
3371 } 3299 }
3372 impl Default for Ccr32 { 3300 impl Default for Pwrcr {
3373 fn default() -> Ccr32 { 3301 fn default() -> Pwrcr {
3374 Ccr32(0) 3302 Pwrcr(0)
3375 } 3303 }
3376 } 3304 }
3377 #[doc = "capture/compare register 1"] 3305 }
3378 #[repr(transparent)] 3306}
3379 #[derive(Copy, Clone, Eq, PartialEq)] 3307pub mod rng_v1 {
3380 pub struct Ccr16(pub u32); 3308 use crate::generic::*;
3381 impl Ccr16 { 3309 #[doc = "Random number generator"]
3382 #[doc = "Capture/Compare 1 value"] 3310 #[derive(Copy, Clone)]
3383 pub const fn ccr(&self) -> u16 { 3311 pub struct Rng(pub *mut u8);
3384 let val = (self.0 >> 0usize) & 0xffff; 3312 unsafe impl Send for Rng {}
3385 val as u16 3313 unsafe impl Sync for Rng {}
3386 } 3314 impl Rng {
3387 #[doc = "Capture/Compare 1 value"] 3315 #[doc = "control register"]
3388 pub fn set_ccr(&mut self, val: u16) { 3316 pub fn cr(self) -> Reg<regs::Cr, RW> {
3389 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); 3317 unsafe { Reg::from_ptr(self.0.add(0usize)) }
3390 }
3391 } 3318 }
3392 impl Default for Ccr16 { 3319 #[doc = "status register"]
3393 fn default() -> Ccr16 { 3320 pub fn sr(self) -> Reg<regs::Sr, RW> {
3394 Ccr16(0) 3321 unsafe { Reg::from_ptr(self.0.add(4usize)) }
3395 }
3396 } 3322 }
3397 #[doc = "capture/compare enable register"] 3323 #[doc = "data register"]
3324 pub fn dr(self) -> Reg<u32, R> {
3325 unsafe { Reg::from_ptr(self.0.add(8usize)) }
3326 }
3327 }
3328 pub mod regs {
3329 use crate::generic::*;
3330 #[doc = "status register"]
3398 #[repr(transparent)] 3331 #[repr(transparent)]
3399 #[derive(Copy, Clone, Eq, PartialEq)] 3332 #[derive(Copy, Clone, Eq, PartialEq)]
3400 pub struct CcerGp(pub u32); 3333 pub struct Sr(pub u32);
3401 impl CcerGp { 3334 impl Sr {
3402 #[doc = "Capture/Compare 1 output enable"] 3335 #[doc = "Data ready"]
3403 pub fn cce(&self, n: usize) -> bool { 3336 pub const fn drdy(&self) -> bool {
3404 assert!(n < 4usize); 3337 let val = (self.0 >> 0usize) & 0x01;
3405 let offs = 0usize + n * 4usize;
3406 let val = (self.0 >> offs) & 0x01;
3407 val != 0 3338 val != 0
3408 } 3339 }
3409 #[doc = "Capture/Compare 1 output enable"] 3340 #[doc = "Data ready"]
3410 pub fn set_cce(&mut self, n: usize, val: bool) { 3341 pub fn set_drdy(&mut self, val: bool) {
3411 assert!(n < 4usize); 3342 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
3412 let offs = 0usize + n * 4usize;
3413 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
3414 } 3343 }
3415 #[doc = "Capture/Compare 1 output Polarity"] 3344 #[doc = "Clock error current status"]
3416 pub fn ccp(&self, n: usize) -> bool { 3345 pub const fn cecs(&self) -> bool {
3417 assert!(n < 4usize); 3346 let val = (self.0 >> 1usize) & 0x01;
3418 let offs = 1usize + n * 4usize;
3419 let val = (self.0 >> offs) & 0x01;
3420 val != 0 3347 val != 0
3421 } 3348 }
3422 #[doc = "Capture/Compare 1 output Polarity"] 3349 #[doc = "Clock error current status"]
3423 pub fn set_ccp(&mut self, n: usize, val: bool) { 3350 pub fn set_cecs(&mut self, val: bool) {
3424 assert!(n < 4usize); 3351 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
3425 let offs = 1usize + n * 4usize;
3426 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
3427 } 3352 }
3428 #[doc = "Capture/Compare 1 output Polarity"] 3353 #[doc = "Seed error current status"]
3429 pub fn ccnp(&self, n: usize) -> bool { 3354 pub const fn secs(&self) -> bool {
3430 assert!(n < 4usize); 3355 let val = (self.0 >> 2usize) & 0x01;
3431 let offs = 3usize + n * 4usize;
3432 let val = (self.0 >> offs) & 0x01;
3433 val != 0 3356 val != 0
3434 } 3357 }
3435 #[doc = "Capture/Compare 1 output Polarity"] 3358 #[doc = "Seed error current status"]
3436 pub fn set_ccnp(&mut self, n: usize, val: bool) { 3359 pub fn set_secs(&mut self, val: bool) {
3437 assert!(n < 4usize); 3360 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
3438 let offs = 3usize + n * 4usize;
3439 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
3440 } 3361 }
3441 } 3362 #[doc = "Clock error interrupt status"]
3442 impl Default for CcerGp { 3363 pub const fn ceis(&self) -> bool {
3443 fn default() -> CcerGp { 3364 let val = (self.0 >> 5usize) & 0x01;
3444 CcerGp(0) 3365 val != 0
3445 } 3366 }
3446 } 3367 #[doc = "Clock error interrupt status"]
3447 #[doc = "control register 2"] 3368 pub fn set_ceis(&mut self, val: bool) {
3448 #[repr(transparent)] 3369 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
3449 #[derive(Copy, Clone, Eq, PartialEq)]
3450 pub struct Cr2Basic(pub u32);
3451 impl Cr2Basic {
3452 #[doc = "Master mode selection"]
3453 pub const fn mms(&self) -> super::vals::Mms {
3454 let val = (self.0 >> 4usize) & 0x07;
3455 super::vals::Mms(val as u8)
3456 } 3370 }
3457 #[doc = "Master mode selection"] 3371 #[doc = "Seed error interrupt status"]
3458 pub fn set_mms(&mut self, val: super::vals::Mms) { 3372 pub const fn seis(&self) -> bool {
3459 self.0 = (self.0 & !(0x07 << 4usize)) | (((val.0 as u32) & 0x07) << 4usize); 3373 let val = (self.0 >> 6usize) & 0x01;
3374 val != 0
3375 }
3376 #[doc = "Seed error interrupt status"]
3377 pub fn set_seis(&mut self, val: bool) {
3378 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
3460 } 3379 }
3461 } 3380 }
3462 impl Default for Cr2Basic { 3381 impl Default for Sr {
3463 fn default() -> Cr2Basic { 3382 fn default() -> Sr {
3464 Cr2Basic(0) 3383 Sr(0)
3465 } 3384 }
3466 } 3385 }
3467 #[doc = "prescaler"] 3386 #[doc = "control register"]
3468 #[repr(transparent)] 3387 #[repr(transparent)]
3469 #[derive(Copy, Clone, Eq, PartialEq)] 3388 #[derive(Copy, Clone, Eq, PartialEq)]
3470 pub struct Psc(pub u32); 3389 pub struct Cr(pub u32);
3471 impl Psc { 3390 impl Cr {
3472 #[doc = "Prescaler value"] 3391 #[doc = "Random number generator enable"]
3473 pub const fn psc(&self) -> u16 { 3392 pub const fn rngen(&self) -> bool {
3474 let val = (self.0 >> 0usize) & 0xffff; 3393 let val = (self.0 >> 2usize) & 0x01;
3475 val as u16 3394 val != 0
3476 } 3395 }
3477 #[doc = "Prescaler value"] 3396 #[doc = "Random number generator enable"]
3478 pub fn set_psc(&mut self, val: u16) { 3397 pub fn set_rngen(&mut self, val: bool) {
3479 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); 3398 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
3399 }
3400 #[doc = "Interrupt enable"]
3401 pub const fn ie(&self) -> bool {
3402 let val = (self.0 >> 3usize) & 0x01;
3403 val != 0
3404 }
3405 #[doc = "Interrupt enable"]
3406 pub fn set_ie(&mut self, val: bool) {
3407 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
3480 } 3408 }
3481 } 3409 }
3482 impl Default for Psc { 3410 impl Default for Cr {
3483 fn default() -> Psc { 3411 fn default() -> Cr {
3484 Psc(0) 3412 Cr(0)
3485 } 3413 }
3486 } 3414 }
3487 } 3415 }
3488 pub mod vals { 3416}
3489 use crate::generic::*; 3417pub mod usart_v1 {
3490 #[repr(transparent)] 3418 use crate::generic::*;
3491 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 3419 #[doc = "Universal synchronous asynchronous receiver transmitter"]
3492 pub struct Arpe(pub u8); 3420 #[derive(Copy, Clone)]
3493 impl Arpe { 3421 pub struct Usart(pub *mut u8);
3494 #[doc = "TIMx_APRR register is not buffered"] 3422 unsafe impl Send for Usart {}
3495 pub const DISABLED: Self = Self(0); 3423 unsafe impl Sync for Usart {}
3496 #[doc = "TIMx_APRR register is buffered"] 3424 impl Usart {
3497 pub const ENABLED: Self = Self(0x01); 3425 #[doc = "Status register"]
3426 pub fn sr(self) -> Reg<regs::Sr, RW> {
3427 unsafe { Reg::from_ptr(self.0.add(0usize)) }
3498 } 3428 }
3499 #[repr(transparent)] 3429 #[doc = "Data register"]
3500 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 3430 pub fn dr(self) -> Reg<regs::Dr, RW> {
3501 pub struct Etps(pub u8); 3431 unsafe { Reg::from_ptr(self.0.add(4usize)) }
3502 impl Etps {
3503 #[doc = "Prescaler OFF"]
3504 pub const DIV1: Self = Self(0);
3505 #[doc = "ETRP frequency divided by 2"]
3506 pub const DIV2: Self = Self(0x01);
3507 #[doc = "ETRP frequency divided by 4"]
3508 pub const DIV4: Self = Self(0x02);
3509 #[doc = "ETRP frequency divided by 8"]
3510 pub const DIV8: Self = Self(0x03);
3511 } 3432 }
3512 #[repr(transparent)] 3433 #[doc = "Baud rate register"]
3513 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 3434 pub fn brr(self) -> Reg<regs::Brr, RW> {
3514 pub struct Ossi(pub u8); 3435 unsafe { Reg::from_ptr(self.0.add(8usize)) }
3515 impl Ossi {
3516 #[doc = "When inactive, OC/OCN outputs are disabled"]
3517 pub const DISABLED: Self = Self(0);
3518 #[doc = "When inactive, OC/OCN outputs are forced to idle level"]
3519 pub const IDLELEVEL: Self = Self(0x01);
3520 } 3436 }
3521 #[repr(transparent)] 3437 #[doc = "Control register 1"]
3522 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 3438 pub fn cr1(self) -> Reg<regs::Cr1, RW> {
3523 pub struct Etp(pub u8); 3439 unsafe { Reg::from_ptr(self.0.add(12usize)) }
3524 impl Etp {
3525 #[doc = "ETR is noninverted, active at high level or rising edge"]
3526 pub const NOTINVERTED: Self = Self(0);
3527 #[doc = "ETR is inverted, active at low level or falling edge"]
3528 pub const INVERTED: Self = Self(0x01);
3529 } 3440 }
3530 #[repr(transparent)] 3441 #[doc = "Control register 2"]
3531 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 3442 pub fn cr2(self) -> Reg<regs::Cr2Usart, RW> {
3532 pub struct Ossr(pub u8); 3443 unsafe { Reg::from_ptr(self.0.add(16usize)) }
3533 impl Ossr {
3534 #[doc = "When inactive, OC/OCN outputs are disabled"]
3535 pub const DISABLED: Self = Self(0);
3536 #[doc = "When inactive, OC/OCN outputs are enabled with their inactive level"]
3537 pub const IDLELEVEL: Self = Self(0x01);
3538 } 3444 }
3539 #[repr(transparent)] 3445 #[doc = "Control register 3"]
3540 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 3446 pub fn cr3(self) -> Reg<regs::Cr3Usart, RW> {
3541 pub struct Mms(pub u8); 3447 unsafe { Reg::from_ptr(self.0.add(20usize)) }
3542 impl Mms {
3543 #[doc = "The UG bit from the TIMx_EGR register is used as trigger output"]
3544 pub const RESET: Self = Self(0);
3545 #[doc = "The counter enable signal, CNT_EN, is used as trigger output"]
3546 pub const ENABLE: Self = Self(0x01);
3547 #[doc = "The update event is selected as trigger output"]
3548 pub const UPDATE: Self = Self(0x02);
3549 #[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"]
3550 pub const COMPAREPULSE: Self = Self(0x03);
3551 #[doc = "OC1REF signal is used as trigger output"]
3552 pub const COMPAREOC1: Self = Self(0x04);
3553 #[doc = "OC2REF signal is used as trigger output"]
3554 pub const COMPAREOC2: Self = Self(0x05);
3555 #[doc = "OC3REF signal is used as trigger output"]
3556 pub const COMPAREOC3: Self = Self(0x06);
3557 #[doc = "OC4REF signal is used as trigger output"]
3558 pub const COMPAREOC4: Self = Self(0x07);
3559 } 3448 }
3560 #[repr(transparent)] 3449 #[doc = "Guard time and prescaler register"]
3561 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 3450 pub fn gtpr(self) -> Reg<regs::Gtpr, RW> {
3562 pub struct Ocpe(pub u8); 3451 unsafe { Reg::from_ptr(self.0.add(24usize)) }
3563 impl Ocpe {
3564 #[doc = "Preload register on CCR2 disabled. New values written to CCR2 are taken into account immediately"]
3565 pub const DISABLED: Self = Self(0);
3566 #[doc = "Preload register on CCR2 enabled. Preload value is loaded into active register on each update event"]
3567 pub const ENABLED: Self = Self(0x01);
3568 } 3452 }
3569 #[repr(transparent)] 3453 }
3570 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 3454 #[doc = "Universal asynchronous receiver transmitter"]
3571 pub struct Opm(pub u8); 3455 #[derive(Copy, Clone)]
3572 impl Opm { 3456 pub struct Uart(pub *mut u8);
3573 #[doc = "Counter is not stopped at update event"] 3457 unsafe impl Send for Uart {}
3574 pub const DISABLED: Self = Self(0); 3458 unsafe impl Sync for Uart {}
3575 #[doc = "Counter stops counting at the next update event (clearing the CEN bit)"] 3459 impl Uart {
3576 pub const ENABLED: Self = Self(0x01); 3460 #[doc = "Status register"]
3461 pub fn sr(self) -> Reg<regs::Sr, RW> {
3462 unsafe { Reg::from_ptr(self.0.add(0usize)) }
3577 } 3463 }
3578 #[repr(transparent)] 3464 #[doc = "Data register"]
3579 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 3465 pub fn dr(self) -> Reg<regs::Dr, RW> {
3580 pub struct Urs(pub u8); 3466 unsafe { Reg::from_ptr(self.0.add(4usize)) }
3581 impl Urs {
3582 #[doc = "Any of counter overflow/underflow, setting UG, or update through slave mode, generates an update interrupt or DMA request"]
3583 pub const ANYEVENT: Self = Self(0);
3584 #[doc = "Only counter overflow/underflow generates an update interrupt or DMA request"]
3585 pub const COUNTERONLY: Self = Self(0x01);
3586 } 3467 }
3587 #[repr(transparent)] 3468 #[doc = "Baud rate register"]
3588 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 3469 pub fn brr(self) -> Reg<regs::Brr, RW> {
3589 pub struct Dir(pub u8); 3470 unsafe { Reg::from_ptr(self.0.add(8usize)) }
3590 impl Dir {
3591 #[doc = "Counter used as upcounter"]
3592 pub const UP: Self = Self(0);
3593 #[doc = "Counter used as downcounter"]
3594 pub const DOWN: Self = Self(0x01);
3595 } 3471 }
3596 #[repr(transparent)] 3472 #[doc = "Control register 1"]
3597 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 3473 pub fn cr1(self) -> Reg<regs::Cr1, RW> {
3598 pub struct Icf(pub u8); 3474 unsafe { Reg::from_ptr(self.0.add(12usize)) }
3599 impl Icf {
3600 #[doc = "No filter, sampling is done at fDTS"]
3601 pub const NOFILTER: Self = Self(0);
3602 #[doc = "fSAMPLING=fCK_INT, N=2"]
3603 pub const FCK_INT_N2: Self = Self(0x01);
3604 #[doc = "fSAMPLING=fCK_INT, N=4"]
3605 pub const FCK_INT_N4: Self = Self(0x02);
3606 #[doc = "fSAMPLING=fCK_INT, N=8"]
3607 pub const FCK_INT_N8: Self = Self(0x03);
3608 #[doc = "fSAMPLING=fDTS/2, N=6"]
3609 pub const FDTS_DIV2_N6: Self = Self(0x04);
3610 #[doc = "fSAMPLING=fDTS/2, N=8"]
3611 pub const FDTS_DIV2_N8: Self = Self(0x05);
3612 #[doc = "fSAMPLING=fDTS/4, N=6"]
3613 pub const FDTS_DIV4_N6: Self = Self(0x06);
3614 #[doc = "fSAMPLING=fDTS/4, N=8"]
3615 pub const FDTS_DIV4_N8: Self = Self(0x07);
3616 #[doc = "fSAMPLING=fDTS/8, N=6"]
3617 pub const FDTS_DIV8_N6: Self = Self(0x08);
3618 #[doc = "fSAMPLING=fDTS/8, N=8"]
3619 pub const FDTS_DIV8_N8: Self = Self(0x09);
3620 #[doc = "fSAMPLING=fDTS/16, N=5"]
3621 pub const FDTS_DIV16_N5: Self = Self(0x0a);
3622 #[doc = "fSAMPLING=fDTS/16, N=6"]
3623 pub const FDTS_DIV16_N6: Self = Self(0x0b);
3624 #[doc = "fSAMPLING=fDTS/16, N=8"]
3625 pub const FDTS_DIV16_N8: Self = Self(0x0c);
3626 #[doc = "fSAMPLING=fDTS/32, N=5"]
3627 pub const FDTS_DIV32_N5: Self = Self(0x0d);
3628 #[doc = "fSAMPLING=fDTS/32, N=6"]
3629 pub const FDTS_DIV32_N6: Self = Self(0x0e);
3630 #[doc = "fSAMPLING=fDTS/32, N=8"]
3631 pub const FDTS_DIV32_N8: Self = Self(0x0f);
3632 } 3475 }
3633 #[repr(transparent)] 3476 #[doc = "Control register 2"]
3634 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 3477 pub fn cr2(self) -> Reg<regs::Cr2, RW> {
3635 pub struct Etf(pub u8); 3478 unsafe { Reg::from_ptr(self.0.add(16usize)) }
3636 impl Etf { 3479 }
3637 #[doc = "No filter, sampling is done at fDTS"] 3480 #[doc = "Control register 3"]
3638 pub const NOFILTER: Self = Self(0); 3481 pub fn cr3(self) -> Reg<regs::Cr3, RW> {
3639 #[doc = "fSAMPLING=fCK_INT, N=2"] 3482 unsafe { Reg::from_ptr(self.0.add(20usize)) }
3640 pub const FCK_INT_N2: Self = Self(0x01);
3641 #[doc = "fSAMPLING=fCK_INT, N=4"]
3642 pub const FCK_INT_N4: Self = Self(0x02);
3643 #[doc = "fSAMPLING=fCK_INT, N=8"]
3644 pub const FCK_INT_N8: Self = Self(0x03);
3645 #[doc = "fSAMPLING=fDTS/2, N=6"]
3646 pub const FDTS_DIV2_N6: Self = Self(0x04);
3647 #[doc = "fSAMPLING=fDTS/2, N=8"]
3648 pub const FDTS_DIV2_N8: Self = Self(0x05);
3649 #[doc = "fSAMPLING=fDTS/4, N=6"]
3650 pub const FDTS_DIV4_N6: Self = Self(0x06);
3651 #[doc = "fSAMPLING=fDTS/4, N=8"]
3652 pub const FDTS_DIV4_N8: Self = Self(0x07);
3653 #[doc = "fSAMPLING=fDTS/8, N=6"]
3654 pub const FDTS_DIV8_N6: Self = Self(0x08);
3655 #[doc = "fSAMPLING=fDTS/8, N=8"]
3656 pub const FDTS_DIV8_N8: Self = Self(0x09);
3657 #[doc = "fSAMPLING=fDTS/16, N=5"]
3658 pub const FDTS_DIV16_N5: Self = Self(0x0a);
3659 #[doc = "fSAMPLING=fDTS/16, N=6"]
3660 pub const FDTS_DIV16_N6: Self = Self(0x0b);
3661 #[doc = "fSAMPLING=fDTS/16, N=8"]
3662 pub const FDTS_DIV16_N8: Self = Self(0x0c);
3663 #[doc = "fSAMPLING=fDTS/32, N=5"]
3664 pub const FDTS_DIV32_N5: Self = Self(0x0d);
3665 #[doc = "fSAMPLING=fDTS/32, N=6"]
3666 pub const FDTS_DIV32_N6: Self = Self(0x0e);
3667 #[doc = "fSAMPLING=fDTS/32, N=8"]
3668 pub const FDTS_DIV32_N8: Self = Self(0x0f);
3669 } 3483 }
3484 }
3485 pub mod vals {
3486 use crate::generic::*;
3670 #[repr(transparent)] 3487 #[repr(transparent)]
3671 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 3488 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3672 pub struct Ocm(pub u8); 3489 pub struct M(pub u8);
3673 impl Ocm { 3490 impl M {
3674 #[doc = "The comparison between the output compare register TIMx_CCRy and the counter TIMx_CNT has no effect on the outputs"] 3491 #[doc = "8 data bits"]
3675 pub const FROZEN: Self = Self(0); 3492 pub const M8: Self = Self(0);
3676 #[doc = "Set channel to active level on match. OCyREF signal is forced high when the counter matches the capture/compare register"] 3493 #[doc = "9 data bits"]
3677 pub const ACTIVEONMATCH: Self = Self(0x01); 3494 pub const M9: Self = Self(0x01);
3678 #[doc = "Set channel to inactive level on match. OCyREF signal is forced low when the counter matches the capture/compare register"]
3679 pub const INACTIVEONMATCH: Self = Self(0x02);
3680 #[doc = "OCyREF toggles when TIMx_CNT=TIMx_CCRy"]
3681 pub const TOGGLE: Self = Self(0x03);
3682 #[doc = "OCyREF is forced low"]
3683 pub const FORCEINACTIVE: Self = Self(0x04);
3684 #[doc = "OCyREF is forced high"]
3685 pub const FORCEACTIVE: Self = Self(0x05);
3686 #[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"]
3687 pub const PWMMODE1: Self = Self(0x06);
3688 #[doc = "Inversely to PwmMode1"]
3689 pub const PWMMODE2: Self = Self(0x07);
3690 } 3495 }
3691 #[repr(transparent)] 3496 #[repr(transparent)]
3692 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 3497 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3693 pub struct Tis(pub u8); 3498 pub struct Cpha(pub u8);
3694 impl Tis { 3499 impl Cpha {
3695 #[doc = "The TIMx_CH1 pin is connected to TI1 input"] 3500 #[doc = "The first clock transition is the first data capture edge"]
3696 pub const NORMAL: Self = Self(0); 3501 pub const FIRST: Self = Self(0);
3697 #[doc = "The TIMx_CH1, CH2, CH3 pins are connected to TI1 input"] 3502 #[doc = "The second clock transition is the first data capture edge"]
3698 pub const XOR: Self = Self(0x01); 3503 pub const SECOND: Self = Self(0x01);
3699 } 3504 }
3700 #[repr(transparent)] 3505 #[repr(transparent)]
3701 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 3506 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3702 pub struct CcmrInputCcs(pub u8); 3507 pub struct Irlp(pub u8);
3703 impl CcmrInputCcs { 3508 impl Irlp {
3704 #[doc = "CCx channel is configured as input, normal mapping: ICx mapped to TIx"] 3509 #[doc = "Normal mode"]
3705 pub const TI4: Self = Self(0x01); 3510 pub const NORMAL: Self = Self(0);
3706 #[doc = "CCx channel is configured as input, alternate mapping (switches 1 with 2, 3 with 4)"] 3511 #[doc = "Low-power mode"]
3707 pub const TI3: Self = Self(0x02); 3512 pub const LOWPOWER: Self = Self(0x01);
3708 #[doc = "CCx channel is configured as input, ICx is mapped on TRC"]
3709 pub const TRC: Self = Self(0x03);
3710 } 3513 }
3711 #[repr(transparent)] 3514 #[repr(transparent)]
3712 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 3515 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3713 pub struct Msm(pub u8); 3516 pub struct Lbdl(pub u8);
3714 impl Msm { 3517 impl Lbdl {
3715 #[doc = "No action"] 3518 #[doc = "10-bit break detection"]
3716 pub const NOSYNC: Self = Self(0); 3519 pub const LBDL10: Self = Self(0);
3717 #[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."] 3520 #[doc = "11-bit break detection"]
3718 pub const SYNC: Self = Self(0x01); 3521 pub const LBDL11: Self = Self(0x01);
3719 } 3522 }
3720 #[repr(transparent)] 3523 #[repr(transparent)]
3721 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 3524 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3722 pub struct Ccds(pub u8); 3525 pub struct Sbk(pub u8);
3723 impl Ccds { 3526 impl Sbk {
3724 #[doc = "CCx DMA request sent when CCx event occurs"] 3527 #[doc = "No break character is transmitted"]
3725 pub const ONCOMPARE: Self = Self(0); 3528 pub const NOBREAK: Self = Self(0);
3726 #[doc = "CCx DMA request sent when update event occurs"] 3529 #[doc = "Break character transmitted"]
3727 pub const ONUPDATE: Self = Self(0x01); 3530 pub const BREAK: Self = Self(0x01);
3728 } 3531 }
3729 #[repr(transparent)] 3532 #[repr(transparent)]
3730 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 3533 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3731 pub struct Cms(pub u8); 3534 pub struct Hdsel(pub u8);
3732 impl Cms { 3535 impl Hdsel {
3733 #[doc = "The counter counts up or down depending on the direction bit"] 3536 #[doc = "Half duplex mode is not selected"]
3734 pub const EDGEALIGNED: Self = Self(0); 3537 pub const FULLDUPLEX: Self = Self(0);
3735 #[doc = "The counter counts up and down alternatively. Output compare interrupt flags are set only when the counter is counting down."] 3538 #[doc = "Half duplex mode is selected"]
3736 pub const CENTERALIGNED1: Self = Self(0x01); 3539 pub const HALFDUPLEX: Self = Self(0x01);
3737 #[doc = "The counter counts up and down alternatively. Output compare interrupt flags are set only when the counter is counting up."]
3738 pub const CENTERALIGNED2: Self = Self(0x02);
3739 #[doc = "The counter counts up and down alternatively. Output compare interrupt flags are set both when the counter is counting up or down."]
3740 pub const CENTERALIGNED3: Self = Self(0x03);
3741 } 3540 }
3742 #[repr(transparent)] 3541 #[repr(transparent)]
3743 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 3542 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3744 pub struct CcmrOutputCcs(pub u8); 3543 pub struct Rwu(pub u8);
3745 impl CcmrOutputCcs { 3544 impl Rwu {
3746 #[doc = "CCx channel is configured as output"] 3545 #[doc = "Receiver in active mode"]
3747 pub const OUTPUT: Self = Self(0); 3546 pub const ACTIVE: Self = Self(0);
3547 #[doc = "Receiver in mute mode"]
3548 pub const MUTE: Self = Self(0x01);
3748 } 3549 }
3749 #[repr(transparent)] 3550 #[repr(transparent)]
3750 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 3551 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3751 pub struct Ece(pub u8); 3552 pub struct Wake(pub u8);
3752 impl Ece { 3553 impl Wake {
3753 #[doc = "External clock mode 2 disabled"] 3554 #[doc = "USART wakeup on idle line"]
3754 pub const DISABLED: Self = Self(0); 3555 pub const IDLELINE: Self = Self(0);
3755 #[doc = "External clock mode 2 enabled. The counter is clocked by any active edge on the ETRF signal."] 3556 #[doc = "USART wakeup on address mark"]
3756 pub const ENABLED: Self = Self(0x01); 3557 pub const ADDRESSMARK: Self = Self(0x01);
3757 } 3558 }
3758 #[repr(transparent)] 3559 #[repr(transparent)]
3759 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 3560 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3760 pub struct Sms(pub u8); 3561 pub struct Stop(pub u8);
3761 impl Sms { 3562 impl Stop {
3762 #[doc = "Slave mode disabled - if CEN = ‘1 then the prescaler is clocked directly by the internal clock."] 3563 #[doc = "1 stop bit"]
3763 pub const DISABLED: Self = Self(0); 3564 pub const STOP1: Self = Self(0);
3764 #[doc = "Encoder mode 1 - Counter counts up/down on TI2FP1 edge depending on TI1FP2 level."] 3565 #[doc = "0.5 stop bits"]
3765 pub const ENCODER_MODE_1: Self = Self(0x01); 3566 pub const STOP0P5: Self = Self(0x01);
3766 #[doc = "Encoder mode 2 - Counter counts up/down on TI1FP2 edge depending on TI2FP1 level."] 3567 #[doc = "2 stop bits"]
3767 pub const ENCODER_MODE_2: Self = Self(0x02); 3568 pub const STOP2: Self = Self(0x02);
3768 #[doc = "Encoder mode 3 - Counter counts up/down on both TI1FP1 and TI2FP2 edges depending on the level of the other input."] 3569 #[doc = "1.5 stop bits"]
3769 pub const ENCODER_MODE_3: Self = Self(0x03); 3570 pub const STOP1P5: Self = Self(0x03);
3770 #[doc = "Reset Mode - Rising edge of the selected trigger input (TRGI) reinitializes the counter and generates an update of the registers."]
3771 pub const RESET_MODE: Self = Self(0x04);
3772 #[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."]
3773 pub const GATED_MODE: Self = Self(0x05);
3774 #[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."]
3775 pub const TRIGGER_MODE: Self = Self(0x06);
3776 #[doc = "External Clock Mode 1 - Rising edges of the selected trigger (TRGI) clock the counter."]
3777 pub const EXT_CLOCK_MODE: Self = Self(0x07);
3778 } 3571 }
3779 #[repr(transparent)] 3572 #[repr(transparent)]
3780 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 3573 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3781 pub struct Ckd(pub u8); 3574 pub struct Ps(pub u8);
3782 impl Ckd { 3575 impl Ps {
3783 #[doc = "t_DTS = t_CK_INT"] 3576 #[doc = "Even parity"]
3784 pub const DIV1: Self = Self(0); 3577 pub const EVEN: Self = Self(0);
3785 #[doc = "t_DTS = 2 × t_CK_INT"] 3578 #[doc = "Odd parity"]
3786 pub const DIV2: Self = Self(0x01); 3579 pub const ODD: Self = Self(0x01);
3787 #[doc = "t_DTS = 4 × t_CK_INT"]
3788 pub const DIV4: Self = Self(0x02);
3789 } 3580 }
3790 #[repr(transparent)] 3581 #[repr(transparent)]
3791 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 3582 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3792 pub struct Ts(pub u8); 3583 pub struct Cpol(pub u8);
3793 impl Ts { 3584 impl Cpol {
3794 #[doc = "Internal Trigger 0 (ITR0)"] 3585 #[doc = "Steady low value on CK pin outside transmission window"]
3795 pub const ITR0: Self = Self(0); 3586 pub const LOW: Self = Self(0);
3796 #[doc = "Internal Trigger 1 (ITR1)"] 3587 #[doc = "Steady high value on CK pin outside transmission window"]
3797 pub const ITR1: Self = Self(0x01); 3588 pub const HIGH: Self = Self(0x01);
3798 #[doc = "Internal Trigger 2 (ITR2)"]
3799 pub const ITR2: Self = Self(0x02);
3800 #[doc = "TI1 Edge Detector (TI1F_ED)"]
3801 pub const TI1F_ED: Self = Self(0x04);
3802 #[doc = "Filtered Timer Input 1 (TI1FP1)"]
3803 pub const TI1FP1: Self = Self(0x05);
3804 #[doc = "Filtered Timer Input 2 (TI2FP2)"]
3805 pub const TI2FP2: Self = Self(0x06);
3806 #[doc = "External Trigger input (ETRF)"]
3807 pub const ETRF: Self = Self(0x07);
3808 }
3809 }
3810}
3811pub mod syscfg_l4 {
3812 use crate::generic::*;
3813 #[doc = "System configuration controller"]
3814 #[derive(Copy, Clone)]
3815 pub struct Syscfg(pub *mut u8);
3816 unsafe impl Send for Syscfg {}
3817 unsafe impl Sync for Syscfg {}
3818 impl Syscfg {
3819 #[doc = "memory remap register"]
3820 pub fn memrmp(self) -> Reg<regs::Memrmp, RW> {
3821 unsafe { Reg::from_ptr(self.0.add(0usize)) }
3822 }
3823 #[doc = "configuration register 1"]
3824 pub fn cfgr1(self) -> Reg<regs::Cfgr1, RW> {
3825 unsafe { Reg::from_ptr(self.0.add(4usize)) }
3826 }
3827 #[doc = "external interrupt configuration register 1"]
3828 pub fn exticr(self, n: usize) -> Reg<regs::Exticr, RW> {
3829 assert!(n < 4usize);
3830 unsafe { Reg::from_ptr(self.0.add(8usize + n * 4usize)) }
3831 }
3832 #[doc = "SCSR"]
3833 pub fn scsr(self) -> Reg<regs::Scsr, RW> {
3834 unsafe { Reg::from_ptr(self.0.add(24usize)) }
3835 }
3836 #[doc = "CFGR2"]
3837 pub fn cfgr2(self) -> Reg<regs::Cfgr2, RW> {
3838 unsafe { Reg::from_ptr(self.0.add(28usize)) }
3839 }
3840 #[doc = "SWPR"]
3841 pub fn swpr(self) -> Reg<regs::Swpr, W> {
3842 unsafe { Reg::from_ptr(self.0.add(32usize)) }
3843 }
3844 #[doc = "SKR"]
3845 pub fn skr(self) -> Reg<regs::Skr, W> {
3846 unsafe { Reg::from_ptr(self.0.add(36usize)) }
3847 } 3589 }
3848 } 3590 }
3849 pub mod regs { 3591 pub mod regs {
3850 use crate::generic::*; 3592 use crate::generic::*;
3851 #[doc = "SCSR"] 3593 #[doc = "Control register 3"]
3852 #[repr(transparent)] 3594 #[repr(transparent)]
3853 #[derive(Copy, Clone, Eq, PartialEq)] 3595 #[derive(Copy, Clone, Eq, PartialEq)]
3854 pub struct Scsr(pub u32); 3596 pub struct Cr3Usart(pub u32);
3855 impl Scsr { 3597 impl Cr3Usart {
3856 #[doc = "SRAM2 Erase"] 3598 #[doc = "Error interrupt enable"]
3857 pub const fn sram2er(&self) -> bool { 3599 pub const fn eie(&self) -> bool {
3858 let val = (self.0 >> 0usize) & 0x01; 3600 let val = (self.0 >> 0usize) & 0x01;
3859 val != 0 3601 val != 0
3860 } 3602 }
3861 #[doc = "SRAM2 Erase"] 3603 #[doc = "Error interrupt enable"]
3862 pub fn set_sram2er(&mut self, val: bool) { 3604 pub fn set_eie(&mut self, val: bool) {
3863 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 3605 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
3864 } 3606 }
3865 #[doc = "SRAM2 busy by erase operation"] 3607 #[doc = "IrDA mode enable"]
3866 pub const fn sram2bsy(&self) -> bool { 3608 pub const fn iren(&self) -> bool {
3867 let val = (self.0 >> 1usize) & 0x01; 3609 let val = (self.0 >> 1usize) & 0x01;
3868 val != 0 3610 val != 0
3869 } 3611 }
3870 #[doc = "SRAM2 busy by erase operation"] 3612 #[doc = "IrDA mode enable"]
3871 pub fn set_sram2bsy(&mut self, val: bool) { 3613 pub fn set_iren(&mut self, val: bool) {
3872 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); 3614 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
3873 } 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 }
3625 #[doc = "Half-duplex selection"]
3626 pub const fn hdsel(&self) -> super::vals::Hdsel {
3627 let val = (self.0 >> 3usize) & 0x01;
3628 super::vals::Hdsel(val as u8)
3629 }
3630 #[doc = "Half-duplex selection"]
3631 pub fn set_hdsel(&mut self, val: super::vals::Hdsel) {
3632 self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize);
3633 }
3634 #[doc = "Smartcard NACK enable"]
3635 pub const fn nack(&self) -> bool {
3636 let val = (self.0 >> 4usize) & 0x01;
3637 val != 0
3638 }
3639 #[doc = "Smartcard NACK enable"]
3640 pub fn set_nack(&mut self, val: bool) {
3641 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
3642 }
3643 #[doc = "Smartcard mode enable"]
3644 pub const fn scen(&self) -> bool {
3645 let val = (self.0 >> 5usize) & 0x01;
3646 val != 0
3647 }
3648 #[doc = "Smartcard mode enable"]
3649 pub fn set_scen(&mut self, val: bool) {
3650 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
3651 }
3652 #[doc = "DMA enable receiver"]
3653 pub const fn dmar(&self) -> bool {
3654 let val = (self.0 >> 6usize) & 0x01;
3655 val != 0
3656 }
3657 #[doc = "DMA enable receiver"]
3658 pub fn set_dmar(&mut self, val: bool) {
3659 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
3660 }
3661 #[doc = "DMA enable transmitter"]
3662 pub const fn dmat(&self) -> bool {
3663 let val = (self.0 >> 7usize) & 0x01;
3664 val != 0
3665 }
3666 #[doc = "DMA enable transmitter"]
3667 pub fn set_dmat(&mut self, val: bool) {
3668 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
3669 }
3670 #[doc = "RTS enable"]
3671 pub const fn rtse(&self) -> bool {
3672 let val = (self.0 >> 8usize) & 0x01;
3673 val != 0
3674 }
3675 #[doc = "RTS enable"]
3676 pub fn set_rtse(&mut self, val: bool) {
3677 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
3678 }
3679 #[doc = "CTS enable"]
3680 pub const fn ctse(&self) -> bool {
3681 let val = (self.0 >> 9usize) & 0x01;
3682 val != 0
3683 }
3684 #[doc = "CTS enable"]
3685 pub fn set_ctse(&mut self, val: bool) {
3686 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
3687 }
3688 #[doc = "CTS interrupt enable"]
3689 pub const fn ctsie(&self) -> bool {
3690 let val = (self.0 >> 10usize) & 0x01;
3691 val != 0
3692 }
3693 #[doc = "CTS interrupt enable"]
3694 pub fn set_ctsie(&mut self, val: bool) {
3695 self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize);
3696 }
3874 } 3697 }
3875 impl Default for Scsr { 3698 impl Default for Cr3Usart {
3876 fn default() -> Scsr { 3699 fn default() -> Cr3Usart {
3877 Scsr(0) 3700 Cr3Usart(0)
3878 } 3701 }
3879 } 3702 }
3880 #[doc = "SKR"] 3703 #[doc = "Control register 3"]
3881 #[repr(transparent)] 3704 #[repr(transparent)]
3882 #[derive(Copy, Clone, Eq, PartialEq)] 3705 #[derive(Copy, Clone, Eq, PartialEq)]
3883 pub struct Skr(pub u32); 3706 pub struct Cr3(pub u32);
3884 impl Skr { 3707 impl Cr3 {
3885 #[doc = "SRAM2 write protection key for software erase"] 3708 #[doc = "Error interrupt enable"]
3886 pub const fn key(&self) -> u8 { 3709 pub const fn eie(&self) -> bool {
3887 let val = (self.0 >> 0usize) & 0xff; 3710 let val = (self.0 >> 0usize) & 0x01;
3888 val as u8 3711 val != 0
3889 } 3712 }
3890 #[doc = "SRAM2 write protection key for software erase"] 3713 #[doc = "Error interrupt enable"]
3891 pub fn set_key(&mut self, val: u8) { 3714 pub fn set_eie(&mut self, val: bool) {
3892 self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); 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 }
3731 #[doc = "IrDA low-power"]
3732 pub fn set_irlp(&mut self, val: super::vals::Irlp) {
3733 self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize);
3734 }
3735 #[doc = "Half-duplex selection"]
3736 pub const fn hdsel(&self) -> super::vals::Hdsel {
3737 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
3748 }
3749 #[doc = "DMA enable receiver"]
3750 pub fn set_dmar(&mut self, val: bool) {
3751 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
3752 }
3753 #[doc = "DMA enable transmitter"]
3754 pub const fn dmat(&self) -> bool {
3755 let val = (self.0 >> 7usize) & 0x01;
3756 val != 0
3757 }
3758 #[doc = "DMA enable transmitter"]
3759 pub fn set_dmat(&mut self, val: bool) {
3760 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
3893 } 3761 }
3894 } 3762 }
3895 impl Default for Skr { 3763 impl Default for Cr3 {
3896 fn default() -> Skr { 3764 fn default() -> Cr3 {
3897 Skr(0) 3765 Cr3(0)
3898 } 3766 }
3899 } 3767 }
3900 #[doc = "external interrupt configuration register 4"] 3768 #[doc = "Baud rate register"]
3901 #[repr(transparent)] 3769 #[repr(transparent)]
3902 #[derive(Copy, Clone, Eq, PartialEq)] 3770 #[derive(Copy, Clone, Eq, PartialEq)]
3903 pub struct Exticr(pub u32); 3771 pub struct Brr(pub u32);
3904 impl Exticr { 3772 impl Brr {
3905 #[doc = "EXTI12 configuration bits"] 3773 #[doc = "fraction of USARTDIV"]
3906 pub fn exti(&self, n: usize) -> u8 { 3774 pub const fn div_fraction(&self) -> u8 {
3907 assert!(n < 4usize); 3775 let val = (self.0 >> 0usize) & 0x0f;
3908 let offs = 0usize + n * 4usize;
3909 let val = (self.0 >> offs) & 0x0f;
3910 val as u8 3776 val as u8
3911 } 3777 }
3912 #[doc = "EXTI12 configuration bits"] 3778 #[doc = "fraction of USARTDIV"]
3913 pub fn set_exti(&mut self, n: usize, val: u8) { 3779 pub fn set_div_fraction(&mut self, val: u8) {
3914 assert!(n < 4usize); 3780 self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize);
3915 let offs = 0usize + n * 4usize; 3781 }
3916 self.0 = (self.0 & !(0x0f << offs)) | (((val as u32) & 0x0f) << offs); 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 }
3787 #[doc = "mantissa of USARTDIV"]
3788 pub fn set_div_mantissa(&mut self, val: u16) {
3789 self.0 = (self.0 & !(0x0fff << 4usize)) | (((val as u32) & 0x0fff) << 4usize);
3917 } 3790 }
3918 } 3791 }
3919 impl Default for Exticr { 3792 impl Default for Brr {
3920 fn default() -> Exticr { 3793 fn default() -> Brr {
3921 Exticr(0) 3794 Brr(0)
3922 } 3795 }
3923 } 3796 }
3924 #[doc = "memory remap register"] 3797 #[doc = "Control register 1"]
3925 #[repr(transparent)] 3798 #[repr(transparent)]
3926 #[derive(Copy, Clone, Eq, PartialEq)] 3799 #[derive(Copy, Clone, Eq, PartialEq)]
3927 pub struct Memrmp(pub u32); 3800 pub struct Cr1(pub u32);
3928 impl Memrmp { 3801 impl Cr1 {
3929 #[doc = "Memory mapping selection"] 3802 #[doc = "Send break"]
3930 pub const fn mem_mode(&self) -> u8 { 3803 pub const fn sbk(&self) -> super::vals::Sbk {
3931 let val = (self.0 >> 0usize) & 0x07; 3804 let val = (self.0 >> 0usize) & 0x01;
3932 val as u8 3805 super::vals::Sbk(val as u8)
3933 } 3806 }
3934 #[doc = "Memory mapping selection"] 3807 #[doc = "Send break"]
3935 pub fn set_mem_mode(&mut self, val: u8) { 3808 pub fn set_sbk(&mut self, val: super::vals::Sbk) {
3936 self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); 3809 self.0 = (self.0 & !(0x01 << 0usize)) | (((val.0 as u32) & 0x01) << 0usize);
3937 } 3810 }
3938 #[doc = "QUADSPI memory mapping swap"] 3811 #[doc = "Receiver wakeup"]
3939 pub const fn qfs(&self) -> bool { 3812 pub const fn rwu(&self) -> super::vals::Rwu {
3813 let val = (self.0 >> 1usize) & 0x01;
3814 super::vals::Rwu(val as u8)
3815 }
3816 #[doc = "Receiver wakeup"]
3817 pub fn set_rwu(&mut self, val: super::vals::Rwu) {
3818 self.0 = (self.0 & !(0x01 << 1usize)) | (((val.0 as u32) & 0x01) << 1usize);
3819 }
3820 #[doc = "Receiver enable"]
3821 pub const fn re(&self) -> bool {
3822 let val = (self.0 >> 2usize) & 0x01;
3823 val != 0
3824 }
3825 #[doc = "Receiver enable"]
3826 pub fn set_re(&mut self, val: bool) {
3827 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
3828 }
3829 #[doc = "Transmitter enable"]
3830 pub const fn te(&self) -> bool {
3940 let val = (self.0 >> 3usize) & 0x01; 3831 let val = (self.0 >> 3usize) & 0x01;
3941 val != 0 3832 val != 0
3942 } 3833 }
3943 #[doc = "QUADSPI memory mapping swap"] 3834 #[doc = "Transmitter enable"]
3944 pub fn set_qfs(&mut self, val: bool) { 3835 pub fn set_te(&mut self, val: bool) {
3945 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); 3836 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
3946 } 3837 }
3947 #[doc = "Flash Bank mode selection"] 3838 #[doc = "IDLE interrupt enable"]
3948 pub const fn fb_mode(&self) -> bool { 3839 pub const fn idleie(&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 {
3949 let val = (self.0 >> 8usize) & 0x01; 3876 let val = (self.0 >> 8usize) & 0x01;
3950 val != 0 3877 val != 0
3951 } 3878 }
3952 #[doc = "Flash Bank mode selection"] 3879 #[doc = "PE interrupt enable"]
3953 pub fn set_fb_mode(&mut self, val: bool) { 3880 pub fn set_peie(&mut self, val: bool) {
3954 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); 3881 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
3955 } 3882 }
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 }
3956 } 3928 }
3957 impl Default for Memrmp { 3929 impl Default for Cr1 {
3958 fn default() -> Memrmp { 3930 fn default() -> Cr1 {
3959 Memrmp(0) 3931 Cr1(0)
3960 } 3932 }
3961 } 3933 }
3962 #[doc = "CFGR2"] 3934 #[doc = "Guard time and prescaler register"]
3963 #[repr(transparent)] 3935 #[repr(transparent)]
3964 #[derive(Copy, Clone, Eq, PartialEq)] 3936 #[derive(Copy, Clone, Eq, PartialEq)]
3965 pub struct Cfgr2(pub u32); 3937 pub struct Gtpr(pub u32);
3966 impl Cfgr2 { 3938 impl Gtpr {
3967 #[doc = "Cortex LOCKUP (Hardfault) output enable bit"] 3939 #[doc = "Prescaler value"]
3968 pub const fn cll(&self) -> bool { 3940 pub const fn psc(&self) -> u8 {
3941 let val = (self.0 >> 0usize) & 0xff;
3942 val as u8
3943 }
3944 #[doc = "Prescaler value"]
3945 pub fn set_psc(&mut self, val: u8) {
3946 self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize);
3947 }
3948 #[doc = "Guard time value"]
3949 pub const fn gt(&self) -> u8 {
3950 let val = (self.0 >> 8usize) & 0xff;
3951 val as u8
3952 }
3953 #[doc = "Guard time value"]
3954 pub fn set_gt(&mut self, val: u8) {
3955 self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize);
3956 }
3957 }
3958 impl Default for Gtpr {
3959 fn default() -> Gtpr {
3960 Gtpr(0)
3961 }
3962 }
3963 #[doc = "Data register"]
3964 #[repr(transparent)]
3965 #[derive(Copy, Clone, Eq, PartialEq)]
3966 pub struct Dr(pub u32);
3967 impl Dr {
3968 #[doc = "Data value"]
3969 pub const fn dr(&self) -> u16 {
3970 let val = (self.0 >> 0usize) & 0x01ff;
3971 val as u16
3972 }
3973 #[doc = "Data value"]
3974 pub fn set_dr(&mut self, val: u16) {
3975 self.0 = (self.0 & !(0x01ff << 0usize)) | (((val as u32) & 0x01ff) << 0usize);
3976 }
3977 }
3978 impl Default for Dr {
3979 fn default() -> Dr {
3980 Dr(0)
3981 }
3982 }
3983 #[doc = "Status register"]
3984 #[repr(transparent)]
3985 #[derive(Copy, Clone, Eq, PartialEq)]
3986 pub struct Sr(pub u32);
3987 impl Sr {
3988 #[doc = "Parity error"]
3989 pub const fn pe(&self) -> bool {
3969 let val = (self.0 >> 0usize) & 0x01; 3990 let val = (self.0 >> 0usize) & 0x01;
3970 val != 0 3991 val != 0
3971 } 3992 }
3972 #[doc = "Cortex LOCKUP (Hardfault) output enable bit"] 3993 #[doc = "Parity error"]
3973 pub fn set_cll(&mut self, val: bool) { 3994 pub fn set_pe(&mut self, val: bool) {
3974 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 3995 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
3975 } 3996 }
3976 #[doc = "SRAM2 parity lock bit"] 3997 #[doc = "Framing error"]
3977 pub const fn spl(&self) -> bool { 3998 pub const fn fe(&self) -> bool {
3978 let val = (self.0 >> 1usize) & 0x01; 3999 let val = (self.0 >> 1usize) & 0x01;
3979 val != 0 4000 val != 0
3980 } 4001 }
3981 #[doc = "SRAM2 parity lock bit"] 4002 #[doc = "Framing error"]
3982 pub fn set_spl(&mut self, val: bool) { 4003 pub fn set_fe(&mut self, val: bool) {
3983 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); 4004 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
3984 } 4005 }
3985 #[doc = "PVD lock enable bit"] 4006 #[doc = "Noise error flag"]
3986 pub const fn pvdl(&self) -> bool { 4007 pub const fn ne(&self) -> bool {
3987 let val = (self.0 >> 2usize) & 0x01; 4008 let val = (self.0 >> 2usize) & 0x01;
3988 val != 0 4009 val != 0
3989 } 4010 }
3990 #[doc = "PVD lock enable bit"] 4011 #[doc = "Noise error flag"]
3991 pub fn set_pvdl(&mut self, val: bool) { 4012 pub fn set_ne(&mut self, val: bool) {
3992 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); 4013 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
3993 } 4014 }
3994 #[doc = "ECC Lock"] 4015 #[doc = "Overrun error"]
3995 pub const fn eccl(&self) -> bool { 4016 pub const fn ore(&self) -> bool {
3996 let val = (self.0 >> 3usize) & 0x01; 4017 let val = (self.0 >> 3usize) & 0x01;
3997 val != 0 4018 val != 0
3998 } 4019 }
3999 #[doc = "ECC Lock"] 4020 #[doc = "Overrun error"]
4000 pub fn set_eccl(&mut self, val: bool) { 4021 pub fn set_ore(&mut self, val: bool) {
4001 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); 4022 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
4002 } 4023 }
4003 #[doc = "SRAM2 parity error flag"] 4024 #[doc = "IDLE line detected"]
4004 pub const fn spf(&self) -> bool { 4025 pub const fn idle(&self) -> bool {
4026 let val = (self.0 >> 4usize) & 0x01;
4027 val != 0
4028 }
4029 #[doc = "IDLE line detected"]
4030 pub fn set_idle(&mut self, val: bool) {
4031 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
4032 }
4033 #[doc = "Read data register not empty"]
4034 pub const fn rxne(&self) -> bool {
4035 let val = (self.0 >> 5usize) & 0x01;
4036 val != 0
4037 }
4038 #[doc = "Read data register not empty"]
4039 pub fn set_rxne(&mut self, val: bool) {
4040 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
4041 }
4042 #[doc = "Transmission complete"]
4043 pub const fn tc(&self) -> bool {
4044 let val = (self.0 >> 6usize) & 0x01;
4045 val != 0
4046 }
4047 #[doc = "Transmission complete"]
4048 pub fn set_tc(&mut self, val: bool) {
4049 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
4050 }
4051 #[doc = "Transmit data register empty"]
4052 pub const fn txe(&self) -> bool {
4053 let val = (self.0 >> 7usize) & 0x01;
4054 val != 0
4055 }
4056 #[doc = "Transmit data register empty"]
4057 pub fn set_txe(&mut self, val: bool) {
4058 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
4059 }
4060 #[doc = "LIN break detection flag"]
4061 pub const fn lbd(&self) -> bool {
4005 let val = (self.0 >> 8usize) & 0x01; 4062 let val = (self.0 >> 8usize) & 0x01;
4006 val != 0 4063 val != 0
4007 } 4064 }
4008 #[doc = "SRAM2 parity error flag"] 4065 #[doc = "LIN break detection flag"]
4009 pub fn set_spf(&mut self, val: bool) { 4066 pub fn set_lbd(&mut self, val: bool) {
4010 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); 4067 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
4011 } 4068 }
4012 } 4069 }
4013 impl Default for Cfgr2 { 4070 impl Default for Sr {
4014 fn default() -> Cfgr2 { 4071 fn default() -> Sr {
4015 Cfgr2(0) 4072 Sr(0)
4016 } 4073 }
4017 } 4074 }
4018 #[doc = "configuration register 1"] 4075 #[doc = "Status register"]
4019 #[repr(transparent)] 4076 #[repr(transparent)]
4020 #[derive(Copy, Clone, Eq, PartialEq)] 4077 #[derive(Copy, Clone, Eq, PartialEq)]
4021 pub struct Cfgr1(pub u32); 4078 pub struct SrUsart(pub u32);
4022 impl Cfgr1 { 4079 impl SrUsart {
4023 #[doc = "Firewall disable"] 4080 #[doc = "Parity error"]
4024 pub const fn fwdis(&self) -> bool { 4081 pub const fn pe(&self) -> bool {
4025 let val = (self.0 >> 0usize) & 0x01; 4082 let val = (self.0 >> 0usize) & 0x01;
4026 val != 0 4083 val != 0
4027 } 4084 }
4028 #[doc = "Firewall disable"] 4085 #[doc = "Parity error"]
4029 pub fn set_fwdis(&mut self, val: bool) { 4086 pub fn set_pe(&mut self, val: bool) {
4030 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 4087 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
4031 } 4088 }
4032 #[doc = "I/O analog switch voltage booster enable"] 4089 #[doc = "Framing error"]
4033 pub const fn boosten(&self) -> bool { 4090 pub const fn fe(&self) -> bool {
4034 let val = (self.0 >> 8usize) & 0x01; 4091 let val = (self.0 >> 1usize) & 0x01;
4035 val != 0 4092 val != 0
4036 } 4093 }
4037 #[doc = "I/O analog switch voltage booster enable"] 4094 #[doc = "Framing error"]
4038 pub fn set_boosten(&mut self, val: bool) { 4095 pub fn set_fe(&mut self, val: bool) {
4039 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); 4096 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
4040 } 4097 }
4041 #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB6"] 4098 #[doc = "Noise error flag"]
4042 pub const fn i2c_pb6_fmp(&self) -> bool { 4099 pub const fn ne(&self) -> bool {
4043 let val = (self.0 >> 16usize) & 0x01; 4100 let val = (self.0 >> 2usize) & 0x01;
4044 val != 0 4101 val != 0
4045 } 4102 }
4046 #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB6"] 4103 #[doc = "Noise error flag"]
4047 pub fn set_i2c_pb6_fmp(&mut self, val: bool) { 4104 pub fn set_ne(&mut self, val: bool) {
4048 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); 4105 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
4049 } 4106 }
4050 #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB7"] 4107 #[doc = "Overrun error"]
4051 pub const fn i2c_pb7_fmp(&self) -> bool { 4108 pub const fn ore(&self) -> bool {
4052 let val = (self.0 >> 17usize) & 0x01; 4109 let val = (self.0 >> 3usize) & 0x01;
4053 val != 0 4110 val != 0
4054 } 4111 }
4055 #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB7"] 4112 #[doc = "Overrun error"]
4056 pub fn set_i2c_pb7_fmp(&mut self, val: bool) { 4113 pub fn set_ore(&mut self, val: bool) {
4057 self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); 4114 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
4058 } 4115 }
4059 #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB8"] 4116 #[doc = "IDLE line detected"]
4060 pub const fn i2c_pb8_fmp(&self) -> bool { 4117 pub const fn idle(&self) -> bool {
4061 let val = (self.0 >> 18usize) & 0x01; 4118 let val = (self.0 >> 4usize) & 0x01;
4062 val != 0 4119 val != 0
4063 } 4120 }
4064 #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB8"] 4121 #[doc = "IDLE line detected"]
4065 pub fn set_i2c_pb8_fmp(&mut self, val: bool) { 4122 pub fn set_idle(&mut self, val: bool) {
4066 self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); 4123 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
4067 } 4124 }
4068 #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB9"] 4125 #[doc = "Read data register not empty"]
4069 pub const fn i2c_pb9_fmp(&self) -> bool { 4126 pub const fn rxne(&self) -> bool {
4070 let val = (self.0 >> 19usize) & 0x01; 4127 let val = (self.0 >> 5usize) & 0x01;
4071 val != 0 4128 val != 0
4072 } 4129 }
4073 #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB9"] 4130 #[doc = "Read data register not empty"]
4074 pub fn set_i2c_pb9_fmp(&mut self, val: bool) { 4131 pub fn set_rxne(&mut self, val: bool) {
4075 self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize); 4132 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
4076 } 4133 }
4077 #[doc = "I2C1 Fast-mode Plus driving capability activation"] 4134 #[doc = "Transmission complete"]
4078 pub const fn i2c1_fmp(&self) -> bool { 4135 pub const fn tc(&self) -> bool {
4079 let val = (self.0 >> 20usize) & 0x01; 4136 let val = (self.0 >> 6usize) & 0x01;
4080 val != 0 4137 val != 0
4081 } 4138 }
4082 #[doc = "I2C1 Fast-mode Plus driving capability activation"] 4139 #[doc = "Transmission complete"]
4083 pub fn set_i2c1_fmp(&mut self, val: bool) { 4140 pub fn set_tc(&mut self, val: bool) {
4084 self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize); 4141 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
4085 } 4142 }
4086 #[doc = "I2C2 Fast-mode Plus driving capability activation"] 4143 #[doc = "Transmit data register empty"]
4087 pub const fn i2c2_fmp(&self) -> bool { 4144 pub const fn txe(&self) -> bool {
4088 let val = (self.0 >> 21usize) & 0x01; 4145 let val = (self.0 >> 7usize) & 0x01;
4089 val != 0 4146 val != 0
4090 } 4147 }
4091 #[doc = "I2C2 Fast-mode Plus driving capability activation"] 4148 #[doc = "Transmit data register empty"]
4092 pub fn set_i2c2_fmp(&mut self, val: bool) { 4149 pub fn set_txe(&mut self, val: bool) {
4093 self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize); 4150 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
4094 } 4151 }
4095 #[doc = "I2C3 Fast-mode Plus driving capability activation"] 4152 #[doc = "LIN break detection flag"]
4096 pub const fn i2c3_fmp(&self) -> bool { 4153 pub const fn lbd(&self) -> bool {
4097 let val = (self.0 >> 22usize) & 0x01; 4154 let val = (self.0 >> 8usize) & 0x01;
4098 val != 0 4155 val != 0
4099 } 4156 }
4100 #[doc = "I2C3 Fast-mode Plus driving capability activation"] 4157 #[doc = "LIN break detection flag"]
4101 pub fn set_i2c3_fmp(&mut self, val: bool) { 4158 pub fn set_lbd(&mut self, val: bool) {
4102 self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize); 4159 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
4103 } 4160 }
4104 #[doc = "Floating Point Unit interrupts enable bits"] 4161 #[doc = "CTS flag"]
4105 pub const fn fpu_ie(&self) -> u8 { 4162 pub const fn cts(&self) -> bool {
4106 let val = (self.0 >> 26usize) & 0x3f; 4163 let val = (self.0 >> 9usize) & 0x01;
4107 val as u8 4164 val != 0
4108 } 4165 }
4109 #[doc = "Floating Point Unit interrupts enable bits"] 4166 #[doc = "CTS flag"]
4110 pub fn set_fpu_ie(&mut self, val: u8) { 4167 pub fn set_cts(&mut self, val: bool) {
4111 self.0 = (self.0 & !(0x3f << 26usize)) | (((val as u32) & 0x3f) << 26usize); 4168 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
4112 } 4169 }
4113 } 4170 }
4114 impl Default for Cfgr1 { 4171 impl Default for SrUsart {
4115 fn default() -> Cfgr1 { 4172 fn default() -> SrUsart {
4116 Cfgr1(0) 4173 SrUsart(0)
4117 } 4174 }
4118 } 4175 }
4119 #[doc = "SWPR"] 4176 #[doc = "Control register 2"]
4120 #[repr(transparent)] 4177 #[repr(transparent)]
4121 #[derive(Copy, Clone, Eq, PartialEq)] 4178 #[derive(Copy, Clone, Eq, PartialEq)]
4122 pub struct Swpr(pub u32); 4179 pub struct Cr2(pub u32);
4123 impl Swpr { 4180 impl Cr2 {
4124 #[doc = "SRAWM2 write protection."] 4181 #[doc = "Address of the USART node"]
4125 pub fn pwp(&self, n: usize) -> bool { 4182 pub const fn add(&self) -> u8 {
4126 assert!(n < 32usize); 4183 let val = (self.0 >> 0usize) & 0x0f;
4127 let offs = 0usize + n * 1usize; 4184 val as u8
4128 let val = (self.0 >> offs) & 0x01; 4185 }
4186 #[doc = "Address of the USART node"]
4187 pub fn set_add(&mut self, val: u8) {
4188 self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize);
4189 }
4190 #[doc = "lin break detection length"]
4191 pub const fn lbdl(&self) -> super::vals::Lbdl {
4192 let val = (self.0 >> 5usize) & 0x01;
4193 super::vals::Lbdl(val as u8)
4194 }
4195 #[doc = "lin break detection length"]
4196 pub fn set_lbdl(&mut self, val: super::vals::Lbdl) {
4197 self.0 = (self.0 & !(0x01 << 5usize)) | (((val.0 as u32) & 0x01) << 5usize);
4198 }
4199 #[doc = "LIN break detection interrupt enable"]
4200 pub const fn lbdie(&self) -> bool {
4201 let val = (self.0 >> 6usize) & 0x01;
4129 val != 0 4202 val != 0
4130 } 4203 }
4131 #[doc = "SRAWM2 write protection."] 4204 #[doc = "LIN break detection interrupt enable"]
4132 pub fn set_pwp(&mut self, n: usize, val: bool) { 4205 pub fn set_lbdie(&mut self, val: bool) {
4133 assert!(n < 32usize); 4206 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
4134 let offs = 0usize + n * 1usize;
4135 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
4136 } 4207 }
4137 } 4208 #[doc = "STOP bits"]
4138 impl Default for Swpr { 4209 pub const fn stop(&self) -> super::vals::Stop {
4139 fn default() -> Swpr { 4210 let val = (self.0 >> 12usize) & 0x03;
4140 Swpr(0) 4211 super::vals::Stop(val as u8)
4141 } 4212 }
4142 } 4213 #[doc = "STOP bits"]
4143 } 4214 pub fn set_stop(&mut self, val: super::vals::Stop) {
4144} 4215 self.0 = (self.0 & !(0x03 << 12usize)) | (((val.0 as u32) & 0x03) << 12usize);
4145pub mod generic { 4216 }
4146 use core::marker::PhantomData; 4217 #[doc = "LIN mode enable"]
4147 #[derive(Copy, Clone)] 4218 pub const fn linen(&self) -> bool {
4148 pub struct RW; 4219 let val = (self.0 >> 14usize) & 0x01;
4149 #[derive(Copy, Clone)] 4220 val != 0
4150 pub struct R; 4221 }
4151 #[derive(Copy, Clone)] 4222 #[doc = "LIN mode enable"]
4152 pub struct W; 4223 pub fn set_linen(&mut self, val: bool) {
4153 mod sealed { 4224 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize);
4154 use super::*;
4155 pub trait Access {}
4156 impl Access for R {}
4157 impl Access for W {}
4158 impl Access for RW {}
4159 }
4160 pub trait Access: sealed::Access + Copy {}
4161 impl Access for R {}
4162 impl Access for W {}
4163 impl Access for RW {}
4164 pub trait Read: Access {}
4165 impl Read for RW {}
4166 impl Read for R {}
4167 pub trait Write: Access {}
4168 impl Write for RW {}
4169 impl Write for W {}
4170 #[derive(Copy, Clone)]
4171 pub struct Reg<T: Copy, A: Access> {
4172 ptr: *mut u8,
4173 phantom: PhantomData<*mut (T, A)>,
4174 }
4175 unsafe impl<T: Copy, A: Access> Send for Reg<T, A> {}
4176 unsafe impl<T: Copy, A: Access> Sync for Reg<T, A> {}
4177 impl<T: Copy, A: Access> Reg<T, A> {
4178 pub fn from_ptr(ptr: *mut u8) -> Self {
4179 Self {
4180 ptr,
4181 phantom: PhantomData,
4182 } 4225 }
4183 } 4226 }
4184 pub fn ptr(&self) -> *mut T { 4227 impl Default for Cr2 {
4185 self.ptr as _ 4228 fn default() -> Cr2 {
4186 } 4229 Cr2(0)
4187 } 4230 }
4188 impl<T: Copy, A: Read> Reg<T, A> {
4189 pub unsafe fn read(&self) -> T {
4190 (self.ptr as *mut T).read_volatile()
4191 }
4192 }
4193 impl<T: Copy, A: Write> Reg<T, A> {
4194 pub unsafe fn write_value(&self, val: T) {
4195 (self.ptr as *mut T).write_volatile(val)
4196 } 4231 }
4197 } 4232 #[doc = "Control register 2"]
4198 impl<T: Default + Copy, A: Write> Reg<T, A> { 4233 #[repr(transparent)]
4199 pub unsafe fn write<R>(&self, f: impl FnOnce(&mut T) -> R) -> R { 4234 #[derive(Copy, Clone, Eq, PartialEq)]
4200 let mut val = Default::default(); 4235 pub struct Cr2Usart(pub u32);
4201 let res = f(&mut val); 4236 impl Cr2Usart {
4202 self.write_value(val); 4237 #[doc = "Address of the USART node"]
4203 res 4238 pub const fn add(&self) -> u8 {
4239 let val = (self.0 >> 0usize) & 0x0f;
4240 val as u8
4241 }
4242 #[doc = "Address of the USART node"]
4243 pub fn set_add(&mut self, val: u8) {
4244 self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize);
4245 }
4246 #[doc = "lin break detection length"]
4247 pub const fn lbdl(&self) -> super::vals::Lbdl {
4248 let val = (self.0 >> 5usize) & 0x01;
4249 super::vals::Lbdl(val as u8)
4250 }
4251 #[doc = "lin break detection length"]
4252 pub fn set_lbdl(&mut self, val: super::vals::Lbdl) {
4253 self.0 = (self.0 & !(0x01 << 5usize)) | (((val.0 as u32) & 0x01) << 5usize);
4254 }
4255 #[doc = "LIN break detection interrupt enable"]
4256 pub const fn lbdie(&self) -> bool {
4257 let val = (self.0 >> 6usize) & 0x01;
4258 val != 0
4259 }
4260 #[doc = "LIN break detection interrupt enable"]
4261 pub fn set_lbdie(&mut self, val: bool) {
4262 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
4263 }
4264 #[doc = "Last bit clock pulse"]
4265 pub const fn lbcl(&self) -> bool {
4266 let val = (self.0 >> 8usize) & 0x01;
4267 val != 0
4268 }
4269 #[doc = "Last bit clock pulse"]
4270 pub fn set_lbcl(&mut self, val: bool) {
4271 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
4272 }
4273 #[doc = "Clock phase"]
4274 pub const fn cpha(&self) -> super::vals::Cpha {
4275 let val = (self.0 >> 9usize) & 0x01;
4276 super::vals::Cpha(val as u8)
4277 }
4278 #[doc = "Clock phase"]
4279 pub fn set_cpha(&mut self, val: super::vals::Cpha) {
4280 self.0 = (self.0 & !(0x01 << 9usize)) | (((val.0 as u32) & 0x01) << 9usize);
4281 }
4282 #[doc = "Clock polarity"]
4283 pub const fn cpol(&self) -> super::vals::Cpol {
4284 let val = (self.0 >> 10usize) & 0x01;
4285 super::vals::Cpol(val as u8)
4286 }
4287 #[doc = "Clock polarity"]
4288 pub fn set_cpol(&mut self, val: super::vals::Cpol) {
4289 self.0 = (self.0 & !(0x01 << 10usize)) | (((val.0 as u32) & 0x01) << 10usize);
4290 }
4291 #[doc = "Clock enable"]
4292 pub const fn clken(&self) -> bool {
4293 let val = (self.0 >> 11usize) & 0x01;
4294 val != 0
4295 }
4296 #[doc = "Clock enable"]
4297 pub fn set_clken(&mut self, val: bool) {
4298 self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize);
4299 }
4300 #[doc = "STOP bits"]
4301 pub const fn stop(&self) -> super::vals::Stop {
4302 let val = (self.0 >> 12usize) & 0x03;
4303 super::vals::Stop(val as u8)
4304 }
4305 #[doc = "STOP bits"]
4306 pub fn set_stop(&mut self, val: super::vals::Stop) {
4307 self.0 = (self.0 & !(0x03 << 12usize)) | (((val.0 as u32) & 0x03) << 12usize);
4308 }
4309 #[doc = "LIN mode enable"]
4310 pub const fn linen(&self) -> bool {
4311 let val = (self.0 >> 14usize) & 0x01;
4312 val != 0
4313 }
4314 #[doc = "LIN mode enable"]
4315 pub fn set_linen(&mut self, val: bool) {
4316 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize);
4317 }
4204 } 4318 }
4205 } 4319 impl Default for Cr2Usart {
4206 impl<T: Copy, A: Read + Write> Reg<T, A> { 4320 fn default() -> Cr2Usart {
4207 pub unsafe fn modify<R>(&self, f: impl FnOnce(&mut T) -> R) -> R { 4321 Cr2Usart(0)
4208 let mut val = self.read(); 4322 }
4209 let res = f(&mut val);
4210 self.write_value(val);
4211 res
4212 } 4323 }
4213 } 4324 }
4214} 4325}
@@ -4308,313 +4419,6 @@ pub mod sdmmc_v2 {
4308 } 4419 }
4309 pub mod regs { 4420 pub mod regs {
4310 use crate::generic::*; 4421 use crate::generic::*;
4311 #[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."]
4312 #[repr(transparent)]
4313 #[derive(Copy, Clone, Eq, PartialEq)]
4314 pub struct Idmactrlr(pub u32);
4315 impl Idmactrlr {
4316 #[doc = "IDMA enable This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
4317 pub const fn idmaen(&self) -> bool {
4318 let val = (self.0 >> 0usize) & 0x01;
4319 val != 0
4320 }
4321 #[doc = "IDMA enable This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
4322 pub fn set_idmaen(&mut self, val: bool) {
4323 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
4324 }
4325 #[doc = "Buffer mode selection. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
4326 pub const fn idmabmode(&self) -> bool {
4327 let val = (self.0 >> 1usize) & 0x01;
4328 val != 0
4329 }
4330 #[doc = "Buffer mode selection. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
4331 pub fn set_idmabmode(&mut self, val: bool) {
4332 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
4333 }
4334 #[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."]
4335 pub const fn idmabact(&self) -> bool {
4336 let val = (self.0 >> 2usize) & 0x01;
4337 val != 0
4338 }
4339 #[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."]
4340 pub fn set_idmabact(&mut self, val: bool) {
4341 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
4342 }
4343 }
4344 impl Default for Idmactrlr {
4345 fn default() -> Idmactrlr {
4346 Idmactrlr(0)
4347 }
4348 }
4349 #[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."]
4350 #[repr(transparent)]
4351 #[derive(Copy, Clone, Eq, PartialEq)]
4352 pub struct Dlenr(pub u32);
4353 impl Dlenr {
4354 #[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."]
4355 pub const fn datalength(&self) -> u32 {
4356 let val = (self.0 >> 0usize) & 0x01ff_ffff;
4357 val as u32
4358 }
4359 #[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."]
4360 pub fn set_datalength(&mut self, val: u32) {
4361 self.0 =
4362 (self.0 & !(0x01ff_ffff << 0usize)) | (((val as u32) & 0x01ff_ffff) << 0usize);
4363 }
4364 }
4365 impl Default for Dlenr {
4366 fn default() -> Dlenr {
4367 Dlenr(0)
4368 }
4369 }
4370 #[doc = "The SDMMC_CLKCR register controls the SDMMC_CK output clock, the SDMMC_RX_CLK receive clock, and the bus width."]
4371 #[repr(transparent)]
4372 #[derive(Copy, Clone, Eq, PartialEq)]
4373 pub struct Clkcr(pub u32);
4374 impl Clkcr {
4375 #[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.."]
4376 pub const fn clkdiv(&self) -> u16 {
4377 let val = (self.0 >> 0usize) & 0x03ff;
4378 val as u16
4379 }
4380 #[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.."]
4381 pub fn set_clkdiv(&mut self, val: u16) {
4382 self.0 = (self.0 & !(0x03ff << 0usize)) | (((val as u32) & 0x03ff) << 0usize);
4383 }
4384 #[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:"]
4385 pub const fn pwrsav(&self) -> bool {
4386 let val = (self.0 >> 12usize) & 0x01;
4387 val != 0
4388 }
4389 #[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:"]
4390 pub fn set_pwrsav(&mut self, val: bool) {
4391 self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize);
4392 }
4393 #[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)"]
4394 pub const fn widbus(&self) -> u8 {
4395 let val = (self.0 >> 14usize) & 0x03;
4396 val as u8
4397 }
4398 #[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)"]
4399 pub fn set_widbus(&mut self, val: u8) {
4400 self.0 = (self.0 & !(0x03 << 14usize)) | (((val as u32) & 0x03) << 14usize);
4401 }
4402 #[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."]
4403 pub const fn negedge(&self) -> bool {
4404 let val = (self.0 >> 16usize) & 0x01;
4405 val != 0
4406 }
4407 #[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."]
4408 pub fn set_negedge(&mut self, val: bool) {
4409 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
4410 }
4411 #[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."]
4412 pub const fn hwfc_en(&self) -> bool {
4413 let val = (self.0 >> 17usize) & 0x01;
4414 val != 0
4415 }
4416 #[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."]
4417 pub fn set_hwfc_en(&mut self, val: bool) {
4418 self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize);
4419 }
4420 #[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)"]
4421 pub const fn ddr(&self) -> bool {
4422 let val = (self.0 >> 18usize) & 0x01;
4423 val != 0
4424 }
4425 #[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)"]
4426 pub fn set_ddr(&mut self, val: bool) {
4427 self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize);
4428 }
4429 #[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)"]
4430 pub const fn busspeed(&self) -> bool {
4431 let val = (self.0 >> 19usize) & 0x01;
4432 val != 0
4433 }
4434 #[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)"]
4435 pub fn set_busspeed(&mut self, val: bool) {
4436 self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize);
4437 }
4438 #[doc = "Receive clock selection. These bits can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0)"]
4439 pub const fn selclkrx(&self) -> u8 {
4440 let val = (self.0 >> 20usize) & 0x03;
4441 val as u8
4442 }
4443 #[doc = "Receive clock selection. These bits can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0)"]
4444 pub fn set_selclkrx(&mut self, val: u8) {
4445 self.0 = (self.0 & !(0x03 << 20usize)) | (((val as u32) & 0x03) << 20usize);
4446 }
4447 }
4448 impl Default for Clkcr {
4449 fn default() -> Clkcr {
4450 Clkcr(0)
4451 }
4452 }
4453 #[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."]
4454 #[repr(transparent)]
4455 #[derive(Copy, Clone, Eq, PartialEq)]
4456 pub struct Idmabase0r(pub u32);
4457 impl Idmabase0r {
4458 #[doc = "Buffer 0 memory base address bits [31:2], shall be word aligned (bit [1:0]
4459are 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)."]
4460 pub const fn idmabase0(&self) -> u32 {
4461 let val = (self.0 >> 0usize) & 0xffff_ffff;
4462 val as u32
4463 }
4464 #[doc = "Buffer 0 memory base address bits [31:2], shall be word aligned (bit [1:0]
4465are 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)."]
4466 pub fn set_idmabase0(&mut self, val: u32) {
4467 self.0 =
4468 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
4469 }
4470 }
4471 impl Default for Idmabase0r {
4472 fn default() -> Idmabase0r {
4473 Idmabase0r(0)
4474 }
4475 }
4476 #[doc = "The SDMMC_RESP1/2/3/4R registers contain the status of a card, which is part of the received response."]
4477 #[repr(transparent)]
4478 #[derive(Copy, Clone, Eq, PartialEq)]
4479 pub struct Resp2r(pub u32);
4480 impl Resp2r {
4481 #[doc = "see Table404."]
4482 pub const fn cardstatus2(&self) -> u32 {
4483 let val = (self.0 >> 0usize) & 0xffff_ffff;
4484 val as u32
4485 }
4486 #[doc = "see Table404."]
4487 pub fn set_cardstatus2(&mut self, val: u32) {
4488 self.0 =
4489 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
4490 }
4491 }
4492 impl Default for Resp2r {
4493 fn default() -> Resp2r {
4494 Resp2r(0)
4495 }
4496 }
4497 #[doc = "The SDMMC_IDMABSIZER register contains the buffers size when in double buffer configuration."]
4498 #[repr(transparent)]
4499 #[derive(Copy, Clone, Eq, PartialEq)]
4500 pub struct Idmabsizer(pub u32);
4501 impl Idmabsizer {
4502 #[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)."]
4503 pub const fn idmabndt(&self) -> u8 {
4504 let val = (self.0 >> 5usize) & 0xff;
4505 val as u8
4506 }
4507 #[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)."]
4508 pub fn set_idmabndt(&mut self, val: u8) {
4509 self.0 = (self.0 & !(0xff << 5usize)) | (((val as u32) & 0xff) << 5usize);
4510 }
4511 }
4512 impl Default for Idmabsizer {
4513 fn default() -> Idmabsizer {
4514 Idmabsizer(0)
4515 }
4516 }
4517 #[doc = "The SDMMC_DCTRL register control the data path state machine (DPSM)."]
4518 #[repr(transparent)]
4519 #[derive(Copy, Clone, Eq, PartialEq)]
4520 pub struct Dctrl(pub u32);
4521 impl Dctrl {
4522 #[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."]
4523 pub const fn dten(&self) -> bool {
4524 let val = (self.0 >> 0usize) & 0x01;
4525 val != 0
4526 }
4527 #[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."]
4528 pub fn set_dten(&mut self, val: bool) {
4529 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
4530 }
4531 #[doc = "Data transfer direction selection This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
4532 pub const fn dtdir(&self) -> bool {
4533 let val = (self.0 >> 1usize) & 0x01;
4534 val != 0
4535 }
4536 #[doc = "Data transfer direction selection This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
4537 pub fn set_dtdir(&mut self, val: bool) {
4538 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
4539 }
4540 #[doc = "Data transfer mode selection. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
4541 pub const fn dtmode(&self) -> u8 {
4542 let val = (self.0 >> 2usize) & 0x03;
4543 val as u8
4544 }
4545 #[doc = "Data transfer mode selection. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
4546 pub fn set_dtmode(&mut self, val: u8) {
4547 self.0 = (self.0 & !(0x03 << 2usize)) | (((val as u32) & 0x03) << 2usize);
4548 }
4549 #[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)"]
4550 pub const fn dblocksize(&self) -> u8 {
4551 let val = (self.0 >> 4usize) & 0x0f;
4552 val as u8
4553 }
4554 #[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)"]
4555 pub fn set_dblocksize(&mut self, val: u8) {
4556 self.0 = (self.0 & !(0x0f << 4usize)) | (((val as u32) & 0x0f) << 4usize);
4557 }
4558 #[doc = "Read wait start. If this bit is set, read wait operation starts."]
4559 pub const fn rwstart(&self) -> bool {
4560 let val = (self.0 >> 8usize) & 0x01;
4561 val != 0
4562 }
4563 #[doc = "Read wait start. If this bit is set, read wait operation starts."]
4564 pub fn set_rwstart(&mut self, val: bool) {
4565 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
4566 }
4567 #[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."]
4568 pub const fn rwstop(&self) -> bool {
4569 let val = (self.0 >> 9usize) & 0x01;
4570 val != 0
4571 }
4572 #[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."]
4573 pub fn set_rwstop(&mut self, val: bool) {
4574 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
4575 }
4576 #[doc = "Read wait mode. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
4577 pub const fn rwmod(&self) -> bool {
4578 let val = (self.0 >> 10usize) & 0x01;
4579 val != 0
4580 }
4581 #[doc = "Read wait mode. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
4582 pub fn set_rwmod(&mut self, val: bool) {
4583 self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize);
4584 }
4585 #[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."]
4586 pub const fn sdioen(&self) -> bool {
4587 let val = (self.0 >> 11usize) & 0x01;
4588 val != 0
4589 }
4590 #[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."]
4591 pub fn set_sdioen(&mut self, val: bool) {
4592 self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize);
4593 }
4594 #[doc = "Enable the reception of the boot acknowledgment. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
4595 pub const fn bootacken(&self) -> bool {
4596 let val = (self.0 >> 12usize) & 0x01;
4597 val != 0
4598 }
4599 #[doc = "Enable the reception of the boot acknowledgment. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
4600 pub fn set_bootacken(&mut self, val: bool) {
4601 self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize);
4602 }
4603 #[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."]
4604 pub const fn fiforst(&self) -> bool {
4605 let val = (self.0 >> 13usize) & 0x01;
4606 val != 0
4607 }
4608 #[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."]
4609 pub fn set_fiforst(&mut self, val: bool) {
4610 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize);
4611 }
4612 }
4613 impl Default for Dctrl {
4614 fn default() -> Dctrl {
4615 Dctrl(0)
4616 }
4617 }
4618 #[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)."] 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)."]
4619 #[repr(transparent)] 4423 #[repr(transparent)]
4620 #[derive(Copy, Clone, Eq, PartialEq)] 4424 #[derive(Copy, Clone, Eq, PartialEq)]
@@ -4725,309 +4529,6 @@ are always 0 and read only). This register can be written by firmware when DPSM
4725 Cmdr(0) 4529 Cmdr(0)
4726 } 4530 }
4727 } 4531 }
4728 #[doc = "The SDMMC_RESP1/2/3/4R registers contain the status of a card, which is part of the received response."]
4729 #[repr(transparent)]
4730 #[derive(Copy, Clone, Eq, PartialEq)]
4731 pub struct Resp4r(pub u32);
4732 impl Resp4r {
4733 #[doc = "see Table404."]
4734 pub const fn cardstatus4(&self) -> u32 {
4735 let val = (self.0 >> 0usize) & 0xffff_ffff;
4736 val as u32
4737 }
4738 #[doc = "see Table404."]
4739 pub fn set_cardstatus4(&mut self, val: u32) {
4740 self.0 =
4741 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
4742 }
4743 }
4744 impl Default for Resp4r {
4745 fn default() -> Resp4r {
4746 Resp4r(0)
4747 }
4748 }
4749 #[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."]
4750 #[repr(transparent)]
4751 #[derive(Copy, Clone, Eq, PartialEq)]
4752 pub struct Icr(pub u32);
4753 impl Icr {
4754 #[doc = "CCRCFAIL flag clear bit Set by software to clear the CCRCFAIL flag."]
4755 pub const fn ccrcfailc(&self) -> bool {
4756 let val = (self.0 >> 0usize) & 0x01;
4757 val != 0
4758 }
4759 #[doc = "CCRCFAIL flag clear bit Set by software to clear the CCRCFAIL flag."]
4760 pub fn set_ccrcfailc(&mut self, val: bool) {
4761 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
4762 }
4763 #[doc = "DCRCFAIL flag clear bit Set by software to clear the DCRCFAIL flag."]
4764 pub const fn dcrcfailc(&self) -> bool {
4765 let val = (self.0 >> 1usize) & 0x01;
4766 val != 0
4767 }
4768 #[doc = "DCRCFAIL flag clear bit Set by software to clear the DCRCFAIL flag."]
4769 pub fn set_dcrcfailc(&mut self, val: bool) {
4770 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
4771 }
4772 #[doc = "CTIMEOUT flag clear bit Set by software to clear the CTIMEOUT flag."]
4773 pub const fn ctimeoutc(&self) -> bool {
4774 let val = (self.0 >> 2usize) & 0x01;
4775 val != 0
4776 }
4777 #[doc = "CTIMEOUT flag clear bit Set by software to clear the CTIMEOUT flag."]
4778 pub fn set_ctimeoutc(&mut self, val: bool) {
4779 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
4780 }
4781 #[doc = "DTIMEOUT flag clear bit Set by software to clear the DTIMEOUT flag."]
4782 pub const fn dtimeoutc(&self) -> bool {
4783 let val = (self.0 >> 3usize) & 0x01;
4784 val != 0
4785 }
4786 #[doc = "DTIMEOUT flag clear bit Set by software to clear the DTIMEOUT flag."]
4787 pub fn set_dtimeoutc(&mut self, val: bool) {
4788 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
4789 }
4790 #[doc = "TXUNDERR flag clear bit Set by software to clear TXUNDERR flag."]
4791 pub const fn txunderrc(&self) -> bool {
4792 let val = (self.0 >> 4usize) & 0x01;
4793 val != 0
4794 }
4795 #[doc = "TXUNDERR flag clear bit Set by software to clear TXUNDERR flag."]
4796 pub fn set_txunderrc(&mut self, val: bool) {
4797 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
4798 }
4799 #[doc = "RXOVERR flag clear bit Set by software to clear the RXOVERR flag."]
4800 pub const fn rxoverrc(&self) -> bool {
4801 let val = (self.0 >> 5usize) & 0x01;
4802 val != 0
4803 }
4804 #[doc = "RXOVERR flag clear bit Set by software to clear the RXOVERR flag."]
4805 pub fn set_rxoverrc(&mut self, val: bool) {
4806 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
4807 }
4808 #[doc = "CMDREND flag clear bit Set by software to clear the CMDREND flag."]
4809 pub const fn cmdrendc(&self) -> bool {
4810 let val = (self.0 >> 6usize) & 0x01;
4811 val != 0
4812 }
4813 #[doc = "CMDREND flag clear bit Set by software to clear the CMDREND flag."]
4814 pub fn set_cmdrendc(&mut self, val: bool) {
4815 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
4816 }
4817 #[doc = "CMDSENT flag clear bit Set by software to clear the CMDSENT flag."]
4818 pub const fn cmdsentc(&self) -> bool {
4819 let val = (self.0 >> 7usize) & 0x01;
4820 val != 0
4821 }
4822 #[doc = "CMDSENT flag clear bit Set by software to clear the CMDSENT flag."]
4823 pub fn set_cmdsentc(&mut self, val: bool) {
4824 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
4825 }
4826 #[doc = "DATAEND flag clear bit Set by software to clear the DATAEND flag."]
4827 pub const fn dataendc(&self) -> bool {
4828 let val = (self.0 >> 8usize) & 0x01;
4829 val != 0
4830 }
4831 #[doc = "DATAEND flag clear bit Set by software to clear the DATAEND flag."]
4832 pub fn set_dataendc(&mut self, val: bool) {
4833 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
4834 }
4835 #[doc = "DHOLD flag clear bit Set by software to clear the DHOLD flag."]
4836 pub const fn dholdc(&self) -> bool {
4837 let val = (self.0 >> 9usize) & 0x01;
4838 val != 0
4839 }
4840 #[doc = "DHOLD flag clear bit Set by software to clear the DHOLD flag."]
4841 pub fn set_dholdc(&mut self, val: bool) {
4842 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
4843 }
4844 #[doc = "DBCKEND flag clear bit Set by software to clear the DBCKEND flag."]
4845 pub const fn dbckendc(&self) -> bool {
4846 let val = (self.0 >> 10usize) & 0x01;
4847 val != 0
4848 }
4849 #[doc = "DBCKEND flag clear bit Set by software to clear the DBCKEND flag."]
4850 pub fn set_dbckendc(&mut self, val: bool) {
4851 self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize);
4852 }
4853 #[doc = "DABORT flag clear bit Set by software to clear the DABORT flag."]
4854 pub const fn dabortc(&self) -> bool {
4855 let val = (self.0 >> 11usize) & 0x01;
4856 val != 0
4857 }
4858 #[doc = "DABORT flag clear bit Set by software to clear the DABORT flag."]
4859 pub fn set_dabortc(&mut self, val: bool) {
4860 self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize);
4861 }
4862 #[doc = "BUSYD0END flag clear bit Set by software to clear the BUSYD0END flag."]
4863 pub const fn busyd0endc(&self) -> bool {
4864 let val = (self.0 >> 21usize) & 0x01;
4865 val != 0
4866 }
4867 #[doc = "BUSYD0END flag clear bit Set by software to clear the BUSYD0END flag."]
4868 pub fn set_busyd0endc(&mut self, val: bool) {
4869 self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize);
4870 }
4871 #[doc = "SDIOIT flag clear bit Set by software to clear the SDIOIT flag."]
4872 pub const fn sdioitc(&self) -> bool {
4873 let val = (self.0 >> 22usize) & 0x01;
4874 val != 0
4875 }
4876 #[doc = "SDIOIT flag clear bit Set by software to clear the SDIOIT flag."]
4877 pub fn set_sdioitc(&mut self, val: bool) {
4878 self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize);
4879 }
4880 #[doc = "ACKFAIL flag clear bit Set by software to clear the ACKFAIL flag."]
4881 pub const fn ackfailc(&self) -> bool {
4882 let val = (self.0 >> 23usize) & 0x01;
4883 val != 0
4884 }
4885 #[doc = "ACKFAIL flag clear bit Set by software to clear the ACKFAIL flag."]
4886 pub fn set_ackfailc(&mut self, val: bool) {
4887 self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize);
4888 }
4889 #[doc = "ACKTIMEOUT flag clear bit Set by software to clear the ACKTIMEOUT flag."]
4890 pub const fn acktimeoutc(&self) -> bool {
4891 let val = (self.0 >> 24usize) & 0x01;
4892 val != 0
4893 }
4894 #[doc = "ACKTIMEOUT flag clear bit Set by software to clear the ACKTIMEOUT flag."]
4895 pub fn set_acktimeoutc(&mut self, val: bool) {
4896 self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize);
4897 }
4898 #[doc = "VSWEND flag clear bit Set by software to clear the VSWEND flag."]
4899 pub const fn vswendc(&self) -> bool {
4900 let val = (self.0 >> 25usize) & 0x01;
4901 val != 0
4902 }
4903 #[doc = "VSWEND flag clear bit Set by software to clear the VSWEND flag."]
4904 pub fn set_vswendc(&mut self, val: bool) {
4905 self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize);
4906 }
4907 #[doc = "CKSTOP flag clear bit Set by software to clear the CKSTOP flag."]
4908 pub const fn ckstopc(&self) -> bool {
4909 let val = (self.0 >> 26usize) & 0x01;
4910 val != 0
4911 }
4912 #[doc = "CKSTOP flag clear bit Set by software to clear the CKSTOP flag."]
4913 pub fn set_ckstopc(&mut self, val: bool) {
4914 self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize);
4915 }
4916 #[doc = "IDMA transfer error clear bit Set by software to clear the IDMATE flag."]
4917 pub const fn idmatec(&self) -> bool {
4918 let val = (self.0 >> 27usize) & 0x01;
4919 val != 0
4920 }
4921 #[doc = "IDMA transfer error clear bit Set by software to clear the IDMATE flag."]
4922 pub fn set_idmatec(&mut self, val: bool) {
4923 self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize);
4924 }
4925 #[doc = "IDMA buffer transfer complete clear bit Set by software to clear the IDMABTC flag."]
4926 pub const fn idmabtcc(&self) -> bool {
4927 let val = (self.0 >> 28usize) & 0x01;
4928 val != 0
4929 }
4930 #[doc = "IDMA buffer transfer complete clear bit Set by software to clear the IDMABTC flag."]
4931 pub fn set_idmabtcc(&mut self, val: bool) {
4932 self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize);
4933 }
4934 }
4935 impl Default for Icr {
4936 fn default() -> Icr {
4937 Icr(0)
4938 }
4939 }
4940 #[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."]
4941 #[repr(transparent)]
4942 #[derive(Copy, Clone, Eq, PartialEq)]
4943 pub struct Dtimer(pub u32);
4944 impl Dtimer {
4945 #[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."]
4946 pub const fn datatime(&self) -> u32 {
4947 let val = (self.0 >> 0usize) & 0xffff_ffff;
4948 val as u32
4949 }
4950 #[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."]
4951 pub fn set_datatime(&mut self, val: u32) {
4952 self.0 =
4953 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
4954 }
4955 }
4956 impl Default for Dtimer {
4957 fn default() -> Dtimer {
4958 Dtimer(0)
4959 }
4960 }
4961 #[doc = "SDMMC IP version register"]
4962 #[repr(transparent)]
4963 #[derive(Copy, Clone, Eq, PartialEq)]
4964 pub struct Ver(pub u32);
4965 impl Ver {
4966 #[doc = "IP minor revision number."]
4967 pub const fn minrev(&self) -> u8 {
4968 let val = (self.0 >> 0usize) & 0x0f;
4969 val as u8
4970 }
4971 #[doc = "IP minor revision number."]
4972 pub fn set_minrev(&mut self, val: u8) {
4973 self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize);
4974 }
4975 #[doc = "IP major revision number."]
4976 pub const fn majrev(&self) -> u8 {
4977 let val = (self.0 >> 4usize) & 0x0f;
4978 val as u8
4979 }
4980 #[doc = "IP major revision number."]
4981 pub fn set_majrev(&mut self, val: u8) {
4982 self.0 = (self.0 & !(0x0f << 4usize)) | (((val as u32) & 0x0f) << 4usize);
4983 }
4984 }
4985 impl Default for Ver {
4986 fn default() -> Ver {
4987 Ver(0)
4988 }
4989 }
4990 #[doc = "SDMMC command response register"]
4991 #[repr(transparent)]
4992 #[derive(Copy, Clone, Eq, PartialEq)]
4993 pub struct Respcmdr(pub u32);
4994 impl Respcmdr {
4995 #[doc = "Response command index"]
4996 pub const fn respcmd(&self) -> u8 {
4997 let val = (self.0 >> 0usize) & 0x3f;
4998 val as u8
4999 }
5000 #[doc = "Response command index"]
5001 pub fn set_respcmd(&mut self, val: u8) {
5002 self.0 = (self.0 & !(0x3f << 0usize)) | (((val as u32) & 0x3f) << 0usize);
5003 }
5004 }
5005 impl Default for Respcmdr {
5006 fn default() -> Respcmdr {
5007 Respcmdr(0)
5008 }
5009 }
5010 #[doc = "The SDMMC_RESP1/2/3/4R registers contain the status of a card, which is part of the received response."]
5011 #[repr(transparent)]
5012 #[derive(Copy, Clone, Eq, PartialEq)]
5013 pub struct Resp1r(pub u32);
5014 impl Resp1r {
5015 #[doc = "see Table 432"]
5016 pub const fn cardstatus1(&self) -> u32 {
5017 let val = (self.0 >> 0usize) & 0xffff_ffff;
5018 val as u32
5019 }
5020 #[doc = "see Table 432"]
5021 pub fn set_cardstatus1(&mut self, val: u32) {
5022 self.0 =
5023 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
5024 }
5025 }
5026 impl Default for Resp1r {
5027 fn default() -> Resp1r {
5028 Resp1r(0)
5029 }
5030 }
5031 #[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."] 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."]
5032 #[repr(transparent)] 4533 #[repr(transparent)]
5033 #[derive(Copy, Clone, Eq, PartialEq)] 4534 #[derive(Copy, Clone, Eq, PartialEq)]
@@ -5321,50 +4822,6 @@ are always 0 and read only). This register can be written by firmware when DPSM
5321 Star(0) 4822 Star(0)
5322 } 4823 }
5323 } 4824 }
5324 #[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."]
5325 #[repr(transparent)]
5326 #[derive(Copy, Clone, Eq, PartialEq)]
5327 pub struct Fifor(pub u32);
5328 impl Fifor {
5329 #[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."]
5330 pub const fn fifodata(&self) -> u32 {
5331 let val = (self.0 >> 0usize) & 0xffff_ffff;
5332 val as u32
5333 }
5334 #[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."]
5335 pub fn set_fifodata(&mut self, val: u32) {
5336 self.0 =
5337 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
5338 }
5339 }
5340 impl Default for Fifor {
5341 fn default() -> Fifor {
5342 Fifor(0)
5343 }
5344 }
5345 #[doc = "The SDMMC_IDMABASE1R register contains the double buffer configuration second buffer memory base address."]
5346 #[repr(transparent)]
5347 #[derive(Copy, Clone, Eq, PartialEq)]
5348 pub struct Idmabase1r(pub u32);
5349 impl Idmabase1r {
5350 #[doc = "Buffer 1 memory base address, shall be word aligned (bit [1:0]
5351are 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)."]
5352 pub const fn idmabase1(&self) -> u32 {
5353 let val = (self.0 >> 0usize) & 0xffff_ffff;
5354 val as u32
5355 }
5356 #[doc = "Buffer 1 memory base address, shall be word aligned (bit [1:0]
5357are 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)."]
5358 pub fn set_idmabase1(&mut self, val: u32) {
5359 self.0 =
5360 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
5361 }
5362 }
5363 impl Default for Idmabase1r {
5364 fn default() -> Idmabase1r {
5365 Idmabase1r(0)
5366 }
5367 }
5368 #[doc = "The interrupt mask register determines which status flags generate an interrupt request by setting the corresponding bit to 1."] 4825 #[doc = "The interrupt mask register determines which status flags generate an interrupt request by setting the corresponding bit to 1."]
5369 #[repr(transparent)] 4826 #[repr(transparent)]
5370 #[derive(Copy, Clone, Eq, PartialEq)] 4827 #[derive(Copy, Clone, Eq, PartialEq)]
@@ -5630,67 +5087,442 @@ are always 0 and read only). This register can be written by firmware when DPSM
5630 Power(0) 5087 Power(0)
5631 } 5088 }
5632 } 5089 }
5633 #[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."] 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."]
5634 #[repr(transparent)] 5091 #[repr(transparent)]
5635 #[derive(Copy, Clone, Eq, PartialEq)] 5092 #[derive(Copy, Clone, Eq, PartialEq)]
5636 pub struct Dcntr(pub u32); 5093 pub struct Dlenr(pub u32);
5637 impl Dcntr { 5094 impl Dlenr {
5638 #[doc = "Data count value When read, the number of remaining data bytes to be transferred is returned. Write has no effect."] 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."]
5639 pub const fn datacount(&self) -> u32 { 5096 pub const fn datalength(&self) -> u32 {
5640 let val = (self.0 >> 0usize) & 0x01ff_ffff; 5097 let val = (self.0 >> 0usize) & 0x01ff_ffff;
5641 val as u32 5098 val as u32
5642 } 5099 }
5643 #[doc = "Data count value When read, the number of remaining data bytes to be transferred is returned. Write has no effect."] 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."]
5644 pub fn set_datacount(&mut self, val: u32) { 5101 pub fn set_datalength(&mut self, val: u32) {
5645 self.0 = 5102 self.0 =
5646 (self.0 & !(0x01ff_ffff << 0usize)) | (((val as u32) & 0x01ff_ffff) << 0usize); 5103 (self.0 & !(0x01ff_ffff << 0usize)) | (((val as u32) & 0x01ff_ffff) << 0usize);
5647 } 5104 }
5648 } 5105 }
5649 impl Default for Dcntr { 5106 impl Default for Dlenr {
5650 fn default() -> Dcntr { 5107 fn default() -> Dlenr {
5651 Dcntr(0) 5108 Dlenr(0)
5109 }
5110 }
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."]
5112 #[repr(transparent)]
5113 #[derive(Copy, Clone, Eq, PartialEq)]
5114 pub struct Icr(pub u32);
5115 impl Icr {
5116 #[doc = "CCRCFAIL flag clear bit Set by software to clear the CCRCFAIL flag."]
5117 pub const fn ccrcfailc(&self) -> bool {
5118 let val = (self.0 >> 0usize) & 0x01;
5119 val != 0
5120 }
5121 #[doc = "CCRCFAIL flag clear bit Set by software to clear the CCRCFAIL flag."]
5122 pub fn set_ccrcfailc(&mut self, val: bool) {
5123 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
5124 }
5125 #[doc = "DCRCFAIL flag clear bit Set by software to clear the DCRCFAIL flag."]
5126 pub const fn dcrcfailc(&self) -> bool {
5127 let val = (self.0 >> 1usize) & 0x01;
5128 val != 0
5129 }
5130 #[doc = "DCRCFAIL flag clear bit Set by software to clear the DCRCFAIL flag."]
5131 pub fn set_dcrcfailc(&mut self, val: bool) {
5132 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
5133 }
5134 #[doc = "CTIMEOUT flag clear bit Set by software to clear the CTIMEOUT flag."]
5135 pub const fn ctimeoutc(&self) -> bool {
5136 let val = (self.0 >> 2usize) & 0x01;
5137 val != 0
5138 }
5139 #[doc = "CTIMEOUT flag clear bit Set by software to clear the CTIMEOUT flag."]
5140 pub fn set_ctimeoutc(&mut self, val: bool) {
5141 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
5142 }
5143 #[doc = "DTIMEOUT flag clear bit Set by software to clear the DTIMEOUT flag."]
5144 pub const fn dtimeoutc(&self) -> bool {
5145 let val = (self.0 >> 3usize) & 0x01;
5146 val != 0
5147 }
5148 #[doc = "DTIMEOUT flag clear bit Set by software to clear the DTIMEOUT flag."]
5149 pub fn set_dtimeoutc(&mut self, val: bool) {
5150 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
5151 }
5152 #[doc = "TXUNDERR flag clear bit Set by software to clear TXUNDERR flag."]
5153 pub const fn txunderrc(&self) -> bool {
5154 let val = (self.0 >> 4usize) & 0x01;
5155 val != 0
5156 }
5157 #[doc = "TXUNDERR flag clear bit Set by software to clear TXUNDERR flag."]
5158 pub fn set_txunderrc(&mut self, val: bool) {
5159 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
5160 }
5161 #[doc = "RXOVERR flag clear bit Set by software to clear the RXOVERR flag."]
5162 pub const fn rxoverrc(&self) -> bool {
5163 let val = (self.0 >> 5usize) & 0x01;
5164 val != 0
5165 }
5166 #[doc = "RXOVERR flag clear bit Set by software to clear the RXOVERR flag."]
5167 pub fn set_rxoverrc(&mut self, val: bool) {
5168 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
5169 }
5170 #[doc = "CMDREND flag clear bit Set by software to clear the CMDREND flag."]
5171 pub const fn cmdrendc(&self) -> bool {
5172 let val = (self.0 >> 6usize) & 0x01;
5173 val != 0
5174 }
5175 #[doc = "CMDREND flag clear bit Set by software to clear the CMDREND flag."]
5176 pub fn set_cmdrendc(&mut self, val: bool) {
5177 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
5178 }
5179 #[doc = "CMDSENT flag clear bit Set by software to clear the CMDSENT flag."]
5180 pub const fn cmdsentc(&self) -> bool {
5181 let val = (self.0 >> 7usize) & 0x01;
5182 val != 0
5183 }
5184 #[doc = "CMDSENT flag clear bit Set by software to clear the CMDSENT flag."]
5185 pub fn set_cmdsentc(&mut self, val: bool) {
5186 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
5187 }
5188 #[doc = "DATAEND flag clear bit Set by software to clear the DATAEND flag."]
5189 pub const fn dataendc(&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)
5652 } 5300 }
5653 } 5301 }
5654 #[doc = "The SDMMC_RESP1/2/3/4R registers contain the status of a card, which is part of the received response."] 5302 #[doc = "The SDMMC_RESP1/2/3/4R registers contain the status of a card, which is part of the received response."]
5655 #[repr(transparent)] 5303 #[repr(transparent)]
5656 #[derive(Copy, Clone, Eq, PartialEq)] 5304 #[derive(Copy, Clone, Eq, PartialEq)]
5657 pub struct Resp3r(pub u32); 5305 pub struct Resp1r(pub u32);
5658 impl Resp3r { 5306 impl Resp1r {
5659 #[doc = "see Table404."] 5307 #[doc = "see Table 432"]
5660 pub const fn cardstatus3(&self) -> u32 { 5308 pub const fn cardstatus1(&self) -> u32 {
5661 let val = (self.0 >> 0usize) & 0xffff_ffff; 5309 let val = (self.0 >> 0usize) & 0xffff_ffff;
5662 val as u32 5310 val as u32
5663 } 5311 }
5664 #[doc = "see Table404."] 5312 #[doc = "see Table 432"]
5665 pub fn set_cardstatus3(&mut self, val: u32) { 5313 pub fn set_cardstatus1(&mut self, val: u32) {
5666 self.0 = 5314 self.0 =
5667 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize); 5315 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
5668 } 5316 }
5669 } 5317 }
5670 impl Default for Resp3r { 5318 impl Default for Resp1r {
5671 fn default() -> Resp3r { 5319 fn default() -> Resp1r {
5672 Resp3r(0) 5320 Resp1r(0)
5673 } 5321 }
5674 } 5322 }
5675 #[doc = "SDMMC IP identification register"] 5323 #[doc = "The SDMMC_DCTRL register control the data path state machine (DPSM)."]
5676 #[repr(transparent)] 5324 #[repr(transparent)]
5677 #[derive(Copy, Clone, Eq, PartialEq)] 5325 #[derive(Copy, Clone, Eq, PartialEq)]
5678 pub struct Id(pub u32); 5326 pub struct Dctrl(pub u32);
5679 impl Id { 5327 impl Dctrl {
5680 #[doc = "SDMMC IP identification."] 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."]
5681 pub const fn ip_id(&self) -> u32 { 5329 pub const fn dten(&self) -> bool {
5682 let val = (self.0 >> 0usize) & 0xffff_ffff; 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;
5367 val != 0
5368 }
5369 #[doc = "Read wait start. If this bit is set, read wait operation starts."]
5370 pub fn set_rwstart(&mut self, val: bool) {
5371 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
5372 }
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."]
5374 pub const fn rwstop(&self) -> bool {
5375 let val = (self.0 >> 9usize) & 0x01;
5376 val != 0
5377 }
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."]
5379 pub fn set_rwstop(&mut self, val: bool) {
5380 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
5381 }
5382 #[doc = "Read wait mode. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
5383 pub const fn rwmod(&self) -> bool {
5384 let val = (self.0 >> 10usize) & 0x01;
5385 val != 0
5386 }
5387 #[doc = "Read wait mode. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
5388 pub fn set_rwmod(&mut self, val: bool) {
5389 self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize);
5390 }
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."]
5392 pub const fn sdioen(&self) -> bool {
5393 let val = (self.0 >> 11usize) & 0x01;
5394 val != 0
5395 }
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."]
5397 pub fn set_sdioen(&mut self, val: bool) {
5398 self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize);
5399 }
5400 #[doc = "Enable the reception of the boot acknowledgment. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
5401 pub const fn bootacken(&self) -> bool {
5402 let val = (self.0 >> 12usize) & 0x01;
5403 val != 0
5404 }
5405 #[doc = "Enable the reception of the boot acknowledgment. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
5406 pub fn set_bootacken(&mut self, val: bool) {
5407 self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize);
5408 }
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."]
5410 pub const fn fiforst(&self) -> bool {
5411 let val = (self.0 >> 13usize) & 0x01;
5412 val != 0
5413 }
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."]
5415 pub fn set_fiforst(&mut self, val: bool) {
5416 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize);
5417 }
5418 }
5419 impl Default for Dctrl {
5420 fn default() -> Dctrl {
5421 Dctrl(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;
5683 val as u32 5432 val as u32
5684 } 5433 }
5685 #[doc = "SDMMC IP identification."] 5434 #[doc = "Data count value When read, the number of remaining data bytes to be transferred is returned. Write has no effect."]
5686 pub fn set_ip_id(&mut self, val: u32) { 5435 pub fn set_datacount(&mut self, val: u32) {
5687 self.0 = 5436 self.0 =
5688 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize); 5437 (self.0 & !(0x01ff_ffff << 0usize)) | (((val as u32) & 0x01ff_ffff) << 0usize);
5689 } 5438 }
5690 } 5439 }
5691 impl Default for Id { 5440 impl Default for Dcntr {
5692 fn default() -> Id { 5441 fn default() -> Dcntr {
5693 Id(0) 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)
5694 } 5526 }
5695 } 5527 }
5696 #[doc = "The SDMMC_ARGR register contains a 32-bit command argument, which is sent to a card as part of a command message."] 5528 #[doc = "The SDMMC_ARGR register contains a 32-bit command argument, which is sent to a card as part of a command message."]
@@ -5714,275 +5546,533 @@ are always 0 and read only). This register can be written by firmware when DPSM
5714 Argr(0) 5546 Argr(0)
5715 } 5547 }
5716 } 5548 }
5717 } 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."]
5718}
5719pub mod spi_v1 {
5720 use crate::generic::*;
5721 #[doc = "Serial peripheral interface"]
5722 #[derive(Copy, Clone)]
5723 pub struct Spi(pub *mut u8);
5724 unsafe impl Send for Spi {}
5725 unsafe impl Sync for Spi {}
5726 impl Spi {
5727 #[doc = "control register 1"]
5728 pub fn cr1(self) -> Reg<regs::Cr1, RW> {
5729 unsafe { Reg::from_ptr(self.0.add(0usize)) }
5730 }
5731 #[doc = "control register 2"]
5732 pub fn cr2(self) -> Reg<regs::Cr2, RW> {
5733 unsafe { Reg::from_ptr(self.0.add(4usize)) }
5734 }
5735 #[doc = "status register"]
5736 pub fn sr(self) -> Reg<regs::Sr, RW> {
5737 unsafe { Reg::from_ptr(self.0.add(8usize)) }
5738 }
5739 #[doc = "data register"]
5740 pub fn dr(self) -> Reg<regs::Dr, RW> {
5741 unsafe { Reg::from_ptr(self.0.add(12usize)) }
5742 }
5743 #[doc = "CRC polynomial register"]
5744 pub fn crcpr(self) -> Reg<regs::Crcpr, RW> {
5745 unsafe { Reg::from_ptr(self.0.add(16usize)) }
5746 }
5747 #[doc = "RX CRC register"]
5748 pub fn rxcrcr(self) -> Reg<regs::Rxcrcr, R> {
5749 unsafe { Reg::from_ptr(self.0.add(20usize)) }
5750 }
5751 #[doc = "TX CRC register"]
5752 pub fn txcrcr(self) -> Reg<regs::Txcrcr, R> {
5753 unsafe { Reg::from_ptr(self.0.add(24usize)) }
5754 }
5755 }
5756 pub mod regs {
5757 use crate::generic::*;
5758 #[doc = "RX CRC register"]
5759 #[repr(transparent)]
5760 #[derive(Copy, Clone, Eq, PartialEq)]
5761 pub struct Rxcrcr(pub u32);
5762 impl Rxcrcr {
5763 #[doc = "Rx CRC register"]
5764 pub const fn rx_crc(&self) -> u16 {
5765 let val = (self.0 >> 0usize) & 0xffff;
5766 val as u16
5767 }
5768 #[doc = "Rx CRC register"]
5769 pub fn set_rx_crc(&mut self, val: u16) {
5770 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
5771 }
5772 }
5773 impl Default for Rxcrcr {
5774 fn default() -> Rxcrcr {
5775 Rxcrcr(0)
5776 }
5777 }
5778 #[doc = "control register 2"]
5779 #[repr(transparent)] 5550 #[repr(transparent)]
5780 #[derive(Copy, Clone, Eq, PartialEq)] 5551 #[derive(Copy, Clone, Eq, PartialEq)]
5781 pub struct Cr2(pub u32); 5552 pub struct Idmactrlr(pub u32);
5782 impl Cr2 { 5553 impl Idmactrlr {
5783 #[doc = "Rx buffer DMA enable"] 5554 #[doc = "IDMA enable This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
5784 pub const fn rxdmaen(&self) -> bool { 5555 pub const fn idmaen(&self) -> bool {
5785 let val = (self.0 >> 0usize) & 0x01; 5556 let val = (self.0 >> 0usize) & 0x01;
5786 val != 0 5557 val != 0
5787 } 5558 }
5788 #[doc = "Rx buffer DMA enable"] 5559 #[doc = "IDMA enable This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
5789 pub fn set_rxdmaen(&mut self, val: bool) { 5560 pub fn set_idmaen(&mut self, val: bool) {
5790 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 5561 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
5791 } 5562 }
5792 #[doc = "Tx buffer DMA enable"] 5563 #[doc = "Buffer mode selection. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
5793 pub const fn txdmaen(&self) -> bool { 5564 pub const fn idmabmode(&self) -> bool {
5794 let val = (self.0 >> 1usize) & 0x01; 5565 let val = (self.0 >> 1usize) & 0x01;
5795 val != 0 5566 val != 0
5796 } 5567 }
5797 #[doc = "Tx buffer DMA enable"] 5568 #[doc = "Buffer mode selection. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
5798 pub fn set_txdmaen(&mut self, val: bool) { 5569 pub fn set_idmabmode(&mut self, val: bool) {
5799 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); 5570 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
5800 } 5571 }
5801 #[doc = "SS output enable"] 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."]
5802 pub const fn ssoe(&self) -> bool { 5573 pub const fn idmabact(&self) -> bool {
5803 let val = (self.0 >> 2usize) & 0x01; 5574 let val = (self.0 >> 2usize) & 0x01;
5804 val != 0 5575 val != 0
5805 } 5576 }
5806 #[doc = "SS output enable"] 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."]
5807 pub fn set_ssoe(&mut self, val: bool) { 5578 pub fn set_idmabact(&mut self, val: bool) {
5808 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); 5579 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
5809 } 5580 }
5810 #[doc = "Frame format"] 5581 }
5811 pub const fn frf(&self) -> super::vals::Frf { 5582 impl Default for Idmactrlr {
5812 let val = (self.0 >> 4usize) & 0x01; 5583 fn default() -> Idmactrlr {
5813 super::vals::Frf(val as u8) 5584 Idmactrlr(0)
5814 } 5585 }
5815 #[doc = "Frame format"] 5586 }
5816 pub fn set_frf(&mut self, val: super::vals::Frf) { 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."]
5817 self.0 = (self.0 & !(0x01 << 4usize)) | (((val.0 as u32) & 0x01) << 4usize); 5588 #[repr(transparent)]
5589 #[derive(Copy, Clone, Eq, PartialEq)]
5590 pub struct Fifor(pub u32);
5591 impl Fifor {
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."]
5593 pub const fn fifodata(&self) -> u32 {
5594 let val = (self.0 >> 0usize) & 0xffff_ffff;
5595 val as u32
5818 } 5596 }
5819 #[doc = "Error interrupt enable"] 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."]
5820 pub const fn errie(&self) -> bool { 5598 pub fn set_fifodata(&mut self, val: u32) {
5821 let val = (self.0 >> 5usize) & 0x01; 5599 self.0 =
5822 val != 0 5600 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
5823 } 5601 }
5824 #[doc = "Error interrupt enable"] 5602 }
5825 pub fn set_errie(&mut self, val: bool) { 5603 impl Default for Fifor {
5826 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); 5604 fn default() -> Fifor {
5605 Fifor(0)
5827 } 5606 }
5828 #[doc = "RX buffer not empty interrupt enable"] 5607 }
5829 pub const fn rxneie(&self) -> bool { 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."]
5830 let val = (self.0 >> 6usize) & 0x01; 5609 #[repr(transparent)]
5831 val != 0 5610 #[derive(Copy, Clone, Eq, PartialEq)]
5611 pub struct Dtimer(pub u32);
5612 impl Dtimer {
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."]
5614 pub const fn datatime(&self) -> u32 {
5615 let val = (self.0 >> 0usize) & 0xffff_ffff;
5616 val as u32
5832 } 5617 }
5833 #[doc = "RX buffer not empty interrupt enable"] 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."]
5834 pub fn set_rxneie(&mut self, val: bool) { 5619 pub fn set_datatime(&mut self, val: u32) {
5835 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); 5620 self.0 =
5621 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
5836 } 5622 }
5837 #[doc = "Tx buffer empty interrupt enable"] 5623 }
5838 pub const fn txeie(&self) -> bool { 5624 impl Default for Dtimer {
5839 let val = (self.0 >> 7usize) & 0x01; 5625 fn default() -> Dtimer {
5840 val != 0 5626 Dtimer(0)
5841 } 5627 }
5842 #[doc = "Tx buffer empty interrupt enable"] 5628 }
5843 pub fn set_txeie(&mut self, val: bool) { 5629 #[doc = "The SDMMC_RESP1/2/3/4R registers contain the status of a card, which is part of the received response."]
5844 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); 5630 #[repr(transparent)]
5631 #[derive(Copy, Clone, Eq, PartialEq)]
5632 pub struct Resp2r(pub u32);
5633 impl Resp2r {
5634 #[doc = "see Table404."]
5635 pub const fn cardstatus2(&self) -> u32 {
5636 let val = (self.0 >> 0usize) & 0xffff_ffff;
5637 val as u32
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);
5845 } 5643 }
5846 } 5644 }
5847 impl Default for Cr2 { 5645 impl Default for Resp2r {
5848 fn default() -> Cr2 { 5646 fn default() -> Resp2r {
5849 Cr2(0) 5647 Resp2r(0)
5850 } 5648 }
5851 } 5649 }
5852 #[doc = "CRC polynomial register"] 5650 #[doc = "SDMMC IP version register"]
5853 #[repr(transparent)] 5651 #[repr(transparent)]
5854 #[derive(Copy, Clone, Eq, PartialEq)] 5652 #[derive(Copy, Clone, Eq, PartialEq)]
5855 pub struct Crcpr(pub u32); 5653 pub struct Ver(pub u32);
5856 impl Crcpr { 5654 impl Ver {
5857 #[doc = "CRC polynomial register"] 5655 #[doc = "IP minor revision number."]
5858 pub const fn crcpoly(&self) -> u16 { 5656 pub const fn minrev(&self) -> u8 {
5859 let val = (self.0 >> 0usize) & 0xffff; 5657 let val = (self.0 >> 0usize) & 0x0f;
5860 val as u16 5658 val as u8
5861 } 5659 }
5862 #[doc = "CRC polynomial register"] 5660 #[doc = "IP minor revision number."]
5863 pub fn set_crcpoly(&mut self, val: u16) { 5661 pub fn set_minrev(&mut self, val: u8) {
5864 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); 5662 self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize);
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);
5865 } 5672 }
5866 } 5673 }
5867 impl Default for Crcpr { 5674 impl Default for Ver {
5868 fn default() -> Crcpr { 5675 fn default() -> Ver {
5869 Crcpr(0) 5676 Ver(0)
5870 } 5677 }
5871 } 5678 }
5872 #[doc = "TX CRC register"] 5679 #[doc = "The SDMMC_RESP1/2/3/4R registers contain the status of a card, which is part of the received response."]
5873 #[repr(transparent)] 5680 #[repr(transparent)]
5874 #[derive(Copy, Clone, Eq, PartialEq)] 5681 #[derive(Copy, Clone, Eq, PartialEq)]
5875 pub struct Txcrcr(pub u32); 5682 pub struct Resp3r(pub u32);
5876 impl Txcrcr { 5683 impl Resp3r {
5877 #[doc = "Tx CRC register"] 5684 #[doc = "see Table404."]
5878 pub const fn tx_crc(&self) -> u16 { 5685 pub const fn cardstatus3(&self) -> u32 {
5879 let val = (self.0 >> 0usize) & 0xffff; 5686 let val = (self.0 >> 0usize) & 0xffff_ffff;
5880 val as u16 5687 val as u32
5881 } 5688 }
5882 #[doc = "Tx CRC register"] 5689 #[doc = "see Table404."]
5883 pub fn set_tx_crc(&mut self, val: u16) { 5690 pub fn set_cardstatus3(&mut self, val: u32) {
5884 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); 5691 self.0 =
5692 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
5885 } 5693 }
5886 } 5694 }
5887 impl Default for Txcrcr { 5695 impl Default for Resp3r {
5888 fn default() -> Txcrcr { 5696 fn default() -> Resp3r {
5889 Txcrcr(0) 5697 Resp3r(0)
5890 } 5698 }
5891 } 5699 }
5892 #[doc = "status register"] 5700 #[doc = "The SDMMC_IDMABASE1R register contains the double buffer configuration second buffer memory base address."]
5893 #[repr(transparent)] 5701 #[repr(transparent)]
5894 #[derive(Copy, Clone, Eq, PartialEq)] 5702 #[derive(Copy, Clone, Eq, PartialEq)]
5895 pub struct Sr(pub u32); 5703 pub struct Idmabase1r(pub u32);
5896 impl Sr { 5704 impl Idmabase1r {
5897 #[doc = "Receive buffer not empty"] 5705 #[doc = "Buffer 1 memory base address, shall be word aligned (bit [1:0]
5898 pub const fn rxne(&self) -> bool { 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)."]
5899 let val = (self.0 >> 0usize) & 0x01; 5707 pub const fn idmabase1(&self) -> u32 {
5900 val != 0 5708 let val = (self.0 >> 0usize) & 0xffff_ffff;
5709 val as u32
5901 } 5710 }
5902 #[doc = "Receive buffer not empty"] 5711 #[doc = "Buffer 1 memory base address, shall be word aligned (bit [1:0]
5903 pub fn set_rxne(&mut self, val: bool) { 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)."]
5904 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 5713 pub fn set_idmabase1(&mut self, val: u32) {
5714 self.0 =
5715 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
5905 } 5716 }
5906 #[doc = "Transmit buffer empty"] 5717 }
5907 pub const fn txe(&self) -> bool { 5718 impl Default for Idmabase1r {
5908 let val = (self.0 >> 1usize) & 0x01; 5719 fn default() -> Idmabase1r {
5909 val != 0 5720 Idmabase1r(0)
5910 } 5721 }
5911 #[doc = "Transmit buffer empty"] 5722 }
5912 pub fn set_txe(&mut self, val: bool) { 5723 #[doc = "SDMMC command response register"]
5913 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); 5724 #[repr(transparent)]
5725 #[derive(Copy, Clone, Eq, PartialEq)]
5726 pub struct Respcmdr(pub u32);
5727 impl Respcmdr {
5728 #[doc = "Response command index"]
5729 pub const fn respcmd(&self) -> u8 {
5730 let val = (self.0 >> 0usize) & 0x3f;
5731 val as u8
5914 } 5732 }
5915 #[doc = "CRC error flag"] 5733 #[doc = "Response command index"]
5916 pub const fn crcerr(&self) -> bool { 5734 pub fn set_respcmd(&mut self, val: u8) {
5917 let val = (self.0 >> 4usize) & 0x01; 5735 self.0 = (self.0 & !(0x3f << 0usize)) | (((val as u32) & 0x3f) << 0usize);
5918 val != 0
5919 } 5736 }
5920 #[doc = "CRC error flag"] 5737 }
5921 pub fn set_crcerr(&mut self, val: bool) { 5738 impl Default for Respcmdr {
5922 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); 5739 fn default() -> Respcmdr {
5740 Respcmdr(0)
5923 } 5741 }
5924 #[doc = "Mode fault"] 5742 }
5925 pub const fn modf(&self) -> bool { 5743 #[doc = "The SDMMC_RESP1/2/3/4R registers contain the status of a card, which is part of the received response."]
5926 let val = (self.0 >> 5usize) & 0x01; 5744 #[repr(transparent)]
5927 val != 0 5745 #[derive(Copy, Clone, Eq, PartialEq)]
5746 pub struct Resp4r(pub u32);
5747 impl Resp4r {
5748 #[doc = "see Table404."]
5749 pub const fn cardstatus4(&self) -> u32 {
5750 let val = (self.0 >> 0usize) & 0xffff_ffff;
5751 val as u32
5928 } 5752 }
5929 #[doc = "Mode fault"] 5753 #[doc = "see Table404."]
5930 pub fn set_modf(&mut self, val: bool) { 5754 pub fn set_cardstatus4(&mut self, val: u32) {
5931 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); 5755 self.0 =
5756 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
5932 } 5757 }
5933 #[doc = "Overrun flag"] 5758 }
5934 pub const fn ovr(&self) -> bool { 5759 impl Default for Resp4r {
5935 let val = (self.0 >> 6usize) & 0x01; 5760 fn default() -> Resp4r {
5936 val != 0 5761 Resp4r(0)
5937 } 5762 }
5938 #[doc = "Overrun flag"] 5763 }
5939 pub fn set_ovr(&mut self, val: bool) { 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."]
5940 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); 5765 #[repr(transparent)]
5766 #[derive(Copy, Clone, Eq, PartialEq)]
5767 pub struct Idmabase0r(pub u32);
5768 impl Idmabase0r {
5769 #[doc = "Buffer 0 memory base address bits [31:2], shall be word aligned (bit [1:0]
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)."]
5771 pub const fn idmabase0(&self) -> u32 {
5772 let val = (self.0 >> 0usize) & 0xffff_ffff;
5773 val as u32
5941 } 5774 }
5942 #[doc = "Busy flag"] 5775 #[doc = "Buffer 0 memory base address bits [31:2], shall be word aligned (bit [1:0]
5943 pub const fn bsy(&self) -> bool { 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)."]
5944 let val = (self.0 >> 7usize) & 0x01; 5777 pub fn set_idmabase0(&mut self, val: u32) {
5945 val != 0 5778 self.0 =
5779 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
5946 } 5780 }
5947 #[doc = "Busy flag"] 5781 }
5948 pub fn set_bsy(&mut self, val: bool) { 5782 impl Default for Idmabase0r {
5949 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); 5783 fn default() -> Idmabase0r {
5784 Idmabase0r(0)
5950 } 5785 }
5951 #[doc = "TI frame format error"] 5786 }
5952 pub const fn fre(&self) -> bool { 5787 #[doc = "The SDMMC_IDMABSIZER register contains the buffers size when in double buffer configuration."]
5953 let val = (self.0 >> 8usize) & 0x01; 5788 #[repr(transparent)]
5954 val != 0 5789 #[derive(Copy, Clone, Eq, PartialEq)]
5790 pub struct Idmabsizer(pub u32);
5791 impl Idmabsizer {
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)."]
5793 pub const fn idmabndt(&self) -> u8 {
5794 let val = (self.0 >> 5usize) & 0xff;
5795 val as u8
5955 } 5796 }
5956 #[doc = "TI frame format error"] 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)."]
5957 pub fn set_fre(&mut self, val: bool) { 5798 pub fn set_idmabndt(&mut self, val: u8) {
5958 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); 5799 self.0 = (self.0 & !(0xff << 5usize)) | (((val as u32) & 0xff) << 5usize);
5959 } 5800 }
5960 } 5801 }
5961 impl Default for Sr { 5802 impl Default for Idmabsizer {
5962 fn default() -> Sr { 5803 fn default() -> Idmabsizer {
5963 Sr(0) 5804 Idmabsizer(0)
5964 } 5805 }
5965 } 5806 }
5966 #[doc = "data register"] 5807 #[doc = "SDMMC IP identification register"]
5967 #[repr(transparent)] 5808 #[repr(transparent)]
5968 #[derive(Copy, Clone, Eq, PartialEq)] 5809 #[derive(Copy, Clone, Eq, PartialEq)]
5969 pub struct Dr(pub u32); 5810 pub struct Id(pub u32);
5970 impl Dr { 5811 impl Id {
5971 #[doc = "Data register"] 5812 #[doc = "SDMMC IP identification."]
5972 pub const fn dr(&self) -> u16 { 5813 pub const fn ip_id(&self) -> u32 {
5973 let val = (self.0 >> 0usize) & 0xffff; 5814 let val = (self.0 >> 0usize) & 0xffff_ffff;
5974 val as u16 5815 val as u32
5975 } 5816 }
5976 #[doc = "Data register"] 5817 #[doc = "SDMMC IP identification."]
5977 pub fn set_dr(&mut self, val: u16) { 5818 pub fn set_ip_id(&mut self, val: u32) {
5978 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); 5819 self.0 =
5820 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
5979 } 5821 }
5980 } 5822 }
5981 impl Default for Dr { 5823 impl Default for Id {
5982 fn default() -> Dr { 5824 fn default() -> Id {
5983 Dr(0) 5825 Id(0)
5984 } 5826 }
5985 } 5827 }
5828 }
5829}
5830pub mod spi_v2 {
5831 use crate::generic::*;
5832 #[doc = "Serial peripheral interface"]
5833 #[derive(Copy, Clone)]
5834 pub struct Spi(pub *mut u8);
5835 unsafe impl Send for Spi {}
5836 unsafe impl Sync for Spi {}
5837 impl Spi {
5838 #[doc = "control register 1"]
5839 pub fn cr1(self) -> Reg<regs::Cr1, RW> {
5840 unsafe { Reg::from_ptr(self.0.add(0usize)) }
5841 }
5842 #[doc = "control register 2"]
5843 pub fn cr2(self) -> Reg<regs::Cr2, RW> {
5844 unsafe { Reg::from_ptr(self.0.add(4usize)) }
5845 }
5846 #[doc = "status register"]
5847 pub fn sr(self) -> Reg<regs::Sr, RW> {
5848 unsafe { Reg::from_ptr(self.0.add(8usize)) }
5849 }
5850 #[doc = "data register"]
5851 pub fn dr(self) -> Reg<regs::Dr, RW> {
5852 unsafe { Reg::from_ptr(self.0.add(12usize)) }
5853 }
5854 #[doc = "CRC polynomial register"]
5855 pub fn crcpr(self) -> Reg<regs::Crcpr, RW> {
5856 unsafe { Reg::from_ptr(self.0.add(16usize)) }
5857 }
5858 #[doc = "RX CRC register"]
5859 pub fn rxcrcr(self) -> Reg<regs::Rxcrcr, R> {
5860 unsafe { Reg::from_ptr(self.0.add(20usize)) }
5861 }
5862 #[doc = "TX CRC register"]
5863 pub fn txcrcr(self) -> Reg<regs::Txcrcr, R> {
5864 unsafe { Reg::from_ptr(self.0.add(24usize)) }
5865 }
5866 }
5867 pub mod vals {
5868 use crate::generic::*;
5869 #[repr(transparent)]
5870 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5871 pub struct Br(pub u8);
5872 impl Br {
5873 #[doc = "f_PCLK / 2"]
5874 pub const DIV2: Self = Self(0);
5875 #[doc = "f_PCLK / 4"]
5876 pub const DIV4: Self = Self(0x01);
5877 #[doc = "f_PCLK / 8"]
5878 pub const DIV8: Self = Self(0x02);
5879 #[doc = "f_PCLK / 16"]
5880 pub const DIV16: 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 }
5890 #[repr(transparent)]
5891 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5892 pub struct Lsbfirst(pub u8);
5893 impl Lsbfirst {
5894 #[doc = "Data is transmitted/received with the MSB first"]
5895 pub const MSBFIRST: Self = Self(0);
5896 #[doc = "Data is transmitted/received with the LSB first"]
5897 pub const LSBFIRST: Self = Self(0x01);
5898 }
5899 #[repr(transparent)]
5900 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5901 pub struct LdmaTx(pub u8);
5902 impl LdmaTx {
5903 #[doc = "Number of data to transfer for transmit is even"]
5904 pub const EVEN: Self = Self(0);
5905 #[doc = "Number of data to transfer for transmit is odd"]
5906 pub const ODD: Self = Self(0x01);
5907 }
5908 #[repr(transparent)]
5909 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5910 pub struct Frf(pub u8);
5911 impl Frf {
5912 #[doc = "SPI Motorola mode"]
5913 pub const MOTOROLA: Self = Self(0);
5914 #[doc = "SPI TI mode"]
5915 pub const TI: Self = Self(0x01);
5916 }
5917 #[repr(transparent)]
5918 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5919 pub struct Bidioe(pub u8);
5920 impl Bidioe {
5921 #[doc = "Output disabled (receive-only mode)"]
5922 pub const OUTPUTDISABLED: Self = Self(0);
5923 #[doc = "Output enabled (transmit-only mode)"]
5924 pub const OUTPUTENABLED: Self = Self(0x01);
5925 }
5926 #[repr(transparent)]
5927 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5928 pub struct Frer(pub u8);
5929 impl Frer {
5930 #[doc = "No frame format error"]
5931 pub const NOERROR: Self = Self(0);
5932 #[doc = "A frame format error occurred"]
5933 pub const ERROR: Self = Self(0x01);
5934 }
5935 #[repr(transparent)]
5936 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5937 pub struct Crcnext(pub u8);
5938 impl Crcnext {
5939 #[doc = "Next transmit value is from Tx buffer"]
5940 pub const TXBUFFER: Self = Self(0);
5941 #[doc = "Next transmit value is from Tx CRC register"]
5942 pub const CRC: Self = Self(0x01);
5943 }
5944 #[repr(transparent)]
5945 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5946 pub struct Ds(pub u8);
5947 impl Ds {
5948 #[doc = "4-bit"]
5949 pub const FOURBIT: Self = Self(0x03);
5950 #[doc = "5-bit"]
5951 pub const FIVEBIT: Self = Self(0x04);
5952 #[doc = "6-bit"]
5953 pub const SIXBIT: Self = Self(0x05);
5954 #[doc = "7-bit"]
5955 pub const SEVENBIT: Self = Self(0x06);
5956 #[doc = "8-bit"]
5957 pub const EIGHTBIT: Self = Self(0x07);
5958 #[doc = "9-bit"]
5959 pub const NINEBIT: Self = Self(0x08);
5960 #[doc = "10-bit"]
5961 pub const TENBIT: Self = Self(0x09);
5962 #[doc = "11-bit"]
5963 pub const ELEVENBIT: Self = Self(0x0a);
5964 #[doc = "12-bit"]
5965 pub const TWELVEBIT: Self = Self(0x0b);
5966 #[doc = "13-bit"]
5967 pub const THIRTEENBIT: Self = Self(0x0c);
5968 #[doc = "14-bit"]
5969 pub const FOURTEENBIT: Self = Self(0x0d);
5970 #[doc = "15-bit"]
5971 pub const FIFTEENBIT: Self = Self(0x0e);
5972 #[doc = "16-bit"]
5973 pub const SIXTEENBIT: Self = Self(0x0f);
5974 }
5975 #[repr(transparent)]
5976 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5977 pub struct Cpha(pub u8);
5978 impl Cpha {
5979 #[doc = "The first clock transition is the first data capture edge"]
5980 pub const FIRSTEDGE: Self = Self(0);
5981 #[doc = "The second clock transition is the first data capture edge"]
5982 pub const SECONDEDGE: 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 }
6006 #[repr(transparent)]
6007 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6008 pub struct Mstr(pub u8);
6009 impl Mstr {
6010 #[doc = "Slave configuration"]
6011 pub const SLAVE: Self = Self(0);
6012 #[doc = "Master configuration"]
6013 pub const MASTER: Self = Self(0x01);
6014 }
6015 #[repr(transparent)]
6016 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6017 pub struct Crcl(pub u8);
6018 impl Crcl {
6019 #[doc = "8-bit CRC length"]
6020 pub const EIGHTBIT: Self = Self(0);
6021 #[doc = "16-bit CRC length"]
6022 pub const SIXTEENBIT: Self = Self(0x01);
6023 }
6024 #[repr(transparent)]
6025 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6026 pub struct Rxonly(pub u8);
6027 impl Rxonly {
6028 #[doc = "Full duplex (Transmit and receive)"]
6029 pub const FULLDUPLEX: Self = Self(0);
6030 #[doc = "Output disabled (Receive-only mode)"]
6031 pub const OUTPUTDISABLED: 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 }
6046 #[repr(transparent)]
6047 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6048 pub struct Frxth(pub u8);
6049 impl Frxth {
6050 #[doc = "RXNE event is generated if the FIFO level is greater than or equal to 1/2 (16-bit)"]
6051 pub const HALF: Self = Self(0);
6052 #[doc = "RXNE event is generated if the FIFO level is greater than or equal to 1/4 (8-bit)"]
6053 pub const QUARTER: Self = Self(0x01);
6054 }
6055 #[repr(transparent)]
6056 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6057 pub struct LdmaRx(pub u8);
6058 impl LdmaRx {
6059 #[doc = "Number of data to transfer for receive is even"]
6060 pub const EVEN: Self = Self(0);
6061 #[doc = "Number of data to transfer for receive is odd"]
6062 pub const ODD: Self = Self(0x01);
6063 }
6064 #[repr(transparent)]
6065 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6066 pub struct Cpol(pub u8);
6067 impl Cpol {
6068 #[doc = "CK to 0 when idle"]
6069 pub const IDLELOW: Self = Self(0);
6070 #[doc = "CK to 1 when idle"]
6071 pub const IDLEHIGH: Self = Self(0x01);
6072 }
6073 }
6074 pub mod regs {
6075 use crate::generic::*;
5986 #[doc = "control register 1"] 6076 #[doc = "control register 1"]
5987 #[repr(transparent)] 6077 #[repr(transparent)]
5988 #[derive(Copy, Clone, Eq, PartialEq)] 6078 #[derive(Copy, Clone, Eq, PartialEq)]
@@ -6069,13 +6159,13 @@ pub mod spi_v1 {
6069 pub fn set_rxonly(&mut self, val: super::vals::Rxonly) { 6159 pub fn set_rxonly(&mut self, val: super::vals::Rxonly) {
6070 self.0 = (self.0 & !(0x01 << 10usize)) | (((val.0 as u32) & 0x01) << 10usize); 6160 self.0 = (self.0 & !(0x01 << 10usize)) | (((val.0 as u32) & 0x01) << 10usize);
6071 } 6161 }
6072 #[doc = "Data frame format"] 6162 #[doc = "CRC length"]
6073 pub const fn dff(&self) -> super::vals::Dff { 6163 pub const fn crcl(&self) -> super::vals::Crcl {
6074 let val = (self.0 >> 11usize) & 0x01; 6164 let val = (self.0 >> 11usize) & 0x01;
6075 super::vals::Dff(val as u8) 6165 super::vals::Crcl(val as u8)
6076 } 6166 }
6077 #[doc = "Data frame format"] 6167 #[doc = "CRC length"]
6078 pub fn set_dff(&mut self, val: super::vals::Dff) { 6168 pub fn set_crcl(&mut self, val: super::vals::Crcl) {
6079 self.0 = (self.0 & !(0x01 << 11usize)) | (((val.0 as u32) & 0x01) << 11usize); 6169 self.0 = (self.0 & !(0x01 << 11usize)) | (((val.0 as u32) & 0x01) << 11usize);
6080 } 6170 }
6081 #[doc = "CRC transfer next"] 6171 #[doc = "CRC transfer next"]
@@ -6120,613 +6210,300 @@ pub mod spi_v1 {
6120 Cr1(0) 6210 Cr1(0)
6121 } 6211 }
6122 } 6212 }
6123 } 6213 #[doc = "status register"]
6124 pub mod vals {
6125 use crate::generic::*;
6126 #[repr(transparent)]
6127 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6128 pub struct Iscfg(pub u8);
6129 impl Iscfg {
6130 #[doc = "Slave - transmit"]
6131 pub const SLAVETX: Self = Self(0);
6132 #[doc = "Slave - receive"]
6133 pub const SLAVERX: Self = Self(0x01);
6134 #[doc = "Master - transmit"]
6135 pub const MASTERTX: Self = Self(0x02);
6136 #[doc = "Master - receive"]
6137 pub const MASTERRX: Self = Self(0x03);
6138 }
6139 #[repr(transparent)]
6140 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6141 pub struct Frer(pub u8);
6142 impl Frer {
6143 #[doc = "No frame format error"]
6144 pub const NOERROR: Self = Self(0);
6145 #[doc = "A frame format error occurred"]
6146 pub const ERROR: Self = Self(0x01);
6147 }
6148 #[repr(transparent)]
6149 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6150 pub struct Cpol(pub u8);
6151 impl Cpol {
6152 #[doc = "CK to 0 when idle"]
6153 pub const IDLELOW: Self = Self(0);
6154 #[doc = "CK to 1 when idle"]
6155 pub const IDLEHIGH: Self = Self(0x01);
6156 }
6157 #[repr(transparent)]
6158 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6159 pub struct Mstr(pub u8);
6160 impl Mstr {
6161 #[doc = "Slave configuration"]
6162 pub const SLAVE: Self = Self(0);
6163 #[doc = "Master configuration"]
6164 pub const MASTER: Self = Self(0x01);
6165 }
6166 #[repr(transparent)]
6167 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6168 pub struct Bidimode(pub u8);
6169 impl Bidimode {
6170 #[doc = "2-line unidirectional data mode selected"]
6171 pub const UNIDIRECTIONAL: Self = Self(0);
6172 #[doc = "1-line bidirectional data mode selected"]
6173 pub const BIDIRECTIONAL: Self = Self(0x01);
6174 }
6175 #[repr(transparent)]
6176 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6177 pub struct Crcnext(pub u8);
6178 impl Crcnext {
6179 #[doc = "Next transmit value is from Tx buffer"]
6180 pub const TXBUFFER: Self = Self(0);
6181 #[doc = "Next transmit value is from Tx CRC register"]
6182 pub const CRC: Self = Self(0x01);
6183 }
6184 #[repr(transparent)]
6185 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6186 pub struct Rxonly(pub u8);
6187 impl Rxonly {
6188 #[doc = "Full duplex (Transmit and receive)"]
6189 pub const FULLDUPLEX: Self = Self(0);
6190 #[doc = "Output disabled (Receive-only mode)"]
6191 pub const OUTPUTDISABLED: Self = Self(0x01);
6192 }
6193 #[repr(transparent)]
6194 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6195 pub struct Cpha(pub u8);
6196 impl Cpha {
6197 #[doc = "The first clock transition is the first data capture edge"]
6198 pub const FIRSTEDGE: Self = Self(0);
6199 #[doc = "The second clock transition is the first data capture edge"]
6200 pub const SECONDEDGE: Self = Self(0x01);
6201 }
6202 #[repr(transparent)]
6203 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6204 pub struct Dff(pub u8);
6205 impl Dff {
6206 #[doc = "8-bit data frame format is selected for transmission/reception"]
6207 pub const EIGHTBIT: Self = Self(0);
6208 #[doc = "16-bit data frame format is selected for transmission/reception"]
6209 pub const SIXTEENBIT: Self = Self(0x01);
6210 }
6211 #[repr(transparent)]
6212 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6213 pub struct Lsbfirst(pub u8);
6214 impl Lsbfirst {
6215 #[doc = "Data is transmitted/received with the MSB first"]
6216 pub const MSBFIRST: Self = Self(0);
6217 #[doc = "Data is transmitted/received with the LSB first"]
6218 pub const LSBFIRST: Self = Self(0x01);
6219 }
6220 #[repr(transparent)]
6221 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6222 pub struct Br(pub u8);
6223 impl Br {
6224 #[doc = "f_PCLK / 2"]
6225 pub const DIV2: Self = Self(0);
6226 #[doc = "f_PCLK / 4"]
6227 pub const DIV4: Self = Self(0x01);
6228 #[doc = "f_PCLK / 8"]
6229 pub const DIV8: Self = Self(0x02);
6230 #[doc = "f_PCLK / 16"]
6231 pub const DIV16: Self = Self(0x03);
6232 #[doc = "f_PCLK / 32"]
6233 pub const DIV32: Self = Self(0x04);
6234 #[doc = "f_PCLK / 64"]
6235 pub const DIV64: Self = Self(0x05);
6236 #[doc = "f_PCLK / 128"]
6237 pub const DIV128: Self = Self(0x06);
6238 #[doc = "f_PCLK / 256"]
6239 pub const DIV256: Self = Self(0x07);
6240 }
6241 #[repr(transparent)]
6242 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6243 pub struct Bidioe(pub u8);
6244 impl Bidioe {
6245 #[doc = "Output disabled (receive-only mode)"]
6246 pub const OUTPUTDISABLED: Self = Self(0);
6247 #[doc = "Output enabled (transmit-only mode)"]
6248 pub const OUTPUTENABLED: Self = Self(0x01);
6249 }
6250 #[repr(transparent)]
6251 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6252 pub struct Frf(pub u8);
6253 impl Frf {
6254 #[doc = "SPI Motorola mode"]
6255 pub const MOTOROLA: Self = Self(0);
6256 #[doc = "SPI TI mode"]
6257 pub const TI: Self = Self(0x01);
6258 }
6259 }
6260}
6261pub mod syscfg_f4 {
6262 use crate::generic::*;
6263 #[doc = "System configuration controller"]
6264 #[derive(Copy, Clone)]
6265 pub struct Syscfg(pub *mut u8);
6266 unsafe impl Send for Syscfg {}
6267 unsafe impl Sync for Syscfg {}
6268 impl Syscfg {
6269 #[doc = "memory remap register"]
6270 pub fn memrm(self) -> Reg<regs::Memrm, RW> {
6271 unsafe { Reg::from_ptr(self.0.add(0usize)) }
6272 }
6273 #[doc = "peripheral mode configuration register"]
6274 pub fn pmc(self) -> Reg<regs::Pmc, RW> {
6275 unsafe { Reg::from_ptr(self.0.add(4usize)) }
6276 }
6277 #[doc = "external interrupt configuration register"]
6278 pub fn exticr(self, n: usize) -> Reg<regs::Exticr, RW> {
6279 assert!(n < 4usize);
6280 unsafe { Reg::from_ptr(self.0.add(8usize + n * 4usize)) }
6281 }
6282 #[doc = "Compensation cell control register"]
6283 pub fn cmpcr(self) -> Reg<regs::Cmpcr, R> {
6284 unsafe { Reg::from_ptr(self.0.add(32usize)) }
6285 }
6286 }
6287 pub mod regs {
6288 use crate::generic::*;
6289 #[doc = "external interrupt configuration register"]
6290 #[repr(transparent)] 6214 #[repr(transparent)]
6291 #[derive(Copy, Clone, Eq, PartialEq)] 6215 #[derive(Copy, Clone, Eq, PartialEq)]
6292 pub struct Exticr(pub u32); 6216 pub struct Sr(pub u32);
6293 impl Exticr { 6217 impl Sr {
6294 #[doc = "EXTI x configuration"] 6218 #[doc = "Receive buffer not empty"]
6295 pub fn exti(&self, n: usize) -> u8 { 6219 pub const fn rxne(&self) -> bool {
6296 assert!(n < 4usize); 6220 let val = (self.0 >> 0usize) & 0x01;
6297 let offs = 0usize + n * 4usize; 6221 val != 0
6298 let val = (self.0 >> offs) & 0x0f;
6299 val as u8
6300 } 6222 }
6301 #[doc = "EXTI x configuration"] 6223 #[doc = "Receive buffer not empty"]
6302 pub fn set_exti(&mut self, n: usize, val: u8) { 6224 pub fn set_rxne(&mut self, val: bool) {
6303 assert!(n < 4usize); 6225 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
6304 let offs = 0usize + n * 4usize;
6305 self.0 = (self.0 & !(0x0f << offs)) | (((val as u32) & 0x0f) << offs);
6306 } 6226 }
6307 } 6227 #[doc = "Transmit buffer empty"]
6308 impl Default for Exticr { 6228 pub const fn txe(&self) -> bool {
6309 fn default() -> Exticr { 6229 let val = (self.0 >> 1usize) & 0x01;
6310 Exticr(0) 6230 val != 0
6311 } 6231 }
6312 } 6232 #[doc = "Transmit buffer empty"]
6313 #[doc = "memory remap register"] 6233 pub fn set_txe(&mut self, val: bool) {
6314 #[repr(transparent)] 6234 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
6315 #[derive(Copy, Clone, Eq, PartialEq)]
6316 pub struct Memrm(pub u32);
6317 impl Memrm {
6318 #[doc = "Memory mapping selection"]
6319 pub const fn mem_mode(&self) -> u8 {
6320 let val = (self.0 >> 0usize) & 0x07;
6321 val as u8
6322 } 6235 }
6323 #[doc = "Memory mapping selection"] 6236 #[doc = "CRC error flag"]
6324 pub fn set_mem_mode(&mut self, val: u8) { 6237 pub const fn crcerr(&self) -> bool {
6325 self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); 6238 let val = (self.0 >> 4usize) & 0x01;
6239 val != 0
6326 } 6240 }
6327 #[doc = "Flash bank mode selection"] 6241 #[doc = "CRC error flag"]
6328 pub const fn fb_mode(&self) -> bool { 6242 pub fn set_crcerr(&mut self, val: bool) {
6243 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
6244 }
6245 #[doc = "Mode fault"]
6246 pub const fn modf(&self) -> bool {
6247 let val = (self.0 >> 5usize) & 0x01;
6248 val != 0
6249 }
6250 #[doc = "Mode fault"]
6251 pub fn set_modf(&mut self, val: bool) {
6252 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
6253 }
6254 #[doc = "Overrun flag"]
6255 pub const fn ovr(&self) -> bool {
6256 let val = (self.0 >> 6usize) & 0x01;
6257 val != 0
6258 }
6259 #[doc = "Overrun flag"]
6260 pub fn set_ovr(&mut self, val: bool) {
6261 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
6262 }
6263 #[doc = "Busy flag"]
6264 pub const fn bsy(&self) -> bool {
6265 let val = (self.0 >> 7usize) & 0x01;
6266 val != 0
6267 }
6268 #[doc = "Busy flag"]
6269 pub fn set_bsy(&mut self, val: bool) {
6270 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
6271 }
6272 #[doc = "Frame format error"]
6273 pub const fn fre(&self) -> bool {
6329 let val = (self.0 >> 8usize) & 0x01; 6274 let val = (self.0 >> 8usize) & 0x01;
6330 val != 0 6275 val != 0
6331 } 6276 }
6332 #[doc = "Flash bank mode selection"] 6277 #[doc = "Frame format error"]
6333 pub fn set_fb_mode(&mut self, val: bool) { 6278 pub fn set_fre(&mut self, val: bool) {
6334 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); 6279 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
6335 } 6280 }
6336 #[doc = "FMC memory mapping swap"] 6281 #[doc = "FIFO reception level"]
6337 pub const fn swp_fmc(&self) -> u8 { 6282 pub const fn frlvl(&self) -> u8 {
6338 let val = (self.0 >> 10usize) & 0x03; 6283 let val = (self.0 >> 9usize) & 0x03;
6339 val as u8 6284 val as u8
6340 } 6285 }
6341 #[doc = "FMC memory mapping swap"] 6286 #[doc = "FIFO reception level"]
6342 pub fn set_swp_fmc(&mut self, val: u8) { 6287 pub fn set_frlvl(&mut self, val: u8) {
6343 self.0 = (self.0 & !(0x03 << 10usize)) | (((val as u32) & 0x03) << 10usize); 6288 self.0 = (self.0 & !(0x03 << 9usize)) | (((val as u32) & 0x03) << 9usize);
6289 }
6290 #[doc = "FIFO Transmission Level"]
6291 pub const fn ftlvl(&self) -> u8 {
6292 let val = (self.0 >> 11usize) & 0x03;
6293 val as u8
6294 }
6295 #[doc = "FIFO Transmission Level"]
6296 pub fn set_ftlvl(&mut self, val: u8) {
6297 self.0 = (self.0 & !(0x03 << 11usize)) | (((val as u32) & 0x03) << 11usize);
6344 } 6298 }
6345 } 6299 }
6346 impl Default for Memrm { 6300 impl Default for Sr {
6347 fn default() -> Memrm { 6301 fn default() -> Sr {
6348 Memrm(0) 6302 Sr(0)
6349 } 6303 }
6350 } 6304 }
6351 #[doc = "peripheral mode configuration register"] 6305 #[doc = "control register 2"]
6352 #[repr(transparent)] 6306 #[repr(transparent)]
6353 #[derive(Copy, Clone, Eq, PartialEq)] 6307 #[derive(Copy, Clone, Eq, PartialEq)]
6354 pub struct Pmc(pub u32); 6308 pub struct Cr2(pub u32);
6355 impl Pmc { 6309 impl Cr2 {
6356 #[doc = "ADC1DC2"] 6310 #[doc = "Rx buffer DMA enable"]
6357 pub const fn adc1dc2(&self) -> bool { 6311 pub const fn rxdmaen(&self) -> bool {
6358 let val = (self.0 >> 16usize) & 0x01; 6312 let val = (self.0 >> 0usize) & 0x01;
6359 val != 0 6313 val != 0
6360 } 6314 }
6361 #[doc = "ADC1DC2"] 6315 #[doc = "Rx buffer DMA enable"]
6362 pub fn set_adc1dc2(&mut self, val: bool) { 6316 pub fn set_rxdmaen(&mut self, val: bool) {
6363 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); 6317 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
6364 } 6318 }
6365 #[doc = "ADC2DC2"] 6319 #[doc = "Tx buffer DMA enable"]
6366 pub const fn adc2dc2(&self) -> bool { 6320 pub const fn txdmaen(&self) -> bool {
6367 let val = (self.0 >> 17usize) & 0x01; 6321 let val = (self.0 >> 1usize) & 0x01;
6368 val != 0 6322 val != 0
6369 } 6323 }
6370 #[doc = "ADC2DC2"] 6324 #[doc = "Tx buffer DMA enable"]
6371 pub fn set_adc2dc2(&mut self, val: bool) { 6325 pub fn set_txdmaen(&mut self, val: bool) {
6372 self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); 6326 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
6373 } 6327 }
6374 #[doc = "ADC3DC2"] 6328 #[doc = "SS output enable"]
6375 pub const fn adc3dc2(&self) -> bool { 6329 pub const fn ssoe(&self) -> bool {
6376 let val = (self.0 >> 18usize) & 0x01; 6330 let val = (self.0 >> 2usize) & 0x01;
6377 val != 0 6331 val != 0
6378 } 6332 }
6379 #[doc = "ADC3DC2"] 6333 #[doc = "SS output enable"]
6380 pub fn set_adc3dc2(&mut self, val: bool) { 6334 pub fn set_ssoe(&mut self, val: bool) {
6381 self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); 6335 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
6382 } 6336 }
6383 #[doc = "Ethernet PHY interface selection"] 6337 #[doc = "NSS pulse management"]
6384 pub const fn mii_rmii_sel(&self) -> bool { 6338 pub const fn nssp(&self) -> bool {
6385 let val = (self.0 >> 23usize) & 0x01; 6339 let val = (self.0 >> 3usize) & 0x01;
6386 val != 0 6340 val != 0
6387 } 6341 }
6388 #[doc = "Ethernet PHY interface selection"] 6342 #[doc = "NSS pulse management"]
6389 pub fn set_mii_rmii_sel(&mut self, val: bool) { 6343 pub fn set_nssp(&mut self, val: bool) {
6390 self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize); 6344 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
6391 } 6345 }
6392 } 6346 #[doc = "Frame format"]
6393 impl Default for Pmc { 6347 pub const fn frf(&self) -> super::vals::Frf {
6394 fn default() -> Pmc { 6348 let val = (self.0 >> 4usize) & 0x01;
6395 Pmc(0) 6349 super::vals::Frf(val as u8)
6396 } 6350 }
6397 } 6351 #[doc = "Frame format"]
6398 #[doc = "Compensation cell control register"] 6352 pub fn set_frf(&mut self, val: super::vals::Frf) {
6399 #[repr(transparent)] 6353 self.0 = (self.0 & !(0x01 << 4usize)) | (((val.0 as u32) & 0x01) << 4usize);
6400 #[derive(Copy, Clone, Eq, PartialEq)] 6354 }
6401 pub struct Cmpcr(pub u32); 6355 #[doc = "Error interrupt enable"]
6402 impl Cmpcr { 6356 pub const fn errie(&self) -> bool {
6403 #[doc = "Compensation cell power-down"] 6357 let val = (self.0 >> 5usize) & 0x01;
6404 pub const fn cmp_pd(&self) -> bool {
6405 let val = (self.0 >> 0usize) & 0x01;
6406 val != 0 6358 val != 0
6407 } 6359 }
6408 #[doc = "Compensation cell power-down"] 6360 #[doc = "Error interrupt enable"]
6409 pub fn set_cmp_pd(&mut self, val: bool) { 6361 pub fn set_errie(&mut self, val: bool) {
6410 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 6362 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
6411 } 6363 }
6412 #[doc = "READY"] 6364 #[doc = "RX buffer not empty interrupt enable"]
6413 pub const fn ready(&self) -> bool { 6365 pub const fn rxneie(&self) -> bool {
6414 let val = (self.0 >> 8usize) & 0x01; 6366 let val = (self.0 >> 6usize) & 0x01;
6415 val != 0 6367 val != 0
6416 } 6368 }
6417 #[doc = "READY"] 6369 #[doc = "RX buffer not empty interrupt enable"]
6418 pub fn set_ready(&mut self, val: bool) { 6370 pub fn set_rxneie(&mut self, val: bool) {
6419 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); 6371 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
6420 } 6372 }
6421 } 6373 #[doc = "Tx buffer empty interrupt enable"]
6422 impl Default for Cmpcr { 6374 pub const fn txeie(&self) -> bool {
6423 fn default() -> Cmpcr { 6375 let val = (self.0 >> 7usize) & 0x01;
6424 Cmpcr(0) 6376 val != 0
6425 } 6377 }
6426 } 6378 #[doc = "Tx buffer empty interrupt enable"]
6427 } 6379 pub fn set_txeie(&mut self, val: bool) {
6428} 6380 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
6429pub mod gpio_v1 {
6430 use crate::generic::*;
6431 #[doc = "General purpose I/O"]
6432 #[derive(Copy, Clone)]
6433 pub struct Gpio(pub *mut u8);
6434 unsafe impl Send for Gpio {}
6435 unsafe impl Sync for Gpio {}
6436 impl Gpio {
6437 #[doc = "Port configuration register low (GPIOn_CRL)"]
6438 pub fn cr(self, n: usize) -> Reg<regs::Cr, RW> {
6439 assert!(n < 2usize);
6440 unsafe { Reg::from_ptr(self.0.add(0usize + n * 4usize)) }
6441 }
6442 #[doc = "Port input data register (GPIOn_IDR)"]
6443 pub fn idr(self) -> Reg<regs::Idr, R> {
6444 unsafe { Reg::from_ptr(self.0.add(8usize)) }
6445 }
6446 #[doc = "Port output data register (GPIOn_ODR)"]
6447 pub fn odr(self) -> Reg<regs::Odr, RW> {
6448 unsafe { Reg::from_ptr(self.0.add(12usize)) }
6449 }
6450 #[doc = "Port bit set/reset register (GPIOn_BSRR)"]
6451 pub fn bsrr(self) -> Reg<regs::Bsrr, W> {
6452 unsafe { Reg::from_ptr(self.0.add(16usize)) }
6453 }
6454 #[doc = "Port bit reset register (GPIOn_BRR)"]
6455 pub fn brr(self) -> Reg<regs::Brr, W> {
6456 unsafe { Reg::from_ptr(self.0.add(20usize)) }
6457 }
6458 #[doc = "Port configuration lock register"]
6459 pub fn lckr(self) -> Reg<regs::Lckr, RW> {
6460 unsafe { Reg::from_ptr(self.0.add(24usize)) }
6461 }
6462 }
6463 pub mod regs {
6464 use crate::generic::*;
6465 #[doc = "Port configuration lock register"]
6466 #[repr(transparent)]
6467 #[derive(Copy, Clone, Eq, PartialEq)]
6468 pub struct Lckr(pub u32);
6469 impl Lckr {
6470 #[doc = "Port A Lock bit"]
6471 pub fn lck(&self, n: usize) -> super::vals::Lck {
6472 assert!(n < 16usize);
6473 let offs = 0usize + n * 1usize;
6474 let val = (self.0 >> offs) & 0x01;
6475 super::vals::Lck(val as u8)
6476 } 6381 }
6477 #[doc = "Port A Lock bit"] 6382 #[doc = "Data size"]
6478 pub fn set_lck(&mut self, n: usize, val: super::vals::Lck) { 6383 pub const fn ds(&self) -> super::vals::Ds {
6479 assert!(n < 16usize); 6384 let val = (self.0 >> 8usize) & 0x0f;
6480 let offs = 0usize + n * 1usize; 6385 super::vals::Ds(val as u8)
6481 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs);
6482 } 6386 }
6483 #[doc = "Lock key"] 6387 #[doc = "Data size"]
6484 pub const fn lckk(&self) -> super::vals::Lckk { 6388 pub fn set_ds(&mut self, val: super::vals::Ds) {
6485 let val = (self.0 >> 16usize) & 0x01; 6389 self.0 = (self.0 & !(0x0f << 8usize)) | (((val.0 as u32) & 0x0f) << 8usize);
6486 super::vals::Lckk(val as u8)
6487 } 6390 }
6488 #[doc = "Lock key"] 6391 #[doc = "FIFO reception threshold"]
6489 pub fn set_lckk(&mut self, val: super::vals::Lckk) { 6392 pub const fn frxth(&self) -> super::vals::Frxth {
6490 self.0 = (self.0 & !(0x01 << 16usize)) | (((val.0 as u32) & 0x01) << 16usize); 6393 let val = (self.0 >> 12usize) & 0x01;
6394 super::vals::Frxth(val as u8)
6491 } 6395 }
6492 } 6396 #[doc = "FIFO reception threshold"]
6493 impl Default for Lckr { 6397 pub fn set_frxth(&mut self, val: super::vals::Frxth) {
6494 fn default() -> Lckr { 6398 self.0 = (self.0 & !(0x01 << 12usize)) | (((val.0 as u32) & 0x01) << 12usize);
6495 Lckr(0)
6496 } 6399 }
6497 } 6400 #[doc = "Last DMA transfer for reception"]
6498 #[doc = "Port configuration register (GPIOn_CRx)"] 6401 pub const fn ldma_rx(&self) -> super::vals::LdmaRx {
6499 #[repr(transparent)] 6402 let val = (self.0 >> 13usize) & 0x01;
6500 #[derive(Copy, Clone, Eq, PartialEq)] 6403 super::vals::LdmaRx(val as u8)
6501 pub struct Cr(pub u32);
6502 impl Cr {
6503 #[doc = "Port n mode bits"]
6504 pub fn mode(&self, n: usize) -> super::vals::Mode {
6505 assert!(n < 8usize);
6506 let offs = 0usize + n * 4usize;
6507 let val = (self.0 >> offs) & 0x03;
6508 super::vals::Mode(val as u8)
6509 } 6404 }
6510 #[doc = "Port n mode bits"] 6405 #[doc = "Last DMA transfer for reception"]
6511 pub fn set_mode(&mut self, n: usize, val: super::vals::Mode) { 6406 pub fn set_ldma_rx(&mut self, val: super::vals::LdmaRx) {
6512 assert!(n < 8usize); 6407 self.0 = (self.0 & !(0x01 << 13usize)) | (((val.0 as u32) & 0x01) << 13usize);
6513 let offs = 0usize + n * 4usize;
6514 self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs);
6515 } 6408 }
6516 #[doc = "Port n configuration bits"] 6409 #[doc = "Last DMA transfer for transmission"]
6517 pub fn cnf(&self, n: usize) -> super::vals::Cnf { 6410 pub const fn ldma_tx(&self) -> super::vals::LdmaTx {
6518 assert!(n < 8usize); 6411 let val = (self.0 >> 14usize) & 0x01;
6519 let offs = 2usize + n * 4usize; 6412 super::vals::LdmaTx(val as u8)
6520 let val = (self.0 >> offs) & 0x03;
6521 super::vals::Cnf(val as u8)
6522 } 6413 }
6523 #[doc = "Port n configuration bits"] 6414 #[doc = "Last DMA transfer for transmission"]
6524 pub fn set_cnf(&mut self, n: usize, val: super::vals::Cnf) { 6415 pub fn set_ldma_tx(&mut self, val: super::vals::LdmaTx) {
6525 assert!(n < 8usize); 6416 self.0 = (self.0 & !(0x01 << 14usize)) | (((val.0 as u32) & 0x01) << 14usize);
6526 let offs = 2usize + n * 4usize;
6527 self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs);
6528 } 6417 }
6529 } 6418 }
6530 impl Default for Cr { 6419 impl Default for Cr2 {
6531 fn default() -> Cr { 6420 fn default() -> Cr2 {
6532 Cr(0) 6421 Cr2(0)
6533 } 6422 }
6534 } 6423 }
6535 #[doc = "Port bit set/reset register (GPIOn_BSRR)"] 6424 #[doc = "data register"]
6536 #[repr(transparent)] 6425 #[repr(transparent)]
6537 #[derive(Copy, Clone, Eq, PartialEq)] 6426 #[derive(Copy, Clone, Eq, PartialEq)]
6538 pub struct Bsrr(pub u32); 6427 pub struct Dr(pub u32);
6539 impl Bsrr { 6428 impl Dr {
6540 #[doc = "Set bit"] 6429 #[doc = "Data register"]
6541 pub fn bs(&self, n: usize) -> bool { 6430 pub const fn dr(&self) -> u16 {
6542 assert!(n < 16usize); 6431 let val = (self.0 >> 0usize) & 0xffff;
6543 let offs = 0usize + n * 1usize; 6432 val as u16
6544 let val = (self.0 >> offs) & 0x01;
6545 val != 0
6546 }
6547 #[doc = "Set bit"]
6548 pub fn set_bs(&mut self, n: usize, val: bool) {
6549 assert!(n < 16usize);
6550 let offs = 0usize + n * 1usize;
6551 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
6552 }
6553 #[doc = "Reset bit"]
6554 pub fn br(&self, n: usize) -> bool {
6555 assert!(n < 16usize);
6556 let offs = 16usize + n * 1usize;
6557 let val = (self.0 >> offs) & 0x01;
6558 val != 0
6559 } 6433 }
6560 #[doc = "Reset bit"] 6434 #[doc = "Data register"]
6561 pub fn set_br(&mut self, n: usize, val: bool) { 6435 pub fn set_dr(&mut self, val: u16) {
6562 assert!(n < 16usize); 6436 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
6563 let offs = 16usize + n * 1usize;
6564 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
6565 } 6437 }
6566 } 6438 }
6567 impl Default for Bsrr { 6439 impl Default for Dr {
6568 fn default() -> Bsrr { 6440 fn default() -> Dr {
6569 Bsrr(0) 6441 Dr(0)
6570 } 6442 }
6571 } 6443 }
6572 #[doc = "Port output data register (GPIOn_ODR)"] 6444 #[doc = "CRC polynomial register"]
6573 #[repr(transparent)] 6445 #[repr(transparent)]
6574 #[derive(Copy, Clone, Eq, PartialEq)] 6446 #[derive(Copy, Clone, Eq, PartialEq)]
6575 pub struct Odr(pub u32); 6447 pub struct Crcpr(pub u32);
6576 impl Odr { 6448 impl Crcpr {
6577 #[doc = "Port output data"] 6449 #[doc = "CRC polynomial register"]
6578 pub fn odr(&self, n: usize) -> super::vals::Odr { 6450 pub const fn crcpoly(&self) -> u16 {
6579 assert!(n < 16usize); 6451 let val = (self.0 >> 0usize) & 0xffff;
6580 let offs = 0usize + n * 1usize; 6452 val as u16
6581 let val = (self.0 >> offs) & 0x01;
6582 super::vals::Odr(val as u8)
6583 } 6453 }
6584 #[doc = "Port output data"] 6454 #[doc = "CRC polynomial register"]
6585 pub fn set_odr(&mut self, n: usize, val: super::vals::Odr) { 6455 pub fn set_crcpoly(&mut self, val: u16) {
6586 assert!(n < 16usize); 6456 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
6587 let offs = 0usize + n * 1usize;
6588 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs);
6589 } 6457 }
6590 } 6458 }
6591 impl Default for Odr { 6459 impl Default for Crcpr {
6592 fn default() -> Odr { 6460 fn default() -> Crcpr {
6593 Odr(0) 6461 Crcpr(0)
6594 } 6462 }
6595 } 6463 }
6596 #[doc = "Port bit reset register (GPIOn_BRR)"] 6464 #[doc = "RX CRC register"]
6597 #[repr(transparent)] 6465 #[repr(transparent)]
6598 #[derive(Copy, Clone, Eq, PartialEq)] 6466 #[derive(Copy, Clone, Eq, PartialEq)]
6599 pub struct Brr(pub u32); 6467 pub struct Rxcrcr(pub u32);
6600 impl Brr { 6468 impl Rxcrcr {
6601 #[doc = "Reset bit"] 6469 #[doc = "Rx CRC register"]
6602 pub fn br(&self, n: usize) -> bool { 6470 pub const fn rx_crc(&self) -> u16 {
6603 assert!(n < 16usize); 6471 let val = (self.0 >> 0usize) & 0xffff;
6604 let offs = 0usize + n * 1usize; 6472 val as u16
6605 let val = (self.0 >> offs) & 0x01;
6606 val != 0
6607 } 6473 }
6608 #[doc = "Reset bit"] 6474 #[doc = "Rx CRC register"]
6609 pub fn set_br(&mut self, n: usize, val: bool) { 6475 pub fn set_rx_crc(&mut self, val: u16) {
6610 assert!(n < 16usize); 6476 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
6611 let offs = 0usize + n * 1usize;
6612 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
6613 } 6477 }
6614 } 6478 }
6615 impl Default for Brr { 6479 impl Default for Rxcrcr {
6616 fn default() -> Brr { 6480 fn default() -> Rxcrcr {
6617 Brr(0) 6481 Rxcrcr(0)
6618 } 6482 }
6619 } 6483 }
6620 #[doc = "Port input data register (GPIOn_IDR)"] 6484 #[doc = "TX CRC register"]
6621 #[repr(transparent)] 6485 #[repr(transparent)]
6622 #[derive(Copy, Clone, Eq, PartialEq)] 6486 #[derive(Copy, Clone, Eq, PartialEq)]
6623 pub struct Idr(pub u32); 6487 pub struct Txcrcr(pub u32);
6624 impl Idr { 6488 impl Txcrcr {
6625 #[doc = "Port input data"] 6489 #[doc = "Tx CRC register"]
6626 pub fn idr(&self, n: usize) -> super::vals::Idr { 6490 pub const fn tx_crc(&self) -> u16 {
6627 assert!(n < 16usize); 6491 let val = (self.0 >> 0usize) & 0xffff;
6628 let offs = 0usize + n * 1usize; 6492 val as u16
6629 let val = (self.0 >> offs) & 0x01;
6630 super::vals::Idr(val as u8)
6631 } 6493 }
6632 #[doc = "Port input data"] 6494 #[doc = "Tx CRC register"]
6633 pub fn set_idr(&mut self, n: usize, val: super::vals::Idr) { 6495 pub fn set_tx_crc(&mut self, val: u16) {
6634 assert!(n < 16usize); 6496 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
6635 let offs = 0usize + n * 1usize;
6636 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs);
6637 } 6497 }
6638 } 6498 }
6639 impl Default for Idr { 6499 impl Default for Txcrcr {
6640 fn default() -> Idr { 6500 fn default() -> Txcrcr {
6641 Idr(0) 6501 Txcrcr(0)
6642 } 6502 }
6643 } 6503 }
6644 } 6504 }
6645 pub mod vals {
6646 use crate::generic::*;
6647 #[repr(transparent)]
6648 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6649 pub struct Cnf(pub u8);
6650 impl Cnf {
6651 #[doc = "Analog mode / Push-Pull mode"]
6652 pub const PUSHPULL: Self = Self(0);
6653 #[doc = "Floating input (reset state) / Open Drain-Mode"]
6654 pub const OPENDRAIN: Self = Self(0x01);
6655 #[doc = "Input with pull-up/pull-down / Alternate Function Push-Pull Mode"]
6656 pub const ALTPUSHPULL: Self = Self(0x02);
6657 #[doc = "Alternate Function Open-Drain Mode"]
6658 pub const ALTOPENDRAIN: Self = Self(0x03);
6659 }
6660 #[repr(transparent)]
6661 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6662 pub struct Lck(pub u8);
6663 impl Lck {
6664 #[doc = "Port configuration not locked"]
6665 pub const UNLOCKED: Self = Self(0);
6666 #[doc = "Port configuration locked"]
6667 pub const LOCKED: Self = Self(0x01);
6668 }
6669 #[repr(transparent)]
6670 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6671 pub struct Mode(pub u8);
6672 impl Mode {
6673 #[doc = "Input mode (reset state)"]
6674 pub const INPUT: Self = Self(0);
6675 #[doc = "Output mode 10 MHz"]
6676 pub const OUTPUT: Self = Self(0x01);
6677 #[doc = "Output mode 2 MHz"]
6678 pub const OUTPUT2: Self = Self(0x02);
6679 #[doc = "Output mode 50 MHz"]
6680 pub const OUTPUT50: Self = Self(0x03);
6681 }
6682 #[repr(transparent)]
6683 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6684 pub struct Lckk(pub u8);
6685 impl Lckk {
6686 #[doc = "Port configuration lock key not active"]
6687 pub const NOTACTIVE: Self = Self(0);
6688 #[doc = "Port configuration lock key active"]
6689 pub const ACTIVE: Self = Self(0x01);
6690 }
6691 #[repr(transparent)]
6692 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6693 pub struct Idr(pub u8);
6694 impl Idr {
6695 #[doc = "Input is logic low"]
6696 pub const LOW: Self = Self(0);
6697 #[doc = "Input is logic high"]
6698 pub const HIGH: Self = Self(0x01);
6699 }
6700 #[repr(transparent)]
6701 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6702 pub struct Bsw(pub u8);
6703 impl Bsw {
6704 #[doc = "No action on the corresponding ODx bit"]
6705 pub const NOACTION: Self = Self(0);
6706 #[doc = "Sets the corresponding ODRx bit"]
6707 pub const SET: Self = Self(0x01);
6708 }
6709 #[repr(transparent)]
6710 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6711 pub struct Odr(pub u8);
6712 impl Odr {
6713 #[doc = "Set output to logic low"]
6714 pub const LOW: Self = Self(0);
6715 #[doc = "Set output to logic high"]
6716 pub const HIGH: Self = Self(0x01);
6717 }
6718 #[repr(transparent)]
6719 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6720 pub struct Brw(pub u8);
6721 impl Brw {
6722 #[doc = "No action on the corresponding ODx bit"]
6723 pub const NOACTION: Self = Self(0);
6724 #[doc = "Reset the ODx bit"]
6725 pub const RESET: Self = Self(0x01);
6726 }
6727 }
6728} 6505}
6729pub mod dma_v1 { 6506pub mod dma_v2 {
6730 use crate::generic::*; 6507 use crate::generic::*;
6731 #[doc = "DMA controller"] 6508 #[doc = "DMA controller"]
6732 #[derive(Copy, Clone)] 6509 #[derive(Copy, Clone)]
@@ -6734,119 +6511,333 @@ pub mod dma_v1 {
6734 unsafe impl Send for Dma {} 6511 unsafe impl Send for Dma {}
6735 unsafe impl Sync for Dma {} 6512 unsafe impl Sync for Dma {}
6736 impl Dma { 6513 impl Dma {
6737 #[doc = "DMA interrupt status register (DMA_ISR)"] 6514 #[doc = "low interrupt status register"]
6738 pub fn isr(self) -> Reg<regs::Isr, R> { 6515 pub fn isr(self, n: usize) -> Reg<regs::Isr, R> {
6739 unsafe { Reg::from_ptr(self.0.add(0usize)) } 6516 assert!(n < 2usize);
6517 unsafe { Reg::from_ptr(self.0.add(0usize + n * 4usize)) }
6740 } 6518 }
6741 #[doc = "DMA interrupt flag clear register (DMA_IFCR)"] 6519 #[doc = "low interrupt flag clear register"]
6742 pub fn ifcr(self) -> Reg<regs::Ifcr, W> { 6520 pub fn ifcr(self, n: usize) -> Reg<regs::Ifcr, W> {
6743 unsafe { Reg::from_ptr(self.0.add(4usize)) } 6521 assert!(n < 2usize);
6522 unsafe { Reg::from_ptr(self.0.add(8usize + n * 4usize)) }
6744 } 6523 }
6745 #[doc = "Channel cluster: CCR?, CNDTR?, CPAR?, and CMAR? registers"] 6524 #[doc = "Stream cluster: S?CR, S?NDTR, S?M0AR, S?M1AR and S?FCR registers"]
6746 pub fn ch(self, n: usize) -> Ch { 6525 pub fn st(self, n: usize) -> St {
6747 assert!(n < 7usize); 6526 assert!(n < 8usize);
6748 unsafe { Ch(self.0.add(8usize + n * 20usize)) } 6527 unsafe { St(self.0.add(16usize + n * 24usize)) }
6749 } 6528 }
6750 } 6529 }
6751 #[doc = "Channel cluster: CCR?, CNDTR?, CPAR?, and CMAR? registers"] 6530 #[doc = "Stream cluster: S?CR, S?NDTR, S?M0AR, S?M1AR and S?FCR registers"]
6752 #[derive(Copy, Clone)] 6531 #[derive(Copy, Clone)]
6753 pub struct Ch(pub *mut u8); 6532 pub struct St(pub *mut u8);
6754 unsafe impl Send for Ch {} 6533 unsafe impl Send for St {}
6755 unsafe impl Sync for Ch {} 6534 unsafe impl Sync for St {}
6756 impl Ch { 6535 impl St {
6757 #[doc = "DMA channel configuration register (DMA_CCR)"] 6536 #[doc = "stream x configuration register"]
6758 pub fn cr(self) -> Reg<regs::Cr, RW> { 6537 pub fn cr(self) -> Reg<regs::Cr, RW> {
6759 unsafe { Reg::from_ptr(self.0.add(0usize)) } 6538 unsafe { Reg::from_ptr(self.0.add(0usize)) }
6760 } 6539 }
6761 #[doc = "DMA channel 1 number of data register"] 6540 #[doc = "stream x number of data register"]
6762 pub fn ndtr(self) -> Reg<regs::Ndtr, RW> { 6541 pub fn ndtr(self) -> Reg<regs::Ndtr, RW> {
6763 unsafe { Reg::from_ptr(self.0.add(4usize)) } 6542 unsafe { Reg::from_ptr(self.0.add(4usize)) }
6764 } 6543 }
6765 #[doc = "DMA channel 1 peripheral address register"] 6544 #[doc = "stream x peripheral address register"]
6766 pub fn par(self) -> Reg<u32, RW> { 6545 pub fn par(self) -> Reg<u32, RW> {
6767 unsafe { Reg::from_ptr(self.0.add(8usize)) } 6546 unsafe { Reg::from_ptr(self.0.add(8usize)) }
6768 } 6547 }
6769 #[doc = "DMA channel 1 memory address register"] 6548 #[doc = "stream x memory 0 address register"]
6770 pub fn mar(self) -> Reg<u32, RW> { 6549 pub fn m0ar(self) -> Reg<u32, RW> {
6771 unsafe { Reg::from_ptr(self.0.add(12usize)) } 6550 unsafe { Reg::from_ptr(self.0.add(12usize)) }
6772 } 6551 }
6552 #[doc = "stream x memory 1 address register"]
6553 pub fn m1ar(self) -> Reg<u32, RW> {
6554 unsafe { Reg::from_ptr(self.0.add(16usize)) }
6555 }
6556 #[doc = "stream x FIFO control register"]
6557 pub fn fcr(self) -> Reg<regs::Fcr, RW> {
6558 unsafe { Reg::from_ptr(self.0.add(20usize)) }
6559 }
6773 } 6560 }
6774 pub mod vals { 6561 pub mod vals {
6775 use crate::generic::*; 6562 use crate::generic::*;
6776 #[repr(transparent)] 6563 #[repr(transparent)]
6777 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 6564 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6778 pub struct Inc(pub u8); 6565 pub struct Pincos(pub u8);
6779 impl Inc { 6566 impl Pincos {
6780 #[doc = "Increment mode disabled"] 6567 #[doc = "The offset size for the peripheral address calculation is linked to the PSIZE"]
6781 pub const DISABLED: Self = Self(0); 6568 pub const PSIZE: Self = Self(0);
6782 #[doc = "Increment mode enabled"] 6569 #[doc = "The offset size for the peripheral address calculation is fixed to 4 (32-bit alignment)"]
6783 pub const ENABLED: Self = Self(0x01); 6570 pub const FIXED4: Self = Self(0x01);
6784 } 6571 }
6785 #[repr(transparent)] 6572 #[repr(transparent)]
6786 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 6573 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6787 pub struct Dir(pub u8); 6574 pub struct Fs(pub u8);
6788 impl Dir { 6575 impl Fs {
6789 #[doc = "Read from peripheral"] 6576 #[doc = "0 < fifo_level < 1/4"]
6790 pub const FROMPERIPHERAL: Self = Self(0); 6577 pub const QUARTER1: Self = Self(0);
6791 #[doc = "Read from memory"] 6578 #[doc = "1/4 <= fifo_level < 1/2"]
6792 pub const FROMMEMORY: Self = Self(0x01); 6579 pub const QUARTER2: Self = Self(0x01);
6580 #[doc = "1/2 <= fifo_level < 3/4"]
6581 pub const QUARTER3: Self = Self(0x02);
6582 #[doc = "3/4 <= fifo_level < full"]
6583 pub const QUARTER4: 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);
6793 } 6588 }
6794 #[repr(transparent)] 6589 #[repr(transparent)]
6795 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 6590 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6796 pub struct Circ(pub u8); 6591 pub struct Burst(pub u8);
6797 impl Circ { 6592 impl Burst {
6798 #[doc = "Circular buffer disabled"] 6593 #[doc = "Single transfer"]
6594 pub const SINGLE: Self = Self(0);
6595 #[doc = "Incremental burst of 4 beats"]
6596 pub const INCR4: 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 }
6602 #[repr(transparent)]
6603 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6604 pub struct Dbm(pub u8);
6605 impl Dbm {
6606 #[doc = "No buffer switching at the end of transfer"]
6799 pub const DISABLED: Self = Self(0); 6607 pub const DISABLED: Self = Self(0);
6800 #[doc = "Circular buffer enabled"] 6608 #[doc = "Memory target switched at the end of the DMA transfer"]
6801 pub const ENABLED: Self = Self(0x01); 6609 pub const ENABLED: Self = Self(0x01);
6802 } 6610 }
6803 #[repr(transparent)] 6611 #[repr(transparent)]
6804 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 6612 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6805 pub struct Size(pub u8); 6613 pub struct Inc(pub u8);
6806 impl Size { 6614 impl Inc {
6807 #[doc = "8-bit size"] 6615 #[doc = "Address pointer is fixed"]
6808 pub const BITS8: Self = Self(0); 6616 pub const FIXED: Self = Self(0);
6809 #[doc = "16-bit size"] 6617 #[doc = "Address pointer is incremented after each data transfer"]
6810 pub const BITS16: Self = Self(0x01); 6618 pub const INCREMENTED: Self = Self(0x01);
6811 #[doc = "32-bit size"] 6619 }
6812 pub const BITS32: Self = Self(0x02); 6620 #[repr(transparent)]
6621 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6622 pub struct Dir(pub u8);
6623 impl Dir {
6624 #[doc = "Peripheral-to-memory"]
6625 pub const PERIPHERALTOMEMORY: Self = Self(0);
6626 #[doc = "Memory-to-peripheral"]
6627 pub const MEMORYTOPERIPHERAL: Self = Self(0x01);
6628 #[doc = "Memory-to-memory"]
6629 pub const MEMORYTOMEMORY: Self = Self(0x02);
6630 }
6631 #[repr(transparent)]
6632 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6633 pub struct Pfctrl(pub u8);
6634 impl Pfctrl {
6635 #[doc = "The DMA is the flow controller"]
6636 pub const DMA: Self = Self(0);
6637 #[doc = "The peripheral is the flow controller"]
6638 pub const PERIPHERAL: Self = Self(0x01);
6813 } 6639 }
6814 #[repr(transparent)] 6640 #[repr(transparent)]
6815 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 6641 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6816 pub struct Pl(pub u8); 6642 pub struct Pl(pub u8);
6817 impl Pl { 6643 impl Pl {
6818 #[doc = "Low priority"] 6644 #[doc = "Low"]
6819 pub const LOW: Self = Self(0); 6645 pub const LOW: Self = Self(0);
6820 #[doc = "Medium priority"] 6646 #[doc = "Medium"]
6821 pub const MEDIUM: Self = Self(0x01); 6647 pub const MEDIUM: Self = Self(0x01);
6822 #[doc = "High priority"] 6648 #[doc = "High"]
6823 pub const HIGH: Self = Self(0x02); 6649 pub const HIGH: Self = Self(0x02);
6824 #[doc = "Very high priority"] 6650 #[doc = "Very high"]
6825 pub const VERYHIGH: Self = Self(0x03); 6651 pub const VERYHIGH: Self = Self(0x03);
6826 } 6652 }
6827 #[repr(transparent)] 6653 #[repr(transparent)]
6828 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 6654 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6829 pub struct Memmem(pub u8); 6655 pub struct Circ(pub u8);
6830 impl Memmem { 6656 impl Circ {
6831 #[doc = "Memory to memory mode disabled"] 6657 #[doc = "Circular mode disabled"]
6832 pub const DISABLED: Self = Self(0); 6658 pub const DISABLED: Self = Self(0);
6833 #[doc = "Memory to memory mode enabled"] 6659 #[doc = "Circular mode enabled"]
6834 pub const ENABLED: Self = Self(0x01); 6660 pub const ENABLED: Self = Self(0x01);
6835 } 6661 }
6662 #[repr(transparent)]
6663 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6664 pub struct Fth(pub u8);
6665 impl Fth {
6666 #[doc = "1/4 full FIFO"]
6667 pub const QUARTER: Self = Self(0);
6668 #[doc = "1/2 full FIFO"]
6669 pub const HALF: 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 }
6675 #[repr(transparent)]
6676 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6677 pub struct Ct(pub u8);
6678 impl Ct {
6679 #[doc = "The current target memory is Memory 0"]
6680 pub const MEMORY0: Self = Self(0);
6681 #[doc = "The current target memory is Memory 1"]
6682 pub const MEMORY1: Self = Self(0x01);
6683 }
6684 #[repr(transparent)]
6685 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6686 pub struct Dmdis(pub u8);
6687 impl Dmdis {
6688 #[doc = "Direct mode is enabled"]
6689 pub const ENABLED: Self = Self(0);
6690 #[doc = "Direct mode is disabled"]
6691 pub const DISABLED: Self = Self(0x01);
6692 }
6693 #[repr(transparent)]
6694 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6695 pub struct Size(pub u8);
6696 impl Size {
6697 #[doc = "Byte (8-bit)"]
6698 pub const BITS8: Self = Self(0);
6699 #[doc = "Half-word (16-bit)"]
6700 pub const BITS16: Self = Self(0x01);
6701 #[doc = "Word (32-bit)"]
6702 pub const BITS32: Self = Self(0x02);
6703 }
6836 } 6704 }
6837 pub mod regs { 6705 pub mod regs {
6838 use crate::generic::*; 6706 use crate::generic::*;
6839 #[doc = "DMA channel 1 number of data register"] 6707 #[doc = "low interrupt flag clear 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)]
6785 #[derive(Copy, Clone, Eq, PartialEq)]
6786 pub struct Fcr(pub u32);
6787 impl Fcr {
6788 #[doc = "FIFO threshold selection"]
6789 pub const fn fth(&self) -> super::vals::Fth {
6790 let val = (self.0 >> 0usize) & 0x03;
6791 super::vals::Fth(val as u8)
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 }
6820 #[doc = "FIFO error interrupt enable"]
6821 pub fn set_feie(&mut self, val: bool) {
6822 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
6823 }
6824 }
6825 impl Default for Fcr {
6826 fn default() -> Fcr {
6827 Fcr(0)
6828 }
6829 }
6830 #[doc = "stream x number of data register"]
6840 #[repr(transparent)] 6831 #[repr(transparent)]
6841 #[derive(Copy, Clone, Eq, PartialEq)] 6832 #[derive(Copy, Clone, Eq, PartialEq)]
6842 pub struct Ndtr(pub u32); 6833 pub struct Ndtr(pub u32);
6843 impl Ndtr { 6834 impl Ndtr {
6844 #[doc = "Number of data to transfer"] 6835 #[doc = "Number of data items to transfer"]
6845 pub const fn ndt(&self) -> u16 { 6836 pub const fn ndt(&self) -> u16 {
6846 let val = (self.0 >> 0usize) & 0xffff; 6837 let val = (self.0 >> 0usize) & 0xffff;
6847 val as u16 6838 val as u16
6848 } 6839 }
6849 #[doc = "Number of data to transfer"] 6840 #[doc = "Number of data items to transfer"]
6850 pub fn set_ndt(&mut self, val: u16) { 6841 pub fn set_ndt(&mut self, val: u16) {
6851 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); 6842 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
6852 } 6843 }
@@ -6856,61 +6847,74 @@ pub mod dma_v1 {
6856 Ndtr(0) 6847 Ndtr(0)
6857 } 6848 }
6858 } 6849 }
6859 #[doc = "DMA interrupt status register (DMA_ISR)"] 6850 #[doc = "low interrupt status register"]
6860 #[repr(transparent)] 6851 #[repr(transparent)]
6861 #[derive(Copy, Clone, Eq, PartialEq)] 6852 #[derive(Copy, Clone, Eq, PartialEq)]
6862 pub struct Isr(pub u32); 6853 pub struct Isr(pub u32);
6863 impl Isr { 6854 impl Isr {
6864 #[doc = "Channel 1 Global interrupt flag"] 6855 #[doc = "Stream x FIFO error interrupt flag (x=3..0)"]
6865 pub fn gif(&self, n: usize) -> bool { 6856 pub fn feif(&self, n: usize) -> bool {
6866 assert!(n < 7usize); 6857 assert!(n < 4usize);
6867 let offs = 0usize + n * 4usize; 6858 let offs = 0usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
6868 let val = (self.0 >> offs) & 0x01; 6859 let val = (self.0 >> offs) & 0x01;
6869 val != 0 6860 val != 0
6870 } 6861 }
6871 #[doc = "Channel 1 Global interrupt flag"] 6862 #[doc = "Stream x FIFO error interrupt flag (x=3..0)"]
6872 pub fn set_gif(&mut self, n: usize, val: bool) { 6863 pub fn set_feif(&mut self, n: usize, val: bool) {
6873 assert!(n < 7usize); 6864 assert!(n < 4usize);
6874 let offs = 0usize + n * 4usize; 6865 let offs = 0usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
6875 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); 6866 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
6876 } 6867 }
6877 #[doc = "Channel 1 Transfer Complete flag"] 6868 #[doc = "Stream x direct mode error interrupt flag (x=3..0)"]
6878 pub fn tcif(&self, n: usize) -> bool { 6869 pub fn dmeif(&self, n: usize) -> bool {
6879 assert!(n < 7usize); 6870 assert!(n < 4usize);
6880 let offs = 1usize + n * 4usize; 6871 let offs = 2usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
6881 let val = (self.0 >> offs) & 0x01; 6872 let val = (self.0 >> offs) & 0x01;
6882 val != 0 6873 val != 0
6883 } 6874 }
6884 #[doc = "Channel 1 Transfer Complete flag"] 6875 #[doc = "Stream x direct mode error interrupt flag (x=3..0)"]
6885 pub fn set_tcif(&mut self, n: usize, val: bool) { 6876 pub fn set_dmeif(&mut self, n: usize, val: bool) {
6886 assert!(n < 7usize); 6877 assert!(n < 4usize);
6887 let offs = 1usize + n * 4usize; 6878 let offs = 2usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
6888 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); 6879 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
6889 } 6880 }
6890 #[doc = "Channel 1 Half Transfer Complete flag"] 6881 #[doc = "Stream x transfer error interrupt flag (x=3..0)"]
6882 pub fn teif(&self, n: usize) -> bool {
6883 assert!(n < 4usize);
6884 let offs = 3usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
6885 let val = (self.0 >> offs) & 0x01;
6886 val != 0
6887 }
6888 #[doc = "Stream x transfer error interrupt flag (x=3..0)"]
6889 pub fn set_teif(&mut self, n: usize, val: bool) {
6890 assert!(n < 4usize);
6891 let offs = 3usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
6892 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
6893 }
6894 #[doc = "Stream x half transfer interrupt flag (x=3..0)"]
6891 pub fn htif(&self, n: usize) -> bool { 6895 pub fn htif(&self, n: usize) -> bool {
6892 assert!(n < 7usize); 6896 assert!(n < 4usize);
6893 let offs = 2usize + n * 4usize; 6897 let offs = 4usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
6894 let val = (self.0 >> offs) & 0x01; 6898 let val = (self.0 >> offs) & 0x01;
6895 val != 0 6899 val != 0
6896 } 6900 }
6897 #[doc = "Channel 1 Half Transfer Complete flag"] 6901 #[doc = "Stream x half transfer interrupt flag (x=3..0)"]
6898 pub fn set_htif(&mut self, n: usize, val: bool) { 6902 pub fn set_htif(&mut self, n: usize, val: bool) {
6899 assert!(n < 7usize); 6903 assert!(n < 4usize);
6900 let offs = 2usize + n * 4usize; 6904 let offs = 4usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
6901 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); 6905 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
6902 } 6906 }
6903 #[doc = "Channel 1 Transfer Error flag"] 6907 #[doc = "Stream x transfer complete interrupt flag (x = 3..0)"]
6904 pub fn teif(&self, n: usize) -> bool { 6908 pub fn tcif(&self, n: usize) -> bool {
6905 assert!(n < 7usize); 6909 assert!(n < 4usize);
6906 let offs = 3usize + n * 4usize; 6910 let offs = 5usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
6907 let val = (self.0 >> offs) & 0x01; 6911 let val = (self.0 >> offs) & 0x01;
6908 val != 0 6912 val != 0
6909 } 6913 }
6910 #[doc = "Channel 1 Transfer Error flag"] 6914 #[doc = "Stream x transfer complete interrupt flag (x = 3..0)"]
6911 pub fn set_teif(&mut self, n: usize, val: bool) { 6915 pub fn set_tcif(&mut self, n: usize, val: bool) {
6912 assert!(n < 7usize); 6916 assert!(n < 4usize);
6913 let offs = 3usize + n * 4usize; 6917 let offs = 5usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
6914 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); 6918 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
6915 } 6919 }
6916 } 6920 }
@@ -6919,2185 +6923,2181 @@ pub mod dma_v1 {
6919 Isr(0) 6923 Isr(0)
6920 } 6924 }
6921 } 6925 }
6922 #[doc = "DMA channel configuration register (DMA_CCR)"] 6926 #[doc = "stream x configuration register"]
6923 #[repr(transparent)] 6927 #[repr(transparent)]
6924 #[derive(Copy, Clone, Eq, PartialEq)] 6928 #[derive(Copy, Clone, Eq, PartialEq)]
6925 pub struct Cr(pub u32); 6929 pub struct Cr(pub u32);
6926 impl Cr { 6930 impl Cr {
6927 #[doc = "Channel enable"] 6931 #[doc = "Stream enable / flag stream ready when read low"]
6928 pub const fn en(&self) -> bool { 6932 pub const fn en(&self) -> bool {
6929 let val = (self.0 >> 0usize) & 0x01; 6933 let val = (self.0 >> 0usize) & 0x01;
6930 val != 0 6934 val != 0
6931 } 6935 }
6932 #[doc = "Channel enable"] 6936 #[doc = "Stream enable / flag stream ready when read low"]
6933 pub fn set_en(&mut self, val: bool) { 6937 pub fn set_en(&mut self, val: bool) {
6934 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 6938 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
6935 } 6939 }
6936 #[doc = "Transfer complete interrupt enable"] 6940 #[doc = "Direct mode error interrupt enable"]
6937 pub const fn tcie(&self) -> bool { 6941 pub const fn dmeie(&self) -> bool {
6938 let val = (self.0 >> 1usize) & 0x01; 6942 let val = (self.0 >> 1usize) & 0x01;
6939 val != 0 6943 val != 0
6940 } 6944 }
6941 #[doc = "Transfer complete interrupt enable"] 6945 #[doc = "Direct mode error interrupt enable"]
6942 pub fn set_tcie(&mut self, val: bool) { 6946 pub fn set_dmeie(&mut self, val: bool) {
6943 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); 6947 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
6944 } 6948 }
6945 #[doc = "Half Transfer interrupt enable"] 6949 #[doc = "Transfer error interrupt enable"]
6946 pub const fn htie(&self) -> bool { 6950 pub const fn teie(&self) -> bool {
6947 let val = (self.0 >> 2usize) & 0x01; 6951 let val = (self.0 >> 2usize) & 0x01;
6948 val != 0 6952 val != 0
6949 } 6953 }
6950 #[doc = "Half Transfer interrupt enable"] 6954 #[doc = "Transfer error interrupt enable"]
6951 pub fn set_htie(&mut self, val: bool) { 6955 pub fn set_teie(&mut self, val: bool) {
6952 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); 6956 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
6953 } 6957 }
6954 #[doc = "Transfer error interrupt enable"] 6958 #[doc = "Half transfer interrupt enable"]
6955 pub const fn teie(&self) -> bool { 6959 pub const fn htie(&self) -> bool {
6956 let val = (self.0 >> 3usize) & 0x01; 6960 let val = (self.0 >> 3usize) & 0x01;
6957 val != 0 6961 val != 0
6958 } 6962 }
6959 #[doc = "Transfer error interrupt enable"] 6963 #[doc = "Half transfer interrupt enable"]
6960 pub fn set_teie(&mut self, val: bool) { 6964 pub fn set_htie(&mut self, val: bool) {
6961 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); 6965 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
6962 } 6966 }
6967 #[doc = "Transfer complete interrupt enable"]
6968 pub const fn tcie(&self) -> bool {
6969 let val = (self.0 >> 4usize) & 0x01;
6970 val != 0
6971 }
6972 #[doc = "Transfer complete interrupt enable"]
6973 pub fn set_tcie(&mut self, val: bool) {
6974 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
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 }
6963 #[doc = "Data transfer direction"] 6985 #[doc = "Data transfer direction"]
6964 pub const fn dir(&self) -> super::vals::Dir { 6986 pub const fn dir(&self) -> super::vals::Dir {
6965 let val = (self.0 >> 4usize) & 0x01; 6987 let val = (self.0 >> 6usize) & 0x03;
6966 super::vals::Dir(val as u8) 6988 super::vals::Dir(val as u8)
6967 } 6989 }
6968 #[doc = "Data transfer direction"] 6990 #[doc = "Data transfer direction"]
6969 pub fn set_dir(&mut self, val: super::vals::Dir) { 6991 pub fn set_dir(&mut self, val: super::vals::Dir) {
6970 self.0 = (self.0 & !(0x01 << 4usize)) | (((val.0 as u32) & 0x01) << 4usize); 6992 self.0 = (self.0 & !(0x03 << 6usize)) | (((val.0 as u32) & 0x03) << 6usize);
6971 } 6993 }
6972 #[doc = "Circular mode"] 6994 #[doc = "Circular mode"]
6973 pub const fn circ(&self) -> super::vals::Circ { 6995 pub const fn circ(&self) -> super::vals::Circ {
6974 let val = (self.0 >> 5usize) & 0x01; 6996 let val = (self.0 >> 8usize) & 0x01;
6975 super::vals::Circ(val as u8) 6997 super::vals::Circ(val as u8)
6976 } 6998 }
6977 #[doc = "Circular mode"] 6999 #[doc = "Circular mode"]
6978 pub fn set_circ(&mut self, val: super::vals::Circ) { 7000 pub fn set_circ(&mut self, val: super::vals::Circ) {
6979 self.0 = (self.0 & !(0x01 << 5usize)) | (((val.0 as u32) & 0x01) << 5usize); 7001 self.0 = (self.0 & !(0x01 << 8usize)) | (((val.0 as u32) & 0x01) << 8usize);
6980 } 7002 }
6981 #[doc = "Peripheral increment mode"] 7003 #[doc = "Peripheral increment mode"]
6982 pub const fn pinc(&self) -> super::vals::Inc { 7004 pub const fn pinc(&self) -> super::vals::Inc {
6983 let val = (self.0 >> 6usize) & 0x01; 7005 let val = (self.0 >> 9usize) & 0x01;
6984 super::vals::Inc(val as u8) 7006 super::vals::Inc(val as u8)
6985 } 7007 }
6986 #[doc = "Peripheral increment mode"] 7008 #[doc = "Peripheral increment mode"]
6987 pub fn set_pinc(&mut self, val: super::vals::Inc) { 7009 pub fn set_pinc(&mut self, val: super::vals::Inc) {
6988 self.0 = (self.0 & !(0x01 << 6usize)) | (((val.0 as u32) & 0x01) << 6usize); 7010 self.0 = (self.0 & !(0x01 << 9usize)) | (((val.0 as u32) & 0x01) << 9usize);
6989 } 7011 }
6990 #[doc = "Memory increment mode"] 7012 #[doc = "Memory increment mode"]
6991 pub const fn minc(&self) -> super::vals::Inc { 7013 pub const fn minc(&self) -> super::vals::Inc {
6992 let val = (self.0 >> 7usize) & 0x01; 7014 let val = (self.0 >> 10usize) & 0x01;
6993 super::vals::Inc(val as u8) 7015 super::vals::Inc(val as u8)
6994 } 7016 }
6995 #[doc = "Memory increment mode"] 7017 #[doc = "Memory increment mode"]
6996 pub fn set_minc(&mut self, val: super::vals::Inc) { 7018 pub fn set_minc(&mut self, val: super::vals::Inc) {
6997 self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize); 7019 self.0 = (self.0 & !(0x01 << 10usize)) | (((val.0 as u32) & 0x01) << 10usize);
6998 } 7020 }
6999 #[doc = "Peripheral size"] 7021 #[doc = "Peripheral data size"]
7000 pub const fn psize(&self) -> super::vals::Size { 7022 pub const fn psize(&self) -> super::vals::Size {
7001 let val = (self.0 >> 8usize) & 0x03; 7023 let val = (self.0 >> 11usize) & 0x03;
7002 super::vals::Size(val as u8) 7024 super::vals::Size(val as u8)
7003 } 7025 }
7004 #[doc = "Peripheral size"] 7026 #[doc = "Peripheral data size"]
7005 pub fn set_psize(&mut self, val: super::vals::Size) { 7027 pub fn set_psize(&mut self, val: super::vals::Size) {
7006 self.0 = (self.0 & !(0x03 << 8usize)) | (((val.0 as u32) & 0x03) << 8usize); 7028 self.0 = (self.0 & !(0x03 << 11usize)) | (((val.0 as u32) & 0x03) << 11usize);
7007 } 7029 }
7008 #[doc = "Memory size"] 7030 #[doc = "Memory data size"]
7009 pub const fn msize(&self) -> super::vals::Size { 7031 pub const fn msize(&self) -> super::vals::Size {
7010 let val = (self.0 >> 10usize) & 0x03; 7032 let val = (self.0 >> 13usize) & 0x03;
7011 super::vals::Size(val as u8) 7033 super::vals::Size(val as u8)
7012 } 7034 }
7013 #[doc = "Memory size"] 7035 #[doc = "Memory data size"]
7014 pub fn set_msize(&mut self, val: super::vals::Size) { 7036 pub fn set_msize(&mut self, val: super::vals::Size) {
7015 self.0 = (self.0 & !(0x03 << 10usize)) | (((val.0 as u32) & 0x03) << 10usize); 7037 self.0 = (self.0 & !(0x03 << 13usize)) | (((val.0 as u32) & 0x03) << 13usize);
7016 } 7038 }
7017 #[doc = "Channel Priority level"] 7039 #[doc = "Peripheral increment offset size"]
7040 pub const fn pincos(&self) -> super::vals::Pincos {
7041 let val = (self.0 >> 15usize) & 0x01;
7042 super::vals::Pincos(val as u8)
7043 }
7044 #[doc = "Peripheral increment offset size"]
7045 pub fn set_pincos(&mut self, val: super::vals::Pincos) {
7046 self.0 = (self.0 & !(0x01 << 15usize)) | (((val.0 as u32) & 0x01) << 15usize);
7047 }
7048 #[doc = "Priority level"]
7018 pub const fn pl(&self) -> super::vals::Pl { 7049 pub const fn pl(&self) -> super::vals::Pl {
7019 let val = (self.0 >> 12usize) & 0x03; 7050 let val = (self.0 >> 16usize) & 0x03;
7020 super::vals::Pl(val as u8) 7051 super::vals::Pl(val as u8)
7021 } 7052 }
7022 #[doc = "Channel Priority level"] 7053 #[doc = "Priority level"]
7023 pub fn set_pl(&mut self, val: super::vals::Pl) { 7054 pub fn set_pl(&mut self, val: super::vals::Pl) {
7024 self.0 = (self.0 & !(0x03 << 12usize)) | (((val.0 as u32) & 0x03) << 12usize); 7055 self.0 = (self.0 & !(0x03 << 16usize)) | (((val.0 as u32) & 0x03) << 16usize);
7025 }
7026 #[doc = "Memory to memory mode"]
7027 pub const fn mem2mem(&self) -> super::vals::Memmem {
7028 let val = (self.0 >> 14usize) & 0x01;
7029 super::vals::Memmem(val as u8)
7030 } 7056 }
7031 #[doc = "Memory to memory mode"] 7057 #[doc = "Double buffer mode"]
7032 pub fn set_mem2mem(&mut self, val: super::vals::Memmem) { 7058 pub const fn dbm(&self) -> super::vals::Dbm {
7033 self.0 = (self.0 & !(0x01 << 14usize)) | (((val.0 as u32) & 0x01) << 14usize); 7059 let val = (self.0 >> 18usize) & 0x01;
7060 super::vals::Dbm(val as u8)
7034 } 7061 }
7035 } 7062 #[doc = "Double buffer mode"]
7036 impl Default for Cr { 7063 pub fn set_dbm(&mut self, val: super::vals::Dbm) {
7037 fn default() -> Cr { 7064 self.0 = (self.0 & !(0x01 << 18usize)) | (((val.0 as u32) & 0x01) << 18usize);
7038 Cr(0)
7039 } 7065 }
7040 } 7066 #[doc = "Current target (only in double buffer mode)"]
7041 #[doc = "DMA interrupt flag clear register (DMA_IFCR)"] 7067 pub const fn ct(&self) -> super::vals::Ct {
7042 #[repr(transparent)] 7068 let val = (self.0 >> 19usize) & 0x01;
7043 #[derive(Copy, Clone, Eq, PartialEq)] 7069 super::vals::Ct(val as u8)
7044 pub struct Ifcr(pub u32);
7045 impl Ifcr {
7046 #[doc = "Channel 1 Global interrupt clear"]
7047 pub fn cgif(&self, n: usize) -> bool {
7048 assert!(n < 7usize);
7049 let offs = 0usize + n * 4usize;
7050 let val = (self.0 >> offs) & 0x01;
7051 val != 0
7052 } 7070 }
7053 #[doc = "Channel 1 Global interrupt clear"] 7071 #[doc = "Current target (only in double buffer mode)"]
7054 pub fn set_cgif(&mut self, n: usize, val: bool) { 7072 pub fn set_ct(&mut self, val: super::vals::Ct) {
7055 assert!(n < 7usize); 7073 self.0 = (self.0 & !(0x01 << 19usize)) | (((val.0 as u32) & 0x01) << 19usize);
7056 let offs = 0usize + n * 4usize;
7057 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
7058 } 7074 }
7059 #[doc = "Channel 1 Transfer Complete clear"] 7075 #[doc = "Peripheral burst transfer configuration"]
7060 pub fn ctcif(&self, n: usize) -> bool { 7076 pub const fn pburst(&self) -> super::vals::Burst {
7061 assert!(n < 7usize); 7077 let val = (self.0 >> 21usize) & 0x03;
7062 let offs = 1usize + n * 4usize; 7078 super::vals::Burst(val as u8)
7063 let val = (self.0 >> offs) & 0x01;
7064 val != 0
7065 } 7079 }
7066 #[doc = "Channel 1 Transfer Complete clear"] 7080 #[doc = "Peripheral burst transfer configuration"]
7067 pub fn set_ctcif(&mut self, n: usize, val: bool) { 7081 pub fn set_pburst(&mut self, val: super::vals::Burst) {
7068 assert!(n < 7usize); 7082 self.0 = (self.0 & !(0x03 << 21usize)) | (((val.0 as u32) & 0x03) << 21usize);
7069 let offs = 1usize + n * 4usize;
7070 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
7071 } 7083 }
7072 #[doc = "Channel 1 Half Transfer clear"] 7084 #[doc = "Memory burst transfer configuration"]
7073 pub fn chtif(&self, n: usize) -> bool { 7085 pub const fn mburst(&self) -> super::vals::Burst {
7074 assert!(n < 7usize); 7086 let val = (self.0 >> 23usize) & 0x03;
7075 let offs = 2usize + n * 4usize; 7087 super::vals::Burst(val as u8)
7076 let val = (self.0 >> offs) & 0x01;
7077 val != 0
7078 } 7088 }
7079 #[doc = "Channel 1 Half Transfer clear"] 7089 #[doc = "Memory burst transfer configuration"]
7080 pub fn set_chtif(&mut self, n: usize, val: bool) { 7090 pub fn set_mburst(&mut self, val: super::vals::Burst) {
7081 assert!(n < 7usize); 7091 self.0 = (self.0 & !(0x03 << 23usize)) | (((val.0 as u32) & 0x03) << 23usize);
7082 let offs = 2usize + n * 4usize;
7083 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
7084 } 7092 }
7085 #[doc = "Channel 1 Transfer Error clear"] 7093 #[doc = "Channel selection"]
7086 pub fn cteif(&self, n: usize) -> bool { 7094 pub const fn chsel(&self) -> u8 {
7087 assert!(n < 7usize); 7095 let val = (self.0 >> 25usize) & 0x0f;
7088 let offs = 3usize + n * 4usize; 7096 val as u8
7089 let val = (self.0 >> offs) & 0x01;
7090 val != 0
7091 } 7097 }
7092 #[doc = "Channel 1 Transfer Error clear"] 7098 #[doc = "Channel selection"]
7093 pub fn set_cteif(&mut self, n: usize, val: bool) { 7099 pub fn set_chsel(&mut self, val: u8) {
7094 assert!(n < 7usize); 7100 self.0 = (self.0 & !(0x0f << 25usize)) | (((val as u32) & 0x0f) << 25usize);
7095 let offs = 3usize + n * 4usize;
7096 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
7097 } 7101 }
7098 } 7102 }
7099 impl Default for Ifcr { 7103 impl Default for Cr {
7100 fn default() -> Ifcr { 7104 fn default() -> Cr {
7101 Ifcr(0) 7105 Cr(0)
7102 } 7106 }
7103 } 7107 }
7104 } 7108 }
7105} 7109}
7106pub mod exti_v1 { 7110pub mod timer_v1 {
7107 use crate::generic::*; 7111 use crate::generic::*;
7108 #[doc = "External interrupt/event controller"] 7112 #[doc = "General purpose 32-bit timer"]
7109 #[derive(Copy, Clone)] 7113 #[derive(Copy, Clone)]
7110 pub struct Exti(pub *mut u8); 7114 pub struct TimGp32(pub *mut u8);
7111 unsafe impl Send for Exti {} 7115 unsafe impl Send for TimGp32 {}
7112 unsafe impl Sync for Exti {} 7116 unsafe impl Sync for TimGp32 {}
7113 impl Exti { 7117 impl TimGp32 {
7114 #[doc = "Interrupt mask register (EXTI_IMR)"] 7118 #[doc = "control register 1"]
7115 pub fn imr(self) -> Reg<regs::Imr, RW> { 7119 pub fn cr1(self) -> Reg<regs::Cr1Gp, RW> {
7116 unsafe { Reg::from_ptr(self.0.add(0usize)) } 7120 unsafe { Reg::from_ptr(self.0.add(0usize)) }
7117 } 7121 }
7118 #[doc = "Event mask register (EXTI_EMR)"] 7122 #[doc = "control register 2"]
7119 pub fn emr(self) -> Reg<regs::Emr, RW> { 7123 pub fn cr2(self) -> Reg<regs::Cr2Gp, RW> {
7120 unsafe { Reg::from_ptr(self.0.add(4usize)) } 7124 unsafe { Reg::from_ptr(self.0.add(4usize)) }
7121 } 7125 }
7122 #[doc = "Rising Trigger selection register (EXTI_RTSR)"] 7126 #[doc = "slave mode control register"]
7123 pub fn rtsr(self) -> Reg<regs::Rtsr, RW> { 7127 pub fn smcr(self) -> Reg<regs::Smcr, RW> {
7124 unsafe { Reg::from_ptr(self.0.add(8usize)) } 7128 unsafe { Reg::from_ptr(self.0.add(8usize)) }
7125 } 7129 }
7126 #[doc = "Falling Trigger selection register (EXTI_FTSR)"] 7130 #[doc = "DMA/Interrupt enable register"]
7127 pub fn ftsr(self) -> Reg<regs::Ftsr, RW> { 7131 pub fn dier(self) -> Reg<regs::DierGp, RW> {
7128 unsafe { Reg::from_ptr(self.0.add(12usize)) } 7132 unsafe { Reg::from_ptr(self.0.add(12usize)) }
7129 } 7133 }
7130 #[doc = "Software interrupt event register (EXTI_SWIER)"] 7134 #[doc = "status register"]
7131 pub fn swier(self) -> Reg<regs::Swier, RW> { 7135 pub fn sr(self) -> Reg<regs::SrGp, RW> {
7132 unsafe { Reg::from_ptr(self.0.add(16usize)) } 7136 unsafe { Reg::from_ptr(self.0.add(16usize)) }
7133 } 7137 }
7134 #[doc = "Pending register (EXTI_PR)"] 7138 #[doc = "event generation register"]
7135 pub fn pr(self) -> Reg<regs::Pr, RW> { 7139 pub fn egr(self) -> Reg<regs::EgrGp, W> {
7136 unsafe { Reg::from_ptr(self.0.add(20usize)) } 7140 unsafe { Reg::from_ptr(self.0.add(20usize)) }
7137 } 7141 }
7138 } 7142 #[doc = "capture/compare mode register 1 (input mode)"]
7139 pub mod regs { 7143 pub fn ccmr_input(self, n: usize) -> Reg<regs::CcmrInput, RW> {
7140 use crate::generic::*; 7144 assert!(n < 2usize);
7141 #[doc = "Rising Trigger selection register (EXTI_RTSR)"] 7145 unsafe { Reg::from_ptr(self.0.add(24usize + n * 4usize)) }
7142 #[repr(transparent)]
7143 #[derive(Copy, Clone, Eq, PartialEq)]
7144 pub struct Rtsr(pub u32);
7145 impl Rtsr {
7146 #[doc = "Rising trigger event configuration of line 0"]
7147 pub fn tr(&self, n: usize) -> super::vals::Tr {
7148 assert!(n < 23usize);
7149 let offs = 0usize + n * 1usize;
7150 let val = (self.0 >> offs) & 0x01;
7151 super::vals::Tr(val as u8)
7152 }
7153 #[doc = "Rising trigger event configuration of line 0"]
7154 pub fn set_tr(&mut self, n: usize, val: super::vals::Tr) {
7155 assert!(n < 23usize);
7156 let offs = 0usize + n * 1usize;
7157 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs);
7158 }
7159 }
7160 impl Default for Rtsr {
7161 fn default() -> Rtsr {
7162 Rtsr(0)
7163 }
7164 }
7165 #[doc = "Pending register (EXTI_PR)"]
7166 #[repr(transparent)]
7167 #[derive(Copy, Clone, Eq, PartialEq)]
7168 pub struct Pr(pub u32);
7169 impl Pr {
7170 #[doc = "Pending bit 0"]
7171 pub fn pr(&self, n: usize) -> bool {
7172 assert!(n < 23usize);
7173 let offs = 0usize + n * 1usize;
7174 let val = (self.0 >> offs) & 0x01;
7175 val != 0
7176 }
7177 #[doc = "Pending bit 0"]
7178 pub fn set_pr(&mut self, n: usize, val: bool) {
7179 assert!(n < 23usize);
7180 let offs = 0usize + n * 1usize;
7181 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
7182 }
7183 }
7184 impl Default for Pr {
7185 fn default() -> Pr {
7186 Pr(0)
7187 }
7188 }
7189 #[doc = "Software interrupt event register (EXTI_SWIER)"]
7190 #[repr(transparent)]
7191 #[derive(Copy, Clone, Eq, PartialEq)]
7192 pub struct Swier(pub u32);
7193 impl Swier {
7194 #[doc = "Software Interrupt on line 0"]
7195 pub fn swier(&self, n: usize) -> bool {
7196 assert!(n < 23usize);
7197 let offs = 0usize + n * 1usize;
7198 let val = (self.0 >> offs) & 0x01;
7199 val != 0
7200 }
7201 #[doc = "Software Interrupt on line 0"]
7202 pub fn set_swier(&mut self, n: usize, val: bool) {
7203 assert!(n < 23usize);
7204 let offs = 0usize + n * 1usize;
7205 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
7206 }
7207 }
7208 impl Default for Swier {
7209 fn default() -> Swier {
7210 Swier(0)
7211 }
7212 }
7213 #[doc = "Falling Trigger selection register (EXTI_FTSR)"]
7214 #[repr(transparent)]
7215 #[derive(Copy, Clone, Eq, PartialEq)]
7216 pub struct Ftsr(pub u32);
7217 impl Ftsr {
7218 #[doc = "Falling trigger event configuration of line 0"]
7219 pub fn tr(&self, n: usize) -> super::vals::Tr {
7220 assert!(n < 23usize);
7221 let offs = 0usize + n * 1usize;
7222 let val = (self.0 >> offs) & 0x01;
7223 super::vals::Tr(val as u8)
7224 }
7225 #[doc = "Falling trigger event configuration of line 0"]
7226 pub fn set_tr(&mut self, n: usize, val: super::vals::Tr) {
7227 assert!(n < 23usize);
7228 let offs = 0usize + n * 1usize;
7229 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs);
7230 }
7231 }
7232 impl Default for Ftsr {
7233 fn default() -> Ftsr {
7234 Ftsr(0)
7235 }
7236 }
7237 #[doc = "Interrupt mask register (EXTI_IMR)"]
7238 #[repr(transparent)]
7239 #[derive(Copy, Clone, Eq, PartialEq)]
7240 pub struct Imr(pub u32);
7241 impl Imr {
7242 #[doc = "Interrupt Mask on line 0"]
7243 pub fn mr(&self, n: usize) -> super::vals::Mr {
7244 assert!(n < 23usize);
7245 let offs = 0usize + n * 1usize;
7246 let val = (self.0 >> offs) & 0x01;
7247 super::vals::Mr(val as u8)
7248 }
7249 #[doc = "Interrupt Mask on line 0"]
7250 pub fn set_mr(&mut self, n: usize, val: super::vals::Mr) {
7251 assert!(n < 23usize);
7252 let offs = 0usize + n * 1usize;
7253 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs);
7254 }
7255 } 7146 }
7256 impl Default for Imr { 7147 #[doc = "capture/compare mode register 1 (output mode)"]
7257 fn default() -> Imr { 7148 pub fn ccmr_output(self, n: usize) -> Reg<regs::CcmrOutput, RW> {
7258 Imr(0) 7149 assert!(n < 2usize);
7259 } 7150 unsafe { Reg::from_ptr(self.0.add(24usize + n * 4usize)) }
7260 } 7151 }
7261 #[doc = "Event mask register (EXTI_EMR)"] 7152 #[doc = "capture/compare enable register"]
7262 #[repr(transparent)] 7153 pub fn ccer(self) -> Reg<regs::CcerGp, RW> {
7263 #[derive(Copy, Clone, Eq, PartialEq)] 7154 unsafe { Reg::from_ptr(self.0.add(32usize)) }
7264 pub struct Emr(pub u32);
7265 impl Emr {
7266 #[doc = "Event Mask on line 0"]
7267 pub fn mr(&self, n: usize) -> super::vals::Mr {
7268 assert!(n < 23usize);
7269 let offs = 0usize + n * 1usize;
7270 let val = (self.0 >> offs) & 0x01;
7271 super::vals::Mr(val as u8)
7272 }
7273 #[doc = "Event Mask on line 0"]
7274 pub fn set_mr(&mut self, n: usize, val: super::vals::Mr) {
7275 assert!(n < 23usize);
7276 let offs = 0usize + n * 1usize;
7277 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs);
7278 }
7279 } 7155 }
7280 impl Default for Emr { 7156 #[doc = "counter"]
7281 fn default() -> Emr { 7157 pub fn cnt(self) -> Reg<regs::Cnt32, RW> {
7282 Emr(0) 7158 unsafe { Reg::from_ptr(self.0.add(36usize)) }
7283 }
7284 } 7159 }
7285 } 7160 #[doc = "prescaler"]
7286 pub mod vals { 7161 pub fn psc(self) -> Reg<regs::Psc, RW> {
7287 use crate::generic::*; 7162 unsafe { Reg::from_ptr(self.0.add(40usize)) }
7288 #[repr(transparent)]
7289 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
7290 pub struct Prw(pub u8);
7291 impl Prw {
7292 #[doc = "Clears pending bit"]
7293 pub const CLEAR: Self = Self(0x01);
7294 } 7163 }
7295 #[repr(transparent)] 7164 #[doc = "auto-reload register"]
7296 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 7165 pub fn arr(self) -> Reg<regs::Arr32, RW> {
7297 pub struct Prr(pub u8); 7166 unsafe { Reg::from_ptr(self.0.add(44usize)) }
7298 impl Prr {
7299 #[doc = "No trigger request occurred"]
7300 pub const NOTPENDING: Self = Self(0);
7301 #[doc = "Selected trigger request occurred"]
7302 pub const PENDING: Self = Self(0x01);
7303 } 7167 }
7304 #[repr(transparent)] 7168 #[doc = "capture/compare register"]
7305 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 7169 pub fn ccr(self, n: usize) -> Reg<regs::Ccr32, RW> {
7306 pub struct Tr(pub u8); 7170 assert!(n < 4usize);
7307 impl Tr { 7171 unsafe { Reg::from_ptr(self.0.add(52usize + n * 4usize)) }
7308 #[doc = "Falling edge trigger is disabled"]
7309 pub const DISABLED: Self = Self(0);
7310 #[doc = "Falling edge trigger is enabled"]
7311 pub const ENABLED: Self = Self(0x01);
7312 } 7172 }
7313 #[repr(transparent)] 7173 #[doc = "DMA control register"]
7314 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 7174 pub fn dcr(self) -> Reg<regs::Dcr, RW> {
7315 pub struct Swierw(pub u8); 7175 unsafe { Reg::from_ptr(self.0.add(72usize)) }
7316 impl Swierw {
7317 #[doc = "Generates an interrupt request"]
7318 pub const PEND: Self = Self(0x01);
7319 } 7176 }
7320 #[repr(transparent)] 7177 #[doc = "DMA address for full transfer"]
7321 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 7178 pub fn dmar(self) -> Reg<regs::Dmar, RW> {
7322 pub struct Mr(pub u8); 7179 unsafe { Reg::from_ptr(self.0.add(76usize)) }
7323 impl Mr {
7324 #[doc = "Interrupt request line is masked"]
7325 pub const MASKED: Self = Self(0);
7326 #[doc = "Interrupt request line is unmasked"]
7327 pub const UNMASKED: Self = Self(0x01);
7328 } 7180 }
7329 } 7181 }
7330} 7182 #[doc = "Advanced-timers"]
7331pub mod usart_v1 {
7332 use crate::generic::*;
7333 #[doc = "Universal synchronous asynchronous receiver transmitter"]
7334 #[derive(Copy, Clone)] 7183 #[derive(Copy, Clone)]
7335 pub struct Usart(pub *mut u8); 7184 pub struct TimAdv(pub *mut u8);
7336 unsafe impl Send for Usart {} 7185 unsafe impl Send for TimAdv {}
7337 unsafe impl Sync for Usart {} 7186 unsafe impl Sync for TimAdv {}
7338 impl Usart { 7187 impl TimAdv {
7339 #[doc = "Status register"] 7188 #[doc = "control register 1"]
7340 pub fn sr(self) -> Reg<regs::Sr, RW> { 7189 pub fn cr1(self) -> Reg<regs::Cr1Gp, RW> {
7341 unsafe { Reg::from_ptr(self.0.add(0usize)) } 7190 unsafe { Reg::from_ptr(self.0.add(0usize)) }
7342 } 7191 }
7343 #[doc = "Data register"] 7192 #[doc = "control register 2"]
7344 pub fn dr(self) -> Reg<regs::Dr, RW> { 7193 pub fn cr2(self) -> Reg<regs::Cr2Adv, RW> {
7345 unsafe { Reg::from_ptr(self.0.add(4usize)) } 7194 unsafe { Reg::from_ptr(self.0.add(4usize)) }
7346 } 7195 }
7347 #[doc = "Baud rate register"] 7196 #[doc = "slave mode control register"]
7348 pub fn brr(self) -> Reg<regs::Brr, RW> { 7197 pub fn smcr(self) -> Reg<regs::Smcr, RW> {
7349 unsafe { Reg::from_ptr(self.0.add(8usize)) } 7198 unsafe { Reg::from_ptr(self.0.add(8usize)) }
7350 } 7199 }
7351 #[doc = "Control register 1"] 7200 #[doc = "DMA/Interrupt enable register"]
7352 pub fn cr1(self) -> Reg<regs::Cr1, RW> { 7201 pub fn dier(self) -> Reg<regs::DierAdv, RW> {
7353 unsafe { Reg::from_ptr(self.0.add(12usize)) } 7202 unsafe { Reg::from_ptr(self.0.add(12usize)) }
7354 } 7203 }
7355 #[doc = "Control register 2"] 7204 #[doc = "status register"]
7356 pub fn cr2(self) -> Reg<regs::Cr2Usart, RW> { 7205 pub fn sr(self) -> Reg<regs::SrAdv, RW> {
7357 unsafe { Reg::from_ptr(self.0.add(16usize)) } 7206 unsafe { Reg::from_ptr(self.0.add(16usize)) }
7358 } 7207 }
7359 #[doc = "Control register 3"] 7208 #[doc = "event generation register"]
7360 pub fn cr3(self) -> Reg<regs::Cr3Usart, RW> { 7209 pub fn egr(self) -> Reg<regs::EgrAdv, W> {
7361 unsafe { Reg::from_ptr(self.0.add(20usize)) } 7210 unsafe { Reg::from_ptr(self.0.add(20usize)) }
7362 } 7211 }
7363 #[doc = "Guard time and prescaler register"] 7212 #[doc = "capture/compare mode register 1 (input mode)"]
7364 pub fn gtpr(self) -> Reg<regs::Gtpr, RW> { 7213 pub fn ccmr_input(self, n: usize) -> Reg<regs::CcmrInput, RW> {
7365 unsafe { Reg::from_ptr(self.0.add(24usize)) } 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 }
7238 #[doc = "repetition counter register"]
7239 pub fn rcr(self) -> Reg<regs::Rcr, RW> {
7240 unsafe { Reg::from_ptr(self.0.add(48usize)) }
7241 }
7242 #[doc = "capture/compare register"]
7243 pub fn ccr(self, n: usize) -> Reg<regs::Ccr16, RW> {
7244 assert!(n < 4usize);
7245 unsafe { Reg::from_ptr(self.0.add(52usize + n * 4usize)) }
7246 }
7247 #[doc = "break and dead-time register"]
7248 pub fn bdtr(self) -> Reg<regs::Bdtr, RW> {
7249 unsafe { Reg::from_ptr(self.0.add(68usize)) }
7250 }
7251 #[doc = "DMA control register"]
7252 pub fn dcr(self) -> Reg<regs::Dcr, RW> {
7253 unsafe { Reg::from_ptr(self.0.add(72usize)) }
7254 }
7255 #[doc = "DMA address for full transfer"]
7256 pub fn dmar(self) -> Reg<regs::Dmar, RW> {
7257 unsafe { Reg::from_ptr(self.0.add(76usize)) }
7366 } 7258 }
7367 } 7259 }
7368 #[doc = "Universal asynchronous receiver transmitter"] 7260 #[doc = "General purpose 16-bit timer"]
7369 #[derive(Copy, Clone)] 7261 #[derive(Copy, Clone)]
7370 pub struct Uart(pub *mut u8); 7262 pub struct TimGp16(pub *mut u8);
7371 unsafe impl Send for Uart {} 7263 unsafe impl Send for TimGp16 {}
7372 unsafe impl Sync for Uart {} 7264 unsafe impl Sync for TimGp16 {}
7373 impl Uart { 7265 impl TimGp16 {
7374 #[doc = "Status register"] 7266 #[doc = "control register 1"]
7375 pub fn sr(self) -> Reg<regs::Sr, RW> { 7267 pub fn cr1(self) -> Reg<regs::Cr1Gp, RW> {
7376 unsafe { Reg::from_ptr(self.0.add(0usize)) } 7268 unsafe { Reg::from_ptr(self.0.add(0usize)) }
7377 } 7269 }
7378 #[doc = "Data register"] 7270 #[doc = "control register 2"]
7379 pub fn dr(self) -> Reg<regs::Dr, RW> { 7271 pub fn cr2(self) -> Reg<regs::Cr2Gp, RW> {
7380 unsafe { Reg::from_ptr(self.0.add(4usize)) } 7272 unsafe { Reg::from_ptr(self.0.add(4usize)) }
7381 } 7273 }
7382 #[doc = "Baud rate register"] 7274 #[doc = "slave mode control register"]
7383 pub fn brr(self) -> Reg<regs::Brr, RW> { 7275 pub fn smcr(self) -> Reg<regs::Smcr, RW> {
7384 unsafe { Reg::from_ptr(self.0.add(8usize)) } 7276 unsafe { Reg::from_ptr(self.0.add(8usize)) }
7385 } 7277 }
7386 #[doc = "Control register 1"] 7278 #[doc = "DMA/Interrupt enable register"]
7387 pub fn cr1(self) -> Reg<regs::Cr1, RW> { 7279 pub fn dier(self) -> Reg<regs::DierGp, RW> {
7388 unsafe { Reg::from_ptr(self.0.add(12usize)) } 7280 unsafe { Reg::from_ptr(self.0.add(12usize)) }
7389 } 7281 }
7390 #[doc = "Control register 2"] 7282 #[doc = "status register"]
7391 pub fn cr2(self) -> Reg<regs::Cr2, RW> { 7283 pub fn sr(self) -> Reg<regs::SrGp, RW> {
7392 unsafe { Reg::from_ptr(self.0.add(16usize)) } 7284 unsafe { Reg::from_ptr(self.0.add(16usize)) }
7393 } 7285 }
7394 #[doc = "Control register 3"] 7286 #[doc = "event generation register"]
7395 pub fn cr3(self) -> Reg<regs::Cr3, RW> { 7287 pub fn egr(self) -> Reg<regs::EgrGp, W> {
7396 unsafe { Reg::from_ptr(self.0.add(20usize)) } 7288 unsafe { Reg::from_ptr(self.0.add(20usize)) }
7397 } 7289 }
7398 } 7290 #[doc = "capture/compare mode register 1 (input mode)"]
7399 pub mod vals { 7291 pub fn ccmr_input(self, n: usize) -> Reg<regs::CcmrInput, RW> {
7400 use crate::generic::*; 7292 assert!(n < 2usize);
7401 #[repr(transparent)] 7293 unsafe { Reg::from_ptr(self.0.add(24usize + n * 4usize)) }
7402 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
7403 pub struct Cpha(pub u8);
7404 impl Cpha {
7405 #[doc = "The first clock transition is the first data capture edge"]
7406 pub const FIRST: Self = Self(0);
7407 #[doc = "The second clock transition is the first data capture edge"]
7408 pub const SECOND: Self = Self(0x01);
7409 } 7294 }
7410 #[repr(transparent)] 7295 #[doc = "capture/compare mode register 1 (output mode)"]
7411 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 7296 pub fn ccmr_output(self, n: usize) -> Reg<regs::CcmrOutput, RW> {
7412 pub struct Wake(pub u8); 7297 assert!(n < 2usize);
7413 impl Wake { 7298 unsafe { Reg::from_ptr(self.0.add(24usize + n * 4usize)) }
7414 #[doc = "USART wakeup on idle line"]
7415 pub const IDLELINE: Self = Self(0);
7416 #[doc = "USART wakeup on address mark"]
7417 pub const ADDRESSMARK: Self = Self(0x01);
7418 } 7299 }
7419 #[repr(transparent)] 7300 #[doc = "capture/compare enable register"]
7420 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 7301 pub fn ccer(self) -> Reg<regs::CcerGp, RW> {
7421 pub struct Sbk(pub u8); 7302 unsafe { Reg::from_ptr(self.0.add(32usize)) }
7422 impl Sbk {
7423 #[doc = "No break character is transmitted"]
7424 pub const NOBREAK: Self = Self(0);
7425 #[doc = "Break character transmitted"]
7426 pub const BREAK: Self = Self(0x01);
7427 } 7303 }
7428 #[repr(transparent)] 7304 #[doc = "counter"]
7429 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 7305 pub fn cnt(self) -> Reg<regs::Cnt16, RW> {
7430 pub struct Irlp(pub u8); 7306 unsafe { Reg::from_ptr(self.0.add(36usize)) }
7431 impl Irlp {
7432 #[doc = "Normal mode"]
7433 pub const NORMAL: Self = Self(0);
7434 #[doc = "Low-power mode"]
7435 pub const LOWPOWER: Self = Self(0x01);
7436 } 7307 }
7437 #[repr(transparent)] 7308 #[doc = "prescaler"]
7438 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 7309 pub fn psc(self) -> Reg<regs::Psc, RW> {
7439 pub struct M(pub u8); 7310 unsafe { Reg::from_ptr(self.0.add(40usize)) }
7440 impl M {
7441 #[doc = "8 data bits"]
7442 pub const M8: Self = Self(0);
7443 #[doc = "9 data bits"]
7444 pub const M9: Self = Self(0x01);
7445 } 7311 }
7446 #[repr(transparent)] 7312 #[doc = "auto-reload register"]
7447 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 7313 pub fn arr(self) -> Reg<regs::Arr16, RW> {
7448 pub struct Hdsel(pub u8); 7314 unsafe { Reg::from_ptr(self.0.add(44usize)) }
7449 impl Hdsel {
7450 #[doc = "Half duplex mode is not selected"]
7451 pub const FULLDUPLEX: Self = Self(0);
7452 #[doc = "Half duplex mode is selected"]
7453 pub const HALFDUPLEX: Self = Self(0x01);
7454 } 7315 }
7455 #[repr(transparent)] 7316 #[doc = "capture/compare register"]
7456 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 7317 pub fn ccr(self, n: usize) -> Reg<regs::Ccr16, RW> {
7457 pub struct Lbdl(pub u8); 7318 assert!(n < 4usize);
7458 impl Lbdl { 7319 unsafe { Reg::from_ptr(self.0.add(52usize + n * 4usize)) }
7459 #[doc = "10-bit break detection"]
7460 pub const LBDL10: Self = Self(0);
7461 #[doc = "11-bit break detection"]
7462 pub const LBDL11: Self = Self(0x01);
7463 } 7320 }
7464 #[repr(transparent)] 7321 #[doc = "DMA control register"]
7465 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 7322 pub fn dcr(self) -> Reg<regs::Dcr, RW> {
7466 pub struct Rwu(pub u8); 7323 unsafe { Reg::from_ptr(self.0.add(72usize)) }
7467 impl Rwu {
7468 #[doc = "Receiver in active mode"]
7469 pub const ACTIVE: Self = Self(0);
7470 #[doc = "Receiver in mute mode"]
7471 pub const MUTE: Self = Self(0x01);
7472 } 7324 }
7473 #[repr(transparent)] 7325 #[doc = "DMA address for full transfer"]
7474 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 7326 pub fn dmar(self) -> Reg<regs::Dmar, RW> {
7475 pub struct Cpol(pub u8); 7327 unsafe { Reg::from_ptr(self.0.add(76usize)) }
7476 impl Cpol {
7477 #[doc = "Steady low value on CK pin outside transmission window"]
7478 pub const LOW: Self = Self(0);
7479 #[doc = "Steady high value on CK pin outside transmission window"]
7480 pub const HIGH: Self = Self(0x01);
7481 } 7328 }
7482 #[repr(transparent)] 7329 }
7483 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 7330 #[doc = "Basic timer"]
7484 pub struct Ps(pub u8); 7331 #[derive(Copy, Clone)]
7485 impl Ps { 7332 pub struct TimBasic(pub *mut u8);
7486 #[doc = "Even parity"] 7333 unsafe impl Send for TimBasic {}
7487 pub const EVEN: Self = Self(0); 7334 unsafe impl Sync for TimBasic {}
7488 #[doc = "Odd parity"] 7335 impl TimBasic {
7489 pub const ODD: Self = Self(0x01); 7336 #[doc = "control register 1"]
7337 pub fn cr1(self) -> Reg<regs::Cr1Basic, RW> {
7338 unsafe { Reg::from_ptr(self.0.add(0usize)) }
7490 } 7339 }
7491 #[repr(transparent)] 7340 #[doc = "control register 2"]
7492 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 7341 pub fn cr2(self) -> Reg<regs::Cr2Basic, RW> {
7493 pub struct Stop(pub u8); 7342 unsafe { Reg::from_ptr(self.0.add(4usize)) }
7494 impl Stop { 7343 }
7495 #[doc = "1 stop bit"] 7344 #[doc = "DMA/Interrupt enable register"]
7496 pub const STOP1: Self = Self(0); 7345 pub fn dier(self) -> Reg<regs::DierBasic, RW> {
7497 #[doc = "0.5 stop bits"] 7346 unsafe { Reg::from_ptr(self.0.add(12usize)) }
7498 pub const STOP0P5: Self = Self(0x01); 7347 }
7499 #[doc = "2 stop bits"] 7348 #[doc = "status register"]
7500 pub const STOP2: Self = Self(0x02); 7349 pub fn sr(self) -> Reg<regs::SrBasic, RW> {
7501 #[doc = "1.5 stop bits"] 7350 unsafe { Reg::from_ptr(self.0.add(16usize)) }
7502 pub const STOP1P5: Self = Self(0x03); 7351 }
7352 #[doc = "event generation register"]
7353 pub fn egr(self) -> Reg<regs::EgrBasic, W> {
7354 unsafe { Reg::from_ptr(self.0.add(20usize)) }
7355 }
7356 #[doc = "counter"]
7357 pub fn cnt(self) -> Reg<regs::Cnt16, RW> {
7358 unsafe { Reg::from_ptr(self.0.add(36usize)) }
7359 }
7360 #[doc = "prescaler"]
7361 pub fn psc(self) -> Reg<regs::Psc, RW> {
7362 unsafe { Reg::from_ptr(self.0.add(40usize)) }
7363 }
7364 #[doc = "auto-reload register"]
7365 pub fn arr(self) -> Reg<regs::Arr16, RW> {
7366 unsafe { Reg::from_ptr(self.0.add(44usize)) }
7503 } 7367 }
7504 } 7368 }
7505 pub mod regs { 7369 pub mod regs {
7506 use crate::generic::*; 7370 use crate::generic::*;
7507 #[doc = "Guard time and prescaler register"] 7371 #[doc = "capture/compare mode register 1 (input mode)"]
7508 #[repr(transparent)] 7372 #[repr(transparent)]
7509 #[derive(Copy, Clone, Eq, PartialEq)] 7373 #[derive(Copy, Clone, Eq, PartialEq)]
7510 pub struct Gtpr(pub u32); 7374 pub struct CcmrInput(pub u32);
7511 impl Gtpr { 7375 impl CcmrInput {
7512 #[doc = "Prescaler value"] 7376 #[doc = "Capture/Compare 1 selection"]
7513 pub const fn psc(&self) -> u8 { 7377 pub fn ccs(&self, n: usize) -> super::vals::CcmrInputCcs {
7514 let val = (self.0 >> 0usize) & 0xff; 7378 assert!(n < 2usize);
7515 val as u8 7379 let offs = 0usize + n * 8usize;
7380 let val = (self.0 >> offs) & 0x03;
7381 super::vals::CcmrInputCcs(val as u8)
7516 } 7382 }
7517 #[doc = "Prescaler value"] 7383 #[doc = "Capture/Compare 1 selection"]
7518 pub fn set_psc(&mut self, val: u8) { 7384 pub fn set_ccs(&mut self, n: usize, val: super::vals::CcmrInputCcs) {
7519 self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); 7385 assert!(n < 2usize);
7386 let offs = 0usize + n * 8usize;
7387 self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs);
7520 } 7388 }
7521 #[doc = "Guard time value"] 7389 #[doc = "Input capture 1 prescaler"]
7522 pub const fn gt(&self) -> u8 { 7390 pub fn icpsc(&self, n: usize) -> u8 {
7523 let val = (self.0 >> 8usize) & 0xff; 7391 assert!(n < 2usize);
7392 let offs = 2usize + n * 8usize;
7393 let val = (self.0 >> offs) & 0x03;
7524 val as u8 7394 val as u8
7525 } 7395 }
7526 #[doc = "Guard time value"] 7396 #[doc = "Input capture 1 prescaler"]
7527 pub fn set_gt(&mut self, val: u8) { 7397 pub fn set_icpsc(&mut self, n: usize, val: u8) {
7528 self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); 7398 assert!(n < 2usize);
7399 let offs = 2usize + n * 8usize;
7400 self.0 = (self.0 & !(0x03 << offs)) | (((val as u32) & 0x03) << offs);
7401 }
7402 #[doc = "Input capture 1 filter"]
7403 pub fn icf(&self, n: usize) -> super::vals::Icf {
7404 assert!(n < 2usize);
7405 let offs = 4usize + n * 8usize;
7406 let val = (self.0 >> offs) & 0x0f;
7407 super::vals::Icf(val as u8)
7408 }
7409 #[doc = "Input capture 1 filter"]
7410 pub fn set_icf(&mut self, n: usize, val: super::vals::Icf) {
7411 assert!(n < 2usize);
7412 let offs = 4usize + n * 8usize;
7413 self.0 = (self.0 & !(0x0f << offs)) | (((val.0 as u32) & 0x0f) << offs);
7529 } 7414 }
7530 } 7415 }
7531 impl Default for Gtpr { 7416 impl Default for CcmrInput {
7532 fn default() -> Gtpr { 7417 fn default() -> CcmrInput {
7533 Gtpr(0) 7418 CcmrInput(0)
7534 } 7419 }
7535 } 7420 }
7536 #[doc = "Control register 2"] 7421 #[doc = "capture/compare mode register 2 (output mode)"]
7537 #[repr(transparent)] 7422 #[repr(transparent)]
7538 #[derive(Copy, Clone, Eq, PartialEq)] 7423 #[derive(Copy, Clone, Eq, PartialEq)]
7539 pub struct Cr2(pub u32); 7424 pub struct CcmrOutput(pub u32);
7540 impl Cr2 { 7425 impl CcmrOutput {
7541 #[doc = "Address of the USART node"] 7426 #[doc = "Capture/Compare 3 selection"]
7542 pub const fn add(&self) -> u8 { 7427 pub fn ccs(&self, n: usize) -> super::vals::CcmrOutputCcs {
7543 let val = (self.0 >> 0usize) & 0x0f; 7428 assert!(n < 2usize);
7544 val as u8 7429 let offs = 0usize + n * 8usize;
7430 let val = (self.0 >> offs) & 0x03;
7431 super::vals::CcmrOutputCcs(val as u8)
7545 } 7432 }
7546 #[doc = "Address of the USART node"] 7433 #[doc = "Capture/Compare 3 selection"]
7547 pub fn set_add(&mut self, val: u8) { 7434 pub fn set_ccs(&mut self, n: usize, val: super::vals::CcmrOutputCcs) {
7548 self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); 7435 assert!(n < 2usize);
7436 let offs = 0usize + n * 8usize;
7437 self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs);
7549 } 7438 }
7550 #[doc = "lin break detection length"] 7439 #[doc = "Output compare 3 fast enable"]
7551 pub const fn lbdl(&self) -> super::vals::Lbdl { 7440 pub fn ocfe(&self, n: usize) -> bool {
7552 let val = (self.0 >> 5usize) & 0x01; 7441 assert!(n < 2usize);
7553 super::vals::Lbdl(val as u8) 7442 let offs = 2usize + n * 8usize;
7443 let val = (self.0 >> offs) & 0x01;
7444 val != 0
7554 } 7445 }
7555 #[doc = "lin break detection length"] 7446 #[doc = "Output compare 3 fast enable"]
7556 pub fn set_lbdl(&mut self, val: super::vals::Lbdl) { 7447 pub fn set_ocfe(&mut self, n: usize, val: bool) {
7557 self.0 = (self.0 & !(0x01 << 5usize)) | (((val.0 as u32) & 0x01) << 5usize); 7448 assert!(n < 2usize);
7449 let offs = 2usize + n * 8usize;
7450 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
7558 } 7451 }
7559 #[doc = "LIN break detection interrupt enable"] 7452 #[doc = "Output compare 3 preload enable"]
7560 pub const fn lbdie(&self) -> bool { 7453 pub fn ocpe(&self, n: usize) -> super::vals::Ocpe {
7561 let val = (self.0 >> 6usize) & 0x01; 7454 assert!(n < 2usize);
7562 val != 0 7455 let offs = 3usize + n * 8usize;
7456 let val = (self.0 >> offs) & 0x01;
7457 super::vals::Ocpe(val as u8)
7563 } 7458 }
7564 #[doc = "LIN break detection interrupt enable"] 7459 #[doc = "Output compare 3 preload enable"]
7565 pub fn set_lbdie(&mut self, val: bool) { 7460 pub fn set_ocpe(&mut self, n: usize, val: super::vals::Ocpe) {
7566 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); 7461 assert!(n < 2usize);
7462 let offs = 3usize + n * 8usize;
7463 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs);
7567 } 7464 }
7568 #[doc = "STOP bits"] 7465 #[doc = "Output compare 3 mode"]
7569 pub const fn stop(&self) -> super::vals::Stop { 7466 pub fn ocm(&self, n: usize) -> super::vals::Ocm {
7570 let val = (self.0 >> 12usize) & 0x03; 7467 assert!(n < 2usize);
7571 super::vals::Stop(val as u8) 7468 let offs = 4usize + n * 8usize;
7469 let val = (self.0 >> offs) & 0x07;
7470 super::vals::Ocm(val as u8)
7572 } 7471 }
7573 #[doc = "STOP bits"] 7472 #[doc = "Output compare 3 mode"]
7574 pub fn set_stop(&mut self, val: super::vals::Stop) { 7473 pub fn set_ocm(&mut self, n: usize, val: super::vals::Ocm) {
7575 self.0 = (self.0 & !(0x03 << 12usize)) | (((val.0 as u32) & 0x03) << 12usize); 7474 assert!(n < 2usize);
7475 let offs = 4usize + n * 8usize;
7476 self.0 = (self.0 & !(0x07 << offs)) | (((val.0 as u32) & 0x07) << offs);
7576 } 7477 }
7577 #[doc = "LIN mode enable"] 7478 #[doc = "Output compare 3 clear enable"]
7578 pub const fn linen(&self) -> bool { 7479 pub fn occe(&self, n: usize) -> bool {
7579 let val = (self.0 >> 14usize) & 0x01; 7480 assert!(n < 2usize);
7481 let offs = 7usize + n * 8usize;
7482 let val = (self.0 >> offs) & 0x01;
7580 val != 0 7483 val != 0
7581 } 7484 }
7582 #[doc = "LIN mode enable"] 7485 #[doc = "Output compare 3 clear enable"]
7583 pub fn set_linen(&mut self, val: bool) { 7486 pub fn set_occe(&mut self, n: usize, val: bool) {
7584 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); 7487 assert!(n < 2usize);
7488 let offs = 7usize + n * 8usize;
7489 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
7585 } 7490 }
7586 } 7491 }
7587 impl Default for Cr2 { 7492 impl Default for CcmrOutput {
7588 fn default() -> Cr2 { 7493 fn default() -> CcmrOutput {
7589 Cr2(0) 7494 CcmrOutput(0)
7590 } 7495 }
7591 } 7496 }
7592 #[doc = "Control register 2"] 7497 #[doc = "event generation register"]
7593 #[repr(transparent)] 7498 #[repr(transparent)]
7594 #[derive(Copy, Clone, Eq, PartialEq)] 7499 #[derive(Copy, Clone, Eq, PartialEq)]
7595 pub struct Cr2Usart(pub u32); 7500 pub struct EgrGp(pub u32);
7596 impl Cr2Usart { 7501 impl EgrGp {
7597 #[doc = "Address of the USART node"] 7502 #[doc = "Update generation"]
7598 pub const fn add(&self) -> u8 { 7503 pub const fn ug(&self) -> bool {
7599 let val = (self.0 >> 0usize) & 0x0f; 7504 let val = (self.0 >> 0usize) & 0x01;
7600 val as u8
7601 }
7602 #[doc = "Address of the USART node"]
7603 pub fn set_add(&mut self, val: u8) {
7604 self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize);
7605 }
7606 #[doc = "lin break detection length"]
7607 pub const fn lbdl(&self) -> super::vals::Lbdl {
7608 let val = (self.0 >> 5usize) & 0x01;
7609 super::vals::Lbdl(val as u8)
7610 }
7611 #[doc = "lin break detection length"]
7612 pub fn set_lbdl(&mut self, val: super::vals::Lbdl) {
7613 self.0 = (self.0 & !(0x01 << 5usize)) | (((val.0 as u32) & 0x01) << 5usize);
7614 }
7615 #[doc = "LIN break detection interrupt enable"]
7616 pub const fn lbdie(&self) -> bool {
7617 let val = (self.0 >> 6usize) & 0x01;
7618 val != 0 7505 val != 0
7619 } 7506 }
7620 #[doc = "LIN break detection interrupt enable"] 7507 #[doc = "Update generation"]
7621 pub fn set_lbdie(&mut self, val: bool) { 7508 pub fn set_ug(&mut self, val: bool) {
7622 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); 7509 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
7623 } 7510 }
7624 #[doc = "Last bit clock pulse"] 7511 #[doc = "Capture/compare 1 generation"]
7625 pub const fn lbcl(&self) -> bool { 7512 pub fn ccg(&self, n: usize) -> bool {
7626 let val = (self.0 >> 8usize) & 0x01; 7513 assert!(n < 4usize);
7514 let offs = 1usize + n * 1usize;
7515 let val = (self.0 >> offs) & 0x01;
7627 val != 0 7516 val != 0
7628 } 7517 }
7629 #[doc = "Last bit clock pulse"] 7518 #[doc = "Capture/compare 1 generation"]
7630 pub fn set_lbcl(&mut self, val: bool) { 7519 pub fn set_ccg(&mut self, n: usize, val: bool) {
7631 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); 7520 assert!(n < 4usize);
7521 let offs = 1usize + n * 1usize;
7522 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
7632 } 7523 }
7633 #[doc = "Clock phase"] 7524 #[doc = "Capture/Compare control update generation"]
7634 pub const fn cpha(&self) -> super::vals::Cpha { 7525 pub const fn comg(&self) -> bool {
7635 let val = (self.0 >> 9usize) & 0x01; 7526 let val = (self.0 >> 5usize) & 0x01;
7636 super::vals::Cpha(val as u8) 7527 val != 0
7637 } 7528 }
7638 #[doc = "Clock phase"] 7529 #[doc = "Capture/Compare control update generation"]
7639 pub fn set_cpha(&mut self, val: super::vals::Cpha) { 7530 pub fn set_comg(&mut self, val: bool) {
7640 self.0 = (self.0 & !(0x01 << 9usize)) | (((val.0 as u32) & 0x01) << 9usize); 7531 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
7641 } 7532 }
7642 #[doc = "Clock polarity"] 7533 #[doc = "Trigger generation"]
7643 pub const fn cpol(&self) -> super::vals::Cpol { 7534 pub const fn tg(&self) -> bool {
7644 let val = (self.0 >> 10usize) & 0x01; 7535 let val = (self.0 >> 6usize) & 0x01;
7645 super::vals::Cpol(val as u8) 7536 val != 0
7646 } 7537 }
7647 #[doc = "Clock polarity"] 7538 #[doc = "Trigger generation"]
7648 pub fn set_cpol(&mut self, val: super::vals::Cpol) { 7539 pub fn set_tg(&mut self, val: bool) {
7649 self.0 = (self.0 & !(0x01 << 10usize)) | (((val.0 as u32) & 0x01) << 10usize); 7540 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
7650 } 7541 }
7651 #[doc = "Clock enable"] 7542 #[doc = "Break generation"]
7652 pub const fn clken(&self) -> bool { 7543 pub const fn bg(&self) -> bool {
7653 let val = (self.0 >> 11usize) & 0x01; 7544 let val = (self.0 >> 7usize) & 0x01;
7654 val != 0 7545 val != 0
7655 } 7546 }
7656 #[doc = "Clock enable"] 7547 #[doc = "Break generation"]
7657 pub fn set_clken(&mut self, val: bool) { 7548 pub fn set_bg(&mut self, val: bool) {
7658 self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); 7549 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
7659 }
7660 #[doc = "STOP bits"]
7661 pub const fn stop(&self) -> super::vals::Stop {
7662 let val = (self.0 >> 12usize) & 0x03;
7663 super::vals::Stop(val as u8)
7664 } 7550 }
7665 #[doc = "STOP bits"] 7551 }
7666 pub fn set_stop(&mut self, val: super::vals::Stop) { 7552 impl Default for EgrGp {
7667 self.0 = (self.0 & !(0x03 << 12usize)) | (((val.0 as u32) & 0x03) << 12usize); 7553 fn default() -> EgrGp {
7554 EgrGp(0)
7668 } 7555 }
7669 #[doc = "LIN mode enable"] 7556 }
7670 pub const fn linen(&self) -> bool { 7557 #[doc = "counter"]
7671 let val = (self.0 >> 14usize) & 0x01; 7558 #[repr(transparent)]
7672 val != 0 7559 #[derive(Copy, Clone, Eq, PartialEq)]
7560 pub struct Cnt16(pub u32);
7561 impl Cnt16 {
7562 #[doc = "counter value"]
7563 pub const fn cnt(&self) -> u16 {
7564 let val = (self.0 >> 0usize) & 0xffff;
7565 val as u16
7673 } 7566 }
7674 #[doc = "LIN mode enable"] 7567 #[doc = "counter value"]
7675 pub fn set_linen(&mut self, val: bool) { 7568 pub fn set_cnt(&mut self, val: u16) {
7676 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); 7569 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
7677 } 7570 }
7678 } 7571 }
7679 impl Default for Cr2Usart { 7572 impl Default for Cnt16 {
7680 fn default() -> Cr2Usart { 7573 fn default() -> Cnt16 {
7681 Cr2Usart(0) 7574 Cnt16(0)
7682 } 7575 }
7683 } 7576 }
7684 #[doc = "Control register 1"] 7577 #[doc = "control register 2"]
7685 #[repr(transparent)] 7578 #[repr(transparent)]
7686 #[derive(Copy, Clone, Eq, PartialEq)] 7579 #[derive(Copy, Clone, Eq, PartialEq)]
7687 pub struct Cr1(pub u32); 7580 pub struct Cr2Adv(pub u32);
7688 impl Cr1 { 7581 impl Cr2Adv {
7689 #[doc = "Send break"] 7582 #[doc = "Capture/compare preloaded control"]
7690 pub const fn sbk(&self) -> super::vals::Sbk { 7583 pub const fn ccpc(&self) -> bool {
7691 let val = (self.0 >> 0usize) & 0x01; 7584 let val = (self.0 >> 0usize) & 0x01;
7692 super::vals::Sbk(val as u8) 7585 val != 0
7693 }
7694 #[doc = "Send break"]
7695 pub fn set_sbk(&mut self, val: super::vals::Sbk) {
7696 self.0 = (self.0 & !(0x01 << 0usize)) | (((val.0 as u32) & 0x01) << 0usize);
7697 }
7698 #[doc = "Receiver wakeup"]
7699 pub const fn rwu(&self) -> super::vals::Rwu {
7700 let val = (self.0 >> 1usize) & 0x01;
7701 super::vals::Rwu(val as u8)
7702 } 7586 }
7703 #[doc = "Receiver wakeup"] 7587 #[doc = "Capture/compare preloaded control"]
7704 pub fn set_rwu(&mut self, val: super::vals::Rwu) { 7588 pub fn set_ccpc(&mut self, val: bool) {
7705 self.0 = (self.0 & !(0x01 << 1usize)) | (((val.0 as u32) & 0x01) << 1usize); 7589 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
7706 } 7590 }
7707 #[doc = "Receiver enable"] 7591 #[doc = "Capture/compare control update selection"]
7708 pub const fn re(&self) -> bool { 7592 pub const fn ccus(&self) -> bool {
7709 let val = (self.0 >> 2usize) & 0x01; 7593 let val = (self.0 >> 2usize) & 0x01;
7710 val != 0 7594 val != 0
7711 } 7595 }
7712 #[doc = "Receiver enable"] 7596 #[doc = "Capture/compare control update selection"]
7713 pub fn set_re(&mut self, val: bool) { 7597 pub fn set_ccus(&mut self, val: bool) {
7714 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); 7598 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
7715 } 7599 }
7716 #[doc = "Transmitter enable"] 7600 #[doc = "Capture/compare DMA selection"]
7717 pub const fn te(&self) -> bool { 7601 pub const fn ccds(&self) -> super::vals::Ccds {
7718 let val = (self.0 >> 3usize) & 0x01; 7602 let val = (self.0 >> 3usize) & 0x01;
7719 val != 0 7603 super::vals::Ccds(val as u8)
7720 }
7721 #[doc = "Transmitter enable"]
7722 pub fn set_te(&mut self, val: bool) {
7723 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
7724 }
7725 #[doc = "IDLE interrupt enable"]
7726 pub const fn idleie(&self) -> bool {
7727 let val = (self.0 >> 4usize) & 0x01;
7728 val != 0
7729 }
7730 #[doc = "IDLE interrupt enable"]
7731 pub fn set_idleie(&mut self, val: bool) {
7732 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
7733 }
7734 #[doc = "RXNE interrupt enable"]
7735 pub const fn rxneie(&self) -> bool {
7736 let val = (self.0 >> 5usize) & 0x01;
7737 val != 0
7738 } 7604 }
7739 #[doc = "RXNE interrupt enable"] 7605 #[doc = "Capture/compare DMA selection"]
7740 pub fn set_rxneie(&mut self, val: bool) { 7606 pub fn set_ccds(&mut self, val: super::vals::Ccds) {
7741 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); 7607 self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize);
7742 } 7608 }
7743 #[doc = "Transmission complete interrupt enable"] 7609 #[doc = "Master mode selection"]
7744 pub const fn tcie(&self) -> bool { 7610 pub const fn mms(&self) -> super::vals::Mms {
7745 let val = (self.0 >> 6usize) & 0x01; 7611 let val = (self.0 >> 4usize) & 0x07;
7746 val != 0 7612 super::vals::Mms(val as u8)
7747 } 7613 }
7748 #[doc = "Transmission complete interrupt enable"] 7614 #[doc = "Master mode selection"]
7749 pub fn set_tcie(&mut self, val: bool) { 7615 pub fn set_mms(&mut self, val: super::vals::Mms) {
7750 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); 7616 self.0 = (self.0 & !(0x07 << 4usize)) | (((val.0 as u32) & 0x07) << 4usize);
7751 } 7617 }
7752 #[doc = "TXE interrupt enable"] 7618 #[doc = "TI1 selection"]
7753 pub const fn txeie(&self) -> bool { 7619 pub const fn ti1s(&self) -> super::vals::Tis {
7754 let val = (self.0 >> 7usize) & 0x01; 7620 let val = (self.0 >> 7usize) & 0x01;
7755 val != 0 7621 super::vals::Tis(val as u8)
7756 } 7622 }
7757 #[doc = "TXE interrupt enable"] 7623 #[doc = "TI1 selection"]
7758 pub fn set_txeie(&mut self, val: bool) { 7624 pub fn set_ti1s(&mut self, val: super::vals::Tis) {
7759 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); 7625 self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize);
7760 } 7626 }
7761 #[doc = "PE interrupt enable"] 7627 #[doc = "Output Idle state 1"]
7762 pub const fn peie(&self) -> bool { 7628 pub fn ois(&self, n: usize) -> bool {
7763 let val = (self.0 >> 8usize) & 0x01; 7629 assert!(n < 4usize);
7630 let offs = 8usize + n * 2usize;
7631 let val = (self.0 >> offs) & 0x01;
7764 val != 0 7632 val != 0
7765 } 7633 }
7766 #[doc = "PE interrupt enable"] 7634 #[doc = "Output Idle state 1"]
7767 pub fn set_peie(&mut self, val: bool) { 7635 pub fn set_ois(&mut self, n: usize, val: bool) {
7768 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); 7636 assert!(n < 4usize);
7637 let offs = 8usize + n * 2usize;
7638 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
7769 } 7639 }
7770 #[doc = "Parity selection"] 7640 #[doc = "Output Idle state 1"]
7771 pub const fn ps(&self) -> super::vals::Ps { 7641 pub const fn ois1n(&self) -> bool {
7772 let val = (self.0 >> 9usize) & 0x01; 7642 let val = (self.0 >> 9usize) & 0x01;
7773 super::vals::Ps(val as u8)
7774 }
7775 #[doc = "Parity selection"]
7776 pub fn set_ps(&mut self, val: super::vals::Ps) {
7777 self.0 = (self.0 & !(0x01 << 9usize)) | (((val.0 as u32) & 0x01) << 9usize);
7778 }
7779 #[doc = "Parity control enable"]
7780 pub const fn pce(&self) -> bool {
7781 let val = (self.0 >> 10usize) & 0x01;
7782 val != 0 7643 val != 0
7783 } 7644 }
7784 #[doc = "Parity control enable"] 7645 #[doc = "Output Idle state 1"]
7785 pub fn set_pce(&mut self, val: bool) { 7646 pub fn set_ois1n(&mut self, val: bool) {
7786 self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); 7647 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
7787 } 7648 }
7788 #[doc = "Wakeup method"] 7649 #[doc = "Output Idle state 2"]
7789 pub const fn wake(&self) -> super::vals::Wake { 7650 pub const fn ois2n(&self) -> bool {
7790 let val = (self.0 >> 11usize) & 0x01; 7651 let val = (self.0 >> 11usize) & 0x01;
7791 super::vals::Wake(val as u8) 7652 val != 0
7792 }
7793 #[doc = "Wakeup method"]
7794 pub fn set_wake(&mut self, val: super::vals::Wake) {
7795 self.0 = (self.0 & !(0x01 << 11usize)) | (((val.0 as u32) & 0x01) << 11usize);
7796 }
7797 #[doc = "Word length"]
7798 pub const fn m(&self) -> super::vals::M {
7799 let val = (self.0 >> 12usize) & 0x01;
7800 super::vals::M(val as u8)
7801 } 7653 }
7802 #[doc = "Word length"] 7654 #[doc = "Output Idle state 2"]
7803 pub fn set_m(&mut self, val: super::vals::M) { 7655 pub fn set_ois2n(&mut self, val: bool) {
7804 self.0 = (self.0 & !(0x01 << 12usize)) | (((val.0 as u32) & 0x01) << 12usize); 7656 self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize);
7805 } 7657 }
7806 #[doc = "USART enable"] 7658 #[doc = "Output Idle state 3"]
7807 pub const fn ue(&self) -> bool { 7659 pub const fn ois3n(&self) -> bool {
7808 let val = (self.0 >> 13usize) & 0x01; 7660 let val = (self.0 >> 13usize) & 0x01;
7809 val != 0 7661 val != 0
7810 } 7662 }
7811 #[doc = "USART enable"] 7663 #[doc = "Output Idle state 3"]
7812 pub fn set_ue(&mut self, val: bool) { 7664 pub fn set_ois3n(&mut self, val: bool) {
7813 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); 7665 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize);
7814 } 7666 }
7815 } 7667 }
7816 impl Default for Cr1 { 7668 impl Default for Cr2Adv {
7817 fn default() -> Cr1 { 7669 fn default() -> Cr2Adv {
7818 Cr1(0) 7670 Cr2Adv(0)
7819 } 7671 }
7820 } 7672 }
7821 #[doc = "Data register"] 7673 #[doc = "auto-reload register"]
7822 #[repr(transparent)] 7674 #[repr(transparent)]
7823 #[derive(Copy, Clone, Eq, PartialEq)] 7675 #[derive(Copy, Clone, Eq, PartialEq)]
7824 pub struct Dr(pub u32); 7676 pub struct Arr32(pub u32);
7825 impl Dr { 7677 impl Arr32 {
7826 #[doc = "Data value"] 7678 #[doc = "Auto-reload value"]
7827 pub const fn dr(&self) -> u16 { 7679 pub const fn arr(&self) -> u32 {
7828 let val = (self.0 >> 0usize) & 0x01ff; 7680 let val = (self.0 >> 0usize) & 0xffff_ffff;
7829 val as u16 7681 val as u32
7830 } 7682 }
7831 #[doc = "Data value"] 7683 #[doc = "Auto-reload value"]
7832 pub fn set_dr(&mut self, val: u16) { 7684 pub fn set_arr(&mut self, val: u32) {
7833 self.0 = (self.0 & !(0x01ff << 0usize)) | (((val as u32) & 0x01ff) << 0usize); 7685 self.0 =
7686 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
7834 } 7687 }
7835 } 7688 }
7836 impl Default for Dr { 7689 impl Default for Arr32 {
7837 fn default() -> Dr { 7690 fn default() -> Arr32 {
7838 Dr(0) 7691 Arr32(0)
7839 } 7692 }
7840 } 7693 }
7841 #[doc = "Control register 3"] 7694 #[doc = "DMA/Interrupt enable register"]
7842 #[repr(transparent)] 7695 #[repr(transparent)]
7843 #[derive(Copy, Clone, Eq, PartialEq)] 7696 #[derive(Copy, Clone, Eq, PartialEq)]
7844 pub struct Cr3(pub u32); 7697 pub struct DierGp(pub u32);
7845 impl Cr3 { 7698 impl DierGp {
7846 #[doc = "Error interrupt enable"] 7699 #[doc = "Update interrupt enable"]
7847 pub const fn eie(&self) -> bool { 7700 pub const fn uie(&self) -> bool {
7848 let val = (self.0 >> 0usize) & 0x01; 7701 let val = (self.0 >> 0usize) & 0x01;
7849 val != 0 7702 val != 0
7850 } 7703 }
7851 #[doc = "Error interrupt enable"] 7704 #[doc = "Update interrupt enable"]
7852 pub fn set_eie(&mut self, val: bool) { 7705 pub fn set_uie(&mut self, val: bool) {
7853 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 7706 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
7854 } 7707 }
7855 #[doc = "IrDA mode enable"] 7708 #[doc = "Capture/Compare 1 interrupt enable"]
7856 pub const fn iren(&self) -> bool { 7709 pub fn ccie(&self, n: usize) -> bool {
7857 let val = (self.0 >> 1usize) & 0x01; 7710 assert!(n < 4usize);
7711 let offs = 1usize + n * 1usize;
7712 let val = (self.0 >> offs) & 0x01;
7858 val != 0 7713 val != 0
7859 } 7714 }
7860 #[doc = "IrDA mode enable"] 7715 #[doc = "Capture/Compare 1 interrupt enable"]
7861 pub fn set_iren(&mut self, val: bool) { 7716 pub fn set_ccie(&mut self, n: usize, val: bool) {
7862 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); 7717 assert!(n < 4usize);
7718 let offs = 1usize + n * 1usize;
7719 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
7863 } 7720 }
7864 #[doc = "IrDA low-power"] 7721 #[doc = "Trigger interrupt enable"]
7865 pub const fn irlp(&self) -> super::vals::Irlp { 7722 pub const fn tie(&self) -> bool {
7866 let val = (self.0 >> 2usize) & 0x01; 7723 let val = (self.0 >> 6usize) & 0x01;
7867 super::vals::Irlp(val as u8) 7724 val != 0
7868 } 7725 }
7869 #[doc = "IrDA low-power"] 7726 #[doc = "Trigger interrupt enable"]
7870 pub fn set_irlp(&mut self, val: super::vals::Irlp) { 7727 pub fn set_tie(&mut self, val: bool) {
7871 self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize); 7728 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
7872 } 7729 }
7873 #[doc = "Half-duplex selection"] 7730 #[doc = "Update DMA request enable"]
7874 pub const fn hdsel(&self) -> super::vals::Hdsel { 7731 pub const fn ude(&self) -> bool {
7875 let val = (self.0 >> 3usize) & 0x01; 7732 let val = (self.0 >> 8usize) & 0x01;
7876 super::vals::Hdsel(val as u8) 7733 val != 0
7877 } 7734 }
7878 #[doc = "Half-duplex selection"] 7735 #[doc = "Update DMA request enable"]
7879 pub fn set_hdsel(&mut self, val: super::vals::Hdsel) { 7736 pub fn set_ude(&mut self, val: bool) {
7880 self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize); 7737 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
7881 } 7738 }
7882 #[doc = "DMA enable receiver"] 7739 #[doc = "Capture/Compare 1 DMA request enable"]
7883 pub const fn dmar(&self) -> bool { 7740 pub fn ccde(&self, n: usize) -> bool {
7884 let val = (self.0 >> 6usize) & 0x01; 7741 assert!(n < 4usize);
7742 let offs = 9usize + n * 1usize;
7743 let val = (self.0 >> offs) & 0x01;
7885 val != 0 7744 val != 0
7886 } 7745 }
7887 #[doc = "DMA enable receiver"] 7746 #[doc = "Capture/Compare 1 DMA request enable"]
7888 pub fn set_dmar(&mut self, val: bool) { 7747 pub fn set_ccde(&mut self, n: usize, val: bool) {
7889 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); 7748 assert!(n < 4usize);
7749 let offs = 9usize + n * 1usize;
7750 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
7890 } 7751 }
7891 #[doc = "DMA enable transmitter"] 7752 #[doc = "Trigger DMA request enable"]
7892 pub const fn dmat(&self) -> bool { 7753 pub const fn tde(&self) -> bool {
7893 let val = (self.0 >> 7usize) & 0x01; 7754 let val = (self.0 >> 14usize) & 0x01;
7894 val != 0 7755 val != 0
7895 } 7756 }
7896 #[doc = "DMA enable transmitter"] 7757 #[doc = "Trigger DMA request enable"]
7897 pub fn set_dmat(&mut self, val: bool) { 7758 pub fn set_tde(&mut self, val: bool) {
7898 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); 7759 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize);
7899 } 7760 }
7900 } 7761 }
7901 impl Default for Cr3 { 7762 impl Default for DierGp {
7902 fn default() -> Cr3 { 7763 fn default() -> DierGp {
7903 Cr3(0) 7764 DierGp(0)
7904 } 7765 }
7905 } 7766 }
7906 #[doc = "Baud rate register"] 7767 #[doc = "control register 2"]
7907 #[repr(transparent)] 7768 #[repr(transparent)]
7908 #[derive(Copy, Clone, Eq, PartialEq)] 7769 #[derive(Copy, Clone, Eq, PartialEq)]
7909 pub struct Brr(pub u32); 7770 pub struct Cr2Gp(pub u32);
7910 impl Brr { 7771 impl Cr2Gp {
7911 #[doc = "fraction of USARTDIV"] 7772 #[doc = "Capture/compare DMA selection"]
7912 pub const fn div_fraction(&self) -> u8 { 7773 pub const fn ccds(&self) -> super::vals::Ccds {
7913 let val = (self.0 >> 0usize) & 0x0f; 7774 let val = (self.0 >> 3usize) & 0x01;
7914 val as u8 7775 super::vals::Ccds(val as u8)
7915 } 7776 }
7916 #[doc = "fraction of USARTDIV"] 7777 #[doc = "Capture/compare DMA selection"]
7917 pub fn set_div_fraction(&mut self, val: u8) { 7778 pub fn set_ccds(&mut self, val: super::vals::Ccds) {
7918 self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); 7779 self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize);
7919 } 7780 }
7920 #[doc = "mantissa of USARTDIV"] 7781 #[doc = "Master mode selection"]
7921 pub const fn div_mantissa(&self) -> u16 { 7782 pub const fn mms(&self) -> super::vals::Mms {
7922 let val = (self.0 >> 4usize) & 0x0fff; 7783 let val = (self.0 >> 4usize) & 0x07;
7923 val as u16 7784 super::vals::Mms(val as u8)
7924 } 7785 }
7925 #[doc = "mantissa of USARTDIV"] 7786 #[doc = "Master mode selection"]
7926 pub fn set_div_mantissa(&mut self, val: u16) { 7787 pub fn set_mms(&mut self, val: super::vals::Mms) {
7927 self.0 = (self.0 & !(0x0fff << 4usize)) | (((val as u32) & 0x0fff) << 4usize); 7788 self.0 = (self.0 & !(0x07 << 4usize)) | (((val.0 as u32) & 0x07) << 4usize);
7789 }
7790 #[doc = "TI1 selection"]
7791 pub const fn ti1s(&self) -> super::vals::Tis {
7792 let val = (self.0 >> 7usize) & 0x01;
7793 super::vals::Tis(val as u8)
7794 }
7795 #[doc = "TI1 selection"]
7796 pub fn set_ti1s(&mut self, val: super::vals::Tis) {
7797 self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize);
7928 } 7798 }
7929 } 7799 }
7930 impl Default for Brr { 7800 impl Default for Cr2Gp {
7931 fn default() -> Brr { 7801 fn default() -> Cr2Gp {
7932 Brr(0) 7802 Cr2Gp(0)
7933 } 7803 }
7934 } 7804 }
7935 #[doc = "Status register"] 7805 #[doc = "capture/compare register 1"]
7936 #[repr(transparent)] 7806 #[repr(transparent)]
7937 #[derive(Copy, Clone, Eq, PartialEq)] 7807 #[derive(Copy, Clone, Eq, PartialEq)]
7938 pub struct Sr(pub u32); 7808 pub struct Ccr16(pub u32);
7939 impl Sr { 7809 impl Ccr16 {
7940 #[doc = "Parity error"] 7810 #[doc = "Capture/Compare 1 value"]
7941 pub const fn pe(&self) -> bool { 7811 pub const fn ccr(&self) -> u16 {
7942 let val = (self.0 >> 0usize) & 0x01; 7812 let val = (self.0 >> 0usize) & 0xffff;
7943 val != 0 7813 val as u16
7944 }
7945 #[doc = "Parity error"]
7946 pub fn set_pe(&mut self, val: bool) {
7947 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
7948 } 7814 }
7949 #[doc = "Framing error"] 7815 #[doc = "Capture/Compare 1 value"]
7950 pub const fn fe(&self) -> bool { 7816 pub fn set_ccr(&mut self, val: u16) {
7951 let val = (self.0 >> 1usize) & 0x01; 7817 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
7952 val != 0
7953 } 7818 }
7954 #[doc = "Framing error"] 7819 }
7955 pub fn set_fe(&mut self, val: bool) { 7820 impl Default for Ccr16 {
7956 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); 7821 fn default() -> Ccr16 {
7822 Ccr16(0)
7957 } 7823 }
7958 #[doc = "Noise error flag"] 7824 }
7959 pub const fn ne(&self) -> bool { 7825 #[doc = "capture/compare enable register"]
7960 let val = (self.0 >> 2usize) & 0x01; 7826 #[repr(transparent)]
7827 #[derive(Copy, Clone, Eq, PartialEq)]
7828 pub struct CcerAdv(pub u32);
7829 impl CcerAdv {
7830 #[doc = "Capture/Compare 1 output enable"]
7831 pub fn cce(&self, n: usize) -> bool {
7832 assert!(n < 4usize);
7833 let offs = 0usize + n * 4usize;
7834 let val = (self.0 >> offs) & 0x01;
7961 val != 0 7835 val != 0
7962 } 7836 }
7963 #[doc = "Noise error flag"] 7837 #[doc = "Capture/Compare 1 output enable"]
7964 pub fn set_ne(&mut self, val: bool) { 7838 pub fn set_cce(&mut self, n: usize, val: bool) {
7965 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); 7839 assert!(n < 4usize);
7840 let offs = 0usize + n * 4usize;
7841 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
7966 } 7842 }
7967 #[doc = "Overrun error"] 7843 #[doc = "Capture/Compare 1 output Polarity"]
7968 pub const fn ore(&self) -> bool { 7844 pub fn ccp(&self, n: usize) -> bool {
7969 let val = (self.0 >> 3usize) & 0x01; 7845 assert!(n < 4usize);
7846 let offs = 1usize + n * 4usize;
7847 let val = (self.0 >> offs) & 0x01;
7970 val != 0 7848 val != 0
7971 } 7849 }
7972 #[doc = "Overrun error"] 7850 #[doc = "Capture/Compare 1 output Polarity"]
7973 pub fn set_ore(&mut self, val: bool) { 7851 pub fn set_ccp(&mut self, n: usize, val: bool) {
7974 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); 7852 assert!(n < 4usize);
7853 let offs = 1usize + n * 4usize;
7854 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
7975 } 7855 }
7976 #[doc = "IDLE line detected"] 7856 #[doc = "Capture/Compare 1 complementary output enable"]
7977 pub const fn idle(&self) -> bool { 7857 pub fn ccne(&self, n: usize) -> bool {
7978 let val = (self.0 >> 4usize) & 0x01; 7858 assert!(n < 4usize);
7859 let offs = 2usize + n * 4usize;
7860 let val = (self.0 >> offs) & 0x01;
7979 val != 0 7861 val != 0
7980 } 7862 }
7981 #[doc = "IDLE line detected"] 7863 #[doc = "Capture/Compare 1 complementary output enable"]
7982 pub fn set_idle(&mut self, val: bool) { 7864 pub fn set_ccne(&mut self, n: usize, val: bool) {
7983 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); 7865 assert!(n < 4usize);
7866 let offs = 2usize + n * 4usize;
7867 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
7984 } 7868 }
7985 #[doc = "Read data register not empty"] 7869 #[doc = "Capture/Compare 1 output Polarity"]
7986 pub const fn rxne(&self) -> bool { 7870 pub fn ccnp(&self, n: usize) -> bool {
7987 let val = (self.0 >> 5usize) & 0x01; 7871 assert!(n < 4usize);
7872 let offs = 3usize + n * 4usize;
7873 let val = (self.0 >> offs) & 0x01;
7988 val != 0 7874 val != 0
7989 } 7875 }
7990 #[doc = "Read data register not empty"] 7876 #[doc = "Capture/Compare 1 output Polarity"]
7991 pub fn set_rxne(&mut self, val: bool) { 7877 pub fn set_ccnp(&mut self, n: usize, val: bool) {
7992 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); 7878 assert!(n < 4usize);
7993 } 7879 let offs = 3usize + n * 4usize;
7994 #[doc = "Transmission complete"] 7880 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
7995 pub const fn tc(&self) -> bool {
7996 let val = (self.0 >> 6usize) & 0x01;
7997 val != 0
7998 } 7881 }
7999 #[doc = "Transmission complete"] 7882 }
8000 pub fn set_tc(&mut self, val: bool) { 7883 impl Default for CcerAdv {
8001 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); 7884 fn default() -> CcerAdv {
7885 CcerAdv(0)
8002 } 7886 }
8003 #[doc = "Transmit data register empty"] 7887 }
8004 pub const fn txe(&self) -> bool { 7888 #[doc = "DMA/Interrupt enable register"]
8005 let val = (self.0 >> 7usize) & 0x01; 7889 #[repr(transparent)]
7890 #[derive(Copy, Clone, Eq, PartialEq)]
7891 pub struct DierBasic(pub u32);
7892 impl DierBasic {
7893 #[doc = "Update interrupt enable"]
7894 pub const fn uie(&self) -> bool {
7895 let val = (self.0 >> 0usize) & 0x01;
8006 val != 0 7896 val != 0
8007 } 7897 }
8008 #[doc = "Transmit data register empty"] 7898 #[doc = "Update interrupt enable"]
8009 pub fn set_txe(&mut self, val: bool) { 7899 pub fn set_uie(&mut self, val: bool) {
8010 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); 7900 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
8011 } 7901 }
8012 #[doc = "LIN break detection flag"] 7902 #[doc = "Update DMA request enable"]
8013 pub const fn lbd(&self) -> bool { 7903 pub const fn ude(&self) -> bool {
8014 let val = (self.0 >> 8usize) & 0x01; 7904 let val = (self.0 >> 8usize) & 0x01;
8015 val != 0 7905 val != 0
8016 } 7906 }
8017 #[doc = "LIN break detection flag"] 7907 #[doc = "Update DMA request enable"]
8018 pub fn set_lbd(&mut self, val: bool) { 7908 pub fn set_ude(&mut self, val: bool) {
8019 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); 7909 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
8020 } 7910 }
8021 } 7911 }
8022 impl Default for Sr { 7912 impl Default for DierBasic {
8023 fn default() -> Sr { 7913 fn default() -> DierBasic {
8024 Sr(0) 7914 DierBasic(0)
8025 } 7915 }
8026 } 7916 }
8027 #[doc = "Status register"] 7917 #[doc = "event generation register"]
8028 #[repr(transparent)] 7918 #[repr(transparent)]
8029 #[derive(Copy, Clone, Eq, PartialEq)] 7919 #[derive(Copy, Clone, Eq, PartialEq)]
8030 pub struct SrUsart(pub u32); 7920 pub struct EgrAdv(pub u32);
8031 impl SrUsart { 7921 impl EgrAdv {
8032 #[doc = "Parity error"] 7922 #[doc = "Update generation"]
8033 pub const fn pe(&self) -> bool { 7923 pub const fn ug(&self) -> bool {
8034 let val = (self.0 >> 0usize) & 0x01; 7924 let val = (self.0 >> 0usize) & 0x01;
8035 val != 0 7925 val != 0
8036 } 7926 }
8037 #[doc = "Parity error"] 7927 #[doc = "Update generation"]
8038 pub fn set_pe(&mut self, val: bool) { 7928 pub fn set_ug(&mut self, val: bool) {
8039 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 7929 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
8040 } 7930 }
8041 #[doc = "Framing error"] 7931 #[doc = "Capture/compare 1 generation"]
8042 pub const fn fe(&self) -> bool { 7932 pub fn ccg(&self, n: usize) -> bool {
8043 let val = (self.0 >> 1usize) & 0x01; 7933 assert!(n < 4usize);
8044 val != 0 7934 let offs = 1usize + n * 1usize;
8045 } 7935 let val = (self.0 >> offs) & 0x01;
8046 #[doc = "Framing error"]
8047 pub fn set_fe(&mut self, val: bool) {
8048 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
8049 }
8050 #[doc = "Noise error flag"]
8051 pub const fn ne(&self) -> bool {
8052 let val = (self.0 >> 2usize) & 0x01;
8053 val != 0
8054 }
8055 #[doc = "Noise error flag"]
8056 pub fn set_ne(&mut self, val: bool) {
8057 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
8058 }
8059 #[doc = "Overrun error"]
8060 pub const fn ore(&self) -> bool {
8061 let val = (self.0 >> 3usize) & 0x01;
8062 val != 0
8063 }
8064 #[doc = "Overrun error"]
8065 pub fn set_ore(&mut self, val: bool) {
8066 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
8067 }
8068 #[doc = "IDLE line detected"]
8069 pub const fn idle(&self) -> bool {
8070 let val = (self.0 >> 4usize) & 0x01;
8071 val != 0 7936 val != 0
8072 } 7937 }
8073 #[doc = "IDLE line detected"] 7938 #[doc = "Capture/compare 1 generation"]
8074 pub fn set_idle(&mut self, val: bool) { 7939 pub fn set_ccg(&mut self, n: usize, val: bool) {
8075 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); 7940 assert!(n < 4usize);
7941 let offs = 1usize + n * 1usize;
7942 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
8076 } 7943 }
8077 #[doc = "Read data register not empty"] 7944 #[doc = "Capture/Compare control update generation"]
8078 pub const fn rxne(&self) -> bool { 7945 pub const fn comg(&self) -> bool {
8079 let val = (self.0 >> 5usize) & 0x01; 7946 let val = (self.0 >> 5usize) & 0x01;
8080 val != 0 7947 val != 0
8081 } 7948 }
8082 #[doc = "Read data register not empty"] 7949 #[doc = "Capture/Compare control update generation"]
8083 pub fn set_rxne(&mut self, val: bool) { 7950 pub fn set_comg(&mut self, val: bool) {
8084 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); 7951 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
8085 } 7952 }
8086 #[doc = "Transmission complete"] 7953 #[doc = "Trigger generation"]
8087 pub const fn tc(&self) -> bool { 7954 pub const fn tg(&self) -> bool {
8088 let val = (self.0 >> 6usize) & 0x01; 7955 let val = (self.0 >> 6usize) & 0x01;
8089 val != 0 7956 val != 0
8090 } 7957 }
8091 #[doc = "Transmission complete"] 7958 #[doc = "Trigger generation"]
8092 pub fn set_tc(&mut self, val: bool) { 7959 pub fn set_tg(&mut self, val: bool) {
8093 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); 7960 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
8094 } 7961 }
8095 #[doc = "Transmit data register empty"] 7962 #[doc = "Break generation"]
8096 pub const fn txe(&self) -> bool { 7963 pub const fn bg(&self) -> bool {
8097 let val = (self.0 >> 7usize) & 0x01; 7964 let val = (self.0 >> 7usize) & 0x01;
8098 val != 0 7965 val != 0
8099 } 7966 }
8100 #[doc = "Transmit data register empty"] 7967 #[doc = "Break generation"]
8101 pub fn set_txe(&mut self, val: bool) { 7968 pub fn set_bg(&mut self, val: bool) {
8102 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); 7969 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
8103 } 7970 }
8104 #[doc = "LIN break detection flag"] 7971 }
8105 pub const fn lbd(&self) -> bool { 7972 impl Default for EgrAdv {
8106 let val = (self.0 >> 8usize) & 0x01; 7973 fn default() -> EgrAdv {
8107 val != 0 7974 EgrAdv(0)
8108 }
8109 #[doc = "LIN break detection flag"]
8110 pub fn set_lbd(&mut self, val: bool) {
8111 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
8112 } 7975 }
8113 #[doc = "CTS flag"] 7976 }
8114 pub const fn cts(&self) -> bool { 7977 #[doc = "control register 2"]
8115 let val = (self.0 >> 9usize) & 0x01; 7978 #[repr(transparent)]
8116 val != 0 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)
8117 } 7986 }
8118 #[doc = "CTS flag"] 7987 #[doc = "Master mode selection"]
8119 pub fn set_cts(&mut self, val: bool) { 7988 pub fn set_mms(&mut self, val: super::vals::Mms) {
8120 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); 7989 self.0 = (self.0 & !(0x07 << 4usize)) | (((val.0 as u32) & 0x07) << 4usize);
8121 } 7990 }
8122 } 7991 }
8123 impl Default for SrUsart { 7992 impl Default for Cr2Basic {
8124 fn default() -> SrUsart { 7993 fn default() -> Cr2Basic {
8125 SrUsart(0) 7994 Cr2Basic(0)
8126 } 7995 }
8127 } 7996 }
8128 #[doc = "Control register 3"] 7997 #[doc = "status register"]
8129 #[repr(transparent)] 7998 #[repr(transparent)]
8130 #[derive(Copy, Clone, Eq, PartialEq)] 7999 #[derive(Copy, Clone, Eq, PartialEq)]
8131 pub struct Cr3Usart(pub u32); 8000 pub struct SrGp(pub u32);
8132 impl Cr3Usart { 8001 impl SrGp {
8133 #[doc = "Error interrupt enable"] 8002 #[doc = "Update interrupt flag"]
8134 pub const fn eie(&self) -> bool { 8003 pub const fn uif(&self) -> bool {
8135 let val = (self.0 >> 0usize) & 0x01; 8004 let val = (self.0 >> 0usize) & 0x01;
8136 val != 0 8005 val != 0
8137 } 8006 }
8138 #[doc = "Error interrupt enable"] 8007 #[doc = "Update interrupt flag"]
8139 pub fn set_eie(&mut self, val: bool) { 8008 pub fn set_uif(&mut self, val: bool) {
8140 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 8009 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
8141 } 8010 }
8142 #[doc = "IrDA mode enable"] 8011 #[doc = "Capture/compare 1 interrupt flag"]
8143 pub const fn iren(&self) -> bool { 8012 pub fn ccif(&self, n: usize) -> bool {
8144 let val = (self.0 >> 1usize) & 0x01; 8013 assert!(n < 4usize);
8145 val != 0 8014 let offs = 1usize + n * 1usize;
8146 } 8015 let val = (self.0 >> offs) & 0x01;
8147 #[doc = "IrDA mode enable"]
8148 pub fn set_iren(&mut self, val: bool) {
8149 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
8150 }
8151 #[doc = "IrDA low-power"]
8152 pub const fn irlp(&self) -> super::vals::Irlp {
8153 let val = (self.0 >> 2usize) & 0x01;
8154 super::vals::Irlp(val as u8)
8155 }
8156 #[doc = "IrDA low-power"]
8157 pub fn set_irlp(&mut self, val: super::vals::Irlp) {
8158 self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize);
8159 }
8160 #[doc = "Half-duplex selection"]
8161 pub const fn hdsel(&self) -> super::vals::Hdsel {
8162 let val = (self.0 >> 3usize) & 0x01;
8163 super::vals::Hdsel(val as u8)
8164 }
8165 #[doc = "Half-duplex selection"]
8166 pub fn set_hdsel(&mut self, val: super::vals::Hdsel) {
8167 self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize);
8168 }
8169 #[doc = "Smartcard NACK enable"]
8170 pub const fn nack(&self) -> bool {
8171 let val = (self.0 >> 4usize) & 0x01;
8172 val != 0 8016 val != 0
8173 } 8017 }
8174 #[doc = "Smartcard NACK enable"] 8018 #[doc = "Capture/compare 1 interrupt flag"]
8175 pub fn set_nack(&mut self, val: bool) { 8019 pub fn set_ccif(&mut self, n: usize, val: bool) {
8176 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); 8020 assert!(n < 4usize);
8021 let offs = 1usize + n * 1usize;
8022 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
8177 } 8023 }
8178 #[doc = "Smartcard mode enable"] 8024 #[doc = "COM interrupt flag"]
8179 pub const fn scen(&self) -> bool { 8025 pub const fn comif(&self) -> bool {
8180 let val = (self.0 >> 5usize) & 0x01; 8026 let val = (self.0 >> 5usize) & 0x01;
8181 val != 0 8027 val != 0
8182 } 8028 }
8183 #[doc = "Smartcard mode enable"] 8029 #[doc = "COM interrupt flag"]
8184 pub fn set_scen(&mut self, val: bool) { 8030 pub fn set_comif(&mut self, val: bool) {
8185 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); 8031 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
8186 } 8032 }
8187 #[doc = "DMA enable receiver"] 8033 #[doc = "Trigger interrupt flag"]
8188 pub const fn dmar(&self) -> bool { 8034 pub const fn tif(&self) -> bool {
8189 let val = (self.0 >> 6usize) & 0x01; 8035 let val = (self.0 >> 6usize) & 0x01;
8190 val != 0 8036 val != 0
8191 } 8037 }
8192 #[doc = "DMA enable receiver"] 8038 #[doc = "Trigger interrupt flag"]
8193 pub fn set_dmar(&mut self, val: bool) { 8039 pub fn set_tif(&mut self, val: bool) {
8194 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); 8040 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
8195 } 8041 }
8196 #[doc = "DMA enable transmitter"] 8042 #[doc = "Break interrupt flag"]
8197 pub const fn dmat(&self) -> bool { 8043 pub const fn bif(&self) -> bool {
8198 let val = (self.0 >> 7usize) & 0x01; 8044 let val = (self.0 >> 7usize) & 0x01;
8199 val != 0 8045 val != 0
8200 } 8046 }
8201 #[doc = "DMA enable transmitter"] 8047 #[doc = "Break interrupt flag"]
8202 pub fn set_dmat(&mut self, val: bool) { 8048 pub fn set_bif(&mut self, val: bool) {
8203 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); 8049 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
8204 } 8050 }
8205 #[doc = "RTS enable"] 8051 #[doc = "Capture/Compare 1 overcapture flag"]
8206 pub const fn rtse(&self) -> bool { 8052 pub fn ccof(&self, n: usize) -> bool {
8207 let val = (self.0 >> 8usize) & 0x01; 8053 assert!(n < 4usize);
8054 let offs = 9usize + n * 1usize;
8055 let val = (self.0 >> offs) & 0x01;
8208 val != 0 8056 val != 0
8209 } 8057 }
8210 #[doc = "RTS enable"] 8058 #[doc = "Capture/Compare 1 overcapture flag"]
8211 pub fn set_rtse(&mut self, val: bool) { 8059 pub fn set_ccof(&mut self, n: usize, val: bool) {
8212 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); 8060 assert!(n < 4usize);
8213 } 8061 let offs = 9usize + n * 1usize;
8214 #[doc = "CTS enable"] 8062 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
8215 pub const fn ctse(&self) -> bool {
8216 let val = (self.0 >> 9usize) & 0x01;
8217 val != 0
8218 } 8063 }
8219 #[doc = "CTS enable"] 8064 }
8220 pub fn set_ctse(&mut self, val: bool) { 8065 impl Default for SrGp {
8221 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); 8066 fn default() -> SrGp {
8067 SrGp(0)
8222 } 8068 }
8223 #[doc = "CTS interrupt enable"] 8069 }
8224 pub const fn ctsie(&self) -> bool { 8070 #[doc = "event generation register"]
8225 let val = (self.0 >> 10usize) & 0x01; 8071 #[repr(transparent)]
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;
8226 val != 0 8078 val != 0
8227 } 8079 }
8228 #[doc = "CTS interrupt enable"] 8080 #[doc = "Update generation"]
8229 pub fn set_ctsie(&mut self, val: bool) { 8081 pub fn set_ug(&mut self, val: bool) {
8230 self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); 8082 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
8231 } 8083 }
8232 } 8084 }
8233 impl Default for Cr3Usart { 8085 impl Default for EgrBasic {
8234 fn default() -> Cr3Usart { 8086 fn default() -> EgrBasic {
8235 Cr3Usart(0) 8087 EgrBasic(0)
8236 } 8088 }
8237 } 8089 }
8238 } 8090 #[doc = "control register 1"]
8239}
8240pub mod syscfg_h7 {
8241 use crate::generic::*;
8242 #[doc = "System configuration controller"]
8243 #[derive(Copy, Clone)]
8244 pub struct Syscfg(pub *mut u8);
8245 unsafe impl Send for Syscfg {}
8246 unsafe impl Sync for Syscfg {}
8247 impl Syscfg {
8248 #[doc = "peripheral mode configuration register"]
8249 pub fn pmcr(self) -> Reg<regs::Pmcr, RW> {
8250 unsafe { Reg::from_ptr(self.0.add(4usize)) }
8251 }
8252 #[doc = "external interrupt configuration register 1"]
8253 pub fn exticr(self, n: usize) -> Reg<regs::Exticr, RW> {
8254 assert!(n < 4usize);
8255 unsafe { Reg::from_ptr(self.0.add(8usize + n * 4usize)) }
8256 }
8257 #[doc = "compensation cell control/status register"]
8258 pub fn cccsr(self) -> Reg<regs::Cccsr, RW> {
8259 unsafe { Reg::from_ptr(self.0.add(32usize)) }
8260 }
8261 #[doc = "SYSCFG compensation cell value register"]
8262 pub fn ccvr(self) -> Reg<regs::Ccvr, R> {
8263 unsafe { Reg::from_ptr(self.0.add(36usize)) }
8264 }
8265 #[doc = "SYSCFG compensation cell code register"]
8266 pub fn cccr(self) -> Reg<regs::Cccr, RW> {
8267 unsafe { Reg::from_ptr(self.0.add(40usize)) }
8268 }
8269 #[doc = "SYSCFG power control register"]
8270 pub fn pwrcr(self) -> Reg<regs::Pwrcr, RW> {
8271 unsafe { Reg::from_ptr(self.0.add(44usize)) }
8272 }
8273 #[doc = "SYSCFG package register"]
8274 pub fn pkgr(self) -> Reg<regs::Pkgr, R> {
8275 unsafe { Reg::from_ptr(self.0.add(292usize)) }
8276 }
8277 #[doc = "SYSCFG user register 0"]
8278 pub fn ur0(self) -> Reg<regs::Ur0, R> {
8279 unsafe { Reg::from_ptr(self.0.add(768usize)) }
8280 }
8281 #[doc = "SYSCFG user register 2"]
8282 pub fn ur2(self) -> Reg<regs::Ur2, RW> {
8283 unsafe { Reg::from_ptr(self.0.add(776usize)) }
8284 }
8285 #[doc = "SYSCFG user register 3"]
8286 pub fn ur3(self) -> Reg<regs::Ur3, RW> {
8287 unsafe { Reg::from_ptr(self.0.add(780usize)) }
8288 }
8289 #[doc = "SYSCFG user register 4"]
8290 pub fn ur4(self) -> Reg<regs::Ur4, R> {
8291 unsafe { Reg::from_ptr(self.0.add(784usize)) }
8292 }
8293 #[doc = "SYSCFG user register 5"]
8294 pub fn ur5(self) -> Reg<regs::Ur5, R> {
8295 unsafe { Reg::from_ptr(self.0.add(788usize)) }
8296 }
8297 #[doc = "SYSCFG user register 6"]
8298 pub fn ur6(self) -> Reg<regs::Ur6, R> {
8299 unsafe { Reg::from_ptr(self.0.add(792usize)) }
8300 }
8301 #[doc = "SYSCFG user register 7"]
8302 pub fn ur7(self) -> Reg<regs::Ur7, R> {
8303 unsafe { Reg::from_ptr(self.0.add(796usize)) }
8304 }
8305 #[doc = "SYSCFG user register 8"]
8306 pub fn ur8(self) -> Reg<regs::Ur8, R> {
8307 unsafe { Reg::from_ptr(self.0.add(800usize)) }
8308 }
8309 #[doc = "SYSCFG user register 9"]
8310 pub fn ur9(self) -> Reg<regs::Ur9, R> {
8311 unsafe { Reg::from_ptr(self.0.add(804usize)) }
8312 }
8313 #[doc = "SYSCFG user register 10"]
8314 pub fn ur10(self) -> Reg<regs::Ur10, R> {
8315 unsafe { Reg::from_ptr(self.0.add(808usize)) }
8316 }
8317 #[doc = "SYSCFG user register 11"]
8318 pub fn ur11(self) -> Reg<regs::Ur11, R> {
8319 unsafe { Reg::from_ptr(self.0.add(812usize)) }
8320 }
8321 #[doc = "SYSCFG user register 12"]
8322 pub fn ur12(self) -> Reg<regs::Ur12, R> {
8323 unsafe { Reg::from_ptr(self.0.add(816usize)) }
8324 }
8325 #[doc = "SYSCFG user register 13"]
8326 pub fn ur13(self) -> Reg<regs::Ur13, R> {
8327 unsafe { Reg::from_ptr(self.0.add(820usize)) }
8328 }
8329 #[doc = "SYSCFG user register 14"]
8330 pub fn ur14(self) -> Reg<regs::Ur14, RW> {
8331 unsafe { Reg::from_ptr(self.0.add(824usize)) }
8332 }
8333 #[doc = "SYSCFG user register 15"]
8334 pub fn ur15(self) -> Reg<regs::Ur15, R> {
8335 unsafe { Reg::from_ptr(self.0.add(828usize)) }
8336 }
8337 #[doc = "SYSCFG user register 16"]
8338 pub fn ur16(self) -> Reg<regs::Ur16, R> {
8339 unsafe { Reg::from_ptr(self.0.add(832usize)) }
8340 }
8341 #[doc = "SYSCFG user register 17"]
8342 pub fn ur17(self) -> Reg<regs::Ur17, R> {
8343 unsafe { Reg::from_ptr(self.0.add(836usize)) }
8344 }
8345 }
8346 pub mod regs {
8347 use crate::generic::*;
8348 #[doc = "SYSCFG user register 0"]
8349 #[repr(transparent)] 8091 #[repr(transparent)]
8350 #[derive(Copy, Clone, Eq, PartialEq)] 8092 #[derive(Copy, Clone, Eq, PartialEq)]
8351 pub struct Ur0(pub u32); 8093 pub struct Cr1Gp(pub u32);
8352 impl Ur0 { 8094 impl Cr1Gp {
8353 #[doc = "Bank Swap"] 8095 #[doc = "Counter enable"]
8354 pub const fn bks(&self) -> bool { 8096 pub const fn cen(&self) -> bool {
8355 let val = (self.0 >> 0usize) & 0x01; 8097 let val = (self.0 >> 0usize) & 0x01;
8356 val != 0 8098 val != 0
8357 } 8099 }
8358 #[doc = "Bank Swap"] 8100 #[doc = "Counter enable"]
8359 pub fn set_bks(&mut self, val: bool) { 8101 pub fn set_cen(&mut self, val: bool) {
8360 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 8102 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
8361 } 8103 }
8362 #[doc = "Readout protection"] 8104 #[doc = "Update disable"]
8363 pub const fn rdp(&self) -> u8 { 8105 pub const fn udis(&self) -> bool {
8364 let val = (self.0 >> 16usize) & 0xff; 8106 let val = (self.0 >> 1usize) & 0x01;
8365 val as u8 8107 val != 0
8366 } 8108 }
8367 #[doc = "Readout protection"] 8109 #[doc = "Update disable"]
8368 pub fn set_rdp(&mut self, val: u8) { 8110 pub fn set_udis(&mut self, val: bool) {
8369 self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); 8111 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
8370 } 8112 }
8371 } 8113 #[doc = "Update request source"]
8372 impl Default for Ur0 { 8114 pub const fn urs(&self) -> super::vals::Urs {
8373 fn default() -> Ur0 { 8115 let val = (self.0 >> 2usize) & 0x01;
8374 Ur0(0) 8116 super::vals::Urs(val as u8)
8375 } 8117 }
8376 } 8118 #[doc = "Update request source"]
8377 #[doc = "SYSCFG user register 7"] 8119 pub fn set_urs(&mut self, val: super::vals::Urs) {
8378 #[repr(transparent)] 8120 self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize);
8379 #[derive(Copy, Clone, Eq, PartialEq)]
8380 pub struct Ur7(pub u32);
8381 impl Ur7 {
8382 #[doc = "Secured area start address for bank 1"]
8383 pub const fn sa_beg_1(&self) -> u16 {
8384 let val = (self.0 >> 0usize) & 0x0fff;
8385 val as u16
8386 } 8121 }
8387 #[doc = "Secured area start address for bank 1"] 8122 #[doc = "One-pulse mode"]
8388 pub fn set_sa_beg_1(&mut self, val: u16) { 8123 pub const fn opm(&self) -> super::vals::Opm {
8389 self.0 = (self.0 & !(0x0fff << 0usize)) | (((val as u32) & 0x0fff) << 0usize); 8124 let val = (self.0 >> 3usize) & 0x01;
8125 super::vals::Opm(val as u8)
8390 } 8126 }
8391 #[doc = "Secured area end address for bank 1"] 8127 #[doc = "One-pulse mode"]
8392 pub const fn sa_end_1(&self) -> u16 { 8128 pub fn set_opm(&mut self, val: super::vals::Opm) {
8393 let val = (self.0 >> 16usize) & 0x0fff; 8129 self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize);
8394 val as u16
8395 } 8130 }
8396 #[doc = "Secured area end address for bank 1"] 8131 #[doc = "Direction"]
8397 pub fn set_sa_end_1(&mut self, val: u16) { 8132 pub const fn dir(&self) -> super::vals::Dir {
8398 self.0 = (self.0 & !(0x0fff << 16usize)) | (((val as u32) & 0x0fff) << 16usize); 8133 let val = (self.0 >> 4usize) & 0x01;
8134 super::vals::Dir(val as u8)
8399 } 8135 }
8400 } 8136 #[doc = "Direction"]
8401 impl Default for Ur7 { 8137 pub fn set_dir(&mut self, val: super::vals::Dir) {
8402 fn default() -> Ur7 { 8138 self.0 = (self.0 & !(0x01 << 4usize)) | (((val.0 as u32) & 0x01) << 4usize);
8403 Ur7(0)
8404 } 8139 }
8405 } 8140 #[doc = "Center-aligned mode selection"]
8406 #[doc = "SYSCFG user register 5"] 8141 pub const fn cms(&self) -> super::vals::Cms {
8407 #[repr(transparent)] 8142 let val = (self.0 >> 5usize) & 0x03;
8408 #[derive(Copy, Clone, Eq, PartialEq)] 8143 super::vals::Cms(val as u8)
8409 pub struct Ur5(pub u32);
8410 impl Ur5 {
8411 #[doc = "Mass erase secured area disabled for bank 1"]
8412 pub const fn mesad_1(&self) -> bool {
8413 let val = (self.0 >> 0usize) & 0x01;
8414 val != 0
8415 } 8144 }
8416 #[doc = "Mass erase secured area disabled for bank 1"] 8145 #[doc = "Center-aligned mode selection"]
8417 pub fn set_mesad_1(&mut self, val: bool) { 8146 pub fn set_cms(&mut self, val: super::vals::Cms) {
8418 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 8147 self.0 = (self.0 & !(0x03 << 5usize)) | (((val.0 as u32) & 0x03) << 5usize);
8419 } 8148 }
8420 #[doc = "Write protection for flash bank 1"] 8149 #[doc = "Auto-reload preload enable"]
8421 pub const fn wrpn_1(&self) -> u8 { 8150 pub const fn arpe(&self) -> super::vals::Arpe {
8422 let val = (self.0 >> 16usize) & 0xff; 8151 let val = (self.0 >> 7usize) & 0x01;
8423 val as u8 8152 super::vals::Arpe(val as u8)
8424 } 8153 }
8425 #[doc = "Write protection for flash bank 1"] 8154 #[doc = "Auto-reload preload enable"]
8426 pub fn set_wrpn_1(&mut self, val: u8) { 8155 pub fn set_arpe(&mut self, val: super::vals::Arpe) {
8427 self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); 8156 self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize);
8157 }
8158 #[doc = "Clock division"]
8159 pub const fn ckd(&self) -> super::vals::Ckd {
8160 let val = (self.0 >> 8usize) & 0x03;
8161 super::vals::Ckd(val as u8)
8162 }
8163 #[doc = "Clock division"]
8164 pub fn set_ckd(&mut self, val: super::vals::Ckd) {
8165 self.0 = (self.0 & !(0x03 << 8usize)) | (((val.0 as u32) & 0x03) << 8usize);
8428 } 8166 }
8429 } 8167 }
8430 impl Default for Ur5 { 8168 impl Default for Cr1Gp {
8431 fn default() -> Ur5 { 8169 fn default() -> Cr1Gp {
8432 Ur5(0) 8170 Cr1Gp(0)
8433 } 8171 }
8434 } 8172 }
8435 #[doc = "SYSCFG user register 15"] 8173 #[doc = "prescaler"]
8436 #[repr(transparent)] 8174 #[repr(transparent)]
8437 #[derive(Copy, Clone, Eq, PartialEq)] 8175 #[derive(Copy, Clone, Eq, PartialEq)]
8438 pub struct Ur15(pub u32); 8176 pub struct Psc(pub u32);
8439 impl Ur15 { 8177 impl Psc {
8440 #[doc = "Freeze independent watchdog in Standby mode"] 8178 #[doc = "Prescaler value"]
8441 pub const fn fziwdgstb(&self) -> bool { 8179 pub const fn psc(&self) -> u16 {
8442 let val = (self.0 >> 16usize) & 0x01; 8180 let val = (self.0 >> 0usize) & 0xffff;
8443 val != 0 8181 val as u16
8444 } 8182 }
8445 #[doc = "Freeze independent watchdog in Standby mode"] 8183 #[doc = "Prescaler value"]
8446 pub fn set_fziwdgstb(&mut self, val: bool) { 8184 pub fn set_psc(&mut self, val: u16) {
8447 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); 8185 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
8448 } 8186 }
8449 } 8187 }
8450 impl Default for Ur15 { 8188 impl Default for Psc {
8451 fn default() -> Ur15 { 8189 fn default() -> Psc {
8452 Ur15(0) 8190 Psc(0)
8453 } 8191 }
8454 } 8192 }
8455 #[doc = "SYSCFG user register 13"] 8193 #[doc = "capture/compare enable register"]
8456 #[repr(transparent)] 8194 #[repr(transparent)]
8457 #[derive(Copy, Clone, Eq, PartialEq)] 8195 #[derive(Copy, Clone, Eq, PartialEq)]
8458 pub struct Ur13(pub u32); 8196 pub struct CcerGp(pub u32);
8459 impl Ur13 { 8197 impl CcerGp {
8460 #[doc = "Secured DTCM RAM Size"] 8198 #[doc = "Capture/Compare 1 output enable"]
8461 pub const fn sdrs(&self) -> u8 { 8199 pub fn cce(&self, n: usize) -> bool {
8462 let val = (self.0 >> 0usize) & 0x03; 8200 assert!(n < 4usize);
8463 val as u8 8201 let offs = 0usize + n * 4usize;
8202 let val = (self.0 >> offs) & 0x01;
8203 val != 0
8464 } 8204 }
8465 #[doc = "Secured DTCM RAM Size"] 8205 #[doc = "Capture/Compare 1 output enable"]
8466 pub fn set_sdrs(&mut self, val: u8) { 8206 pub fn set_cce(&mut self, n: usize, val: bool) {
8467 self.0 = (self.0 & !(0x03 << 0usize)) | (((val as u32) & 0x03) << 0usize); 8207 assert!(n < 4usize);
8208 let offs = 0usize + n * 4usize;
8209 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
8468 } 8210 }
8469 #[doc = "D1 Standby reset"] 8211 #[doc = "Capture/Compare 1 output Polarity"]
8470 pub const fn d1sbrst(&self) -> bool { 8212 pub fn ccp(&self, n: usize) -> bool {
8471 let val = (self.0 >> 16usize) & 0x01; 8213 assert!(n < 4usize);
8214 let offs = 1usize + n * 4usize;
8215 let val = (self.0 >> offs) & 0x01;
8472 val != 0 8216 val != 0
8473 } 8217 }
8474 #[doc = "D1 Standby reset"] 8218 #[doc = "Capture/Compare 1 output Polarity"]
8475 pub fn set_d1sbrst(&mut self, val: bool) { 8219 pub fn set_ccp(&mut self, n: usize, val: bool) {
8476 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); 8220 assert!(n < 4usize);
8221 let offs = 1usize + n * 4usize;
8222 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
8223 }
8224 #[doc = "Capture/Compare 1 output Polarity"]
8225 pub fn ccnp(&self, n: usize) -> bool {
8226 assert!(n < 4usize);
8227 let offs = 3usize + n * 4usize;
8228 let val = (self.0 >> offs) & 0x01;
8229 val != 0
8230 }
8231 #[doc = "Capture/Compare 1 output Polarity"]
8232 pub fn set_ccnp(&mut self, n: usize, val: bool) {
8233 assert!(n < 4usize);
8234 let offs = 3usize + n * 4usize;
8235 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
8477 } 8236 }
8478 } 8237 }
8479 impl Default for Ur13 { 8238 impl Default for CcerGp {
8480 fn default() -> Ur13 { 8239 fn default() -> CcerGp {
8481 Ur13(0) 8240 CcerGp(0)
8482 } 8241 }
8483 } 8242 }
8484 #[doc = "SYSCFG user register 14"] 8243 #[doc = "DMA/Interrupt enable register"]
8485 #[repr(transparent)] 8244 #[repr(transparent)]
8486 #[derive(Copy, Clone, Eq, PartialEq)] 8245 #[derive(Copy, Clone, Eq, PartialEq)]
8487 pub struct Ur14(pub u32); 8246 pub struct DierAdv(pub u32);
8488 impl Ur14 { 8247 impl DierAdv {
8489 #[doc = "D1 Stop Reset"] 8248 #[doc = "Update interrupt enable"]
8490 pub const fn d1stprst(&self) -> bool { 8249 pub const fn uie(&self) -> bool {
8491 let val = (self.0 >> 0usize) & 0x01; 8250 let val = (self.0 >> 0usize) & 0x01;
8492 val != 0 8251 val != 0
8493 } 8252 }
8494 #[doc = "D1 Stop Reset"] 8253 #[doc = "Update interrupt enable"]
8495 pub fn set_d1stprst(&mut self, val: bool) { 8254 pub fn set_uie(&mut self, val: bool) {
8496 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 8255 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
8497 } 8256 }
8498 } 8257 #[doc = "Capture/Compare 1 interrupt enable"]
8499 impl Default for Ur14 { 8258 pub fn ccie(&self, n: usize) -> bool {
8500 fn default() -> Ur14 { 8259 assert!(n < 4usize);
8501 Ur14(0) 8260 let offs = 1usize + n * 1usize;
8261 let val = (self.0 >> offs) & 0x01;
8262 val != 0
8502 } 8263 }
8503 } 8264 #[doc = "Capture/Compare 1 interrupt enable"]
8504 #[doc = "SYSCFG user register 8"] 8265 pub fn set_ccie(&mut self, n: usize, val: bool) {
8505 #[repr(transparent)] 8266 assert!(n < 4usize);
8506 #[derive(Copy, Clone, Eq, PartialEq)] 8267 let offs = 1usize + n * 1usize;
8507 pub struct Ur8(pub u32); 8268 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
8508 impl Ur8 { 8269 }
8509 #[doc = "Mass erase protected area disabled for bank 2"] 8270 #[doc = "COM interrupt enable"]
8510 pub const fn mepad_2(&self) -> bool { 8271 pub const fn comie(&self) -> bool {
8511 let val = (self.0 >> 0usize) & 0x01; 8272 let val = (self.0 >> 5usize) & 0x01;
8512 val != 0 8273 val != 0
8513 } 8274 }
8514 #[doc = "Mass erase protected area disabled for bank 2"] 8275 #[doc = "COM interrupt enable"]
8515 pub fn set_mepad_2(&mut self, val: bool) { 8276 pub fn set_comie(&mut self, val: bool) {
8516 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 8277 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
8517 } 8278 }
8518 #[doc = "Mass erase secured area disabled for bank 2"] 8279 #[doc = "Trigger interrupt enable"]
8519 pub const fn mesad_2(&self) -> bool { 8280 pub const fn tie(&self) -> bool {
8520 let val = (self.0 >> 16usize) & 0x01; 8281 let val = (self.0 >> 6usize) & 0x01;
8521 val != 0 8282 val != 0
8522 } 8283 }
8523 #[doc = "Mass erase secured area disabled for bank 2"] 8284 #[doc = "Trigger interrupt enable"]
8524 pub fn set_mesad_2(&mut self, val: bool) { 8285 pub fn set_tie(&mut self, val: bool) {
8525 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); 8286 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
8526 } 8287 }
8527 } 8288 #[doc = "Break interrupt enable"]
8528 impl Default for Ur8 { 8289 pub const fn bie(&self) -> bool {
8529 fn default() -> Ur8 { 8290 let val = (self.0 >> 7usize) & 0x01;
8530 Ur8(0) 8291 val != 0
8531 } 8292 }
8532 } 8293 #[doc = "Break interrupt enable"]
8533 #[doc = "SYSCFG user register 10"] 8294 pub fn set_bie(&mut self, val: bool) {
8534 #[repr(transparent)] 8295 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
8535 #[derive(Copy, Clone, Eq, PartialEq)]
8536 pub struct Ur10(pub u32);
8537 impl Ur10 {
8538 #[doc = "Protected area end address for bank 2"]
8539 pub const fn pa_end_2(&self) -> u16 {
8540 let val = (self.0 >> 0usize) & 0x0fff;
8541 val as u16
8542 } 8296 }
8543 #[doc = "Protected area end address for bank 2"] 8297 #[doc = "Update DMA request enable"]
8544 pub fn set_pa_end_2(&mut self, val: u16) { 8298 pub const fn ude(&self) -> bool {
8545 self.0 = (self.0 & !(0x0fff << 0usize)) | (((val as u32) & 0x0fff) << 0usize); 8299 let val = (self.0 >> 8usize) & 0x01;
8300 val != 0
8546 } 8301 }
8547 #[doc = "Secured area start address for bank 2"] 8302 #[doc = "Update DMA request enable"]
8548 pub const fn sa_beg_2(&self) -> u16 { 8303 pub fn set_ude(&mut self, val: bool) {
8549 let val = (self.0 >> 16usize) & 0x0fff; 8304 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
8550 val as u16
8551 } 8305 }
8552 #[doc = "Secured area start address for bank 2"] 8306 #[doc = "Capture/Compare 1 DMA request enable"]
8553 pub fn set_sa_beg_2(&mut self, val: u16) { 8307 pub fn ccde(&self, n: usize) -> bool {
8554 self.0 = (self.0 & !(0x0fff << 16usize)) | (((val as u32) & 0x0fff) << 16usize); 8308 assert!(n < 4usize);
8309 let offs = 9usize + n * 1usize;
8310 let val = (self.0 >> offs) & 0x01;
8311 val != 0
8555 } 8312 }
8556 } 8313 #[doc = "Capture/Compare 1 DMA request enable"]
8557 impl Default for Ur10 { 8314 pub fn set_ccde(&mut self, n: usize, val: bool) {
8558 fn default() -> Ur10 { 8315 assert!(n < 4usize);
8559 Ur10(0) 8316 let offs = 9usize + n * 1usize;
8317 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
8560 } 8318 }
8561 } 8319 #[doc = "COM DMA request enable"]
8562 #[doc = "SYSCFG user register 16"] 8320 pub const fn comde(&self) -> bool {
8563 #[repr(transparent)] 8321 let val = (self.0 >> 13usize) & 0x01;
8564 #[derive(Copy, Clone, Eq, PartialEq)]
8565 pub struct Ur16(pub u32);
8566 impl Ur16 {
8567 #[doc = "Freeze independent watchdog in Stop mode"]
8568 pub const fn fziwdgstp(&self) -> bool {
8569 let val = (self.0 >> 0usize) & 0x01;
8570 val != 0 8322 val != 0
8571 } 8323 }
8572 #[doc = "Freeze independent watchdog in Stop mode"] 8324 #[doc = "COM DMA request enable"]
8573 pub fn set_fziwdgstp(&mut self, val: bool) { 8325 pub fn set_comde(&mut self, val: bool) {
8574 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 8326 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize);
8575 } 8327 }
8576 #[doc = "Private key programmed"] 8328 #[doc = "Trigger DMA request enable"]
8577 pub const fn pkp(&self) -> bool { 8329 pub const fn tde(&self) -> bool {
8578 let val = (self.0 >> 16usize) & 0x01; 8330 let val = (self.0 >> 14usize) & 0x01;
8579 val != 0 8331 val != 0
8580 } 8332 }
8581 #[doc = "Private key programmed"] 8333 #[doc = "Trigger DMA request enable"]
8582 pub fn set_pkp(&mut self, val: bool) { 8334 pub fn set_tde(&mut self, val: bool) {
8583 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); 8335 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize);
8584 } 8336 }
8585 } 8337 }
8586 impl Default for Ur16 { 8338 impl Default for DierAdv {
8587 fn default() -> Ur16 { 8339 fn default() -> DierAdv {
8588 Ur16(0) 8340 DierAdv(0)
8589 } 8341 }
8590 } 8342 }
8591 #[doc = "SYSCFG user register 11"] 8343 #[doc = "slave mode control register"]
8592 #[repr(transparent)] 8344 #[repr(transparent)]
8593 #[derive(Copy, Clone, Eq, PartialEq)] 8345 #[derive(Copy, Clone, Eq, PartialEq)]
8594 pub struct Ur11(pub u32); 8346 pub struct Smcr(pub u32);
8595 impl Ur11 { 8347 impl Smcr {
8596 #[doc = "Secured area end address for bank 2"] 8348 #[doc = "Slave mode selection"]
8597 pub const fn sa_end_2(&self) -> u16 { 8349 pub const fn sms(&self) -> super::vals::Sms {
8598 let val = (self.0 >> 0usize) & 0x0fff; 8350 let val = (self.0 >> 0usize) & 0x07;
8599 val as u16 8351 super::vals::Sms(val as u8)
8600 } 8352 }
8601 #[doc = "Secured area end address for bank 2"] 8353 #[doc = "Slave mode selection"]
8602 pub fn set_sa_end_2(&mut self, val: u16) { 8354 pub fn set_sms(&mut self, val: super::vals::Sms) {
8603 self.0 = (self.0 & !(0x0fff << 0usize)) | (((val as u32) & 0x0fff) << 0usize); 8355 self.0 = (self.0 & !(0x07 << 0usize)) | (((val.0 as u32) & 0x07) << 0usize);
8604 } 8356 }
8605 #[doc = "Independent Watchdog 1 mode"] 8357 #[doc = "Trigger selection"]
8606 pub const fn iwdg1m(&self) -> bool { 8358 pub const fn ts(&self) -> super::vals::Ts {
8607 let val = (self.0 >> 16usize) & 0x01; 8359 let val = (self.0 >> 4usize) & 0x07;
8608 val != 0 8360 super::vals::Ts(val as u8)
8609 } 8361 }
8610 #[doc = "Independent Watchdog 1 mode"] 8362 #[doc = "Trigger selection"]
8611 pub fn set_iwdg1m(&mut self, val: bool) { 8363 pub fn set_ts(&mut self, val: super::vals::Ts) {
8612 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); 8364 self.0 = (self.0 & !(0x07 << 4usize)) | (((val.0 as u32) & 0x07) << 4usize);
8613 } 8365 }
8614 } 8366 #[doc = "Master/Slave mode"]
8615 impl Default for Ur11 { 8367 pub const fn msm(&self) -> super::vals::Msm {
8616 fn default() -> Ur11 { 8368 let val = (self.0 >> 7usize) & 0x01;
8617 Ur11(0) 8369 super::vals::Msm(val as u8)
8618 } 8370 }
8619 } 8371 #[doc = "Master/Slave mode"]
8620 #[doc = "SYSCFG user register 3"] 8372 pub fn set_msm(&mut self, val: super::vals::Msm) {
8621 #[repr(transparent)] 8373 self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize);
8622 #[derive(Copy, Clone, Eq, PartialEq)]
8623 pub struct Ur3(pub u32);
8624 impl Ur3 {
8625 #[doc = "Boot Address 1"]
8626 pub const fn boot_add1(&self) -> u16 {
8627 let val = (self.0 >> 16usize) & 0xffff;
8628 val as u16
8629 } 8374 }
8630 #[doc = "Boot Address 1"] 8375 #[doc = "External trigger filter"]
8631 pub fn set_boot_add1(&mut self, val: u16) { 8376 pub const fn etf(&self) -> super::vals::Etf {
8632 self.0 = (self.0 & !(0xffff << 16usize)) | (((val as u32) & 0xffff) << 16usize); 8377 let val = (self.0 >> 8usize) & 0x0f;
8378 super::vals::Etf(val as u8)
8379 }
8380 #[doc = "External trigger filter"]
8381 pub fn set_etf(&mut self, val: super::vals::Etf) {
8382 self.0 = (self.0 & !(0x0f << 8usize)) | (((val.0 as u32) & 0x0f) << 8usize);
8383 }
8384 #[doc = "External trigger prescaler"]
8385 pub const fn etps(&self) -> super::vals::Etps {
8386 let val = (self.0 >> 12usize) & 0x03;
8387 super::vals::Etps(val as u8)
8388 }
8389 #[doc = "External trigger prescaler"]
8390 pub fn set_etps(&mut self, val: super::vals::Etps) {
8391 self.0 = (self.0 & !(0x03 << 12usize)) | (((val.0 as u32) & 0x03) << 12usize);
8392 }
8393 #[doc = "External clock enable"]
8394 pub const fn ece(&self) -> super::vals::Ece {
8395 let val = (self.0 >> 14usize) & 0x01;
8396 super::vals::Ece(val as u8)
8397 }
8398 #[doc = "External clock enable"]
8399 pub fn set_ece(&mut self, val: super::vals::Ece) {
8400 self.0 = (self.0 & !(0x01 << 14usize)) | (((val.0 as u32) & 0x01) << 14usize);
8401 }
8402 #[doc = "External trigger polarity"]
8403 pub const fn etp(&self) -> super::vals::Etp {
8404 let val = (self.0 >> 15usize) & 0x01;
8405 super::vals::Etp(val as u8)
8406 }
8407 #[doc = "External trigger polarity"]
8408 pub fn set_etp(&mut self, val: super::vals::Etp) {
8409 self.0 = (self.0 & !(0x01 << 15usize)) | (((val.0 as u32) & 0x01) << 15usize);
8633 } 8410 }
8634 } 8411 }
8635 impl Default for Ur3 { 8412 impl Default for Smcr {
8636 fn default() -> Ur3 { 8413 fn default() -> Smcr {
8637 Ur3(0) 8414 Smcr(0)
8638 } 8415 }
8639 } 8416 }
8640 #[doc = "SYSCFG user register 4"] 8417 #[doc = "DMA control register"]
8641 #[repr(transparent)] 8418 #[repr(transparent)]
8642 #[derive(Copy, Clone, Eq, PartialEq)] 8419 #[derive(Copy, Clone, Eq, PartialEq)]
8643 pub struct Ur4(pub u32); 8420 pub struct Dcr(pub u32);
8644 impl Ur4 { 8421 impl Dcr {
8645 #[doc = "Mass Erase Protected Area Disabled for bank 1"] 8422 #[doc = "DMA base address"]
8646 pub const fn mepad_1(&self) -> bool { 8423 pub const fn dba(&self) -> u8 {
8647 let val = (self.0 >> 16usize) & 0x01; 8424 let val = (self.0 >> 0usize) & 0x1f;
8648 val != 0 8425 val as u8
8649 } 8426 }
8650 #[doc = "Mass Erase Protected Area Disabled for bank 1"] 8427 #[doc = "DMA base address"]
8651 pub fn set_mepad_1(&mut self, val: bool) { 8428 pub fn set_dba(&mut self, val: u8) {
8652 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); 8429 self.0 = (self.0 & !(0x1f << 0usize)) | (((val as u32) & 0x1f) << 0usize);
8430 }
8431 #[doc = "DMA burst length"]
8432 pub const fn dbl(&self) -> u8 {
8433 let val = (self.0 >> 8usize) & 0x1f;
8434 val as u8
8435 }
8436 #[doc = "DMA burst length"]
8437 pub fn set_dbl(&mut self, val: u8) {
8438 self.0 = (self.0 & !(0x1f << 8usize)) | (((val as u32) & 0x1f) << 8usize);
8653 } 8439 }
8654 } 8440 }
8655 impl Default for Ur4 { 8441 impl Default for Dcr {
8656 fn default() -> Ur4 { 8442 fn default() -> Dcr {
8657 Ur4(0) 8443 Dcr(0)
8658 } 8444 }
8659 } 8445 }
8660 #[doc = "SYSCFG package register"] 8446 #[doc = "capture/compare register 1"]
8661 #[repr(transparent)] 8447 #[repr(transparent)]
8662 #[derive(Copy, Clone, Eq, PartialEq)] 8448 #[derive(Copy, Clone, Eq, PartialEq)]
8663 pub struct Pkgr(pub u32); 8449 pub struct Ccr32(pub u32);
8664 impl Pkgr { 8450 impl Ccr32 {
8665 #[doc = "Package"] 8451 #[doc = "Capture/Compare 1 value"]
8666 pub const fn pkg(&self) -> u8 { 8452 pub const fn ccr(&self) -> u32 {
8667 let val = (self.0 >> 0usize) & 0x0f; 8453 let val = (self.0 >> 0usize) & 0xffff_ffff;
8668 val as u8 8454 val as u32
8669 } 8455 }
8670 #[doc = "Package"] 8456 #[doc = "Capture/Compare 1 value"]
8671 pub fn set_pkg(&mut self, val: u8) { 8457 pub fn set_ccr(&mut self, val: u32) {
8672 self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); 8458 self.0 =
8459 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
8673 } 8460 }
8674 } 8461 }
8675 impl Default for Pkgr { 8462 impl Default for Ccr32 {
8676 fn default() -> Pkgr { 8463 fn default() -> Ccr32 {
8677 Pkgr(0) 8464 Ccr32(0)
8678 } 8465 }
8679 } 8466 }
8680 #[doc = "SYSCFG power control register"] 8467 #[doc = "auto-reload register"]
8681 #[repr(transparent)] 8468 #[repr(transparent)]
8682 #[derive(Copy, Clone, Eq, PartialEq)] 8469 #[derive(Copy, Clone, Eq, PartialEq)]
8683 pub struct Pwrcr(pub u32); 8470 pub struct Arr16(pub u32);
8684 impl Pwrcr { 8471 impl Arr16 {
8685 #[doc = "Overdrive enable"] 8472 #[doc = "Auto-reload value"]
8686 pub const fn oden(&self) -> u8 { 8473 pub const fn arr(&self) -> u16 {
8687 let val = (self.0 >> 0usize) & 0x0f; 8474 let val = (self.0 >> 0usize) & 0xffff;
8688 val as u8 8475 val as u16
8689 } 8476 }
8690 #[doc = "Overdrive enable"] 8477 #[doc = "Auto-reload value"]
8691 pub fn set_oden(&mut self, val: u8) { 8478 pub fn set_arr(&mut self, val: u16) {
8692 self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); 8479 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
8693 } 8480 }
8694 } 8481 }
8695 impl Default for Pwrcr { 8482 impl Default for Arr16 {
8696 fn default() -> Pwrcr { 8483 fn default() -> Arr16 {
8697 Pwrcr(0) 8484 Arr16(0)
8698 } 8485 }
8699 } 8486 }
8700 #[doc = "SYSCFG user register 12"] 8487 #[doc = "DMA address for full transfer"]
8701 #[repr(transparent)] 8488 #[repr(transparent)]
8702 #[derive(Copy, Clone, Eq, PartialEq)] 8489 #[derive(Copy, Clone, Eq, PartialEq)]
8703 pub struct Ur12(pub u32); 8490 pub struct Dmar(pub u32);
8704 impl Ur12 { 8491 impl Dmar {
8705 #[doc = "Secure mode"] 8492 #[doc = "DMA register for burst accesses"]
8706 pub const fn secure(&self) -> bool { 8493 pub const fn dmab(&self) -> u16 {
8707 let val = (self.0 >> 16usize) & 0x01; 8494 let val = (self.0 >> 0usize) & 0xffff;
8708 val != 0 8495 val as u16
8709 } 8496 }
8710 #[doc = "Secure mode"] 8497 #[doc = "DMA register for burst accesses"]
8711 pub fn set_secure(&mut self, val: bool) { 8498 pub fn set_dmab(&mut self, val: u16) {
8712 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); 8499 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
8713 } 8500 }
8714 } 8501 }
8715 impl Default for Ur12 { 8502 impl Default for Dmar {
8716 fn default() -> Ur12 { 8503 fn default() -> Dmar {
8717 Ur12(0) 8504 Dmar(0)
8718 } 8505 }
8719 } 8506 }
8720 #[doc = "SYSCFG compensation cell code register"] 8507 #[doc = "counter"]
8721 #[repr(transparent)] 8508 #[repr(transparent)]
8722 #[derive(Copy, Clone, Eq, PartialEq)] 8509 #[derive(Copy, Clone, Eq, PartialEq)]
8723 pub struct Cccr(pub u32); 8510 pub struct Cnt32(pub u32);
8724 impl Cccr { 8511 impl Cnt32 {
8725 #[doc = "NMOS compensation code"] 8512 #[doc = "counter value"]
8726 pub const fn ncc(&self) -> u8 { 8513 pub const fn cnt(&self) -> u32 {
8727 let val = (self.0 >> 0usize) & 0x0f; 8514 let val = (self.0 >> 0usize) & 0xffff_ffff;
8728 val as u8 8515 val as u32
8729 }
8730 #[doc = "NMOS compensation code"]
8731 pub fn set_ncc(&mut self, val: u8) {
8732 self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize);
8733 }
8734 #[doc = "PMOS compensation code"]
8735 pub const fn pcc(&self) -> u8 {
8736 let val = (self.0 >> 4usize) & 0x0f;
8737 val as u8
8738 } 8516 }
8739 #[doc = "PMOS compensation code"] 8517 #[doc = "counter value"]
8740 pub fn set_pcc(&mut self, val: u8) { 8518 pub fn set_cnt(&mut self, val: u32) {
8741 self.0 = (self.0 & !(0x0f << 4usize)) | (((val as u32) & 0x0f) << 4usize); 8519 self.0 =
8520 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
8742 } 8521 }
8743 } 8522 }
8744 impl Default for Cccr { 8523 impl Default for Cnt32 {
8745 fn default() -> Cccr { 8524 fn default() -> Cnt32 {
8746 Cccr(0) 8525 Cnt32(0)
8747 } 8526 }
8748 } 8527 }
8749 #[doc = "peripheral mode configuration register"] 8528 #[doc = "break and dead-time register"]
8750 #[repr(transparent)] 8529 #[repr(transparent)]
8751 #[derive(Copy, Clone, Eq, PartialEq)] 8530 #[derive(Copy, Clone, Eq, PartialEq)]
8752 pub struct Pmcr(pub u32); 8531 pub struct Bdtr(pub u32);
8753 impl Pmcr { 8532 impl Bdtr {
8754 #[doc = "I2C1 Fm+"] 8533 #[doc = "Dead-time generator setup"]
8755 pub const fn i2c1fmp(&self) -> bool { 8534 pub const fn dtg(&self) -> u8 {
8756 let val = (self.0 >> 0usize) & 0x01; 8535 let val = (self.0 >> 0usize) & 0xff;
8757 val != 0 8536 val as u8
8758 } 8537 }
8759 #[doc = "I2C1 Fm+"] 8538 #[doc = "Dead-time generator setup"]
8760 pub fn set_i2c1fmp(&mut self, val: bool) { 8539 pub fn set_dtg(&mut self, val: u8) {
8761 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 8540 self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize);
8762 } 8541 }
8763 #[doc = "I2C2 Fm+"] 8542 #[doc = "Lock configuration"]
8764 pub const fn i2c2fmp(&self) -> bool { 8543 pub const fn lock(&self) -> u8 {
8765 let val = (self.0 >> 1usize) & 0x01; 8544 let val = (self.0 >> 8usize) & 0x03;
8766 val != 0 8545 val as u8
8767 } 8546 }
8768 #[doc = "I2C2 Fm+"] 8547 #[doc = "Lock configuration"]
8769 pub fn set_i2c2fmp(&mut self, val: bool) { 8548 pub fn set_lock(&mut self, val: u8) {
8770 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); 8549 self.0 = (self.0 & !(0x03 << 8usize)) | (((val as u32) & 0x03) << 8usize);
8771 } 8550 }
8772 #[doc = "I2C3 Fm+"] 8551 #[doc = "Off-state selection for Idle mode"]
8773 pub const fn i2c3fmp(&self) -> bool { 8552 pub const fn ossi(&self) -> super::vals::Ossi {
8774 let val = (self.0 >> 2usize) & 0x01; 8553 let val = (self.0 >> 10usize) & 0x01;
8775 val != 0 8554 super::vals::Ossi(val as u8)
8776 } 8555 }
8777 #[doc = "I2C3 Fm+"] 8556 #[doc = "Off-state selection for Idle mode"]
8778 pub fn set_i2c3fmp(&mut self, val: bool) { 8557 pub fn set_ossi(&mut self, val: super::vals::Ossi) {
8779 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); 8558 self.0 = (self.0 & !(0x01 << 10usize)) | (((val.0 as u32) & 0x01) << 10usize);
8780 } 8559 }
8781 #[doc = "I2C4 Fm+"] 8560 #[doc = "Off-state selection for Run mode"]
8782 pub const fn i2c4fmp(&self) -> bool { 8561 pub const fn ossr(&self) -> super::vals::Ossr {
8783 let val = (self.0 >> 3usize) & 0x01; 8562 let val = (self.0 >> 11usize) & 0x01;
8784 val != 0 8563 super::vals::Ossr(val as u8)
8785 } 8564 }
8786 #[doc = "I2C4 Fm+"] 8565 #[doc = "Off-state selection for Run mode"]
8787 pub fn set_i2c4fmp(&mut self, val: bool) { 8566 pub fn set_ossr(&mut self, val: super::vals::Ossr) {
8788 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); 8567 self.0 = (self.0 & !(0x01 << 11usize)) | (((val.0 as u32) & 0x01) << 11usize);
8789 } 8568 }
8790 #[doc = "PB(6) Fm+"] 8569 #[doc = "Break enable"]
8791 pub const fn pb6fmp(&self) -> bool { 8570 pub const fn bke(&self) -> bool {
8792 let val = (self.0 >> 4usize) & 0x01; 8571 let val = (self.0 >> 12usize) & 0x01;
8793 val != 0 8572 val != 0
8794 } 8573 }
8795 #[doc = "PB(6) Fm+"] 8574 #[doc = "Break enable"]
8796 pub fn set_pb6fmp(&mut self, val: bool) { 8575 pub fn set_bke(&mut self, val: bool) {
8797 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); 8576 self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize);
8798 } 8577 }
8799 #[doc = "PB(7) Fast Mode Plus"] 8578 #[doc = "Break polarity"]
8800 pub const fn pb7fmp(&self) -> bool { 8579 pub const fn bkp(&self) -> bool {
8801 let val = (self.0 >> 5usize) & 0x01; 8580 let val = (self.0 >> 13usize) & 0x01;
8802 val != 0 8581 val != 0
8803 } 8582 }
8804 #[doc = "PB(7) Fast Mode Plus"] 8583 #[doc = "Break polarity"]
8805 pub fn set_pb7fmp(&mut self, val: bool) { 8584 pub fn set_bkp(&mut self, val: bool) {
8806 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); 8585 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize);
8807 } 8586 }
8808 #[doc = "PB(8) Fast Mode Plus"] 8587 #[doc = "Automatic output enable"]
8809 pub const fn pb8fmp(&self) -> bool { 8588 pub const fn aoe(&self) -> bool {
8810 let val = (self.0 >> 6usize) & 0x01; 8589 let val = (self.0 >> 14usize) & 0x01;
8811 val != 0 8590 val != 0
8812 } 8591 }
8813 #[doc = "PB(8) Fast Mode Plus"] 8592 #[doc = "Automatic output enable"]
8814 pub fn set_pb8fmp(&mut self, val: bool) { 8593 pub fn set_aoe(&mut self, val: bool) {
8815 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); 8594 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize);
8816 } 8595 }
8817 #[doc = "PB(9) Fm+"] 8596 #[doc = "Main output enable"]
8818 pub const fn pb9fmp(&self) -> bool { 8597 pub const fn moe(&self) -> bool {
8819 let val = (self.0 >> 7usize) & 0x01; 8598 let val = (self.0 >> 15usize) & 0x01;
8820 val != 0 8599 val != 0
8821 } 8600 }
8822 #[doc = "PB(9) Fm+"] 8601 #[doc = "Main output enable"]
8823 pub fn set_pb9fmp(&mut self, val: bool) { 8602 pub fn set_moe(&mut self, val: bool) {
8824 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); 8603 self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize);
8825 }
8826 #[doc = "Booster Enable"]
8827 pub const fn booste(&self) -> bool {
8828 let val = (self.0 >> 8usize) & 0x01;
8829 val != 0
8830 } 8604 }
8831 #[doc = "Booster Enable"] 8605 }
8832 pub fn set_booste(&mut self, val: bool) { 8606 impl Default for Bdtr {
8833 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); 8607 fn default() -> Bdtr {
8608 Bdtr(0)
8834 } 8609 }
8835 #[doc = "Analog switch supply voltage selection"] 8610 }
8836 pub const fn boostvddsel(&self) -> bool { 8611 #[doc = "status register"]
8837 let val = (self.0 >> 9usize) & 0x01; 8612 #[repr(transparent)]
8613 #[derive(Copy, Clone, Eq, PartialEq)]
8614 pub struct SrAdv(pub u32);
8615 impl SrAdv {
8616 #[doc = "Update interrupt flag"]
8617 pub const fn uif(&self) -> bool {
8618 let val = (self.0 >> 0usize) & 0x01;
8838 val != 0 8619 val != 0
8839 } 8620 }
8840 #[doc = "Analog switch supply voltage selection"] 8621 #[doc = "Update interrupt flag"]
8841 pub fn set_boostvddsel(&mut self, val: bool) { 8622 pub fn set_uif(&mut self, val: bool) {
8842 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); 8623 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
8843 }
8844 #[doc = "Ethernet PHY Interface Selection"]
8845 pub const fn epis(&self) -> u8 {
8846 let val = (self.0 >> 21usize) & 0x07;
8847 val as u8
8848 }
8849 #[doc = "Ethernet PHY Interface Selection"]
8850 pub fn set_epis(&mut self, val: u8) {
8851 self.0 = (self.0 & !(0x07 << 21usize)) | (((val as u32) & 0x07) << 21usize);
8852 } 8624 }
8853 #[doc = "PA0 Switch Open"] 8625 #[doc = "Capture/compare 1 interrupt flag"]
8854 pub const fn pa0so(&self) -> bool { 8626 pub fn ccif(&self, n: usize) -> bool {
8855 let val = (self.0 >> 24usize) & 0x01; 8627 assert!(n < 4usize);
8628 let offs = 1usize + n * 1usize;
8629 let val = (self.0 >> offs) & 0x01;
8856 val != 0 8630 val != 0
8857 } 8631 }
8858 #[doc = "PA0 Switch Open"] 8632 #[doc = "Capture/compare 1 interrupt flag"]
8859 pub fn set_pa0so(&mut self, val: bool) { 8633 pub fn set_ccif(&mut self, n: usize, val: bool) {
8860 self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize); 8634 assert!(n < 4usize);
8635 let offs = 1usize + n * 1usize;
8636 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
8861 } 8637 }
8862 #[doc = "PA1 Switch Open"] 8638 #[doc = "COM interrupt flag"]
8863 pub const fn pa1so(&self) -> bool { 8639 pub const fn comif(&self) -> bool {
8864 let val = (self.0 >> 25usize) & 0x01; 8640 let val = (self.0 >> 5usize) & 0x01;
8865 val != 0 8641 val != 0
8866 } 8642 }
8867 #[doc = "PA1 Switch Open"] 8643 #[doc = "COM interrupt flag"]
8868 pub fn set_pa1so(&mut self, val: bool) { 8644 pub fn set_comif(&mut self, val: bool) {
8869 self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize); 8645 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
8870 } 8646 }
8871 #[doc = "PC2 Switch Open"] 8647 #[doc = "Trigger interrupt flag"]
8872 pub const fn pc2so(&self) -> bool { 8648 pub const fn tif(&self) -> bool {
8873 let val = (self.0 >> 26usize) & 0x01; 8649 let val = (self.0 >> 6usize) & 0x01;
8874 val != 0 8650 val != 0
8875 } 8651 }
8876 #[doc = "PC2 Switch Open"] 8652 #[doc = "Trigger interrupt flag"]
8877 pub fn set_pc2so(&mut self, val: bool) { 8653 pub fn set_tif(&mut self, val: bool) {
8878 self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize); 8654 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
8879 } 8655 }
8880 #[doc = "PC3 Switch Open"] 8656 #[doc = "Break interrupt flag"]
8881 pub const fn pc3so(&self) -> bool { 8657 pub const fn bif(&self) -> bool {
8882 let val = (self.0 >> 27usize) & 0x01; 8658 let val = (self.0 >> 7usize) & 0x01;
8883 val != 0 8659 val != 0
8884 } 8660 }
8885 #[doc = "PC3 Switch Open"] 8661 #[doc = "Break interrupt flag"]
8886 pub fn set_pc3so(&mut self, val: bool) { 8662 pub fn set_bif(&mut self, val: bool) {
8887 self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize); 8663 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
8888 }
8889 }
8890 impl Default for Pmcr {
8891 fn default() -> Pmcr {
8892 Pmcr(0)
8893 }
8894 }
8895 #[doc = "SYSCFG user register 6"]
8896 #[repr(transparent)]
8897 #[derive(Copy, Clone, Eq, PartialEq)]
8898 pub struct Ur6(pub u32);
8899 impl Ur6 {
8900 #[doc = "Protected area start address for bank 1"]
8901 pub const fn pa_beg_1(&self) -> u16 {
8902 let val = (self.0 >> 0usize) & 0x0fff;
8903 val as u16
8904 }
8905 #[doc = "Protected area start address for bank 1"]
8906 pub fn set_pa_beg_1(&mut self, val: u16) {
8907 self.0 = (self.0 & !(0x0fff << 0usize)) | (((val as u32) & 0x0fff) << 0usize);
8908 }
8909 #[doc = "Protected area end address for bank 1"]
8910 pub const fn pa_end_1(&self) -> u16 {
8911 let val = (self.0 >> 16usize) & 0x0fff;
8912 val as u16
8913 }
8914 #[doc = "Protected area end address for bank 1"]
8915 pub fn set_pa_end_1(&mut self, val: u16) {
8916 self.0 = (self.0 & !(0x0fff << 16usize)) | (((val as u32) & 0x0fff) << 16usize);
8917 }
8918 }
8919 impl Default for Ur6 {
8920 fn default() -> Ur6 {
8921 Ur6(0)
8922 }
8923 }
8924 #[doc = "SYSCFG user register 2"]
8925 #[repr(transparent)]
8926 #[derive(Copy, Clone, Eq, PartialEq)]
8927 pub struct Ur2(pub u32);
8928 impl Ur2 {
8929 #[doc = "BOR_LVL Brownout Reset Threshold Level"]
8930 pub const fn borh(&self) -> u8 {
8931 let val = (self.0 >> 0usize) & 0x03;
8932 val as u8
8933 }
8934 #[doc = "BOR_LVL Brownout Reset Threshold Level"]
8935 pub fn set_borh(&mut self, val: u8) {
8936 self.0 = (self.0 & !(0x03 << 0usize)) | (((val as u32) & 0x03) << 0usize);
8937 } 8664 }
8938 #[doc = "Boot Address 0"] 8665 #[doc = "Capture/Compare 1 overcapture flag"]
8939 pub const fn boot_add0(&self) -> u16 { 8666 pub fn ccof(&self, n: usize) -> bool {
8940 let val = (self.0 >> 16usize) & 0xffff; 8667 assert!(n < 4usize);
8941 val as u16 8668 let offs = 9usize + n * 1usize;
8669 let val = (self.0 >> offs) & 0x01;
8670 val != 0
8942 } 8671 }
8943 #[doc = "Boot Address 0"] 8672 #[doc = "Capture/Compare 1 overcapture flag"]
8944 pub fn set_boot_add0(&mut self, val: u16) { 8673 pub fn set_ccof(&mut self, n: usize, val: bool) {
8945 self.0 = (self.0 & !(0xffff << 16usize)) | (((val as u32) & 0xffff) << 16usize); 8674 assert!(n < 4usize);
8675 let offs = 9usize + n * 1usize;
8676 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
8946 } 8677 }
8947 } 8678 }
8948 impl Default for Ur2 { 8679 impl Default for SrAdv {
8949 fn default() -> Ur2 { 8680 fn default() -> SrAdv {
8950 Ur2(0) 8681 SrAdv(0)
8951 } 8682 }
8952 } 8683 }
8953 #[doc = "SYSCFG user register 9"] 8684 #[doc = "repetition counter register"]
8954 #[repr(transparent)] 8685 #[repr(transparent)]
8955 #[derive(Copy, Clone, Eq, PartialEq)] 8686 #[derive(Copy, Clone, Eq, PartialEq)]
8956 pub struct Ur9(pub u32); 8687 pub struct Rcr(pub u32);
8957 impl Ur9 { 8688 impl Rcr {
8958 #[doc = "Write protection for flash bank 2"] 8689 #[doc = "Repetition counter value"]
8959 pub const fn wrpn_2(&self) -> u8 { 8690 pub const fn rep(&self) -> u8 {
8960 let val = (self.0 >> 0usize) & 0xff; 8691 let val = (self.0 >> 0usize) & 0xff;
8961 val as u8 8692 val as u8
8962 } 8693 }
8963 #[doc = "Write protection for flash bank 2"] 8694 #[doc = "Repetition counter value"]
8964 pub fn set_wrpn_2(&mut self, val: u8) { 8695 pub fn set_rep(&mut self, val: u8) {
8965 self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); 8696 self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize);
8966 } 8697 }
8967 #[doc = "Protected area start address for bank 2"]
8968 pub const fn pa_beg_2(&self) -> u16 {
8969 let val = (self.0 >> 16usize) & 0x0fff;
8970 val as u16
8971 }
8972 #[doc = "Protected area start address for bank 2"]
8973 pub fn set_pa_beg_2(&mut self, val: u16) {
8974 self.0 = (self.0 & !(0x0fff << 16usize)) | (((val as u32) & 0x0fff) << 16usize);
8975 }
8976 }
8977 impl Default for Ur9 {
8978 fn default() -> Ur9 {
8979 Ur9(0)
8980 }
8981 }
8982 #[doc = "external interrupt configuration register 2"]
8983 #[repr(transparent)]
8984 #[derive(Copy, Clone, Eq, PartialEq)]
8985 pub struct Exticr(pub u32);
8986 impl Exticr {
8987 #[doc = "EXTI x configuration (x = 4 to 7)"]
8988 pub fn exti(&self, n: usize) -> u8 {
8989 assert!(n < 4usize);
8990 let offs = 0usize + n * 4usize;
8991 let val = (self.0 >> offs) & 0x0f;
8992 val as u8
8993 }
8994 #[doc = "EXTI x configuration (x = 4 to 7)"]
8995 pub fn set_exti(&mut self, n: usize, val: u8) {
8996 assert!(n < 4usize);
8997 let offs = 0usize + n * 4usize;
8998 self.0 = (self.0 & !(0x0f << offs)) | (((val as u32) & 0x0f) << offs);
8999 }
9000 } 8698 }
9001 impl Default for Exticr { 8699 impl Default for Rcr {
9002 fn default() -> Exticr { 8700 fn default() -> Rcr {
9003 Exticr(0) 8701 Rcr(0)
9004 } 8702 }
9005 } 8703 }
9006 #[doc = "compensation cell control/status register"] 8704 #[doc = "control register 1"]
9007 #[repr(transparent)] 8705 #[repr(transparent)]
9008 #[derive(Copy, Clone, Eq, PartialEq)] 8706 #[derive(Copy, Clone, Eq, PartialEq)]
9009 pub struct Cccsr(pub u32); 8707 pub struct Cr1Basic(pub u32);
9010 impl Cccsr { 8708 impl Cr1Basic {
9011 #[doc = "enable"] 8709 #[doc = "Counter enable"]
9012 pub const fn en(&self) -> bool { 8710 pub const fn cen(&self) -> bool {
9013 let val = (self.0 >> 0usize) & 0x01; 8711 let val = (self.0 >> 0usize) & 0x01;
9014 val != 0 8712 val != 0
9015 } 8713 }
9016 #[doc = "enable"] 8714 #[doc = "Counter enable"]
9017 pub fn set_en(&mut self, val: bool) { 8715 pub fn set_cen(&mut self, val: bool) {
9018 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 8716 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
9019 } 8717 }
9020 #[doc = "Code selection"] 8718 #[doc = "Update disable"]
9021 pub const fn cs(&self) -> bool { 8719 pub const fn udis(&self) -> bool {
9022 let val = (self.0 >> 1usize) & 0x01; 8720 let val = (self.0 >> 1usize) & 0x01;
9023 val != 0 8721 val != 0
9024 } 8722 }
9025 #[doc = "Code selection"] 8723 #[doc = "Update disable"]
9026 pub fn set_cs(&mut self, val: bool) { 8724 pub fn set_udis(&mut self, val: bool) {
9027 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); 8725 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
9028 } 8726 }
9029 #[doc = "Compensation cell ready flag"] 8727 #[doc = "Update request source"]
9030 pub const fn ready(&self) -> bool { 8728 pub const fn urs(&self) -> super::vals::Urs {
9031 let val = (self.0 >> 8usize) & 0x01; 8729 let val = (self.0 >> 2usize) & 0x01;
9032 val != 0 8730 super::vals::Urs(val as u8)
9033 } 8731 }
9034 #[doc = "Compensation cell ready flag"] 8732 #[doc = "Update request source"]
9035 pub fn set_ready(&mut self, val: bool) { 8733 pub fn set_urs(&mut self, val: super::vals::Urs) {
9036 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); 8734 self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize);
9037 } 8735 }
9038 #[doc = "High-speed at low-voltage"] 8736 #[doc = "One-pulse mode"]
9039 pub const fn hslv(&self) -> bool { 8737 pub const fn opm(&self) -> super::vals::Opm {
9040 let val = (self.0 >> 16usize) & 0x01; 8738 let val = (self.0 >> 3usize) & 0x01;
9041 val != 0 8739 super::vals::Opm(val as u8)
9042 } 8740 }
9043 #[doc = "High-speed at low-voltage"] 8741 #[doc = "One-pulse mode"]
9044 pub fn set_hslv(&mut self, val: bool) { 8742 pub fn set_opm(&mut self, val: super::vals::Opm) {
9045 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); 8743 self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize);
8744 }
8745 #[doc = "Auto-reload preload enable"]
8746 pub const fn arpe(&self) -> super::vals::Arpe {
8747 let val = (self.0 >> 7usize) & 0x01;
8748 super::vals::Arpe(val as u8)
8749 }
8750 #[doc = "Auto-reload preload enable"]
8751 pub fn set_arpe(&mut self, val: super::vals::Arpe) {
8752 self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize);
9046 } 8753 }
9047 } 8754 }
9048 impl Default for Cccsr { 8755 impl Default for Cr1Basic {
9049 fn default() -> Cccsr { 8756 fn default() -> Cr1Basic {
9050 Cccsr(0) 8757 Cr1Basic(0)
9051 } 8758 }
9052 } 8759 }
9053 #[doc = "SYSCFG user register 17"] 8760 #[doc = "status register"]
9054 #[repr(transparent)] 8761 #[repr(transparent)]
9055 #[derive(Copy, Clone, Eq, PartialEq)] 8762 #[derive(Copy, Clone, Eq, PartialEq)]
9056 pub struct Ur17(pub u32); 8763 pub struct SrBasic(pub u32);
9057 impl Ur17 { 8764 impl SrBasic {
9058 #[doc = "I/O high speed / low voltage"] 8765 #[doc = "Update interrupt flag"]
9059 pub const fn io_hslv(&self) -> bool { 8766 pub const fn uif(&self) -> bool {
9060 let val = (self.0 >> 0usize) & 0x01; 8767 let val = (self.0 >> 0usize) & 0x01;
9061 val != 0 8768 val != 0
9062 } 8769 }
9063 #[doc = "I/O high speed / low voltage"] 8770 #[doc = "Update interrupt flag"]
9064 pub fn set_io_hslv(&mut self, val: bool) { 8771 pub fn set_uif(&mut self, val: bool) {
9065 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 8772 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
9066 } 8773 }
9067 } 8774 }
9068 impl Default for Ur17 { 8775 impl Default for SrBasic {
9069 fn default() -> Ur17 { 8776 fn default() -> SrBasic {
9070 Ur17(0) 8777 SrBasic(0)
9071 } 8778 }
9072 } 8779 }
9073 #[doc = "SYSCFG compensation cell value register"] 8780 }
8781 pub mod vals {
8782 use crate::generic::*;
9074 #[repr(transparent)] 8783 #[repr(transparent)]
9075 #[derive(Copy, Clone, Eq, PartialEq)] 8784 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
9076 pub struct Ccvr(pub u32); 8785 pub struct Cms(pub u8);
9077 impl Ccvr { 8786 impl Cms {
9078 #[doc = "NMOS compensation value"] 8787 #[doc = "The counter counts up or down depending on the direction bit"]
9079 pub const fn ncv(&self) -> u8 { 8788 pub const EDGEALIGNED: Self = Self(0);
9080 let val = (self.0 >> 0usize) & 0x0f; 8789 #[doc = "The counter counts up and down alternatively. Output compare interrupt flags are set only when the counter is counting down."]
9081 val as u8 8790 pub const CENTERALIGNED1: Self = Self(0x01);
9082 } 8791 #[doc = "The counter counts up and down alternatively. Output compare interrupt flags are set only when the counter is counting up."]
9083 #[doc = "NMOS compensation value"] 8792 pub const CENTERALIGNED2: Self = Self(0x02);
9084 pub fn set_ncv(&mut self, val: u8) { 8793 #[doc = "The counter counts up and down alternatively. Output compare interrupt flags are set both when the counter is counting up or down."]
9085 self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); 8794 pub const CENTERALIGNED3: Self = Self(0x03);
9086 }
9087 #[doc = "PMOS compensation value"]
9088 pub const fn pcv(&self) -> u8 {
9089 let val = (self.0 >> 4usize) & 0x0f;
9090 val as u8
9091 }
9092 #[doc = "PMOS compensation value"]
9093 pub fn set_pcv(&mut self, val: u8) {
9094 self.0 = (self.0 & !(0x0f << 4usize)) | (((val as u32) & 0x0f) << 4usize);
9095 }
9096 } 8795 }
9097 impl Default for Ccvr { 8796 #[repr(transparent)]
9098 fn default() -> Ccvr { 8797 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
9099 Ccvr(0) 8798 pub struct Tis(pub u8);
9100 } 8799 impl Tis {
8800 #[doc = "The TIMx_CH1 pin is connected to TI1 input"]
8801 pub const NORMAL: Self = Self(0);
8802 #[doc = "The TIMx_CH1, CH2, CH3 pins are connected to TI1 input"]
8803 pub const XOR: Self = Self(0x01);
8804 }
8805 #[repr(transparent)]
8806 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
8807 pub struct Msm(pub u8);
8808 impl Msm {
8809 #[doc = "No action"]
8810 pub const NOSYNC: 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."]
8812 pub const SYNC: Self = Self(0x01);
8813 }
8814 #[repr(transparent)]
8815 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
8816 pub struct Mms(pub u8);
8817 impl Mms {
8818 #[doc = "The UG bit from the TIMx_EGR register is used as trigger output"]
8819 pub const RESET: Self = Self(0);
8820 #[doc = "The counter enable signal, CNT_EN, is used as trigger output"]
8821 pub const ENABLE: 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 }
8835 #[repr(transparent)]
8836 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
8837 pub struct Dir(pub u8);
8838 impl Dir {
8839 #[doc = "Counter used as upcounter"]
8840 pub const UP: Self = Self(0);
8841 #[doc = "Counter used as downcounter"]
8842 pub const DOWN: Self = Self(0x01);
8843 }
8844 #[repr(transparent)]
8845 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
8846 pub struct Arpe(pub u8);
8847 impl Arpe {
8848 #[doc = "TIMx_APRR register is not buffered"]
8849 pub const DISABLED: Self = Self(0);
8850 #[doc = "TIMx_APRR register is buffered"]
8851 pub const ENABLED: Self = Self(0x01);
8852 }
8853 #[repr(transparent)]
8854 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
8855 pub struct Sms(pub u8);
8856 impl Sms {
8857 #[doc = "Slave mode disabled - if CEN = ‘1 then the prescaler is clocked directly by the internal clock."]
8858 pub const DISABLED: Self = Self(0);
8859 #[doc = "Encoder mode 1 - Counter counts up/down on TI2FP1 edge depending on TI1FP2 level."]
8860 pub const ENCODER_MODE_1: 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 }
8874 #[repr(transparent)]
8875 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
8876 pub struct Ocm(pub u8);
8877 impl Ocm {
8878 #[doc = "The comparison between the output compare register TIMx_CCRy and the counter TIMx_CNT has no effect on the outputs"]
8879 pub const FROZEN: 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"]
8881 pub const ACTIVEONMATCH: 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 }
8895 #[repr(transparent)]
8896 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
8897 pub struct Ocpe(pub u8);
8898 impl Ocpe {
8899 #[doc = "Preload register on CCR2 disabled. New values written to CCR2 are taken into account immediately"]
8900 pub const DISABLED: Self = Self(0);
8901 #[doc = "Preload register on CCR2 enabled. Preload value is loaded into active register on each update event"]
8902 pub const ENABLED: Self = Self(0x01);
8903 }
8904 #[repr(transparent)]
8905 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
8906 pub struct Ckd(pub u8);
8907 impl Ckd {
8908 #[doc = "t_DTS = t_CK_INT"]
8909 pub const DIV1: Self = Self(0);
8910 #[doc = "t_DTS = 2 × t_CK_INT"]
8911 pub const DIV2: Self = Self(0x01);
8912 #[doc = "t_DTS = 4 × t_CK_INT"]
8913 pub const DIV4: Self = Self(0x02);
8914 }
8915 #[repr(transparent)]
8916 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
8917 pub struct Icf(pub u8);
8918 impl Icf {
8919 #[doc = "No filter, sampling is done at fDTS"]
8920 pub const NOFILTER: Self = Self(0);
8921 #[doc = "fSAMPLING=fCK_INT, N=2"]
8922 pub const FCK_INT_N2: Self = Self(0x01);
8923 #[doc = "fSAMPLING=fCK_INT, N=4"]
8924 pub const FCK_INT_N4: Self = Self(0x02);
8925 #[doc = "fSAMPLING=fCK_INT, N=8"]
8926 pub const FCK_INT_N8: Self = Self(0x03);
8927 #[doc = "fSAMPLING=fDTS/2, N=6"]
8928 pub const FDTS_DIV2_N6: Self = Self(0x04);
8929 #[doc = "fSAMPLING=fDTS/2, N=8"]
8930 pub const FDTS_DIV2_N8: Self = Self(0x05);
8931 #[doc = "fSAMPLING=fDTS/4, N=6"]
8932 pub const FDTS_DIV4_N6: Self = Self(0x06);
8933 #[doc = "fSAMPLING=fDTS/4, N=8"]
8934 pub const FDTS_DIV4_N8: Self = Self(0x07);
8935 #[doc = "fSAMPLING=fDTS/8, N=6"]
8936 pub const FDTS_DIV8_N6: Self = Self(0x08);
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 }
8952 #[repr(transparent)]
8953 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
8954 pub struct Urs(pub u8);
8955 impl Urs {
8956 #[doc = "Any of counter overflow/underflow, setting UG, or update through slave mode, generates an update interrupt or DMA request"]
8957 pub const ANYEVENT: Self = Self(0);
8958 #[doc = "Only counter overflow/underflow generates an update interrupt or DMA request"]
8959 pub const COUNTERONLY: Self = Self(0x01);
8960 }
8961 #[repr(transparent)]
8962 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
8963 pub struct Ccds(pub u8);
8964 impl Ccds {
8965 #[doc = "CCx DMA request sent when CCx event occurs"]
8966 pub const ONCOMPARE: Self = Self(0);
8967 #[doc = "CCx DMA request sent when update event occurs"]
8968 pub const ONUPDATE: Self = Self(0x01);
8969 }
8970 #[repr(transparent)]
8971 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
8972 pub struct CcmrInputCcs(pub u8);
8973 impl CcmrInputCcs {
8974 #[doc = "CCx channel is configured as input, normal mapping: ICx mapped to TIx"]
8975 pub const TI4: Self = Self(0x01);
8976 #[doc = "CCx channel is configured as input, alternate mapping (switches 1 with 2, 3 with 4)"]
8977 pub const TI3: Self = Self(0x02);
8978 #[doc = "CCx channel is configured as input, ICx is mapped on TRC"]
8979 pub const TRC: Self = Self(0x03);
8980 }
8981 #[repr(transparent)]
8982 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
8983 pub struct Opm(pub u8);
8984 impl Opm {
8985 #[doc = "Counter is not stopped at update event"]
8986 pub const DISABLED: Self = Self(0);
8987 #[doc = "Counter stops counting at the next update event (clearing the CEN bit)"]
8988 pub const ENABLED: Self = Self(0x01);
8989 }
8990 #[repr(transparent)]
8991 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
8992 pub struct CcmrOutputCcs(pub u8);
8993 impl CcmrOutputCcs {
8994 #[doc = "CCx channel is configured as output"]
8995 pub const OUTPUT: Self = Self(0);
8996 }
8997 #[repr(transparent)]
8998 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
8999 pub struct Ece(pub u8);
9000 impl Ece {
9001 #[doc = "External clock mode 2 disabled"]
9002 pub const DISABLED: Self = Self(0);
9003 #[doc = "External clock mode 2 enabled. The counter is clocked by any active edge on the ETRF signal."]
9004 pub const ENABLED: Self = Self(0x01);
9005 }
9006 #[repr(transparent)]
9007 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
9008 pub struct Etp(pub u8);
9009 impl Etp {
9010 #[doc = "ETR is noninverted, active at high level or rising edge"]
9011 pub const NOTINVERTED: Self = Self(0);
9012 #[doc = "ETR is inverted, active at low level or falling edge"]
9013 pub const INVERTED: Self = Self(0x01);
9014 }
9015 #[repr(transparent)]
9016 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
9017 pub struct Etf(pub u8);
9018 impl Etf {
9019 #[doc = "No filter, sampling is done at fDTS"]
9020 pub const NOFILTER: Self = Self(0);
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 }
9052 #[repr(transparent)]
9053 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
9054 pub struct Ts(pub u8);
9055 impl Ts {
9056 #[doc = "Internal Trigger 0 (ITR0)"]
9057 pub const ITR0: Self = Self(0);
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 }
9071 #[repr(transparent)]
9072 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
9073 pub struct Ossr(pub u8);
9074 impl Ossr {
9075 #[doc = "When inactive, OC/OCN outputs are disabled"]
9076 pub const DISABLED: Self = Self(0);
9077 #[doc = "When inactive, OC/OCN outputs are enabled with their inactive level"]
9078 pub const IDLELEVEL: Self = Self(0x01);
9079 }
9080 #[repr(transparent)]
9081 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
9082 pub struct Etps(pub u8);
9083 impl Etps {
9084 #[doc = "Prescaler OFF"]
9085 pub const DIV1: Self = Self(0);
9086 #[doc = "ETRP frequency divided by 2"]
9087 pub const DIV2: 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 }
9093 #[repr(transparent)]
9094 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
9095 pub struct Ossi(pub u8);
9096 impl Ossi {
9097 #[doc = "When inactive, OC/OCN outputs are disabled"]
9098 pub const DISABLED: Self = Self(0);
9099 #[doc = "When inactive, OC/OCN outputs are forced to idle level"]
9100 pub const IDLELEVEL: 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 4741e9d31..fe69202d8 100644
--- a/embassy-stm32/src/pac/stm32f401cb.rs
+++ b/embassy-stm32/src/pac/stm32f401cb.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f401cc.rs b/embassy-stm32/src/pac/stm32f401cc.rs
index 4741e9d31..fe69202d8 100644
--- a/embassy-stm32/src/pac/stm32f401cc.rs
+++ b/embassy-stm32/src/pac/stm32f401cc.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f401cd.rs b/embassy-stm32/src/pac/stm32f401cd.rs
index 4741e9d31..fe69202d8 100644
--- a/embassy-stm32/src/pac/stm32f401cd.rs
+++ b/embassy-stm32/src/pac/stm32f401cd.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f401ce.rs b/embassy-stm32/src/pac/stm32f401ce.rs
index 4741e9d31..fe69202d8 100644
--- a/embassy-stm32/src/pac/stm32f401ce.rs
+++ b/embassy-stm32/src/pac/stm32f401ce.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f401rb.rs b/embassy-stm32/src/pac/stm32f401rb.rs
index 4741e9d31..fe69202d8 100644
--- a/embassy-stm32/src/pac/stm32f401rb.rs
+++ b/embassy-stm32/src/pac/stm32f401rb.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f401rc.rs b/embassy-stm32/src/pac/stm32f401rc.rs
index 4741e9d31..fe69202d8 100644
--- a/embassy-stm32/src/pac/stm32f401rc.rs
+++ b/embassy-stm32/src/pac/stm32f401rc.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f401rd.rs b/embassy-stm32/src/pac/stm32f401rd.rs
index 4741e9d31..fe69202d8 100644
--- a/embassy-stm32/src/pac/stm32f401rd.rs
+++ b/embassy-stm32/src/pac/stm32f401rd.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f401re.rs b/embassy-stm32/src/pac/stm32f401re.rs
index 4741e9d31..fe69202d8 100644
--- a/embassy-stm32/src/pac/stm32f401re.rs
+++ b/embassy-stm32/src/pac/stm32f401re.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f401vb.rs b/embassy-stm32/src/pac/stm32f401vb.rs
index 4741e9d31..fe69202d8 100644
--- a/embassy-stm32/src/pac/stm32f401vb.rs
+++ b/embassy-stm32/src/pac/stm32f401vb.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f401vc.rs b/embassy-stm32/src/pac/stm32f401vc.rs
index 4741e9d31..fe69202d8 100644
--- a/embassy-stm32/src/pac/stm32f401vc.rs
+++ b/embassy-stm32/src/pac/stm32f401vc.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f401vd.rs b/embassy-stm32/src/pac/stm32f401vd.rs
index 4741e9d31..fe69202d8 100644
--- a/embassy-stm32/src/pac/stm32f401vd.rs
+++ b/embassy-stm32/src/pac/stm32f401vd.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f401ve.rs b/embassy-stm32/src/pac/stm32f401ve.rs
index 4741e9d31..fe69202d8 100644
--- a/embassy-stm32/src/pac/stm32f401ve.rs
+++ b/embassy-stm32/src/pac/stm32f401ve.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f405oe.rs b/embassy-stm32/src/pac/stm32f405oe.rs
index a82a17890..ef281f87c 100644
--- a/embassy-stm32/src/pac/stm32f405oe.rs
+++ b/embassy-stm32/src/pac/stm32f405oe.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f405og.rs b/embassy-stm32/src/pac/stm32f405og.rs
index a82a17890..ef281f87c 100644
--- a/embassy-stm32/src/pac/stm32f405og.rs
+++ b/embassy-stm32/src/pac/stm32f405og.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f405rg.rs b/embassy-stm32/src/pac/stm32f405rg.rs
index a82a17890..ef281f87c 100644
--- a/embassy-stm32/src/pac/stm32f405rg.rs
+++ b/embassy-stm32/src/pac/stm32f405rg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f405vg.rs b/embassy-stm32/src/pac/stm32f405vg.rs
index a82a17890..ef281f87c 100644
--- a/embassy-stm32/src/pac/stm32f405vg.rs
+++ b/embassy-stm32/src/pac/stm32f405vg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f405zg.rs b/embassy-stm32/src/pac/stm32f405zg.rs
index a82a17890..ef281f87c 100644
--- a/embassy-stm32/src/pac/stm32f405zg.rs
+++ b/embassy-stm32/src/pac/stm32f405zg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f407ie.rs b/embassy-stm32/src/pac/stm32f407ie.rs
index 2a9aea05f..e331efc83 100644
--- a/embassy-stm32/src/pac/stm32f407ie.rs
+++ b/embassy-stm32/src/pac/stm32f407ie.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f407ig.rs b/embassy-stm32/src/pac/stm32f407ig.rs
index 2a9aea05f..e331efc83 100644
--- a/embassy-stm32/src/pac/stm32f407ig.rs
+++ b/embassy-stm32/src/pac/stm32f407ig.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f407ve.rs b/embassy-stm32/src/pac/stm32f407ve.rs
index 2a9aea05f..e331efc83 100644
--- a/embassy-stm32/src/pac/stm32f407ve.rs
+++ b/embassy-stm32/src/pac/stm32f407ve.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f407vg.rs b/embassy-stm32/src/pac/stm32f407vg.rs
index 2a9aea05f..e331efc83 100644
--- a/embassy-stm32/src/pac/stm32f407vg.rs
+++ b/embassy-stm32/src/pac/stm32f407vg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f407ze.rs b/embassy-stm32/src/pac/stm32f407ze.rs
index 2a9aea05f..e331efc83 100644
--- a/embassy-stm32/src/pac/stm32f407ze.rs
+++ b/embassy-stm32/src/pac/stm32f407ze.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f407zg.rs b/embassy-stm32/src/pac/stm32f407zg.rs
index 2a9aea05f..e331efc83 100644
--- a/embassy-stm32/src/pac/stm32f407zg.rs
+++ b/embassy-stm32/src/pac/stm32f407zg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f410c8.rs b/embassy-stm32/src/pac/stm32f410c8.rs
index 05f9ca68c..0ade08eff 100644
--- a/embassy-stm32/src/pac/stm32f410c8.rs
+++ b/embassy-stm32/src/pac/stm32f410c8.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f410cb.rs b/embassy-stm32/src/pac/stm32f410cb.rs
index 05f9ca68c..0ade08eff 100644
--- a/embassy-stm32/src/pac/stm32f410cb.rs
+++ b/embassy-stm32/src/pac/stm32f410cb.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f410r8.rs b/embassy-stm32/src/pac/stm32f410r8.rs
index 05f9ca68c..0ade08eff 100644
--- a/embassy-stm32/src/pac/stm32f410r8.rs
+++ b/embassy-stm32/src/pac/stm32f410r8.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f410rb.rs b/embassy-stm32/src/pac/stm32f410rb.rs
index 05f9ca68c..0ade08eff 100644
--- a/embassy-stm32/src/pac/stm32f410rb.rs
+++ b/embassy-stm32/src/pac/stm32f410rb.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f410t8.rs b/embassy-stm32/src/pac/stm32f410t8.rs
index 25d99f0a2..01c938453 100644
--- a/embassy-stm32/src/pac/stm32f410t8.rs
+++ b/embassy-stm32/src/pac/stm32f410t8.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f410tb.rs b/embassy-stm32/src/pac/stm32f410tb.rs
index 25d99f0a2..01c938453 100644
--- a/embassy-stm32/src/pac/stm32f410tb.rs
+++ b/embassy-stm32/src/pac/stm32f410tb.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f411cc.rs b/embassy-stm32/src/pac/stm32f411cc.rs
index c1d9cef53..1e54e97c9 100644
--- a/embassy-stm32/src/pac/stm32f411cc.rs
+++ b/embassy-stm32/src/pac/stm32f411cc.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f411ce.rs b/embassy-stm32/src/pac/stm32f411ce.rs
index c1d9cef53..1e54e97c9 100644
--- a/embassy-stm32/src/pac/stm32f411ce.rs
+++ b/embassy-stm32/src/pac/stm32f411ce.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f411rc.rs b/embassy-stm32/src/pac/stm32f411rc.rs
index c1d9cef53..1e54e97c9 100644
--- a/embassy-stm32/src/pac/stm32f411rc.rs
+++ b/embassy-stm32/src/pac/stm32f411rc.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f411re.rs b/embassy-stm32/src/pac/stm32f411re.rs
index c1d9cef53..1e54e97c9 100644
--- a/embassy-stm32/src/pac/stm32f411re.rs
+++ b/embassy-stm32/src/pac/stm32f411re.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f411vc.rs b/embassy-stm32/src/pac/stm32f411vc.rs
index c1d9cef53..1e54e97c9 100644
--- a/embassy-stm32/src/pac/stm32f411vc.rs
+++ b/embassy-stm32/src/pac/stm32f411vc.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f411ve.rs b/embassy-stm32/src/pac/stm32f411ve.rs
index c1d9cef53..1e54e97c9 100644
--- a/embassy-stm32/src/pac/stm32f411ve.rs
+++ b/embassy-stm32/src/pac/stm32f411ve.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f412ce.rs b/embassy-stm32/src/pac/stm32f412ce.rs
index a29b62d2a..9f734f6e1 100644
--- a/embassy-stm32/src/pac/stm32f412ce.rs
+++ b/embassy-stm32/src/pac/stm32f412ce.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f412cg.rs b/embassy-stm32/src/pac/stm32f412cg.rs
index a29b62d2a..9f734f6e1 100644
--- a/embassy-stm32/src/pac/stm32f412cg.rs
+++ b/embassy-stm32/src/pac/stm32f412cg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f412re.rs b/embassy-stm32/src/pac/stm32f412re.rs
index 4633e3a3a..faee66505 100644
--- a/embassy-stm32/src/pac/stm32f412re.rs
+++ b/embassy-stm32/src/pac/stm32f412re.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f412rg.rs b/embassy-stm32/src/pac/stm32f412rg.rs
index 4633e3a3a..faee66505 100644
--- a/embassy-stm32/src/pac/stm32f412rg.rs
+++ b/embassy-stm32/src/pac/stm32f412rg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f412ve.rs b/embassy-stm32/src/pac/stm32f412ve.rs
index d27c86bfd..035b44f21 100644
--- a/embassy-stm32/src/pac/stm32f412ve.rs
+++ b/embassy-stm32/src/pac/stm32f412ve.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f412vg.rs b/embassy-stm32/src/pac/stm32f412vg.rs
index d27c86bfd..035b44f21 100644
--- a/embassy-stm32/src/pac/stm32f412vg.rs
+++ b/embassy-stm32/src/pac/stm32f412vg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f412ze.rs b/embassy-stm32/src/pac/stm32f412ze.rs
index d27c86bfd..035b44f21 100644
--- a/embassy-stm32/src/pac/stm32f412ze.rs
+++ b/embassy-stm32/src/pac/stm32f412ze.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f412zg.rs b/embassy-stm32/src/pac/stm32f412zg.rs
index d27c86bfd..035b44f21 100644
--- a/embassy-stm32/src/pac/stm32f412zg.rs
+++ b/embassy-stm32/src/pac/stm32f412zg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f413cg.rs b/embassy-stm32/src/pac/stm32f413cg.rs
index daace7a47..b2b2c30d6 100644
--- a/embassy-stm32/src/pac/stm32f413cg.rs
+++ b/embassy-stm32/src/pac/stm32f413cg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f413ch.rs b/embassy-stm32/src/pac/stm32f413ch.rs
index daace7a47..b2b2c30d6 100644
--- a/embassy-stm32/src/pac/stm32f413ch.rs
+++ b/embassy-stm32/src/pac/stm32f413ch.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f413mg.rs b/embassy-stm32/src/pac/stm32f413mg.rs
index 0b03ec443..e653d0cb1 100644
--- a/embassy-stm32/src/pac/stm32f413mg.rs
+++ b/embassy-stm32/src/pac/stm32f413mg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f413mh.rs b/embassy-stm32/src/pac/stm32f413mh.rs
index 0b03ec443..e653d0cb1 100644
--- a/embassy-stm32/src/pac/stm32f413mh.rs
+++ b/embassy-stm32/src/pac/stm32f413mh.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f413rg.rs b/embassy-stm32/src/pac/stm32f413rg.rs
index 0b03ec443..e653d0cb1 100644
--- a/embassy-stm32/src/pac/stm32f413rg.rs
+++ b/embassy-stm32/src/pac/stm32f413rg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f413rh.rs b/embassy-stm32/src/pac/stm32f413rh.rs
index 0b03ec443..e653d0cb1 100644
--- a/embassy-stm32/src/pac/stm32f413rh.rs
+++ b/embassy-stm32/src/pac/stm32f413rh.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f413vg.rs b/embassy-stm32/src/pac/stm32f413vg.rs
index 0b03ec443..e653d0cb1 100644
--- a/embassy-stm32/src/pac/stm32f413vg.rs
+++ b/embassy-stm32/src/pac/stm32f413vg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f413vh.rs b/embassy-stm32/src/pac/stm32f413vh.rs
index 0b03ec443..e653d0cb1 100644
--- a/embassy-stm32/src/pac/stm32f413vh.rs
+++ b/embassy-stm32/src/pac/stm32f413vh.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f413zg.rs b/embassy-stm32/src/pac/stm32f413zg.rs
index 0b03ec443..e653d0cb1 100644
--- a/embassy-stm32/src/pac/stm32f413zg.rs
+++ b/embassy-stm32/src/pac/stm32f413zg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f413zh.rs b/embassy-stm32/src/pac/stm32f413zh.rs
index 0b03ec443..e653d0cb1 100644
--- a/embassy-stm32/src/pac/stm32f413zh.rs
+++ b/embassy-stm32/src/pac/stm32f413zh.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f415og.rs b/embassy-stm32/src/pac/stm32f415og.rs
index e9a6b51c0..46f5b252c 100644
--- a/embassy-stm32/src/pac/stm32f415og.rs
+++ b/embassy-stm32/src/pac/stm32f415og.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f415rg.rs b/embassy-stm32/src/pac/stm32f415rg.rs
index e9a6b51c0..46f5b252c 100644
--- a/embassy-stm32/src/pac/stm32f415rg.rs
+++ b/embassy-stm32/src/pac/stm32f415rg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f415vg.rs b/embassy-stm32/src/pac/stm32f415vg.rs
index e9a6b51c0..46f5b252c 100644
--- a/embassy-stm32/src/pac/stm32f415vg.rs
+++ b/embassy-stm32/src/pac/stm32f415vg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f415zg.rs b/embassy-stm32/src/pac/stm32f415zg.rs
index e9a6b51c0..46f5b252c 100644
--- a/embassy-stm32/src/pac/stm32f415zg.rs
+++ b/embassy-stm32/src/pac/stm32f415zg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f417ie.rs b/embassy-stm32/src/pac/stm32f417ie.rs
index b34f999b9..1a528a3ca 100644
--- a/embassy-stm32/src/pac/stm32f417ie.rs
+++ b/embassy-stm32/src/pac/stm32f417ie.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f417ig.rs b/embassy-stm32/src/pac/stm32f417ig.rs
index b34f999b9..1a528a3ca 100644
--- a/embassy-stm32/src/pac/stm32f417ig.rs
+++ b/embassy-stm32/src/pac/stm32f417ig.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f417ve.rs b/embassy-stm32/src/pac/stm32f417ve.rs
index b34f999b9..1a528a3ca 100644
--- a/embassy-stm32/src/pac/stm32f417ve.rs
+++ b/embassy-stm32/src/pac/stm32f417ve.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f417vg.rs b/embassy-stm32/src/pac/stm32f417vg.rs
index b34f999b9..1a528a3ca 100644
--- a/embassy-stm32/src/pac/stm32f417vg.rs
+++ b/embassy-stm32/src/pac/stm32f417vg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f417ze.rs b/embassy-stm32/src/pac/stm32f417ze.rs
index b34f999b9..1a528a3ca 100644
--- a/embassy-stm32/src/pac/stm32f417ze.rs
+++ b/embassy-stm32/src/pac/stm32f417ze.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f417zg.rs b/embassy-stm32/src/pac/stm32f417zg.rs
index b34f999b9..1a528a3ca 100644
--- a/embassy-stm32/src/pac/stm32f417zg.rs
+++ b/embassy-stm32/src/pac/stm32f417zg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f423ch.rs b/embassy-stm32/src/pac/stm32f423ch.rs
index 8f86077ca..887aa7126 100644
--- a/embassy-stm32/src/pac/stm32f423ch.rs
+++ b/embassy-stm32/src/pac/stm32f423ch.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f423mh.rs b/embassy-stm32/src/pac/stm32f423mh.rs
index 7d787dfde..00c927ce2 100644
--- a/embassy-stm32/src/pac/stm32f423mh.rs
+++ b/embassy-stm32/src/pac/stm32f423mh.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f423rh.rs b/embassy-stm32/src/pac/stm32f423rh.rs
index 7d787dfde..00c927ce2 100644
--- a/embassy-stm32/src/pac/stm32f423rh.rs
+++ b/embassy-stm32/src/pac/stm32f423rh.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f423vh.rs b/embassy-stm32/src/pac/stm32f423vh.rs
index 7d787dfde..00c927ce2 100644
--- a/embassy-stm32/src/pac/stm32f423vh.rs
+++ b/embassy-stm32/src/pac/stm32f423vh.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f423zh.rs b/embassy-stm32/src/pac/stm32f423zh.rs
index 7d787dfde..00c927ce2 100644
--- a/embassy-stm32/src/pac/stm32f423zh.rs
+++ b/embassy-stm32/src/pac/stm32f423zh.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f427ag.rs b/embassy-stm32/src/pac/stm32f427ag.rs
index 8130dfa2b..61acdfec2 100644
--- a/embassy-stm32/src/pac/stm32f427ag.rs
+++ b/embassy-stm32/src/pac/stm32f427ag.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f427ai.rs b/embassy-stm32/src/pac/stm32f427ai.rs
index 8130dfa2b..61acdfec2 100644
--- a/embassy-stm32/src/pac/stm32f427ai.rs
+++ b/embassy-stm32/src/pac/stm32f427ai.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f427ig.rs b/embassy-stm32/src/pac/stm32f427ig.rs
index 8130dfa2b..61acdfec2 100644
--- a/embassy-stm32/src/pac/stm32f427ig.rs
+++ b/embassy-stm32/src/pac/stm32f427ig.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f427ii.rs b/embassy-stm32/src/pac/stm32f427ii.rs
index 8130dfa2b..61acdfec2 100644
--- a/embassy-stm32/src/pac/stm32f427ii.rs
+++ b/embassy-stm32/src/pac/stm32f427ii.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f427vg.rs b/embassy-stm32/src/pac/stm32f427vg.rs
index 8130dfa2b..61acdfec2 100644
--- a/embassy-stm32/src/pac/stm32f427vg.rs
+++ b/embassy-stm32/src/pac/stm32f427vg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f427vi.rs b/embassy-stm32/src/pac/stm32f427vi.rs
index 8130dfa2b..61acdfec2 100644
--- a/embassy-stm32/src/pac/stm32f427vi.rs
+++ b/embassy-stm32/src/pac/stm32f427vi.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f427zg.rs b/embassy-stm32/src/pac/stm32f427zg.rs
index 8130dfa2b..61acdfec2 100644
--- a/embassy-stm32/src/pac/stm32f427zg.rs
+++ b/embassy-stm32/src/pac/stm32f427zg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f427zi.rs b/embassy-stm32/src/pac/stm32f427zi.rs
index 8130dfa2b..61acdfec2 100644
--- a/embassy-stm32/src/pac/stm32f427zi.rs
+++ b/embassy-stm32/src/pac/stm32f427zi.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f429ag.rs b/embassy-stm32/src/pac/stm32f429ag.rs
index b76378e03..a1a3ab422 100644
--- a/embassy-stm32/src/pac/stm32f429ag.rs
+++ b/embassy-stm32/src/pac/stm32f429ag.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f429ai.rs b/embassy-stm32/src/pac/stm32f429ai.rs
index b76378e03..a1a3ab422 100644
--- a/embassy-stm32/src/pac/stm32f429ai.rs
+++ b/embassy-stm32/src/pac/stm32f429ai.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f429be.rs b/embassy-stm32/src/pac/stm32f429be.rs
index b76378e03..a1a3ab422 100644
--- a/embassy-stm32/src/pac/stm32f429be.rs
+++ b/embassy-stm32/src/pac/stm32f429be.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f429bg.rs b/embassy-stm32/src/pac/stm32f429bg.rs
index b76378e03..a1a3ab422 100644
--- a/embassy-stm32/src/pac/stm32f429bg.rs
+++ b/embassy-stm32/src/pac/stm32f429bg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f429bi.rs b/embassy-stm32/src/pac/stm32f429bi.rs
index b76378e03..a1a3ab422 100644
--- a/embassy-stm32/src/pac/stm32f429bi.rs
+++ b/embassy-stm32/src/pac/stm32f429bi.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f429ie.rs b/embassy-stm32/src/pac/stm32f429ie.rs
index b76378e03..a1a3ab422 100644
--- a/embassy-stm32/src/pac/stm32f429ie.rs
+++ b/embassy-stm32/src/pac/stm32f429ie.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f429ig.rs b/embassy-stm32/src/pac/stm32f429ig.rs
index b76378e03..a1a3ab422 100644
--- a/embassy-stm32/src/pac/stm32f429ig.rs
+++ b/embassy-stm32/src/pac/stm32f429ig.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f429ii.rs b/embassy-stm32/src/pac/stm32f429ii.rs
index b76378e03..a1a3ab422 100644
--- a/embassy-stm32/src/pac/stm32f429ii.rs
+++ b/embassy-stm32/src/pac/stm32f429ii.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f429ne.rs b/embassy-stm32/src/pac/stm32f429ne.rs
index b76378e03..a1a3ab422 100644
--- a/embassy-stm32/src/pac/stm32f429ne.rs
+++ b/embassy-stm32/src/pac/stm32f429ne.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f429ng.rs b/embassy-stm32/src/pac/stm32f429ng.rs
index b76378e03..a1a3ab422 100644
--- a/embassy-stm32/src/pac/stm32f429ng.rs
+++ b/embassy-stm32/src/pac/stm32f429ng.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f429ni.rs b/embassy-stm32/src/pac/stm32f429ni.rs
index b76378e03..a1a3ab422 100644
--- a/embassy-stm32/src/pac/stm32f429ni.rs
+++ b/embassy-stm32/src/pac/stm32f429ni.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f429ve.rs b/embassy-stm32/src/pac/stm32f429ve.rs
index b76378e03..a1a3ab422 100644
--- a/embassy-stm32/src/pac/stm32f429ve.rs
+++ b/embassy-stm32/src/pac/stm32f429ve.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f429vg.rs b/embassy-stm32/src/pac/stm32f429vg.rs
index b76378e03..a1a3ab422 100644
--- a/embassy-stm32/src/pac/stm32f429vg.rs
+++ b/embassy-stm32/src/pac/stm32f429vg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f429vi.rs b/embassy-stm32/src/pac/stm32f429vi.rs
index b76378e03..a1a3ab422 100644
--- a/embassy-stm32/src/pac/stm32f429vi.rs
+++ b/embassy-stm32/src/pac/stm32f429vi.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f429ze.rs b/embassy-stm32/src/pac/stm32f429ze.rs
index b76378e03..a1a3ab422 100644
--- a/embassy-stm32/src/pac/stm32f429ze.rs
+++ b/embassy-stm32/src/pac/stm32f429ze.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f429zg.rs b/embassy-stm32/src/pac/stm32f429zg.rs
index b76378e03..a1a3ab422 100644
--- a/embassy-stm32/src/pac/stm32f429zg.rs
+++ b/embassy-stm32/src/pac/stm32f429zg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f437ai.rs b/embassy-stm32/src/pac/stm32f437ai.rs
index 5648362a9..3c30eec9a 100644
--- a/embassy-stm32/src/pac/stm32f437ai.rs
+++ b/embassy-stm32/src/pac/stm32f437ai.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f437ig.rs b/embassy-stm32/src/pac/stm32f437ig.rs
index 5648362a9..3c30eec9a 100644
--- a/embassy-stm32/src/pac/stm32f437ig.rs
+++ b/embassy-stm32/src/pac/stm32f437ig.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f437ii.rs b/embassy-stm32/src/pac/stm32f437ii.rs
index 5648362a9..3c30eec9a 100644
--- a/embassy-stm32/src/pac/stm32f437ii.rs
+++ b/embassy-stm32/src/pac/stm32f437ii.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f437vg.rs b/embassy-stm32/src/pac/stm32f437vg.rs
index 5648362a9..3c30eec9a 100644
--- a/embassy-stm32/src/pac/stm32f437vg.rs
+++ b/embassy-stm32/src/pac/stm32f437vg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f437vi.rs b/embassy-stm32/src/pac/stm32f437vi.rs
index 5648362a9..3c30eec9a 100644
--- a/embassy-stm32/src/pac/stm32f437vi.rs
+++ b/embassy-stm32/src/pac/stm32f437vi.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f437zg.rs b/embassy-stm32/src/pac/stm32f437zg.rs
index 5648362a9..3c30eec9a 100644
--- a/embassy-stm32/src/pac/stm32f437zg.rs
+++ b/embassy-stm32/src/pac/stm32f437zg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f437zi.rs b/embassy-stm32/src/pac/stm32f437zi.rs
index 5648362a9..3c30eec9a 100644
--- a/embassy-stm32/src/pac/stm32f437zi.rs
+++ b/embassy-stm32/src/pac/stm32f437zi.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f439ai.rs b/embassy-stm32/src/pac/stm32f439ai.rs
index b0b55bfe7..379a3d707 100644
--- a/embassy-stm32/src/pac/stm32f439ai.rs
+++ b/embassy-stm32/src/pac/stm32f439ai.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f439bg.rs b/embassy-stm32/src/pac/stm32f439bg.rs
index b0b55bfe7..379a3d707 100644
--- a/embassy-stm32/src/pac/stm32f439bg.rs
+++ b/embassy-stm32/src/pac/stm32f439bg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f439bi.rs b/embassy-stm32/src/pac/stm32f439bi.rs
index b0b55bfe7..379a3d707 100644
--- a/embassy-stm32/src/pac/stm32f439bi.rs
+++ b/embassy-stm32/src/pac/stm32f439bi.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f439ig.rs b/embassy-stm32/src/pac/stm32f439ig.rs
index b0b55bfe7..379a3d707 100644
--- a/embassy-stm32/src/pac/stm32f439ig.rs
+++ b/embassy-stm32/src/pac/stm32f439ig.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f439ii.rs b/embassy-stm32/src/pac/stm32f439ii.rs
index b0b55bfe7..379a3d707 100644
--- a/embassy-stm32/src/pac/stm32f439ii.rs
+++ b/embassy-stm32/src/pac/stm32f439ii.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f439ng.rs b/embassy-stm32/src/pac/stm32f439ng.rs
index b0b55bfe7..379a3d707 100644
--- a/embassy-stm32/src/pac/stm32f439ng.rs
+++ b/embassy-stm32/src/pac/stm32f439ng.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f439ni.rs b/embassy-stm32/src/pac/stm32f439ni.rs
index b0b55bfe7..379a3d707 100644
--- a/embassy-stm32/src/pac/stm32f439ni.rs
+++ b/embassy-stm32/src/pac/stm32f439ni.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f439vg.rs b/embassy-stm32/src/pac/stm32f439vg.rs
index b0b55bfe7..379a3d707 100644
--- a/embassy-stm32/src/pac/stm32f439vg.rs
+++ b/embassy-stm32/src/pac/stm32f439vg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f439vi.rs b/embassy-stm32/src/pac/stm32f439vi.rs
index b0b55bfe7..379a3d707 100644
--- a/embassy-stm32/src/pac/stm32f439vi.rs
+++ b/embassy-stm32/src/pac/stm32f439vi.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f439zg.rs b/embassy-stm32/src/pac/stm32f439zg.rs
index b0b55bfe7..379a3d707 100644
--- a/embassy-stm32/src/pac/stm32f439zg.rs
+++ b/embassy-stm32/src/pac/stm32f439zg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f439zi.rs b/embassy-stm32/src/pac/stm32f439zi.rs
index b0b55bfe7..379a3d707 100644
--- a/embassy-stm32/src/pac/stm32f439zi.rs
+++ b/embassy-stm32/src/pac/stm32f439zi.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f446mc.rs b/embassy-stm32/src/pac/stm32f446mc.rs
index 6059c646b..99da317ff 100644
--- a/embassy-stm32/src/pac/stm32f446mc.rs
+++ b/embassy-stm32/src/pac/stm32f446mc.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f446me.rs b/embassy-stm32/src/pac/stm32f446me.rs
index 6059c646b..99da317ff 100644
--- a/embassy-stm32/src/pac/stm32f446me.rs
+++ b/embassy-stm32/src/pac/stm32f446me.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f446rc.rs b/embassy-stm32/src/pac/stm32f446rc.rs
index 6059c646b..99da317ff 100644
--- a/embassy-stm32/src/pac/stm32f446rc.rs
+++ b/embassy-stm32/src/pac/stm32f446rc.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f446re.rs b/embassy-stm32/src/pac/stm32f446re.rs
index 6059c646b..99da317ff 100644
--- a/embassy-stm32/src/pac/stm32f446re.rs
+++ b/embassy-stm32/src/pac/stm32f446re.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f446vc.rs b/embassy-stm32/src/pac/stm32f446vc.rs
index 6059c646b..99da317ff 100644
--- a/embassy-stm32/src/pac/stm32f446vc.rs
+++ b/embassy-stm32/src/pac/stm32f446vc.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f446ve.rs b/embassy-stm32/src/pac/stm32f446ve.rs
index 6059c646b..99da317ff 100644
--- a/embassy-stm32/src/pac/stm32f446ve.rs
+++ b/embassy-stm32/src/pac/stm32f446ve.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f446zc.rs b/embassy-stm32/src/pac/stm32f446zc.rs
index 6059c646b..99da317ff 100644
--- a/embassy-stm32/src/pac/stm32f446zc.rs
+++ b/embassy-stm32/src/pac/stm32f446zc.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f446ze.rs b/embassy-stm32/src/pac/stm32f446ze.rs
index 6059c646b..99da317ff 100644
--- a/embassy-stm32/src/pac/stm32f446ze.rs
+++ b/embassy-stm32/src/pac/stm32f446ze.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f469ae.rs b/embassy-stm32/src/pac/stm32f469ae.rs
index f4c158e42..bf68c2f6f 100644
--- a/embassy-stm32/src/pac/stm32f469ae.rs
+++ b/embassy-stm32/src/pac/stm32f469ae.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f469ag.rs b/embassy-stm32/src/pac/stm32f469ag.rs
index f4c158e42..bf68c2f6f 100644
--- a/embassy-stm32/src/pac/stm32f469ag.rs
+++ b/embassy-stm32/src/pac/stm32f469ag.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f469ai.rs b/embassy-stm32/src/pac/stm32f469ai.rs
index f4c158e42..bf68c2f6f 100644
--- a/embassy-stm32/src/pac/stm32f469ai.rs
+++ b/embassy-stm32/src/pac/stm32f469ai.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f469be.rs b/embassy-stm32/src/pac/stm32f469be.rs
index f4c158e42..bf68c2f6f 100644
--- a/embassy-stm32/src/pac/stm32f469be.rs
+++ b/embassy-stm32/src/pac/stm32f469be.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f469bg.rs b/embassy-stm32/src/pac/stm32f469bg.rs
index f4c158e42..bf68c2f6f 100644
--- a/embassy-stm32/src/pac/stm32f469bg.rs
+++ b/embassy-stm32/src/pac/stm32f469bg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f469bi.rs b/embassy-stm32/src/pac/stm32f469bi.rs
index f4c158e42..bf68c2f6f 100644
--- a/embassy-stm32/src/pac/stm32f469bi.rs
+++ b/embassy-stm32/src/pac/stm32f469bi.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f469ie.rs b/embassy-stm32/src/pac/stm32f469ie.rs
index f4c158e42..bf68c2f6f 100644
--- a/embassy-stm32/src/pac/stm32f469ie.rs
+++ b/embassy-stm32/src/pac/stm32f469ie.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f469ig.rs b/embassy-stm32/src/pac/stm32f469ig.rs
index f4c158e42..bf68c2f6f 100644
--- a/embassy-stm32/src/pac/stm32f469ig.rs
+++ b/embassy-stm32/src/pac/stm32f469ig.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f469ii.rs b/embassy-stm32/src/pac/stm32f469ii.rs
index f4c158e42..bf68c2f6f 100644
--- a/embassy-stm32/src/pac/stm32f469ii.rs
+++ b/embassy-stm32/src/pac/stm32f469ii.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f469ne.rs b/embassy-stm32/src/pac/stm32f469ne.rs
index f4c158e42..bf68c2f6f 100644
--- a/embassy-stm32/src/pac/stm32f469ne.rs
+++ b/embassy-stm32/src/pac/stm32f469ne.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f469ng.rs b/embassy-stm32/src/pac/stm32f469ng.rs
index f4c158e42..bf68c2f6f 100644
--- a/embassy-stm32/src/pac/stm32f469ng.rs
+++ b/embassy-stm32/src/pac/stm32f469ng.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f469ni.rs b/embassy-stm32/src/pac/stm32f469ni.rs
index f4c158e42..bf68c2f6f 100644
--- a/embassy-stm32/src/pac/stm32f469ni.rs
+++ b/embassy-stm32/src/pac/stm32f469ni.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f469ve.rs b/embassy-stm32/src/pac/stm32f469ve.rs
index f4c158e42..bf68c2f6f 100644
--- a/embassy-stm32/src/pac/stm32f469ve.rs
+++ b/embassy-stm32/src/pac/stm32f469ve.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f469vg.rs b/embassy-stm32/src/pac/stm32f469vg.rs
index f4c158e42..bf68c2f6f 100644
--- a/embassy-stm32/src/pac/stm32f469vg.rs
+++ b/embassy-stm32/src/pac/stm32f469vg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f469vi.rs b/embassy-stm32/src/pac/stm32f469vi.rs
index f4c158e42..bf68c2f6f 100644
--- a/embassy-stm32/src/pac/stm32f469vi.rs
+++ b/embassy-stm32/src/pac/stm32f469vi.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f469ze.rs b/embassy-stm32/src/pac/stm32f469ze.rs
index f4c158e42..bf68c2f6f 100644
--- a/embassy-stm32/src/pac/stm32f469ze.rs
+++ b/embassy-stm32/src/pac/stm32f469ze.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f469zg.rs b/embassy-stm32/src/pac/stm32f469zg.rs
index f4c158e42..bf68c2f6f 100644
--- a/embassy-stm32/src/pac/stm32f469zg.rs
+++ b/embassy-stm32/src/pac/stm32f469zg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f469zi.rs b/embassy-stm32/src/pac/stm32f469zi.rs
index f4c158e42..bf68c2f6f 100644
--- a/embassy-stm32/src/pac/stm32f469zi.rs
+++ b/embassy-stm32/src/pac/stm32f469zi.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f479ag.rs b/embassy-stm32/src/pac/stm32f479ag.rs
index 17da2d122..67bdb0390 100644
--- a/embassy-stm32/src/pac/stm32f479ag.rs
+++ b/embassy-stm32/src/pac/stm32f479ag.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f479ai.rs b/embassy-stm32/src/pac/stm32f479ai.rs
index 17da2d122..67bdb0390 100644
--- a/embassy-stm32/src/pac/stm32f479ai.rs
+++ b/embassy-stm32/src/pac/stm32f479ai.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f479bg.rs b/embassy-stm32/src/pac/stm32f479bg.rs
index 17da2d122..67bdb0390 100644
--- a/embassy-stm32/src/pac/stm32f479bg.rs
+++ b/embassy-stm32/src/pac/stm32f479bg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f479bi.rs b/embassy-stm32/src/pac/stm32f479bi.rs
index 17da2d122..67bdb0390 100644
--- a/embassy-stm32/src/pac/stm32f479bi.rs
+++ b/embassy-stm32/src/pac/stm32f479bi.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f479ig.rs b/embassy-stm32/src/pac/stm32f479ig.rs
index 17da2d122..67bdb0390 100644
--- a/embassy-stm32/src/pac/stm32f479ig.rs
+++ b/embassy-stm32/src/pac/stm32f479ig.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f479ii.rs b/embassy-stm32/src/pac/stm32f479ii.rs
index 17da2d122..67bdb0390 100644
--- a/embassy-stm32/src/pac/stm32f479ii.rs
+++ b/embassy-stm32/src/pac/stm32f479ii.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f479ng.rs b/embassy-stm32/src/pac/stm32f479ng.rs
index 17da2d122..67bdb0390 100644
--- a/embassy-stm32/src/pac/stm32f479ng.rs
+++ b/embassy-stm32/src/pac/stm32f479ng.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f479ni.rs b/embassy-stm32/src/pac/stm32f479ni.rs
index 17da2d122..67bdb0390 100644
--- a/embassy-stm32/src/pac/stm32f479ni.rs
+++ b/embassy-stm32/src/pac/stm32f479ni.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f479vg.rs b/embassy-stm32/src/pac/stm32f479vg.rs
index 17da2d122..67bdb0390 100644
--- a/embassy-stm32/src/pac/stm32f479vg.rs
+++ b/embassy-stm32/src/pac/stm32f479vg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f479vi.rs b/embassy-stm32/src/pac/stm32f479vi.rs
index 17da2d122..67bdb0390 100644
--- a/embassy-stm32/src/pac/stm32f479vi.rs
+++ b/embassy-stm32/src/pac/stm32f479vi.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f479zg.rs b/embassy-stm32/src/pac/stm32f479zg.rs
index 17da2d122..67bdb0390 100644
--- a/embassy-stm32/src/pac/stm32f479zg.rs
+++ b/embassy-stm32/src/pac/stm32f479zg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32f479zi.rs b/embassy-stm32/src/pac/stm32f479zi.rs
index 17da2d122..67bdb0390 100644
--- a/embassy-stm32/src/pac/stm32f479zi.rs
+++ b/embassy-stm32/src/pac/stm32f479zi.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x40020000 + 0x400 * n) as _) 6 gpio::Gpio((0x40020000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l412c8.rs b/embassy-stm32/src/pac/stm32l412c8.rs
index 8427d5587..5478ea82e 100644
--- a/embassy-stm32/src/pac/stm32l412c8.rs
+++ b/embassy-stm32/src/pac/stm32l412c8.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l412cb.rs b/embassy-stm32/src/pac/stm32l412cb.rs
index 8427d5587..5478ea82e 100644
--- a/embassy-stm32/src/pac/stm32l412cb.rs
+++ b/embassy-stm32/src/pac/stm32l412cb.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l412k8.rs b/embassy-stm32/src/pac/stm32l412k8.rs
index 253602961..f7027eeac 100644
--- a/embassy-stm32/src/pac/stm32l412k8.rs
+++ b/embassy-stm32/src/pac/stm32l412k8.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l412kb.rs b/embassy-stm32/src/pac/stm32l412kb.rs
index 253602961..f7027eeac 100644
--- a/embassy-stm32/src/pac/stm32l412kb.rs
+++ b/embassy-stm32/src/pac/stm32l412kb.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l412r8.rs b/embassy-stm32/src/pac/stm32l412r8.rs
index 8427d5587..5478ea82e 100644
--- a/embassy-stm32/src/pac/stm32l412r8.rs
+++ b/embassy-stm32/src/pac/stm32l412r8.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l412rb.rs b/embassy-stm32/src/pac/stm32l412rb.rs
index 8427d5587..5478ea82e 100644
--- a/embassy-stm32/src/pac/stm32l412rb.rs
+++ b/embassy-stm32/src/pac/stm32l412rb.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l412t8.rs b/embassy-stm32/src/pac/stm32l412t8.rs
index 253602961..f7027eeac 100644
--- a/embassy-stm32/src/pac/stm32l412t8.rs
+++ b/embassy-stm32/src/pac/stm32l412t8.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l412tb.rs b/embassy-stm32/src/pac/stm32l412tb.rs
index 253602961..f7027eeac 100644
--- a/embassy-stm32/src/pac/stm32l412tb.rs
+++ b/embassy-stm32/src/pac/stm32l412tb.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l422cb.rs b/embassy-stm32/src/pac/stm32l422cb.rs
index 5fcd4a2ba..7a85aca7c 100644
--- a/embassy-stm32/src/pac/stm32l422cb.rs
+++ b/embassy-stm32/src/pac/stm32l422cb.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l422kb.rs b/embassy-stm32/src/pac/stm32l422kb.rs
index 03d9a9580..7de35a6c1 100644
--- a/embassy-stm32/src/pac/stm32l422kb.rs
+++ b/embassy-stm32/src/pac/stm32l422kb.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l422rb.rs b/embassy-stm32/src/pac/stm32l422rb.rs
index 5fcd4a2ba..7a85aca7c 100644
--- a/embassy-stm32/src/pac/stm32l422rb.rs
+++ b/embassy-stm32/src/pac/stm32l422rb.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l422tb.rs b/embassy-stm32/src/pac/stm32l422tb.rs
index 03d9a9580..7de35a6c1 100644
--- a/embassy-stm32/src/pac/stm32l422tb.rs
+++ b/embassy-stm32/src/pac/stm32l422tb.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l431cb.rs b/embassy-stm32/src/pac/stm32l431cb.rs
index f718bcf10..cab88d7ae 100644
--- a/embassy-stm32/src/pac/stm32l431cb.rs
+++ b/embassy-stm32/src/pac/stm32l431cb.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l431cc.rs b/embassy-stm32/src/pac/stm32l431cc.rs
index f718bcf10..cab88d7ae 100644
--- a/embassy-stm32/src/pac/stm32l431cc.rs
+++ b/embassy-stm32/src/pac/stm32l431cc.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l431kb.rs b/embassy-stm32/src/pac/stm32l431kb.rs
index 107be4cfb..cb3c2eb5e 100644
--- a/embassy-stm32/src/pac/stm32l431kb.rs
+++ b/embassy-stm32/src/pac/stm32l431kb.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l431kc.rs b/embassy-stm32/src/pac/stm32l431kc.rs
index 107be4cfb..cb3c2eb5e 100644
--- a/embassy-stm32/src/pac/stm32l431kc.rs
+++ b/embassy-stm32/src/pac/stm32l431kc.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l431rb.rs b/embassy-stm32/src/pac/stm32l431rb.rs
index f718bcf10..cab88d7ae 100644
--- a/embassy-stm32/src/pac/stm32l431rb.rs
+++ b/embassy-stm32/src/pac/stm32l431rb.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l431rc.rs b/embassy-stm32/src/pac/stm32l431rc.rs
index f718bcf10..cab88d7ae 100644
--- a/embassy-stm32/src/pac/stm32l431rc.rs
+++ b/embassy-stm32/src/pac/stm32l431rc.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l431vc.rs b/embassy-stm32/src/pac/stm32l431vc.rs
index f718bcf10..cab88d7ae 100644
--- a/embassy-stm32/src/pac/stm32l431vc.rs
+++ b/embassy-stm32/src/pac/stm32l431vc.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l432kb.rs b/embassy-stm32/src/pac/stm32l432kb.rs
index 9e7b655e5..78ef53b1f 100644
--- a/embassy-stm32/src/pac/stm32l432kb.rs
+++ b/embassy-stm32/src/pac/stm32l432kb.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l432kc.rs b/embassy-stm32/src/pac/stm32l432kc.rs
index 9e7b655e5..78ef53b1f 100644
--- a/embassy-stm32/src/pac/stm32l432kc.rs
+++ b/embassy-stm32/src/pac/stm32l432kc.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l433cb.rs b/embassy-stm32/src/pac/stm32l433cb.rs
index 37d1c5132..2736824db 100644
--- a/embassy-stm32/src/pac/stm32l433cb.rs
+++ b/embassy-stm32/src/pac/stm32l433cb.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l433cc.rs b/embassy-stm32/src/pac/stm32l433cc.rs
index 37d1c5132..2736824db 100644
--- a/embassy-stm32/src/pac/stm32l433cc.rs
+++ b/embassy-stm32/src/pac/stm32l433cc.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l433rb.rs b/embassy-stm32/src/pac/stm32l433rb.rs
index 37d1c5132..2736824db 100644
--- a/embassy-stm32/src/pac/stm32l433rb.rs
+++ b/embassy-stm32/src/pac/stm32l433rb.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l433rc.rs b/embassy-stm32/src/pac/stm32l433rc.rs
index 37d1c5132..2736824db 100644
--- a/embassy-stm32/src/pac/stm32l433rc.rs
+++ b/embassy-stm32/src/pac/stm32l433rc.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l433vc.rs b/embassy-stm32/src/pac/stm32l433vc.rs
index 37d1c5132..2736824db 100644
--- a/embassy-stm32/src/pac/stm32l433vc.rs
+++ b/embassy-stm32/src/pac/stm32l433vc.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l442kc.rs b/embassy-stm32/src/pac/stm32l442kc.rs
index 1d26457bf..2bcd51e9f 100644
--- a/embassy-stm32/src/pac/stm32l442kc.rs
+++ b/embassy-stm32/src/pac/stm32l442kc.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l443cc.rs b/embassy-stm32/src/pac/stm32l443cc.rs
index d677d6106..93f7c8bfa 100644
--- a/embassy-stm32/src/pac/stm32l443cc.rs
+++ b/embassy-stm32/src/pac/stm32l443cc.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l443rc.rs b/embassy-stm32/src/pac/stm32l443rc.rs
index d677d6106..93f7c8bfa 100644
--- a/embassy-stm32/src/pac/stm32l443rc.rs
+++ b/embassy-stm32/src/pac/stm32l443rc.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l443vc.rs b/embassy-stm32/src/pac/stm32l443vc.rs
index d677d6106..93f7c8bfa 100644
--- a/embassy-stm32/src/pac/stm32l443vc.rs
+++ b/embassy-stm32/src/pac/stm32l443vc.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l451cc.rs b/embassy-stm32/src/pac/stm32l451cc.rs
index 87c472cd6..031a9af00 100644
--- a/embassy-stm32/src/pac/stm32l451cc.rs
+++ b/embassy-stm32/src/pac/stm32l451cc.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l451ce.rs b/embassy-stm32/src/pac/stm32l451ce.rs
index 87c472cd6..031a9af00 100644
--- a/embassy-stm32/src/pac/stm32l451ce.rs
+++ b/embassy-stm32/src/pac/stm32l451ce.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l451rc.rs b/embassy-stm32/src/pac/stm32l451rc.rs
index 87c472cd6..031a9af00 100644
--- a/embassy-stm32/src/pac/stm32l451rc.rs
+++ b/embassy-stm32/src/pac/stm32l451rc.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l451re.rs b/embassy-stm32/src/pac/stm32l451re.rs
index 87c472cd6..031a9af00 100644
--- a/embassy-stm32/src/pac/stm32l451re.rs
+++ b/embassy-stm32/src/pac/stm32l451re.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l451vc.rs b/embassy-stm32/src/pac/stm32l451vc.rs
index 87c472cd6..031a9af00 100644
--- a/embassy-stm32/src/pac/stm32l451vc.rs
+++ b/embassy-stm32/src/pac/stm32l451vc.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l451ve.rs b/embassy-stm32/src/pac/stm32l451ve.rs
index 87c472cd6..031a9af00 100644
--- a/embassy-stm32/src/pac/stm32l451ve.rs
+++ b/embassy-stm32/src/pac/stm32l451ve.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l452cc.rs b/embassy-stm32/src/pac/stm32l452cc.rs
index bda3893b3..70c0e7e4e 100644
--- a/embassy-stm32/src/pac/stm32l452cc.rs
+++ b/embassy-stm32/src/pac/stm32l452cc.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l452ce.rs b/embassy-stm32/src/pac/stm32l452ce.rs
index bda3893b3..70c0e7e4e 100644
--- a/embassy-stm32/src/pac/stm32l452ce.rs
+++ b/embassy-stm32/src/pac/stm32l452ce.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l452rc.rs b/embassy-stm32/src/pac/stm32l452rc.rs
index bda3893b3..70c0e7e4e 100644
--- a/embassy-stm32/src/pac/stm32l452rc.rs
+++ b/embassy-stm32/src/pac/stm32l452rc.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l452re.rs b/embassy-stm32/src/pac/stm32l452re.rs
index bda3893b3..70c0e7e4e 100644
--- a/embassy-stm32/src/pac/stm32l452re.rs
+++ b/embassy-stm32/src/pac/stm32l452re.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l452vc.rs b/embassy-stm32/src/pac/stm32l452vc.rs
index bda3893b3..70c0e7e4e 100644
--- a/embassy-stm32/src/pac/stm32l452vc.rs
+++ b/embassy-stm32/src/pac/stm32l452vc.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l452ve.rs b/embassy-stm32/src/pac/stm32l452ve.rs
index bda3893b3..70c0e7e4e 100644
--- a/embassy-stm32/src/pac/stm32l452ve.rs
+++ b/embassy-stm32/src/pac/stm32l452ve.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l462ce.rs b/embassy-stm32/src/pac/stm32l462ce.rs
index fddd66b31..5eff9047e 100644
--- a/embassy-stm32/src/pac/stm32l462ce.rs
+++ b/embassy-stm32/src/pac/stm32l462ce.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l462re.rs b/embassy-stm32/src/pac/stm32l462re.rs
index fddd66b31..5eff9047e 100644
--- a/embassy-stm32/src/pac/stm32l462re.rs
+++ b/embassy-stm32/src/pac/stm32l462re.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l462ve.rs b/embassy-stm32/src/pac/stm32l462ve.rs
index fddd66b31..5eff9047e 100644
--- a/embassy-stm32/src/pac/stm32l462ve.rs
+++ b/embassy-stm32/src/pac/stm32l462ve.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l471qe.rs b/embassy-stm32/src/pac/stm32l471qe.rs
index cbb9d325d..719376864 100644
--- a/embassy-stm32/src/pac/stm32l471qe.rs
+++ b/embassy-stm32/src/pac/stm32l471qe.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l471qg.rs b/embassy-stm32/src/pac/stm32l471qg.rs
index cbb9d325d..719376864 100644
--- a/embassy-stm32/src/pac/stm32l471qg.rs
+++ b/embassy-stm32/src/pac/stm32l471qg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l471re.rs b/embassy-stm32/src/pac/stm32l471re.rs
index cbb9d325d..719376864 100644
--- a/embassy-stm32/src/pac/stm32l471re.rs
+++ b/embassy-stm32/src/pac/stm32l471re.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l471rg.rs b/embassy-stm32/src/pac/stm32l471rg.rs
index cbb9d325d..719376864 100644
--- a/embassy-stm32/src/pac/stm32l471rg.rs
+++ b/embassy-stm32/src/pac/stm32l471rg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l471ve.rs b/embassy-stm32/src/pac/stm32l471ve.rs
index cbb9d325d..719376864 100644
--- a/embassy-stm32/src/pac/stm32l471ve.rs
+++ b/embassy-stm32/src/pac/stm32l471ve.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l471vg.rs b/embassy-stm32/src/pac/stm32l471vg.rs
index cbb9d325d..719376864 100644
--- a/embassy-stm32/src/pac/stm32l471vg.rs
+++ b/embassy-stm32/src/pac/stm32l471vg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l471ze.rs b/embassy-stm32/src/pac/stm32l471ze.rs
index cbb9d325d..719376864 100644
--- a/embassy-stm32/src/pac/stm32l471ze.rs
+++ b/embassy-stm32/src/pac/stm32l471ze.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l471zg.rs b/embassy-stm32/src/pac/stm32l471zg.rs
index cbb9d325d..719376864 100644
--- a/embassy-stm32/src/pac/stm32l471zg.rs
+++ b/embassy-stm32/src/pac/stm32l471zg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l475rc.rs b/embassy-stm32/src/pac/stm32l475rc.rs
index 3e4e328e7..5b9937410 100644
--- a/embassy-stm32/src/pac/stm32l475rc.rs
+++ b/embassy-stm32/src/pac/stm32l475rc.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l475re.rs b/embassy-stm32/src/pac/stm32l475re.rs
index 3e4e328e7..5b9937410 100644
--- a/embassy-stm32/src/pac/stm32l475re.rs
+++ b/embassy-stm32/src/pac/stm32l475re.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l475rg.rs b/embassy-stm32/src/pac/stm32l475rg.rs
index 3e4e328e7..5b9937410 100644
--- a/embassy-stm32/src/pac/stm32l475rg.rs
+++ b/embassy-stm32/src/pac/stm32l475rg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l475vc.rs b/embassy-stm32/src/pac/stm32l475vc.rs
index 3e4e328e7..5b9937410 100644
--- a/embassy-stm32/src/pac/stm32l475vc.rs
+++ b/embassy-stm32/src/pac/stm32l475vc.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l475ve.rs b/embassy-stm32/src/pac/stm32l475ve.rs
index 3e4e328e7..5b9937410 100644
--- a/embassy-stm32/src/pac/stm32l475ve.rs
+++ b/embassy-stm32/src/pac/stm32l475ve.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l475vg.rs b/embassy-stm32/src/pac/stm32l475vg.rs
index 3e4e328e7..5b9937410 100644
--- a/embassy-stm32/src/pac/stm32l475vg.rs
+++ b/embassy-stm32/src/pac/stm32l475vg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l476je.rs b/embassy-stm32/src/pac/stm32l476je.rs
index 2a33537ee..1c16aaaba 100644
--- a/embassy-stm32/src/pac/stm32l476je.rs
+++ b/embassy-stm32/src/pac/stm32l476je.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l476jg.rs b/embassy-stm32/src/pac/stm32l476jg.rs
index 2a33537ee..1c16aaaba 100644
--- a/embassy-stm32/src/pac/stm32l476jg.rs
+++ b/embassy-stm32/src/pac/stm32l476jg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l476me.rs b/embassy-stm32/src/pac/stm32l476me.rs
index 2a33537ee..1c16aaaba 100644
--- a/embassy-stm32/src/pac/stm32l476me.rs
+++ b/embassy-stm32/src/pac/stm32l476me.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l476mg.rs b/embassy-stm32/src/pac/stm32l476mg.rs
index 2a33537ee..1c16aaaba 100644
--- a/embassy-stm32/src/pac/stm32l476mg.rs
+++ b/embassy-stm32/src/pac/stm32l476mg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l476qe.rs b/embassy-stm32/src/pac/stm32l476qe.rs
index 2a33537ee..1c16aaaba 100644
--- a/embassy-stm32/src/pac/stm32l476qe.rs
+++ b/embassy-stm32/src/pac/stm32l476qe.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l476qg.rs b/embassy-stm32/src/pac/stm32l476qg.rs
index 2a33537ee..1c16aaaba 100644
--- a/embassy-stm32/src/pac/stm32l476qg.rs
+++ b/embassy-stm32/src/pac/stm32l476qg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l476rc.rs b/embassy-stm32/src/pac/stm32l476rc.rs
index 2a33537ee..1c16aaaba 100644
--- a/embassy-stm32/src/pac/stm32l476rc.rs
+++ b/embassy-stm32/src/pac/stm32l476rc.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l476re.rs b/embassy-stm32/src/pac/stm32l476re.rs
index 2a33537ee..1c16aaaba 100644
--- a/embassy-stm32/src/pac/stm32l476re.rs
+++ b/embassy-stm32/src/pac/stm32l476re.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l476rg.rs b/embassy-stm32/src/pac/stm32l476rg.rs
index 2a33537ee..1c16aaaba 100644
--- a/embassy-stm32/src/pac/stm32l476rg.rs
+++ b/embassy-stm32/src/pac/stm32l476rg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l476vc.rs b/embassy-stm32/src/pac/stm32l476vc.rs
index 2a33537ee..1c16aaaba 100644
--- a/embassy-stm32/src/pac/stm32l476vc.rs
+++ b/embassy-stm32/src/pac/stm32l476vc.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l476ve.rs b/embassy-stm32/src/pac/stm32l476ve.rs
index 2a33537ee..1c16aaaba 100644
--- a/embassy-stm32/src/pac/stm32l476ve.rs
+++ b/embassy-stm32/src/pac/stm32l476ve.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l476vg.rs b/embassy-stm32/src/pac/stm32l476vg.rs
index 2a33537ee..1c16aaaba 100644
--- a/embassy-stm32/src/pac/stm32l476vg.rs
+++ b/embassy-stm32/src/pac/stm32l476vg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l476ze.rs b/embassy-stm32/src/pac/stm32l476ze.rs
index 2a33537ee..1c16aaaba 100644
--- a/embassy-stm32/src/pac/stm32l476ze.rs
+++ b/embassy-stm32/src/pac/stm32l476ze.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l476zg.rs b/embassy-stm32/src/pac/stm32l476zg.rs
index 2a33537ee..1c16aaaba 100644
--- a/embassy-stm32/src/pac/stm32l476zg.rs
+++ b/embassy-stm32/src/pac/stm32l476zg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l485jc.rs b/embassy-stm32/src/pac/stm32l485jc.rs
index 66f7d70a1..c5fb8087f 100644
--- a/embassy-stm32/src/pac/stm32l485jc.rs
+++ b/embassy-stm32/src/pac/stm32l485jc.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l485je.rs b/embassy-stm32/src/pac/stm32l485je.rs
index 66f7d70a1..c5fb8087f 100644
--- a/embassy-stm32/src/pac/stm32l485je.rs
+++ b/embassy-stm32/src/pac/stm32l485je.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l486jg.rs b/embassy-stm32/src/pac/stm32l486jg.rs
index 14e0e6d91..d791c148d 100644
--- a/embassy-stm32/src/pac/stm32l486jg.rs
+++ b/embassy-stm32/src/pac/stm32l486jg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l486qg.rs b/embassy-stm32/src/pac/stm32l486qg.rs
index 14e0e6d91..d791c148d 100644
--- a/embassy-stm32/src/pac/stm32l486qg.rs
+++ b/embassy-stm32/src/pac/stm32l486qg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l486rg.rs b/embassy-stm32/src/pac/stm32l486rg.rs
index 14e0e6d91..d791c148d 100644
--- a/embassy-stm32/src/pac/stm32l486rg.rs
+++ b/embassy-stm32/src/pac/stm32l486rg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l486vg.rs b/embassy-stm32/src/pac/stm32l486vg.rs
index 14e0e6d91..d791c148d 100644
--- a/embassy-stm32/src/pac/stm32l486vg.rs
+++ b/embassy-stm32/src/pac/stm32l486vg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l486zg.rs b/embassy-stm32/src/pac/stm32l486zg.rs
index 14e0e6d91..d791c148d 100644
--- a/embassy-stm32/src/pac/stm32l486zg.rs
+++ b/embassy-stm32/src/pac/stm32l486zg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l496ae.rs b/embassy-stm32/src/pac/stm32l496ae.rs
index b539d5190..336533a16 100644
--- a/embassy-stm32/src/pac/stm32l496ae.rs
+++ b/embassy-stm32/src/pac/stm32l496ae.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l496ag.rs b/embassy-stm32/src/pac/stm32l496ag.rs
index b539d5190..336533a16 100644
--- a/embassy-stm32/src/pac/stm32l496ag.rs
+++ b/embassy-stm32/src/pac/stm32l496ag.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l496qe.rs b/embassy-stm32/src/pac/stm32l496qe.rs
index b539d5190..336533a16 100644
--- a/embassy-stm32/src/pac/stm32l496qe.rs
+++ b/embassy-stm32/src/pac/stm32l496qe.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l496qg.rs b/embassy-stm32/src/pac/stm32l496qg.rs
index b539d5190..336533a16 100644
--- a/embassy-stm32/src/pac/stm32l496qg.rs
+++ b/embassy-stm32/src/pac/stm32l496qg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l496re.rs b/embassy-stm32/src/pac/stm32l496re.rs
index b539d5190..336533a16 100644
--- a/embassy-stm32/src/pac/stm32l496re.rs
+++ b/embassy-stm32/src/pac/stm32l496re.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l496rg.rs b/embassy-stm32/src/pac/stm32l496rg.rs
index b539d5190..336533a16 100644
--- a/embassy-stm32/src/pac/stm32l496rg.rs
+++ b/embassy-stm32/src/pac/stm32l496rg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l496ve.rs b/embassy-stm32/src/pac/stm32l496ve.rs
index b539d5190..336533a16 100644
--- a/embassy-stm32/src/pac/stm32l496ve.rs
+++ b/embassy-stm32/src/pac/stm32l496ve.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l496vg.rs b/embassy-stm32/src/pac/stm32l496vg.rs
index b539d5190..336533a16 100644
--- a/embassy-stm32/src/pac/stm32l496vg.rs
+++ b/embassy-stm32/src/pac/stm32l496vg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l496wg.rs b/embassy-stm32/src/pac/stm32l496wg.rs
index b539d5190..336533a16 100644
--- a/embassy-stm32/src/pac/stm32l496wg.rs
+++ b/embassy-stm32/src/pac/stm32l496wg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l496ze.rs b/embassy-stm32/src/pac/stm32l496ze.rs
index b539d5190..336533a16 100644
--- a/embassy-stm32/src/pac/stm32l496ze.rs
+++ b/embassy-stm32/src/pac/stm32l496ze.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l496zg.rs b/embassy-stm32/src/pac/stm32l496zg.rs
index b539d5190..336533a16 100644
--- a/embassy-stm32/src/pac/stm32l496zg.rs
+++ b/embassy-stm32/src/pac/stm32l496zg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l4a6ag.rs b/embassy-stm32/src/pac/stm32l4a6ag.rs
index 85af8eeef..2bc671656 100644
--- a/embassy-stm32/src/pac/stm32l4a6ag.rs
+++ b/embassy-stm32/src/pac/stm32l4a6ag.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l4a6qg.rs b/embassy-stm32/src/pac/stm32l4a6qg.rs
index 85af8eeef..2bc671656 100644
--- a/embassy-stm32/src/pac/stm32l4a6qg.rs
+++ b/embassy-stm32/src/pac/stm32l4a6qg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l4a6rg.rs b/embassy-stm32/src/pac/stm32l4a6rg.rs
index 85af8eeef..2bc671656 100644
--- a/embassy-stm32/src/pac/stm32l4a6rg.rs
+++ b/embassy-stm32/src/pac/stm32l4a6rg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l4a6vg.rs b/embassy-stm32/src/pac/stm32l4a6vg.rs
index 85af8eeef..2bc671656 100644
--- a/embassy-stm32/src/pac/stm32l4a6vg.rs
+++ b/embassy-stm32/src/pac/stm32l4a6vg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l4a6zg.rs b/embassy-stm32/src/pac/stm32l4a6zg.rs
index 85af8eeef..2bc671656 100644
--- a/embassy-stm32/src/pac/stm32l4a6zg.rs
+++ b/embassy-stm32/src/pac/stm32l4a6zg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l4p5ae.rs b/embassy-stm32/src/pac/stm32l4p5ae.rs
index febb8c60b..7d8ca0863 100644
--- a/embassy-stm32/src/pac/stm32l4p5ae.rs
+++ b/embassy-stm32/src/pac/stm32l4p5ae.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l4p5ag.rs b/embassy-stm32/src/pac/stm32l4p5ag.rs
index febb8c60b..7d8ca0863 100644
--- a/embassy-stm32/src/pac/stm32l4p5ag.rs
+++ b/embassy-stm32/src/pac/stm32l4p5ag.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l4p5ce.rs b/embassy-stm32/src/pac/stm32l4p5ce.rs
index febb8c60b..7d8ca0863 100644
--- a/embassy-stm32/src/pac/stm32l4p5ce.rs
+++ b/embassy-stm32/src/pac/stm32l4p5ce.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l4p5cg.rs b/embassy-stm32/src/pac/stm32l4p5cg.rs
index febb8c60b..7d8ca0863 100644
--- a/embassy-stm32/src/pac/stm32l4p5cg.rs
+++ b/embassy-stm32/src/pac/stm32l4p5cg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l4p5qe.rs b/embassy-stm32/src/pac/stm32l4p5qe.rs
index febb8c60b..7d8ca0863 100644
--- a/embassy-stm32/src/pac/stm32l4p5qe.rs
+++ b/embassy-stm32/src/pac/stm32l4p5qe.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l4p5qg.rs b/embassy-stm32/src/pac/stm32l4p5qg.rs
index febb8c60b..7d8ca0863 100644
--- a/embassy-stm32/src/pac/stm32l4p5qg.rs
+++ b/embassy-stm32/src/pac/stm32l4p5qg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l4p5re.rs b/embassy-stm32/src/pac/stm32l4p5re.rs
index febb8c60b..7d8ca0863 100644
--- a/embassy-stm32/src/pac/stm32l4p5re.rs
+++ b/embassy-stm32/src/pac/stm32l4p5re.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l4p5rg.rs b/embassy-stm32/src/pac/stm32l4p5rg.rs
index febb8c60b..7d8ca0863 100644
--- a/embassy-stm32/src/pac/stm32l4p5rg.rs
+++ b/embassy-stm32/src/pac/stm32l4p5rg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l4p5ve.rs b/embassy-stm32/src/pac/stm32l4p5ve.rs
index febb8c60b..7d8ca0863 100644
--- a/embassy-stm32/src/pac/stm32l4p5ve.rs
+++ b/embassy-stm32/src/pac/stm32l4p5ve.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l4p5vg.rs b/embassy-stm32/src/pac/stm32l4p5vg.rs
index febb8c60b..7d8ca0863 100644
--- a/embassy-stm32/src/pac/stm32l4p5vg.rs
+++ b/embassy-stm32/src/pac/stm32l4p5vg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l4p5ze.rs b/embassy-stm32/src/pac/stm32l4p5ze.rs
index febb8c60b..7d8ca0863 100644
--- a/embassy-stm32/src/pac/stm32l4p5ze.rs
+++ b/embassy-stm32/src/pac/stm32l4p5ze.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l4p5zg.rs b/embassy-stm32/src/pac/stm32l4p5zg.rs
index febb8c60b..7d8ca0863 100644
--- a/embassy-stm32/src/pac/stm32l4p5zg.rs
+++ b/embassy-stm32/src/pac/stm32l4p5zg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l4q5ag.rs b/embassy-stm32/src/pac/stm32l4q5ag.rs
index 31d2f1038..03c5b6793 100644
--- a/embassy-stm32/src/pac/stm32l4q5ag.rs
+++ b/embassy-stm32/src/pac/stm32l4q5ag.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l4q5cg.rs b/embassy-stm32/src/pac/stm32l4q5cg.rs
index 31d2f1038..03c5b6793 100644
--- a/embassy-stm32/src/pac/stm32l4q5cg.rs
+++ b/embassy-stm32/src/pac/stm32l4q5cg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l4q5qg.rs b/embassy-stm32/src/pac/stm32l4q5qg.rs
index 31d2f1038..03c5b6793 100644
--- a/embassy-stm32/src/pac/stm32l4q5qg.rs
+++ b/embassy-stm32/src/pac/stm32l4q5qg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l4q5rg.rs b/embassy-stm32/src/pac/stm32l4q5rg.rs
index 31d2f1038..03c5b6793 100644
--- a/embassy-stm32/src/pac/stm32l4q5rg.rs
+++ b/embassy-stm32/src/pac/stm32l4q5rg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l4q5vg.rs b/embassy-stm32/src/pac/stm32l4q5vg.rs
index 31d2f1038..03c5b6793 100644
--- a/embassy-stm32/src/pac/stm32l4q5vg.rs
+++ b/embassy-stm32/src/pac/stm32l4q5vg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l4q5zg.rs b/embassy-stm32/src/pac/stm32l4q5zg.rs
index 31d2f1038..03c5b6793 100644
--- a/embassy-stm32/src/pac/stm32l4q5zg.rs
+++ b/embassy-stm32/src/pac/stm32l4q5zg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l4r5ag.rs b/embassy-stm32/src/pac/stm32l4r5ag.rs
index 13145983d..70339417f 100644
--- a/embassy-stm32/src/pac/stm32l4r5ag.rs
+++ b/embassy-stm32/src/pac/stm32l4r5ag.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l4r5ai.rs b/embassy-stm32/src/pac/stm32l4r5ai.rs
index 13145983d..70339417f 100644
--- a/embassy-stm32/src/pac/stm32l4r5ai.rs
+++ b/embassy-stm32/src/pac/stm32l4r5ai.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l4r5qg.rs b/embassy-stm32/src/pac/stm32l4r5qg.rs
index 13145983d..70339417f 100644
--- a/embassy-stm32/src/pac/stm32l4r5qg.rs
+++ b/embassy-stm32/src/pac/stm32l4r5qg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l4r5qi.rs b/embassy-stm32/src/pac/stm32l4r5qi.rs
index 13145983d..70339417f 100644
--- a/embassy-stm32/src/pac/stm32l4r5qi.rs
+++ b/embassy-stm32/src/pac/stm32l4r5qi.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l4r5vg.rs b/embassy-stm32/src/pac/stm32l4r5vg.rs
index 13145983d..70339417f 100644
--- a/embassy-stm32/src/pac/stm32l4r5vg.rs
+++ b/embassy-stm32/src/pac/stm32l4r5vg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l4r5vi.rs b/embassy-stm32/src/pac/stm32l4r5vi.rs
index 13145983d..70339417f 100644
--- a/embassy-stm32/src/pac/stm32l4r5vi.rs
+++ b/embassy-stm32/src/pac/stm32l4r5vi.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l4r5zg.rs b/embassy-stm32/src/pac/stm32l4r5zg.rs
index 13145983d..70339417f 100644
--- a/embassy-stm32/src/pac/stm32l4r5zg.rs
+++ b/embassy-stm32/src/pac/stm32l4r5zg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l4r5zi.rs b/embassy-stm32/src/pac/stm32l4r5zi.rs
index 13145983d..70339417f 100644
--- a/embassy-stm32/src/pac/stm32l4r5zi.rs
+++ b/embassy-stm32/src/pac/stm32l4r5zi.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l4r7ai.rs b/embassy-stm32/src/pac/stm32l4r7ai.rs
index 295f7b0a9..9d88e59af 100644
--- a/embassy-stm32/src/pac/stm32l4r7ai.rs
+++ b/embassy-stm32/src/pac/stm32l4r7ai.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l4r7vi.rs b/embassy-stm32/src/pac/stm32l4r7vi.rs
index 295f7b0a9..9d88e59af 100644
--- a/embassy-stm32/src/pac/stm32l4r7vi.rs
+++ b/embassy-stm32/src/pac/stm32l4r7vi.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l4r7zi.rs b/embassy-stm32/src/pac/stm32l4r7zi.rs
index 295f7b0a9..9d88e59af 100644
--- a/embassy-stm32/src/pac/stm32l4r7zi.rs
+++ b/embassy-stm32/src/pac/stm32l4r7zi.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l4r9ag.rs b/embassy-stm32/src/pac/stm32l4r9ag.rs
index 638ae31c1..edb5287c2 100644
--- a/embassy-stm32/src/pac/stm32l4r9ag.rs
+++ b/embassy-stm32/src/pac/stm32l4r9ag.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l4r9ai.rs b/embassy-stm32/src/pac/stm32l4r9ai.rs
index 638ae31c1..edb5287c2 100644
--- a/embassy-stm32/src/pac/stm32l4r9ai.rs
+++ b/embassy-stm32/src/pac/stm32l4r9ai.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l4r9vg.rs b/embassy-stm32/src/pac/stm32l4r9vg.rs
index 638ae31c1..edb5287c2 100644
--- a/embassy-stm32/src/pac/stm32l4r9vg.rs
+++ b/embassy-stm32/src/pac/stm32l4r9vg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l4r9vi.rs b/embassy-stm32/src/pac/stm32l4r9vi.rs
index 638ae31c1..edb5287c2 100644
--- a/embassy-stm32/src/pac/stm32l4r9vi.rs
+++ b/embassy-stm32/src/pac/stm32l4r9vi.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l4r9zg.rs b/embassy-stm32/src/pac/stm32l4r9zg.rs
index 638ae31c1..edb5287c2 100644
--- a/embassy-stm32/src/pac/stm32l4r9zg.rs
+++ b/embassy-stm32/src/pac/stm32l4r9zg.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l4r9zi.rs b/embassy-stm32/src/pac/stm32l4r9zi.rs
index 638ae31c1..edb5287c2 100644
--- a/embassy-stm32/src/pac/stm32l4r9zi.rs
+++ b/embassy-stm32/src/pac/stm32l4r9zi.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l4s5ai.rs b/embassy-stm32/src/pac/stm32l4s5ai.rs
index 43368de84..e7d2eb0ce 100644
--- a/embassy-stm32/src/pac/stm32l4s5ai.rs
+++ b/embassy-stm32/src/pac/stm32l4s5ai.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l4s5qi.rs b/embassy-stm32/src/pac/stm32l4s5qi.rs
index 43368de84..e7d2eb0ce 100644
--- a/embassy-stm32/src/pac/stm32l4s5qi.rs
+++ b/embassy-stm32/src/pac/stm32l4s5qi.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l4s5vi.rs b/embassy-stm32/src/pac/stm32l4s5vi.rs
index 43368de84..e7d2eb0ce 100644
--- a/embassy-stm32/src/pac/stm32l4s5vi.rs
+++ b/embassy-stm32/src/pac/stm32l4s5vi.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l4s5zi.rs b/embassy-stm32/src/pac/stm32l4s5zi.rs
index 43368de84..e7d2eb0ce 100644
--- a/embassy-stm32/src/pac/stm32l4s5zi.rs
+++ b/embassy-stm32/src/pac/stm32l4s5zi.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l4s7ai.rs b/embassy-stm32/src/pac/stm32l4s7ai.rs
index 76e53d066..072ffc23b 100644
--- a/embassy-stm32/src/pac/stm32l4s7ai.rs
+++ b/embassy-stm32/src/pac/stm32l4s7ai.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l4s7vi.rs b/embassy-stm32/src/pac/stm32l4s7vi.rs
index 76e53d066..072ffc23b 100644
--- a/embassy-stm32/src/pac/stm32l4s7vi.rs
+++ b/embassy-stm32/src/pac/stm32l4s7vi.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l4s7zi.rs b/embassy-stm32/src/pac/stm32l4s7zi.rs
index 76e53d066..072ffc23b 100644
--- a/embassy-stm32/src/pac/stm32l4s7zi.rs
+++ b/embassy-stm32/src/pac/stm32l4s7zi.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l4s9ai.rs b/embassy-stm32/src/pac/stm32l4s9ai.rs
index 2bf7b4bdd..c3ef398d3 100644
--- a/embassy-stm32/src/pac/stm32l4s9ai.rs
+++ b/embassy-stm32/src/pac/stm32l4s9ai.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l4s9vi.rs b/embassy-stm32/src/pac/stm32l4s9vi.rs
index 2bf7b4bdd..c3ef398d3 100644
--- a/embassy-stm32/src/pac/stm32l4s9vi.rs
+++ b/embassy-stm32/src/pac/stm32l4s9vi.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);
diff --git a/embassy-stm32/src/pac/stm32l4s9zi.rs b/embassy-stm32/src/pac/stm32l4s9zi.rs
index 2bf7b4bdd..c3ef398d3 100644
--- a/embassy-stm32/src/pac/stm32l4s9zi.rs
+++ b/embassy-stm32/src/pac/stm32l4s9zi.rs
@@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio {
6 gpio::Gpio((0x48000000 + 0x400 * n) as _) 6 gpio::Gpio((0x48000000 + 0x400 * n) as _)
7} 7}
8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); 8pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _);
9impl_dma_channel!(DMA1_CH0, 1, 0); 9impl_dma_channel!(DMA1_CH0, DMA1, 0);
10impl_dma_channel!(DMA1_CH1, 1, 1); 10impl_dma_channel!(DMA1_CH1, DMA1, 1);
11impl_dma_channel!(DMA1_CH2, 1, 2); 11impl_dma_channel!(DMA1_CH2, DMA1, 2);
12impl_dma_channel!(DMA1_CH3, 1, 3); 12impl_dma_channel!(DMA1_CH3, DMA1, 3);
13impl_dma_channel!(DMA1_CH4, 1, 4); 13impl_dma_channel!(DMA1_CH4, DMA1, 4);
14impl_dma_channel!(DMA1_CH5, 1, 5); 14impl_dma_channel!(DMA1_CH5, DMA1, 5);
15impl_dma_channel!(DMA1_CH6, 1, 6); 15impl_dma_channel!(DMA1_CH6, DMA1, 6);
16impl_dma_channel!(DMA1_CH7, 1, 7); 16impl_dma_channel!(DMA1_CH7, DMA1, 7);
17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); 17pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _);
18impl_dma_channel!(DMA2_CH0, 2, 0); 18impl_dma_channel!(DMA2_CH0, DMA2, 0);
19impl_dma_channel!(DMA2_CH1, 2, 1); 19impl_dma_channel!(DMA2_CH1, DMA2, 1);
20impl_dma_channel!(DMA2_CH2, 2, 2); 20impl_dma_channel!(DMA2_CH2, DMA2, 2);
21impl_dma_channel!(DMA2_CH3, 2, 3); 21impl_dma_channel!(DMA2_CH3, DMA2, 3);
22impl_dma_channel!(DMA2_CH4, 2, 4); 22impl_dma_channel!(DMA2_CH4, DMA2, 4);
23impl_dma_channel!(DMA2_CH5, 2, 5); 23impl_dma_channel!(DMA2_CH5, DMA2, 5);
24impl_dma_channel!(DMA2_CH6, 2, 6); 24impl_dma_channel!(DMA2_CH6, DMA2, 6);
25impl_dma_channel!(DMA2_CH7, 2, 7); 25impl_dma_channel!(DMA2_CH7, DMA2, 7);
26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); 26pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _);
27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); 27pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _);
28impl_gpio_pin!(PA0, 0, 0, EXTI0); 28impl_gpio_pin!(PA0, 0, 0, EXTI0);