aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThales Fragoso <[email protected]>2021-05-09 17:36:13 -0300
committerThales Fragoso <[email protected]>2021-05-14 23:42:09 -0300
commit490152d02892ed7478c3920a2eb7373af66be90f (patch)
treeec0e804c9ae8bbb7521256d5f063de66a671a99a
parent72fb3a75200e143dbdfc1df6aec29a99adb7491d (diff)
Better interrupt handling
-rw-r--r--embassy-stm32/gen.py4
-rw-r--r--embassy-stm32/src/pac/regs.rs14851
-rw-r--r--embassy-stm32/src/pac/stm32f401cb.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f401cc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f401cd.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f401ce.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f401rb.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f401rc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f401rd.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f401re.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f401vb.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f401vc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f401vd.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f401ve.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f405oe.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f405og.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f405rg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f405vg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f405zg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f407ie.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f407ig.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f407ve.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f407vg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f407ze.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f407zg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f410c8.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f410cb.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f410r8.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f410rb.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f410t8.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f410tb.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f411cc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f411ce.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f411rc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f411re.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f411vc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f411ve.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f412ce.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f412cg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f412re.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f412rg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f412ve.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f412vg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f412ze.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f412zg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f413cg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f413ch.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f413mg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f413mh.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f413rg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f413rh.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f413vg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f413vh.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f413zg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f413zh.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f415og.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f415rg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f415vg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f415zg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f417ie.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f417ig.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f417ve.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f417vg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f417ze.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f417zg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f423ch.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f423mh.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f423rh.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f423vh.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f423zh.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f427ag.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f427ai.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f427ig.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f427ii.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f427vg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f427vi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f427zg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f427zi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f429ag.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f429ai.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f429be.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f429bg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f429bi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f429ie.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f429ig.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f429ii.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f429ne.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f429ng.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f429ni.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f429ve.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f429vg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f429vi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f429ze.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f429zg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f429zi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f437ai.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f437ig.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f437ii.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f437vg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f437vi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f437zg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f437zi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f439ai.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f439bg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f439bi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f439ig.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f439ii.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f439ng.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f439ni.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f439vg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f439vi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f439zg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f439zi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f446mc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f446me.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f446rc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f446re.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f446vc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f446ve.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f446zc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f446ze.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f469ae.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f469ag.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f469ai.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f469be.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f469bg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f469bi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f469ie.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f469ig.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f469ii.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f469ne.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f469ng.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f469ni.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f469ve.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f469vg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f469vi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f469ze.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f469zg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f469zi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f479ag.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f479ai.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f479bg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f479bi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f479ig.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f479ii.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f479ng.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f479ni.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f479vg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f479vi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f479zg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32f479zi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32h723ve.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h723vg.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h723ze.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h723zg.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h725ae.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h725ag.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h725ie.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h725ig.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h725re.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h725rg.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h725ve.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h725vg.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h725ze.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h725zg.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h730ab.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h730ib.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h730vb.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h730zb.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h733vg.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h733zg.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h735ag.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h735ig.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h735rg.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h735vg.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h735zg.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h742ag.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h742ai.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h742bg.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h742bi.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h742ig.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h742ii.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h742vg.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h742vi.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h742xg.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h742xi.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h742zg.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h742zi.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h743ag.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h743ai.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h743bg.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h743bi.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h743ig.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h743ii.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h743vg.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h743vi.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h743xg.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h743xi.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h743zg.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h743zi.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h745bg.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h745bi.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h745ig.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h745ii.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h745xg.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h745xi.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h745zg.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h745zi.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h747ag.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h747ai.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h747bg.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h747bi.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h747ig.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h747ii.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h747xg.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h747xi.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h747zi.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h750ib.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h750vb.rs4
-rw-r--r--embassy-stm32/src/pac/stm32h750xb.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h750zb.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h753ai.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h753bi.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h753ii.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h753vi.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h753xi.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h753zi.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h755bi.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h755ii.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h755xi.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h755zi.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h757ai.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h757bi.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h757ii.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h757xi.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h757zi.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h7a3ag.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h7a3ai.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h7a3ig.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h7a3ii.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h7a3lg.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h7a3li.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h7a3ng.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h7a3ni.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h7a3qi.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h7a3rg.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h7a3ri.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h7a3vg.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h7a3vi.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h7a3zg.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h7a3zi.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h7b0ab.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h7b0ib.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h7b0rb.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h7b0vb.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h7b0zb.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h7b3ai.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h7b3ii.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h7b3li.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h7b3ni.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h7b3qi.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h7b3ri.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h7b3vi.rs6
-rw-r--r--embassy-stm32/src/pac/stm32h7b3zi.rs6
-rw-r--r--embassy-stm32/src/pac/stm32l412c8.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l412cb.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l412k8.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l412kb.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l412r8.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l412rb.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l412t8.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l412tb.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l422cb.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l422kb.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l422rb.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l422tb.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l431cb.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l431cc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l431kb.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l431kc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l431rb.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l431rc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l431vc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l432kb.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l432kc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l433cb.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l433cc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l433rb.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l433rc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l433vc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l442kc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l443cc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l443rc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l443vc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l451cc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l451ce.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l451rc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l451re.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l451vc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l451ve.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l452cc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l452ce.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l452rc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l452re.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l452vc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l452ve.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l462ce.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l462re.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l462ve.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l471qe.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l471qg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l471re.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l471rg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l471ve.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l471vg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l471ze.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l471zg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l475rc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l475re.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l475rg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l475vc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l475ve.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l475vg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l476je.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l476jg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l476me.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l476mg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l476qe.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l476qg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l476rc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l476re.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l476rg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l476vc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l476ve.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l476vg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l476ze.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l476zg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l485jc.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l485je.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l486jg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l486qg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l486rg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l486vg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l486zg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l496ae.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l496ag.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l496qe.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l496qg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l496re.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l496rg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l496ve.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l496vg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l496wg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l496ze.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l496zg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4a6ag.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4a6qg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4a6rg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4a6vg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4a6zg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4p5ae.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4p5ag.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4p5ce.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4p5cg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4p5qe.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4p5qg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4p5re.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4p5rg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4p5ve.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4p5vg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4p5ze.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4p5zg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4q5ag.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4q5cg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4q5qg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4q5rg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4q5vg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4q5zg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4r5ag.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4r5ai.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4r5qg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4r5qi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4r5vg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4r5vi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4r5zg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4r5zi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4r7ai.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4r7vi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4r7zi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4r9ag.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4r9ai.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4r9vg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4r9vi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4r9zg.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4r9zi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4s5ai.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4s5qi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4s5vi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4s5zi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4s7ai.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4s7vi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4s7zi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4s9ai.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4s9vi.rs2
-rw-r--r--embassy-stm32/src/pac/stm32l4s9zi.rs2
-rw-r--r--embassy-stm32/src/sdmmc_v2.rs767
-rw-r--r--embassy/src/util/mod.rs41
407 files changed, 15620 insertions, 1299 deletions
diff --git a/embassy-stm32/gen.py b/embassy-stm32/gen.py
index 15bb8acee..23a4c7eb8 100644
--- a/embassy-stm32/gen.py
+++ b/embassy-stm32/gen.py
@@ -151,7 +151,7 @@ for chip in chips.values():
151 f.write(f'impl_dma_channel!({channel}, {name}, {ch_num});') 151 f.write(f'impl_dma_channel!({channel}, {name}, {ch_num});')
152 152
153 if peri['block'] == 'sdmmc_v2/SDMMC': 153 if peri['block'] == 'sdmmc_v2/SDMMC':
154 f.write(f'impl_sdmmc!({name}, 0x{peri["address"]:x});') 154 f.write(f'impl_sdmmc!({name});')
155 for pin, funcs in af.items(): 155 for pin, funcs in af.items():
156 if pin in pins: 156 if pin in pins:
157 if func := funcs.get(f'{name}_CK'): 157 if func := funcs.get(f'{name}_CK'):
@@ -215,7 +215,7 @@ for chip in chips.values():
215 215
216 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 216 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
217 #[allow(non_camel_case_types)] 217 #[allow(non_camel_case_types)]
218 enum InterruptEnum {{ 218 pub enum InterruptEnum {{
219 {''.join(irq_variants)} 219 {''.join(irq_variants)}
220 }} 220 }}
221 unsafe impl cortex_m::interrupt::InterruptNumber for InterruptEnum {{ 221 unsafe impl cortex_m::interrupt::InterruptNumber for InterruptEnum {{
diff --git a/embassy-stm32/src/pac/regs.rs b/embassy-stm32/src/pac/regs.rs
index 1adb6ca05..0a9c50da7 100644
--- a/embassy-stm32/src/pac/regs.rs
+++ b/embassy-stm32/src/pac/regs.rs
@@ -55,6 +55,142 @@ pub mod dma_v2 {
55 unsafe { St(self.0.add(16usize + n * 24usize)) } 55 unsafe { St(self.0.add(16usize + n * 24usize)) }
56 } 56 }
57 } 57 }
58 pub mod vals {
59 use crate::generic::*;
60 #[repr(transparent)]
61 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
62 pub struct Pupdr(pub u8);
63 impl Pupdr {
64 #[doc = "No pull-up, pull-down"]
65 pub const FLOATING: Self = Self(0);
66 #[doc = "Pull-up"]
67 pub const PULLUP: Self = Self(0x01);
68 #[doc = "Pull-down"]
69 pub const PULLDOWN: Self = Self(0x02);
70 }
71 #[repr(transparent)]
72 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
73 pub struct Ospeedr(pub u8);
74 impl Ospeedr {
75 #[doc = "Low speed"]
76 pub const LOWSPEED: Self = Self(0);
77 #[doc = "Medium speed"]
78 pub const MEDIUMSPEED: Self = Self(0x01);
79 #[doc = "High speed"]
80 pub const HIGHSPEED: Self = Self(0x02);
81 #[doc = "Very high speed"]
82 pub const VERYHIGHSPEED: Self = Self(0x03);
83 }
84 #[repr(transparent)]
85 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
86 pub struct Ot(pub u8);
87 impl Ot {
88 #[doc = "Output push-pull (reset state)"]
89 pub const PUSHPULL: Self = Self(0);
90 #[doc = "Output open-drain"]
91 pub const OPENDRAIN: Self = Self(0x01);
92 }
93 #[repr(transparent)]
94 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
95 pub struct Bsw(pub u8);
96 impl Bsw {
97 #[doc = "Sets the corresponding ODRx bit"]
98 pub const SET: Self = Self(0x01);
99 }
100 #[repr(transparent)]
101 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
102 pub struct Lckk(pub u8);
103 impl Lckk {
104 #[doc = "Port configuration lock key not active"]
105 pub const NOTACTIVE: Self = Self(0);
106 #[doc = "Port configuration lock key active"]
107 pub const ACTIVE: Self = Self(0x01);
108 }
109 #[repr(transparent)]
110 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
111 pub struct Odr(pub u8);
112 impl Odr {
113 #[doc = "Set output to logic low"]
114 pub const LOW: Self = Self(0);
115 #[doc = "Set output to logic high"]
116 pub const HIGH: Self = Self(0x01);
117 }
118 #[repr(transparent)]
119 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
120 pub struct Idr(pub u8);
121 impl Idr {
122 #[doc = "Input is logic low"]
123 pub const LOW: Self = Self(0);
124 #[doc = "Input is logic high"]
125 pub const HIGH: Self = Self(0x01);
126 }
127 #[repr(transparent)]
128 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
129 pub struct Moder(pub u8);
130 impl Moder {
131 #[doc = "Input mode (reset state)"]
132 pub const INPUT: Self = Self(0);
133 #[doc = "General purpose output mode"]
134 pub const OUTPUT: Self = Self(0x01);
135 #[doc = "Alternate function mode"]
136 pub const ALTERNATE: Self = Self(0x02);
137 #[doc = "Analog mode"]
138 pub const ANALOG: Self = Self(0x03);
139 }
140 #[repr(transparent)]
141 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
142 pub struct Lck(pub u8);
143 impl Lck {
144 #[doc = "Port configuration not locked"]
145 pub const UNLOCKED: Self = Self(0);
146 #[doc = "Port configuration locked"]
147 pub const LOCKED: Self = Self(0x01);
148 }
149 #[repr(transparent)]
150 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
151 pub struct Brw(pub u8);
152 impl Brw {
153 #[doc = "Resets the corresponding ODRx bit"]
154 pub const RESET: Self = Self(0x01);
155 }
156 #[repr(transparent)]
157 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
158 pub struct Afr(pub u8);
159 impl Afr {
160 #[doc = "AF0"]
161 pub const AF0: Self = Self(0);
162 #[doc = "AF1"]
163 pub const AF1: Self = Self(0x01);
164 #[doc = "AF2"]
165 pub const AF2: Self = Self(0x02);
166 #[doc = "AF3"]
167 pub const AF3: Self = Self(0x03);
168 #[doc = "AF4"]
169 pub const AF4: Self = Self(0x04);
170 #[doc = "AF5"]
171 pub const AF5: Self = Self(0x05);
172 #[doc = "AF6"]
173 pub const AF6: Self = Self(0x06);
174 #[doc = "AF7"]
175 pub const AF7: Self = Self(0x07);
176 #[doc = "AF8"]
177 pub const AF8: Self = Self(0x08);
178 #[doc = "AF9"]
179 pub const AF9: Self = Self(0x09);
180 #[doc = "AF10"]
181 pub const AF10: Self = Self(0x0a);
182 #[doc = "AF11"]
183 pub const AF11: Self = Self(0x0b);
184 #[doc = "AF12"]
185 pub const AF12: Self = Self(0x0c);
186 #[doc = "AF13"]
187 pub const AF13: Self = Self(0x0d);
188 #[doc = "AF14"]
189 pub const AF14: Self = Self(0x0e);
190 #[doc = "AF15"]
191 pub const AF15: Self = Self(0x0f);
192 }
193 }
58 pub mod regs { 194 pub mod regs {
59 use crate::generic::*; 195 use crate::generic::*;
60 #[doc = "stream x number of data register"] 196 #[doc = "stream x number of data register"]
@@ -87,13 +223,21 @@ pub mod dma_v2 {
87 assert!(n < 4usize); 223 assert!(n < 4usize);
88 let offs = 0usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); 224 let offs = 0usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
89 let val = (self.0 >> offs) & 0x01; 225 let val = (self.0 >> offs) & 0x01;
90 val != 0 226 super::vals::Ot(val as u8)
91 } 227 }
228<<<<<<< HEAD
92 #[doc = "Stream x clear FIFO error interrupt flag (x = 3..0)"] 229 #[doc = "Stream x clear FIFO error interrupt flag (x = 3..0)"]
93 pub fn set_cfeif(&mut self, n: usize, val: bool) { 230 pub fn set_cfeif(&mut self, n: usize, val: bool) {
94 assert!(n < 4usize); 231 assert!(n < 4usize);
95 let offs = 0usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); 232 let offs = 0usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
96 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); 233 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
234=======
235 #[doc = "Set bit"]
236 pub fn set_bs(&mut self, n: usize, val: bool) {
237 assert!(n < 16usize);
238 let offs = 0usize + n * 1usize;
239 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs);
240>>>>>>> fc21f52 (Better interrupt handling)
97 } 241 }
98 #[doc = "Stream x clear direct mode error interrupt flag (x = 3..0)"] 242 #[doc = "Stream x clear direct mode error interrupt flag (x = 3..0)"]
99 pub fn cdmeif(&self, n: usize) -> bool { 243 pub fn cdmeif(&self, n: usize) -> bool {
@@ -139,6 +283,7 @@ pub mod dma_v2 {
139 assert!(n < 4usize); 283 assert!(n < 4usize);
140 let offs = 5usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); 284 let offs = 5usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
141 let val = (self.0 >> offs) & 0x01; 285 let val = (self.0 >> offs) & 0x01;
286<<<<<<< HEAD
142 val != 0 287 val != 0
143 } 288 }
144 #[doc = "Stream x clear transfer complete interrupt flag (x = 3..0)"] 289 #[doc = "Stream x clear transfer complete interrupt flag (x = 3..0)"]
@@ -154,6 +299,28 @@ pub mod dma_v2 {
154 } 299 }
155 } 300 }
156 #[doc = "low interrupt status register"] 301 #[doc = "low interrupt status register"]
302=======
303 super::vals::Lck(val as u8)
304 }
305 #[doc = "Port output data"]
306 pub fn set_odr(&mut self, n: usize, val: super::vals::Odr) {
307 assert!(n < 16usize);
308 let offs = 0usize + n * 1usize;
309 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs);
310 #[doc = "Port x lock bit y (y= 0..15)"]
311 pub const fn lckk(&self) -> super::vals::Lckk {
312 pub fn set_lckk(&mut self, val: super::vals::Lckk) {
313 self.0 = (self.0 & !(0x01 << 16usize)) | (((val.0 as u32) & 0x01) << 16usize);
314 }
315 }
316 impl Default for Lckr {
317 fn default() -> Lckr {
318 Lckr(0)
319 }
320 }
321<<<<<<< HEAD
322 #[doc = "Port configuration lock register"]
323>>>>>>> fc21f52 (Better interrupt handling)
157 #[repr(transparent)] 324 #[repr(transparent)]
158 #[derive(Copy, Clone, Eq, PartialEq)] 325 #[derive(Copy, Clone, Eq, PartialEq)]
159 pub struct Isr(pub u32); 326 pub struct Isr(pub u32);
@@ -165,6 +332,7 @@ pub mod dma_v2 {
165 let val = (self.0 >> offs) & 0x01; 332 let val = (self.0 >> offs) & 0x01;
166 val != 0 333 val != 0
167 } 334 }
335<<<<<<< HEAD
168 #[doc = "Stream x FIFO error interrupt flag (x=3..0)"] 336 #[doc = "Stream x FIFO error interrupt flag (x=3..0)"]
169 pub fn set_feif(&mut self, n: usize, val: bool) { 337 pub fn set_feif(&mut self, n: usize, val: bool) {
170 assert!(n < 4usize); 338 assert!(n < 4usize);
@@ -227,6 +395,267 @@ pub mod dma_v2 {
227 impl Default for Isr { 395 impl Default for Isr {
228 fn default() -> Isr { 396 fn default() -> Isr {
229 Isr(0) 397 Isr(0)
398=======
399 #[doc = "Port A Lock bit"]
400 pub fn set_lck(&mut self, n: usize, val: super::vals::Lck) {
401 let offs = 0usize + n * 1usize;
402 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs);
403=======
404 #[doc = "GPIO port output speed register"]
405 #[repr(transparent)]
406 #[derive(Copy, Clone, Eq, PartialEq)]
407 pub struct Ospeedr(pub u32);
408 impl Ospeedr {
409 #[doc = "Port x configuration bits (y = 0..15)"]
410 pub fn ospeedr(&self, n: usize) -> super::vals::Ospeedr {
411 assert!(n < 16usize);
412 let offs = 0usize + n * 2usize;
413 let val = (self.0 >> offs) & 0x03;
414 super::vals::Ospeedr(val as u8)
415 }
416 #[doc = "Port x configuration bits (y = 0..15)"]
417 pub fn set_ospeedr(&mut self, n: usize, val: super::vals::Ospeedr) {
418 }
419 }
420<<<<<<< HEAD
421 pub mod vals {
422 use crate::generic::*;
423 #[repr(transparent)]
424 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
425 pub struct Bsw(pub u8);
426 impl Bsw {
427 #[doc = "No action on the corresponding ODx bit"]
428 pub const NOACTION: Self = Self(0);
429 #[doc = "Sets the corresponding ODRx bit"]
430 pub const SET: Self = Self(0x01);
431=======
432}
433pub mod sdmmc_v2 {
434 use crate::generic::*;
435 #[doc = "SDMMC"]
436 #[derive(Copy, Clone)]
437 pub struct Sdmmc(pub *mut u8);
438 unsafe impl Send for Sdmmc {}
439 unsafe impl Sync for Sdmmc {}
440 impl Sdmmc {
441 #[doc = "SDMMC power control register"]
442 pub fn power(self) -> Reg<regs::Power, RW> {
443 unsafe { Reg::from_ptr(self.0.add(0usize)) }
444 }
445 #[doc = "The SDMMC_CLKCR register controls the SDMMC_CK output clock, the SDMMC_RX_CLK receive clock, and the bus width."]
446 pub fn clkcr(self) -> Reg<regs::Clkcr, RW> {
447 unsafe { Reg::from_ptr(self.0.add(4usize)) }
448 }
449 #[doc = "The SDMMC_ARGR register contains a 32-bit command argument, which is sent to a card as part of a command message."]
450 pub fn argr(self) -> Reg<regs::Argr, RW> {
451 unsafe { Reg::from_ptr(self.0.add(8usize)) }
452>>>>>>> Better interrupt handling
453 }
454 #[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)."]
455 pub fn cmdr(self) -> Reg<regs::Cmdr, RW> {
456 unsafe { Reg::from_ptr(self.0.add(12usize)) }
457 }
458<<<<<<< HEAD
459 #[repr(transparent)]
460 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
461 pub struct Odr(pub u8);
462 impl Odr {
463 #[doc = "Set output to logic low"]
464 pub const LOW: Self = Self(0);
465 #[doc = "Set output to logic high"]
466 pub const HIGH: Self = Self(0x01);
467 }
468 #[repr(transparent)]
469 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
470 pub struct Idr(pub u8);
471 impl Idr {
472 #[doc = "Input is logic low"]
473 pub const LOW: Self = Self(0);
474 #[doc = "Input is logic high"]
475 pub const HIGH: Self = Self(0x01);
476 }
477 #[repr(transparent)]
478 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
479 pub struct Mode(pub u8);
480 impl Mode {
481 #[doc = "Input mode (reset state)"]
482 pub const INPUT: Self = Self(0);
483 #[doc = "Output mode 10 MHz"]
484 pub const OUTPUT: Self = Self(0x01);
485 #[doc = "Output mode 2 MHz"]
486 pub const OUTPUT2: Self = Self(0x02);
487 #[doc = "Output mode 50 MHz"]
488 pub const OUTPUT50: Self = Self(0x03);
489 }
490 #[repr(transparent)]
491 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
492 pub struct Lck(pub u8);
493 impl Lck {
494 #[doc = "Port configuration not locked"]
495 pub const UNLOCKED: Self = Self(0);
496 #[doc = "Port configuration locked"]
497 pub const LOCKED: Self = Self(0x01);
498 }
499 #[repr(transparent)]
500 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
501 pub struct Cnf(pub u8);
502 impl Cnf {
503 #[doc = "Analog mode / Push-Pull mode"]
504 pub const PUSHPULL: Self = Self(0);
505 #[doc = "Floating input (reset state) / Open Drain-Mode"]
506 pub const OPENDRAIN: Self = Self(0x01);
507 #[doc = "Input with pull-up/pull-down / Alternate Function Push-Pull Mode"]
508 pub const ALTPUSHPULL: Self = Self(0x02);
509 #[doc = "Alternate Function Open-Drain Mode"]
510 pub const ALTOPENDRAIN: Self = Self(0x03);
511 }
512 #[repr(transparent)]
513 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
514 pub struct Brw(pub u8);
515 impl Brw {
516 #[doc = "No action on the corresponding ODx bit"]
517 pub const NOACTION: Self = Self(0);
518 #[doc = "Reset the ODx bit"]
519 pub const RESET: Self = Self(0x01);
520 }
521 }
522}
523pub mod syscfg_f4 {
524 use crate::generic::*;
525 #[doc = "System configuration controller"]
526 #[derive(Copy, Clone)]
527 pub struct Syscfg(pub *mut u8);
528 unsafe impl Send for Syscfg {}
529 unsafe impl Sync for Syscfg {}
530 impl Syscfg {
531 #[doc = "memory remap register"]
532 pub fn memrm(self) -> Reg<regs::Memrm, RW> {
533 unsafe { Reg::from_ptr(self.0.add(0usize)) }
534 }
535 #[doc = "peripheral mode configuration register"]
536 pub fn pmc(self) -> Reg<regs::Pmc, RW> {
537 unsafe { Reg::from_ptr(self.0.add(4usize)) }
538 }
539 #[doc = "external interrupt configuration register"]
540 pub fn exticr(self, n: usize) -> Reg<regs::Exticr, RW> {
541 assert!(n < 4usize);
542 unsafe { Reg::from_ptr(self.0.add(8usize + n * 4usize)) }
543 }
544 #[doc = "Compensation cell control register"]
545 pub fn cmpcr(self) -> Reg<regs::Cmpcr, R> {
546 unsafe { Reg::from_ptr(self.0.add(32usize)) }
547=======
548 #[doc = "SDMMC command response register"]
549 pub fn respcmdr(self) -> Reg<regs::Respcmdr, R> {
550 unsafe { Reg::from_ptr(self.0.add(16usize)) }
551 }
552 #[doc = "The SDMMC_RESP1/2/3/4R registers contain the status of a card, which is part of the received response."]
553 pub fn respr(self, n: usize) -> Reg<regs::Resp1r, R> {
554 assert!(n < 4usize);
555 unsafe { Reg::from_ptr(self.0.add(20usize + n * 4usize)) }
556 }
557 #[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."]
558 pub fn dtimer(self) -> Reg<regs::Dtimer, RW> {
559 unsafe { Reg::from_ptr(self.0.add(36usize)) }
560 }
561 #[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."]
562 pub fn dlenr(self) -> Reg<regs::Dlenr, RW> {
563 unsafe { Reg::from_ptr(self.0.add(40usize)) }
564 }
565 #[doc = "The SDMMC_DCTRL register control the data path state machine (DPSM)."]
566 pub fn dctrl(self) -> Reg<regs::Dctrl, RW> {
567 unsafe { Reg::from_ptr(self.0.add(44usize)) }
568 }
569 #[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."]
570 pub fn dcntr(self) -> Reg<regs::Dcntr, R> {
571 unsafe { Reg::from_ptr(self.0.add(48usize)) }
572 }
573 #[doc = "The SDMMC_STAR register is a read-only register. It contains two types of flag:Static flags (bits [29,21,11:0]): these bits remain asserted until they are cleared by writing to the SDMMC interrupt Clear register (see SDMMC_ICR)Dynamic flags (bits [20:12]): these bits change state depending on the state of the underlying logic (for example, FIFO full and empty flags are asserted and de-asserted as data while written to the FIFO)"]
574 pub fn star(self) -> Reg<regs::Star, R> {
575 unsafe { Reg::from_ptr(self.0.add(52usize)) }
576 }
577 #[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."]
578 pub fn icr(self) -> Reg<regs::Icr, RW> {
579 unsafe { Reg::from_ptr(self.0.add(56usize)) }
580 }
581 #[doc = "The interrupt mask register determines which status flags generate an interrupt request by setting the corresponding bit to 1."]
582 pub fn maskr(self) -> Reg<regs::Maskr, RW> {
583 unsafe { Reg::from_ptr(self.0.add(60usize)) }
584 }
585 #[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."]
586 pub fn acktimer(self) -> Reg<regs::Acktimer, RW> {
587 unsafe { Reg::from_ptr(self.0.add(64usize)) }
588 }
589 #[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."]
590 pub fn idmactrlr(self) -> Reg<regs::Idmactrlr, RW> {
591 unsafe { Reg::from_ptr(self.0.add(80usize)) }
592 }
593 #[doc = "The SDMMC_IDMABSIZER register contains the buffers size when in double buffer configuration."]
594 pub fn idmabsizer(self) -> Reg<regs::Idmabsizer, RW> {
595 unsafe { Reg::from_ptr(self.0.add(84usize)) }
596 }
597 #[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."]
598 pub fn idmabase0r(self) -> Reg<regs::Idmabase0r, RW> {
599 unsafe { Reg::from_ptr(self.0.add(88usize)) }
600 }
601 #[doc = "The SDMMC_IDMABASE1R register contains the double buffer configuration second buffer memory base address."]
602 pub fn idmabase1r(self) -> Reg<regs::Idmabase1r, RW> {
603 unsafe { Reg::from_ptr(self.0.add(92usize)) }
604 }
605 #[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."]
606 pub fn fifor(self) -> Reg<regs::Fifor, RW> {
607 unsafe { Reg::from_ptr(self.0.add(128usize)) }
608 }
609 #[doc = "SDMMC IP version register"]
610 pub fn ver(self) -> Reg<regs::Ver, R> {
611 unsafe { Reg::from_ptr(self.0.add(1012usize)) }
612 }
613 #[doc = "SDMMC IP identification register"]
614 pub fn id(self) -> Reg<regs::Id, R> {
615 unsafe { Reg::from_ptr(self.0.add(1016usize)) }
616>>>>>>> Better interrupt handling
617 }
618 }
619 pub mod regs {
620 use crate::generic::*;
621<<<<<<< HEAD
622 #[doc = "memory remap register"]
623 #[repr(transparent)]
624 #[derive(Copy, Clone, Eq, PartialEq)]
625 pub struct Memrm(pub u32);
626 impl Memrm {
627 #[doc = "Memory mapping selection"]
628 pub const fn mem_mode(&self) -> u8 {
629 let val = (self.0 >> 0usize) & 0x07;
630 val as u8
631 }
632 #[doc = "Memory mapping selection"]
633 pub fn set_mem_mode(&mut self, val: u8) {
634 self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize);
635 }
636 #[doc = "Flash bank mode selection"]
637 pub const fn fb_mode(&self) -> bool {
638 let val = (self.0 >> 8usize) & 0x01;
639 val != 0
640 }
641 #[doc = "Flash bank mode selection"]
642 pub fn set_fb_mode(&mut self, val: bool) {
643 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
644 }
645 #[doc = "FMC memory mapping swap"]
646 pub const fn swp_fmc(&self) -> u8 {
647 let val = (self.0 >> 10usize) & 0x03;
648 val as u8
649 }
650 #[doc = "FMC memory mapping swap"]
651 pub fn set_swp_fmc(&mut self, val: u8) {
652 self.0 = (self.0 & !(0x03 << 10usize)) | (((val as u32) & 0x03) << 10usize);
653 }
654 }
655 impl Default for Memrm {
656 fn default() -> Memrm {
657 Memrm(0)
658>>>>>>> fc21f52 (Better interrupt handling)
230 } 659 }
231 } 660 }
232 #[doc = "stream x configuration register"] 661 #[doc = "stream x configuration register"]
@@ -1411,7 +1840,24 @@ pub mod syscfg_h7 {
1411 pub fn set_boot_add0(&mut self, val: u16) { 1840 pub fn set_boot_add0(&mut self, val: u16) {
1412 self.0 = (self.0 & !(0xffff << 16usize)) | (((val as u32) & 0xffff) << 16usize); 1841 self.0 = (self.0 & !(0xffff << 16usize)) | (((val as u32) & 0xffff) << 16usize);
1413 } 1842 }
1843=======
1844 #[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."]
1845 #[repr(transparent)]
1846 #[derive(Copy, Clone, Eq, PartialEq)]
1847 pub struct Fifor(pub u32);
1848 impl Fifor {
1849 #[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."]
1850 pub const fn fifodata(&self) -> u32 {
1851 let val = (self.0 >> 0usize) & 0xffff_ffff;
1852 val as u32
1853 }
1854 #[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."]
1855 pub fn set_fifodata(&mut self, val: u32) {
1856 self.0 =
1857 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
1858 }
1414 } 1859 }
1860<<<<<<< HEAD
1415 impl Default for Ur2 { 1861 impl Default for Ur2 {
1416 fn default() -> Ur2 { 1862 fn default() -> Ur2 {
1417 Ur2(0) 1863 Ur2(0)
@@ -1464,10 +1910,7531 @@ pub mod syscfg_h7 {
1464 impl Default for Cccr { 1910 impl Default for Cccr {
1465 fn default() -> Cccr { 1911 fn default() -> Cccr {
1466 Cccr(0) 1912 Cccr(0)
1913=======
1914 impl Default for Fifor {
1915 fn default() -> Fifor {
1916 Fifor(0)
1917 }
1918 }
1919 #[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)."]
1920 #[repr(transparent)]
1921 #[derive(Copy, Clone, Eq, PartialEq)]
1922 pub struct Cmdr(pub u32);
1923 impl Cmdr {
1924 #[doc = "Command index. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). The command index is sent to the card as part of a command message."]
1925 pub const fn cmdindex(&self) -> u8 {
1926 let val = (self.0 >> 0usize) & 0x3f;
1927 val as u8
1928 }
1929 #[doc = "Command index. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). The command index is sent to the card as part of a command message."]
1930 pub fn set_cmdindex(&mut self, val: u8) {
1931 self.0 = (self.0 & !(0x3f << 0usize)) | (((val as u32) & 0x3f) << 0usize);
1932 }
1933 #[doc = "The CPSM treats the command as a data transfer command, stops the interrupt period, and signals DataEnable to the DPSM This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). If this bit is set, the CPSM issues an end of interrupt period and issues DataEnable signal to the DPSM when the command is sent."]
1934 pub const fn cmdtrans(&self) -> bool {
1935 let val = (self.0 >> 6usize) & 0x01;
1936 val != 0
1937 }
1938 #[doc = "The CPSM treats the command as a data transfer command, stops the interrupt period, and signals DataEnable to the DPSM This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). If this bit is set, the CPSM issues an end of interrupt period and issues DataEnable signal to the DPSM when the command is sent."]
1939 pub fn set_cmdtrans(&mut self, val: bool) {
1940 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
1941 }
1942 #[doc = "The CPSM treats the command as a Stop Transmission command and signals Abort to the DPSM. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). If this bit is set, the CPSM issues the Abort signal to the DPSM when the command is sent."]
1943 pub const fn cmdstop(&self) -> bool {
1944 let val = (self.0 >> 7usize) & 0x01;
1945 val != 0
1946 }
1947 #[doc = "The CPSM treats the command as a Stop Transmission command and signals Abort to the DPSM. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). If this bit is set, the CPSM issues the Abort signal to the DPSM when the command is sent."]
1948 pub fn set_cmdstop(&mut self, val: bool) {
1949 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
1950 }
1951 #[doc = "Wait for response bits. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). They are used to configure whether the CPSM is to wait for a response, and if yes, which kind of response."]
1952 pub const fn waitresp(&self) -> u8 {
1953 let val = (self.0 >> 8usize) & 0x03;
1954 val as u8
1955 }
1956 #[doc = "Wait for response bits. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). They are used to configure whether the CPSM is to wait for a response, and if yes, which kind of response."]
1957 pub fn set_waitresp(&mut self, val: u8) {
1958 self.0 = (self.0 & !(0x03 << 8usize)) | (((val as u32) & 0x03) << 8usize);
1959 }
1960 #[doc = "CPSM waits for interrupt request. If this bit is set, the CPSM disables command timeout and waits for an card interrupt request (Response). If this bit is cleared in the CPSM Wait state, will cause the abort of the interrupt mode."]
1961 pub const fn waitint(&self) -> bool {
1962 let val = (self.0 >> 10usize) & 0x01;
1963 val != 0
1964 }
1965 #[doc = "CPSM waits for interrupt request. If this bit is set, the CPSM disables command timeout and waits for an card interrupt request (Response). If this bit is cleared in the CPSM Wait state, will cause the abort of the interrupt mode."]
1966 pub fn set_waitint(&mut self, val: bool) {
1967 self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize);
1968 }
1969 #[doc = "CPSM Waits for end of data transfer (CmdPend internal signal) from DPSM. This bit when set, the CPSM waits for the end of data transfer trigger before it starts sending a command. WAITPEND is only taken into account when DTMODE = MMC stream data transfer, WIDBUS = 1-bit wide bus mode, DPSMACT = 1 and DTDIR = from host to card."]
1970 pub const fn waitpend(&self) -> bool {
1971 let val = (self.0 >> 11usize) & 0x01;
1972 val != 0
1973 }
1974 #[doc = "CPSM Waits for end of data transfer (CmdPend internal signal) from DPSM. This bit when set, the CPSM waits for the end of data transfer trigger before it starts sending a command. WAITPEND is only taken into account when DTMODE = MMC stream data transfer, WIDBUS = 1-bit wide bus mode, DPSMACT = 1 and DTDIR = from host to card."]
1975 pub fn set_waitpend(&mut self, val: bool) {
1976 self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize);
1977 }
1978 #[doc = "Command path state machine (CPSM) Enable bit This bit is written 1 by firmware, and cleared by hardware when the CPSM enters the Idle state. If this bit is set, the CPSM is enabled. When DTEN = 1, no command will be transfered nor boot procedure will be started. CPSMEN is cleared to 0."]
1979 pub const fn cpsmen(&self) -> bool {
1980 let val = (self.0 >> 12usize) & 0x01;
1981 val != 0
1982 }
1983 #[doc = "Command path state machine (CPSM) Enable bit This bit is written 1 by firmware, and cleared by hardware when the CPSM enters the Idle state. If this bit is set, the CPSM is enabled. When DTEN = 1, no command will be transfered nor boot procedure will be started. CPSMEN is cleared to 0."]
1984 pub fn set_cpsmen(&mut self, val: bool) {
1985 self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize);
1986 }
1987 #[doc = "Hold new data block transmission and reception in the DPSM. If this bit is set, the DPSM will not move from the Wait_S state to the Send state or from the Wait_R state to the Receive state."]
1988 pub const fn dthold(&self) -> bool {
1989 let val = (self.0 >> 13usize) & 0x01;
1990 val != 0
1991 }
1992 #[doc = "Hold new data block transmission and reception in the DPSM. If this bit is set, the DPSM will not move from the Wait_S state to the Send state or from the Wait_R state to the Receive state."]
1993 pub fn set_dthold(&mut self, val: bool) {
1994 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize);
1995 }
1996 #[doc = "Select the boot mode procedure to be used. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0)"]
1997 pub const fn bootmode(&self) -> bool {
1998 let val = (self.0 >> 14usize) & 0x01;
1999 val != 0
2000 }
2001 #[doc = "Select the boot mode procedure to be used. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0)"]
2002 pub fn set_bootmode(&mut self, val: bool) {
2003 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize);
2004 }
2005 #[doc = "Enable boot mode procedure."]
2006 pub const fn booten(&self) -> bool {
2007 let val = (self.0 >> 15usize) & 0x01;
2008 val != 0
2009 }
2010 #[doc = "Enable boot mode procedure."]
2011 pub fn set_booten(&mut self, val: bool) {
2012 self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize);
2013 }
2014 #[doc = "The CPSM treats the command as a Suspend or Resume command and signals interrupt period start/end. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). CMDSUSPEND = 1 and CMDTRANS = 0 Suspend command, start interrupt period when response bit BS=0. CMDSUSPEND = 1 and CMDTRANS = 1 Resume command with data, end interrupt period when response bit DF=1."]
2015 pub const fn cmdsuspend(&self) -> bool {
2016 let val = (self.0 >> 16usize) & 0x01;
2017 val != 0
2018 }
2019 #[doc = "The CPSM treats the command as a Suspend or Resume command and signals interrupt period start/end. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). CMDSUSPEND = 1 and CMDTRANS = 0 Suspend command, start interrupt period when response bit BS=0. CMDSUSPEND = 1 and CMDTRANS = 1 Resume command with data, end interrupt period when response bit DF=1."]
2020 pub fn set_cmdsuspend(&mut self, val: bool) {
2021 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
2022 }
2023 }
2024 impl Default for Cmdr {
2025 fn default() -> Cmdr {
2026 Cmdr(0)
2027 }
2028 }
2029 #[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."]
2030 #[repr(transparent)]
2031 #[derive(Copy, Clone, Eq, PartialEq)]
2032 pub struct Acktimer(pub u32);
2033 impl Acktimer {
2034 #[doc = "Boot acknowledgment timeout period This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). Boot acknowledgment timeout period expressed in card bus clock periods."]
2035 pub const fn acktime(&self) -> u32 {
2036 let val = (self.0 >> 0usize) & 0x01ff_ffff;
2037 val as u32
2038 }
2039 #[doc = "Boot acknowledgment timeout period This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). Boot acknowledgment timeout period expressed in card bus clock periods."]
2040 pub fn set_acktime(&mut self, val: u32) {
2041 self.0 =
2042 (self.0 & !(0x01ff_ffff << 0usize)) | (((val as u32) & 0x01ff_ffff) << 0usize);
2043 }
2044 }
2045 impl Default for Acktimer {
2046 fn default() -> Acktimer {
2047 Acktimer(0)
2048 }
2049 }
2050 #[doc = "The interrupt mask register determines which status flags generate an interrupt request by setting the corresponding bit to 1."]
2051 #[repr(transparent)]
2052 #[derive(Copy, Clone, Eq, PartialEq)]
2053 pub struct Maskr(pub u32);
2054 impl Maskr {
2055 #[doc = "Command CRC fail interrupt enable Set and cleared by software to enable/disable interrupt caused by command CRC failure."]
2056 pub const fn ccrcfailie(&self) -> bool {
2057 let val = (self.0 >> 0usize) & 0x01;
2058 val != 0
2059 }
2060 #[doc = "Command CRC fail interrupt enable Set and cleared by software to enable/disable interrupt caused by command CRC failure."]
2061 pub fn set_ccrcfailie(&mut self, val: bool) {
2062 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
2063 }
2064 #[doc = "Data CRC fail interrupt enable Set and cleared by software to enable/disable interrupt caused by data CRC failure."]
2065 pub const fn dcrcfailie(&self) -> bool {
2066 let val = (self.0 >> 1usize) & 0x01;
2067 val != 0
2068 }
2069 #[doc = "Data CRC fail interrupt enable Set and cleared by software to enable/disable interrupt caused by data CRC failure."]
2070 pub fn set_dcrcfailie(&mut self, val: bool) {
2071 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
2072 }
2073 #[doc = "Command timeout interrupt enable Set and cleared by software to enable/disable interrupt caused by command timeout."]
2074 pub const fn ctimeoutie(&self) -> bool {
2075 let val = (self.0 >> 2usize) & 0x01;
2076 val != 0
2077 }
2078 #[doc = "Command timeout interrupt enable Set and cleared by software to enable/disable interrupt caused by command timeout."]
2079 pub fn set_ctimeoutie(&mut self, val: bool) {
2080 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
2081 }
2082 #[doc = "Data timeout interrupt enable Set and cleared by software to enable/disable interrupt caused by data timeout."]
2083 pub const fn dtimeoutie(&self) -> bool {
2084 let val = (self.0 >> 3usize) & 0x01;
2085 val != 0
2086 }
2087 #[doc = "Data timeout interrupt enable Set and cleared by software to enable/disable interrupt caused by data timeout."]
2088 pub fn set_dtimeoutie(&mut self, val: bool) {
2089 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
2090 }
2091 #[doc = "Tx FIFO underrun error interrupt enable Set and cleared by software to enable/disable interrupt caused by Tx FIFO underrun error."]
2092 pub const fn txunderrie(&self) -> bool {
2093 let val = (self.0 >> 4usize) & 0x01;
2094 val != 0
2095 }
2096 #[doc = "Tx FIFO underrun error interrupt enable Set and cleared by software to enable/disable interrupt caused by Tx FIFO underrun error."]
2097 pub fn set_txunderrie(&mut self, val: bool) {
2098 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
2099 }
2100 #[doc = "Rx FIFO overrun error interrupt enable Set and cleared by software to enable/disable interrupt caused by Rx FIFO overrun error."]
2101 pub const fn rxoverrie(&self) -> bool {
2102 let val = (self.0 >> 5usize) & 0x01;
2103 val != 0
2104 }
2105 #[doc = "Rx FIFO overrun error interrupt enable Set and cleared by software to enable/disable interrupt caused by Rx FIFO overrun error."]
2106 pub fn set_rxoverrie(&mut self, val: bool) {
2107 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
2108 }
2109 #[doc = "Command response received interrupt enable Set and cleared by software to enable/disable interrupt caused by receiving command response."]
2110 pub const fn cmdrendie(&self) -> bool {
2111 let val = (self.0 >> 6usize) & 0x01;
2112 val != 0
2113 }
2114 #[doc = "Command response received interrupt enable Set and cleared by software to enable/disable interrupt caused by receiving command response."]
2115 pub fn set_cmdrendie(&mut self, val: bool) {
2116 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
2117 }
2118 #[doc = "Command sent interrupt enable Set and cleared by software to enable/disable interrupt caused by sending command."]
2119 pub const fn cmdsentie(&self) -> bool {
2120 let val = (self.0 >> 7usize) & 0x01;
2121 val != 0
2122 }
2123 #[doc = "Command sent interrupt enable Set and cleared by software to enable/disable interrupt caused by sending command."]
2124 pub fn set_cmdsentie(&mut self, val: bool) {
2125 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
2126 }
2127 #[doc = "Data end interrupt enable Set and cleared by software to enable/disable interrupt caused by data end."]
2128 pub const fn dataendie(&self) -> bool {
2129 let val = (self.0 >> 8usize) & 0x01;
2130 val != 0
2131 }
2132 #[doc = "Data end interrupt enable Set and cleared by software to enable/disable interrupt caused by data end."]
2133 pub fn set_dataendie(&mut self, val: bool) {
2134 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
2135 }
2136 #[doc = "Data hold interrupt enable Set and cleared by software to enable/disable the interrupt generated when sending new data is hold in the DPSM Wait_S state."]
2137 pub const fn dholdie(&self) -> bool {
2138 let val = (self.0 >> 9usize) & 0x01;
2139 val != 0
2140 }
2141 #[doc = "Data hold interrupt enable Set and cleared by software to enable/disable the interrupt generated when sending new data is hold in the DPSM Wait_S state."]
2142 pub fn set_dholdie(&mut self, val: bool) {
2143 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
2144 }
2145 #[doc = "Data block end interrupt enable Set and cleared by software to enable/disable interrupt caused by data block end."]
2146 pub const fn dbckendie(&self) -> bool {
2147 let val = (self.0 >> 10usize) & 0x01;
2148 val != 0
2149 }
2150 #[doc = "Data block end interrupt enable Set and cleared by software to enable/disable interrupt caused by data block end."]
2151 pub fn set_dbckendie(&mut self, val: bool) {
2152 self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize);
2153 }
2154 #[doc = "Data transfer aborted interrupt enable Set and cleared by software to enable/disable interrupt caused by a data transfer being aborted."]
2155 pub const fn dabortie(&self) -> bool {
2156 let val = (self.0 >> 11usize) & 0x01;
2157 val != 0
2158 }
2159 #[doc = "Data transfer aborted interrupt enable Set and cleared by software to enable/disable interrupt caused by a data transfer being aborted."]
2160 pub fn set_dabortie(&mut self, val: bool) {
2161 self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize);
2162 }
2163 #[doc = "Tx FIFO half empty interrupt enable Set and cleared by software to enable/disable interrupt caused by Tx FIFO half empty."]
2164 pub const fn txfifoheie(&self) -> bool {
2165 let val = (self.0 >> 14usize) & 0x01;
2166 val != 0
2167 }
2168 #[doc = "Tx FIFO half empty interrupt enable Set and cleared by software to enable/disable interrupt caused by Tx FIFO half empty."]
2169 pub fn set_txfifoheie(&mut self, val: bool) {
2170 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize);
2171 }
2172 #[doc = "Rx FIFO half full interrupt enable Set and cleared by software to enable/disable interrupt caused by Rx FIFO half full."]
2173 pub const fn rxfifohfie(&self) -> bool {
2174 let val = (self.0 >> 15usize) & 0x01;
2175 val != 0
2176 }
2177 #[doc = "Rx FIFO half full interrupt enable Set and cleared by software to enable/disable interrupt caused by Rx FIFO half full."]
2178 pub fn set_rxfifohfie(&mut self, val: bool) {
2179 self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize);
2180 }
2181 #[doc = "Rx FIFO full interrupt enable Set and cleared by software to enable/disable interrupt caused by Rx FIFO full."]
2182 pub const fn rxfifofie(&self) -> bool {
2183 let val = (self.0 >> 17usize) & 0x01;
2184 val != 0
2185 }
2186 #[doc = "Rx FIFO full interrupt enable Set and cleared by software to enable/disable interrupt caused by Rx FIFO full."]
2187 pub fn set_rxfifofie(&mut self, val: bool) {
2188 self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize);
2189 }
2190 #[doc = "Tx FIFO empty interrupt enable Set and cleared by software to enable/disable interrupt caused by Tx FIFO empty."]
2191 pub const fn txfifoeie(&self) -> bool {
2192 let val = (self.0 >> 18usize) & 0x01;
2193 val != 0
2194 }
2195 #[doc = "Tx FIFO empty interrupt enable Set and cleared by software to enable/disable interrupt caused by Tx FIFO empty."]
2196 pub fn set_txfifoeie(&mut self, val: bool) {
2197 self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize);
2198 }
2199 #[doc = "BUSYD0END interrupt enable Set and cleared by software to enable/disable the interrupt generated when SDMMC_D0 signal changes from busy to NOT busy following a CMD response."]
2200 pub const fn busyd0endie(&self) -> bool {
2201 let val = (self.0 >> 21usize) & 0x01;
2202 val != 0
2203 }
2204 #[doc = "BUSYD0END interrupt enable Set and cleared by software to enable/disable the interrupt generated when SDMMC_D0 signal changes from busy to NOT busy following a CMD response."]
2205 pub fn set_busyd0endie(&mut self, val: bool) {
2206 self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize);
2207 }
2208 #[doc = "SDIO mode interrupt received interrupt enable Set and cleared by software to enable/disable the interrupt generated when receiving the SDIO mode interrupt."]
2209 pub const fn sdioitie(&self) -> bool {
2210 let val = (self.0 >> 22usize) & 0x01;
2211 val != 0
2212 }
2213 #[doc = "SDIO mode interrupt received interrupt enable Set and cleared by software to enable/disable the interrupt generated when receiving the SDIO mode interrupt."]
2214 pub fn set_sdioitie(&mut self, val: bool) {
2215 self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize);
2216 }
2217 #[doc = "Acknowledgment Fail interrupt enable Set and cleared by software to enable/disable interrupt caused by acknowledgment Fail."]
2218 pub const fn ackfailie(&self) -> bool {
2219 let val = (self.0 >> 23usize) & 0x01;
2220 val != 0
2221 }
2222 #[doc = "Acknowledgment Fail interrupt enable Set and cleared by software to enable/disable interrupt caused by acknowledgment Fail."]
2223 pub fn set_ackfailie(&mut self, val: bool) {
2224 self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize);
2225 }
2226 #[doc = "Acknowledgment timeout interrupt enable Set and cleared by software to enable/disable interrupt caused by acknowledgment timeout."]
2227 pub const fn acktimeoutie(&self) -> bool {
2228 let val = (self.0 >> 24usize) & 0x01;
2229 val != 0
2230 }
2231 #[doc = "Acknowledgment timeout interrupt enable Set and cleared by software to enable/disable interrupt caused by acknowledgment timeout."]
2232 pub fn set_acktimeoutie(&mut self, val: bool) {
2233 self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize);
2234 }
2235 #[doc = "Voltage switch critical timing section completion interrupt enable Set and cleared by software to enable/disable the interrupt generated when voltage switch critical timing section completion."]
2236 pub const fn vswendie(&self) -> bool {
2237 let val = (self.0 >> 25usize) & 0x01;
2238 val != 0
2239 }
2240 #[doc = "Voltage switch critical timing section completion interrupt enable Set and cleared by software to enable/disable the interrupt generated when voltage switch critical timing section completion."]
2241 pub fn set_vswendie(&mut self, val: bool) {
2242 self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize);
2243 }
2244 #[doc = "Voltage Switch clock stopped interrupt enable Set and cleared by software to enable/disable interrupt caused by Voltage Switch clock stopped."]
2245 pub const fn ckstopie(&self) -> bool {
2246 let val = (self.0 >> 26usize) & 0x01;
2247 val != 0
2248 }
2249 #[doc = "Voltage Switch clock stopped interrupt enable Set and cleared by software to enable/disable interrupt caused by Voltage Switch clock stopped."]
2250 pub fn set_ckstopie(&mut self, val: bool) {
2251 self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize);
2252 }
2253 #[doc = "IDMA buffer transfer complete interrupt enable Set and cleared by software to enable/disable the interrupt generated when the IDMA has transferred all data belonging to a memory buffer."]
2254 pub const fn idmabtcie(&self) -> bool {
2255 let val = (self.0 >> 28usize) & 0x01;
2256 val != 0
2257 }
2258 #[doc = "IDMA buffer transfer complete interrupt enable Set and cleared by software to enable/disable the interrupt generated when the IDMA has transferred all data belonging to a memory buffer."]
2259 pub fn set_idmabtcie(&mut self, val: bool) {
2260 self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize);
2261 }
2262 }
2263 impl Default for Maskr {
2264 fn default() -> Maskr {
2265 Maskr(0)
2266 }
2267 }
2268 #[doc = "SDMMC command response register"]
2269 #[repr(transparent)]
2270 #[derive(Copy, Clone, Eq, PartialEq)]
2271 pub struct Respcmdr(pub u32);
2272 impl Respcmdr {
2273 #[doc = "Response command index"]
2274 pub const fn respcmd(&self) -> u8 {
2275 let val = (self.0 >> 0usize) & 0x3f;
2276 val as u8
2277 }
2278 #[doc = "Response command index"]
2279 pub fn set_respcmd(&mut self, val: u8) {
2280 self.0 = (self.0 & !(0x3f << 0usize)) | (((val as u32) & 0x3f) << 0usize);
2281 }
2282 }
2283 impl Default for Respcmdr {
2284 fn default() -> Respcmdr {
2285 Respcmdr(0)
2286 }
2287 }
2288 #[doc = "The SDMMC_IDMABASE1R register contains the double buffer configuration second buffer memory base address."]
2289 #[repr(transparent)]
2290 #[derive(Copy, Clone, Eq, PartialEq)]
2291 pub struct Idmabase1r(pub u32);
2292 impl Idmabase1r {
2293 #[doc = "Buffer 1 memory base address, shall be word aligned (bit [1:0]
2294are 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)."]
2295 pub const fn idmabase1(&self) -> u32 {
2296 let val = (self.0 >> 0usize) & 0xffff_ffff;
2297 val as u32
2298 }
2299 #[doc = "Buffer 1 memory base address, shall be word aligned (bit [1:0]
2300are 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)."]
2301 pub fn set_idmabase1(&mut self, val: u32) {
2302 self.0 =
2303 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
2304 }
2305 }
2306 impl Default for Idmabase1r {
2307 fn default() -> Idmabase1r {
2308 Idmabase1r(0)
2309 }
2310 }
2311 #[doc = "SDMMC power control register"]
2312 #[repr(transparent)]
2313 #[derive(Copy, Clone, Eq, PartialEq)]
2314 pub struct Power(pub u32);
2315 impl Power {
2316 #[doc = "SDMMC state control bits. These bits can only be written when the SDMMC is not in the power-on state (PWRCTRL?11). These bits are used to define the functional state of the SDMMC signals: Any further write will be ignored, PWRCTRL value will keep 11."]
2317 pub const fn pwrctrl(&self) -> u8 {
2318 let val = (self.0 >> 0usize) & 0x03;
2319 val as u8
2320 }
2321 #[doc = "SDMMC state control bits. These bits can only be written when the SDMMC is not in the power-on state (PWRCTRL?11). These bits are used to define the functional state of the SDMMC signals: Any further write will be ignored, PWRCTRL value will keep 11."]
2322 pub fn set_pwrctrl(&mut self, val: u8) {
2323 self.0 = (self.0 & !(0x03 << 0usize)) | (((val as u32) & 0x03) << 0usize);
2324 }
2325 #[doc = "Voltage switch sequence start. This bit is used to start the timing critical section of the voltage switch sequence:"]
2326 pub const fn vswitch(&self) -> bool {
2327 let val = (self.0 >> 2usize) & 0x01;
2328 val != 0
2329 }
2330 #[doc = "Voltage switch sequence start. This bit is used to start the timing critical section of the voltage switch sequence:"]
2331 pub fn set_vswitch(&mut self, val: bool) {
2332 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
2333 }
2334 #[doc = "Voltage switch procedure enable. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). This bit is used to stop the SDMMC_CK after the voltage switch command response:"]
2335 pub const fn vswitchen(&self) -> bool {
2336 let val = (self.0 >> 3usize) & 0x01;
2337 val != 0
2338 }
2339 #[doc = "Voltage switch procedure enable. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). This bit is used to stop the SDMMC_CK after the voltage switch command response:"]
2340 pub fn set_vswitchen(&mut self, val: bool) {
2341 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
2342 }
2343 #[doc = "Data and command direction signals polarity selection. This bit can only be written when the SDMMC is in the power-off state (PWRCTRL = 00)."]
2344 pub const fn dirpol(&self) -> bool {
2345 let val = (self.0 >> 4usize) & 0x01;
2346 val != 0
2347 }
2348 #[doc = "Data and command direction signals polarity selection. This bit can only be written when the SDMMC is in the power-off state (PWRCTRL = 00)."]
2349 pub fn set_dirpol(&mut self, val: bool) {
2350 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
2351 }
2352 }
2353 impl Default for Power {
2354 fn default() -> Power {
2355 Power(0)
2356 }
2357 }
2358 #[doc = "SDMMC IP version register"]
2359 #[repr(transparent)]
2360 #[derive(Copy, Clone, Eq, PartialEq)]
2361 pub struct Ver(pub u32);
2362 impl Ver {
2363 #[doc = "IP minor revision number."]
2364 pub const fn minrev(&self) -> u8 {
2365 let val = (self.0 >> 0usize) & 0x0f;
2366 val as u8
2367 }
2368 #[doc = "IP minor revision number."]
2369 pub fn set_minrev(&mut self, val: u8) {
2370 self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize);
2371 }
2372 #[doc = "IP major revision number."]
2373 pub const fn majrev(&self) -> u8 {
2374 let val = (self.0 >> 4usize) & 0x0f;
2375 val as u8
2376 }
2377 #[doc = "IP major revision number."]
2378 pub fn set_majrev(&mut self, val: u8) {
2379 self.0 = (self.0 & !(0x0f << 4usize)) | (((val as u32) & 0x0f) << 4usize);
2380 }
2381 }
2382 impl Default for Ver {
2383 fn default() -> Ver {
2384 Ver(0)
2385 }
2386 }
2387 #[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."]
2388 #[repr(transparent)]
2389 #[derive(Copy, Clone, Eq, PartialEq)]
2390 pub struct Dtimer(pub u32);
2391 impl Dtimer {
2392 #[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."]
2393 pub const fn datatime(&self) -> u32 {
2394 let val = (self.0 >> 0usize) & 0xffff_ffff;
2395 val as u32
2396 }
2397 #[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."]
2398 pub fn set_datatime(&mut self, val: u32) {
2399 self.0 =
2400 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
2401 }
2402 }
2403 impl Default for Dtimer {
2404 fn default() -> Dtimer {
2405 Dtimer(0)
2406 }
2407 }
2408 #[doc = "The SDMMC_DCTRL register control the data path state machine (DPSM)."]
2409 #[repr(transparent)]
2410 #[derive(Copy, Clone, Eq, PartialEq)]
2411 pub struct Dctrl(pub u32);
2412 impl Dctrl {
2413 #[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."]
2414 pub const fn dten(&self) -> bool {
2415 let val = (self.0 >> 0usize) & 0x01;
2416 val != 0
2417 }
2418 #[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."]
2419 pub fn set_dten(&mut self, val: bool) {
2420 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
2421 }
2422 #[doc = "Data transfer direction selection This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
2423 pub const fn dtdir(&self) -> bool {
2424 let val = (self.0 >> 1usize) & 0x01;
2425 val != 0
2426 }
2427 #[doc = "Data transfer direction selection This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
2428 pub fn set_dtdir(&mut self, val: bool) {
2429 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
2430 }
2431 #[doc = "Data transfer mode selection. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
2432 pub const fn dtmode(&self) -> u8 {
2433 let val = (self.0 >> 2usize) & 0x03;
2434 val as u8
2435 }
2436 #[doc = "Data transfer mode selection. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
2437 pub fn set_dtmode(&mut self, val: u8) {
2438 self.0 = (self.0 & !(0x03 << 2usize)) | (((val as u32) & 0x03) << 2usize);
2439 }
2440 #[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)"]
2441 pub const fn dblocksize(&self) -> u8 {
2442 let val = (self.0 >> 4usize) & 0x0f;
2443 val as u8
2444 }
2445 #[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)"]
2446 pub fn set_dblocksize(&mut self, val: u8) {
2447 self.0 = (self.0 & !(0x0f << 4usize)) | (((val as u32) & 0x0f) << 4usize);
2448 }
2449 #[doc = "Read wait start. If this bit is set, read wait operation starts."]
2450 pub const fn rwstart(&self) -> bool {
2451 let val = (self.0 >> 8usize) & 0x01;
2452 val != 0
2453 }
2454 #[doc = "Read wait start. If this bit is set, read wait operation starts."]
2455 pub fn set_rwstart(&mut self, val: bool) {
2456 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
2457 }
2458 #[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."]
2459 pub const fn rwstop(&self) -> bool {
2460 let val = (self.0 >> 9usize) & 0x01;
2461 val != 0
2462 }
2463 #[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."]
2464 pub fn set_rwstop(&mut self, val: bool) {
2465 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
2466 }
2467 #[doc = "Read wait mode. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
2468 pub const fn rwmod(&self) -> bool {
2469 let val = (self.0 >> 10usize) & 0x01;
2470 val != 0
2471 }
2472 #[doc = "Read wait mode. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
2473 pub fn set_rwmod(&mut self, val: bool) {
2474 self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize);
2475 }
2476 #[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."]
2477 pub const fn sdioen(&self) -> bool {
2478 let val = (self.0 >> 11usize) & 0x01;
2479 val != 0
2480 }
2481 #[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."]
2482 pub fn set_sdioen(&mut self, val: bool) {
2483 self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize);
2484 }
2485 #[doc = "Enable the reception of the boot acknowledgment. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
2486 pub const fn bootacken(&self) -> bool {
2487 let val = (self.0 >> 12usize) & 0x01;
2488 val != 0
2489 }
2490 #[doc = "Enable the reception of the boot acknowledgment. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
2491 pub fn set_bootacken(&mut self, val: bool) {
2492 self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize);
2493 }
2494 #[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."]
2495 pub const fn fiforst(&self) -> bool {
2496 let val = (self.0 >> 13usize) & 0x01;
2497 val != 0
2498 }
2499 #[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."]
2500 pub fn set_fiforst(&mut self, val: bool) {
2501 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize);
2502 }
2503 }
2504 impl Default for Dctrl {
2505 fn default() -> Dctrl {
2506 Dctrl(0)
2507 }
2508 }
2509 #[doc = "SDMMC IP identification register"]
2510 #[repr(transparent)]
2511 #[derive(Copy, Clone, Eq, PartialEq)]
2512 pub struct Id(pub u32);
2513 impl Id {
2514 #[doc = "SDMMC IP identification."]
2515 pub const fn ip_id(&self) -> u32 {
2516 let val = (self.0 >> 0usize) & 0xffff_ffff;
2517 val as u32
2518 }
2519 #[doc = "SDMMC IP identification."]
2520 pub fn set_ip_id(&mut self, val: u32) {
2521 self.0 =
2522 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
2523 }
2524 }
2525 impl Default for Id {
2526 fn default() -> Id {
2527 Id(0)
2528 }
2529 }
2530 #[doc = "The SDMMC_RESP1/2/3/4R registers contain the status of a card, which is part of the received response."]
2531 #[repr(transparent)]
2532 #[derive(Copy, Clone, Eq, PartialEq)]
2533 pub struct Resp2r(pub u32);
2534 impl Resp2r {
2535 #[doc = "see Table404."]
2536 pub const fn cardstatus2(&self) -> u32 {
2537 let val = (self.0 >> 0usize) & 0xffff_ffff;
2538 val as u32
2539 }
2540 #[doc = "see Table404."]
2541 pub fn set_cardstatus2(&mut self, val: u32) {
2542 self.0 =
2543 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
2544 }
2545 }
2546 impl Default for Resp2r {
2547 fn default() -> Resp2r {
2548 Resp2r(0)
2549 }
2550 }
2551 #[doc = "The SDMMC_ARGR register contains a 32-bit command argument, which is sent to a card as part of a command message."]
2552 #[repr(transparent)]
2553 #[derive(Copy, Clone, Eq, PartialEq)]
2554 pub struct Argr(pub u32);
2555 impl Argr {
2556 #[doc = "Command argument. These bits can only be written by firmware when CPSM is disabled (CPSMEN = 0). Command argument sent to a card as part of a command message. If a command contains an argument, it must be loaded into this register before writing a command to the command register."]
2557 pub const fn cmdarg(&self) -> u32 {
2558 let val = (self.0 >> 0usize) & 0xffff_ffff;
2559 val as u32
2560 }
2561 #[doc = "Command argument. These bits can only be written by firmware when CPSM is disabled (CPSMEN = 0). Command argument sent to a card as part of a command message. If a command contains an argument, it must be loaded into this register before writing a command to the command register."]
2562 pub fn set_cmdarg(&mut self, val: u32) {
2563 self.0 =
2564 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
2565 }
2566 }
2567 impl Default for Argr {
2568 fn default() -> Argr {
2569 Argr(0)
2570 }
2571 }
2572 #[doc = "The SDMMC_RESP1/2/3/4R registers contain the status of a card, which is part of the received response."]
2573 #[repr(transparent)]
2574 #[derive(Copy, Clone, Eq, PartialEq)]
2575 pub struct Resp1r(pub u32);
2576 impl Resp1r {
2577 #[doc = "see Table 432"]
2578 pub const fn cardstatus1(&self) -> u32 {
2579 let val = (self.0 >> 0usize) & 0xffff_ffff;
2580 val as u32
2581 }
2582 #[doc = "see Table 432"]
2583 pub fn set_cardstatus1(&mut self, val: u32) {
2584 self.0 =
2585 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
2586 }
2587 }
2588 impl Default for Resp1r {
2589 fn default() -> Resp1r {
2590 Resp1r(0)
2591 }
2592 }
2593 #[doc = "The SDMMC_RESP1/2/3/4R registers contain the status of a card, which is part of the received response."]
2594 #[repr(transparent)]
2595 #[derive(Copy, Clone, Eq, PartialEq)]
2596 pub struct Resp4r(pub u32);
2597 impl Resp4r {
2598 #[doc = "see Table404."]
2599 pub const fn cardstatus4(&self) -> u32 {
2600 let val = (self.0 >> 0usize) & 0xffff_ffff;
2601 val as u32
2602 }
2603 #[doc = "see Table404."]
2604 pub fn set_cardstatus4(&mut self, val: u32) {
2605 self.0 =
2606 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
2607 }
2608 }
2609 impl Default for Resp4r {
2610 fn default() -> Resp4r {
2611 Resp4r(0)
2612 }
2613 }
2614 #[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."]
2615 #[repr(transparent)]
2616 #[derive(Copy, Clone, Eq, PartialEq)]
2617 pub struct Icr(pub u32);
2618 impl Icr {
2619 #[doc = "CCRCFAIL flag clear bit Set by software to clear the CCRCFAIL flag."]
2620 pub const fn ccrcfailc(&self) -> bool {
2621 let val = (self.0 >> 0usize) & 0x01;
2622 val != 0
2623 }
2624 #[doc = "CCRCFAIL flag clear bit Set by software to clear the CCRCFAIL flag."]
2625 pub fn set_ccrcfailc(&mut self, val: bool) {
2626 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
2627 }
2628 #[doc = "DCRCFAIL flag clear bit Set by software to clear the DCRCFAIL flag."]
2629 pub const fn dcrcfailc(&self) -> bool {
2630 let val = (self.0 >> 1usize) & 0x01;
2631 val != 0
2632 }
2633 #[doc = "DCRCFAIL flag clear bit Set by software to clear the DCRCFAIL flag."]
2634 pub fn set_dcrcfailc(&mut self, val: bool) {
2635 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
2636 }
2637 #[doc = "CTIMEOUT flag clear bit Set by software to clear the CTIMEOUT flag."]
2638 pub const fn ctimeoutc(&self) -> bool {
2639 let val = (self.0 >> 2usize) & 0x01;
2640 val != 0
2641 }
2642 #[doc = "CTIMEOUT flag clear bit Set by software to clear the CTIMEOUT flag."]
2643 pub fn set_ctimeoutc(&mut self, val: bool) {
2644 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
2645 }
2646 #[doc = "DTIMEOUT flag clear bit Set by software to clear the DTIMEOUT flag."]
2647 pub const fn dtimeoutc(&self) -> bool {
2648 let val = (self.0 >> 3usize) & 0x01;
2649 val != 0
2650 }
2651 #[doc = "DTIMEOUT flag clear bit Set by software to clear the DTIMEOUT flag."]
2652 pub fn set_dtimeoutc(&mut self, val: bool) {
2653 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
2654 }
2655 #[doc = "TXUNDERR flag clear bit Set by software to clear TXUNDERR flag."]
2656 pub const fn txunderrc(&self) -> bool {
2657 let val = (self.0 >> 4usize) & 0x01;
2658 val != 0
2659 }
2660 #[doc = "TXUNDERR flag clear bit Set by software to clear TXUNDERR flag."]
2661 pub fn set_txunderrc(&mut self, val: bool) {
2662 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
2663 }
2664 #[doc = "RXOVERR flag clear bit Set by software to clear the RXOVERR flag."]
2665 pub const fn rxoverrc(&self) -> bool {
2666 let val = (self.0 >> 5usize) & 0x01;
2667 val != 0
2668 }
2669 #[doc = "RXOVERR flag clear bit Set by software to clear the RXOVERR flag."]
2670 pub fn set_rxoverrc(&mut self, val: bool) {
2671 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
2672 }
2673 #[doc = "CMDREND flag clear bit Set by software to clear the CMDREND flag."]
2674 pub const fn cmdrendc(&self) -> bool {
2675 let val = (self.0 >> 6usize) & 0x01;
2676 val != 0
2677 }
2678 #[doc = "CMDREND flag clear bit Set by software to clear the CMDREND flag."]
2679 pub fn set_cmdrendc(&mut self, val: bool) {
2680 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
2681 }
2682 #[doc = "CMDSENT flag clear bit Set by software to clear the CMDSENT flag."]
2683 pub const fn cmdsentc(&self) -> bool {
2684 let val = (self.0 >> 7usize) & 0x01;
2685 val != 0
2686 }
2687 #[doc = "CMDSENT flag clear bit Set by software to clear the CMDSENT flag."]
2688 pub fn set_cmdsentc(&mut self, val: bool) {
2689 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
2690 }
2691 #[doc = "DATAEND flag clear bit Set by software to clear the DATAEND flag."]
2692 pub const fn dataendc(&self) -> bool {
2693 let val = (self.0 >> 8usize) & 0x01;
2694 val != 0
2695 }
2696 #[doc = "DATAEND flag clear bit Set by software to clear the DATAEND flag."]
2697 pub fn set_dataendc(&mut self, val: bool) {
2698 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
2699 }
2700 #[doc = "DHOLD flag clear bit Set by software to clear the DHOLD flag."]
2701 pub const fn dholdc(&self) -> bool {
2702 let val = (self.0 >> 9usize) & 0x01;
2703 val != 0
2704 }
2705 #[doc = "DHOLD flag clear bit Set by software to clear the DHOLD flag."]
2706 pub fn set_dholdc(&mut self, val: bool) {
2707 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
2708 }
2709 #[doc = "DBCKEND flag clear bit Set by software to clear the DBCKEND flag."]
2710 pub const fn dbckendc(&self) -> bool {
2711 let val = (self.0 >> 10usize) & 0x01;
2712 val != 0
2713 }
2714 #[doc = "DBCKEND flag clear bit Set by software to clear the DBCKEND flag."]
2715 pub fn set_dbckendc(&mut self, val: bool) {
2716 self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize);
2717 }
2718 #[doc = "DABORT flag clear bit Set by software to clear the DABORT flag."]
2719 pub const fn dabortc(&self) -> bool {
2720 let val = (self.0 >> 11usize) & 0x01;
2721 val != 0
2722 }
2723 #[doc = "DABORT flag clear bit Set by software to clear the DABORT flag."]
2724 pub fn set_dabortc(&mut self, val: bool) {
2725 self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize);
2726 }
2727 #[doc = "BUSYD0END flag clear bit Set by software to clear the BUSYD0END flag."]
2728 pub const fn busyd0endc(&self) -> bool {
2729 let val = (self.0 >> 21usize) & 0x01;
2730 val != 0
2731 }
2732 #[doc = "BUSYD0END flag clear bit Set by software to clear the BUSYD0END flag."]
2733 pub fn set_busyd0endc(&mut self, val: bool) {
2734 self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize);
2735 }
2736 #[doc = "SDIOIT flag clear bit Set by software to clear the SDIOIT flag."]
2737 pub const fn sdioitc(&self) -> bool {
2738 let val = (self.0 >> 22usize) & 0x01;
2739 val != 0
2740 }
2741 #[doc = "SDIOIT flag clear bit Set by software to clear the SDIOIT flag."]
2742 pub fn set_sdioitc(&mut self, val: bool) {
2743 self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize);
2744 }
2745 #[doc = "ACKFAIL flag clear bit Set by software to clear the ACKFAIL flag."]
2746 pub const fn ackfailc(&self) -> bool {
2747 let val = (self.0 >> 23usize) & 0x01;
2748 val != 0
2749 }
2750 #[doc = "ACKFAIL flag clear bit Set by software to clear the ACKFAIL flag."]
2751 pub fn set_ackfailc(&mut self, val: bool) {
2752 self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize);
2753 }
2754 #[doc = "ACKTIMEOUT flag clear bit Set by software to clear the ACKTIMEOUT flag."]
2755 pub const fn acktimeoutc(&self) -> bool {
2756 let val = (self.0 >> 24usize) & 0x01;
2757 val != 0
2758 }
2759 #[doc = "ACKTIMEOUT flag clear bit Set by software to clear the ACKTIMEOUT flag."]
2760 pub fn set_acktimeoutc(&mut self, val: bool) {
2761 self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize);
2762 }
2763 #[doc = "VSWEND flag clear bit Set by software to clear the VSWEND flag."]
2764 pub const fn vswendc(&self) -> bool {
2765 let val = (self.0 >> 25usize) & 0x01;
2766 val != 0
2767 }
2768 #[doc = "VSWEND flag clear bit Set by software to clear the VSWEND flag."]
2769 pub fn set_vswendc(&mut self, val: bool) {
2770 self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize);
2771 }
2772 #[doc = "CKSTOP flag clear bit Set by software to clear the CKSTOP flag."]
2773 pub const fn ckstopc(&self) -> bool {
2774 let val = (self.0 >> 26usize) & 0x01;
2775 val != 0
2776 }
2777 #[doc = "CKSTOP flag clear bit Set by software to clear the CKSTOP flag."]
2778 pub fn set_ckstopc(&mut self, val: bool) {
2779 self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize);
2780 }
2781 #[doc = "IDMA transfer error clear bit Set by software to clear the IDMATE flag."]
2782 pub const fn idmatec(&self) -> bool {
2783 let val = (self.0 >> 27usize) & 0x01;
2784 val != 0
2785 }
2786 #[doc = "IDMA transfer error clear bit Set by software to clear the IDMATE flag."]
2787 pub fn set_idmatec(&mut self, val: bool) {
2788 self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize);
2789 }
2790 #[doc = "IDMA buffer transfer complete clear bit Set by software to clear the IDMABTC flag."]
2791 pub const fn idmabtcc(&self) -> bool {
2792 let val = (self.0 >> 28usize) & 0x01;
2793 val != 0
2794 }
2795 #[doc = "IDMA buffer transfer complete clear bit Set by software to clear the IDMABTC flag."]
2796 pub fn set_idmabtcc(&mut self, val: bool) {
2797 self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize);
2798 }
2799 }
2800 impl Default for Icr {
2801 fn default() -> Icr {
2802 Icr(0)
2803 }
2804 }
2805 #[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."]
2806 #[repr(transparent)]
2807 #[derive(Copy, Clone, Eq, PartialEq)]
2808 pub struct Idmactrlr(pub u32);
2809 impl Idmactrlr {
2810 #[doc = "IDMA enable This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
2811 pub const fn idmaen(&self) -> bool {
2812 let val = (self.0 >> 0usize) & 0x01;
2813 val != 0
2814 }
2815 #[doc = "IDMA enable This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
2816 pub fn set_idmaen(&mut self, val: bool) {
2817 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
2818 }
2819 #[doc = "Buffer mode selection. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
2820 pub const fn idmabmode(&self) -> bool {
2821 let val = (self.0 >> 1usize) & 0x01;
2822 val != 0
2823 }
2824 #[doc = "Buffer mode selection. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
2825 pub fn set_idmabmode(&mut self, val: bool) {
2826 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
2827 }
2828 #[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."]
2829 pub const fn idmabact(&self) -> bool {
2830 let val = (self.0 >> 2usize) & 0x01;
2831 val != 0
2832 }
2833 #[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."]
2834 pub fn set_idmabact(&mut self, val: bool) {
2835 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
2836 }
2837 }
2838 impl Default for Idmactrlr {
2839 fn default() -> Idmactrlr {
2840 Idmactrlr(0)
2841 }
2842 }
2843 #[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."]
2844 #[repr(transparent)]
2845 #[derive(Copy, Clone, Eq, PartialEq)]
2846 pub struct Idmabase0r(pub u32);
2847 impl Idmabase0r {
2848 #[doc = "Buffer 0 memory base address bits [31:2], shall be word aligned (bit [1:0]
2849are 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)."]
2850 pub const fn idmabase0(&self) -> u32 {
2851 let val = (self.0 >> 0usize) & 0xffff_ffff;
2852 val as u32
2853 }
2854 #[doc = "Buffer 0 memory base address bits [31:2], shall be word aligned (bit [1:0]
2855are 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)."]
2856 pub fn set_idmabase0(&mut self, val: u32) {
2857 self.0 =
2858 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
2859 }
2860 }
2861 impl Default for Idmabase0r {
2862 fn default() -> Idmabase0r {
2863 Idmabase0r(0)
2864 }
2865 }
2866 #[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."]
2867 #[repr(transparent)]
2868 #[derive(Copy, Clone, Eq, PartialEq)]
2869 pub struct Dcntr(pub u32);
2870 impl Dcntr {
2871 #[doc = "Data count value When read, the number of remaining data bytes to be transferred is returned. Write has no effect."]
2872 pub const fn datacount(&self) -> u32 {
2873 let val = (self.0 >> 0usize) & 0x01ff_ffff;
2874 val as u32
2875 }
2876 #[doc = "Data count value When read, the number of remaining data bytes to be transferred is returned. Write has no effect."]
2877 pub fn set_datacount(&mut self, val: u32) {
2878 self.0 =
2879 (self.0 & !(0x01ff_ffff << 0usize)) | (((val as u32) & 0x01ff_ffff) << 0usize);
2880 }
2881 }
2882 impl Default for Dcntr {
2883 fn default() -> Dcntr {
2884 Dcntr(0)
2885 }
2886 }
2887 #[doc = "The SDMMC_IDMABSIZER register contains the buffers size when in double buffer configuration."]
2888 #[repr(transparent)]
2889 #[derive(Copy, Clone, Eq, PartialEq)]
2890 pub struct Idmabsizer(pub u32);
2891 impl Idmabsizer {
2892 #[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)."]
2893 pub const fn idmabndt(&self) -> u8 {
2894 let val = (self.0 >> 5usize) & 0xff;
2895 val as u8
2896 }
2897 #[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)."]
2898 pub fn set_idmabndt(&mut self, val: u8) {
2899 self.0 = (self.0 & !(0xff << 5usize)) | (((val as u32) & 0xff) << 5usize);
2900 }
2901 }
2902 impl Default for Idmabsizer {
2903 fn default() -> Idmabsizer {
2904 Idmabsizer(0)
2905 }
2906 }
2907 #[doc = "The SDMMC_RESP1/2/3/4R registers contain the status of a card, which is part of the received response."]
2908 #[repr(transparent)]
2909 #[derive(Copy, Clone, Eq, PartialEq)]
2910 pub struct Resp3r(pub u32);
2911 impl Resp3r {
2912 #[doc = "see Table404."]
2913 pub const fn cardstatus3(&self) -> u32 {
2914 let val = (self.0 >> 0usize) & 0xffff_ffff;
2915 val as u32
2916 }
2917 #[doc = "see Table404."]
2918 pub fn set_cardstatus3(&mut self, val: u32) {
2919 self.0 =
2920 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
2921 }
2922 }
2923 impl Default for Resp3r {
2924 fn default() -> Resp3r {
2925 Resp3r(0)
2926 }
2927 }
2928 #[doc = "The SDMMC_CLKCR register controls the SDMMC_CK output clock, the SDMMC_RX_CLK receive clock, and the bus width."]
2929 #[repr(transparent)]
2930 #[derive(Copy, Clone, Eq, PartialEq)]
2931 pub struct Clkcr(pub u32);
2932 impl Clkcr {
2933 #[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.."]
2934 pub const fn clkdiv(&self) -> u16 {
2935 let val = (self.0 >> 0usize) & 0x03ff;
2936 val as u16
2937 }
2938 #[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.."]
2939 pub fn set_clkdiv(&mut self, val: u16) {
2940 self.0 = (self.0 & !(0x03ff << 0usize)) | (((val as u32) & 0x03ff) << 0usize);
2941 }
2942 #[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:"]
2943 pub const fn pwrsav(&self) -> bool {
2944 let val = (self.0 >> 12usize) & 0x01;
2945 val != 0
2946 }
2947 #[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:"]
2948 pub fn set_pwrsav(&mut self, val: bool) {
2949 self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize);
2950 }
2951 #[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)"]
2952 pub const fn widbus(&self) -> u8 {
2953 let val = (self.0 >> 14usize) & 0x03;
2954 val as u8
2955 }
2956 #[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)"]
2957 pub fn set_widbus(&mut self, val: u8) {
2958 self.0 = (self.0 & !(0x03 << 14usize)) | (((val as u32) & 0x03) << 14usize);
2959 }
2960 #[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."]
2961 pub const fn negedge(&self) -> bool {
2962 let val = (self.0 >> 16usize) & 0x01;
2963 val != 0
2964 }
2965 #[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."]
2966 pub fn set_negedge(&mut self, val: bool) {
2967 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
2968 }
2969 #[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."]
2970 pub const fn hwfc_en(&self) -> bool {
2971 let val = (self.0 >> 17usize) & 0x01;
2972 val != 0
2973 }
2974 #[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."]
2975 pub fn set_hwfc_en(&mut self, val: bool) {
2976 self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize);
2977 }
2978 #[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)"]
2979 pub const fn ddr(&self) -> bool {
2980 let val = (self.0 >> 18usize) & 0x01;
2981 val != 0
2982 }
2983 #[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)"]
2984 pub fn set_ddr(&mut self, val: bool) {
2985 self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize);
2986 }
2987 #[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)"]
2988 pub const fn busspeed(&self) -> bool {
2989 let val = (self.0 >> 19usize) & 0x01;
2990 val != 0
2991 }
2992 #[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)"]
2993 pub fn set_busspeed(&mut self, val: bool) {
2994 self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize);
2995 }
2996 #[doc = "Receive clock selection. These bits can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0)"]
2997 pub const fn selclkrx(&self) -> u8 {
2998 let val = (self.0 >> 20usize) & 0x03;
2999 val as u8
3000 }
3001 #[doc = "Receive clock selection. These bits can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0)"]
3002 pub fn set_selclkrx(&mut self, val: u8) {
3003 self.0 = (self.0 & !(0x03 << 20usize)) | (((val as u32) & 0x03) << 20usize);
3004 }
3005 }
3006 impl Default for Clkcr {
3007 fn default() -> Clkcr {
3008 Clkcr(0)
3009 }
3010 }
3011 #[doc = "The SDMMC_STAR register is a read-only register. It contains two types of flag:Static flags (bits [29,21,11:0]): these bits remain asserted until they are cleared by writing to the SDMMC interrupt Clear register (see SDMMC_ICR)Dynamic flags (bits [20:12]): these bits change state depending on the state of the underlying logic (for example, FIFO full and empty flags are asserted and de-asserted as data while written to the FIFO)"]
3012 #[repr(transparent)]
3013 #[derive(Copy, Clone, Eq, PartialEq)]
3014 pub struct Star(pub u32);
3015 impl Star {
3016 #[doc = "Command response received (CRC check failed). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
3017 pub const fn ccrcfail(&self) -> bool {
3018 let val = (self.0 >> 0usize) & 0x01;
3019 val != 0
3020 }
3021 #[doc = "Command response received (CRC check failed). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
3022 pub fn set_ccrcfail(&mut self, val: bool) {
3023 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
3024 }
3025 #[doc = "Data block sent/received (CRC check failed). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
3026 pub const fn dcrcfail(&self) -> bool {
3027 let val = (self.0 >> 1usize) & 0x01;
3028 val != 0
3029 }
3030 #[doc = "Data block sent/received (CRC check failed). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
3031 pub fn set_dcrcfail(&mut self, val: bool) {
3032 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
3033 }
3034 #[doc = "Command response timeout. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR. The Command Timeout period has a fixed value of 64 SDMMC_CK clock periods."]
3035 pub const fn ctimeout(&self) -> bool {
3036 let val = (self.0 >> 2usize) & 0x01;
3037 val != 0
3038 }
3039 #[doc = "Command response timeout. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR. The Command Timeout period has a fixed value of 64 SDMMC_CK clock periods."]
3040 pub fn set_ctimeout(&mut self, val: bool) {
3041 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
3042 }
3043 #[doc = "Data timeout. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
3044 pub const fn dtimeout(&self) -> bool {
3045 let val = (self.0 >> 3usize) & 0x01;
3046 val != 0
3047 }
3048 #[doc = "Data timeout. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
3049 pub fn set_dtimeout(&mut self, val: bool) {
3050 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
3051 }
3052 #[doc = "Transmit FIFO underrun error or IDMA read transfer error. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
3053 pub const fn txunderr(&self) -> bool {
3054 let val = (self.0 >> 4usize) & 0x01;
3055 val != 0
3056 }
3057 #[doc = "Transmit FIFO underrun error or IDMA read transfer error. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
3058 pub fn set_txunderr(&mut self, val: bool) {
3059 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
3060 }
3061 #[doc = "Received FIFO overrun error or IDMA write transfer error. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
3062 pub const fn rxoverr(&self) -> bool {
3063 let val = (self.0 >> 5usize) & 0x01;
3064 val != 0
3065 }
3066 #[doc = "Received FIFO overrun error or IDMA write transfer error. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
3067 pub fn set_rxoverr(&mut self, val: bool) {
3068 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
3069 }
3070 #[doc = "Command response received (CRC check passed, or no CRC). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
3071 pub const fn cmdrend(&self) -> bool {
3072 let val = (self.0 >> 6usize) & 0x01;
3073 val != 0
3074 }
3075 #[doc = "Command response received (CRC check passed, or no CRC). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
3076 pub fn set_cmdrend(&mut self, val: bool) {
3077 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
3078 }
3079 #[doc = "Command sent (no response required). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
3080 pub const fn cmdsent(&self) -> bool {
3081 let val = (self.0 >> 7usize) & 0x01;
3082 val != 0
3083 }
3084 #[doc = "Command sent (no response required). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
3085 pub fn set_cmdsent(&mut self, val: bool) {
3086 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
3087 }
3088 #[doc = "Data transfer ended correctly. (data counter, DATACOUNT is zero and no errors occur). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
3089 pub const fn dataend(&self) -> bool {
3090 let val = (self.0 >> 8usize) & 0x01;
3091 val != 0
3092 }
3093 #[doc = "Data transfer ended correctly. (data counter, DATACOUNT is zero and no errors occur). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
3094 pub fn set_dataend(&mut self, val: bool) {
3095 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
3096 }
3097 #[doc = "Data transfer Hold. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
3098 pub const fn dhold(&self) -> bool {
3099 let val = (self.0 >> 9usize) & 0x01;
3100 val != 0
3101 }
3102 #[doc = "Data transfer Hold. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
3103 pub fn set_dhold(&mut self, val: bool) {
3104 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
3105 }
3106 #[doc = "Data block sent/received. (CRC check passed) and DPSM moves to the READWAIT state. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
3107 pub const fn dbckend(&self) -> bool {
3108 let val = (self.0 >> 10usize) & 0x01;
3109 val != 0
3110 }
3111 #[doc = "Data block sent/received. (CRC check passed) and DPSM moves to the READWAIT state. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
3112 pub fn set_dbckend(&mut self, val: bool) {
3113 self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize);
3114 }
3115 #[doc = "Data transfer aborted by CMD12. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
3116 pub const fn dabort(&self) -> bool {
3117 let val = (self.0 >> 11usize) & 0x01;
3118 val != 0
3119 }
3120 #[doc = "Data transfer aborted by CMD12. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
3121 pub fn set_dabort(&mut self, val: bool) {
3122 self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize);
3123 }
3124 #[doc = "Data path state machine active, i.e. not in Idle state. This is a hardware status flag only, does not generate an interrupt."]
3125 pub const fn dpsmact(&self) -> bool {
3126 let val = (self.0 >> 12usize) & 0x01;
3127 val != 0
3128 }
3129 #[doc = "Data path state machine active, i.e. not in Idle state. This is a hardware status flag only, does not generate an interrupt."]
3130 pub fn set_dpsmact(&mut self, val: bool) {
3131 self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize);
3132 }
3133 #[doc = "Command path state machine active, i.e. not in Idle state. This is a hardware status flag only, does not generate an interrupt."]
3134 pub const fn cpsmact(&self) -> bool {
3135 let val = (self.0 >> 13usize) & 0x01;
3136 val != 0
3137 }
3138 #[doc = "Command path state machine active, i.e. not in Idle state. This is a hardware status flag only, does not generate an interrupt."]
3139 pub fn set_cpsmact(&mut self, val: bool) {
3140 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize);
3141 }
3142 #[doc = "Transmit FIFO half empty At least half the number of words can be written into the FIFO. This bit is cleared when the FIFO becomes half+1 full."]
3143 pub const fn txfifohe(&self) -> bool {
3144 let val = (self.0 >> 14usize) & 0x01;
3145 val != 0
3146 }
3147 #[doc = "Transmit FIFO half empty At least half the number of words can be written into the FIFO. This bit is cleared when the FIFO becomes half+1 full."]
3148 pub fn set_txfifohe(&mut self, val: bool) {
3149 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize);
3150 }
3151 #[doc = "Receive FIFO half full There are at least half the number of words in the FIFO. This bit is cleared when the FIFO becomes half+1 empty."]
3152 pub const fn rxfifohf(&self) -> bool {
3153 let val = (self.0 >> 15usize) & 0x01;
3154 val != 0
3155 }
3156 #[doc = "Receive FIFO half full There are at least half the number of words in the FIFO. This bit is cleared when the FIFO becomes half+1 empty."]
3157 pub fn set_rxfifohf(&mut self, val: bool) {
3158 self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize);
3159 }
3160 #[doc = "Transmit FIFO full This is a hardware status flag only, does not generate an interrupt. This bit is cleared when one FIFO location becomes empty."]
3161 pub const fn txfifof(&self) -> bool {
3162 let val = (self.0 >> 16usize) & 0x01;
3163 val != 0
3164 }
3165 #[doc = "Transmit FIFO full This is a hardware status flag only, does not generate an interrupt. This bit is cleared when one FIFO location becomes empty."]
3166 pub fn set_txfifof(&mut self, val: bool) {
3167 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
3168 }
3169 #[doc = "Receive FIFO full This bit is cleared when one FIFO location becomes empty."]
3170 pub const fn rxfifof(&self) -> bool {
3171 let val = (self.0 >> 17usize) & 0x01;
3172 val != 0
3173 }
3174 #[doc = "Receive FIFO full This bit is cleared when one FIFO location becomes empty."]
3175 pub fn set_rxfifof(&mut self, val: bool) {
3176 self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize);
3177 }
3178 #[doc = "Transmit FIFO empty This bit is cleared when one FIFO location becomes full."]
3179 pub const fn txfifoe(&self) -> bool {
3180 let val = (self.0 >> 18usize) & 0x01;
3181 val != 0
3182 }
3183 #[doc = "Transmit FIFO empty This bit is cleared when one FIFO location becomes full."]
3184 pub fn set_txfifoe(&mut self, val: bool) {
3185 self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize);
3186 }
3187 #[doc = "Receive FIFO empty This is a hardware status flag only, does not generate an interrupt. This bit is cleared when one FIFO location becomes full."]
3188 pub const fn rxfifoe(&self) -> bool {
3189 let val = (self.0 >> 19usize) & 0x01;
3190 val != 0
3191 }
3192 #[doc = "Receive FIFO empty This is a hardware status flag only, does not generate an interrupt. This bit is cleared when one FIFO location becomes full."]
3193 pub fn set_rxfifoe(&mut self, val: bool) {
3194 self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize);
3195 }
3196 #[doc = "Inverted value of SDMMC_D0 line (Busy), sampled at the end of a CMD response and a second time 2 SDMMC_CK cycles after the CMD response. This bit is reset to not busy when the SDMMCD0 line changes from busy to not busy. This bit does not signal busy due to data transfer. This is a hardware status flag only, it does not generate an interrupt."]
3197 pub const fn busyd0(&self) -> bool {
3198 let val = (self.0 >> 20usize) & 0x01;
3199 val != 0
3200 }
3201 #[doc = "Inverted value of SDMMC_D0 line (Busy), sampled at the end of a CMD response and a second time 2 SDMMC_CK cycles after the CMD response. This bit is reset to not busy when the SDMMCD0 line changes from busy to not busy. This bit does not signal busy due to data transfer. This is a hardware status flag only, it does not generate an interrupt."]
3202 pub fn set_busyd0(&mut self, val: bool) {
3203 self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize);
3204 }
3205 #[doc = "end of SDMMC_D0 Busy following a CMD response detected. This indicates only end of busy following a CMD response. This bit does not signal busy due to data transfer. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
3206 pub const fn busyd0end(&self) -> bool {
3207 let val = (self.0 >> 21usize) & 0x01;
3208 val != 0
3209 }
3210 #[doc = "end of SDMMC_D0 Busy following a CMD response detected. This indicates only end of busy following a CMD response. This bit does not signal busy due to data transfer. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
3211 pub fn set_busyd0end(&mut self, val: bool) {
3212 self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize);
3213 }
3214 #[doc = "SDIO interrupt received. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
3215 pub const fn sdioit(&self) -> bool {
3216 let val = (self.0 >> 22usize) & 0x01;
3217 val != 0
3218 }
3219 #[doc = "SDIO interrupt received. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
3220 pub fn set_sdioit(&mut self, val: bool) {
3221 self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize);
3222 }
3223 #[doc = "Boot acknowledgment received (boot acknowledgment check fail). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
3224 pub const fn ackfail(&self) -> bool {
3225 let val = (self.0 >> 23usize) & 0x01;
3226 val != 0
3227 }
3228 #[doc = "Boot acknowledgment received (boot acknowledgment check fail). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
3229 pub fn set_ackfail(&mut self, val: bool) {
3230 self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize);
3231 }
3232 #[doc = "Boot acknowledgment timeout. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
3233 pub const fn acktimeout(&self) -> bool {
3234 let val = (self.0 >> 24usize) & 0x01;
3235 val != 0
3236 }
3237 #[doc = "Boot acknowledgment timeout. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
3238 pub fn set_acktimeout(&mut self, val: bool) {
3239 self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize);
3240 }
3241 #[doc = "Voltage switch critical timing section completion. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
3242 pub const fn vswend(&self) -> bool {
3243 let val = (self.0 >> 25usize) & 0x01;
3244 val != 0
3245 }
3246 #[doc = "Voltage switch critical timing section completion. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
3247 pub fn set_vswend(&mut self, val: bool) {
3248 self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize);
3249 }
3250 #[doc = "SDMMC_CK stopped in Voltage switch procedure. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
3251 pub const fn ckstop(&self) -> bool {
3252 let val = (self.0 >> 26usize) & 0x01;
3253 val != 0
3254 }
3255 #[doc = "SDMMC_CK stopped in Voltage switch procedure. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
3256 pub fn set_ckstop(&mut self, val: bool) {
3257 self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize);
3258 }
3259 #[doc = "IDMA transfer error. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
3260 pub const fn idmate(&self) -> bool {
3261 let val = (self.0 >> 27usize) & 0x01;
3262 val != 0
3263 }
3264 #[doc = "IDMA transfer error. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
3265 pub fn set_idmate(&mut self, val: bool) {
3266 self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize);
3267 }
3268 #[doc = "IDMA buffer transfer complete. interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
3269 pub const fn idmabtc(&self) -> bool {
3270 let val = (self.0 >> 28usize) & 0x01;
3271 val != 0
3272 }
3273 #[doc = "IDMA buffer transfer complete. interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
3274 pub fn set_idmabtc(&mut self, val: bool) {
3275 self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize);
3276 }
3277 }
3278 impl Default for Star {
3279 fn default() -> Star {
3280 Star(0)
3281 }
3282 }
3283 #[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."]
3284 #[repr(transparent)]
3285 #[derive(Copy, Clone, Eq, PartialEq)]
3286 pub struct Dlenr(pub u32);
3287 impl Dlenr {
3288 #[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."]
3289 pub const fn datalength(&self) -> u32 {
3290 let val = (self.0 >> 0usize) & 0x01ff_ffff;
3291 val as u32
3292 }
3293 #[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."]
3294 pub fn set_datalength(&mut self, val: u32) {
3295 self.0 =
3296 (self.0 & !(0x01ff_ffff << 0usize)) | (((val as u32) & 0x01ff_ffff) << 0usize);
3297 }
3298 }
3299 impl Default for Dlenr {
3300 fn default() -> Dlenr {
3301 Dlenr(0)
3302 }
3303 }
3304 }
3305}
3306pub mod gpio_v1 {
3307 use crate::generic::*;
3308 #[doc = "General purpose I/O"]
3309 #[derive(Copy, Clone)]
3310 pub struct Gpio(pub *mut u8);
3311 unsafe impl Send for Gpio {}
3312 unsafe impl Sync for Gpio {}
3313 impl Gpio {
3314 #[doc = "Port configuration register low (GPIOn_CRL)"]
3315 pub fn cr(self, n: usize) -> Reg<regs::Cr, RW> {
3316 assert!(n < 2usize);
3317 unsafe { Reg::from_ptr(self.0.add(0usize + n * 4usize)) }
3318 }
3319 #[doc = "Port input data register (GPIOn_IDR)"]
3320 pub fn idr(self) -> Reg<regs::Idr, R> {
3321 unsafe { Reg::from_ptr(self.0.add(8usize)) }
3322 }
3323 #[doc = "Port output data register (GPIOn_ODR)"]
3324 pub fn odr(self) -> Reg<regs::Odr, RW> {
3325 unsafe { Reg::from_ptr(self.0.add(12usize)) }
3326>>>>>>> Better interrupt handling
3327 }
3328 impl Default for Pupdr {
3329 fn default() -> Pupdr {
3330 Pupdr(0)
3331 }
3332 }
3333 #[doc = "GPIO port output type register"]
3334 #[repr(transparent)]
3335 #[derive(Copy, Clone, Eq, PartialEq)]
3336 pub struct Otyper(pub u32);
3337 impl Otyper {
3338 #[doc = "Port x configuration bits (y = 0..15)"]
3339 pub fn ot(&self, n: usize) -> super::vals::Ot {
3340 assert!(n < 16usize);
3341 let offs = 0usize + n * 1usize;
3342 let val = (self.0 >> offs) & 0x01;
3343 super::vals::Ot(val as u8)
3344 }
3345 #[doc = "Port x configuration bits (y = 0..15)"]
3346 pub fn set_ot(&mut self, n: usize, val: super::vals::Ot) {
3347 assert!(n < 16usize);
3348 let offs = 0usize + n * 1usize;
3349 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs);
3350 }
3351 }
3352 impl Default for Otyper {
3353 fn default() -> Otyper {
3354 Otyper(0)
3355 }
3356 }
3357 }
3358 pub mod vals {
3359 use crate::generic::*;
3360 #[repr(transparent)]
3361 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3362<<<<<<< HEAD
3363 pub struct Pupdr(pub u8);
3364 impl Pupdr {
3365 #[doc = "No pull-up, pull-down"]
3366 pub const FLOATING: Self = Self(0);
3367 #[doc = "Pull-up"]
3368 pub const PULLUP: Self = Self(0x01);
3369 #[doc = "Pull-down"]
3370 pub const PULLDOWN: Self = Self(0x02);
3371 }
3372 #[repr(transparent)]
3373 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3374 pub struct Ot(pub u8);
3375 impl Ot {
3376 #[doc = "Output push-pull (reset state)"]
3377 pub const PUSHPULL: Self = Self(0);
3378 #[doc = "Output open-drain"]
3379 pub const OPENDRAIN: Self = Self(0x01);
3380 }
3381 #[repr(transparent)]
3382 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3383 pub struct Afr(pub u8);
3384 impl Afr {
3385 #[doc = "AF0"]
3386 pub const AF0: Self = Self(0);
3387 #[doc = "AF1"]
3388 pub const AF1: Self = Self(0x01);
3389 #[doc = "AF2"]
3390 pub const AF2: Self = Self(0x02);
3391 #[doc = "AF3"]
3392 pub const AF3: Self = Self(0x03);
3393 #[doc = "AF4"]
3394 pub const AF4: Self = Self(0x04);
3395 #[doc = "AF5"]
3396 pub const AF5: Self = Self(0x05);
3397 #[doc = "AF6"]
3398 pub const AF6: Self = Self(0x06);
3399 #[doc = "AF7"]
3400 pub const AF7: Self = Self(0x07);
3401 #[doc = "AF8"]
3402 pub const AF8: Self = Self(0x08);
3403 #[doc = "AF9"]
3404 pub const AF9: Self = Self(0x09);
3405 #[doc = "AF10"]
3406 pub const AF10: Self = Self(0x0a);
3407 #[doc = "AF11"]
3408 pub const AF11: Self = Self(0x0b);
3409 #[doc = "AF12"]
3410 pub const AF12: Self = Self(0x0c);
3411 #[doc = "AF13"]
3412 pub const AF13: Self = Self(0x0d);
3413 #[doc = "AF14"]
3414 pub const AF14: Self = Self(0x0e);
3415 #[doc = "AF15"]
3416 pub const AF15: Self = Self(0x0f);
3417 }
3418 #[repr(transparent)]
3419 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3420 pub struct Brw(pub u8);
3421 impl Brw {
3422 #[doc = "Resets the corresponding ODRx bit"]
3423 pub const RESET: Self = Self(0x01);
3424 }
3425 #[repr(transparent)]
3426 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3427 pub struct Lck(pub u8);
3428 impl Lck {
3429 #[doc = "Port configuration not locked"]
3430 pub const UNLOCKED: Self = Self(0);
3431 #[doc = "Port configuration locked"]
3432 pub const LOCKED: Self = Self(0x01);
3433=======
3434 pub struct Cnf(pub u8);
3435 impl Cnf {
3436 #[doc = "Analog mode / Push-Pull mode"]
3437 pub const PUSHPULL: Self = Self(0);
3438 #[doc = "Floating input (reset state) / Open Drain-Mode"]
3439 pub const OPENDRAIN: Self = Self(0x01);
3440 #[doc = "Input with pull-up/pull-down / Alternate Function Push-Pull Mode"]
3441 pub const ALTPUSHPULL: Self = Self(0x02);
3442 #[doc = "Alternate Function Open-Drain Mode"]
3443 pub const ALTOPENDRAIN: Self = Self(0x03);
3444>>>>>>> Better interrupt handling
3445 }
3446 #[repr(transparent)]
3447 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3448 pub struct Moder(pub u8);
3449 impl Moder {
3450 #[doc = "Input mode (reset state)"]
3451 pub const INPUT: Self = Self(0);
3452 #[doc = "General purpose output mode"]
3453 pub const OUTPUT: Self = Self(0x01);
3454 #[doc = "Alternate function mode"]
3455 pub const ALTERNATE: Self = Self(0x02);
3456 #[doc = "Analog mode"]
3457 pub const ANALOG: Self = Self(0x03);
3458 }
3459 #[repr(transparent)]
3460 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3461 pub struct Idr(pub u8);
3462 impl Idr {
3463 #[doc = "Input is logic low"]
3464 pub const LOW: Self = Self(0);
3465 #[doc = "Input is logic high"]
3466 pub const HIGH: Self = Self(0x01);
3467 }
3468 #[repr(transparent)]
3469 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3470<<<<<<< HEAD
3471 pub struct Ospeedr(pub u8);
3472 impl Ospeedr {
3473 #[doc = "Low speed"]
3474 pub const LOWSPEED: Self = Self(0);
3475 #[doc = "Medium speed"]
3476 pub const MEDIUMSPEED: Self = Self(0x01);
3477 #[doc = "High speed"]
3478 pub const HIGHSPEED: Self = Self(0x02);
3479 #[doc = "Very high speed"]
3480 pub const VERYHIGHSPEED: Self = Self(0x03);
3481 }
3482 #[repr(transparent)]
3483 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3484 pub struct Bsw(pub u8);
3485 impl Bsw {
3486 #[doc = "Sets the corresponding ODRx bit"]
3487 pub const SET: Self = Self(0x01);
3488 }
3489 #[repr(transparent)]
3490 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3491=======
3492>>>>>>> Better interrupt handling
3493 pub struct Lckk(pub u8);
3494 impl Lckk {
3495 #[doc = "Port configuration lock key not active"]
3496 pub const NOTACTIVE: Self = Self(0);
3497 #[doc = "Port configuration lock key active"]
3498 pub const ACTIVE: Self = Self(0x01);
3499 }
3500 #[repr(transparent)]
3501 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3502<<<<<<< HEAD
3503=======
3504 pub struct Mode(pub u8);
3505 impl Mode {
3506 #[doc = "Input mode (reset state)"]
3507 pub const INPUT: Self = Self(0);
3508 #[doc = "Output mode 10 MHz"]
3509 pub const OUTPUT: Self = Self(0x01);
3510 #[doc = "Output mode 2 MHz"]
3511 pub const OUTPUT2: Self = Self(0x02);
3512 #[doc = "Output mode 50 MHz"]
3513 pub const OUTPUT50: Self = Self(0x03);
3514 }
3515 #[repr(transparent)]
3516 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3517 pub struct Lck(pub u8);
3518 impl Lck {
3519 #[doc = "Port configuration not locked"]
3520 pub const UNLOCKED: Self = Self(0);
3521 #[doc = "Port configuration locked"]
3522 pub const LOCKED: Self = Self(0x01);
3523 }
3524 #[repr(transparent)]
3525 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3526 pub struct Brw(pub u8);
3527 impl Brw {
3528 #[doc = "No action on the corresponding ODx bit"]
3529 pub const NOACTION: Self = Self(0);
3530 #[doc = "Reset the ODx bit"]
3531 pub const RESET: Self = Self(0x01);
3532 }
3533 #[repr(transparent)]
3534 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3535>>>>>>> Better interrupt handling
3536 pub struct Odr(pub u8);
3537 impl Odr {
3538 #[doc = "Set output to logic low"]
3539 pub const LOW: Self = Self(0);
3540 #[doc = "Set output to logic high"]
3541 pub const HIGH: Self = Self(0x01);
3542 }
3543<<<<<<< HEAD
3544 }
3545}
3546pub mod spi_v1 {
3547 use crate::generic::*;
3548 #[doc = "Serial peripheral interface"]
3549 #[derive(Copy, Clone)]
3550 pub struct Spi(pub *mut u8);
3551 unsafe impl Send for Spi {}
3552 unsafe impl Sync for Spi {}
3553 impl Spi {
3554 #[doc = "control register 1"]
3555 pub fn cr1(self) -> Reg<regs::Cr1, RW> {
3556 unsafe { Reg::from_ptr(self.0.add(0usize)) }
3557 }
3558 #[doc = "control register 2"]
3559 pub fn cr2(self) -> Reg<regs::Cr2, RW> {
3560 unsafe { Reg::from_ptr(self.0.add(4usize)) }
3561 }
3562 #[doc = "status register"]
3563 pub fn sr(self) -> Reg<regs::Sr, RW> {
3564 unsafe { Reg::from_ptr(self.0.add(8usize)) }
3565=======
3566 #[repr(transparent)]
3567 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3568 pub struct Bsw(pub u8);
3569 impl Bsw {
3570 #[doc = "No action on the corresponding ODx bit"]
3571 pub const NOACTION: Self = Self(0);
3572 #[doc = "Sets the corresponding ODRx bit"]
3573 pub const SET: Self = Self(0x01);
3574 }
3575 }
3576 pub mod regs {
3577 use crate::generic::*;
3578 #[doc = "Port bit set/reset register (GPIOn_BSRR)"]
3579 #[repr(transparent)]
3580 #[derive(Copy, Clone, Eq, PartialEq)]
3581 pub struct Bsrr(pub u32);
3582 impl Bsrr {
3583 #[doc = "Set bit"]
3584 pub fn bs(&self, n: usize) -> bool {
3585 assert!(n < 16usize);
3586 let offs = 0usize + n * 1usize;
3587 let val = (self.0 >> offs) & 0x01;
3588 val != 0
3589 }
3590 #[doc = "Set bit"]
3591 pub fn set_bs(&mut self, n: usize, val: bool) {
3592 assert!(n < 16usize);
3593 let offs = 0usize + n * 1usize;
3594 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
3595 }
3596 #[doc = "Reset bit"]
3597 pub fn br(&self, n: usize) -> bool {
3598 assert!(n < 16usize);
3599 let offs = 16usize + n * 1usize;
3600 let val = (self.0 >> offs) & 0x01;
3601 val != 0
3602 }
3603 #[doc = "Reset bit"]
3604 pub fn set_br(&mut self, n: usize, val: bool) {
3605 assert!(n < 16usize);
3606 let offs = 16usize + n * 1usize;
3607 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
3608 }
3609>>>>>>> Better interrupt handling
3610 }
3611 #[doc = "data register"]
3612 pub fn dr(self) -> Reg<regs::Dr, RW> {
3613 unsafe { Reg::from_ptr(self.0.add(12usize)) }
3614 }
3615 #[doc = "CRC polynomial register"]
3616 pub fn crcpr(self) -> Reg<regs::Crcpr, RW> {
3617 unsafe { Reg::from_ptr(self.0.add(16usize)) }
3618 }
3619 #[doc = "RX CRC register"]
3620 pub fn rxcrcr(self) -> Reg<regs::Rxcrcr, R> {
3621 unsafe { Reg::from_ptr(self.0.add(20usize)) }
3622 }
3623 #[doc = "TX CRC register"]
3624 pub fn txcrcr(self) -> Reg<regs::Txcrcr, R> {
3625 unsafe { Reg::from_ptr(self.0.add(24usize)) }
3626 }
3627 }
3628 pub mod vals {
3629 use crate::generic::*;
3630 #[repr(transparent)]
3631 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3632 pub struct Bidimode(pub u8);
3633 impl Bidimode {
3634 #[doc = "2-line unidirectional data mode selected"]
3635 pub const UNIDIRECTIONAL: Self = Self(0);
3636 #[doc = "1-line bidirectional data mode selected"]
3637 pub const BIDIRECTIONAL: Self = Self(0x01);
3638 }
3639 #[repr(transparent)]
3640 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3641 pub struct Iscfg(pub u8);
3642 impl Iscfg {
3643 #[doc = "Slave - transmit"]
3644 pub const SLAVETX: Self = Self(0);
3645 #[doc = "Slave - receive"]
3646 pub const SLAVERX: Self = Self(0x01);
3647 #[doc = "Master - transmit"]
3648 pub const MASTERTX: Self = Self(0x02);
3649 #[doc = "Master - receive"]
3650 pub const MASTERRX: Self = Self(0x03);
3651 }
3652<<<<<<< HEAD
3653=======
3654 #[doc = "Port output data register (GPIOn_ODR)"]
3655 #[repr(transparent)]
3656 #[derive(Copy, Clone, Eq, PartialEq)]
3657 pub struct Odr(pub u32);
3658 impl Odr {
3659 #[doc = "Port output data"]
3660 pub fn odr(&self, n: usize) -> super::vals::Odr {
3661 assert!(n < 16usize);
3662 let offs = 0usize + n * 1usize;
3663 let val = (self.0 >> offs) & 0x01;
3664 super::vals::Odr(val as u8)
3665 }
3666 #[doc = "Port output data"]
3667 pub fn set_odr(&mut self, n: usize, val: super::vals::Odr) {
3668 assert!(n < 16usize);
3669 let offs = 0usize + n * 1usize;
3670 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs);
3671 }
3672 }
3673 impl Default for Odr {
3674 fn default() -> Odr {
3675 Odr(0)
3676 }
3677 }
3678 #[doc = "Port input data register (GPIOn_IDR)"]
3679 #[repr(transparent)]
3680 #[derive(Copy, Clone, Eq, PartialEq)]
3681 pub struct Idr(pub u32);
3682 impl Idr {
3683 #[doc = "Port input data"]
3684 pub fn idr(&self, n: usize) -> super::vals::Idr {
3685 assert!(n < 16usize);
3686 let offs = 0usize + n * 1usize;
3687 let val = (self.0 >> offs) & 0x01;
3688 super::vals::Idr(val as u8)
3689 }
3690 #[doc = "Port input data"]
3691 pub fn set_idr(&mut self, n: usize, val: super::vals::Idr) {
3692 assert!(n < 16usize);
3693 let offs = 0usize + n * 1usize;
3694 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs);
3695 }
3696 }
3697 impl Default for Idr {
3698 fn default() -> Idr {
3699 Idr(0)
3700 }
3701 }
3702 #[doc = "Port configuration register (GPIOn_CRx)"]
3703>>>>>>> Better interrupt handling
3704 #[repr(transparent)]
3705 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3706 pub struct Dff(pub u8);
3707 impl Dff {
3708 #[doc = "8-bit data frame format is selected for transmission/reception"]
3709 pub const EIGHTBIT: Self = Self(0);
3710 #[doc = "16-bit data frame format is selected for transmission/reception"]
3711 pub const SIXTEENBIT: Self = Self(0x01);
3712 }
3713 #[repr(transparent)]
3714 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3715 pub struct Bidioe(pub u8);
3716 impl Bidioe {
3717 #[doc = "Output disabled (receive-only mode)"]
3718 pub const OUTPUTDISABLED: Self = Self(0);
3719 #[doc = "Output enabled (transmit-only mode)"]
3720 pub const OUTPUTENABLED: Self = Self(0x01);
3721 }
3722<<<<<<< HEAD
3723 #[repr(transparent)]
3724 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3725 pub struct Rxonly(pub u8);
3726 impl Rxonly {
3727 #[doc = "Full duplex (Transmit and receive)"]
3728 pub const FULLDUPLEX: Self = Self(0);
3729 #[doc = "Output disabled (Receive-only mode)"]
3730 pub const OUTPUTDISABLED: Self = Self(0x01);
3731 }
3732 #[repr(transparent)]
3733 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3734 pub struct Cpha(pub u8);
3735 impl Cpha {
3736 #[doc = "The first clock transition is the first data capture edge"]
3737 pub const FIRSTEDGE: Self = Self(0);
3738 #[doc = "The second clock transition is the first data capture edge"]
3739 pub const SECONDEDGE: Self = Self(0x01);
3740 }
3741 #[repr(transparent)]
3742 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3743 pub struct Frer(pub u8);
3744 impl Frer {
3745 #[doc = "No frame format error"]
3746 pub const NOERROR: Self = Self(0);
3747 #[doc = "A frame format error occurred"]
3748 pub const ERROR: Self = Self(0x01);
3749 }
3750 #[repr(transparent)]
3751 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3752 pub struct Crcnext(pub u8);
3753 impl Crcnext {
3754 #[doc = "Next transmit value is from Tx buffer"]
3755 pub const TXBUFFER: Self = Self(0);
3756 #[doc = "Next transmit value is from Tx CRC register"]
3757 pub const CRC: Self = Self(0x01);
3758 }
3759 #[repr(transparent)]
3760 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3761 pub struct Frf(pub u8);
3762 impl Frf {
3763 #[doc = "SPI Motorola mode"]
3764 pub const MOTOROLA: Self = Self(0);
3765 #[doc = "SPI TI mode"]
3766 pub const TI: Self = Self(0x01);
3767 }
3768 #[repr(transparent)]
3769 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3770 pub struct Lsbfirst(pub u8);
3771 impl Lsbfirst {
3772 #[doc = "Data is transmitted/received with the MSB first"]
3773 pub const MSBFIRST: Self = Self(0);
3774 #[doc = "Data is transmitted/received with the LSB first"]
3775 pub const LSBFIRST: Self = Self(0x01);
3776=======
3777 }
3778}
3779pub mod generic {
3780 use core::marker::PhantomData;
3781 #[derive(Copy, Clone)]
3782 pub struct RW;
3783 #[derive(Copy, Clone)]
3784 pub struct R;
3785 #[derive(Copy, Clone)]
3786 pub struct W;
3787 mod sealed {
3788 use super::*;
3789 pub trait Access {}
3790 impl Access for R {}
3791 impl Access for W {}
3792 impl Access for RW {}
3793 }
3794 pub trait Access: sealed::Access + Copy {}
3795 impl Access for R {}
3796 impl Access for W {}
3797 impl Access for RW {}
3798 pub trait Read: Access {}
3799 impl Read for RW {}
3800 impl Read for R {}
3801 pub trait Write: Access {}
3802 impl Write for RW {}
3803 impl Write for W {}
3804 #[derive(Copy, Clone)]
3805 pub struct Reg<T: Copy, A: Access> {
3806 ptr: *mut u8,
3807 phantom: PhantomData<*mut (T, A)>,
3808 }
3809 unsafe impl<T: Copy, A: Access> Send for Reg<T, A> {}
3810 unsafe impl<T: Copy, A: Access> Sync for Reg<T, A> {}
3811 impl<T: Copy, A: Access> Reg<T, A> {
3812 pub fn from_ptr(ptr: *mut u8) -> Self {
3813 Self {
3814 ptr,
3815 phantom: PhantomData,
3816 }
3817 }
3818 pub fn ptr(&self) -> *mut T {
3819 self.ptr as _
3820 }
3821 }
3822 impl<T: Copy, A: Read> Reg<T, A> {
3823 pub unsafe fn read(&self) -> T {
3824 (self.ptr as *mut T).read_volatile()
3825 }
3826 }
3827 impl<T: Copy, A: Write> Reg<T, A> {
3828 pub unsafe fn write_value(&self, val: T) {
3829 (self.ptr as *mut T).write_volatile(val)
3830 }
3831 }
3832 impl<T: Default + Copy, A: Write> Reg<T, A> {
3833 pub unsafe fn write<R>(&self, f: impl FnOnce(&mut T) -> R) -> R {
3834 let mut val = Default::default();
3835 let res = f(&mut val);
3836 self.write_value(val);
3837 res
3838 }
3839 }
3840 impl<T: Copy, A: Read + Write> Reg<T, A> {
3841 pub unsafe fn modify<R>(&self, f: impl FnOnce(&mut T) -> R) -> R {
3842 let mut val = self.read();
3843 let res = f(&mut val);
3844 self.write_value(val);
3845 res
3846 }
3847 }
3848}
3849pub mod spi_v1 {
3850 use crate::generic::*;
3851 #[doc = "Serial peripheral interface"]
3852 #[derive(Copy, Clone)]
3853 pub struct Spi(pub *mut u8);
3854 unsafe impl Send for Spi {}
3855 unsafe impl Sync for Spi {}
3856 impl Spi {
3857 #[doc = "control register 1"]
3858 pub fn cr1(self) -> Reg<regs::Cr1, RW> {
3859 unsafe { Reg::from_ptr(self.0.add(0usize)) }
3860 }
3861 #[doc = "control register 2"]
3862 pub fn cr2(self) -> Reg<regs::Cr2, RW> {
3863 unsafe { Reg::from_ptr(self.0.add(4usize)) }
3864 }
3865 #[doc = "status register"]
3866 pub fn sr(self) -> Reg<regs::Sr, RW> {
3867 unsafe { Reg::from_ptr(self.0.add(8usize)) }
3868 }
3869 #[doc = "data register"]
3870 pub fn dr(self) -> Reg<regs::Dr, RW> {
3871 unsafe { Reg::from_ptr(self.0.add(12usize)) }
3872 }
3873 #[doc = "CRC polynomial register"]
3874 pub fn crcpr(self) -> Reg<regs::Crcpr, RW> {
3875 unsafe { Reg::from_ptr(self.0.add(16usize)) }
3876 }
3877 #[doc = "RX CRC register"]
3878 pub fn rxcrcr(self) -> Reg<regs::Rxcrcr, R> {
3879 unsafe { Reg::from_ptr(self.0.add(20usize)) }
3880 }
3881 #[doc = "TX CRC register"]
3882 pub fn txcrcr(self) -> Reg<regs::Txcrcr, R> {
3883 unsafe { Reg::from_ptr(self.0.add(24usize)) }
3884>>>>>>> Better interrupt handling
3885 }
3886 #[repr(transparent)]
3887 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3888 pub struct Cpha(pub u8);
3889 impl Cpha {
3890 #[doc = "The first clock transition is the first data capture edge"]
3891 pub const FIRSTEDGE: Self = Self(0);
3892 #[doc = "The second clock transition is the first data capture edge"]
3893 pub const SECONDEDGE: Self = Self(0x01);
3894 }
3895 #[repr(transparent)]
3896 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3897<<<<<<< HEAD
3898 pub struct Cpol(pub u8);
3899 impl Cpol {
3900 #[doc = "CK to 0 when idle"]
3901 pub const IDLELOW: Self = Self(0);
3902 #[doc = "CK to 1 when idle"]
3903 pub const IDLEHIGH: Self = Self(0x01);
3904 }
3905 #[repr(transparent)]
3906 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3907=======
3908>>>>>>> Better interrupt handling
3909 pub struct Mstr(pub u8);
3910 impl Mstr {
3911 #[doc = "Slave configuration"]
3912 pub const SLAVE: Self = Self(0);
3913 #[doc = "Master configuration"]
3914 pub const MASTER: Self = Self(0x01);
3915<<<<<<< HEAD
3916=======
3917 }
3918 #[repr(transparent)]
3919 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3920 pub struct Bidioe(pub u8);
3921 impl Bidioe {
3922 #[doc = "Output disabled (receive-only mode)"]
3923 pub const OUTPUTDISABLED: Self = Self(0);
3924 #[doc = "Output enabled (transmit-only mode)"]
3925 pub const OUTPUTENABLED: Self = Self(0x01);
3926 }
3927 #[repr(transparent)]
3928 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3929 pub struct Iscfg(pub u8);
3930 impl Iscfg {
3931 #[doc = "Slave - transmit"]
3932 pub const SLAVETX: Self = Self(0);
3933 #[doc = "Slave - receive"]
3934 pub const SLAVERX: Self = Self(0x01);
3935 #[doc = "Master - transmit"]
3936 pub const MASTERTX: Self = Self(0x02);
3937 #[doc = "Master - receive"]
3938 pub const MASTERRX: Self = Self(0x03);
3939 }
3940 #[repr(transparent)]
3941 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3942 pub struct Lsbfirst(pub u8);
3943 impl Lsbfirst {
3944 #[doc = "Data is transmitted/received with the MSB first"]
3945 pub const MSBFIRST: Self = Self(0);
3946 #[doc = "Data is transmitted/received with the LSB first"]
3947 pub const LSBFIRST: Self = Self(0x01);
3948 }
3949 #[repr(transparent)]
3950 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3951 pub struct Bidimode(pub u8);
3952 impl Bidimode {
3953 #[doc = "2-line unidirectional data mode selected"]
3954 pub const UNIDIRECTIONAL: Self = Self(0);
3955 #[doc = "1-line bidirectional data mode selected"]
3956 pub const BIDIRECTIONAL: Self = Self(0x01);
3957 }
3958 #[repr(transparent)]
3959 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3960 pub struct Rxonly(pub u8);
3961 impl Rxonly {
3962 #[doc = "Full duplex (Transmit and receive)"]
3963 pub const FULLDUPLEX: Self = Self(0);
3964 #[doc = "Output disabled (Receive-only mode)"]
3965 pub const OUTPUTDISABLED: Self = Self(0x01);
3966 }
3967 #[repr(transparent)]
3968 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3969 pub struct Crcnext(pub u8);
3970 impl Crcnext {
3971 #[doc = "Next transmit value is from Tx buffer"]
3972 pub const TXBUFFER: Self = Self(0);
3973 #[doc = "Next transmit value is from Tx CRC register"]
3974 pub const CRC: Self = Self(0x01);
3975 }
3976 #[repr(transparent)]
3977 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3978 pub struct Br(pub u8);
3979 impl Br {
3980 #[doc = "f_PCLK / 2"]
3981 pub const DIV2: Self = Self(0);
3982 #[doc = "f_PCLK / 4"]
3983 pub const DIV4: Self = Self(0x01);
3984 #[doc = "f_PCLK / 8"]
3985 pub const DIV8: Self = Self(0x02);
3986 #[doc = "f_PCLK / 16"]
3987 pub const DIV16: Self = Self(0x03);
3988 #[doc = "f_PCLK / 32"]
3989 pub const DIV32: Self = Self(0x04);
3990 #[doc = "f_PCLK / 64"]
3991 pub const DIV64: Self = Self(0x05);
3992 #[doc = "f_PCLK / 128"]
3993 pub const DIV128: Self = Self(0x06);
3994 #[doc = "f_PCLK / 256"]
3995 pub const DIV256: Self = Self(0x07);
3996 }
3997 #[repr(transparent)]
3998 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
3999 pub struct Dff(pub u8);
4000 impl Dff {
4001 #[doc = "8-bit data frame format is selected for transmission/reception"]
4002 pub const EIGHTBIT: Self = Self(0);
4003 #[doc = "16-bit data frame format is selected for transmission/reception"]
4004 pub const SIXTEENBIT: Self = Self(0x01);
4005 }
4006 #[repr(transparent)]
4007 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
4008 pub struct Frf(pub u8);
4009 impl Frf {
4010 #[doc = "SPI Motorola mode"]
4011 pub const MOTOROLA: Self = Self(0);
4012 #[doc = "SPI TI mode"]
4013 pub const TI: Self = Self(0x01);
4014 }
4015 #[repr(transparent)]
4016 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
4017 pub struct Frer(pub u8);
4018 impl Frer {
4019 #[doc = "No frame format error"]
4020 pub const NOERROR: Self = Self(0);
4021 #[doc = "A frame format error occurred"]
4022 pub const ERROR: Self = Self(0x01);
4023 }
4024 #[repr(transparent)]
4025 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
4026 pub struct Cpol(pub u8);
4027 impl Cpol {
4028 #[doc = "CK to 0 when idle"]
4029 pub const IDLELOW: Self = Self(0);
4030 #[doc = "CK to 1 when idle"]
4031 pub const IDLEHIGH: Self = Self(0x01);
4032>>>>>>> Better interrupt handling
4033 }
4034 }
4035 pub mod regs {
4036 use crate::generic::*;
4037<<<<<<< HEAD
4038 #[doc = "control register 1"]
4039 #[repr(transparent)]
4040 #[derive(Copy, Clone, Eq, PartialEq)]
4041 pub struct Cr1(pub u32);
4042 impl Cr1 {
4043 #[doc = "Clock phase"]
4044 pub const fn cpha(&self) -> super::vals::Cpha {
4045 let val = (self.0 >> 0usize) & 0x01;
4046 super::vals::Cpha(val as u8)
4047 }
4048 #[doc = "Clock phase"]
4049 pub fn set_cpha(&mut self, val: super::vals::Cpha) {
4050 self.0 = (self.0 & !(0x01 << 0usize)) | (((val.0 as u32) & 0x01) << 0usize);
4051 }
4052 #[doc = "Clock polarity"]
4053 pub const fn cpol(&self) -> super::vals::Cpol {
4054 let val = (self.0 >> 1usize) & 0x01;
4055 super::vals::Cpol(val as u8)
4056 }
4057 #[doc = "Clock polarity"]
4058 pub fn set_cpol(&mut self, val: super::vals::Cpol) {
4059 self.0 = (self.0 & !(0x01 << 1usize)) | (((val.0 as u32) & 0x01) << 1usize);
4060 }
4061 #[doc = "Master selection"]
4062 pub const fn mstr(&self) -> super::vals::Mstr {
4063 let val = (self.0 >> 2usize) & 0x01;
4064 super::vals::Mstr(val as u8)
4065 }
4066 #[doc = "Master selection"]
4067 pub fn set_mstr(&mut self, val: super::vals::Mstr) {
4068 self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize);
4069 }
4070 #[doc = "Baud rate control"]
4071 pub const fn br(&self) -> super::vals::Br {
4072 let val = (self.0 >> 3usize) & 0x07;
4073 super::vals::Br(val as u8)
4074 }
4075 #[doc = "Baud rate control"]
4076 pub fn set_br(&mut self, val: super::vals::Br) {
4077 self.0 = (self.0 & !(0x07 << 3usize)) | (((val.0 as u32) & 0x07) << 3usize);
4078 }
4079 #[doc = "SPI enable"]
4080 pub const fn spe(&self) -> bool {
4081 let val = (self.0 >> 6usize) & 0x01;
4082 val != 0
4083 }
4084 #[doc = "SPI enable"]
4085 pub fn set_spe(&mut self, val: bool) {
4086 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
4087 }
4088 #[doc = "Frame format"]
4089 pub const fn lsbfirst(&self) -> super::vals::Lsbfirst {
4090 let val = (self.0 >> 7usize) & 0x01;
4091 super::vals::Lsbfirst(val as u8)
4092 }
4093 #[doc = "Frame format"]
4094 pub fn set_lsbfirst(&mut self, val: super::vals::Lsbfirst) {
4095 self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize);
4096 }
4097 #[doc = "Internal slave select"]
4098 pub const fn ssi(&self) -> bool {
4099 let val = (self.0 >> 8usize) & 0x01;
4100 val != 0
4101 }
4102 #[doc = "Internal slave select"]
4103 pub fn set_ssi(&mut self, val: bool) {
4104 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
4105 }
4106 #[doc = "Software slave management"]
4107 pub const fn ssm(&self) -> bool {
4108 let val = (self.0 >> 9usize) & 0x01;
4109 val != 0
4110 }
4111 #[doc = "Software slave management"]
4112 pub fn set_ssm(&mut self, val: bool) {
4113 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
4114 }
4115 #[doc = "Receive only"]
4116 pub const fn rxonly(&self) -> super::vals::Rxonly {
4117 let val = (self.0 >> 10usize) & 0x01;
4118 super::vals::Rxonly(val as u8)
4119 }
4120 #[doc = "Receive only"]
4121 pub fn set_rxonly(&mut self, val: super::vals::Rxonly) {
4122 self.0 = (self.0 & !(0x01 << 10usize)) | (((val.0 as u32) & 0x01) << 10usize);
4123 }
4124 #[doc = "Data frame format"]
4125 pub const fn dff(&self) -> super::vals::Dff {
4126 let val = (self.0 >> 11usize) & 0x01;
4127 super::vals::Dff(val as u8)
4128 }
4129 #[doc = "Data frame format"]
4130 pub fn set_dff(&mut self, val: super::vals::Dff) {
4131 self.0 = (self.0 & !(0x01 << 11usize)) | (((val.0 as u32) & 0x01) << 11usize);
4132 }
4133 #[doc = "CRC transfer next"]
4134 pub const fn crcnext(&self) -> super::vals::Crcnext {
4135 let val = (self.0 >> 12usize) & 0x01;
4136 super::vals::Crcnext(val as u8)
4137 }
4138 #[doc = "CRC transfer next"]
4139 pub fn set_crcnext(&mut self, val: super::vals::Crcnext) {
4140 self.0 = (self.0 & !(0x01 << 12usize)) | (((val.0 as u32) & 0x01) << 12usize);
4141 }
4142 #[doc = "Hardware CRC calculation enable"]
4143 pub const fn crcen(&self) -> bool {
4144 let val = (self.0 >> 13usize) & 0x01;
4145 val != 0
4146 }
4147 #[doc = "Hardware CRC calculation enable"]
4148 pub fn set_crcen(&mut self, val: bool) {
4149 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize);
4150 }
4151 #[doc = "Output enable in bidirectional mode"]
4152 pub const fn bidioe(&self) -> super::vals::Bidioe {
4153 let val = (self.0 >> 14usize) & 0x01;
4154 super::vals::Bidioe(val as u8)
4155 }
4156 #[doc = "Output enable in bidirectional mode"]
4157 pub fn set_bidioe(&mut self, val: super::vals::Bidioe) {
4158 self.0 = (self.0 & !(0x01 << 14usize)) | (((val.0 as u32) & 0x01) << 14usize);
4159 }
4160 #[doc = "Bidirectional data mode enable"]
4161 pub const fn bidimode(&self) -> super::vals::Bidimode {
4162 let val = (self.0 >> 15usize) & 0x01;
4163 super::vals::Bidimode(val as u8)
4164 }
4165 #[doc = "Bidirectional data mode enable"]
4166 pub fn set_bidimode(&mut self, val: super::vals::Bidimode) {
4167 self.0 = (self.0 & !(0x01 << 15usize)) | (((val.0 as u32) & 0x01) << 15usize);
4168 }
4169 }
4170 impl Default for Cr1 {
4171 fn default() -> Cr1 {
4172 Cr1(0)
4173 }
4174 }
4175 #[doc = "data register"]
4176=======
4177 #[doc = "CRC polynomial register"]
4178>>>>>>> Better interrupt handling
4179 #[repr(transparent)]
4180 #[derive(Copy, Clone, Eq, PartialEq)]
4181 pub struct Crcpr(pub u32);
4182 impl Crcpr {
4183 #[doc = "CRC polynomial register"]
4184 pub const fn crcpoly(&self) -> u16 {
4185 let val = (self.0 >> 0usize) & 0xffff;
4186 val as u16
4187 }
4188 #[doc = "CRC polynomial register"]
4189 pub fn set_crcpoly(&mut self, val: u16) {
4190 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
4191 }
4192 }
4193 impl Default for Crcpr {
4194 fn default() -> Crcpr {
4195 Crcpr(0)
4196 }
4197 }
4198 #[doc = "CRC polynomial register"]
4199 #[repr(transparent)]
4200 #[derive(Copy, Clone, Eq, PartialEq)]
4201 pub struct Crcpr(pub u32);
4202 impl Crcpr {
4203 #[doc = "CRC polynomial register"]
4204 pub const fn crcpoly(&self) -> u16 {
4205 let val = (self.0 >> 0usize) & 0xffff;
4206 val as u16
4207 }
4208 #[doc = "CRC polynomial register"]
4209 pub fn set_crcpoly(&mut self, val: u16) {
4210 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
4211 }
4212 }
4213 impl Default for Crcpr {
4214 fn default() -> Crcpr {
4215 Crcpr(0)
4216 }
4217 }
4218 #[doc = "RX CRC register"]
4219 #[repr(transparent)]
4220 #[derive(Copy, Clone, Eq, PartialEq)]
4221 pub struct Rxcrcr(pub u32);
4222 impl Rxcrcr {
4223 #[doc = "Rx CRC register"]
4224 pub const fn rx_crc(&self) -> u16 {
4225 let val = (self.0 >> 0usize) & 0xffff;
4226 val as u16
4227 }
4228 #[doc = "Rx CRC register"]
4229 pub fn set_rx_crc(&mut self, val: u16) {
4230 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
4231 }
4232 }
4233 impl Default for Rxcrcr {
4234 fn default() -> Rxcrcr {
4235 Rxcrcr(0)
4236 }
4237 }
4238 #[doc = "status register"]
4239 #[repr(transparent)]
4240 #[derive(Copy, Clone, Eq, PartialEq)]
4241 pub struct Sr(pub u32);
4242 impl Sr {
4243 #[doc = "Receive buffer not empty"]
4244 pub const fn rxne(&self) -> bool {
4245 let val = (self.0 >> 0usize) & 0x01;
4246 val != 0
4247 }
4248 #[doc = "Receive buffer not empty"]
4249 pub fn set_rxne(&mut self, val: bool) {
4250 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
4251 }
4252 #[doc = "Transmit buffer empty"]
4253 pub const fn txe(&self) -> bool {
4254 let val = (self.0 >> 1usize) & 0x01;
4255 val != 0
4256 }
4257 #[doc = "Transmit buffer empty"]
4258 pub fn set_txe(&mut self, val: bool) {
4259 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
4260 }
4261 #[doc = "CRC error flag"]
4262 pub const fn crcerr(&self) -> bool {
4263 let val = (self.0 >> 4usize) & 0x01;
4264 val != 0
4265 }
4266 #[doc = "CRC error flag"]
4267 pub fn set_crcerr(&mut self, val: bool) {
4268 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
4269 }
4270 #[doc = "Mode fault"]
4271 pub const fn modf(&self) -> bool {
4272 let val = (self.0 >> 5usize) & 0x01;
4273 val != 0
4274 }
4275 #[doc = "Mode fault"]
4276 pub fn set_modf(&mut self, val: bool) {
4277 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
4278 }
4279 #[doc = "Overrun flag"]
4280 pub const fn ovr(&self) -> bool {
4281 let val = (self.0 >> 6usize) & 0x01;
4282 val != 0
4283 }
4284 #[doc = "Overrun flag"]
4285 pub fn set_ovr(&mut self, val: bool) {
4286 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
4287 }
4288 #[doc = "Busy flag"]
4289 pub const fn bsy(&self) -> bool {
4290 let val = (self.0 >> 7usize) & 0x01;
4291 val != 0
4292 }
4293 #[doc = "Busy flag"]
4294 pub fn set_bsy(&mut self, val: bool) {
4295 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
4296 }
4297 #[doc = "TI frame format error"]
4298 pub const fn fre(&self) -> bool {
4299 let val = (self.0 >> 8usize) & 0x01;
4300 val != 0
4301 }
4302 #[doc = "TI frame format error"]
4303 pub fn set_fre(&mut self, val: bool) {
4304 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
4305 }
4306 }
4307 impl Default for Sr {
4308 fn default() -> Sr {
4309 Sr(0)
4310 }
4311 }
4312 #[doc = "data register"]
4313 #[repr(transparent)]
4314 #[derive(Copy, Clone, Eq, PartialEq)]
4315 pub struct Dr(pub u32);
4316 impl Dr {
4317 #[doc = "Data register"]
4318 pub const fn dr(&self) -> u16 {
4319 let val = (self.0 >> 0usize) & 0xffff;
4320 val as u16
4321 }
4322 #[doc = "Data register"]
4323 pub fn set_dr(&mut self, val: u16) {
4324 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
4325 }
4326 }
4327 impl Default for Dr {
4328 fn default() -> Dr {
4329 Dr(0)
4330 }
4331 }
4332 #[doc = "status register"]
4333 #[repr(transparent)]
4334 #[derive(Copy, Clone, Eq, PartialEq)]
4335 pub struct Sr(pub u32);
4336 impl Sr {
4337 #[doc = "Receive buffer not empty"]
4338 pub const fn rxne(&self) -> bool {
4339 let val = (self.0 >> 0usize) & 0x01;
4340 val != 0
4341 }
4342 #[doc = "Receive buffer not empty"]
4343 pub fn set_rxne(&mut self, val: bool) {
4344 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
4345 }
4346 #[doc = "Transmit buffer empty"]
4347 pub const fn txe(&self) -> bool {
4348 let val = (self.0 >> 1usize) & 0x01;
4349 val != 0
4350 }
4351 #[doc = "Transmit buffer empty"]
4352 pub fn set_txe(&mut self, val: bool) {
4353 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
4354 }
4355 #[doc = "CRC error flag"]
4356 pub const fn crcerr(&self) -> bool {
4357 let val = (self.0 >> 4usize) & 0x01;
4358 val != 0
4359 }
4360 #[doc = "CRC error flag"]
4361 pub fn set_crcerr(&mut self, val: bool) {
4362 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
4363 }
4364 #[doc = "Mode fault"]
4365 pub const fn modf(&self) -> bool {
4366 let val = (self.0 >> 5usize) & 0x01;
4367 val != 0
4368 }
4369 #[doc = "Mode fault"]
4370 pub fn set_modf(&mut self, val: bool) {
4371 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
4372 }
4373 #[doc = "Overrun flag"]
4374 pub const fn ovr(&self) -> bool {
4375 let val = (self.0 >> 6usize) & 0x01;
4376 val != 0
4377 }
4378 #[doc = "Overrun flag"]
4379 pub fn set_ovr(&mut self, val: bool) {
4380 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
4381 }
4382 #[doc = "Busy flag"]
4383 pub const fn bsy(&self) -> bool {
4384 let val = (self.0 >> 7usize) & 0x01;
4385 val != 0
4386 }
4387 #[doc = "Busy flag"]
4388 pub fn set_bsy(&mut self, val: bool) {
4389 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
4390 }
4391 #[doc = "TI frame format error"]
4392 pub const fn fre(&self) -> bool {
4393 let val = (self.0 >> 8usize) & 0x01;
4394 val != 0
4395 }
4396 #[doc = "TI frame format error"]
4397 pub fn set_fre(&mut self, val: bool) {
4398 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
4399 }
4400 }
4401 impl Default for Sr {
4402 fn default() -> Sr {
4403 Sr(0)
4404 }
4405 }
4406 #[doc = "control register 2"]
4407 #[repr(transparent)]
4408 #[derive(Copy, Clone, Eq, PartialEq)]
4409 pub struct Cr2(pub u32);
4410 impl Cr2 {
4411 #[doc = "Rx buffer DMA enable"]
4412 pub const fn rxdmaen(&self) -> bool {
4413 let val = (self.0 >> 0usize) & 0x01;
4414 val != 0
4415 }
4416 #[doc = "Rx buffer DMA enable"]
4417 pub fn set_rxdmaen(&mut self, val: bool) {
4418 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
4419 }
4420 #[doc = "Tx buffer DMA enable"]
4421 pub const fn txdmaen(&self) -> bool {
4422 let val = (self.0 >> 1usize) & 0x01;
4423 val != 0
4424 }
4425 #[doc = "Tx buffer DMA enable"]
4426 pub fn set_txdmaen(&mut self, val: bool) {
4427 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
4428 }
4429 #[doc = "SS output enable"]
4430 pub const fn ssoe(&self) -> bool {
4431 let val = (self.0 >> 2usize) & 0x01;
4432 val != 0
4433 }
4434 #[doc = "SS output enable"]
4435 pub fn set_ssoe(&mut self, val: bool) {
4436 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
4437 }
4438 #[doc = "Frame format"]
4439 pub const fn frf(&self) -> super::vals::Frf {
4440 let val = (self.0 >> 4usize) & 0x01;
4441 super::vals::Frf(val as u8)
4442 }
4443 #[doc = "Frame format"]
4444 pub fn set_frf(&mut self, val: super::vals::Frf) {
4445 self.0 = (self.0 & !(0x01 << 4usize)) | (((val.0 as u32) & 0x01) << 4usize);
4446 }
4447 #[doc = "Error interrupt enable"]
4448 pub const fn errie(&self) -> bool {
4449 let val = (self.0 >> 5usize) & 0x01;
4450 val != 0
4451 }
4452 #[doc = "Error interrupt enable"]
4453 pub fn set_errie(&mut self, val: bool) {
4454 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
4455 }
4456 #[doc = "RX buffer not empty interrupt enable"]
4457 pub const fn rxneie(&self) -> bool {
4458 let val = (self.0 >> 6usize) & 0x01;
4459 val != 0
4460 }
4461 #[doc = "RX buffer not empty interrupt enable"]
4462 pub fn set_rxneie(&mut self, val: bool) {
4463 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
4464 }
4465 #[doc = "Tx buffer empty interrupt enable"]
4466 pub const fn txeie(&self) -> bool {
4467 let val = (self.0 >> 7usize) & 0x01;
4468 val != 0
4469 }
4470 #[doc = "Tx buffer empty interrupt enable"]
4471 pub fn set_txeie(&mut self, val: bool) {
4472 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
4473 }
4474 }
4475<<<<<<< HEAD
4476 impl Default for Cr2 {
4477 fn default() -> Cr2 {
4478 Cr2(0)
4479=======
4480 #[doc = "TX CRC register"]
4481 #[repr(transparent)]
4482 #[derive(Copy, Clone, Eq, PartialEq)]
4483 pub struct Txcrcr(pub u32);
4484 impl Txcrcr {
4485 #[doc = "Tx CRC register"]
4486 pub const fn tx_crc(&self) -> u16 {
4487 let val = (self.0 >> 0usize) & 0xffff;
4488 val as u16
4489 }
4490 #[doc = "Tx CRC register"]
4491 pub fn set_tx_crc(&mut self, val: u16) {
4492 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
4493 }
4494 }
4495 impl Default for Txcrcr {
4496 fn default() -> Txcrcr {
4497 Txcrcr(0)
4498>>>>>>> Better interrupt handling
4499 }
4500 }
4501 }
4502}
4503<<<<<<< HEAD
4504pub mod syscfg_h7 {
4505=======
4506pub mod dma_v1 {
4507>>>>>>> Better interrupt handling
4508 use crate::generic::*;
4509 #[doc = "System configuration controller"]
4510 #[derive(Copy, Clone)]
4511<<<<<<< HEAD
4512 pub struct Syscfg(pub *mut u8);
4513 unsafe impl Send for Syscfg {}
4514 unsafe impl Sync for Syscfg {}
4515 impl Syscfg {
4516 #[doc = "peripheral mode configuration register"]
4517 pub fn pmcr(self) -> Reg<regs::Pmcr, RW> {
4518 unsafe { Reg::from_ptr(self.0.add(4usize)) }
4519 }
4520 #[doc = "external interrupt configuration register 1"]
4521 pub fn exticr(self, n: usize) -> Reg<regs::Exticr, RW> {
4522 assert!(n < 4usize);
4523 unsafe { Reg::from_ptr(self.0.add(8usize + n * 4usize)) }
4524 }
4525 #[doc = "compensation cell control/status register"]
4526 pub fn cccsr(self) -> Reg<regs::Cccsr, RW> {
4527 unsafe { Reg::from_ptr(self.0.add(32usize)) }
4528 }
4529 #[doc = "SYSCFG compensation cell value register"]
4530 pub fn ccvr(self) -> Reg<regs::Ccvr, R> {
4531 unsafe { Reg::from_ptr(self.0.add(36usize)) }
4532 }
4533 #[doc = "SYSCFG compensation cell code register"]
4534 pub fn cccr(self) -> Reg<regs::Cccr, RW> {
4535 unsafe { Reg::from_ptr(self.0.add(40usize)) }
4536 }
4537 #[doc = "SYSCFG power control register"]
4538 pub fn pwrcr(self) -> Reg<regs::Pwrcr, RW> {
4539 unsafe { Reg::from_ptr(self.0.add(44usize)) }
4540 }
4541 #[doc = "SYSCFG package register"]
4542 pub fn pkgr(self) -> Reg<regs::Pkgr, R> {
4543 unsafe { Reg::from_ptr(self.0.add(292usize)) }
4544 }
4545 #[doc = "SYSCFG user register 0"]
4546 pub fn ur0(self) -> Reg<regs::Ur0, R> {
4547 unsafe { Reg::from_ptr(self.0.add(768usize)) }
4548 }
4549 #[doc = "SYSCFG user register 2"]
4550 pub fn ur2(self) -> Reg<regs::Ur2, RW> {
4551 unsafe { Reg::from_ptr(self.0.add(776usize)) }
4552 }
4553 #[doc = "SYSCFG user register 3"]
4554 pub fn ur3(self) -> Reg<regs::Ur3, RW> {
4555 unsafe { Reg::from_ptr(self.0.add(780usize)) }
4556 }
4557 #[doc = "SYSCFG user register 4"]
4558 pub fn ur4(self) -> Reg<regs::Ur4, R> {
4559 unsafe { Reg::from_ptr(self.0.add(784usize)) }
4560 }
4561 #[doc = "SYSCFG user register 5"]
4562 pub fn ur5(self) -> Reg<regs::Ur5, R> {
4563 unsafe { Reg::from_ptr(self.0.add(788usize)) }
4564 }
4565 #[doc = "SYSCFG user register 6"]
4566 pub fn ur6(self) -> Reg<regs::Ur6, R> {
4567 unsafe { Reg::from_ptr(self.0.add(792usize)) }
4568 }
4569 #[doc = "SYSCFG user register 7"]
4570 pub fn ur7(self) -> Reg<regs::Ur7, R> {
4571 unsafe { Reg::from_ptr(self.0.add(796usize)) }
4572 }
4573 #[doc = "SYSCFG user register 8"]
4574 pub fn ur8(self) -> Reg<regs::Ur8, R> {
4575 unsafe { Reg::from_ptr(self.0.add(800usize)) }
4576 }
4577 #[doc = "SYSCFG user register 9"]
4578 pub fn ur9(self) -> Reg<regs::Ur9, R> {
4579 unsafe { Reg::from_ptr(self.0.add(804usize)) }
4580 }
4581 #[doc = "SYSCFG user register 10"]
4582 pub fn ur10(self) -> Reg<regs::Ur10, R> {
4583 unsafe { Reg::from_ptr(self.0.add(808usize)) }
4584 }
4585 #[doc = "SYSCFG user register 11"]
4586 pub fn ur11(self) -> Reg<regs::Ur11, R> {
4587 unsafe { Reg::from_ptr(self.0.add(812usize)) }
4588 }
4589 #[doc = "SYSCFG user register 12"]
4590 pub fn ur12(self) -> Reg<regs::Ur12, R> {
4591 unsafe { Reg::from_ptr(self.0.add(816usize)) }
4592 }
4593 #[doc = "SYSCFG user register 13"]
4594 pub fn ur13(self) -> Reg<regs::Ur13, R> {
4595 unsafe { Reg::from_ptr(self.0.add(820usize)) }
4596 }
4597 #[doc = "SYSCFG user register 14"]
4598 pub fn ur14(self) -> Reg<regs::Ur14, RW> {
4599 unsafe { Reg::from_ptr(self.0.add(824usize)) }
4600 }
4601 #[doc = "SYSCFG user register 15"]
4602 pub fn ur15(self) -> Reg<regs::Ur15, R> {
4603 unsafe { Reg::from_ptr(self.0.add(828usize)) }
4604 }
4605 #[doc = "SYSCFG user register 16"]
4606 pub fn ur16(self) -> Reg<regs::Ur16, R> {
4607 unsafe { Reg::from_ptr(self.0.add(832usize)) }
4608 }
4609 #[doc = "SYSCFG user register 17"]
4610 pub fn ur17(self) -> Reg<regs::Ur17, R> {
4611 unsafe { Reg::from_ptr(self.0.add(836usize)) }
4612 }
4613 }
4614 pub mod regs {
4615 use crate::generic::*;
4616 #[doc = "SYSCFG user register 2"]
4617 #[repr(transparent)]
4618 #[derive(Copy, Clone, Eq, PartialEq)]
4619 pub struct Ur2(pub u32);
4620 impl Ur2 {
4621 #[doc = "BOR_LVL Brownout Reset Threshold Level"]
4622 pub const fn borh(&self) -> u8 {
4623 let val = (self.0 >> 0usize) & 0x03;
4624 val as u8
4625 }
4626 #[doc = "BOR_LVL Brownout Reset Threshold Level"]
4627 pub fn set_borh(&mut self, val: u8) {
4628 self.0 = (self.0 & !(0x03 << 0usize)) | (((val as u32) & 0x03) << 0usize);
4629 }
4630 #[doc = "Boot Address 0"]
4631 pub const fn boot_add0(&self) -> u16 {
4632 let val = (self.0 >> 16usize) & 0xffff;
4633 val as u16
4634 }
4635 #[doc = "Boot Address 0"]
4636 pub fn set_boot_add0(&mut self, val: u16) {
4637 self.0 = (self.0 & !(0xffff << 16usize)) | (((val as u32) & 0xffff) << 16usize);
4638 }
4639 }
4640 impl Default for Ur2 {
4641 fn default() -> Ur2 {
4642 Ur2(0)
4643 }
4644 }
4645 #[doc = "SYSCFG user register 8"]
4646 #[repr(transparent)]
4647 #[derive(Copy, Clone, Eq, PartialEq)]
4648 pub struct Ur8(pub u32);
4649 impl Ur8 {
4650 #[doc = "Mass erase protected area disabled for bank 2"]
4651 pub const fn mepad_2(&self) -> bool {
4652 let val = (self.0 >> 0usize) & 0x01;
4653 val != 0
4654 }
4655 #[doc = "Mass erase protected area disabled for bank 2"]
4656 pub fn set_mepad_2(&mut self, val: bool) {
4657 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
4658 }
4659 #[doc = "Mass erase secured area disabled for bank 2"]
4660 pub const fn mesad_2(&self) -> bool {
4661 let val = (self.0 >> 16usize) & 0x01;
4662 val != 0
4663 }
4664 #[doc = "Mass erase secured area disabled for bank 2"]
4665 pub fn set_mesad_2(&mut self, val: bool) {
4666 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
4667 }
4668 }
4669 impl Default for Ur8 {
4670 fn default() -> Ur8 {
4671 Ur8(0)
4672 }
4673 }
4674 #[doc = "SYSCFG user register 9"]
4675 #[repr(transparent)]
4676 #[derive(Copy, Clone, Eq, PartialEq)]
4677 pub struct Ur9(pub u32);
4678 impl Ur9 {
4679 #[doc = "Write protection for flash bank 2"]
4680 pub const fn wrpn_2(&self) -> u8 {
4681 let val = (self.0 >> 0usize) & 0xff;
4682 val as u8
4683 }
4684 #[doc = "Write protection for flash bank 2"]
4685 pub fn set_wrpn_2(&mut self, val: u8) {
4686 self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize);
4687 }
4688 #[doc = "Protected area start address for bank 2"]
4689 pub const fn pa_beg_2(&self) -> u16 {
4690 let val = (self.0 >> 16usize) & 0x0fff;
4691 val as u16
4692 }
4693 #[doc = "Protected area start address for bank 2"]
4694 pub fn set_pa_beg_2(&mut self, val: u16) {
4695 self.0 = (self.0 & !(0x0fff << 16usize)) | (((val as u32) & 0x0fff) << 16usize);
4696=======
4697 pub struct Dma(pub *mut u8);
4698 unsafe impl Send for Dma {}
4699 unsafe impl Sync for Dma {}
4700 impl Dma {
4701 #[doc = "DMA interrupt status register (DMA_ISR)"]
4702 pub fn isr(self) -> Reg<regs::Isr, R> {
4703 unsafe { Reg::from_ptr(self.0.add(0usize)) }
4704 }
4705 #[doc = "DMA interrupt flag clear register (DMA_IFCR)"]
4706 pub fn ifcr(self) -> Reg<regs::Ifcr, W> {
4707 unsafe { Reg::from_ptr(self.0.add(4usize)) }
4708 }
4709 #[doc = "Channel cluster: CCR?, CNDTR?, CPAR?, and CMAR? registers"]
4710 pub fn ch(self, n: usize) -> Ch {
4711 assert!(n < 7usize);
4712 unsafe { Ch(self.0.add(8usize + n * 20usize)) }
4713 }
4714 }
4715 #[doc = "Channel cluster: CCR?, CNDTR?, CPAR?, and CMAR? registers"]
4716 #[derive(Copy, Clone)]
4717 pub struct Ch(pub *mut u8);
4718 unsafe impl Send for Ch {}
4719 unsafe impl Sync for Ch {}
4720 impl Ch {
4721 #[doc = "DMA channel configuration register (DMA_CCR)"]
4722 pub fn cr(self) -> Reg<regs::Cr, RW> {
4723 unsafe { Reg::from_ptr(self.0.add(0usize)) }
4724 }
4725 #[doc = "DMA channel 1 number of data register"]
4726 pub fn ndtr(self) -> Reg<regs::Ndtr, RW> {
4727 unsafe { Reg::from_ptr(self.0.add(4usize)) }
4728 }
4729 #[doc = "DMA channel 1 peripheral address register"]
4730 pub fn par(self) -> Reg<u32, RW> {
4731 unsafe { Reg::from_ptr(self.0.add(8usize)) }
4732 }
4733 #[doc = "DMA channel 1 memory address register"]
4734 pub fn mar(self) -> Reg<u32, RW> {
4735 unsafe { Reg::from_ptr(self.0.add(12usize)) }
4736 }
4737 }
4738 pub mod regs {
4739 use crate::generic::*;
4740 #[doc = "DMA channel configuration register (DMA_CCR)"]
4741 #[repr(transparent)]
4742 #[derive(Copy, Clone, Eq, PartialEq)]
4743 pub struct Cr(pub u32);
4744 impl Cr {
4745 #[doc = "Channel enable"]
4746 pub const fn en(&self) -> bool {
4747 let val = (self.0 >> 0usize) & 0x01;
4748 val != 0
4749 }
4750 #[doc = "Channel enable"]
4751 pub fn set_en(&mut self, val: bool) {
4752 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
4753 }
4754 #[doc = "Transfer complete interrupt enable"]
4755 pub const fn tcie(&self) -> bool {
4756 let val = (self.0 >> 1usize) & 0x01;
4757 val != 0
4758 }
4759 #[doc = "Transfer complete interrupt enable"]
4760 pub fn set_tcie(&mut self, val: bool) {
4761 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
4762 }
4763 #[doc = "Half Transfer interrupt enable"]
4764 pub const fn htie(&self) -> bool {
4765 let val = (self.0 >> 2usize) & 0x01;
4766 val != 0
4767 }
4768 #[doc = "Half Transfer interrupt enable"]
4769 pub fn set_htie(&mut self, val: bool) {
4770 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
4771 }
4772 #[doc = "Transfer error interrupt enable"]
4773 pub const fn teie(&self) -> bool {
4774 let val = (self.0 >> 3usize) & 0x01;
4775 val != 0
4776 }
4777 #[doc = "Transfer error interrupt enable"]
4778 pub fn set_teie(&mut self, val: bool) {
4779 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
4780 }
4781 #[doc = "Data transfer direction"]
4782 pub const fn dir(&self) -> super::vals::Dir {
4783 let val = (self.0 >> 4usize) & 0x01;
4784 super::vals::Dir(val as u8)
4785 }
4786 #[doc = "Data transfer direction"]
4787 pub fn set_dir(&mut self, val: super::vals::Dir) {
4788 self.0 = (self.0 & !(0x01 << 4usize)) | (((val.0 as u32) & 0x01) << 4usize);
4789 }
4790 #[doc = "Circular mode"]
4791 pub const fn circ(&self) -> super::vals::Circ {
4792 let val = (self.0 >> 5usize) & 0x01;
4793 super::vals::Circ(val as u8)
4794 }
4795 #[doc = "Circular mode"]
4796 pub fn set_circ(&mut self, val: super::vals::Circ) {
4797 self.0 = (self.0 & !(0x01 << 5usize)) | (((val.0 as u32) & 0x01) << 5usize);
4798 }
4799 #[doc = "Peripheral increment mode"]
4800 pub const fn pinc(&self) -> super::vals::Inc {
4801 let val = (self.0 >> 6usize) & 0x01;
4802 super::vals::Inc(val as u8)
4803 }
4804 #[doc = "Peripheral increment mode"]
4805 pub fn set_pinc(&mut self, val: super::vals::Inc) {
4806 self.0 = (self.0 & !(0x01 << 6usize)) | (((val.0 as u32) & 0x01) << 6usize);
4807 }
4808 #[doc = "Memory increment mode"]
4809 pub const fn minc(&self) -> super::vals::Inc {
4810 let val = (self.0 >> 7usize) & 0x01;
4811 super::vals::Inc(val as u8)
4812 }
4813 #[doc = "Memory increment mode"]
4814 pub fn set_minc(&mut self, val: super::vals::Inc) {
4815 self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize);
4816 }
4817 #[doc = "Peripheral size"]
4818 pub const fn psize(&self) -> super::vals::Size {
4819 let val = (self.0 >> 8usize) & 0x03;
4820 super::vals::Size(val as u8)
4821 }
4822 #[doc = "Peripheral size"]
4823 pub fn set_psize(&mut self, val: super::vals::Size) {
4824 self.0 = (self.0 & !(0x03 << 8usize)) | (((val.0 as u32) & 0x03) << 8usize);
4825 }
4826 #[doc = "Memory size"]
4827 pub const fn msize(&self) -> super::vals::Size {
4828 let val = (self.0 >> 10usize) & 0x03;
4829 super::vals::Size(val as u8)
4830 }
4831 #[doc = "Memory size"]
4832 pub fn set_msize(&mut self, val: super::vals::Size) {
4833 self.0 = (self.0 & !(0x03 << 10usize)) | (((val.0 as u32) & 0x03) << 10usize);
4834 }
4835 #[doc = "Channel Priority level"]
4836 pub const fn pl(&self) -> super::vals::Pl {
4837 let val = (self.0 >> 12usize) & 0x03;
4838 super::vals::Pl(val as u8)
4839 }
4840 #[doc = "Channel Priority level"]
4841 pub fn set_pl(&mut self, val: super::vals::Pl) {
4842 self.0 = (self.0 & !(0x03 << 12usize)) | (((val.0 as u32) & 0x03) << 12usize);
4843 }
4844 #[doc = "Memory to memory mode"]
4845 pub const fn mem2mem(&self) -> super::vals::Memmem {
4846 let val = (self.0 >> 14usize) & 0x01;
4847 super::vals::Memmem(val as u8)
4848 }
4849 #[doc = "Memory to memory mode"]
4850 pub fn set_mem2mem(&mut self, val: super::vals::Memmem) {
4851 self.0 = (self.0 & !(0x01 << 14usize)) | (((val.0 as u32) & 0x01) << 14usize);
4852 }
4853 }
4854 impl Default for Cr {
4855 fn default() -> Cr {
4856 Cr(0)
4857 }
4858 }
4859 #[doc = "DMA channel 1 number of data register"]
4860 #[repr(transparent)]
4861 #[derive(Copy, Clone, Eq, PartialEq)]
4862 pub struct Ndtr(pub u32);
4863 impl Ndtr {
4864 #[doc = "Number of data to transfer"]
4865 pub const fn ndt(&self) -> u16 {
4866 let val = (self.0 >> 0usize) & 0xffff;
4867 val as u16
4868 }
4869 #[doc = "Number of data to transfer"]
4870 pub fn set_ndt(&mut self, val: u16) {
4871 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
4872>>>>>>> Better interrupt handling
4873 }
4874 }
4875 impl Default for Ur9 {
4876 fn default() -> Ur9 {
4877 Ur9(0)
4878 }
4879 }
4880<<<<<<< HEAD
4881 #[doc = "SYSCFG compensation cell code register"]
4882 #[repr(transparent)]
4883 #[derive(Copy, Clone, Eq, PartialEq)]
4884 pub struct Cccr(pub u32);
4885 impl Cccr {
4886 #[doc = "NMOS compensation code"]
4887 pub const fn ncc(&self) -> u8 {
4888 let val = (self.0 >> 0usize) & 0x0f;
4889 val as u8
4890 }
4891 #[doc = "NMOS compensation code"]
4892 pub fn set_ncc(&mut self, val: u8) {
4893 self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize);
4894 }
4895 #[doc = "PMOS compensation code"]
4896 pub const fn pcc(&self) -> u8 {
4897 let val = (self.0 >> 4usize) & 0x0f;
4898 val as u8
4899 }
4900 #[doc = "PMOS compensation code"]
4901 pub fn set_pcc(&mut self, val: u8) {
4902 self.0 = (self.0 & !(0x0f << 4usize)) | (((val as u32) & 0x0f) << 4usize);
4903 }
4904 }
4905 impl Default for Cccr {
4906 fn default() -> Cccr {
4907 Cccr(0)
4908 }
4909 }
4910 #[doc = "SYSCFG user register 17"]
4911 #[repr(transparent)]
4912 #[derive(Copy, Clone, Eq, PartialEq)]
4913 pub struct Ur17(pub u32);
4914 impl Ur17 {
4915 #[doc = "I/O high speed / low voltage"]
4916 pub const fn io_hslv(&self) -> bool {
4917 let val = (self.0 >> 0usize) & 0x01;
4918 val != 0
4919 }
4920 #[doc = "I/O high speed / low voltage"]
4921 pub fn set_io_hslv(&mut self, val: bool) {
4922 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
4923 }
4924 }
4925 impl Default for Ur17 {
4926 fn default() -> Ur17 {
4927 Ur17(0)
4928 }
4929 }
4930 #[doc = "SYSCFG user register 14"]
4931 #[repr(transparent)]
4932 #[derive(Copy, Clone, Eq, PartialEq)]
4933 pub struct Ur14(pub u32);
4934 impl Ur14 {
4935 #[doc = "D1 Stop Reset"]
4936 pub const fn d1stprst(&self) -> bool {
4937 let val = (self.0 >> 0usize) & 0x01;
4938 val != 0
4939 }
4940 #[doc = "D1 Stop Reset"]
4941 pub fn set_d1stprst(&mut self, val: bool) {
4942 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
4943 }
4944 }
4945 impl Default for Ur14 {
4946 fn default() -> Ur14 {
4947 Ur14(0)
4948 }
4949 }
4950 #[doc = "SYSCFG user register 7"]
4951 #[repr(transparent)]
4952 #[derive(Copy, Clone, Eq, PartialEq)]
4953 pub struct Ur7(pub u32);
4954 impl Ur7 {
4955 #[doc = "Secured area start address for bank 1"]
4956 pub const fn sa_beg_1(&self) -> u16 {
4957 let val = (self.0 >> 0usize) & 0x0fff;
4958 val as u16
4959 }
4960 #[doc = "Secured area start address for bank 1"]
4961 pub fn set_sa_beg_1(&mut self, val: u16) {
4962 self.0 = (self.0 & !(0x0fff << 0usize)) | (((val as u32) & 0x0fff) << 0usize);
4963 }
4964 #[doc = "Secured area end address for bank 1"]
4965 pub const fn sa_end_1(&self) -> u16 {
4966 let val = (self.0 >> 16usize) & 0x0fff;
4967 val as u16
4968 }
4969 #[doc = "Secured area end address for bank 1"]
4970 pub fn set_sa_end_1(&mut self, val: u16) {
4971 self.0 = (self.0 & !(0x0fff << 16usize)) | (((val as u32) & 0x0fff) << 16usize);
4972 }
4973 }
4974 impl Default for Ur7 {
4975 fn default() -> Ur7 {
4976 Ur7(0)
4977 }
4978 }
4979 #[doc = "SYSCFG user register 12"]
4980 #[repr(transparent)]
4981 #[derive(Copy, Clone, Eq, PartialEq)]
4982 pub struct Ur12(pub u32);
4983 impl Ur12 {
4984 #[doc = "Secure mode"]
4985 pub const fn secure(&self) -> bool {
4986 let val = (self.0 >> 16usize) & 0x01;
4987 val != 0
4988 }
4989 #[doc = "Secure mode"]
4990 pub fn set_secure(&mut self, val: bool) {
4991 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
4992=======
4993 #[doc = "DMA interrupt status register (DMA_ISR)"]
4994 #[repr(transparent)]
4995 #[derive(Copy, Clone, Eq, PartialEq)]
4996 pub struct Isr(pub u32);
4997 impl Isr {
4998 #[doc = "Channel 1 Global interrupt flag"]
4999 pub fn gif(&self, n: usize) -> bool {
5000 assert!(n < 7usize);
5001 let offs = 0usize + n * 4usize;
5002 let val = (self.0 >> offs) & 0x01;
5003 val != 0
5004 }
5005 #[doc = "Channel 1 Global interrupt flag"]
5006 pub fn set_gif(&mut self, n: usize, val: bool) {
5007 assert!(n < 7usize);
5008 let offs = 0usize + n * 4usize;
5009 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
5010 }
5011 #[doc = "Channel 1 Transfer Complete flag"]
5012 pub fn tcif(&self, n: usize) -> bool {
5013 assert!(n < 7usize);
5014 let offs = 1usize + n * 4usize;
5015 let val = (self.0 >> offs) & 0x01;
5016 val != 0
5017 }
5018 #[doc = "Channel 1 Transfer Complete flag"]
5019 pub fn set_tcif(&mut self, n: usize, val: bool) {
5020 assert!(n < 7usize);
5021 let offs = 1usize + n * 4usize;
5022 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
5023 }
5024 #[doc = "Channel 1 Half Transfer Complete flag"]
5025 pub fn htif(&self, n: usize) -> bool {
5026 assert!(n < 7usize);
5027 let offs = 2usize + n * 4usize;
5028 let val = (self.0 >> offs) & 0x01;
5029 val != 0
5030 }
5031 #[doc = "Channel 1 Half Transfer Complete flag"]
5032 pub fn set_htif(&mut self, n: usize, val: bool) {
5033 assert!(n < 7usize);
5034 let offs = 2usize + n * 4usize;
5035 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
5036 }
5037 #[doc = "Channel 1 Transfer Error flag"]
5038 pub fn teif(&self, n: usize) -> bool {
5039 assert!(n < 7usize);
5040 let offs = 3usize + n * 4usize;
5041 let val = (self.0 >> offs) & 0x01;
5042 val != 0
5043 }
5044 #[doc = "Channel 1 Transfer Error flag"]
5045 pub fn set_teif(&mut self, n: usize, val: bool) {
5046 assert!(n < 7usize);
5047 let offs = 3usize + n * 4usize;
5048 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
5049 }
5050 }
5051 impl Default for Isr {
5052 fn default() -> Isr {
5053 Isr(0)
5054 }
5055 }
5056 #[doc = "DMA interrupt flag clear register (DMA_IFCR)"]
5057 #[repr(transparent)]
5058 #[derive(Copy, Clone, Eq, PartialEq)]
5059 pub struct Ifcr(pub u32);
5060 impl Ifcr {
5061 #[doc = "Channel 1 Global interrupt clear"]
5062 pub fn cgif(&self, n: usize) -> bool {
5063 assert!(n < 7usize);
5064 let offs = 0usize + n * 4usize;
5065 let val = (self.0 >> offs) & 0x01;
5066 val != 0
5067 }
5068 #[doc = "Channel 1 Global interrupt clear"]
5069 pub fn set_cgif(&mut self, n: usize, val: bool) {
5070 assert!(n < 7usize);
5071 let offs = 0usize + n * 4usize;
5072 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
5073 }
5074 #[doc = "Channel 1 Transfer Complete clear"]
5075 pub fn ctcif(&self, n: usize) -> bool {
5076 assert!(n < 7usize);
5077 let offs = 1usize + n * 4usize;
5078 let val = (self.0 >> offs) & 0x01;
5079 val != 0
5080 }
5081 #[doc = "Channel 1 Transfer Complete clear"]
5082 pub fn set_ctcif(&mut self, n: usize, val: bool) {
5083 assert!(n < 7usize);
5084 let offs = 1usize + n * 4usize;
5085 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
5086 }
5087 #[doc = "Channel 1 Half Transfer clear"]
5088 pub fn chtif(&self, n: usize) -> bool {
5089 assert!(n < 7usize);
5090 let offs = 2usize + n * 4usize;
5091 let val = (self.0 >> offs) & 0x01;
5092 val != 0
5093 }
5094 #[doc = "Channel 1 Half Transfer clear"]
5095 pub fn set_chtif(&mut self, n: usize, val: bool) {
5096 assert!(n < 7usize);
5097 let offs = 2usize + n * 4usize;
5098 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
5099 }
5100 #[doc = "Channel 1 Transfer Error clear"]
5101 pub fn cteif(&self, n: usize) -> bool {
5102 assert!(n < 7usize);
5103 let offs = 3usize + n * 4usize;
5104 let val = (self.0 >> offs) & 0x01;
5105 val != 0
5106 }
5107 #[doc = "Channel 1 Transfer Error clear"]
5108 pub fn set_cteif(&mut self, n: usize, val: bool) {
5109 assert!(n < 7usize);
5110 let offs = 3usize + n * 4usize;
5111 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
5112>>>>>>> Better interrupt handling
5113 }
5114 }
5115 impl Default for Ur12 {
5116 fn default() -> Ur12 {
5117 Ur12(0)
5118 }
5119 }
5120<<<<<<< HEAD
5121 #[doc = "SYSCFG user register 0"]
5122 #[repr(transparent)]
5123 #[derive(Copy, Clone, Eq, PartialEq)]
5124 pub struct Ur0(pub u32);
5125 impl Ur0 {
5126 #[doc = "Bank Swap"]
5127 pub const fn bks(&self) -> bool {
5128 let val = (self.0 >> 0usize) & 0x01;
5129 val != 0
5130 }
5131 #[doc = "Bank Swap"]
5132 pub fn set_bks(&mut self, val: bool) {
5133 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
5134 }
5135 #[doc = "Readout protection"]
5136 pub const fn rdp(&self) -> u8 {
5137 let val = (self.0 >> 16usize) & 0xff;
5138 val as u8
5139 }
5140 #[doc = "Readout protection"]
5141 pub fn set_rdp(&mut self, val: u8) {
5142 self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize);
5143 }
5144 }
5145 impl Default for Ur0 {
5146 fn default() -> Ur0 {
5147 Ur0(0)
5148 }
5149 }
5150 #[doc = "SYSCFG user register 11"]
5151 #[repr(transparent)]
5152 #[derive(Copy, Clone, Eq, PartialEq)]
5153 pub struct Ur11(pub u32);
5154 impl Ur11 {
5155 #[doc = "Secured area end address for bank 2"]
5156 pub const fn sa_end_2(&self) -> u16 {
5157 let val = (self.0 >> 0usize) & 0x0fff;
5158 val as u16
5159 }
5160 #[doc = "Secured area end address for bank 2"]
5161 pub fn set_sa_end_2(&mut self, val: u16) {
5162 self.0 = (self.0 & !(0x0fff << 0usize)) | (((val as u32) & 0x0fff) << 0usize);
5163 }
5164 #[doc = "Independent Watchdog 1 mode"]
5165 pub const fn iwdg1m(&self) -> bool {
5166 let val = (self.0 >> 16usize) & 0x01;
5167 val != 0
5168 }
5169 #[doc = "Independent Watchdog 1 mode"]
5170 pub fn set_iwdg1m(&mut self, val: bool) {
5171 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
5172 }
5173 }
5174 impl Default for Ur11 {
5175 fn default() -> Ur11 {
5176 Ur11(0)
5177 }
5178 }
5179 #[doc = "SYSCFG user register 16"]
5180 #[repr(transparent)]
5181 #[derive(Copy, Clone, Eq, PartialEq)]
5182 pub struct Ur16(pub u32);
5183 impl Ur16 {
5184 #[doc = "Freeze independent watchdog in Stop mode"]
5185 pub const fn fziwdgstp(&self) -> bool {
5186 let val = (self.0 >> 0usize) & 0x01;
5187 val != 0
5188 }
5189 #[doc = "Freeze independent watchdog in Stop mode"]
5190 pub fn set_fziwdgstp(&mut self, val: bool) {
5191 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
5192 }
5193 #[doc = "Private key programmed"]
5194 pub const fn pkp(&self) -> bool {
5195 let val = (self.0 >> 16usize) & 0x01;
5196 val != 0
5197 }
5198 #[doc = "Private key programmed"]
5199 pub fn set_pkp(&mut self, val: bool) {
5200 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
5201 }
5202 }
5203 impl Default for Ur16 {
5204 fn default() -> Ur16 {
5205 Ur16(0)
5206 }
5207 }
5208 #[doc = "SYSCFG user register 13"]
5209 #[repr(transparent)]
5210 #[derive(Copy, Clone, Eq, PartialEq)]
5211 pub struct Ur13(pub u32);
5212 impl Ur13 {
5213 #[doc = "Secured DTCM RAM Size"]
5214 pub const fn sdrs(&self) -> u8 {
5215 let val = (self.0 >> 0usize) & 0x03;
5216 val as u8
5217 }
5218 #[doc = "Secured DTCM RAM Size"]
5219 pub fn set_sdrs(&mut self, val: u8) {
5220 self.0 = (self.0 & !(0x03 << 0usize)) | (((val as u32) & 0x03) << 0usize);
5221 }
5222 #[doc = "D1 Standby reset"]
5223 pub const fn d1sbrst(&self) -> bool {
5224 let val = (self.0 >> 16usize) & 0x01;
5225 val != 0
5226 }
5227 #[doc = "D1 Standby reset"]
5228 pub fn set_d1sbrst(&mut self, val: bool) {
5229 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
5230 }
5231 }
5232 impl Default for Ur13 {
5233 fn default() -> Ur13 {
5234 Ur13(0)
5235 }
5236 }
5237 #[doc = "SYSCFG user register 5"]
5238 #[repr(transparent)]
5239 #[derive(Copy, Clone, Eq, PartialEq)]
5240 pub struct Ur5(pub u32);
5241 impl Ur5 {
5242 #[doc = "Mass erase secured area disabled for bank 1"]
5243 pub const fn mesad_1(&self) -> bool {
5244 let val = (self.0 >> 0usize) & 0x01;
5245 val != 0
5246 }
5247 #[doc = "Mass erase secured area disabled for bank 1"]
5248 pub fn set_mesad_1(&mut self, val: bool) {
5249 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
5250 }
5251 #[doc = "Write protection for flash bank 1"]
5252 pub const fn wrpn_1(&self) -> u8 {
5253 let val = (self.0 >> 16usize) & 0xff;
5254 val as u8
5255 }
5256 #[doc = "Write protection for flash bank 1"]
5257 pub fn set_wrpn_1(&mut self, val: u8) {
5258 self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize);
5259 }
5260 }
5261 impl Default for Ur5 {
5262 fn default() -> Ur5 {
5263 Ur5(0)
5264 }
5265 }
5266 #[doc = "compensation cell control/status register"]
5267 #[repr(transparent)]
5268 #[derive(Copy, Clone, Eq, PartialEq)]
5269 pub struct Cccsr(pub u32);
5270 impl Cccsr {
5271 #[doc = "enable"]
5272 pub const fn en(&self) -> bool {
5273 let val = (self.0 >> 0usize) & 0x01;
5274 val != 0
5275 }
5276 #[doc = "enable"]
5277 pub fn set_en(&mut self, val: bool) {
5278 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
5279 }
5280 #[doc = "Code selection"]
5281 pub const fn cs(&self) -> bool {
5282 let val = (self.0 >> 1usize) & 0x01;
5283 val != 0
5284 }
5285 #[doc = "Code selection"]
5286 pub fn set_cs(&mut self, val: bool) {
5287 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
5288 }
5289 #[doc = "Compensation cell ready flag"]
5290 pub const fn ready(&self) -> bool {
5291 let val = (self.0 >> 8usize) & 0x01;
5292 val != 0
5293 }
5294 #[doc = "Compensation cell ready flag"]
5295 pub fn set_ready(&mut self, val: bool) {
5296 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
5297 }
5298 #[doc = "High-speed at low-voltage"]
5299 pub const fn hslv(&self) -> bool {
5300 let val = (self.0 >> 16usize) & 0x01;
5301 val != 0
5302 }
5303 #[doc = "High-speed at low-voltage"]
5304 pub fn set_hslv(&mut self, val: bool) {
5305 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
5306 }
5307 }
5308 impl Default for Cccsr {
5309 fn default() -> Cccsr {
5310 Cccsr(0)
5311 }
5312 }
5313 #[doc = "SYSCFG user register 4"]
5314=======
5315 }
5316 pub mod vals {
5317 use crate::generic::*;
5318 #[repr(transparent)]
5319 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5320 pub struct Circ(pub u8);
5321 impl Circ {
5322 #[doc = "Circular buffer disabled"]
5323 pub const DISABLED: Self = Self(0);
5324 #[doc = "Circular buffer enabled"]
5325 pub const ENABLED: Self = Self(0x01);
5326 }
5327 #[repr(transparent)]
5328 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5329 pub struct Inc(pub u8);
5330 impl Inc {
5331 #[doc = "Increment mode disabled"]
5332 pub const DISABLED: Self = Self(0);
5333 #[doc = "Increment mode enabled"]
5334 pub const ENABLED: Self = Self(0x01);
5335 }
5336 #[repr(transparent)]
5337 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5338 pub struct Memmem(pub u8);
5339 impl Memmem {
5340 #[doc = "Memory to memory mode disabled"]
5341 pub const DISABLED: Self = Self(0);
5342 #[doc = "Memory to memory mode enabled"]
5343 pub const ENABLED: Self = Self(0x01);
5344 }
5345 #[repr(transparent)]
5346 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5347 pub struct Dir(pub u8);
5348 impl Dir {
5349 #[doc = "Read from peripheral"]
5350 pub const FROMPERIPHERAL: Self = Self(0);
5351 #[doc = "Read from memory"]
5352 pub const FROMMEMORY: Self = Self(0x01);
5353 }
5354 #[repr(transparent)]
5355 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5356 pub struct Pl(pub u8);
5357 impl Pl {
5358 #[doc = "Low priority"]
5359 pub const LOW: Self = Self(0);
5360 #[doc = "Medium priority"]
5361 pub const MEDIUM: Self = Self(0x01);
5362 #[doc = "High priority"]
5363 pub const HIGH: Self = Self(0x02);
5364 #[doc = "Very high priority"]
5365 pub const VERYHIGH: Self = Self(0x03);
5366 }
5367 #[repr(transparent)]
5368 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5369 pub struct Size(pub u8);
5370 impl Size {
5371 #[doc = "8-bit size"]
5372 pub const BITS8: Self = Self(0);
5373 #[doc = "16-bit size"]
5374 pub const BITS16: Self = Self(0x01);
5375 #[doc = "32-bit size"]
5376 pub const BITS32: Self = Self(0x02);
5377 }
5378 }
5379}
5380pub mod exti_v1 {
5381 use crate::generic::*;
5382 #[doc = "External interrupt/event controller"]
5383 #[derive(Copy, Clone)]
5384 pub struct Exti(pub *mut u8);
5385 unsafe impl Send for Exti {}
5386 unsafe impl Sync for Exti {}
5387 impl Exti {
5388 #[doc = "Interrupt mask register (EXTI_IMR)"]
5389 pub fn imr(self) -> Reg<regs::Imr, RW> {
5390 unsafe { Reg::from_ptr(self.0.add(0usize)) }
5391 }
5392 #[doc = "Event mask register (EXTI_EMR)"]
5393 pub fn emr(self) -> Reg<regs::Emr, RW> {
5394 unsafe { Reg::from_ptr(self.0.add(4usize)) }
5395 }
5396 #[doc = "Rising Trigger selection register (EXTI_RTSR)"]
5397 pub fn rtsr(self) -> Reg<regs::Rtsr, RW> {
5398 unsafe { Reg::from_ptr(self.0.add(8usize)) }
5399 }
5400 #[doc = "Falling Trigger selection register (EXTI_FTSR)"]
5401 pub fn ftsr(self) -> Reg<regs::Ftsr, RW> {
5402 unsafe { Reg::from_ptr(self.0.add(12usize)) }
5403 }
5404 #[doc = "Software interrupt event register (EXTI_SWIER)"]
5405 pub fn swier(self) -> Reg<regs::Swier, RW> {
5406 unsafe { Reg::from_ptr(self.0.add(16usize)) }
5407 }
5408 #[doc = "Pending register (EXTI_PR)"]
5409 pub fn pr(self) -> Reg<regs::Pr, RW> {
5410 unsafe { Reg::from_ptr(self.0.add(20usize)) }
5411 }
5412 }
5413 pub mod vals {
5414 use crate::generic::*;
5415 #[repr(transparent)]
5416 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5417 pub struct Mr(pub u8);
5418 impl Mr {
5419 #[doc = "Interrupt request line is masked"]
5420 pub const MASKED: Self = Self(0);
5421 #[doc = "Interrupt request line is unmasked"]
5422 pub const UNMASKED: Self = Self(0x01);
5423 }
5424 #[repr(transparent)]
5425 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5426 pub struct Tr(pub u8);
5427 impl Tr {
5428 #[doc = "Falling edge trigger is disabled"]
5429 pub const DISABLED: Self = Self(0);
5430 #[doc = "Falling edge trigger is enabled"]
5431 pub const ENABLED: Self = Self(0x01);
5432 }
5433 #[repr(transparent)]
5434 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5435 pub struct Prr(pub u8);
5436 impl Prr {
5437 #[doc = "No trigger request occurred"]
5438 pub const NOTPENDING: Self = Self(0);
5439 #[doc = "Selected trigger request occurred"]
5440 pub const PENDING: Self = Self(0x01);
5441 }
5442 #[repr(transparent)]
5443 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5444 pub struct Prw(pub u8);
5445 impl Prw {
5446 #[doc = "Clears pending bit"]
5447 pub const CLEAR: Self = Self(0x01);
5448 }
5449 #[repr(transparent)]
5450 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5451 pub struct Swierw(pub u8);
5452 impl Swierw {
5453 #[doc = "Generates an interrupt request"]
5454 pub const PEND: Self = Self(0x01);
5455 }
5456 }
5457 pub mod regs {
5458 use crate::generic::*;
5459 #[doc = "Falling Trigger selection register (EXTI_FTSR)"]
5460>>>>>>> Better interrupt handling
5461 #[repr(transparent)]
5462 #[derive(Copy, Clone, Eq, PartialEq)]
5463 pub struct Ftsr(pub u32);
5464 impl Ftsr {
5465 #[doc = "Falling trigger event configuration of line 0"]
5466 pub fn tr(&self, n: usize) -> super::vals::Tr {
5467 assert!(n < 23usize);
5468 let offs = 0usize + n * 1usize;
5469 let val = (self.0 >> offs) & 0x01;
5470 super::vals::Tr(val as u8)
5471 }
5472 #[doc = "Falling trigger event configuration of line 0"]
5473 pub fn set_tr(&mut self, n: usize, val: super::vals::Tr) {
5474 assert!(n < 23usize);
5475 let offs = 0usize + n * 1usize;
5476 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs);
5477 }
5478 }
5479 impl Default for Ftsr {
5480 fn default() -> Ftsr {
5481 Ftsr(0)
5482 }
5483 }
5484<<<<<<< HEAD
5485 #[doc = "SYSCFG user register 10"]
5486 #[repr(transparent)]
5487 #[derive(Copy, Clone, Eq, PartialEq)]
5488 pub struct Ur10(pub u32);
5489 impl Ur10 {
5490 #[doc = "Protected area end address for bank 2"]
5491 pub const fn pa_end_2(&self) -> u16 {
5492 let val = (self.0 >> 0usize) & 0x0fff;
5493 val as u16
5494 }
5495 #[doc = "Protected area end address for bank 2"]
5496 pub fn set_pa_end_2(&mut self, val: u16) {
5497 self.0 = (self.0 & !(0x0fff << 0usize)) | (((val as u32) & 0x0fff) << 0usize);
5498 }
5499 #[doc = "Secured area start address for bank 2"]
5500 pub const fn sa_beg_2(&self) -> u16 {
5501 let val = (self.0 >> 16usize) & 0x0fff;
5502 val as u16
5503 }
5504 #[doc = "Secured area start address for bank 2"]
5505 pub fn set_sa_beg_2(&mut self, val: u16) {
5506 self.0 = (self.0 & !(0x0fff << 16usize)) | (((val as u32) & 0x0fff) << 16usize);
5507 }
5508 }
5509 impl Default for Ur10 {
5510 fn default() -> Ur10 {
5511 Ur10(0)
5512=======
5513 #[doc = "Interrupt mask register (EXTI_IMR)"]
5514 #[repr(transparent)]
5515 #[derive(Copy, Clone, Eq, PartialEq)]
5516 pub struct Imr(pub u32);
5517 impl Imr {
5518 #[doc = "Interrupt Mask on line 0"]
5519 pub fn mr(&self, n: usize) -> super::vals::Mr {
5520 assert!(n < 23usize);
5521 let offs = 0usize + n * 1usize;
5522 let val = (self.0 >> offs) & 0x01;
5523 super::vals::Mr(val as u8)
5524 }
5525 #[doc = "Interrupt Mask on line 0"]
5526 pub fn set_mr(&mut self, n: usize, val: super::vals::Mr) {
5527 assert!(n < 23usize);
5528 let offs = 0usize + n * 1usize;
5529 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs);
5530 }
5531 }
5532 impl Default for Imr {
5533 fn default() -> Imr {
5534 Imr(0)
5535 }
5536 }
5537 #[doc = "Event mask register (EXTI_EMR)"]
5538 #[repr(transparent)]
5539 #[derive(Copy, Clone, Eq, PartialEq)]
5540 pub struct Emr(pub u32);
5541 impl Emr {
5542 #[doc = "Event Mask on line 0"]
5543 pub fn mr(&self, n: usize) -> super::vals::Mr {
5544 assert!(n < 23usize);
5545 let offs = 0usize + n * 1usize;
5546 let val = (self.0 >> offs) & 0x01;
5547 super::vals::Mr(val as u8)
5548 }
5549 #[doc = "Event Mask on line 0"]
5550 pub fn set_mr(&mut self, n: usize, val: super::vals::Mr) {
5551 assert!(n < 23usize);
5552 let offs = 0usize + n * 1usize;
5553 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs);
5554 }
5555 }
5556 impl Default for Emr {
5557 fn default() -> Emr {
5558 Emr(0)
5559 }
5560 }
5561 #[doc = "Software interrupt event register (EXTI_SWIER)"]
5562 #[repr(transparent)]
5563 #[derive(Copy, Clone, Eq, PartialEq)]
5564 pub struct Swier(pub u32);
5565 impl Swier {
5566 #[doc = "Software Interrupt on line 0"]
5567 pub fn swier(&self, n: usize) -> bool {
5568 assert!(n < 23usize);
5569 let offs = 0usize + n * 1usize;
5570 let val = (self.0 >> offs) & 0x01;
5571 val != 0
5572 }
5573 #[doc = "Software Interrupt on line 0"]
5574 pub fn set_swier(&mut self, n: usize, val: bool) {
5575 assert!(n < 23usize);
5576 let offs = 0usize + n * 1usize;
5577 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
5578 }
5579 }
5580 impl Default for Swier {
5581 fn default() -> Swier {
5582 Swier(0)
5583 }
5584 }
5585 #[doc = "Rising Trigger selection register (EXTI_RTSR)"]
5586 #[repr(transparent)]
5587 #[derive(Copy, Clone, Eq, PartialEq)]
5588 pub struct Rtsr(pub u32);
5589 impl Rtsr {
5590 #[doc = "Rising trigger event configuration of line 0"]
5591 pub fn tr(&self, n: usize) -> super::vals::Tr {
5592 assert!(n < 23usize);
5593 let offs = 0usize + n * 1usize;
5594 let val = (self.0 >> offs) & 0x01;
5595 super::vals::Tr(val as u8)
5596 }
5597 #[doc = "Rising trigger event configuration of line 0"]
5598 pub fn set_tr(&mut self, n: usize, val: super::vals::Tr) {
5599 assert!(n < 23usize);
5600 let offs = 0usize + n * 1usize;
5601 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs);
5602 }
5603 }
5604 impl Default for Rtsr {
5605 fn default() -> Rtsr {
5606 Rtsr(0)
5607>>>>>>> Better interrupt handling
5608 }
5609 }
5610 #[doc = "Pending register (EXTI_PR)"]
5611 #[repr(transparent)]
5612 #[derive(Copy, Clone, Eq, PartialEq)]
5613 pub struct Pr(pub u32);
5614 impl Pr {
5615 #[doc = "Pending bit 0"]
5616 pub fn pr(&self, n: usize) -> bool {
5617 assert!(n < 23usize);
5618 let offs = 0usize + n * 1usize;
5619 let val = (self.0 >> offs) & 0x01;
5620 val != 0
5621 }
5622 #[doc = "Pending bit 0"]
5623 pub fn set_pr(&mut self, n: usize, val: bool) {
5624 assert!(n < 23usize);
5625 let offs = 0usize + n * 1usize;
5626 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
5627 }
5628 }
5629 impl Default for Pr {
5630 fn default() -> Pr {
5631 Pr(0)
5632 }
5633 }
5634<<<<<<< HEAD
5635 #[doc = "SYSCFG user register 3"]
5636 #[repr(transparent)]
5637 #[derive(Copy, Clone, Eq, PartialEq)]
5638 pub struct Ur3(pub u32);
5639 impl Ur3 {
5640 #[doc = "Boot Address 1"]
5641 pub const fn boot_add1(&self) -> u16 {
5642 let val = (self.0 >> 16usize) & 0xffff;
5643 val as u16
5644 }
5645 #[doc = "Boot Address 1"]
5646 pub fn set_boot_add1(&mut self, val: u16) {
5647 self.0 = (self.0 & !(0xffff << 16usize)) | (((val as u32) & 0xffff) << 16usize);
5648 }
5649 }
5650 impl Default for Ur3 {
5651 fn default() -> Ur3 {
5652 Ur3(0)
5653 }
5654=======
5655 }
5656}
5657pub mod timer_v1 {
5658 use crate::generic::*;
5659 #[doc = "Advanced-timers"]
5660 #[derive(Copy, Clone)]
5661 pub struct TimAdv(pub *mut u8);
5662 unsafe impl Send for TimAdv {}
5663 unsafe impl Sync for TimAdv {}
5664 impl TimAdv {
5665 #[doc = "control register 1"]
5666 pub fn cr1(self) -> Reg<regs::Cr1Gp, RW> {
5667 unsafe { Reg::from_ptr(self.0.add(0usize)) }
5668 }
5669 #[doc = "control register 2"]
5670 pub fn cr2(self) -> Reg<regs::Cr2Adv, RW> {
5671 unsafe { Reg::from_ptr(self.0.add(4usize)) }
5672 }
5673 #[doc = "slave mode control register"]
5674 pub fn smcr(self) -> Reg<regs::Smcr, RW> {
5675 unsafe { Reg::from_ptr(self.0.add(8usize)) }
5676 }
5677 #[doc = "DMA/Interrupt enable register"]
5678 pub fn dier(self) -> Reg<regs::DierAdv, RW> {
5679 unsafe { Reg::from_ptr(self.0.add(12usize)) }
5680 }
5681 #[doc = "status register"]
5682 pub fn sr(self) -> Reg<regs::SrAdv, RW> {
5683 unsafe { Reg::from_ptr(self.0.add(16usize)) }
5684 }
5685 #[doc = "event generation register"]
5686 pub fn egr(self) -> Reg<regs::EgrAdv, W> {
5687 unsafe { Reg::from_ptr(self.0.add(20usize)) }
5688>>>>>>> Better interrupt handling
5689 }
5690 #[doc = "capture/compare mode register 1 (input mode)"]
5691 pub fn ccmr_input(self, n: usize) -> Reg<regs::CcmrInput, RW> {
5692 assert!(n < 2usize);
5693 unsafe { Reg::from_ptr(self.0.add(24usize + n * 4usize)) }
5694 }
5695 #[doc = "capture/compare mode register 1 (output mode)"]
5696 pub fn ccmr_output(self, n: usize) -> Reg<regs::CcmrOutput, RW> {
5697 assert!(n < 2usize);
5698 unsafe { Reg::from_ptr(self.0.add(24usize + n * 4usize)) }
5699 }
5700<<<<<<< HEAD
5701 #[doc = "SYSCFG user register 6"]
5702 #[repr(transparent)]
5703 #[derive(Copy, Clone, Eq, PartialEq)]
5704 pub struct Ur6(pub u32);
5705 impl Ur6 {
5706 #[doc = "Protected area start address for bank 1"]
5707 pub const fn pa_beg_1(&self) -> u16 {
5708 let val = (self.0 >> 0usize) & 0x0fff;
5709 val as u16
5710 }
5711 #[doc = "Protected area start address for bank 1"]
5712 pub fn set_pa_beg_1(&mut self, val: u16) {
5713 self.0 = (self.0 & !(0x0fff << 0usize)) | (((val as u32) & 0x0fff) << 0usize);
5714 }
5715 #[doc = "Protected area end address for bank 1"]
5716 pub const fn pa_end_1(&self) -> u16 {
5717 let val = (self.0 >> 16usize) & 0x0fff;
5718 val as u16
5719 }
5720 #[doc = "Protected area end address for bank 1"]
5721 pub fn set_pa_end_1(&mut self, val: u16) {
5722 self.0 = (self.0 & !(0x0fff << 16usize)) | (((val as u32) & 0x0fff) << 16usize);
5723 }
5724 }
5725 impl Default for Ur6 {
5726 fn default() -> Ur6 {
5727 Ur6(0)
5728 }
5729=======
5730 #[doc = "capture/compare enable register"]
5731 pub fn ccer(self) -> Reg<regs::CcerAdv, RW> {
5732 unsafe { Reg::from_ptr(self.0.add(32usize)) }
5733 }
5734 #[doc = "counter"]
5735 pub fn cnt(self) -> Reg<regs::Cnt16, RW> {
5736 unsafe { Reg::from_ptr(self.0.add(36usize)) }
5737>>>>>>> Better interrupt handling
5738 }
5739 #[doc = "prescaler"]
5740 pub fn psc(self) -> Reg<regs::Psc, RW> {
5741 unsafe { Reg::from_ptr(self.0.add(40usize)) }
5742 }
5743 #[doc = "auto-reload register"]
5744 pub fn arr(self) -> Reg<regs::Arr16, RW> {
5745 unsafe { Reg::from_ptr(self.0.add(44usize)) }
5746 }
5747<<<<<<< HEAD
5748 #[doc = "SYSCFG compensation cell value register"]
5749 #[repr(transparent)]
5750 #[derive(Copy, Clone, Eq, PartialEq)]
5751 pub struct Ccvr(pub u32);
5752 impl Ccvr {
5753 #[doc = "NMOS compensation value"]
5754 pub const fn ncv(&self) -> u8 {
5755 let val = (self.0 >> 0usize) & 0x0f;
5756 val as u8
5757 }
5758 #[doc = "NMOS compensation value"]
5759 pub fn set_ncv(&mut self, val: u8) {
5760 self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize);
5761 }
5762 #[doc = "PMOS compensation value"]
5763 pub const fn pcv(&self) -> u8 {
5764 let val = (self.0 >> 4usize) & 0x0f;
5765 val as u8
5766 }
5767 #[doc = "PMOS compensation value"]
5768 pub fn set_pcv(&mut self, val: u8) {
5769 self.0 = (self.0 & !(0x0f << 4usize)) | (((val as u32) & 0x0f) << 4usize);
5770 }
5771 }
5772 impl Default for Ccvr {
5773 fn default() -> Ccvr {
5774 Ccvr(0)
5775 }
5776 }
5777 #[doc = "peripheral mode configuration register"]
5778 #[repr(transparent)]
5779 #[derive(Copy, Clone, Eq, PartialEq)]
5780 pub struct Pmcr(pub u32);
5781 impl Pmcr {
5782 #[doc = "I2C1 Fm+"]
5783 pub const fn i2c1fmp(&self) -> bool {
5784=======
5785 #[doc = "repetition counter register"]
5786 pub fn rcr(self) -> Reg<regs::Rcr, RW> {
5787 unsafe { Reg::from_ptr(self.0.add(48usize)) }
5788 }
5789 #[doc = "capture/compare register"]
5790 pub fn ccr(self, n: usize) -> Reg<regs::Ccr16, RW> {
5791 assert!(n < 4usize);
5792 unsafe { Reg::from_ptr(self.0.add(52usize + n * 4usize)) }
5793 }
5794 #[doc = "break and dead-time register"]
5795 pub fn bdtr(self) -> Reg<regs::Bdtr, RW> {
5796 unsafe { Reg::from_ptr(self.0.add(68usize)) }
5797 }
5798 #[doc = "DMA control register"]
5799 pub fn dcr(self) -> Reg<regs::Dcr, RW> {
5800 unsafe { Reg::from_ptr(self.0.add(72usize)) }
5801 }
5802 #[doc = "DMA address for full transfer"]
5803 pub fn dmar(self) -> Reg<regs::Dmar, RW> {
5804 unsafe { Reg::from_ptr(self.0.add(76usize)) }
5805 }
5806 }
5807 #[doc = "General purpose 16-bit timer"]
5808 #[derive(Copy, Clone)]
5809 pub struct TimGp16(pub *mut u8);
5810 unsafe impl Send for TimGp16 {}
5811 unsafe impl Sync for TimGp16 {}
5812 impl TimGp16 {
5813 #[doc = "control register 1"]
5814 pub fn cr1(self) -> Reg<regs::Cr1Gp, RW> {
5815 unsafe { Reg::from_ptr(self.0.add(0usize)) }
5816 }
5817 #[doc = "control register 2"]
5818 pub fn cr2(self) -> Reg<regs::Cr2Gp, RW> {
5819 unsafe { Reg::from_ptr(self.0.add(4usize)) }
5820 }
5821 #[doc = "slave mode control register"]
5822 pub fn smcr(self) -> Reg<regs::Smcr, RW> {
5823 unsafe { Reg::from_ptr(self.0.add(8usize)) }
5824 }
5825 #[doc = "DMA/Interrupt enable register"]
5826 pub fn dier(self) -> Reg<regs::DierGp, RW> {
5827 unsafe { Reg::from_ptr(self.0.add(12usize)) }
5828 }
5829 #[doc = "status register"]
5830 pub fn sr(self) -> Reg<regs::SrGp, RW> {
5831 unsafe { Reg::from_ptr(self.0.add(16usize)) }
5832 }
5833 #[doc = "event generation register"]
5834 pub fn egr(self) -> Reg<regs::EgrGp, W> {
5835 unsafe { Reg::from_ptr(self.0.add(20usize)) }
5836 }
5837 #[doc = "capture/compare mode register 1 (input mode)"]
5838 pub fn ccmr_input(self, n: usize) -> Reg<regs::CcmrInput, RW> {
5839 assert!(n < 2usize);
5840 unsafe { Reg::from_ptr(self.0.add(24usize + n * 4usize)) }
5841 }
5842 #[doc = "capture/compare mode register 1 (output mode)"]
5843 pub fn ccmr_output(self, n: usize) -> Reg<regs::CcmrOutput, RW> {
5844 assert!(n < 2usize);
5845 unsafe { Reg::from_ptr(self.0.add(24usize + n * 4usize)) }
5846 }
5847 #[doc = "capture/compare enable register"]
5848 pub fn ccer(self) -> Reg<regs::CcerGp, RW> {
5849 unsafe { Reg::from_ptr(self.0.add(32usize)) }
5850 }
5851 #[doc = "counter"]
5852 pub fn cnt(self) -> Reg<regs::Cnt16, RW> {
5853 unsafe { Reg::from_ptr(self.0.add(36usize)) }
5854 }
5855 #[doc = "prescaler"]
5856 pub fn psc(self) -> Reg<regs::Psc, RW> {
5857 unsafe { Reg::from_ptr(self.0.add(40usize)) }
5858 }
5859 #[doc = "auto-reload register"]
5860 pub fn arr(self) -> Reg<regs::Arr16, RW> {
5861 unsafe { Reg::from_ptr(self.0.add(44usize)) }
5862 }
5863 #[doc = "capture/compare register"]
5864 pub fn ccr(self, n: usize) -> Reg<regs::Ccr16, RW> {
5865 assert!(n < 4usize);
5866 unsafe { Reg::from_ptr(self.0.add(52usize + n * 4usize)) }
5867 }
5868 #[doc = "DMA control register"]
5869 pub fn dcr(self) -> Reg<regs::Dcr, RW> {
5870 unsafe { Reg::from_ptr(self.0.add(72usize)) }
5871 }
5872 #[doc = "DMA address for full transfer"]
5873 pub fn dmar(self) -> Reg<regs::Dmar, RW> {
5874 unsafe { Reg::from_ptr(self.0.add(76usize)) }
5875 }
5876 }
5877 #[doc = "General purpose 32-bit timer"]
5878 #[derive(Copy, Clone)]
5879 pub struct TimGp32(pub *mut u8);
5880 unsafe impl Send for TimGp32 {}
5881 unsafe impl Sync for TimGp32 {}
5882 impl TimGp32 {
5883 #[doc = "control register 1"]
5884 pub fn cr1(self) -> Reg<regs::Cr1Gp, RW> {
5885 unsafe { Reg::from_ptr(self.0.add(0usize)) }
5886 }
5887 #[doc = "control register 2"]
5888 pub fn cr2(self) -> Reg<regs::Cr2Gp, RW> {
5889 unsafe { Reg::from_ptr(self.0.add(4usize)) }
5890 }
5891 #[doc = "slave mode control register"]
5892 pub fn smcr(self) -> Reg<regs::Smcr, RW> {
5893 unsafe { Reg::from_ptr(self.0.add(8usize)) }
5894 }
5895 #[doc = "DMA/Interrupt enable register"]
5896 pub fn dier(self) -> Reg<regs::DierGp, RW> {
5897 unsafe { Reg::from_ptr(self.0.add(12usize)) }
5898 }
5899 #[doc = "status register"]
5900 pub fn sr(self) -> Reg<regs::SrGp, RW> {
5901 unsafe { Reg::from_ptr(self.0.add(16usize)) }
5902 }
5903 #[doc = "event generation register"]
5904 pub fn egr(self) -> Reg<regs::EgrGp, W> {
5905 unsafe { Reg::from_ptr(self.0.add(20usize)) }
5906 }
5907 #[doc = "capture/compare mode register 1 (input mode)"]
5908 pub fn ccmr_input(self, n: usize) -> Reg<regs::CcmrInput, RW> {
5909 assert!(n < 2usize);
5910 unsafe { Reg::from_ptr(self.0.add(24usize + n * 4usize)) }
5911 }
5912 #[doc = "capture/compare mode register 1 (output mode)"]
5913 pub fn ccmr_output(self, n: usize) -> Reg<regs::CcmrOutput, RW> {
5914 assert!(n < 2usize);
5915 unsafe { Reg::from_ptr(self.0.add(24usize + n * 4usize)) }
5916 }
5917 #[doc = "capture/compare enable register"]
5918 pub fn ccer(self) -> Reg<regs::CcerGp, RW> {
5919 unsafe { Reg::from_ptr(self.0.add(32usize)) }
5920 }
5921 #[doc = "counter"]
5922 pub fn cnt(self) -> Reg<regs::Cnt32, RW> {
5923 unsafe { Reg::from_ptr(self.0.add(36usize)) }
5924 }
5925 #[doc = "prescaler"]
5926 pub fn psc(self) -> Reg<regs::Psc, RW> {
5927 unsafe { Reg::from_ptr(self.0.add(40usize)) }
5928 }
5929 #[doc = "auto-reload register"]
5930 pub fn arr(self) -> Reg<regs::Arr32, RW> {
5931 unsafe { Reg::from_ptr(self.0.add(44usize)) }
5932 }
5933 #[doc = "capture/compare register"]
5934 pub fn ccr(self, n: usize) -> Reg<regs::Ccr32, RW> {
5935 assert!(n < 4usize);
5936 unsafe { Reg::from_ptr(self.0.add(52usize + n * 4usize)) }
5937 }
5938 #[doc = "DMA control register"]
5939 pub fn dcr(self) -> Reg<regs::Dcr, RW> {
5940 unsafe { Reg::from_ptr(self.0.add(72usize)) }
5941 }
5942 #[doc = "DMA address for full transfer"]
5943 pub fn dmar(self) -> Reg<regs::Dmar, RW> {
5944 unsafe { Reg::from_ptr(self.0.add(76usize)) }
5945 }
5946 }
5947 #[doc = "Basic timer"]
5948 #[derive(Copy, Clone)]
5949 pub struct TimBasic(pub *mut u8);
5950 unsafe impl Send for TimBasic {}
5951 unsafe impl Sync for TimBasic {}
5952 impl TimBasic {
5953 #[doc = "control register 1"]
5954 pub fn cr1(self) -> Reg<regs::Cr1Basic, RW> {
5955 unsafe { Reg::from_ptr(self.0.add(0usize)) }
5956 }
5957 #[doc = "control register 2"]
5958 pub fn cr2(self) -> Reg<regs::Cr2Basic, RW> {
5959 unsafe { Reg::from_ptr(self.0.add(4usize)) }
5960 }
5961 #[doc = "DMA/Interrupt enable register"]
5962 pub fn dier(self) -> Reg<regs::DierBasic, RW> {
5963 unsafe { Reg::from_ptr(self.0.add(12usize)) }
5964 }
5965 #[doc = "status register"]
5966 pub fn sr(self) -> Reg<regs::SrBasic, RW> {
5967 unsafe { Reg::from_ptr(self.0.add(16usize)) }
5968 }
5969 #[doc = "event generation register"]
5970 pub fn egr(self) -> Reg<regs::EgrBasic, W> {
5971 unsafe { Reg::from_ptr(self.0.add(20usize)) }
5972 }
5973 #[doc = "counter"]
5974 pub fn cnt(self) -> Reg<regs::Cnt16, RW> {
5975 unsafe { Reg::from_ptr(self.0.add(36usize)) }
5976 }
5977 #[doc = "prescaler"]
5978 pub fn psc(self) -> Reg<regs::Psc, RW> {
5979 unsafe { Reg::from_ptr(self.0.add(40usize)) }
5980 }
5981 #[doc = "auto-reload register"]
5982 pub fn arr(self) -> Reg<regs::Arr16, RW> {
5983 unsafe { Reg::from_ptr(self.0.add(44usize)) }
5984 }
5985 }
5986 pub mod regs {
5987 use crate::generic::*;
5988 #[doc = "control register 2"]
5989 #[repr(transparent)]
5990 #[derive(Copy, Clone, Eq, PartialEq)]
5991 pub struct Cr2Basic(pub u32);
5992 impl Cr2Basic {
5993 #[doc = "Master mode selection"]
5994 pub const fn mms(&self) -> super::vals::Mms {
5995 let val = (self.0 >> 4usize) & 0x07;
5996 super::vals::Mms(val as u8)
5997 }
5998 #[doc = "Master mode selection"]
5999 pub fn set_mms(&mut self, val: super::vals::Mms) {
6000 self.0 = (self.0 & !(0x07 << 4usize)) | (((val.0 as u32) & 0x07) << 4usize);
6001 }
6002 }
6003 impl Default for Cr2Basic {
6004 fn default() -> Cr2Basic {
6005 Cr2Basic(0)
6006 }
6007 }
6008 #[doc = "status register"]
6009 #[repr(transparent)]
6010 #[derive(Copy, Clone, Eq, PartialEq)]
6011 pub struct SrAdv(pub u32);
6012 impl SrAdv {
6013 #[doc = "Update interrupt flag"]
6014 pub const fn uif(&self) -> bool {
6015>>>>>>> Better interrupt handling
6016 let val = (self.0 >> 0usize) & 0x01;
6017 val != 0
6018 }
6019 #[doc = "Update interrupt flag"]
6020 pub fn set_uif(&mut self, val: bool) {
6021 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
6022 }
6023 #[doc = "Capture/compare 1 interrupt flag"]
6024 pub fn ccif(&self, n: usize) -> bool {
6025 assert!(n < 4usize);
6026 let offs = 1usize + n * 1usize;
6027 let val = (self.0 >> offs) & 0x01;
6028 val != 0
6029 }
6030 #[doc = "Capture/compare 1 interrupt flag"]
6031 pub fn set_ccif(&mut self, n: usize, val: bool) {
6032 assert!(n < 4usize);
6033 let offs = 1usize + n * 1usize;
6034 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
6035 }
6036 #[doc = "COM interrupt flag"]
6037 pub const fn comif(&self) -> bool {
6038 let val = (self.0 >> 5usize) & 0x01;
6039 val != 0
6040 }
6041 #[doc = "COM interrupt flag"]
6042 pub fn set_comif(&mut self, val: bool) {
6043 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
6044 }
6045 #[doc = "Trigger interrupt flag"]
6046 pub const fn tif(&self) -> bool {
6047 let val = (self.0 >> 6usize) & 0x01;
6048 val != 0
6049 }
6050 #[doc = "Trigger interrupt flag"]
6051 pub fn set_tif(&mut self, val: bool) {
6052 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
6053 }
6054 #[doc = "Break interrupt flag"]
6055 pub const fn bif(&self) -> bool {
6056 let val = (self.0 >> 7usize) & 0x01;
6057 val != 0
6058 }
6059 #[doc = "Break interrupt flag"]
6060 pub fn set_bif(&mut self, val: bool) {
6061 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
6062 }
6063 #[doc = "Capture/Compare 1 overcapture flag"]
6064 pub fn ccof(&self, n: usize) -> bool {
6065 assert!(n < 4usize);
6066 let offs = 9usize + n * 1usize;
6067 let val = (self.0 >> offs) & 0x01;
6068 val != 0
6069 }
6070 #[doc = "Capture/Compare 1 overcapture flag"]
6071 pub fn set_ccof(&mut self, n: usize, val: bool) {
6072 assert!(n < 4usize);
6073 let offs = 9usize + n * 1usize;
6074 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
6075 }
6076 }
6077 impl Default for SrAdv {
6078 fn default() -> SrAdv {
6079 SrAdv(0)
6080 }
6081 }
6082 #[doc = "capture/compare mode register 2 (output mode)"]
6083 #[repr(transparent)]
6084 #[derive(Copy, Clone, Eq, PartialEq)]
6085 pub struct CcmrOutput(pub u32);
6086 impl CcmrOutput {
6087 #[doc = "Capture/Compare 3 selection"]
6088 pub fn ccs(&self, n: usize) -> super::vals::CcmrOutputCcs {
6089 assert!(n < 2usize);
6090 let offs = 0usize + n * 8usize;
6091 let val = (self.0 >> offs) & 0x03;
6092 super::vals::CcmrOutputCcs(val as u8)
6093 }
6094 #[doc = "Capture/Compare 3 selection"]
6095 pub fn set_ccs(&mut self, n: usize, val: super::vals::CcmrOutputCcs) {
6096 assert!(n < 2usize);
6097 let offs = 0usize + n * 8usize;
6098 self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs);
6099 }
6100 #[doc = "Output compare 3 fast enable"]
6101 pub fn ocfe(&self, n: usize) -> bool {
6102 assert!(n < 2usize);
6103 let offs = 2usize + n * 8usize;
6104 let val = (self.0 >> offs) & 0x01;
6105 val != 0
6106 }
6107 #[doc = "Output compare 3 fast enable"]
6108 pub fn set_ocfe(&mut self, n: usize, val: bool) {
6109 assert!(n < 2usize);
6110 let offs = 2usize + n * 8usize;
6111 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
6112 }
6113 #[doc = "Output compare 3 preload enable"]
6114 pub fn ocpe(&self, n: usize) -> super::vals::Ocpe {
6115 assert!(n < 2usize);
6116 let offs = 3usize + n * 8usize;
6117 let val = (self.0 >> offs) & 0x01;
6118 super::vals::Ocpe(val as u8)
6119 }
6120 #[doc = "Output compare 3 preload enable"]
6121 pub fn set_ocpe(&mut self, n: usize, val: super::vals::Ocpe) {
6122 assert!(n < 2usize);
6123 let offs = 3usize + n * 8usize;
6124 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs);
6125 }
6126 #[doc = "Output compare 3 mode"]
6127 pub fn ocm(&self, n: usize) -> super::vals::Ocm {
6128 assert!(n < 2usize);
6129 let offs = 4usize + n * 8usize;
6130 let val = (self.0 >> offs) & 0x07;
6131 super::vals::Ocm(val as u8)
6132 }
6133 #[doc = "Output compare 3 mode"]
6134 pub fn set_ocm(&mut self, n: usize, val: super::vals::Ocm) {
6135 assert!(n < 2usize);
6136 let offs = 4usize + n * 8usize;
6137 self.0 = (self.0 & !(0x07 << offs)) | (((val.0 as u32) & 0x07) << offs);
6138 }
6139 #[doc = "Output compare 3 clear enable"]
6140 pub fn occe(&self, n: usize) -> bool {
6141 assert!(n < 2usize);
6142 let offs = 7usize + n * 8usize;
6143 let val = (self.0 >> offs) & 0x01;
6144 val != 0
6145 }
6146 #[doc = "Output compare 3 clear enable"]
6147 pub fn set_occe(&mut self, n: usize, val: bool) {
6148 assert!(n < 2usize);
6149 let offs = 7usize + n * 8usize;
6150 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
6151 }
6152 }
6153 impl Default for CcmrOutput {
6154 fn default() -> CcmrOutput {
6155 CcmrOutput(0)
6156 }
6157 }
6158<<<<<<< HEAD
6159 #[doc = "SYSCFG power control register"]
6160 #[repr(transparent)]
6161 #[derive(Copy, Clone, Eq, PartialEq)]
6162 pub struct Pwrcr(pub u32);
6163 impl Pwrcr {
6164 #[doc = "Overdrive enable"]
6165 pub const fn oden(&self) -> u8 {
6166 let val = (self.0 >> 0usize) & 0x0f;
6167 val as u8
6168 }
6169 #[doc = "Overdrive enable"]
6170 pub fn set_oden(&mut self, val: u8) {
6171 self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize);
6172 }
6173 }
6174 impl Default for Pwrcr {
6175 fn default() -> Pwrcr {
6176 Pwrcr(0)
6177 }
6178 }
6179 }
6180}
6181pub mod rng_v1 {
6182 use crate::generic::*;
6183 #[doc = "Random number generator"]
6184 #[derive(Copy, Clone)]
6185 pub struct Rng(pub *mut u8);
6186 unsafe impl Send for Rng {}
6187 unsafe impl Sync for Rng {}
6188 impl Rng {
6189 #[doc = "control register"]
6190 pub fn cr(self) -> Reg<regs::Cr, RW> {
6191 unsafe { Reg::from_ptr(self.0.add(0usize)) }
6192 }
6193 #[doc = "status register"]
6194 pub fn sr(self) -> Reg<regs::Sr, RW> {
6195 unsafe { Reg::from_ptr(self.0.add(4usize)) }
6196 }
6197 #[doc = "data register"]
6198 pub fn dr(self) -> Reg<u32, R> {
6199 unsafe { Reg::from_ptr(self.0.add(8usize)) }
6200 }
6201 }
6202 pub mod regs {
6203 use crate::generic::*;
6204 #[doc = "status register"]
6205 #[repr(transparent)]
6206 #[derive(Copy, Clone, Eq, PartialEq)]
6207 pub struct Sr(pub u32);
6208 impl Sr {
6209 #[doc = "Data ready"]
6210 pub const fn drdy(&self) -> bool {
6211 let val = (self.0 >> 0usize) & 0x01;
6212 val != 0
6213 }
6214 #[doc = "Data ready"]
6215 pub fn set_drdy(&mut self, val: bool) {
6216 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
6217 }
6218 #[doc = "Clock error current status"]
6219 pub const fn cecs(&self) -> bool {
6220 let val = (self.0 >> 1usize) & 0x01;
6221 val != 0
6222 }
6223 #[doc = "Clock error current status"]
6224 pub fn set_cecs(&mut self, val: bool) {
6225 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
6226 }
6227 #[doc = "Seed error current status"]
6228 pub const fn secs(&self) -> bool {
6229 let val = (self.0 >> 2usize) & 0x01;
6230 val != 0
6231 }
6232 #[doc = "Seed error current status"]
6233 pub fn set_secs(&mut self, val: bool) {
6234 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
6235 }
6236 #[doc = "Clock error interrupt status"]
6237 pub const fn ceis(&self) -> bool {
6238 let val = (self.0 >> 5usize) & 0x01;
6239 val != 0
6240 }
6241 #[doc = "Clock error interrupt status"]
6242 pub fn set_ceis(&mut self, val: bool) {
6243 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
6244 }
6245 #[doc = "Seed error interrupt status"]
6246 pub const fn seis(&self) -> bool {
6247 let val = (self.0 >> 6usize) & 0x01;
6248 val != 0
6249 }
6250 #[doc = "Seed error interrupt status"]
6251 pub fn set_seis(&mut self, val: bool) {
6252 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
6253 }
6254 }
6255 impl Default for Sr {
6256 fn default() -> Sr {
6257 Sr(0)
6258 }
6259 }
6260 #[doc = "control register"]
6261 #[repr(transparent)]
6262 #[derive(Copy, Clone, Eq, PartialEq)]
6263 pub struct Cr(pub u32);
6264 impl Cr {
6265 #[doc = "Random number generator enable"]
6266 pub const fn rngen(&self) -> bool {
6267 let val = (self.0 >> 2usize) & 0x01;
6268 val != 0
6269 }
6270 #[doc = "Random number generator enable"]
6271 pub fn set_rngen(&mut self, val: bool) {
6272 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
6273 }
6274 #[doc = "Interrupt enable"]
6275 pub const fn ie(&self) -> bool {
6276 let val = (self.0 >> 3usize) & 0x01;
6277 val != 0
6278 }
6279 #[doc = "Interrupt enable"]
6280 pub fn set_ie(&mut self, val: bool) {
6281 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
6282 }
6283 }
6284 impl Default for Cr {
6285 fn default() -> Cr {
6286 Cr(0)
6287 }
6288 }
6289 }
6290}
6291pub mod usart_v1 {
6292 use crate::generic::*;
6293 #[doc = "Universal synchronous asynchronous receiver transmitter"]
6294 #[derive(Copy, Clone)]
6295 pub struct Usart(pub *mut u8);
6296 unsafe impl Send for Usart {}
6297 unsafe impl Sync for Usart {}
6298 impl Usart {
6299 #[doc = "Status register"]
6300 pub fn sr(self) -> Reg<regs::Sr, RW> {
6301 unsafe { Reg::from_ptr(self.0.add(0usize)) }
6302 }
6303 #[doc = "Data register"]
6304 pub fn dr(self) -> Reg<regs::Dr, RW> {
6305 unsafe { Reg::from_ptr(self.0.add(4usize)) }
6306 }
6307 #[doc = "Baud rate register"]
6308 pub fn brr(self) -> Reg<regs::Brr, RW> {
6309 unsafe { Reg::from_ptr(self.0.add(8usize)) }
6310 }
6311 #[doc = "Control register 1"]
6312 pub fn cr1(self) -> Reg<regs::Cr1, RW> {
6313 unsafe { Reg::from_ptr(self.0.add(12usize)) }
6314 }
6315 #[doc = "Control register 2"]
6316 pub fn cr2(self) -> Reg<regs::Cr2Usart, RW> {
6317 unsafe { Reg::from_ptr(self.0.add(16usize)) }
6318 }
6319 #[doc = "Control register 3"]
6320 pub fn cr3(self) -> Reg<regs::Cr3Usart, RW> {
6321 unsafe { Reg::from_ptr(self.0.add(20usize)) }
6322 }
6323 #[doc = "Guard time and prescaler register"]
6324 pub fn gtpr(self) -> Reg<regs::Gtpr, RW> {
6325 unsafe { Reg::from_ptr(self.0.add(24usize)) }
6326 }
6327 }
6328 #[doc = "Universal asynchronous receiver transmitter"]
6329 #[derive(Copy, Clone)]
6330 pub struct Uart(pub *mut u8);
6331 unsafe impl Send for Uart {}
6332 unsafe impl Sync for Uart {}
6333 impl Uart {
6334 #[doc = "Status register"]
6335 pub fn sr(self) -> Reg<regs::Sr, RW> {
6336 unsafe { Reg::from_ptr(self.0.add(0usize)) }
6337 }
6338 #[doc = "Data register"]
6339 pub fn dr(self) -> Reg<regs::Dr, RW> {
6340 unsafe { Reg::from_ptr(self.0.add(4usize)) }
6341 }
6342 #[doc = "Baud rate register"]
6343 pub fn brr(self) -> Reg<regs::Brr, RW> {
6344 unsafe { Reg::from_ptr(self.0.add(8usize)) }
6345 }
6346 #[doc = "Control register 1"]
6347 pub fn cr1(self) -> Reg<regs::Cr1, RW> {
6348 unsafe { Reg::from_ptr(self.0.add(12usize)) }
6349 }
6350 #[doc = "Control register 2"]
6351 pub fn cr2(self) -> Reg<regs::Cr2, RW> {
6352 unsafe { Reg::from_ptr(self.0.add(16usize)) }
6353 }
6354 #[doc = "Control register 3"]
6355 pub fn cr3(self) -> Reg<regs::Cr3, RW> {
6356 unsafe { Reg::from_ptr(self.0.add(20usize)) }
6357 }
6358 }
6359 pub mod vals {
6360 use crate::generic::*;
6361 #[repr(transparent)]
6362 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6363 pub struct M(pub u8);
6364 impl M {
6365 #[doc = "8 data bits"]
6366 pub const M8: Self = Self(0);
6367 #[doc = "9 data bits"]
6368 pub const M9: Self = Self(0x01);
6369 }
6370 #[repr(transparent)]
6371 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6372 pub struct Cpha(pub u8);
6373 impl Cpha {
6374 #[doc = "The first clock transition is the first data capture edge"]
6375 pub const FIRST: Self = Self(0);
6376 #[doc = "The second clock transition is the first data capture edge"]
6377 pub const SECOND: Self = Self(0x01);
6378 }
6379 #[repr(transparent)]
6380 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6381 pub struct Irlp(pub u8);
6382 impl Irlp {
6383 #[doc = "Normal mode"]
6384 pub const NORMAL: Self = Self(0);
6385 #[doc = "Low-power mode"]
6386 pub const LOWPOWER: Self = Self(0x01);
6387 }
6388 #[repr(transparent)]
6389 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6390 pub struct Lbdl(pub u8);
6391 impl Lbdl {
6392 #[doc = "10-bit break detection"]
6393 pub const LBDL10: Self = Self(0);
6394 #[doc = "11-bit break detection"]
6395 pub const LBDL11: Self = Self(0x01);
6396 }
6397 #[repr(transparent)]
6398 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6399 pub struct Sbk(pub u8);
6400 impl Sbk {
6401 #[doc = "No break character is transmitted"]
6402 pub const NOBREAK: Self = Self(0);
6403 #[doc = "Break character transmitted"]
6404 pub const BREAK: Self = Self(0x01);
6405 }
6406 #[repr(transparent)]
6407 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6408 pub struct Hdsel(pub u8);
6409 impl Hdsel {
6410 #[doc = "Half duplex mode is not selected"]
6411 pub const FULLDUPLEX: Self = Self(0);
6412 #[doc = "Half duplex mode is selected"]
6413 pub const HALFDUPLEX: Self = Self(0x01);
6414 }
6415 #[repr(transparent)]
6416 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6417 pub struct Rwu(pub u8);
6418 impl Rwu {
6419 #[doc = "Receiver in active mode"]
6420 pub const ACTIVE: Self = Self(0);
6421 #[doc = "Receiver in mute mode"]
6422 pub const MUTE: Self = Self(0x01);
6423 }
6424 #[repr(transparent)]
6425 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6426 pub struct Wake(pub u8);
6427 impl Wake {
6428 #[doc = "USART wakeup on idle line"]
6429 pub const IDLELINE: Self = Self(0);
6430 #[doc = "USART wakeup on address mark"]
6431 pub const ADDRESSMARK: Self = Self(0x01);
6432 }
6433 #[repr(transparent)]
6434 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6435 pub struct Stop(pub u8);
6436 impl Stop {
6437 #[doc = "1 stop bit"]
6438 pub const STOP1: Self = Self(0);
6439 #[doc = "0.5 stop bits"]
6440 pub const STOP0P5: Self = Self(0x01);
6441 #[doc = "2 stop bits"]
6442 pub const STOP2: Self = Self(0x02);
6443 #[doc = "1.5 stop bits"]
6444 pub const STOP1P5: Self = Self(0x03);
6445 }
6446 #[repr(transparent)]
6447 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6448 pub struct Ps(pub u8);
6449 impl Ps {
6450 #[doc = "Even parity"]
6451 pub const EVEN: Self = Self(0);
6452 #[doc = "Odd parity"]
6453 pub const ODD: Self = Self(0x01);
6454 }
6455 #[repr(transparent)]
6456 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
6457 pub struct Cpol(pub u8);
6458 impl Cpol {
6459 #[doc = "Steady low value on CK pin outside transmission window"]
6460 pub const LOW: Self = Self(0);
6461 #[doc = "Steady high value on CK pin outside transmission window"]
6462 pub const HIGH: Self = Self(0x01);
6463 }
6464 }
6465 pub mod regs {
6466 use crate::generic::*;
6467 #[doc = "Control register 3"]
6468 #[repr(transparent)]
6469 #[derive(Copy, Clone, Eq, PartialEq)]
6470 pub struct Cr3Usart(pub u32);
6471 impl Cr3Usart {
6472 #[doc = "Error interrupt enable"]
6473 pub const fn eie(&self) -> bool {
6474 let val = (self.0 >> 0usize) & 0x01;
6475 val != 0
6476 }
6477 #[doc = "Error interrupt enable"]
6478 pub fn set_eie(&mut self, val: bool) {
6479 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
6480 }
6481 #[doc = "IrDA mode enable"]
6482 pub const fn iren(&self) -> bool {
6483 let val = (self.0 >> 1usize) & 0x01;
6484 val != 0
6485 }
6486 #[doc = "IrDA mode enable"]
6487 pub fn set_iren(&mut self, val: bool) {
6488 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
6489 }
6490 #[doc = "IrDA low-power"]
6491 pub const fn irlp(&self) -> super::vals::Irlp {
6492 let val = (self.0 >> 2usize) & 0x01;
6493 super::vals::Irlp(val as u8)
6494 }
6495 #[doc = "IrDA low-power"]
6496 pub fn set_irlp(&mut self, val: super::vals::Irlp) {
6497 self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize);
6498 }
6499 #[doc = "Half-duplex selection"]
6500 pub const fn hdsel(&self) -> super::vals::Hdsel {
6501 let val = (self.0 >> 3usize) & 0x01;
6502 super::vals::Hdsel(val as u8)
6503 }
6504 #[doc = "Half-duplex selection"]
6505 pub fn set_hdsel(&mut self, val: super::vals::Hdsel) {
6506 self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize);
6507 }
6508 #[doc = "Smartcard NACK enable"]
6509 pub const fn nack(&self) -> bool {
6510 let val = (self.0 >> 4usize) & 0x01;
6511 val != 0
6512 }
6513 #[doc = "Smartcard NACK enable"]
6514 pub fn set_nack(&mut self, val: bool) {
6515 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
6516 }
6517 #[doc = "Smartcard mode enable"]
6518 pub const fn scen(&self) -> bool {
6519 let val = (self.0 >> 5usize) & 0x01;
6520 val != 0
6521 }
6522 #[doc = "Smartcard mode enable"]
6523 pub fn set_scen(&mut self, val: bool) {
6524 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
6525 }
6526 #[doc = "DMA enable receiver"]
6527 pub const fn dmar(&self) -> bool {
6528 let val = (self.0 >> 6usize) & 0x01;
6529 val != 0
6530 }
6531 #[doc = "DMA enable receiver"]
6532 pub fn set_dmar(&mut self, val: bool) {
6533 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
6534 }
6535 #[doc = "DMA enable transmitter"]
6536 pub const fn dmat(&self) -> bool {
6537 let val = (self.0 >> 7usize) & 0x01;
6538 val != 0
6539 }
6540 #[doc = "DMA enable transmitter"]
6541 pub fn set_dmat(&mut self, val: bool) {
6542 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
6543 }
6544 #[doc = "RTS enable"]
6545 pub const fn rtse(&self) -> bool {
6546 let val = (self.0 >> 8usize) & 0x01;
6547 val != 0
6548 }
6549 #[doc = "RTS enable"]
6550 pub fn set_rtse(&mut self, val: bool) {
6551 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
6552 }
6553 #[doc = "CTS enable"]
6554 pub const fn ctse(&self) -> bool {
6555 let val = (self.0 >> 9usize) & 0x01;
6556 val != 0
6557 }
6558 #[doc = "CTS enable"]
6559 pub fn set_ctse(&mut self, val: bool) {
6560 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
6561 }
6562 #[doc = "CTS interrupt enable"]
6563 pub const fn ctsie(&self) -> bool {
6564 let val = (self.0 >> 10usize) & 0x01;
6565 val != 0
6566 }
6567 #[doc = "CTS interrupt enable"]
6568 pub fn set_ctsie(&mut self, val: bool) {
6569 self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize);
6570 }
6571 }
6572 impl Default for Cr3Usart {
6573 fn default() -> Cr3Usart {
6574 Cr3Usart(0)
6575 }
6576 }
6577 #[doc = "Control register 3"]
6578 #[repr(transparent)]
6579 #[derive(Copy, Clone, Eq, PartialEq)]
6580 pub struct Cr3(pub u32);
6581 impl Cr3 {
6582 #[doc = "Error interrupt enable"]
6583 pub const fn eie(&self) -> bool {
6584 let val = (self.0 >> 0usize) & 0x01;
6585 val != 0
6586 }
6587 #[doc = "Error interrupt enable"]
6588 pub fn set_eie(&mut self, val: bool) {
6589 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
6590 }
6591 #[doc = "IrDA mode enable"]
6592 pub const fn iren(&self) -> bool {
6593 let val = (self.0 >> 1usize) & 0x01;
6594 val != 0
6595 }
6596 #[doc = "IrDA mode enable"]
6597 pub fn set_iren(&mut self, val: bool) {
6598 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
6599 }
6600 #[doc = "IrDA low-power"]
6601 pub const fn irlp(&self) -> super::vals::Irlp {
6602 let val = (self.0 >> 2usize) & 0x01;
6603 super::vals::Irlp(val as u8)
6604 }
6605 #[doc = "IrDA low-power"]
6606 pub fn set_irlp(&mut self, val: super::vals::Irlp) {
6607 self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize);
6608 }
6609 #[doc = "Half-duplex selection"]
6610 pub const fn hdsel(&self) -> super::vals::Hdsel {
6611 let val = (self.0 >> 3usize) & 0x01;
6612 super::vals::Hdsel(val as u8)
6613 }
6614 #[doc = "Half-duplex selection"]
6615 pub fn set_hdsel(&mut self, val: super::vals::Hdsel) {
6616 self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize);
6617 }
6618 #[doc = "DMA enable receiver"]
6619 pub const fn dmar(&self) -> bool {
6620 let val = (self.0 >> 6usize) & 0x01;
6621 val != 0
6622 }
6623 #[doc = "DMA enable receiver"]
6624 pub fn set_dmar(&mut self, val: bool) {
6625 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
6626 }
6627 #[doc = "DMA enable transmitter"]
6628 pub const fn dmat(&self) -> bool {
6629 let val = (self.0 >> 7usize) & 0x01;
6630 val != 0
6631 }
6632 #[doc = "DMA enable transmitter"]
6633 pub fn set_dmat(&mut self, val: bool) {
6634 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
6635 }
6636 }
6637 impl Default for Cr3 {
6638 fn default() -> Cr3 {
6639 Cr3(0)
6640 }
6641 }
6642 #[doc = "Baud rate register"]
6643 #[repr(transparent)]
6644 #[derive(Copy, Clone, Eq, PartialEq)]
6645 pub struct Brr(pub u32);
6646 impl Brr {
6647 #[doc = "fraction of USARTDIV"]
6648 pub const fn div_fraction(&self) -> u8 {
6649 let val = (self.0 >> 0usize) & 0x0f;
6650 val as u8
6651 }
6652 #[doc = "fraction of USARTDIV"]
6653 pub fn set_div_fraction(&mut self, val: u8) {
6654 self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize);
6655 }
6656 #[doc = "mantissa of USARTDIV"]
6657 pub const fn div_mantissa(&self) -> u16 {
6658 let val = (self.0 >> 4usize) & 0x0fff;
6659 val as u16
6660 }
6661 #[doc = "mantissa of USARTDIV"]
6662 pub fn set_div_mantissa(&mut self, val: u16) {
6663 self.0 = (self.0 & !(0x0fff << 4usize)) | (((val as u32) & 0x0fff) << 4usize);
6664 }
6665 }
6666 impl Default for Brr {
6667 fn default() -> Brr {
6668 Brr(0)
6669 }
6670 }
6671 #[doc = "Control register 1"]
6672 #[repr(transparent)]
6673 #[derive(Copy, Clone, Eq, PartialEq)]
6674 pub struct Cr1(pub u32);
6675 impl Cr1 {
6676 #[doc = "Send break"]
6677 pub const fn sbk(&self) -> super::vals::Sbk {
6678 let val = (self.0 >> 0usize) & 0x01;
6679 super::vals::Sbk(val as u8)
6680 }
6681 #[doc = "Send break"]
6682 pub fn set_sbk(&mut self, val: super::vals::Sbk) {
6683 self.0 = (self.0 & !(0x01 << 0usize)) | (((val.0 as u32) & 0x01) << 0usize);
6684 }
6685 #[doc = "Receiver wakeup"]
6686 pub const fn rwu(&self) -> super::vals::Rwu {
6687 let val = (self.0 >> 1usize) & 0x01;
6688 super::vals::Rwu(val as u8)
6689 }
6690 #[doc = "Receiver wakeup"]
6691 pub fn set_rwu(&mut self, val: super::vals::Rwu) {
6692 self.0 = (self.0 & !(0x01 << 1usize)) | (((val.0 as u32) & 0x01) << 1usize);
6693 }
6694 #[doc = "Receiver enable"]
6695 pub const fn re(&self) -> bool {
6696 let val = (self.0 >> 2usize) & 0x01;
6697 val != 0
6698 }
6699 #[doc = "Receiver enable"]
6700 pub fn set_re(&mut self, val: bool) {
6701 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
6702 }
6703 #[doc = "Transmitter enable"]
6704 pub const fn te(&self) -> bool {
6705 let val = (self.0 >> 3usize) & 0x01;
6706 val != 0
6707 }
6708 #[doc = "Transmitter enable"]
6709 pub fn set_te(&mut self, val: bool) {
6710 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
6711 }
6712 #[doc = "IDLE interrupt enable"]
6713 pub const fn idleie(&self) -> bool {
6714 let val = (self.0 >> 4usize) & 0x01;
6715 val != 0
6716 }
6717 #[doc = "IDLE interrupt enable"]
6718 pub fn set_idleie(&mut self, val: bool) {
6719 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
6720 }
6721 #[doc = "RXNE interrupt enable"]
6722 pub const fn rxneie(&self) -> bool {
6723 let val = (self.0 >> 5usize) & 0x01;
6724 val != 0
6725 }
6726 #[doc = "RXNE interrupt enable"]
6727 pub fn set_rxneie(&mut self, val: bool) {
6728 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
6729 }
6730 #[doc = "Transmission complete interrupt enable"]
6731 pub const fn tcie(&self) -> bool {
6732 let val = (self.0 >> 6usize) & 0x01;
6733 val != 0
6734 }
6735 #[doc = "Transmission complete interrupt enable"]
6736 pub fn set_tcie(&mut self, val: bool) {
6737 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
6738 }
6739 #[doc = "TXE interrupt enable"]
6740 pub const fn txeie(&self) -> bool {
6741 let val = (self.0 >> 7usize) & 0x01;
6742 val != 0
6743 }
6744 #[doc = "TXE interrupt enable"]
6745 pub fn set_txeie(&mut self, val: bool) {
6746 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
6747 }
6748 #[doc = "PE interrupt enable"]
6749 pub const fn peie(&self) -> bool {
6750 let val = (self.0 >> 8usize) & 0x01;
6751 val != 0
6752 }
6753 #[doc = "PE interrupt enable"]
6754 pub fn set_peie(&mut self, val: bool) {
6755 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
6756 }
6757 #[doc = "Parity selection"]
6758 pub const fn ps(&self) -> super::vals::Ps {
6759 let val = (self.0 >> 9usize) & 0x01;
6760 super::vals::Ps(val as u8)
6761 }
6762 #[doc = "Parity selection"]
6763 pub fn set_ps(&mut self, val: super::vals::Ps) {
6764 self.0 = (self.0 & !(0x01 << 9usize)) | (((val.0 as u32) & 0x01) << 9usize);
6765 }
6766 #[doc = "Parity control enable"]
6767 pub const fn pce(&self) -> bool {
6768 let val = (self.0 >> 10usize) & 0x01;
6769 val != 0
6770 }
6771 #[doc = "Parity control enable"]
6772 pub fn set_pce(&mut self, val: bool) {
6773 self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize);
6774 }
6775 #[doc = "Wakeup method"]
6776 pub const fn wake(&self) -> super::vals::Wake {
6777 let val = (self.0 >> 11usize) & 0x01;
6778 super::vals::Wake(val as u8)
6779 }
6780 #[doc = "Wakeup method"]
6781 pub fn set_wake(&mut self, val: super::vals::Wake) {
6782 self.0 = (self.0 & !(0x01 << 11usize)) | (((val.0 as u32) & 0x01) << 11usize);
6783 }
6784 #[doc = "Word length"]
6785 pub const fn m(&self) -> super::vals::M {
6786 let val = (self.0 >> 12usize) & 0x01;
6787 super::vals::M(val as u8)
6788 }
6789 #[doc = "Word length"]
6790 pub fn set_m(&mut self, val: super::vals::M) {
6791 self.0 = (self.0 & !(0x01 << 12usize)) | (((val.0 as u32) & 0x01) << 12usize);
6792 }
6793 #[doc = "USART enable"]
6794 pub const fn ue(&self) -> bool {
6795 let val = (self.0 >> 13usize) & 0x01;
6796 val != 0
6797 }
6798 #[doc = "USART enable"]
6799 pub fn set_ue(&mut self, val: bool) {
6800 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize);
6801 }
6802 }
6803 impl Default for Cr1 {
6804 fn default() -> Cr1 {
6805 Cr1(0)
6806 }
6807 }
6808 #[doc = "Guard time and prescaler register"]
6809 #[repr(transparent)]
6810 #[derive(Copy, Clone, Eq, PartialEq)]
6811 pub struct Gtpr(pub u32);
6812 impl Gtpr {
6813 #[doc = "Prescaler value"]
6814 pub const fn psc(&self) -> u8 {
6815 let val = (self.0 >> 0usize) & 0xff;
6816 val as u8
6817 }
6818 #[doc = "Prescaler value"]
6819 pub fn set_psc(&mut self, val: u8) {
6820 self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize);
6821 }
6822 #[doc = "Guard time value"]
6823 pub const fn gt(&self) -> u8 {
6824 let val = (self.0 >> 8usize) & 0xff;
6825 val as u8
6826 }
6827 #[doc = "Guard time value"]
6828 pub fn set_gt(&mut self, val: u8) {
6829 self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize);
6830 }
6831 }
6832 impl Default for Gtpr {
6833 fn default() -> Gtpr {
6834 Gtpr(0)
6835 }
6836 }
6837 #[doc = "Data register"]
6838 #[repr(transparent)]
6839 #[derive(Copy, Clone, Eq, PartialEq)]
6840 pub struct Dr(pub u32);
6841 impl Dr {
6842 #[doc = "Data value"]
6843 pub const fn dr(&self) -> u16 {
6844 let val = (self.0 >> 0usize) & 0x01ff;
6845 val as u16
6846 }
6847 #[doc = "Data value"]
6848 pub fn set_dr(&mut self, val: u16) {
6849 self.0 = (self.0 & !(0x01ff << 0usize)) | (((val as u32) & 0x01ff) << 0usize);
6850 }
6851 }
6852 impl Default for Dr {
6853 fn default() -> Dr {
6854 Dr(0)
6855 }
6856 }
6857 #[doc = "Status register"]
6858 #[repr(transparent)]
6859 #[derive(Copy, Clone, Eq, PartialEq)]
6860 pub struct Sr(pub u32);
6861 impl Sr {
6862 #[doc = "Parity error"]
6863 pub const fn pe(&self) -> bool {
6864 let val = (self.0 >> 0usize) & 0x01;
6865 val != 0
6866 }
6867 #[doc = "Parity error"]
6868 pub fn set_pe(&mut self, val: bool) {
6869 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
6870 }
6871 #[doc = "Framing error"]
6872 pub const fn fe(&self) -> bool {
6873 let val = (self.0 >> 1usize) & 0x01;
6874 val != 0
6875 }
6876 #[doc = "Framing error"]
6877 pub fn set_fe(&mut self, val: bool) {
6878 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
6879 }
6880 #[doc = "Noise error flag"]
6881 pub const fn ne(&self) -> bool {
6882=======
6883 #[doc = "DMA/Interrupt enable register"]
6884 #[repr(transparent)]
6885 #[derive(Copy, Clone, Eq, PartialEq)]
6886 pub struct DierGp(pub u32);
6887 impl DierGp {
6888 #[doc = "Update interrupt enable"]
6889 pub const fn uie(&self) -> bool {
6890 let val = (self.0 >> 0usize) & 0x01;
6891 val != 0
6892 }
6893 #[doc = "Update interrupt enable"]
6894 pub fn set_uie(&mut self, val: bool) {
6895 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
6896 }
6897 #[doc = "Capture/Compare 1 interrupt enable"]
6898 pub fn ccie(&self, n: usize) -> bool {
6899 assert!(n < 4usize);
6900 let offs = 1usize + n * 1usize;
6901 let val = (self.0 >> offs) & 0x01;
6902 val != 0
6903 }
6904 #[doc = "Capture/Compare 1 interrupt enable"]
6905 pub fn set_ccie(&mut self, n: usize, val: bool) {
6906 assert!(n < 4usize);
6907 let offs = 1usize + n * 1usize;
6908 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
6909 }
6910 #[doc = "Trigger interrupt enable"]
6911 pub const fn tie(&self) -> bool {
6912 let val = (self.0 >> 6usize) & 0x01;
6913 val != 0
6914 }
6915 #[doc = "Trigger interrupt enable"]
6916 pub fn set_tie(&mut self, val: bool) {
6917 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
6918 }
6919 #[doc = "Update DMA request enable"]
6920 pub const fn ude(&self) -> bool {
6921 let val = (self.0 >> 8usize) & 0x01;
6922 val != 0
6923 }
6924 #[doc = "Update DMA request enable"]
6925 pub fn set_ude(&mut self, val: bool) {
6926 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
6927 }
6928 #[doc = "Capture/Compare 1 DMA request enable"]
6929 pub fn ccde(&self, n: usize) -> bool {
6930 assert!(n < 4usize);
6931 let offs = 9usize + n * 1usize;
6932 let val = (self.0 >> offs) & 0x01;
6933 val != 0
6934 }
6935 #[doc = "Capture/Compare 1 DMA request enable"]
6936 pub fn set_ccde(&mut self, n: usize, val: bool) {
6937 assert!(n < 4usize);
6938 let offs = 9usize + n * 1usize;
6939 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
6940 }
6941 #[doc = "Trigger DMA request enable"]
6942 pub const fn tde(&self) -> bool {
6943 let val = (self.0 >> 14usize) & 0x01;
6944 val != 0
6945 }
6946 #[doc = "Trigger DMA request enable"]
6947 pub fn set_tde(&mut self, val: bool) {
6948 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize);
6949 }
6950 }
6951 impl Default for DierGp {
6952 fn default() -> DierGp {
6953 DierGp(0)
6954 }
6955 }
6956 #[doc = "control register 2"]
6957 #[repr(transparent)]
6958 #[derive(Copy, Clone, Eq, PartialEq)]
6959 pub struct Cr2Adv(pub u32);
6960 impl Cr2Adv {
6961 #[doc = "Capture/compare preloaded control"]
6962 pub const fn ccpc(&self) -> bool {
6963 let val = (self.0 >> 0usize) & 0x01;
6964 val != 0
6965 }
6966 #[doc = "Capture/compare preloaded control"]
6967 pub fn set_ccpc(&mut self, val: bool) {
6968 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
6969 }
6970 #[doc = "Capture/compare control update selection"]
6971 pub const fn ccus(&self) -> bool {
6972 let val = (self.0 >> 2usize) & 0x01;
6973 val != 0
6974 }
6975 #[doc = "Capture/compare control update selection"]
6976 pub fn set_ccus(&mut self, val: bool) {
6977 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
6978 }
6979 #[doc = "Capture/compare DMA selection"]
6980 pub const fn ccds(&self) -> super::vals::Ccds {
6981 let val = (self.0 >> 3usize) & 0x01;
6982 super::vals::Ccds(val as u8)
6983 }
6984 #[doc = "Capture/compare DMA selection"]
6985 pub fn set_ccds(&mut self, val: super::vals::Ccds) {
6986 self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize);
6987 }
6988 #[doc = "Master mode selection"]
6989 pub const fn mms(&self) -> super::vals::Mms {
6990 let val = (self.0 >> 4usize) & 0x07;
6991 super::vals::Mms(val as u8)
6992 }
6993 #[doc = "Master mode selection"]
6994 pub fn set_mms(&mut self, val: super::vals::Mms) {
6995 self.0 = (self.0 & !(0x07 << 4usize)) | (((val.0 as u32) & 0x07) << 4usize);
6996 }
6997 #[doc = "TI1 selection"]
6998 pub const fn ti1s(&self) -> super::vals::Tis {
6999 let val = (self.0 >> 7usize) & 0x01;
7000 super::vals::Tis(val as u8)
7001 }
7002 #[doc = "TI1 selection"]
7003 pub fn set_ti1s(&mut self, val: super::vals::Tis) {
7004 self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize);
7005 }
7006 #[doc = "Output Idle state 1"]
7007 pub fn ois(&self, n: usize) -> bool {
7008 assert!(n < 4usize);
7009 let offs = 8usize + n * 2usize;
7010 let val = (self.0 >> offs) & 0x01;
7011 val != 0
7012 }
7013 #[doc = "Output Idle state 1"]
7014 pub fn set_ois(&mut self, n: usize, val: bool) {
7015 assert!(n < 4usize);
7016 let offs = 8usize + n * 2usize;
7017 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
7018 }
7019 #[doc = "Output Idle state 1"]
7020 pub const fn ois1n(&self) -> bool {
7021 let val = (self.0 >> 9usize) & 0x01;
7022 val != 0
7023 }
7024 #[doc = "Output Idle state 1"]
7025 pub fn set_ois1n(&mut self, val: bool) {
7026 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
7027 }
7028 #[doc = "Output Idle state 2"]
7029 pub const fn ois2n(&self) -> bool {
7030 let val = (self.0 >> 11usize) & 0x01;
7031 val != 0
7032 }
7033 #[doc = "Output Idle state 2"]
7034 pub fn set_ois2n(&mut self, val: bool) {
7035 self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize);
7036 }
7037 #[doc = "Output Idle state 3"]
7038 pub const fn ois3n(&self) -> bool {
7039 let val = (self.0 >> 13usize) & 0x01;
7040 val != 0
7041 }
7042 #[doc = "Output Idle state 3"]
7043 pub fn set_ois3n(&mut self, val: bool) {
7044 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize);
7045 }
7046 }
7047 impl Default for Cr2Adv {
7048 fn default() -> Cr2Adv {
7049 Cr2Adv(0)
7050 }
7051 }
7052 #[doc = "event generation register"]
7053 #[repr(transparent)]
7054 #[derive(Copy, Clone, Eq, PartialEq)]
7055 pub struct EgrAdv(pub u32);
7056 impl EgrAdv {
7057 #[doc = "Update generation"]
7058 pub const fn ug(&self) -> bool {
7059 let val = (self.0 >> 0usize) & 0x01;
7060 val != 0
7061 }
7062 #[doc = "Update generation"]
7063 pub fn set_ug(&mut self, val: bool) {
7064 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
7065 }
7066 #[doc = "Capture/compare 1 generation"]
7067 pub fn ccg(&self, n: usize) -> bool {
7068 assert!(n < 4usize);
7069 let offs = 1usize + n * 1usize;
7070 let val = (self.0 >> offs) & 0x01;
7071 val != 0
7072 }
7073 #[doc = "Capture/compare 1 generation"]
7074 pub fn set_ccg(&mut self, n: usize, val: bool) {
7075 assert!(n < 4usize);
7076 let offs = 1usize + n * 1usize;
7077 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
7078 }
7079 #[doc = "Capture/Compare control update generation"]
7080 pub const fn comg(&self) -> bool {
7081 let val = (self.0 >> 5usize) & 0x01;
7082 val != 0
7083 }
7084 #[doc = "Capture/Compare control update generation"]
7085 pub fn set_comg(&mut self, val: bool) {
7086 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
7087 }
7088 #[doc = "Trigger generation"]
7089 pub const fn tg(&self) -> bool {
7090 let val = (self.0 >> 6usize) & 0x01;
7091 val != 0
7092 }
7093 #[doc = "Trigger generation"]
7094 pub fn set_tg(&mut self, val: bool) {
7095 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
7096 }
7097 #[doc = "Break generation"]
7098 pub const fn bg(&self) -> bool {
7099 let val = (self.0 >> 7usize) & 0x01;
7100 val != 0
7101 }
7102 #[doc = "Break generation"]
7103 pub fn set_bg(&mut self, val: bool) {
7104 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
7105 }
7106 }
7107 impl Default for EgrAdv {
7108 fn default() -> EgrAdv {
7109 EgrAdv(0)
7110 }
7111 }
7112 #[doc = "slave mode control register"]
7113 #[repr(transparent)]
7114 #[derive(Copy, Clone, Eq, PartialEq)]
7115 pub struct Smcr(pub u32);
7116 impl Smcr {
7117 #[doc = "Slave mode selection"]
7118 pub const fn sms(&self) -> super::vals::Sms {
7119 let val = (self.0 >> 0usize) & 0x07;
7120 super::vals::Sms(val as u8)
7121 }
7122 #[doc = "Slave mode selection"]
7123 pub fn set_sms(&mut self, val: super::vals::Sms) {
7124 self.0 = (self.0 & !(0x07 << 0usize)) | (((val.0 as u32) & 0x07) << 0usize);
7125 }
7126 #[doc = "Trigger selection"]
7127 pub const fn ts(&self) -> super::vals::Ts {
7128 let val = (self.0 >> 4usize) & 0x07;
7129 super::vals::Ts(val as u8)
7130 }
7131 #[doc = "Trigger selection"]
7132 pub fn set_ts(&mut self, val: super::vals::Ts) {
7133 self.0 = (self.0 & !(0x07 << 4usize)) | (((val.0 as u32) & 0x07) << 4usize);
7134 }
7135 #[doc = "Master/Slave mode"]
7136 pub const fn msm(&self) -> super::vals::Msm {
7137 let val = (self.0 >> 7usize) & 0x01;
7138 super::vals::Msm(val as u8)
7139 }
7140 #[doc = "Master/Slave mode"]
7141 pub fn set_msm(&mut self, val: super::vals::Msm) {
7142 self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize);
7143 }
7144 #[doc = "External trigger filter"]
7145 pub const fn etf(&self) -> super::vals::Etf {
7146 let val = (self.0 >> 8usize) & 0x0f;
7147 super::vals::Etf(val as u8)
7148 }
7149 #[doc = "External trigger filter"]
7150 pub fn set_etf(&mut self, val: super::vals::Etf) {
7151 self.0 = (self.0 & !(0x0f << 8usize)) | (((val.0 as u32) & 0x0f) << 8usize);
7152 }
7153 #[doc = "External trigger prescaler"]
7154 pub const fn etps(&self) -> super::vals::Etps {
7155 let val = (self.0 >> 12usize) & 0x03;
7156 super::vals::Etps(val as u8)
7157 }
7158 #[doc = "External trigger prescaler"]
7159 pub fn set_etps(&mut self, val: super::vals::Etps) {
7160 self.0 = (self.0 & !(0x03 << 12usize)) | (((val.0 as u32) & 0x03) << 12usize);
7161 }
7162 #[doc = "External clock enable"]
7163 pub const fn ece(&self) -> super::vals::Ece {
7164 let val = (self.0 >> 14usize) & 0x01;
7165 super::vals::Ece(val as u8)
7166 }
7167 #[doc = "External clock enable"]
7168 pub fn set_ece(&mut self, val: super::vals::Ece) {
7169 self.0 = (self.0 & !(0x01 << 14usize)) | (((val.0 as u32) & 0x01) << 14usize);
7170 }
7171 #[doc = "External trigger polarity"]
7172 pub const fn etp(&self) -> super::vals::Etp {
7173 let val = (self.0 >> 15usize) & 0x01;
7174 super::vals::Etp(val as u8)
7175 }
7176 #[doc = "External trigger polarity"]
7177 pub fn set_etp(&mut self, val: super::vals::Etp) {
7178 self.0 = (self.0 & !(0x01 << 15usize)) | (((val.0 as u32) & 0x01) << 15usize);
7179 }
7180 }
7181 impl Default for Smcr {
7182 fn default() -> Smcr {
7183 Smcr(0)
7184 }
7185 }
7186 #[doc = "event generation register"]
7187 #[repr(transparent)]
7188 #[derive(Copy, Clone, Eq, PartialEq)]
7189 pub struct EgrGp(pub u32);
7190 impl EgrGp {
7191 #[doc = "Update generation"]
7192 pub const fn ug(&self) -> bool {
7193 let val = (self.0 >> 0usize) & 0x01;
7194 val != 0
7195 }
7196 #[doc = "Update generation"]
7197 pub fn set_ug(&mut self, val: bool) {
7198 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
7199 }
7200 #[doc = "Capture/compare 1 generation"]
7201 pub fn ccg(&self, n: usize) -> bool {
7202 assert!(n < 4usize);
7203 let offs = 1usize + n * 1usize;
7204 let val = (self.0 >> offs) & 0x01;
7205 val != 0
7206 }
7207 #[doc = "Capture/compare 1 generation"]
7208 pub fn set_ccg(&mut self, n: usize, val: bool) {
7209 assert!(n < 4usize);
7210 let offs = 1usize + n * 1usize;
7211 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
7212 }
7213 #[doc = "Capture/Compare control update generation"]
7214 pub const fn comg(&self) -> bool {
7215 let val = (self.0 >> 5usize) & 0x01;
7216 val != 0
7217 }
7218 #[doc = "Capture/Compare control update generation"]
7219 pub fn set_comg(&mut self, val: bool) {
7220 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
7221 }
7222 #[doc = "Trigger generation"]
7223 pub const fn tg(&self) -> bool {
7224 let val = (self.0 >> 6usize) & 0x01;
7225 val != 0
7226 }
7227 #[doc = "Trigger generation"]
7228 pub fn set_tg(&mut self, val: bool) {
7229 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
7230 }
7231 #[doc = "Break generation"]
7232 pub const fn bg(&self) -> bool {
7233 let val = (self.0 >> 7usize) & 0x01;
7234 val != 0
7235 }
7236 #[doc = "Break generation"]
7237 pub fn set_bg(&mut self, val: bool) {
7238 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
7239 }
7240 }
7241 impl Default for EgrGp {
7242 fn default() -> EgrGp {
7243 EgrGp(0)
7244 }
7245 }
7246 #[doc = "auto-reload register"]
7247 #[repr(transparent)]
7248 #[derive(Copy, Clone, Eq, PartialEq)]
7249 pub struct Arr16(pub u32);
7250 impl Arr16 {
7251 #[doc = "Auto-reload value"]
7252 pub const fn arr(&self) -> u16 {
7253 let val = (self.0 >> 0usize) & 0xffff;
7254 val as u16
7255 }
7256 #[doc = "Auto-reload value"]
7257 pub fn set_arr(&mut self, val: u16) {
7258 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
7259 }
7260 }
7261 impl Default for Arr16 {
7262 fn default() -> Arr16 {
7263 Arr16(0)
7264 }
7265 }
7266 #[doc = "status register"]
7267 #[repr(transparent)]
7268 #[derive(Copy, Clone, Eq, PartialEq)]
7269 pub struct SrBasic(pub u32);
7270 impl SrBasic {
7271 #[doc = "Update interrupt flag"]
7272 pub const fn uif(&self) -> bool {
7273 let val = (self.0 >> 0usize) & 0x01;
7274 val != 0
7275 }
7276 #[doc = "Update interrupt flag"]
7277 pub fn set_uif(&mut self, val: bool) {
7278 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
7279 }
7280 }
7281 impl Default for SrBasic {
7282 fn default() -> SrBasic {
7283 SrBasic(0)
7284 }
7285 }
7286 #[doc = "repetition counter register"]
7287 #[repr(transparent)]
7288 #[derive(Copy, Clone, Eq, PartialEq)]
7289 pub struct Rcr(pub u32);
7290 impl Rcr {
7291 #[doc = "Repetition counter value"]
7292 pub const fn rep(&self) -> u8 {
7293 let val = (self.0 >> 0usize) & 0xff;
7294 val as u8
7295 }
7296 #[doc = "Repetition counter value"]
7297 pub fn set_rep(&mut self, val: u8) {
7298 self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize);
7299 }
7300 }
7301 impl Default for Rcr {
7302 fn default() -> Rcr {
7303 Rcr(0)
7304 }
7305 }
7306 #[doc = "counter"]
7307 #[repr(transparent)]
7308 #[derive(Copy, Clone, Eq, PartialEq)]
7309 pub struct Cnt16(pub u32);
7310 impl Cnt16 {
7311 #[doc = "counter value"]
7312 pub const fn cnt(&self) -> u16 {
7313 let val = (self.0 >> 0usize) & 0xffff;
7314 val as u16
7315 }
7316 #[doc = "counter value"]
7317 pub fn set_cnt(&mut self, val: u16) {
7318 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
7319 }
7320 }
7321 impl Default for Cnt16 {
7322 fn default() -> Cnt16 {
7323 Cnt16(0)
7324 }
7325 }
7326 #[doc = "status register"]
7327 #[repr(transparent)]
7328 #[derive(Copy, Clone, Eq, PartialEq)]
7329 pub struct SrGp(pub u32);
7330 impl SrGp {
7331 #[doc = "Update interrupt flag"]
7332 pub const fn uif(&self) -> bool {
7333 let val = (self.0 >> 0usize) & 0x01;
7334 val != 0
7335 }
7336 #[doc = "Update interrupt flag"]
7337 pub fn set_uif(&mut self, val: bool) {
7338 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
7339 }
7340 #[doc = "Capture/compare 1 interrupt flag"]
7341 pub fn ccif(&self, n: usize) -> bool {
7342 assert!(n < 4usize);
7343 let offs = 1usize + n * 1usize;
7344 let val = (self.0 >> offs) & 0x01;
7345 val != 0
7346 }
7347 #[doc = "Capture/compare 1 interrupt flag"]
7348 pub fn set_ccif(&mut self, n: usize, val: bool) {
7349 assert!(n < 4usize);
7350 let offs = 1usize + n * 1usize;
7351 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
7352 }
7353 #[doc = "COM interrupt flag"]
7354 pub const fn comif(&self) -> bool {
7355 let val = (self.0 >> 5usize) & 0x01;
7356 val != 0
7357 }
7358 #[doc = "COM interrupt flag"]
7359 pub fn set_comif(&mut self, val: bool) {
7360 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
7361 }
7362 #[doc = "Trigger interrupt flag"]
7363 pub const fn tif(&self) -> bool {
7364 let val = (self.0 >> 6usize) & 0x01;
7365 val != 0
7366 }
7367 #[doc = "Trigger interrupt flag"]
7368 pub fn set_tif(&mut self, val: bool) {
7369 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
7370 }
7371 #[doc = "Break interrupt flag"]
7372 pub const fn bif(&self) -> bool {
7373 let val = (self.0 >> 7usize) & 0x01;
7374 val != 0
7375 }
7376 #[doc = "Break interrupt flag"]
7377 pub fn set_bif(&mut self, val: bool) {
7378 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
7379 }
7380 #[doc = "Capture/Compare 1 overcapture flag"]
7381 pub fn ccof(&self, n: usize) -> bool {
7382 assert!(n < 4usize);
7383 let offs = 9usize + n * 1usize;
7384 let val = (self.0 >> offs) & 0x01;
7385 val != 0
7386 }
7387 #[doc = "Capture/Compare 1 overcapture flag"]
7388 pub fn set_ccof(&mut self, n: usize, val: bool) {
7389 assert!(n < 4usize);
7390 let offs = 9usize + n * 1usize;
7391 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
7392 }
7393 }
7394 impl Default for SrGp {
7395 fn default() -> SrGp {
7396 SrGp(0)
7397 }
7398 }
7399 #[doc = "break and dead-time register"]
7400 #[repr(transparent)]
7401 #[derive(Copy, Clone, Eq, PartialEq)]
7402 pub struct Bdtr(pub u32);
7403 impl Bdtr {
7404 #[doc = "Dead-time generator setup"]
7405 pub const fn dtg(&self) -> u8 {
7406 let val = (self.0 >> 0usize) & 0xff;
7407 val as u8
7408 }
7409 #[doc = "Dead-time generator setup"]
7410 pub fn set_dtg(&mut self, val: u8) {
7411 self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize);
7412 }
7413 #[doc = "Lock configuration"]
7414 pub const fn lock(&self) -> u8 {
7415 let val = (self.0 >> 8usize) & 0x03;
7416 val as u8
7417 }
7418 #[doc = "Lock configuration"]
7419 pub fn set_lock(&mut self, val: u8) {
7420 self.0 = (self.0 & !(0x03 << 8usize)) | (((val as u32) & 0x03) << 8usize);
7421 }
7422 #[doc = "Off-state selection for Idle mode"]
7423 pub const fn ossi(&self) -> super::vals::Ossi {
7424 let val = (self.0 >> 10usize) & 0x01;
7425 super::vals::Ossi(val as u8)
7426 }
7427 #[doc = "Off-state selection for Idle mode"]
7428 pub fn set_ossi(&mut self, val: super::vals::Ossi) {
7429 self.0 = (self.0 & !(0x01 << 10usize)) | (((val.0 as u32) & 0x01) << 10usize);
7430 }
7431 #[doc = "Off-state selection for Run mode"]
7432 pub const fn ossr(&self) -> super::vals::Ossr {
7433 let val = (self.0 >> 11usize) & 0x01;
7434 super::vals::Ossr(val as u8)
7435 }
7436 #[doc = "Off-state selection for Run mode"]
7437 pub fn set_ossr(&mut self, val: super::vals::Ossr) {
7438 self.0 = (self.0 & !(0x01 << 11usize)) | (((val.0 as u32) & 0x01) << 11usize);
7439 }
7440 #[doc = "Break enable"]
7441 pub const fn bke(&self) -> bool {
7442 let val = (self.0 >> 12usize) & 0x01;
7443 val != 0
7444 }
7445 #[doc = "Break enable"]
7446 pub fn set_bke(&mut self, val: bool) {
7447 self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize);
7448 }
7449 #[doc = "Break polarity"]
7450 pub const fn bkp(&self) -> bool {
7451 let val = (self.0 >> 13usize) & 0x01;
7452 val != 0
7453 }
7454 #[doc = "Break polarity"]
7455 pub fn set_bkp(&mut self, val: bool) {
7456 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize);
7457 }
7458 #[doc = "Automatic output enable"]
7459 pub const fn aoe(&self) -> bool {
7460 let val = (self.0 >> 14usize) & 0x01;
7461 val != 0
7462 }
7463 #[doc = "Automatic output enable"]
7464 pub fn set_aoe(&mut self, val: bool) {
7465 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize);
7466 }
7467 #[doc = "Main output enable"]
7468 pub const fn moe(&self) -> bool {
7469 let val = (self.0 >> 15usize) & 0x01;
7470 val != 0
7471 }
7472 #[doc = "Main output enable"]
7473 pub fn set_moe(&mut self, val: bool) {
7474 self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize);
7475 }
7476 }
7477 impl Default for Bdtr {
7478 fn default() -> Bdtr {
7479 Bdtr(0)
7480 }
7481 }
7482 #[doc = "DMA/Interrupt enable register"]
7483 #[repr(transparent)]
7484 #[derive(Copy, Clone, Eq, PartialEq)]
7485 pub struct DierBasic(pub u32);
7486 impl DierBasic {
7487 #[doc = "Update interrupt enable"]
7488 pub const fn uie(&self) -> bool {
7489 let val = (self.0 >> 0usize) & 0x01;
7490 val != 0
7491 }
7492 #[doc = "Update interrupt enable"]
7493 pub fn set_uie(&mut self, val: bool) {
7494 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
7495 }
7496 #[doc = "Update DMA request enable"]
7497 pub const fn ude(&self) -> bool {
7498 let val = (self.0 >> 8usize) & 0x01;
7499 val != 0
7500 }
7501 #[doc = "Update DMA request enable"]
7502 pub fn set_ude(&mut self, val: bool) {
7503 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
7504 }
7505 }
7506 impl Default for DierBasic {
7507 fn default() -> DierBasic {
7508 DierBasic(0)
7509 }
7510 }
7511 #[doc = "capture/compare mode register 1 (input mode)"]
7512 #[repr(transparent)]
7513 #[derive(Copy, Clone, Eq, PartialEq)]
7514 pub struct CcmrInput(pub u32);
7515 impl CcmrInput {
7516 #[doc = "Capture/Compare 1 selection"]
7517 pub fn ccs(&self, n: usize) -> super::vals::CcmrInputCcs {
7518 assert!(n < 2usize);
7519 let offs = 0usize + n * 8usize;
7520 let val = (self.0 >> offs) & 0x03;
7521 super::vals::CcmrInputCcs(val as u8)
7522 }
7523 #[doc = "Capture/Compare 1 selection"]
7524 pub fn set_ccs(&mut self, n: usize, val: super::vals::CcmrInputCcs) {
7525 assert!(n < 2usize);
7526 let offs = 0usize + n * 8usize;
7527 self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs);
7528 }
7529 #[doc = "Input capture 1 prescaler"]
7530 pub fn icpsc(&self, n: usize) -> u8 {
7531 assert!(n < 2usize);
7532 let offs = 2usize + n * 8usize;
7533 let val = (self.0 >> offs) & 0x03;
7534 val as u8
7535 }
7536 #[doc = "Input capture 1 prescaler"]
7537 pub fn set_icpsc(&mut self, n: usize, val: u8) {
7538 assert!(n < 2usize);
7539 let offs = 2usize + n * 8usize;
7540 self.0 = (self.0 & !(0x03 << offs)) | (((val as u32) & 0x03) << offs);
7541 }
7542 #[doc = "Input capture 1 filter"]
7543 pub fn icf(&self, n: usize) -> super::vals::Icf {
7544 assert!(n < 2usize);
7545 let offs = 4usize + n * 8usize;
7546 let val = (self.0 >> offs) & 0x0f;
7547 super::vals::Icf(val as u8)
7548 }
7549 #[doc = "Input capture 1 filter"]
7550 pub fn set_icf(&mut self, n: usize, val: super::vals::Icf) {
7551 assert!(n < 2usize);
7552 let offs = 4usize + n * 8usize;
7553 self.0 = (self.0 & !(0x0f << offs)) | (((val.0 as u32) & 0x0f) << offs);
7554 }
7555 }
7556 impl Default for CcmrInput {
7557 fn default() -> CcmrInput {
7558 CcmrInput(0)
7559 }
7560 }
7561 #[doc = "prescaler"]
7562 #[repr(transparent)]
7563 #[derive(Copy, Clone, Eq, PartialEq)]
7564 pub struct Psc(pub u32);
7565 impl Psc {
7566 #[doc = "Prescaler value"]
7567 pub const fn psc(&self) -> u16 {
7568 let val = (self.0 >> 0usize) & 0xffff;
7569 val as u16
7570 }
7571 #[doc = "Prescaler value"]
7572 pub fn set_psc(&mut self, val: u16) {
7573 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
7574 }
7575 }
7576 impl Default for Psc {
7577 fn default() -> Psc {
7578 Psc(0)
7579 }
7580 }
7581 #[doc = "counter"]
7582 #[repr(transparent)]
7583 #[derive(Copy, Clone, Eq, PartialEq)]
7584 pub struct Cnt32(pub u32);
7585 impl Cnt32 {
7586 #[doc = "counter value"]
7587 pub const fn cnt(&self) -> u32 {
7588 let val = (self.0 >> 0usize) & 0xffff_ffff;
7589 val as u32
7590 }
7591 #[doc = "counter value"]
7592 pub fn set_cnt(&mut self, val: u32) {
7593 self.0 =
7594 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
7595 }
7596 }
7597 impl Default for Cnt32 {
7598 fn default() -> Cnt32 {
7599 Cnt32(0)
7600 }
7601 }
7602 #[doc = "capture/compare register 1"]
7603 #[repr(transparent)]
7604 #[derive(Copy, Clone, Eq, PartialEq)]
7605 pub struct Ccr32(pub u32);
7606 impl Ccr32 {
7607 #[doc = "Capture/Compare 1 value"]
7608 pub const fn ccr(&self) -> u32 {
7609 let val = (self.0 >> 0usize) & 0xffff_ffff;
7610 val as u32
7611 }
7612 #[doc = "Capture/Compare 1 value"]
7613 pub fn set_ccr(&mut self, val: u32) {
7614 self.0 =
7615 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
7616 }
7617 }
7618 impl Default for Ccr32 {
7619 fn default() -> Ccr32 {
7620 Ccr32(0)
7621 }
7622 }
7623 #[doc = "auto-reload register"]
7624 #[repr(transparent)]
7625 #[derive(Copy, Clone, Eq, PartialEq)]
7626 pub struct Arr32(pub u32);
7627 impl Arr32 {
7628 #[doc = "Auto-reload value"]
7629 pub const fn arr(&self) -> u32 {
7630 let val = (self.0 >> 0usize) & 0xffff_ffff;
7631 val as u32
7632 }
7633 #[doc = "Auto-reload value"]
7634 pub fn set_arr(&mut self, val: u32) {
7635 self.0 =
7636 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
7637 }
7638 }
7639 impl Default for Arr32 {
7640 fn default() -> Arr32 {
7641 Arr32(0)
7642 }
7643 }
7644 #[doc = "control register 2"]
7645 #[repr(transparent)]
7646 #[derive(Copy, Clone, Eq, PartialEq)]
7647 pub struct Cr2Gp(pub u32);
7648 impl Cr2Gp {
7649 #[doc = "Capture/compare DMA selection"]
7650 pub const fn ccds(&self) -> super::vals::Ccds {
7651 let val = (self.0 >> 3usize) & 0x01;
7652 super::vals::Ccds(val as u8)
7653 }
7654 #[doc = "Capture/compare DMA selection"]
7655 pub fn set_ccds(&mut self, val: super::vals::Ccds) {
7656 self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize);
7657 }
7658 #[doc = "Master mode selection"]
7659 pub const fn mms(&self) -> super::vals::Mms {
7660 let val = (self.0 >> 4usize) & 0x07;
7661 super::vals::Mms(val as u8)
7662 }
7663 #[doc = "Master mode selection"]
7664 pub fn set_mms(&mut self, val: super::vals::Mms) {
7665 self.0 = (self.0 & !(0x07 << 4usize)) | (((val.0 as u32) & 0x07) << 4usize);
7666 }
7667 #[doc = "TI1 selection"]
7668 pub const fn ti1s(&self) -> super::vals::Tis {
7669 let val = (self.0 >> 7usize) & 0x01;
7670 super::vals::Tis(val as u8)
7671 }
7672 #[doc = "TI1 selection"]
7673 pub fn set_ti1s(&mut self, val: super::vals::Tis) {
7674 self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize);
7675 }
7676 }
7677 impl Default for Cr2Gp {
7678 fn default() -> Cr2Gp {
7679 Cr2Gp(0)
7680 }
7681 }
7682 #[doc = "control register 1"]
7683 #[repr(transparent)]
7684 #[derive(Copy, Clone, Eq, PartialEq)]
7685 pub struct Cr1Basic(pub u32);
7686 impl Cr1Basic {
7687 #[doc = "Counter enable"]
7688 pub const fn cen(&self) -> bool {
7689 let val = (self.0 >> 0usize) & 0x01;
7690 val != 0
7691 }
7692 #[doc = "Counter enable"]
7693 pub fn set_cen(&mut self, val: bool) {
7694 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
7695 }
7696 #[doc = "Update disable"]
7697 pub const fn udis(&self) -> bool {
7698 let val = (self.0 >> 1usize) & 0x01;
7699 val != 0
7700 }
7701 #[doc = "Update disable"]
7702 pub fn set_udis(&mut self, val: bool) {
7703 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
7704 }
7705 #[doc = "Update request source"]
7706 pub const fn urs(&self) -> super::vals::Urs {
7707>>>>>>> Better interrupt handling
7708 let val = (self.0 >> 2usize) & 0x01;
7709 super::vals::Urs(val as u8)
7710 }
7711<<<<<<< HEAD
7712 #[doc = "Noise error flag"]
7713 pub fn set_ne(&mut self, val: bool) {
7714 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
7715 }
7716 #[doc = "Overrun error"]
7717 pub const fn ore(&self) -> bool {
7718 let val = (self.0 >> 3usize) & 0x01;
7719 val != 0
7720 }
7721 #[doc = "Overrun error"]
7722 pub fn set_ore(&mut self, val: bool) {
7723 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
7724 }
7725 #[doc = "IDLE line detected"]
7726 pub const fn idle(&self) -> bool {
7727 let val = (self.0 >> 4usize) & 0x01;
7728 val != 0
7729 }
7730 #[doc = "IDLE line detected"]
7731 pub fn set_idle(&mut self, val: bool) {
7732 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
7733 }
7734 #[doc = "Read data register not empty"]
7735 pub const fn rxne(&self) -> bool {
7736 let val = (self.0 >> 5usize) & 0x01;
7737 val != 0
7738 }
7739 #[doc = "Read data register not empty"]
7740 pub fn set_rxne(&mut self, val: bool) {
7741 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
7742 }
7743 #[doc = "Transmission complete"]
7744 pub const fn tc(&self) -> bool {
7745 let val = (self.0 >> 6usize) & 0x01;
7746 val != 0
7747 }
7748 #[doc = "Transmission complete"]
7749 pub fn set_tc(&mut self, val: bool) {
7750 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
7751 }
7752 #[doc = "Transmit data register empty"]
7753 pub const fn txe(&self) -> bool {
7754 let val = (self.0 >> 7usize) & 0x01;
7755 val != 0
7756 }
7757 #[doc = "Transmit data register empty"]
7758 pub fn set_txe(&mut self, val: bool) {
7759 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
7760 }
7761 #[doc = "LIN break detection flag"]
7762 pub const fn lbd(&self) -> bool {
7763 let val = (self.0 >> 8usize) & 0x01;
7764 val != 0
7765 }
7766 #[doc = "LIN break detection flag"]
7767 pub fn set_lbd(&mut self, val: bool) {
7768 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
7769 }
7770 }
7771 impl Default for Sr {
7772 fn default() -> Sr {
7773 Sr(0)
7774 }
7775 }
7776 #[doc = "Status register"]
7777 #[repr(transparent)]
7778 #[derive(Copy, Clone, Eq, PartialEq)]
7779 pub struct SrUsart(pub u32);
7780 impl SrUsart {
7781 #[doc = "Parity error"]
7782 pub const fn pe(&self) -> bool {
7783 let val = (self.0 >> 0usize) & 0x01;
7784 val != 0
7785 }
7786 #[doc = "Parity error"]
7787 pub fn set_pe(&mut self, val: bool) {
7788 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
7789 }
7790 #[doc = "Framing error"]
7791 pub const fn fe(&self) -> bool {
7792 let val = (self.0 >> 1usize) & 0x01;
7793 val != 0
7794 }
7795 #[doc = "Framing error"]
7796 pub fn set_fe(&mut self, val: bool) {
7797 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
7798 }
7799 #[doc = "Noise error flag"]
7800 pub const fn ne(&self) -> bool {
7801 let val = (self.0 >> 2usize) & 0x01;
7802 val != 0
7803 }
7804 #[doc = "Noise error flag"]
7805 pub fn set_ne(&mut self, val: bool) {
7806 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
7807 }
7808 #[doc = "Overrun error"]
7809 pub const fn ore(&self) -> bool {
7810 let val = (self.0 >> 3usize) & 0x01;
7811 val != 0
7812 }
7813 #[doc = "Overrun error"]
7814 pub fn set_ore(&mut self, val: bool) {
7815 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
7816 }
7817 #[doc = "IDLE line detected"]
7818 pub const fn idle(&self) -> bool {
7819 let val = (self.0 >> 4usize) & 0x01;
7820 val != 0
7821 }
7822 #[doc = "IDLE line detected"]
7823 pub fn set_idle(&mut self, val: bool) {
7824 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
7825 }
7826 #[doc = "Read data register not empty"]
7827 pub const fn rxne(&self) -> bool {
7828 let val = (self.0 >> 5usize) & 0x01;
7829 val != 0
7830 }
7831 #[doc = "Read data register not empty"]
7832 pub fn set_rxne(&mut self, val: bool) {
7833 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
7834 }
7835 #[doc = "Transmission complete"]
7836 pub const fn tc(&self) -> bool {
7837 let val = (self.0 >> 6usize) & 0x01;
7838 val != 0
7839 }
7840 #[doc = "Transmission complete"]
7841 pub fn set_tc(&mut self, val: bool) {
7842 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
7843 }
7844 #[doc = "Transmit data register empty"]
7845 pub const fn txe(&self) -> bool {
7846 let val = (self.0 >> 7usize) & 0x01;
7847 val != 0
7848 }
7849 #[doc = "Transmit data register empty"]
7850 pub fn set_txe(&mut self, val: bool) {
7851 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
7852 }
7853 #[doc = "LIN break detection flag"]
7854 pub const fn lbd(&self) -> bool {
7855 let val = (self.0 >> 8usize) & 0x01;
7856 val != 0
7857 }
7858 #[doc = "LIN break detection flag"]
7859 pub fn set_lbd(&mut self, val: bool) {
7860 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
7861 }
7862 #[doc = "CTS flag"]
7863 pub const fn cts(&self) -> bool {
7864 let val = (self.0 >> 9usize) & 0x01;
7865 val != 0
7866 }
7867 #[doc = "CTS flag"]
7868 pub fn set_cts(&mut self, val: bool) {
7869 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
7870 }
7871 }
7872 impl Default for SrUsart {
7873 fn default() -> SrUsart {
7874 SrUsart(0)
7875 }
7876 }
7877 #[doc = "Control register 2"]
7878 #[repr(transparent)]
7879 #[derive(Copy, Clone, Eq, PartialEq)]
7880 pub struct Cr2(pub u32);
7881 impl Cr2 {
7882 #[doc = "Address of the USART node"]
7883 pub const fn add(&self) -> u8 {
7884 let val = (self.0 >> 0usize) & 0x0f;
7885 val as u8
7886 }
7887 #[doc = "Address of the USART node"]
7888 pub fn set_add(&mut self, val: u8) {
7889 self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize);
7890 }
7891 #[doc = "lin break detection length"]
7892 pub const fn lbdl(&self) -> super::vals::Lbdl {
7893 let val = (self.0 >> 5usize) & 0x01;
7894 super::vals::Lbdl(val as u8)
7895 }
7896 #[doc = "lin break detection length"]
7897 pub fn set_lbdl(&mut self, val: super::vals::Lbdl) {
7898 self.0 = (self.0 & !(0x01 << 5usize)) | (((val.0 as u32) & 0x01) << 5usize);
7899 }
7900 #[doc = "LIN break detection interrupt enable"]
7901 pub const fn lbdie(&self) -> bool {
7902 let val = (self.0 >> 6usize) & 0x01;
7903 val != 0
7904 }
7905 #[doc = "LIN break detection interrupt enable"]
7906 pub fn set_lbdie(&mut self, val: bool) {
7907 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
7908 }
7909 #[doc = "STOP bits"]
7910 pub const fn stop(&self) -> super::vals::Stop {
7911 let val = (self.0 >> 12usize) & 0x03;
7912 super::vals::Stop(val as u8)
7913 }
7914 #[doc = "STOP bits"]
7915 pub fn set_stop(&mut self, val: super::vals::Stop) {
7916 self.0 = (self.0 & !(0x03 << 12usize)) | (((val.0 as u32) & 0x03) << 12usize);
7917 }
7918 #[doc = "LIN mode enable"]
7919 pub const fn linen(&self) -> bool {
7920 let val = (self.0 >> 14usize) & 0x01;
7921 val != 0
7922 }
7923 #[doc = "LIN mode enable"]
7924 pub fn set_linen(&mut self, val: bool) {
7925 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize);
7926 }
7927 }
7928 impl Default for Cr2 {
7929 fn default() -> Cr2 {
7930 Cr2(0)
7931 }
7932 }
7933 #[doc = "Control register 2"]
7934 #[repr(transparent)]
7935 #[derive(Copy, Clone, Eq, PartialEq)]
7936 pub struct Cr2Usart(pub u32);
7937 impl Cr2Usart {
7938 #[doc = "Address of the USART node"]
7939 pub const fn add(&self) -> u8 {
7940 let val = (self.0 >> 0usize) & 0x0f;
7941 val as u8
7942 }
7943 #[doc = "Address of the USART node"]
7944 pub fn set_add(&mut self, val: u8) {
7945 self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize);
7946 }
7947 #[doc = "lin break detection length"]
7948 pub const fn lbdl(&self) -> super::vals::Lbdl {
7949 let val = (self.0 >> 5usize) & 0x01;
7950 super::vals::Lbdl(val as u8)
7951 }
7952 #[doc = "lin break detection length"]
7953 pub fn set_lbdl(&mut self, val: super::vals::Lbdl) {
7954 self.0 = (self.0 & !(0x01 << 5usize)) | (((val.0 as u32) & 0x01) << 5usize);
7955 }
7956 #[doc = "LIN break detection interrupt enable"]
7957 pub const fn lbdie(&self) -> bool {
7958 let val = (self.0 >> 6usize) & 0x01;
7959 val != 0
7960 }
7961 #[doc = "LIN break detection interrupt enable"]
7962 pub fn set_lbdie(&mut self, val: bool) {
7963 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
7964 }
7965 #[doc = "Last bit clock pulse"]
7966 pub const fn lbcl(&self) -> bool {
7967 let val = (self.0 >> 8usize) & 0x01;
7968 val != 0
7969 }
7970 #[doc = "Last bit clock pulse"]
7971 pub fn set_lbcl(&mut self, val: bool) {
7972 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
7973 }
7974 #[doc = "Clock phase"]
7975 pub const fn cpha(&self) -> super::vals::Cpha {
7976 let val = (self.0 >> 9usize) & 0x01;
7977 super::vals::Cpha(val as u8)
7978 }
7979 #[doc = "Clock phase"]
7980 pub fn set_cpha(&mut self, val: super::vals::Cpha) {
7981 self.0 = (self.0 & !(0x01 << 9usize)) | (((val.0 as u32) & 0x01) << 9usize);
7982 }
7983 #[doc = "Clock polarity"]
7984 pub const fn cpol(&self) -> super::vals::Cpol {
7985 let val = (self.0 >> 10usize) & 0x01;
7986 super::vals::Cpol(val as u8)
7987 }
7988 #[doc = "Clock polarity"]
7989 pub fn set_cpol(&mut self, val: super::vals::Cpol) {
7990 self.0 = (self.0 & !(0x01 << 10usize)) | (((val.0 as u32) & 0x01) << 10usize);
7991 }
7992 #[doc = "Clock enable"]
7993 pub const fn clken(&self) -> bool {
7994 let val = (self.0 >> 11usize) & 0x01;
7995 val != 0
7996 }
7997 #[doc = "Clock enable"]
7998 pub fn set_clken(&mut self, val: bool) {
7999 self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize);
8000 }
8001 #[doc = "STOP bits"]
8002 pub const fn stop(&self) -> super::vals::Stop {
8003 let val = (self.0 >> 12usize) & 0x03;
8004 super::vals::Stop(val as u8)
8005 }
8006 #[doc = "STOP bits"]
8007 pub fn set_stop(&mut self, val: super::vals::Stop) {
8008 self.0 = (self.0 & !(0x03 << 12usize)) | (((val.0 as u32) & 0x03) << 12usize);
8009 }
8010 #[doc = "LIN mode enable"]
8011 pub const fn linen(&self) -> bool {
8012 let val = (self.0 >> 14usize) & 0x01;
8013 val != 0
8014 }
8015 #[doc = "LIN mode enable"]
8016 pub fn set_linen(&mut self, val: bool) {
8017 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize);
8018 }
8019 }
8020 impl Default for Cr2Usart {
8021 fn default() -> Cr2Usart {
8022 Cr2Usart(0)
8023 }
8024 }
8025 }
8026}
8027pub mod sdmmc_v2 {
8028 use crate::generic::*;
8029 #[doc = "SDMMC"]
8030 #[derive(Copy, Clone)]
8031 pub struct Sdmmc(pub *mut u8);
8032 unsafe impl Send for Sdmmc {}
8033 unsafe impl Sync for Sdmmc {}
8034 impl Sdmmc {
8035 #[doc = "SDMMC power control register"]
8036 pub fn power(self) -> Reg<regs::Power, RW> {
8037 unsafe { Reg::from_ptr(self.0.add(0usize)) }
8038 }
8039 #[doc = "The SDMMC_CLKCR register controls the SDMMC_CK output clock, the SDMMC_RX_CLK receive clock, and the bus width."]
8040 pub fn clkcr(self) -> Reg<regs::Clkcr, RW> {
8041 unsafe { Reg::from_ptr(self.0.add(4usize)) }
8042 }
8043 #[doc = "The SDMMC_ARGR register contains a 32-bit command argument, which is sent to a card as part of a command message."]
8044 pub fn argr(self) -> Reg<regs::Argr, RW> {
8045 unsafe { Reg::from_ptr(self.0.add(8usize)) }
8046 }
8047 #[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)."]
8048 pub fn cmdr(self) -> Reg<regs::Cmdr, RW> {
8049 unsafe { Reg::from_ptr(self.0.add(12usize)) }
8050 }
8051 #[doc = "SDMMC command response register"]
8052 pub fn respcmdr(self) -> Reg<regs::Respcmdr, R> {
8053 unsafe { Reg::from_ptr(self.0.add(16usize)) }
8054 }
8055 #[doc = "The SDMMC_RESP1/2/3/4R registers contain the status of a card, which is part of the received response."]
8056 pub fn respr(self, n: usize) -> Reg<regs::Resp1r, R> {
8057 assert!(n < 4usize);
8058 unsafe { Reg::from_ptr(self.0.add(20usize + n * 4usize)) }
8059 }
8060 #[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."]
8061 pub fn dtimer(self) -> Reg<regs::Dtimer, RW> {
8062 unsafe { Reg::from_ptr(self.0.add(36usize)) }
8063 }
8064 #[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."]
8065 pub fn dlenr(self) -> Reg<regs::Dlenr, RW> {
8066 unsafe { Reg::from_ptr(self.0.add(40usize)) }
8067 }
8068 #[doc = "The SDMMC_DCTRL register control the data path state machine (DPSM)."]
8069 pub fn dctrl(self) -> Reg<regs::Dctrl, RW> {
8070 unsafe { Reg::from_ptr(self.0.add(44usize)) }
8071 }
8072 #[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."]
8073 pub fn dcntr(self) -> Reg<regs::Dcntr, R> {
8074 unsafe { Reg::from_ptr(self.0.add(48usize)) }
8075 }
8076 #[doc = "The SDMMC_STAR register is a read-only register. It contains two types of flag:Static flags (bits [29,21,11:0]): these bits remain asserted until they are cleared by writing to the SDMMC interrupt Clear register (see SDMMC_ICR)Dynamic flags (bits [20:12]): these bits change state depending on the state of the underlying logic (for example, FIFO full and empty flags are asserted and de-asserted as data while written to the FIFO)"]
8077 pub fn star(self) -> Reg<regs::Star, R> {
8078 unsafe { Reg::from_ptr(self.0.add(52usize)) }
8079 }
8080 #[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."]
8081 pub fn icr(self) -> Reg<regs::Icr, RW> {
8082 unsafe { Reg::from_ptr(self.0.add(56usize)) }
8083 }
8084 #[doc = "The interrupt mask register determines which status flags generate an interrupt request by setting the corresponding bit to 1."]
8085 pub fn maskr(self) -> Reg<regs::Maskr, RW> {
8086 unsafe { Reg::from_ptr(self.0.add(60usize)) }
8087 }
8088 #[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."]
8089 pub fn acktimer(self) -> Reg<regs::Acktimer, RW> {
8090 unsafe { Reg::from_ptr(self.0.add(64usize)) }
8091 }
8092 #[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."]
8093 pub fn idmactrlr(self) -> Reg<regs::Idmactrlr, RW> {
8094 unsafe { Reg::from_ptr(self.0.add(80usize)) }
8095 }
8096 #[doc = "The SDMMC_IDMABSIZER register contains the buffers size when in double buffer configuration."]
8097 pub fn idmabsizer(self) -> Reg<regs::Idmabsizer, RW> {
8098 unsafe { Reg::from_ptr(self.0.add(84usize)) }
8099 }
8100 #[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."]
8101 pub fn idmabase0r(self) -> Reg<regs::Idmabase0r, RW> {
8102 unsafe { Reg::from_ptr(self.0.add(88usize)) }
8103 }
8104 #[doc = "The SDMMC_IDMABASE1R register contains the double buffer configuration second buffer memory base address."]
8105 pub fn idmabase1r(self) -> Reg<regs::Idmabase1r, RW> {
8106 unsafe { Reg::from_ptr(self.0.add(92usize)) }
8107 }
8108 #[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."]
8109 pub fn fifor(self) -> Reg<regs::Fifor, RW> {
8110 unsafe { Reg::from_ptr(self.0.add(128usize)) }
8111 }
8112 #[doc = "SDMMC IP version register"]
8113 pub fn ver(self) -> Reg<regs::Ver, R> {
8114 unsafe { Reg::from_ptr(self.0.add(1012usize)) }
8115 }
8116 #[doc = "SDMMC IP identification register"]
8117 pub fn id(self) -> Reg<regs::Id, R> {
8118 unsafe { Reg::from_ptr(self.0.add(1016usize)) }
8119 }
8120 }
8121 pub mod regs {
8122 use crate::generic::*;
8123 #[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)."]
8124 #[repr(transparent)]
8125 #[derive(Copy, Clone, Eq, PartialEq)]
8126 pub struct Cmdr(pub u32);
8127 impl Cmdr {
8128 #[doc = "Command index. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). The command index is sent to the card as part of a command message."]
8129 pub const fn cmdindex(&self) -> u8 {
8130 let val = (self.0 >> 0usize) & 0x3f;
8131 val as u8
8132 }
8133 #[doc = "Command index. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). The command index is sent to the card as part of a command message."]
8134 pub fn set_cmdindex(&mut self, val: u8) {
8135 self.0 = (self.0 & !(0x3f << 0usize)) | (((val as u32) & 0x3f) << 0usize);
8136 }
8137 #[doc = "The CPSM treats the command as a data transfer command, stops the interrupt period, and signals DataEnable to the DPSM This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). If this bit is set, the CPSM issues an end of interrupt period and issues DataEnable signal to the DPSM when the command is sent."]
8138 pub const fn cmdtrans(&self) -> bool {
8139 let val = (self.0 >> 6usize) & 0x01;
8140 val != 0
8141 }
8142 #[doc = "The CPSM treats the command as a data transfer command, stops the interrupt period, and signals DataEnable to the DPSM This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). If this bit is set, the CPSM issues an end of interrupt period and issues DataEnable signal to the DPSM when the command is sent."]
8143 pub fn set_cmdtrans(&mut self, val: bool) {
8144 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
8145 }
8146 #[doc = "The CPSM treats the command as a Stop Transmission command and signals Abort to the DPSM. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). If this bit is set, the CPSM issues the Abort signal to the DPSM when the command is sent."]
8147 pub const fn cmdstop(&self) -> bool {
8148 let val = (self.0 >> 7usize) & 0x01;
8149 val != 0
8150 }
8151 #[doc = "The CPSM treats the command as a Stop Transmission command and signals Abort to the DPSM. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). If this bit is set, the CPSM issues the Abort signal to the DPSM when the command is sent."]
8152 pub fn set_cmdstop(&mut self, val: bool) {
8153 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
8154 }
8155 #[doc = "Wait for response bits. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). They are used to configure whether the CPSM is to wait for a response, and if yes, which kind of response."]
8156 pub const fn waitresp(&self) -> u8 {
8157 let val = (self.0 >> 8usize) & 0x03;
8158 val as u8
8159 }
8160 #[doc = "Wait for response bits. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). They are used to configure whether the CPSM is to wait for a response, and if yes, which kind of response."]
8161 pub fn set_waitresp(&mut self, val: u8) {
8162 self.0 = (self.0 & !(0x03 << 8usize)) | (((val as u32) & 0x03) << 8usize);
8163 }
8164 #[doc = "CPSM waits for interrupt request. If this bit is set, the CPSM disables command timeout and waits for an card interrupt request (Response). If this bit is cleared in the CPSM Wait state, will cause the abort of the interrupt mode."]
8165 pub const fn waitint(&self) -> bool {
8166 let val = (self.0 >> 10usize) & 0x01;
8167 val != 0
8168 }
8169 #[doc = "CPSM waits for interrupt request. If this bit is set, the CPSM disables command timeout and waits for an card interrupt request (Response). If this bit is cleared in the CPSM Wait state, will cause the abort of the interrupt mode."]
8170 pub fn set_waitint(&mut self, val: bool) {
8171 self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize);
8172 }
8173 #[doc = "CPSM Waits for end of data transfer (CmdPend internal signal) from DPSM. This bit when set, the CPSM waits for the end of data transfer trigger before it starts sending a command. WAITPEND is only taken into account when DTMODE = MMC stream data transfer, WIDBUS = 1-bit wide bus mode, DPSMACT = 1 and DTDIR = from host to card."]
8174 pub const fn waitpend(&self) -> bool {
8175 let val = (self.0 >> 11usize) & 0x01;
8176 val != 0
8177 }
8178 #[doc = "CPSM Waits for end of data transfer (CmdPend internal signal) from DPSM. This bit when set, the CPSM waits for the end of data transfer trigger before it starts sending a command. WAITPEND is only taken into account when DTMODE = MMC stream data transfer, WIDBUS = 1-bit wide bus mode, DPSMACT = 1 and DTDIR = from host to card."]
8179 pub fn set_waitpend(&mut self, val: bool) {
8180 self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize);
8181=======
8182 #[doc = "Update request source"]
8183 pub fn set_urs(&mut self, val: super::vals::Urs) {
8184 self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize);
8185 }
8186 #[doc = "One-pulse mode"]
8187 pub const fn opm(&self) -> super::vals::Opm {
8188 let val = (self.0 >> 3usize) & 0x01;
8189 super::vals::Opm(val as u8)
8190 }
8191 #[doc = "One-pulse mode"]
8192 pub fn set_opm(&mut self, val: super::vals::Opm) {
8193 self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize);
8194 }
8195 #[doc = "Auto-reload preload enable"]
8196 pub const fn arpe(&self) -> super::vals::Arpe {
8197 let val = (self.0 >> 7usize) & 0x01;
8198 super::vals::Arpe(val as u8)
8199 }
8200 #[doc = "Auto-reload preload enable"]
8201 pub fn set_arpe(&mut self, val: super::vals::Arpe) {
8202 self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize);
8203 }
8204 }
8205 impl Default for Cr1Basic {
8206 fn default() -> Cr1Basic {
8207 Cr1Basic(0)
8208 }
8209 }
8210 #[doc = "event generation register"]
8211 #[repr(transparent)]
8212 #[derive(Copy, Clone, Eq, PartialEq)]
8213 pub struct EgrBasic(pub u32);
8214 impl EgrBasic {
8215 #[doc = "Update generation"]
8216 pub const fn ug(&self) -> bool {
8217 let val = (self.0 >> 0usize) & 0x01;
8218 val != 0
8219 }
8220 #[doc = "Update generation"]
8221 pub fn set_ug(&mut self, val: bool) {
8222 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
8223 }
8224 }
8225 impl Default for EgrBasic {
8226 fn default() -> EgrBasic {
8227 EgrBasic(0)
8228 }
8229 }
8230 #[doc = "DMA control register"]
8231 #[repr(transparent)]
8232 #[derive(Copy, Clone, Eq, PartialEq)]
8233 pub struct Dcr(pub u32);
8234 impl Dcr {
8235 #[doc = "DMA base address"]
8236 pub const fn dba(&self) -> u8 {
8237 let val = (self.0 >> 0usize) & 0x1f;
8238 val as u8
8239 }
8240 #[doc = "DMA base address"]
8241 pub fn set_dba(&mut self, val: u8) {
8242 self.0 = (self.0 & !(0x1f << 0usize)) | (((val as u32) & 0x1f) << 0usize);
8243 }
8244 #[doc = "DMA burst length"]
8245 pub const fn dbl(&self) -> u8 {
8246 let val = (self.0 >> 8usize) & 0x1f;
8247 val as u8
8248 }
8249 #[doc = "DMA burst length"]
8250 pub fn set_dbl(&mut self, val: u8) {
8251 self.0 = (self.0 & !(0x1f << 8usize)) | (((val as u32) & 0x1f) << 8usize);
8252 }
8253 }
8254 impl Default for Dcr {
8255 fn default() -> Dcr {
8256 Dcr(0)
8257 }
8258 }
8259 #[doc = "capture/compare enable register"]
8260 #[repr(transparent)]
8261 #[derive(Copy, Clone, Eq, PartialEq)]
8262 pub struct CcerGp(pub u32);
8263 impl CcerGp {
8264 #[doc = "Capture/Compare 1 output enable"]
8265 pub fn cce(&self, n: usize) -> bool {
8266 assert!(n < 4usize);
8267 let offs = 0usize + n * 4usize;
8268 let val = (self.0 >> offs) & 0x01;
8269 val != 0
8270 }
8271 #[doc = "Capture/Compare 1 output enable"]
8272 pub fn set_cce(&mut self, n: usize, val: bool) {
8273 assert!(n < 4usize);
8274 let offs = 0usize + n * 4usize;
8275 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
8276 }
8277 #[doc = "Capture/Compare 1 output Polarity"]
8278 pub fn ccp(&self, n: usize) -> bool {
8279 assert!(n < 4usize);
8280 let offs = 1usize + n * 4usize;
8281 let val = (self.0 >> offs) & 0x01;
8282 val != 0
8283 }
8284 #[doc = "Capture/Compare 1 output Polarity"]
8285 pub fn set_ccp(&mut self, n: usize, val: bool) {
8286 assert!(n < 4usize);
8287 let offs = 1usize + n * 4usize;
8288 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
8289 }
8290 #[doc = "Capture/Compare 1 output Polarity"]
8291 pub fn ccnp(&self, n: usize) -> bool {
8292 assert!(n < 4usize);
8293 let offs = 3usize + n * 4usize;
8294 let val = (self.0 >> offs) & 0x01;
8295 val != 0
8296 }
8297 #[doc = "Capture/Compare 1 output Polarity"]
8298 pub fn set_ccnp(&mut self, n: usize, val: bool) {
8299 assert!(n < 4usize);
8300 let offs = 3usize + n * 4usize;
8301 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
8302 }
8303 }
8304 impl Default for CcerGp {
8305 fn default() -> CcerGp {
8306 CcerGp(0)
8307 }
8308 }
8309 #[doc = "capture/compare enable register"]
8310 #[repr(transparent)]
8311 #[derive(Copy, Clone, Eq, PartialEq)]
8312 pub struct CcerAdv(pub u32);
8313 impl CcerAdv {
8314 #[doc = "Capture/Compare 1 output enable"]
8315 pub fn cce(&self, n: usize) -> bool {
8316 assert!(n < 4usize);
8317 let offs = 0usize + n * 4usize;
8318 let val = (self.0 >> offs) & 0x01;
8319 val != 0
8320 }
8321 #[doc = "Capture/Compare 1 output enable"]
8322 pub fn set_cce(&mut self, n: usize, val: bool) {
8323 assert!(n < 4usize);
8324 let offs = 0usize + n * 4usize;
8325 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
8326 }
8327 #[doc = "Capture/Compare 1 output Polarity"]
8328 pub fn ccp(&self, n: usize) -> bool {
8329 assert!(n < 4usize);
8330 let offs = 1usize + n * 4usize;
8331 let val = (self.0 >> offs) & 0x01;
8332 val != 0
8333 }
8334 #[doc = "Capture/Compare 1 output Polarity"]
8335 pub fn set_ccp(&mut self, n: usize, val: bool) {
8336 assert!(n < 4usize);
8337 let offs = 1usize + n * 4usize;
8338 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
8339 }
8340 #[doc = "Capture/Compare 1 complementary output enable"]
8341 pub fn ccne(&self, n: usize) -> bool {
8342 assert!(n < 4usize);
8343 let offs = 2usize + n * 4usize;
8344 let val = (self.0 >> offs) & 0x01;
8345 val != 0
8346 }
8347 #[doc = "Capture/Compare 1 complementary output enable"]
8348 pub fn set_ccne(&mut self, n: usize, val: bool) {
8349 assert!(n < 4usize);
8350 let offs = 2usize + n * 4usize;
8351 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
8352 }
8353 #[doc = "Capture/Compare 1 output Polarity"]
8354 pub fn ccnp(&self, n: usize) -> bool {
8355 assert!(n < 4usize);
8356 let offs = 3usize + n * 4usize;
8357 let val = (self.0 >> offs) & 0x01;
8358 val != 0
8359 }
8360 #[doc = "Capture/Compare 1 output Polarity"]
8361 pub fn set_ccnp(&mut self, n: usize, val: bool) {
8362 assert!(n < 4usize);
8363 let offs = 3usize + n * 4usize;
8364 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
8365 }
8366 }
8367 impl Default for CcerAdv {
8368 fn default() -> CcerAdv {
8369 CcerAdv(0)
8370 }
8371 }
8372 #[doc = "DMA address for full transfer"]
8373 #[repr(transparent)]
8374 #[derive(Copy, Clone, Eq, PartialEq)]
8375 pub struct Dmar(pub u32);
8376 impl Dmar {
8377 #[doc = "DMA register for burst accesses"]
8378 pub const fn dmab(&self) -> u16 {
8379 let val = (self.0 >> 0usize) & 0xffff;
8380 val as u16
8381 }
8382 #[doc = "DMA register for burst accesses"]
8383 pub fn set_dmab(&mut self, val: u16) {
8384 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
8385 }
8386 }
8387 impl Default for Dmar {
8388 fn default() -> Dmar {
8389 Dmar(0)
8390 }
8391 }
8392 #[doc = "control register 1"]
8393 #[repr(transparent)]
8394 #[derive(Copy, Clone, Eq, PartialEq)]
8395 pub struct Cr1Gp(pub u32);
8396 impl Cr1Gp {
8397 #[doc = "Counter enable"]
8398 pub const fn cen(&self) -> bool {
8399 let val = (self.0 >> 0usize) & 0x01;
8400 val != 0
8401 }
8402 #[doc = "Counter enable"]
8403 pub fn set_cen(&mut self, val: bool) {
8404 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
8405 }
8406 #[doc = "Update disable"]
8407 pub const fn udis(&self) -> bool {
8408 let val = (self.0 >> 1usize) & 0x01;
8409 val != 0
8410 }
8411 #[doc = "Update disable"]
8412 pub fn set_udis(&mut self, val: bool) {
8413 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
8414 }
8415 #[doc = "Update request source"]
8416 pub const fn urs(&self) -> super::vals::Urs {
8417 let val = (self.0 >> 2usize) & 0x01;
8418 super::vals::Urs(val as u8)
8419 }
8420 #[doc = "Update request source"]
8421 pub fn set_urs(&mut self, val: super::vals::Urs) {
8422 self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize);
8423 }
8424 #[doc = "One-pulse mode"]
8425 pub const fn opm(&self) -> super::vals::Opm {
8426 let val = (self.0 >> 3usize) & 0x01;
8427 super::vals::Opm(val as u8)
8428 }
8429 #[doc = "One-pulse mode"]
8430 pub fn set_opm(&mut self, val: super::vals::Opm) {
8431 self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize);
8432 }
8433 #[doc = "Direction"]
8434 pub const fn dir(&self) -> super::vals::Dir {
8435 let val = (self.0 >> 4usize) & 0x01;
8436 super::vals::Dir(val as u8)
8437 }
8438 #[doc = "Direction"]
8439 pub fn set_dir(&mut self, val: super::vals::Dir) {
8440 self.0 = (self.0 & !(0x01 << 4usize)) | (((val.0 as u32) & 0x01) << 4usize);
8441 }
8442 #[doc = "Center-aligned mode selection"]
8443 pub const fn cms(&self) -> super::vals::Cms {
8444 let val = (self.0 >> 5usize) & 0x03;
8445 super::vals::Cms(val as u8)
8446 }
8447 #[doc = "Center-aligned mode selection"]
8448 pub fn set_cms(&mut self, val: super::vals::Cms) {
8449 self.0 = (self.0 & !(0x03 << 5usize)) | (((val.0 as u32) & 0x03) << 5usize);
8450 }
8451 #[doc = "Auto-reload preload enable"]
8452 pub const fn arpe(&self) -> super::vals::Arpe {
8453 let val = (self.0 >> 7usize) & 0x01;
8454 super::vals::Arpe(val as u8)
8455 }
8456 #[doc = "Auto-reload preload enable"]
8457 pub fn set_arpe(&mut self, val: super::vals::Arpe) {
8458 self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize);
8459 }
8460 #[doc = "Clock division"]
8461 pub const fn ckd(&self) -> super::vals::Ckd {
8462 let val = (self.0 >> 8usize) & 0x03;
8463 super::vals::Ckd(val as u8)
8464 }
8465 #[doc = "Clock division"]
8466 pub fn set_ckd(&mut self, val: super::vals::Ckd) {
8467 self.0 = (self.0 & !(0x03 << 8usize)) | (((val.0 as u32) & 0x03) << 8usize);
8468 }
8469 }
8470 impl Default for Cr1Gp {
8471 fn default() -> Cr1Gp {
8472 Cr1Gp(0)
8473 }
8474 }
8475 #[doc = "capture/compare register 1"]
8476 #[repr(transparent)]
8477 #[derive(Copy, Clone, Eq, PartialEq)]
8478 pub struct Ccr16(pub u32);
8479 impl Ccr16 {
8480 #[doc = "Capture/Compare 1 value"]
8481 pub const fn ccr(&self) -> u16 {
8482 let val = (self.0 >> 0usize) & 0xffff;
8483 val as u16
8484 }
8485 #[doc = "Capture/Compare 1 value"]
8486 pub fn set_ccr(&mut self, val: u16) {
8487 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
8488 }
8489 }
8490 impl Default for Ccr16 {
8491 fn default() -> Ccr16 {
8492 Ccr16(0)
8493 }
8494 }
8495 #[doc = "DMA/Interrupt enable register"]
8496 #[repr(transparent)]
8497 #[derive(Copy, Clone, Eq, PartialEq)]
8498 pub struct DierAdv(pub u32);
8499 impl DierAdv {
8500 #[doc = "Update interrupt enable"]
8501 pub const fn uie(&self) -> bool {
8502 let val = (self.0 >> 0usize) & 0x01;
8503 val != 0
8504 }
8505 #[doc = "Update interrupt enable"]
8506 pub fn set_uie(&mut self, val: bool) {
8507 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
8508 }
8509 #[doc = "Capture/Compare 1 interrupt enable"]
8510 pub fn ccie(&self, n: usize) -> bool {
8511 assert!(n < 4usize);
8512 let offs = 1usize + n * 1usize;
8513 let val = (self.0 >> offs) & 0x01;
8514 val != 0
8515 }
8516 #[doc = "Capture/Compare 1 interrupt enable"]
8517 pub fn set_ccie(&mut self, n: usize, val: bool) {
8518 assert!(n < 4usize);
8519 let offs = 1usize + n * 1usize;
8520 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
8521 }
8522 #[doc = "COM interrupt enable"]
8523 pub const fn comie(&self) -> bool {
8524 let val = (self.0 >> 5usize) & 0x01;
8525 val != 0
8526 }
8527 #[doc = "COM interrupt enable"]
8528 pub fn set_comie(&mut self, val: bool) {
8529 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
8530 }
8531 #[doc = "Trigger interrupt enable"]
8532 pub const fn tie(&self) -> bool {
8533 let val = (self.0 >> 6usize) & 0x01;
8534 val != 0
8535 }
8536 #[doc = "Trigger interrupt enable"]
8537 pub fn set_tie(&mut self, val: bool) {
8538 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
8539 }
8540 #[doc = "Break interrupt enable"]
8541 pub const fn bie(&self) -> bool {
8542 let val = (self.0 >> 7usize) & 0x01;
8543 val != 0
8544 }
8545 #[doc = "Break interrupt enable"]
8546 pub fn set_bie(&mut self, val: bool) {
8547 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
8548 }
8549 #[doc = "Update DMA request enable"]
8550 pub const fn ude(&self) -> bool {
8551 let val = (self.0 >> 8usize) & 0x01;
8552 val != 0
8553 }
8554 #[doc = "Update DMA request enable"]
8555 pub fn set_ude(&mut self, val: bool) {
8556 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
8557>>>>>>> Better interrupt handling
8558 }
8559 #[doc = "Capture/Compare 1 DMA request enable"]
8560 pub fn ccde(&self, n: usize) -> bool {
8561 assert!(n < 4usize);
8562 let offs = 9usize + n * 1usize;
8563 let val = (self.0 >> offs) & 0x01;
8564 val != 0
8565 }
8566 #[doc = "Capture/Compare 1 DMA request enable"]
8567 pub fn set_ccde(&mut self, n: usize, val: bool) {
8568 assert!(n < 4usize);
8569 let offs = 9usize + n * 1usize;
8570 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
8571 }
8572 #[doc = "COM DMA request enable"]
8573 pub const fn comde(&self) -> bool {
8574 let val = (self.0 >> 13usize) & 0x01;
8575 val != 0
8576 }
8577 #[doc = "COM DMA request enable"]
8578 pub fn set_comde(&mut self, val: bool) {
8579 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize);
8580 }
8581 #[doc = "Trigger DMA request enable"]
8582 pub const fn tde(&self) -> bool {
8583 let val = (self.0 >> 14usize) & 0x01;
8584 val != 0
8585 }
8586 #[doc = "Trigger DMA request enable"]
8587 pub fn set_tde(&mut self, val: bool) {
8588 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize);
8589 }
8590 }
8591 impl Default for DierAdv {
8592 fn default() -> DierAdv {
8593 DierAdv(0)
8594 }
8595 }
8596<<<<<<< HEAD
8597 #[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."]
8598 #[repr(transparent)]
8599 #[derive(Copy, Clone, Eq, PartialEq)]
8600 pub struct Acktimer(pub u32);
8601 impl Acktimer {
8602 #[doc = "Boot acknowledgment timeout period This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). Boot acknowledgment timeout period expressed in card bus clock periods."]
8603 pub const fn acktime(&self) -> u32 {
8604 let val = (self.0 >> 0usize) & 0x01ff_ffff;
8605 val as u32
8606 }
8607 #[doc = "Boot acknowledgment timeout period This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). Boot acknowledgment timeout period expressed in card bus clock periods."]
8608 pub fn set_acktime(&mut self, val: u32) {
8609 self.0 =
8610 (self.0 & !(0x01ff_ffff << 0usize)) | (((val as u32) & 0x01ff_ffff) << 0usize);
8611 }
8612 }
8613 impl Default for Acktimer {
8614 fn default() -> Acktimer {
8615 Acktimer(0)
8616 }
8617 }
8618 #[doc = "The SDMMC_STAR register is a read-only register. It contains two types of flag:Static flags (bits [29,21,11:0]): these bits remain asserted until they are cleared by writing to the SDMMC interrupt Clear register (see SDMMC_ICR)Dynamic flags (bits [20:12]): these bits change state depending on the state of the underlying logic (for example, FIFO full and empty flags are asserted and de-asserted as data while written to the FIFO)"]
8619 #[repr(transparent)]
8620 #[derive(Copy, Clone, Eq, PartialEq)]
8621 pub struct Star(pub u32);
8622 impl Star {
8623 #[doc = "Command response received (CRC check failed). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
8624 pub const fn ccrcfail(&self) -> bool {
8625 let val = (self.0 >> 0usize) & 0x01;
8626 val != 0
8627 }
8628 #[doc = "Command response received (CRC check failed). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
8629 pub fn set_ccrcfail(&mut self, val: bool) {
8630 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
8631 }
8632 #[doc = "Data block sent/received (CRC check failed). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
8633 pub const fn dcrcfail(&self) -> bool {
8634 let val = (self.0 >> 1usize) & 0x01;
8635 val != 0
8636 }
8637 #[doc = "Data block sent/received (CRC check failed). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
8638 pub fn set_dcrcfail(&mut self, val: bool) {
8639 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
8640 }
8641 #[doc = "Command response timeout. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR. The Command Timeout period has a fixed value of 64 SDMMC_CK clock periods."]
8642 pub const fn ctimeout(&self) -> bool {
8643 let val = (self.0 >> 2usize) & 0x01;
8644 val != 0
8645 }
8646 #[doc = "Command response timeout. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR. The Command Timeout period has a fixed value of 64 SDMMC_CK clock periods."]
8647 pub fn set_ctimeout(&mut self, val: bool) {
8648 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
8649 }
8650 #[doc = "Data timeout. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
8651 pub const fn dtimeout(&self) -> bool {
8652 let val = (self.0 >> 3usize) & 0x01;
8653 val != 0
8654 }
8655 #[doc = "Data timeout. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
8656 pub fn set_dtimeout(&mut self, val: bool) {
8657 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
8658 }
8659 #[doc = "Transmit FIFO underrun error or IDMA read transfer error. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
8660 pub const fn txunderr(&self) -> bool {
8661 let val = (self.0 >> 4usize) & 0x01;
8662 val != 0
8663 }
8664 #[doc = "Transmit FIFO underrun error or IDMA read transfer error. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."]
8665 pub fn set_txunderr(&mut self, val: bool) {
8666 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
8667=======
8668 }
8669 pub mod vals {
8670 use crate::generic::*;
8671 #[repr(transparent)]
8672 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
8673 pub struct Sms(pub u8);
8674 impl Sms {
8675 #[doc = "Slave mode disabled - if CEN = ‘1 then the prescaler is clocked directly by the internal clock."]
8676 pub const DISABLED: Self = Self(0);
8677 #[doc = "Encoder mode 1 - Counter counts up/down on TI2FP1 edge depending on TI1FP2 level."]
8678 pub const ENCODER_MODE_1: Self = Self(0x01);
8679 #[doc = "Encoder mode 2 - Counter counts up/down on TI1FP2 edge depending on TI2FP1 level."]
8680 pub const ENCODER_MODE_2: Self = Self(0x02);
8681 #[doc = "Encoder mode 3 - Counter counts up/down on both TI1FP1 and TI2FP2 edges depending on the level of the other input."]
8682 pub const ENCODER_MODE_3: Self = Self(0x03);
8683 #[doc = "Reset Mode - Rising edge of the selected trigger input (TRGI) reinitializes the counter and generates an update of the registers."]
8684 pub const RESET_MODE: Self = Self(0x04);
8685 #[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."]
8686 pub const GATED_MODE: Self = Self(0x05);
8687 #[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."]
8688 pub const TRIGGER_MODE: Self = Self(0x06);
8689 #[doc = "External Clock Mode 1 - Rising edges of the selected trigger (TRGI) clock the counter."]
8690 pub const EXT_CLOCK_MODE: Self = Self(0x07);
8691 }
8692 #[repr(transparent)]
8693 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
8694 pub struct Ckd(pub u8);
8695 impl Ckd {
8696 #[doc = "t_DTS = t_CK_INT"]
8697 pub const DIV1: Self = Self(0);
8698 #[doc = "t_DTS = 2 × t_CK_INT"]
8699 pub const DIV2: Self = Self(0x01);
8700 #[doc = "t_DTS = 4 × t_CK_INT"]
8701 pub const DIV4: Self = Self(0x02);
8702 }
8703 #[repr(transparent)]
8704 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
8705 pub struct Ocm(pub u8);
8706 impl Ocm {
8707 #[doc = "The comparison between the output compare register TIMx_CCRy and the counter TIMx_CNT has no effect on the outputs"]
8708 pub const FROZEN: Self = Self(0);
8709 #[doc = "Set channel to active level on match. OCyREF signal is forced high when the counter matches the capture/compare register"]
8710 pub const ACTIVEONMATCH: Self = Self(0x01);
8711 #[doc = "Set channel to inactive level on match. OCyREF signal is forced low when the counter matches the capture/compare register"]
8712 pub const INACTIVEONMATCH: Self = Self(0x02);
8713 #[doc = "OCyREF toggles when TIMx_CNT=TIMx_CCRy"]
8714 pub const TOGGLE: Self = Self(0x03);
8715 #[doc = "OCyREF is forced low"]
8716 pub const FORCEINACTIVE: Self = Self(0x04);
8717 #[doc = "OCyREF is forced high"]
8718 pub const FORCEACTIVE: Self = Self(0x05);
8719 #[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"]
8720 pub const PWMMODE1: Self = Self(0x06);
8721 #[doc = "Inversely to PwmMode1"]
8722 pub const PWMMODE2: Self = Self(0x07);
8723 }
8724 #[repr(transparent)]
8725 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
8726 pub struct Opm(pub u8);
8727 impl Opm {
8728 #[doc = "Counter is not stopped at update event"]
8729 pub const DISABLED: Self = Self(0);
8730 #[doc = "Counter stops counting at the next update event (clearing the CEN bit)"]
8731 pub const ENABLED: Self = Self(0x01);
8732 }
8733 #[repr(transparent)]
8734 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
8735 pub struct Cms(pub u8);
8736 impl Cms {
8737 #[doc = "The counter counts up or down depending on the direction bit"]
8738 pub const EDGEALIGNED: Self = Self(0);
8739 #[doc = "The counter counts up and down alternatively. Output compare interrupt flags are set only when the counter is counting down."]
8740 pub const CENTERALIGNED1: Self = Self(0x01);
8741 #[doc = "The counter counts up and down alternatively. Output compare interrupt flags are set only when the counter is counting up."]
8742 pub const CENTERALIGNED2: Self = Self(0x02);
8743 #[doc = "The counter counts up and down alternatively. Output compare interrupt flags are set both when the counter is counting up or down."]
8744 pub const CENTERALIGNED3: Self = Self(0x03);
8745 }
8746 #[repr(transparent)]
8747 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
8748 pub struct Ts(pub u8);
8749 impl Ts {
8750 #[doc = "Internal Trigger 0 (ITR0)"]
8751 pub const ITR0: Self = Self(0);
8752 #[doc = "Internal Trigger 1 (ITR1)"]
8753 pub const ITR1: Self = Self(0x01);
8754 #[doc = "Internal Trigger 2 (ITR2)"]
8755 pub const ITR2: Self = Self(0x02);
8756 #[doc = "TI1 Edge Detector (TI1F_ED)"]
8757 pub const TI1F_ED: Self = Self(0x04);
8758 #[doc = "Filtered Timer Input 1 (TI1FP1)"]
8759 pub const TI1FP1: Self = Self(0x05);
8760 #[doc = "Filtered Timer Input 2 (TI2FP2)"]
8761 pub const TI2FP2: Self = Self(0x06);
8762 #[doc = "External Trigger input (ETRF)"]
8763 pub const ETRF: Self = Self(0x07);
8764 }
8765 #[repr(transparent)]
8766 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
8767 pub struct CcmrInputCcs(pub u8);
8768 impl CcmrInputCcs {
8769 #[doc = "CCx channel is configured as input, normal mapping: ICx mapped to TIx"]
8770 pub const TI4: Self = Self(0x01);
8771 #[doc = "CCx channel is configured as input, alternate mapping (switches 1 with 2, 3 with 4)"]
8772 pub const TI3: Self = Self(0x02);
8773 #[doc = "CCx channel is configured as input, ICx is mapped on TRC"]
8774 pub const TRC: Self = Self(0x03);
8775 }
8776 #[repr(transparent)]
8777 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
8778 pub struct Ossi(pub u8);
8779 impl Ossi {
8780 #[doc = "When inactive, OC/OCN outputs are disabled"]
8781 pub const DISABLED: Self = Self(0);
8782 #[doc = "When inactive, OC/OCN outputs are forced to idle level"]
8783 pub const IDLELEVEL: Self = Self(0x01);
8784 }
8785 #[repr(transparent)]
8786 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
8787 pub struct Dir(pub u8);
8788 impl Dir {
8789 #[doc = "Counter used as upcounter"]
8790 pub const UP: Self = Self(0);
8791 #[doc = "Counter used as downcounter"]
8792 pub const DOWN: Self = Self(0x01);
8793 }
8794 #[repr(transparent)]
8795 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
8796 pub struct CcmrOutputCcs(pub u8);
8797 impl CcmrOutputCcs {
8798 #[doc = "CCx channel is configured as output"]
8799 pub const OUTPUT: Self = Self(0);
8800 }
8801 #[repr(transparent)]
8802 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
8803 pub struct Ossr(pub u8);
8804 impl Ossr {
8805 #[doc = "When inactive, OC/OCN outputs are disabled"]
8806 pub const DISABLED: Self = Self(0);
8807 #[doc = "When inactive, OC/OCN outputs are enabled with their inactive level"]
8808 pub const IDLELEVEL: Self = Self(0x01);
8809 }
8810 #[repr(transparent)]
8811 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
8812 pub struct Etps(pub u8);
8813 impl Etps {
8814 #[doc = "Prescaler OFF"]
8815 pub const DIV1: Self = Self(0);
8816 #[doc = "ETRP frequency divided by 2"]
8817 pub const DIV2: Self = Self(0x01);
8818 #[doc = "ETRP frequency divided by 4"]
8819 pub const DIV4: Self = Self(0x02);
8820 #[doc = "ETRP frequency divided by 8"]
8821 pub const DIV8: Self = Self(0x03);
8822 }
8823 #[repr(transparent)]
8824 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
8825 pub struct Tis(pub u8);
8826 impl Tis {
8827 #[doc = "The TIMx_CH1 pin is connected to TI1 input"]
8828 pub const NORMAL: Self = Self(0);
8829 #[doc = "The TIMx_CH1, CH2, CH3 pins are connected to TI1 input"]
8830 pub const XOR: Self = Self(0x01);
8831 }
8832 #[repr(transparent)]
8833 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
8834 pub struct Etp(pub u8);
8835 impl Etp {
8836 #[doc = "ETR is noninverted, active at high level or rising edge"]
8837 pub const NOTINVERTED: Self = Self(0);
8838 #[doc = "ETR is inverted, active at low level or falling edge"]
8839 pub const INVERTED: Self = Self(0x01);
8840 }
8841 #[repr(transparent)]
8842 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
8843 pub struct Etf(pub u8);
8844 impl Etf {
8845 #[doc = "No filter, sampling is done at fDTS"]
8846 pub const NOFILTER: Self = Self(0);
8847 #[doc = "fSAMPLING=fCK_INT, N=2"]
8848 pub const FCK_INT_N2: Self = Self(0x01);
8849 #[doc = "fSAMPLING=fCK_INT, N=4"]
8850 pub const FCK_INT_N4: Self = Self(0x02);
8851 #[doc = "fSAMPLING=fCK_INT, N=8"]
8852 pub const FCK_INT_N8: Self = Self(0x03);
8853 #[doc = "fSAMPLING=fDTS/2, N=6"]
8854 pub const FDTS_DIV2_N6: Self = Self(0x04);
8855 #[doc = "fSAMPLING=fDTS/2, N=8"]
8856 pub const FDTS_DIV2_N8: Self = Self(0x05);
8857 #[doc = "fSAMPLING=fDTS/4, N=6"]
8858 pub const FDTS_DIV4_N6: Self = Self(0x06);
8859 #[doc = "fSAMPLING=fDTS/4, N=8"]
8860 pub const FDTS_DIV4_N8: Self = Self(0x07);
8861 #[doc = "fSAMPLING=fDTS/8, N=6"]
8862 pub const FDTS_DIV8_N6: Self = Self(0x08);
8863 #[doc = "fSAMPLING=fDTS/8, N=8"]
8864 pub const FDTS_DIV8_N8: Self = Self(0x09);
8865 #[doc = "fSAMPLING=fDTS/16, N=5"]
8866 pub const FDTS_DIV16_N5: Self = Self(0x0a);
8867 #[doc = "fSAMPLING=fDTS/16, N=6"]
8868 pub const FDTS_DIV16_N6: Self = Self(0x0b);
8869 #[doc = "fSAMPLING=fDTS/16, N=8"]
8870 pub const FDTS_DIV16_N8: Self = Self(0x0c);
8871 #[doc = "fSAMPLING=fDTS/32, N=5"]
8872 pub const FDTS_DIV32_N5: Self = Self(0x0d);
8873 #[doc = "fSAMPLING=fDTS/32, N=6"]
8874 pub const FDTS_DIV32_N6: Self = Self(0x0e);
8875 #[doc = "fSAMPLING=fDTS/32, N=8"]
8876 pub const FDTS_DIV32_N8: Self = Self(0x0f);
8877 }
8878 #[repr(transparent)]
8879 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
8880 pub struct Mms(pub u8);
8881 impl Mms {
8882 #[doc = "The UG bit from the TIMx_EGR register is used as trigger output"]
8883 pub const RESET: Self = Self(0);
8884 #[doc = "The counter enable signal, CNT_EN, is used as trigger output"]
8885 pub const ENABLE: Self = Self(0x01);
8886 #[doc = "The update event is selected as trigger output"]
8887 pub const UPDATE: Self = Self(0x02);
8888 #[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"]
8889 pub const COMPAREPULSE: Self = Self(0x03);
8890 #[doc = "OC1REF signal is used as trigger output"]
8891 pub const COMPAREOC1: Self = Self(0x04);
8892 #[doc = "OC2REF signal is used as trigger output"]
8893 pub const COMPAREOC2: Self = Self(0x05);
8894 #[doc = "OC3REF signal is used as trigger output"]
8895 pub const COMPAREOC3: Self = Self(0x06);
8896 #[doc = "OC4REF signal is used as trigger output"]
8897 pub const COMPAREOC4: Self = Self(0x07);
8898 }
8899 #[repr(transparent)]
8900 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
8901 pub struct Msm(pub u8);
8902 impl Msm {
8903 #[doc = "No action"]
8904 pub const NOSYNC: Self = Self(0);
8905 #[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."]
8906 pub const SYNC: Self = Self(0x01);
8907 }
8908 #[repr(transparent)]
8909 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
8910 pub struct Ece(pub u8);
8911 impl Ece {
8912 #[doc = "External clock mode 2 disabled"]
8913 pub const DISABLED: Self = Self(0);
8914 #[doc = "External clock mode 2 enabled. The counter is clocked by any active edge on the ETRF signal."]
8915 pub const ENABLED: Self = Self(0x01);
8916 }
8917 #[repr(transparent)]
8918 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
8919 pub struct Ocpe(pub u8);
8920 impl Ocpe {
8921 #[doc = "Preload register on CCR2 disabled. New values written to CCR2 are taken into account immediately"]
8922 pub const DISABLED: Self = Self(0);
8923 #[doc = "Preload register on CCR2 enabled. Preload value is loaded into active register on each update event"]
8924 pub const ENABLED: Self = Self(0x01);
8925 }
8926 #[repr(transparent)]
8927 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
8928 pub struct Arpe(pub u8);
8929 impl Arpe {
8930 #[doc = "TIMx_APRR register is not buffered"]
8931 pub const DISABLED: Self = Self(0);
8932 #[doc = "TIMx_APRR register is buffered"]
8933 pub const ENABLED: Self = Self(0x01);
8934 }
8935 #[repr(transparent)]
8936 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
8937 pub struct Icf(pub u8);
8938 impl Icf {
8939 #[doc = "No filter, sampling is done at fDTS"]
8940 pub const NOFILTER: Self = Self(0);
8941 #[doc = "fSAMPLING=fCK_INT, N=2"]
8942 pub const FCK_INT_N2: Self = Self(0x01);
8943 #[doc = "fSAMPLING=fCK_INT, N=4"]
8944 pub const FCK_INT_N4: Self = Self(0x02);
8945 #[doc = "fSAMPLING=fCK_INT, N=8"]
8946 pub const FCK_INT_N8: Self = Self(0x03);
8947 #[doc = "fSAMPLING=fDTS/2, N=6"]
8948 pub const FDTS_DIV2_N6: Self = Self(0x04);
8949 #[doc = "fSAMPLING=fDTS/2, N=8"]
8950 pub const FDTS_DIV2_N8: Self = Self(0x05);
8951 #[doc = "fSAMPLING=fDTS/4, N=6"]
8952 pub const FDTS_DIV4_N6: Self = Self(0x06);
8953 #[doc = "fSAMPLING=fDTS/4, N=8"]
8954 pub const FDTS_DIV4_N8: Self = Self(0x07);
8955 #[doc = "fSAMPLING=fDTS/8, N=6"]
8956 pub const FDTS_DIV8_N6: Self = Self(0x08);
8957 #[doc = "fSAMPLING=fDTS/8, N=8"]
8958 pub const FDTS_DIV8_N8: Self = Self(0x09);
8959 #[doc = "fSAMPLING=fDTS/16, N=5"]
8960 pub const FDTS_DIV16_N5: Self = Self(0x0a);
8961 #[doc = "fSAMPLING=fDTS/16, N=6"]
8962 pub const FDTS_DIV16_N6: Self = Self(0x0b);
8963 #[doc = "fSAMPLING=fDTS/16, N=8"]
8964 pub const FDTS_DIV16_N8: Self = Self(0x0c);
8965 #[doc = "fSAMPLING=fDTS/32, N=5"]
8966 pub const FDTS_DIV32_N5: Self = Self(0x0d);
8967 #[doc = "fSAMPLING=fDTS/32, N=6"]
8968 pub const FDTS_DIV32_N6: Self = Self(0x0e);
8969 #[doc = "fSAMPLING=fDTS/32, N=8"]
8970 pub const FDTS_DIV32_N8: Self = Self(0x0f);
8971 }
8972 #[repr(transparent)]
8973 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
8974 pub struct Urs(pub u8);
8975 impl Urs {
8976 #[doc = "Any of counter overflow/underflow, setting UG, or update through slave mode, generates an update interrupt or DMA request"]
8977 pub const ANYEVENT: Self = Self(0);
8978 #[doc = "Only counter overflow/underflow generates an update interrupt or DMA request"]
8979 pub const COUNTERONLY: Self = Self(0x01);
8980 }
8981 #[repr(transparent)]
8982 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
8983 pub struct Ccds(pub u8);
8984 impl Ccds {
8985 #[doc = "CCx DMA request sent when CCx event occurs"]
8986 pub const ONCOMPARE: Self = Self(0);
8987 #[doc = "CCx DMA request sent when update event occurs"]
8988 pub const ONUPDATE: Self = Self(0x01);
8989 }
8990 }
8991}
8992pub mod syscfg_l4 {
8993 use crate::generic::*;
8994 #[doc = "System configuration controller"]
8995 #[derive(Copy, Clone)]
8996 pub struct Syscfg(pub *mut u8);
8997 unsafe impl Send for Syscfg {}
8998 unsafe impl Sync for Syscfg {}
8999 impl Syscfg {
9000 #[doc = "memory remap register"]
9001 pub fn memrmp(self) -> Reg<regs::Memrmp, RW> {
9002 unsafe { Reg::from_ptr(self.0.add(0usize)) }
9003 }
9004 #[doc = "configuration register 1"]
9005 pub fn cfgr1(self) -> Reg<regs::Cfgr1, RW> {
9006 unsafe { Reg::from_ptr(self.0.add(4usize)) }
9007 }
9008 #[doc = "external interrupt configuration register 1"]
9009 pub fn exticr(self, n: usize) -> Reg<regs::Exticr, RW> {
9010 assert!(n < 4usize);
9011 unsafe { Reg::from_ptr(self.0.add(8usize + n * 4usize)) }
9012 }
9013 #[doc = "SCSR"]
9014 pub fn scsr(self) -> Reg<regs::Scsr, RW> {
9015 unsafe { Reg::from_ptr(self.0.add(24usize)) }
9016 }
9017 #[doc = "CFGR2"]
9018 pub fn cfgr2(self) -> Reg<regs::Cfgr2, RW> {
9019 unsafe { Reg::from_ptr(self.0.add(28usize)) }
9020 }
9021 #[doc = "SWPR"]
9022 pub fn swpr(self) -> Reg<regs::Swpr, W> {
9023 unsafe { Reg::from_ptr(self.0.add(32usize)) }
9024 }
9025 #[doc = "SKR"]
9026 pub fn skr(self) -> Reg<regs::Skr, W> {
9027 unsafe { Reg::from_ptr(self.0.add(36usize)) }
9028 }
9029 }
9030 pub mod regs {
9031 use crate::generic::*;
9032 #[doc = "SWPR"]
9033 #[repr(transparent)]
9034 #[derive(Copy, Clone, Eq, PartialEq)]
9035 pub struct Swpr(pub u32);
9036 impl Swpr {
9037 #[doc = "SRAWM2 write protection."]
9038 pub fn pwp(&self, n: usize) -> bool {
9039 assert!(n < 32usize);
9040 let offs = 0usize + n * 1usize;
9041 let val = (self.0 >> offs) & 0x01;
9042 val != 0
9043 }
9044 #[doc = "SRAWM2 write protection."]
9045 pub fn set_pwp(&mut self, n: usize, val: bool) {
9046 assert!(n < 32usize);
9047 let offs = 0usize + n * 1usize;
9048 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
9049 }
9050 }
9051 impl Default for Swpr {
9052 fn default() -> Swpr {
9053 Swpr(0)
9054 }
9055 }
9056 #[doc = "SCSR"]
9057 #[repr(transparent)]
9058 #[derive(Copy, Clone, Eq, PartialEq)]
9059 pub struct Scsr(pub u32);
9060 impl Scsr {
9061 #[doc = "SRAM2 Erase"]
9062 pub const fn sram2er(&self) -> bool {
9063 let val = (self.0 >> 0usize) & 0x01;
9064 val != 0
9065 }
9066 #[doc = "SRAM2 Erase"]
9067 pub fn set_sram2er(&mut self, val: bool) {
9068 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
9069 }
9070 #[doc = "SRAM2 busy by erase operation"]
9071 pub const fn sram2bsy(&self) -> bool {
9072 let val = (self.0 >> 1usize) & 0x01;
9073 val != 0
9074 }
9075 #[doc = "SRAM2 busy by erase operation"]
9076 pub fn set_sram2bsy(&mut self, val: bool) {
9077 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
9078 }
9079 }
9080 impl Default for Scsr {
9081 fn default() -> Scsr {
9082 Scsr(0)
9083 }
9084 }
9085 #[doc = "configuration register 1"]
9086 #[repr(transparent)]
9087 #[derive(Copy, Clone, Eq, PartialEq)]
9088 pub struct Cfgr1(pub u32);
9089 impl Cfgr1 {
9090 #[doc = "Firewall disable"]
9091 pub const fn fwdis(&self) -> bool {
9092 let val = (self.0 >> 0usize) & 0x01;
9093 val != 0
9094 }
9095 #[doc = "Firewall disable"]
9096 pub fn set_fwdis(&mut self, val: bool) {
9097 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
9098 }
9099 #[doc = "I/O analog switch voltage booster enable"]
9100 pub const fn boosten(&self) -> bool {
9101 let val = (self.0 >> 8usize) & 0x01;
9102 val != 0
9103 }
9104 #[doc = "I/O analog switch voltage booster enable"]
9105 pub fn set_boosten(&mut self, val: bool) {
9106 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
9107 }
9108 #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB6"]
9109 pub const fn i2c_pb6_fmp(&self) -> bool {
9110 let val = (self.0 >> 16usize) & 0x01;
9111 val != 0
9112 }
9113 #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB6"]
9114 pub fn set_i2c_pb6_fmp(&mut self, val: bool) {
9115 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
9116 }
9117 #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB7"]
9118 pub const fn i2c_pb7_fmp(&self) -> bool {
9119 let val = (self.0 >> 17usize) & 0x01;
9120 val != 0
9121 }
9122 #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB7"]
9123 pub fn set_i2c_pb7_fmp(&mut self, val: bool) {
9124 self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize);
9125 }
9126 #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB8"]
9127 pub const fn i2c_pb8_fmp(&self) -> bool {
9128 let val = (self.0 >> 18usize) & 0x01;
9129 val != 0
9130 }
9131 #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB8"]
9132 pub fn set_i2c_pb8_fmp(&mut self, val: bool) {
9133 self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize);
9134 }
9135 #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB9"]
9136 pub const fn i2c_pb9_fmp(&self) -> bool {
9137 let val = (self.0 >> 19usize) & 0x01;
9138 val != 0
9139 }
9140 #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB9"]
9141 pub fn set_i2c_pb9_fmp(&mut self, val: bool) {
9142 self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize);
9143 }
9144 #[doc = "I2C1 Fast-mode Plus driving capability activation"]
9145 pub const fn i2c1_fmp(&self) -> bool {
9146 let val = (self.0 >> 20usize) & 0x01;
9147 val != 0
9148 }
9149 #[doc = "I2C1 Fast-mode Plus driving capability activation"]
9150 pub fn set_i2c1_fmp(&mut self, val: bool) {
9151 self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize);
9152 }
9153 #[doc = "I2C2 Fast-mode Plus driving capability activation"]
9154 pub const fn i2c2_fmp(&self) -> bool {
9155 let val = (self.0 >> 21usize) & 0x01;
9156 val != 0
9157 }
9158 #[doc = "I2C2 Fast-mode Plus driving capability activation"]
9159 pub fn set_i2c2_fmp(&mut self, val: bool) {
9160 self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize);
9161 }
9162 #[doc = "I2C3 Fast-mode Plus driving capability activation"]
9163 pub const fn i2c3_fmp(&self) -> bool {
9164 let val = (self.0 >> 22usize) & 0x01;
9165 val != 0
9166 }
9167 #[doc = "I2C3 Fast-mode Plus driving capability activation"]
9168 pub fn set_i2c3_fmp(&mut self, val: bool) {
9169 self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize);
9170 }
9171 #[doc = "Floating Point Unit interrupts enable bits"]
9172 pub const fn fpu_ie(&self) -> u8 {
9173 let val = (self.0 >> 26usize) & 0x3f;
9174 val as u8
9175 }
9176 #[doc = "Floating Point Unit interrupts enable bits"]
9177 pub fn set_fpu_ie(&mut self, val: u8) {
9178 self.0 = (self.0 & !(0x3f << 26usize)) | (((val as u32) & 0x3f) << 26usize);
9179 }
9180 }
9181 impl Default for Cfgr1 {
9182 fn default() -> Cfgr1 {
9183 Cfgr1(0)
9184 }
9185 }
9186 #[doc = "CFGR2"]
9187 #[repr(transparent)]
9188 #[derive(Copy, Clone, Eq, PartialEq)]
9189 pub struct Cfgr2(pub u32);
9190 impl Cfgr2 {
9191 #[doc = "Cortex LOCKUP (Hardfault) output enable bit"]
9192 pub const fn cll(&self) -> bool {
9193 let val = (self.0 >> 0usize) & 0x01;
9194 val != 0
9195 }
9196 #[doc = "Cortex LOCKUP (Hardfault) output enable bit"]
9197 pub fn set_cll(&mut self, val: bool) {
9198 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
9199 }
9200 #[doc = "SRAM2 parity lock bit"]
9201 pub const fn spl(&self) -> bool {
9202 let val = (self.0 >> 1usize) & 0x01;
9203 val != 0
9204 }
9205 #[doc = "SRAM2 parity lock bit"]
9206 pub fn set_spl(&mut self, val: bool) {
9207 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
9208 }
9209 #[doc = "PVD lock enable bit"]
9210 pub const fn pvdl(&self) -> bool {
9211 let val = (self.0 >> 2usize) & 0x01;
9212 val != 0
9213 }
9214 #[doc = "PVD lock enable bit"]
9215 pub fn set_pvdl(&mut self, val: bool) {
9216 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
9217 }
9218 #[doc = "ECC Lock"]
9219 pub const fn eccl(&self) -> bool {
9220 let val = (self.0 >> 3usize) & 0x01;
9221 val != 0
9222 }
9223 #[doc = "ECC Lock"]
9224 pub fn set_eccl(&mut self, val: bool) {
9225 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
9226 }
9227 #[doc = "SRAM2 parity error flag"]
9228 pub const fn spf(&self) -> bool {
9229 let val = (self.0 >> 8usize) & 0x01;
9230 val != 0
9231 }
9232 #[doc = "SRAM2 parity error flag"]
9233 pub fn set_spf(&mut self, val: bool) {
9234 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
9235 }
9236 }
9237 impl Default for Cfgr2 {
9238 fn default() -> Cfgr2 {
9239 Cfgr2(0)
9240 }
9241 }
9242 #[doc = "external interrupt configuration register 4"]
9243 #[repr(transparent)]
9244 #[derive(Copy, Clone, Eq, PartialEq)]
9245 pub struct Exticr(pub u32);
9246 impl Exticr {
9247 #[doc = "EXTI12 configuration bits"]
9248 pub fn exti(&self, n: usize) -> u8 {
9249 assert!(n < 4usize);
9250 let offs = 0usize + n * 4usize;
9251 let val = (self.0 >> offs) & 0x0f;
9252 val as u8
9253 }
9254 #[doc = "EXTI12 configuration bits"]
9255 pub fn set_exti(&mut self, n: usize, val: u8) {
9256 assert!(n < 4usize);
9257 let offs = 0usize + n * 4usize;
9258 self.0 = (self.0 & !(0x0f << offs)) | (((val as u32) & 0x0f) << offs);
9259 }
9260 }
9261 impl Default for Exticr {
9262 fn default() -> Exticr {
9263 Exticr(0)
9264 }
9265 }
9266 #[doc = "memory remap register"]
9267 #[repr(transparent)]
9268 #[derive(Copy, Clone, Eq, PartialEq)]
9269 pub struct Memrmp(pub u32);
9270 impl Memrmp {
9271 #[doc = "Memory mapping selection"]
9272 pub const fn mem_mode(&self) -> u8 {
9273 let val = (self.0 >> 0usize) & 0x07;
9274 val as u8
9275 }
9276 #[doc = "Memory mapping selection"]
9277 pub fn set_mem_mode(&mut self, val: u8) {
9278 self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize);
9279 }
9280 #[doc = "QUADSPI memory mapping swap"]
9281 pub const fn qfs(&self) -> bool {
9282 let val = (self.0 >> 3usize) & 0x01;
9283 val != 0
9284 }
9285 #[doc = "QUADSPI memory mapping swap"]
9286 pub fn set_qfs(&mut self, val: bool) {
9287 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
9288 }
9289 #[doc = "Flash Bank mode selection"]
9290 pub const fn fb_mode(&self) -> bool {
9291 let val = (self.0 >> 8usize) & 0x01;
9292 val != 0
9293 }
9294 #[doc = "Flash Bank mode selection"]
9295 pub fn set_fb_mode(&mut self, val: bool) {
9296 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
9297 }
9298 }
9299 impl Default for Memrmp {
9300 fn default() -> Memrmp {
9301 Memrmp(0)
9302 }
9303 }
9304 #[doc = "SKR"]
9305 #[repr(transparent)]
9306 #[derive(Copy, Clone, Eq, PartialEq)]
9307 pub struct Skr(pub u32);
9308 impl Skr {
9309 #[doc = "SRAM2 write protection key for software erase"]
9310 pub const fn key(&self) -> u8 {
9311 let val = (self.0 >> 0usize) & 0xff;
9312 val as u8
9313 }
9314 #[doc = "SRAM2 write protection key for software erase"]
9315 pub fn set_key(&mut self, val: u8) {
9316 self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize);
9317 }
9318 }
9319 impl Default for Skr {
9320 fn default() -> Skr {
9321 Skr(0)
1467 } 9322 }
1468 } 9323 }
1469 } 9324 }
1470} 9325}
9326pub mod rng_v1 {
9327 use crate::generic::*;
9328 #[doc = "Random number generator"]
9329 #[derive(Copy, Clone)]
9330 pub struct Rng(pub *mut u8);
9331 unsafe impl Send for Rng {}
9332 unsafe impl Sync for Rng {}
9333 impl Rng {
9334 #[doc = "control register"]
9335 pub fn cr(self) -> Reg<regs::Cr, RW> {
9336 unsafe { Reg::from_ptr(self.0.add(0usize)) }
9337 }
9338 #[doc = "status register"]
9339 pub fn sr(self) -> Reg<regs::Sr, RW> {
9340 unsafe { Reg::from_ptr(self.0.add(4usize)) }
9341 }
9342 #[doc = "data register"]
9343 pub fn dr(self) -> Reg<u32, R> {
9344 unsafe { Reg::from_ptr(self.0.add(8usize)) }
9345 }
9346 }
9347 pub mod regs {
9348 use crate::generic::*;
9349 #[doc = "control register"]
9350 #[repr(transparent)]
9351 #[derive(Copy, Clone, Eq, PartialEq)]
9352 pub struct Cr(pub u32);
9353 impl Cr {
9354 #[doc = "Random number generator enable"]
9355 pub const fn rngen(&self) -> bool {
9356 let val = (self.0 >> 2usize) & 0x01;
9357 val != 0
9358 }
9359 #[doc = "Random number generator enable"]
9360 pub fn set_rngen(&mut self, val: bool) {
9361 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
9362 }
9363 #[doc = "Interrupt enable"]
9364 pub const fn ie(&self) -> bool {
9365 let val = (self.0 >> 3usize) & 0x01;
9366 val != 0
9367 }
9368 #[doc = "Interrupt enable"]
9369 pub fn set_ie(&mut self, val: bool) {
9370 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
9371 }
9372 }
9373 impl Default for Cr {
9374 fn default() -> Cr {
9375 Cr(0)
9376 }
9377 }
9378 #[doc = "status register"]
9379 #[repr(transparent)]
9380 #[derive(Copy, Clone, Eq, PartialEq)]
9381 pub struct Sr(pub u32);
9382 impl Sr {
9383 #[doc = "Data ready"]
9384 pub const fn drdy(&self) -> bool {
9385 let val = (self.0 >> 0usize) & 0x01;
9386 val != 0
9387 }
9388 #[doc = "Data ready"]
9389 pub fn set_drdy(&mut self, val: bool) {
9390 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
9391 }
9392 #[doc = "Clock error current status"]
9393 pub const fn cecs(&self) -> bool {
9394 let val = (self.0 >> 1usize) & 0x01;
9395 val != 0
9396 }
9397 #[doc = "Clock error current status"]
9398 pub fn set_cecs(&mut self, val: bool) {
9399 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
9400 }
9401 #[doc = "Seed error current status"]
9402 pub const fn secs(&self) -> bool {
9403 let val = (self.0 >> 2usize) & 0x01;
9404 val != 0
9405 }
9406 #[doc = "Seed error current status"]
9407 pub fn set_secs(&mut self, val: bool) {
9408 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
9409 }
9410 #[doc = "Clock error interrupt status"]
9411 pub const fn ceis(&self) -> bool {
9412 let val = (self.0 >> 5usize) & 0x01;
9413 val != 0
9414 }
9415 #[doc = "Clock error interrupt status"]
9416 pub fn set_ceis(&mut self, val: bool) {
9417 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
9418 }
9419 #[doc = "Seed error interrupt status"]
9420 pub const fn seis(&self) -> bool {
9421 let val = (self.0 >> 6usize) & 0x01;
9422 val != 0
9423 }
9424 #[doc = "Seed error interrupt status"]
9425 pub fn set_seis(&mut self, val: bool) {
9426 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
9427 }
9428 }
9429 impl Default for Sr {
9430 fn default() -> Sr {
9431 Sr(0)
9432>>>>>>> fc21f52 (Better interrupt handling)
9433 }
9434 }
9435 }
9436}
9437<<<<<<< HEAD
1471pub mod dma_v1 { 9438pub mod dma_v1 {
1472 use crate::generic::*; 9439 use crate::generic::*;
1473 #[doc = "Channel cluster: CCR?, CNDTR?, CPAR?, and CMAR? registers"] 9440 #[doc = "Channel cluster: CCR?, CNDTR?, CPAR?, and CMAR? registers"]
@@ -1511,10 +9478,185 @@ pub mod dma_v1 {
1511 pub fn ch(self, n: usize) -> Ch { 9478 pub fn ch(self, n: usize) -> Ch {
1512 assert!(n < 7usize); 9479 assert!(n < 7usize);
1513 unsafe { Ch(self.0.add(8usize + n * 20usize)) } 9480 unsafe { Ch(self.0.add(8usize + n * 20usize)) }
9481=======
9482pub mod usart_v1 {
9483 use crate::generic::*;
9484 #[doc = "Universal synchronous asynchronous receiver transmitter"]
9485 #[derive(Copy, Clone)]
9486 pub struct Usart(pub *mut u8);
9487 unsafe impl Send for Usart {}
9488 unsafe impl Sync for Usart {}
9489 impl Usart {
9490 #[doc = "Status register"]
9491 pub fn sr(self) -> Reg<regs::Sr, RW> {
9492 unsafe { Reg::from_ptr(self.0.add(0usize)) }
9493 }
9494 #[doc = "Data register"]
9495 pub fn dr(self) -> Reg<regs::Dr, RW> {
9496 unsafe { Reg::from_ptr(self.0.add(4usize)) }
9497 }
9498 #[doc = "Baud rate register"]
9499 pub fn brr(self) -> Reg<regs::Brr, RW> {
9500 unsafe { Reg::from_ptr(self.0.add(8usize)) }
9501 }
9502 #[doc = "Control register 1"]
9503 pub fn cr1(self) -> Reg<regs::Cr1, RW> {
9504 unsafe { Reg::from_ptr(self.0.add(12usize)) }
9505 }
9506 #[doc = "Control register 2"]
9507 pub fn cr2(self) -> Reg<regs::Cr2Usart, RW> {
9508 unsafe { Reg::from_ptr(self.0.add(16usize)) }
9509 }
9510 #[doc = "Control register 3"]
9511 pub fn cr3(self) -> Reg<regs::Cr3Usart, RW> {
9512 unsafe { Reg::from_ptr(self.0.add(20usize)) }
9513 }
9514 #[doc = "Guard time and prescaler register"]
9515 pub fn gtpr(self) -> Reg<regs::Gtpr, RW> {
9516 unsafe { Reg::from_ptr(self.0.add(24usize)) }
9517 }
9518 }
9519 #[doc = "Universal asynchronous receiver transmitter"]
9520 #[derive(Copy, Clone)]
9521 pub struct Uart(pub *mut u8);
9522 unsafe impl Send for Uart {}
9523 unsafe impl Sync for Uart {}
9524 impl Uart {
9525 #[doc = "Status register"]
9526 pub fn sr(self) -> Reg<regs::Sr, RW> {
9527 unsafe { Reg::from_ptr(self.0.add(0usize)) }
9528 }
9529 #[doc = "Data register"]
9530 pub fn dr(self) -> Reg<regs::Dr, RW> {
9531 unsafe { Reg::from_ptr(self.0.add(4usize)) }
9532 }
9533 #[doc = "Baud rate register"]
9534 pub fn brr(self) -> Reg<regs::Brr, RW> {
9535 unsafe { Reg::from_ptr(self.0.add(8usize)) }
9536 }
9537 #[doc = "Control register 1"]
9538 pub fn cr1(self) -> Reg<regs::Cr1, RW> {
9539 unsafe { Reg::from_ptr(self.0.add(12usize)) }
9540 }
9541 #[doc = "Control register 2"]
9542 pub fn cr2(self) -> Reg<regs::Cr2, RW> {
9543 unsafe { Reg::from_ptr(self.0.add(16usize)) }
9544 }
9545 #[doc = "Control register 3"]
9546 pub fn cr3(self) -> Reg<regs::Cr3, RW> {
9547 unsafe { Reg::from_ptr(self.0.add(20usize)) }
9548 }
9549 }
9550 pub mod vals {
9551 use crate::generic::*;
9552 #[repr(transparent)]
9553 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
9554 pub struct Sbk(pub u8);
9555 impl Sbk {
9556 #[doc = "No break character is transmitted"]
9557 pub const NOBREAK: Self = Self(0);
9558 #[doc = "Break character transmitted"]
9559 pub const BREAK: Self = Self(0x01);
9560 }
9561 #[repr(transparent)]
9562 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
9563 pub struct Cpha(pub u8);
9564 impl Cpha {
9565 #[doc = "The first clock transition is the first data capture edge"]
9566 pub const FIRST: Self = Self(0);
9567 #[doc = "The second clock transition is the first data capture edge"]
9568 pub const SECOND: Self = Self(0x01);
9569 }
9570 #[repr(transparent)]
9571 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
9572 pub struct Rwu(pub u8);
9573 impl Rwu {
9574 #[doc = "Receiver in active mode"]
9575 pub const ACTIVE: Self = Self(0);
9576 #[doc = "Receiver in mute mode"]
9577 pub const MUTE: Self = Self(0x01);
9578 }
9579 #[repr(transparent)]
9580 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
9581 pub struct Irlp(pub u8);
9582 impl Irlp {
9583 #[doc = "Normal mode"]
9584 pub const NORMAL: Self = Self(0);
9585 #[doc = "Low-power mode"]
9586 pub const LOWPOWER: Self = Self(0x01);
9587 }
9588 #[repr(transparent)]
9589 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
9590 pub struct M(pub u8);
9591 impl M {
9592 #[doc = "8 data bits"]
9593 pub const M8: Self = Self(0);
9594 #[doc = "9 data bits"]
9595 pub const M9: Self = Self(0x01);
9596 }
9597 #[repr(transparent)]
9598 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
9599 pub struct Cpol(pub u8);
9600 impl Cpol {
9601 #[doc = "Steady low value on CK pin outside transmission window"]
9602 pub const LOW: Self = Self(0);
9603 #[doc = "Steady high value on CK pin outside transmission window"]
9604 pub const HIGH: Self = Self(0x01);
9605 }
9606 #[repr(transparent)]
9607 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
9608 pub struct Lbdl(pub u8);
9609 impl Lbdl {
9610 #[doc = "10-bit break detection"]
9611 pub const LBDL10: Self = Self(0);
9612 #[doc = "11-bit break detection"]
9613 pub const LBDL11: Self = Self(0x01);
9614 }
9615 #[repr(transparent)]
9616 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
9617 pub struct Ps(pub u8);
9618 impl Ps {
9619 #[doc = "Even parity"]
9620 pub const EVEN: Self = Self(0);
9621 #[doc = "Odd parity"]
9622 pub const ODD: Self = Self(0x01);
9623 }
9624 #[repr(transparent)]
9625 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
9626 pub struct Wake(pub u8);
9627 impl Wake {
9628 #[doc = "USART wakeup on idle line"]
9629 pub const IDLELINE: Self = Self(0);
9630 #[doc = "USART wakeup on address mark"]
9631 pub const ADDRESSMARK: Self = Self(0x01);
9632 }
9633 #[repr(transparent)]
9634 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
9635 pub struct Hdsel(pub u8);
9636 impl Hdsel {
9637 #[doc = "Half duplex mode is not selected"]
9638 pub const FULLDUPLEX: Self = Self(0);
9639 #[doc = "Half duplex mode is selected"]
9640 pub const HALFDUPLEX: Self = Self(0x01);
9641 }
9642 #[repr(transparent)]
9643 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
9644 pub struct Stop(pub u8);
9645 impl Stop {
9646 #[doc = "1 stop bit"]
9647 pub const STOP1: Self = Self(0);
9648 #[doc = "0.5 stop bits"]
9649 pub const STOP0P5: Self = Self(0x01);
9650 #[doc = "2 stop bits"]
9651 pub const STOP2: Self = Self(0x02);
9652 #[doc = "1.5 stop bits"]
9653 pub const STOP1P5: Self = Self(0x03);
9654>>>>>>> fc21f52 (Better interrupt handling)
1514 } 9655 }
1515 } 9656 }
1516 pub mod regs { 9657 pub mod regs {
1517 use crate::generic::*; 9658 use crate::generic::*;
9659<<<<<<< HEAD
1518 #[doc = "DMA interrupt flag clear register (DMA_IFCR)"] 9660 #[doc = "DMA interrupt flag clear register (DMA_IFCR)"]
1519 #[repr(transparent)] 9661 #[repr(transparent)]
1520 #[derive(Copy, Clone, Eq, PartialEq)] 9662 #[derive(Copy, Clone, Eq, PartialEq)]
@@ -1635,12 +9777,176 @@ pub mod dma_v1 {
1635 let offs = 3usize + n * 4usize; 9777 let offs = 3usize + n * 4usize;
1636 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); 9778 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
1637 } 9779 }
9780=======
9781 #[doc = "Guard time and prescaler register"]
9782 #[repr(transparent)]
9783 #[derive(Copy, Clone, Eq, PartialEq)]
9784 pub struct Gtpr(pub u32);
9785 impl Gtpr {
9786 #[doc = "Prescaler value"]
9787 pub const fn psc(&self) -> u8 {
9788 let val = (self.0 >> 0usize) & 0xff;
9789 val as u8
9790 }
9791 #[doc = "Prescaler value"]
9792 pub fn set_psc(&mut self, val: u8) {
9793 self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize);
9794 }
9795 #[doc = "Guard time value"]
9796 pub const fn gt(&self) -> u8 {
9797 let val = (self.0 >> 8usize) & 0xff;
9798 val as u8
9799 }
9800 #[doc = "Guard time value"]
9801 pub fn set_gt(&mut self, val: u8) {
9802 self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize);
9803 }
9804 }
9805 impl Default for Gtpr {
9806 fn default() -> Gtpr {
9807 Gtpr(0)
9808 }
9809 }
9810 #[doc = "Control register 1"]
9811 #[repr(transparent)]
9812 #[derive(Copy, Clone, Eq, PartialEq)]
9813 pub struct Cr1(pub u32);
9814 impl Cr1 {
9815 #[doc = "Send break"]
9816 pub const fn sbk(&self) -> super::vals::Sbk {
9817 let val = (self.0 >> 0usize) & 0x01;
9818 super::vals::Sbk(val as u8)
9819 }
9820 #[doc = "Send break"]
9821 pub fn set_sbk(&mut self, val: super::vals::Sbk) {
9822 self.0 = (self.0 & !(0x01 << 0usize)) | (((val.0 as u32) & 0x01) << 0usize);
9823 }
9824 #[doc = "Receiver wakeup"]
9825 pub const fn rwu(&self) -> super::vals::Rwu {
9826 let val = (self.0 >> 1usize) & 0x01;
9827 super::vals::Rwu(val as u8)
9828 }
9829 #[doc = "Receiver wakeup"]
9830 pub fn set_rwu(&mut self, val: super::vals::Rwu) {
9831 self.0 = (self.0 & !(0x01 << 1usize)) | (((val.0 as u32) & 0x01) << 1usize);
9832 }
9833 #[doc = "Receiver enable"]
9834 pub const fn re(&self) -> bool {
9835 let val = (self.0 >> 2usize) & 0x01;
9836 val != 0
9837 }
9838 #[doc = "Receiver enable"]
9839 pub fn set_re(&mut self, val: bool) {
9840 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
9841 }
9842 #[doc = "Transmitter enable"]
9843 pub const fn te(&self) -> bool {
9844 let val = (self.0 >> 3usize) & 0x01;
9845 val != 0
9846>>>>>>> Better interrupt handling
9847 }
9848 #[doc = "Transmitter enable"]
9849 pub fn set_te(&mut self, val: bool) {
9850 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
9851 }
9852 #[doc = "IDLE interrupt enable"]
9853 pub const fn idleie(&self) -> bool {
9854 let val = (self.0 >> 4usize) & 0x01;
9855 val != 0
9856 }
9857 #[doc = "IDLE interrupt enable"]
9858 pub fn set_idleie(&mut self, val: bool) {
9859 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
9860 }
9861 #[doc = "RXNE interrupt enable"]
9862 pub const fn rxneie(&self) -> bool {
9863 let val = (self.0 >> 5usize) & 0x01;
9864 val != 0
9865 }
9866 #[doc = "RXNE interrupt enable"]
9867 pub fn set_rxneie(&mut self, val: bool) {
9868 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
9869 }
9870 #[doc = "Transmission complete interrupt enable"]
9871 pub const fn tcie(&self) -> bool {
9872 let val = (self.0 >> 6usize) & 0x01;
9873 val != 0
9874 }
9875 #[doc = "Transmission complete interrupt enable"]
9876 pub fn set_tcie(&mut self, val: bool) {
9877 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
9878 }
9879 #[doc = "TXE interrupt enable"]
9880 pub const fn txeie(&self) -> bool {
9881 let val = (self.0 >> 7usize) & 0x01;
9882 val != 0
9883 }
9884 #[doc = "TXE interrupt enable"]
9885 pub fn set_txeie(&mut self, val: bool) {
9886 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
9887 }
9888 #[doc = "PE interrupt enable"]
9889 pub const fn peie(&self) -> bool {
9890 let val = (self.0 >> 8usize) & 0x01;
9891 val != 0
9892 }
9893 #[doc = "PE interrupt enable"]
9894 pub fn set_peie(&mut self, val: bool) {
9895 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
9896 }
9897 #[doc = "Parity selection"]
9898 pub const fn ps(&self) -> super::vals::Ps {
9899 let val = (self.0 >> 9usize) & 0x01;
9900 super::vals::Ps(val as u8)
9901 }
9902 #[doc = "Parity selection"]
9903 pub fn set_ps(&mut self, val: super::vals::Ps) {
9904 self.0 = (self.0 & !(0x01 << 9usize)) | (((val.0 as u32) & 0x01) << 9usize);
9905 }
9906 #[doc = "Parity control enable"]
9907 pub const fn pce(&self) -> bool {
9908 let val = (self.0 >> 10usize) & 0x01;
9909 val != 0
9910 }
9911 #[doc = "Parity control enable"]
9912 pub fn set_pce(&mut self, val: bool) {
9913 self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize);
9914 }
9915 #[doc = "Wakeup method"]
9916 pub const fn wake(&self) -> super::vals::Wake {
9917 let val = (self.0 >> 11usize) & 0x01;
9918 super::vals::Wake(val as u8)
9919 }
9920 #[doc = "Wakeup method"]
9921 pub fn set_wake(&mut self, val: super::vals::Wake) {
9922 self.0 = (self.0 & !(0x01 << 11usize)) | (((val.0 as u32) & 0x01) << 11usize);
9923 }
9924 #[doc = "Word length"]
9925 pub const fn m(&self) -> super::vals::M {
9926 let val = (self.0 >> 12usize) & 0x01;
9927 super::vals::M(val as u8)
9928 }
9929 #[doc = "Word length"]
9930 pub fn set_m(&mut self, val: super::vals::M) {
9931 self.0 = (self.0 & !(0x01 << 12usize)) | (((val.0 as u32) & 0x01) << 12usize);
9932 }
9933 #[doc = "USART enable"]
9934 pub const fn ue(&self) -> bool {
9935 let val = (self.0 >> 13usize) & 0x01;
9936 val != 0
9937 }
9938 #[doc = "USART enable"]
9939 pub fn set_ue(&mut self, val: bool) {
9940 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize);
9941 }
9942>>>>>>> fc21f52 (Better interrupt handling)
1638 } 9943 }
1639 impl Default for Isr { 9944 impl Default for Isr {
1640 fn default() -> Isr { 9945 fn default() -> Isr {
1641 Isr(0) 9946 Isr(0)
1642 } 9947 }
1643 } 9948 }
9949<<<<<<< HEAD
1644 #[doc = "DMA channel 1 number of data register"] 9950 #[doc = "DMA channel 1 number of data register"]
1645 #[repr(transparent)] 9951 #[repr(transparent)]
1646 #[derive(Copy, Clone, Eq, PartialEq)] 9952 #[derive(Copy, Clone, Eq, PartialEq)]
@@ -1722,9 +10028,66 @@ pub mod dma_v1 {
1722 } 10028 }
1723 #[doc = "Peripheral increment mode"] 10029 #[doc = "Peripheral increment mode"]
1724 pub const fn pinc(&self) -> super::vals::Inc { 10030 pub const fn pinc(&self) -> super::vals::Inc {
10031=======
10032 #[doc = "Baud rate register"]
10033 #[repr(transparent)]
10034 #[derive(Copy, Clone, Eq, PartialEq)]
10035 pub struct Brr(pub u32);
10036 impl Brr {
10037 #[doc = "fraction of USARTDIV"]
10038 pub const fn div_fraction(&self) -> u8 {
10039 let val = (self.0 >> 0usize) & 0x0f;
10040 val as u8
10041 }
10042 #[doc = "fraction of USARTDIV"]
10043 pub fn set_div_fraction(&mut self, val: u8) {
10044 self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize);
10045 }
10046 #[doc = "mantissa of USARTDIV"]
10047 pub const fn div_mantissa(&self) -> u16 {
10048 let val = (self.0 >> 4usize) & 0x0fff;
10049 val as u16
10050 }
10051 #[doc = "mantissa of USARTDIV"]
10052 pub fn set_div_mantissa(&mut self, val: u16) {
10053 self.0 = (self.0 & !(0x0fff << 4usize)) | (((val as u32) & 0x0fff) << 4usize);
10054 }
10055 }
10056 impl Default for Brr {
10057 fn default() -> Brr {
10058 Brr(0)
10059 }
10060 }
10061 #[doc = "Control register 2"]
10062 #[repr(transparent)]
10063 #[derive(Copy, Clone, Eq, PartialEq)]
10064 pub struct Cr2(pub u32);
10065 impl Cr2 {
10066 #[doc = "Address of the USART node"]
10067 pub const fn add(&self) -> u8 {
10068 let val = (self.0 >> 0usize) & 0x0f;
10069 val as u8
10070 }
10071 #[doc = "Address of the USART node"]
10072 pub fn set_add(&mut self, val: u8) {
10073 self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize);
10074 }
10075 #[doc = "lin break detection length"]
10076 pub const fn lbdl(&self) -> super::vals::Lbdl {
10077 let val = (self.0 >> 5usize) & 0x01;
10078 super::vals::Lbdl(val as u8)
10079 }
10080 #[doc = "lin break detection length"]
10081 pub fn set_lbdl(&mut self, val: super::vals::Lbdl) {
10082 self.0 = (self.0 & !(0x01 << 5usize)) | (((val.0 as u32) & 0x01) << 5usize);
10083 }
10084 #[doc = "LIN break detection interrupt enable"]
10085 pub const fn lbdie(&self) -> bool {
10086>>>>>>> fc21f52 (Better interrupt handling)
1725 let val = (self.0 >> 6usize) & 0x01; 10087 let val = (self.0 >> 6usize) & 0x01;
1726 super::vals::Inc(val as u8) 10088 super::vals::Inc(val as u8)
1727 } 10089 }
10090<<<<<<< HEAD
1728 #[doc = "Peripheral increment mode"] 10091 #[doc = "Peripheral increment mode"]
1729 pub fn set_pinc(&mut self, val: super::vals::Inc) { 10092 pub fn set_pinc(&mut self, val: super::vals::Inc) {
1730 self.0 = (self.0 & !(0x01 << 6usize)) | (((val.0 as u32) & 0x01) << 6usize); 10093 self.0 = (self.0 & !(0x01 << 6usize)) | (((val.0 as u32) & 0x01) << 6usize);
@@ -3323,9 +11686,1566 @@ pub mod timer_v1 {
3323 impl EgrGp { 11686 impl EgrGp {
3324 #[doc = "Update generation"] 11687 #[doc = "Update generation"]
3325 pub const fn ug(&self) -> bool { 11688 pub const fn ug(&self) -> bool {
11689=======
11690 #[doc = "LIN break detection interrupt enable"]
11691 pub fn set_lbdie(&mut self, val: bool) {
11692 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
11693 }
11694 #[doc = "STOP bits"]
11695 pub const fn stop(&self) -> super::vals::Stop {
11696 let val = (self.0 >> 12usize) & 0x03;
11697 super::vals::Stop(val as u8)
11698 }
11699 #[doc = "STOP bits"]
11700 pub fn set_stop(&mut self, val: super::vals::Stop) {
11701 self.0 = (self.0 & !(0x03 << 12usize)) | (((val.0 as u32) & 0x03) << 12usize);
11702 }
11703 #[doc = "LIN mode enable"]
11704 pub const fn linen(&self) -> bool {
11705 let val = (self.0 >> 14usize) & 0x01;
11706 val != 0
11707 }
11708 #[doc = "LIN mode enable"]
11709 pub fn set_linen(&mut self, val: bool) {
11710 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize);
11711 }
11712 }
11713 impl Default for Cr2 {
11714 fn default() -> Cr2 {
11715 Cr2(0)
11716 }
11717 }
11718 #[doc = "Status register"]
11719 #[repr(transparent)]
11720 #[derive(Copy, Clone, Eq, PartialEq)]
11721 pub struct SrUsart(pub u32);
11722 impl SrUsart {
11723 #[doc = "Parity error"]
11724 pub const fn pe(&self) -> bool {
11725 let val = (self.0 >> 0usize) & 0x01;
11726 val != 0
11727 }
11728 #[doc = "Parity error"]
11729 pub fn set_pe(&mut self, val: bool) {
11730 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
11731 }
11732 #[doc = "Framing error"]
11733 pub const fn fe(&self) -> bool {
11734 let val = (self.0 >> 1usize) & 0x01;
11735 val != 0
11736 }
11737 #[doc = "Framing error"]
11738 pub fn set_fe(&mut self, val: bool) {
11739 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
11740 }
11741 #[doc = "Noise error flag"]
11742 pub const fn ne(&self) -> bool {
11743 let val = (self.0 >> 2usize) & 0x01;
11744 val != 0
11745 }
11746 #[doc = "Noise error flag"]
11747 pub fn set_ne(&mut self, val: bool) {
11748 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
11749 }
11750 #[doc = "Overrun error"]
11751 pub const fn ore(&self) -> bool {
11752 let val = (self.0 >> 3usize) & 0x01;
11753 val != 0
11754 }
11755 #[doc = "Overrun error"]
11756 pub fn set_ore(&mut self, val: bool) {
11757 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
11758 }
11759 #[doc = "IDLE line detected"]
11760 pub const fn idle(&self) -> bool {
11761 let val = (self.0 >> 4usize) & 0x01;
11762 val != 0
11763 }
11764 #[doc = "IDLE line detected"]
11765 pub fn set_idle(&mut self, val: bool) {
11766 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
11767 }
11768 #[doc = "Read data register not empty"]
11769 pub const fn rxne(&self) -> bool {
11770 let val = (self.0 >> 5usize) & 0x01;
11771 val != 0
11772 }
11773 #[doc = "Read data register not empty"]
11774 pub fn set_rxne(&mut self, val: bool) {
11775 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
11776 }
11777 #[doc = "Transmission complete"]
11778 pub const fn tc(&self) -> bool {
11779 let val = (self.0 >> 6usize) & 0x01;
11780 val != 0
11781 }
11782 #[doc = "Transmission complete"]
11783 pub fn set_tc(&mut self, val: bool) {
11784 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
11785 }
11786 #[doc = "Transmit data register empty"]
11787 pub const fn txe(&self) -> bool {
11788 let val = (self.0 >> 7usize) & 0x01;
11789 val != 0
11790 }
11791 #[doc = "Transmit data register empty"]
11792 pub fn set_txe(&mut self, val: bool) {
11793 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
11794 }
11795 #[doc = "LIN break detection flag"]
11796 pub const fn lbd(&self) -> bool {
11797 let val = (self.0 >> 8usize) & 0x01;
11798 val != 0
11799 }
11800 #[doc = "LIN break detection flag"]
11801 pub fn set_lbd(&mut self, val: bool) {
11802 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
11803 }
11804 #[doc = "CTS flag"]
11805 pub const fn cts(&self) -> bool {
11806 let val = (self.0 >> 9usize) & 0x01;
11807 val != 0
11808 }
11809 #[doc = "CTS flag"]
11810 pub fn set_cts(&mut self, val: bool) {
11811 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
11812 }
11813 }
11814 impl Default for SrUsart {
11815 fn default() -> SrUsart {
11816 SrUsart(0)
11817 }
11818 }
11819 #[doc = "Status register"]
11820 #[repr(transparent)]
11821 #[derive(Copy, Clone, Eq, PartialEq)]
11822 pub struct Sr(pub u32);
11823 impl Sr {
11824 #[doc = "Parity error"]
11825 pub const fn pe(&self) -> bool {
11826 let val = (self.0 >> 0usize) & 0x01;
11827 val != 0
11828 }
11829 #[doc = "Parity error"]
11830 pub fn set_pe(&mut self, val: bool) {
11831 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
11832 }
11833 #[doc = "Framing error"]
11834 pub const fn fe(&self) -> bool {
11835 let val = (self.0 >> 1usize) & 0x01;
11836 val != 0
11837 }
11838 #[doc = "Framing error"]
11839 pub fn set_fe(&mut self, val: bool) {
11840 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
11841 }
11842 #[doc = "Noise error flag"]
11843 pub const fn ne(&self) -> bool {
11844 let val = (self.0 >> 2usize) & 0x01;
11845 val != 0
11846 }
11847 #[doc = "Noise error flag"]
11848 pub fn set_ne(&mut self, val: bool) {
11849 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
11850 }
11851 #[doc = "Overrun error"]
11852 pub const fn ore(&self) -> bool {
11853 let val = (self.0 >> 3usize) & 0x01;
11854 val != 0
11855 }
11856 #[doc = "Overrun error"]
11857 pub fn set_ore(&mut self, val: bool) {
11858 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
11859 }
11860 #[doc = "IDLE line detected"]
11861 pub const fn idle(&self) -> bool {
11862 let val = (self.0 >> 4usize) & 0x01;
11863 val != 0
11864 }
11865 #[doc = "IDLE line detected"]
11866 pub fn set_idle(&mut self, val: bool) {
11867 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
11868 }
11869 #[doc = "Read data register not empty"]
11870 pub const fn rxne(&self) -> bool {
11871 let val = (self.0 >> 5usize) & 0x01;
11872 val != 0
11873 }
11874 #[doc = "Read data register not empty"]
11875 pub fn set_rxne(&mut self, val: bool) {
11876 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
11877 }
11878 #[doc = "Transmission complete"]
11879 pub const fn tc(&self) -> bool {
11880 let val = (self.0 >> 6usize) & 0x01;
11881 val != 0
11882 }
11883 #[doc = "Transmission complete"]
11884 pub fn set_tc(&mut self, val: bool) {
11885 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
11886 }
11887 #[doc = "Transmit data register empty"]
11888 pub const fn txe(&self) -> bool {
11889 let val = (self.0 >> 7usize) & 0x01;
11890 val != 0
11891 }
11892 #[doc = "Transmit data register empty"]
11893 pub fn set_txe(&mut self, val: bool) {
11894 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
11895 }
11896 #[doc = "LIN break detection flag"]
11897 pub const fn lbd(&self) -> bool {
11898 let val = (self.0 >> 8usize) & 0x01;
11899 val != 0
11900 }
11901 #[doc = "LIN break detection flag"]
11902 pub fn set_lbd(&mut self, val: bool) {
11903 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
11904 }
11905 }
11906 impl Default for Sr {
11907 fn default() -> Sr {
11908 Sr(0)
11909 }
11910 }
11911 #[doc = "Control register 2"]
11912 #[repr(transparent)]
11913 #[derive(Copy, Clone, Eq, PartialEq)]
11914 pub struct Cr2Usart(pub u32);
11915 impl Cr2Usart {
11916 #[doc = "Address of the USART node"]
11917 pub const fn add(&self) -> u8 {
11918 let val = (self.0 >> 0usize) & 0x0f;
11919 val as u8
11920 }
11921 #[doc = "Address of the USART node"]
11922 pub fn set_add(&mut self, val: u8) {
11923 self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize);
11924 }
11925 #[doc = "lin break detection length"]
11926 pub const fn lbdl(&self) -> super::vals::Lbdl {
11927 let val = (self.0 >> 5usize) & 0x01;
11928 super::vals::Lbdl(val as u8)
11929 }
11930 #[doc = "lin break detection length"]
11931 pub fn set_lbdl(&mut self, val: super::vals::Lbdl) {
11932 self.0 = (self.0 & !(0x01 << 5usize)) | (((val.0 as u32) & 0x01) << 5usize);
11933 }
11934 #[doc = "LIN break detection interrupt enable"]
11935 pub const fn lbdie(&self) -> bool {
11936 let val = (self.0 >> 6usize) & 0x01;
11937 val != 0
11938 }
11939 #[doc = "LIN break detection interrupt enable"]
11940 pub fn set_lbdie(&mut self, val: bool) {
11941 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
11942 }
11943 #[doc = "Last bit clock pulse"]
11944 pub const fn lbcl(&self) -> bool {
11945 let val = (self.0 >> 8usize) & 0x01;
11946 val != 0
11947 }
11948 #[doc = "Last bit clock pulse"]
11949 pub fn set_lbcl(&mut self, val: bool) {
11950 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
11951 }
11952 #[doc = "Clock phase"]
11953 pub const fn cpha(&self) -> super::vals::Cpha {
11954 let val = (self.0 >> 9usize) & 0x01;
11955 super::vals::Cpha(val as u8)
11956 }
11957 #[doc = "Clock phase"]
11958 pub fn set_cpha(&mut self, val: super::vals::Cpha) {
11959 self.0 = (self.0 & !(0x01 << 9usize)) | (((val.0 as u32) & 0x01) << 9usize);
11960 }
11961 #[doc = "Clock polarity"]
11962 pub const fn cpol(&self) -> super::vals::Cpol {
11963 let val = (self.0 >> 10usize) & 0x01;
11964 super::vals::Cpol(val as u8)
11965 }
11966 #[doc = "Clock polarity"]
11967 pub fn set_cpol(&mut self, val: super::vals::Cpol) {
11968 self.0 = (self.0 & !(0x01 << 10usize)) | (((val.0 as u32) & 0x01) << 10usize);
11969 }
11970 #[doc = "Clock enable"]
11971 pub const fn clken(&self) -> bool {
11972 let val = (self.0 >> 11usize) & 0x01;
11973 val != 0
11974 }
11975 #[doc = "Clock enable"]
11976 pub fn set_clken(&mut self, val: bool) {
11977 self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize);
11978 }
11979 #[doc = "STOP bits"]
11980 pub const fn stop(&self) -> super::vals::Stop {
11981 let val = (self.0 >> 12usize) & 0x03;
11982 super::vals::Stop(val as u8)
11983 }
11984<<<<<<< HEAD
11985 }
11986 #[doc = "The interrupt mask register determines which status flags generate an interrupt request by setting the corresponding bit to 1."]
11987 #[repr(transparent)]
11988 #[derive(Copy, Clone, Eq, PartialEq)]
11989 pub struct Maskr(pub u32);
11990 impl Maskr {
11991 #[doc = "Command CRC fail interrupt enable Set and cleared by software to enable/disable interrupt caused by command CRC failure."]
11992 pub const fn ccrcfailie(&self) -> bool {
11993 let val = (self.0 >> 0usize) & 0x01;
11994 val != 0
11995 }
11996 #[doc = "Command CRC fail interrupt enable Set and cleared by software to enable/disable interrupt caused by command CRC failure."]
11997 pub fn set_ccrcfailie(&mut self, val: bool) {
11998 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
11999 }
12000 #[doc = "Data CRC fail interrupt enable Set and cleared by software to enable/disable interrupt caused by data CRC failure."]
12001 pub const fn dcrcfailie(&self) -> bool {
12002 let val = (self.0 >> 1usize) & 0x01;
12003 val != 0
12004 }
12005 #[doc = "Data CRC fail interrupt enable Set and cleared by software to enable/disable interrupt caused by data CRC failure."]
12006 pub fn set_dcrcfailie(&mut self, val: bool) {
12007 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
12008 }
12009 #[doc = "Command timeout interrupt enable Set and cleared by software to enable/disable interrupt caused by command timeout."]
12010 pub const fn ctimeoutie(&self) -> bool {
12011 let val = (self.0 >> 2usize) & 0x01;
12012 val != 0
12013 }
12014 #[doc = "Command timeout interrupt enable Set and cleared by software to enable/disable interrupt caused by command timeout."]
12015 pub fn set_ctimeoutie(&mut self, val: bool) {
12016 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
12017 }
12018 #[doc = "Data timeout interrupt enable Set and cleared by software to enable/disable interrupt caused by data timeout."]
12019 pub const fn dtimeoutie(&self) -> bool {
12020 let val = (self.0 >> 3usize) & 0x01;
12021 val != 0
12022 }
12023 #[doc = "Data timeout interrupt enable Set and cleared by software to enable/disable interrupt caused by data timeout."]
12024 pub fn set_dtimeoutie(&mut self, val: bool) {
12025 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
12026 }
12027 #[doc = "Tx FIFO underrun error interrupt enable Set and cleared by software to enable/disable interrupt caused by Tx FIFO underrun error."]
12028 pub const fn txunderrie(&self) -> bool {
12029 let val = (self.0 >> 4usize) & 0x01;
12030 val != 0
12031 }
12032 #[doc = "Tx FIFO underrun error interrupt enable Set and cleared by software to enable/disable interrupt caused by Tx FIFO underrun error."]
12033 pub fn set_txunderrie(&mut self, val: bool) {
12034 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
12035 }
12036 #[doc = "Rx FIFO overrun error interrupt enable Set and cleared by software to enable/disable interrupt caused by Rx FIFO overrun error."]
12037 pub const fn rxoverrie(&self) -> bool {
12038 let val = (self.0 >> 5usize) & 0x01;
12039 val != 0
12040 }
12041 #[doc = "Rx FIFO overrun error interrupt enable Set and cleared by software to enable/disable interrupt caused by Rx FIFO overrun error."]
12042 pub fn set_rxoverrie(&mut self, val: bool) {
12043 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
12044 }
12045 #[doc = "Command response received interrupt enable Set and cleared by software to enable/disable interrupt caused by receiving command response."]
12046 pub const fn cmdrendie(&self) -> bool {
12047 let val = (self.0 >> 6usize) & 0x01;
12048 val != 0
12049 }
12050 #[doc = "Command response received interrupt enable Set and cleared by software to enable/disable interrupt caused by receiving command response."]
12051 pub fn set_cmdrendie(&mut self, val: bool) {
12052 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
12053 }
12054 #[doc = "Command sent interrupt enable Set and cleared by software to enable/disable interrupt caused by sending command."]
12055 pub const fn cmdsentie(&self) -> bool {
12056 let val = (self.0 >> 7usize) & 0x01;
12057 val != 0
12058 }
12059 #[doc = "Command sent interrupt enable Set and cleared by software to enable/disable interrupt caused by sending command."]
12060 pub fn set_cmdsentie(&mut self, val: bool) {
12061 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
12062 }
12063 #[doc = "Data end interrupt enable Set and cleared by software to enable/disable interrupt caused by data end."]
12064 pub const fn dataendie(&self) -> bool {
12065 let val = (self.0 >> 8usize) & 0x01;
12066 val != 0
12067 }
12068 #[doc = "Data end interrupt enable Set and cleared by software to enable/disable interrupt caused by data end."]
12069 pub fn set_dataendie(&mut self, val: bool) {
12070 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
12071 }
12072 #[doc = "Data hold interrupt enable Set and cleared by software to enable/disable the interrupt generated when sending new data is hold in the DPSM Wait_S state."]
12073 pub const fn dholdie(&self) -> bool {
12074 let val = (self.0 >> 9usize) & 0x01;
12075 val != 0
12076 }
12077 #[doc = "Data hold interrupt enable Set and cleared by software to enable/disable the interrupt generated when sending new data is hold in the DPSM Wait_S state."]
12078 pub fn set_dholdie(&mut self, val: bool) {
12079 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
12080 }
12081 #[doc = "Data block end interrupt enable Set and cleared by software to enable/disable interrupt caused by data block end."]
12082 pub const fn dbckendie(&self) -> bool {
12083 let val = (self.0 >> 10usize) & 0x01;
12084 val != 0
12085 }
12086 #[doc = "Data block end interrupt enable Set and cleared by software to enable/disable interrupt caused by data block end."]
12087 pub fn set_dbckendie(&mut self, val: bool) {
12088 self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize);
12089 }
12090 #[doc = "Data transfer aborted interrupt enable Set and cleared by software to enable/disable interrupt caused by a data transfer being aborted."]
12091 pub const fn dabortie(&self) -> bool {
12092 let val = (self.0 >> 11usize) & 0x01;
12093 val != 0
12094 }
12095 #[doc = "Data transfer aborted interrupt enable Set and cleared by software to enable/disable interrupt caused by a data transfer being aborted."]
12096 pub fn set_dabortie(&mut self, val: bool) {
12097 self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize);
12098 }
12099 #[doc = "Tx FIFO half empty interrupt enable Set and cleared by software to enable/disable interrupt caused by Tx FIFO half empty."]
12100 pub const fn txfifoheie(&self) -> bool {
12101 let val = (self.0 >> 14usize) & 0x01;
12102 val != 0
12103 }
12104 #[doc = "Tx FIFO half empty interrupt enable Set and cleared by software to enable/disable interrupt caused by Tx FIFO half empty."]
12105 pub fn set_txfifoheie(&mut self, val: bool) {
12106 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize);
12107 }
12108 #[doc = "Rx FIFO half full interrupt enable Set and cleared by software to enable/disable interrupt caused by Rx FIFO half full."]
12109 pub const fn rxfifohfie(&self) -> bool {
12110 let val = (self.0 >> 15usize) & 0x01;
12111 val != 0
12112 }
12113 #[doc = "Rx FIFO half full interrupt enable Set and cleared by software to enable/disable interrupt caused by Rx FIFO half full."]
12114 pub fn set_rxfifohfie(&mut self, val: bool) {
12115 self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize);
12116 }
12117 #[doc = "Rx FIFO full interrupt enable Set and cleared by software to enable/disable interrupt caused by Rx FIFO full."]
12118 pub const fn rxfifofie(&self) -> bool {
12119 let val = (self.0 >> 17usize) & 0x01;
12120 val != 0
12121 }
12122 #[doc = "Rx FIFO full interrupt enable Set and cleared by software to enable/disable interrupt caused by Rx FIFO full."]
12123 pub fn set_rxfifofie(&mut self, val: bool) {
12124 self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize);
12125 }
12126 #[doc = "Tx FIFO empty interrupt enable Set and cleared by software to enable/disable interrupt caused by Tx FIFO empty."]
12127 pub const fn txfifoeie(&self) -> bool {
12128 let val = (self.0 >> 18usize) & 0x01;
12129 val != 0
12130 }
12131 #[doc = "Tx FIFO empty interrupt enable Set and cleared by software to enable/disable interrupt caused by Tx FIFO empty."]
12132 pub fn set_txfifoeie(&mut self, val: bool) {
12133 self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize);
12134 }
12135 #[doc = "BUSYD0END interrupt enable Set and cleared by software to enable/disable the interrupt generated when SDMMC_D0 signal changes from busy to NOT busy following a CMD response."]
12136 pub const fn busyd0endie(&self) -> bool {
12137 let val = (self.0 >> 21usize) & 0x01;
12138 val != 0
12139 }
12140 #[doc = "BUSYD0END interrupt enable Set and cleared by software to enable/disable the interrupt generated when SDMMC_D0 signal changes from busy to NOT busy following a CMD response."]
12141 pub fn set_busyd0endie(&mut self, val: bool) {
12142 self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize);
12143 }
12144 #[doc = "SDIO mode interrupt received interrupt enable Set and cleared by software to enable/disable the interrupt generated when receiving the SDIO mode interrupt."]
12145 pub const fn sdioitie(&self) -> bool {
12146 let val = (self.0 >> 22usize) & 0x01;
12147 val != 0
12148 }
12149 #[doc = "SDIO mode interrupt received interrupt enable Set and cleared by software to enable/disable the interrupt generated when receiving the SDIO mode interrupt."]
12150 pub fn set_sdioitie(&mut self, val: bool) {
12151 self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize);
12152 }
12153 #[doc = "Acknowledgment Fail interrupt enable Set and cleared by software to enable/disable interrupt caused by acknowledgment Fail."]
12154 pub const fn ackfailie(&self) -> bool {
12155 let val = (self.0 >> 23usize) & 0x01;
12156 val != 0
12157 }
12158 #[doc = "Acknowledgment Fail interrupt enable Set and cleared by software to enable/disable interrupt caused by acknowledgment Fail."]
12159 pub fn set_ackfailie(&mut self, val: bool) {
12160 self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize);
12161 }
12162 #[doc = "Acknowledgment timeout interrupt enable Set and cleared by software to enable/disable interrupt caused by acknowledgment timeout."]
12163 pub const fn acktimeoutie(&self) -> bool {
12164 let val = (self.0 >> 24usize) & 0x01;
12165 val != 0
12166 }
12167 #[doc = "Acknowledgment timeout interrupt enable Set and cleared by software to enable/disable interrupt caused by acknowledgment timeout."]
12168 pub fn set_acktimeoutie(&mut self, val: bool) {
12169 self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize);
12170 }
12171 #[doc = "Voltage switch critical timing section completion interrupt enable Set and cleared by software to enable/disable the interrupt generated when voltage switch critical timing section completion."]
12172 pub const fn vswendie(&self) -> bool {
12173 let val = (self.0 >> 25usize) & 0x01;
12174 val != 0
12175 }
12176 #[doc = "Voltage switch critical timing section completion interrupt enable Set and cleared by software to enable/disable the interrupt generated when voltage switch critical timing section completion."]
12177 pub fn set_vswendie(&mut self, val: bool) {
12178 self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize);
12179 }
12180 #[doc = "Voltage Switch clock stopped interrupt enable Set and cleared by software to enable/disable interrupt caused by Voltage Switch clock stopped."]
12181 pub const fn ckstopie(&self) -> bool {
12182 let val = (self.0 >> 26usize) & 0x01;
12183 val != 0
12184 }
12185 #[doc = "Voltage Switch clock stopped interrupt enable Set and cleared by software to enable/disable interrupt caused by Voltage Switch clock stopped."]
12186 pub fn set_ckstopie(&mut self, val: bool) {
12187 self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize);
12188 }
12189 #[doc = "IDMA buffer transfer complete interrupt enable Set and cleared by software to enable/disable the interrupt generated when the IDMA has transferred all data belonging to a memory buffer."]
12190 pub const fn idmabtcie(&self) -> bool {
12191 let val = (self.0 >> 28usize) & 0x01;
12192 val != 0
12193 }
12194 #[doc = "IDMA buffer transfer complete interrupt enable Set and cleared by software to enable/disable the interrupt generated when the IDMA has transferred all data belonging to a memory buffer."]
12195 pub fn set_idmabtcie(&mut self, val: bool) {
12196 self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize);
12197 }
12198 }
12199 impl Default for Maskr {
12200 fn default() -> Maskr {
12201 Maskr(0)
12202 }
12203 }
12204 #[doc = "SDMMC power control register"]
12205 #[repr(transparent)]
12206 #[derive(Copy, Clone, Eq, PartialEq)]
12207 pub struct Power(pub u32);
12208 impl Power {
12209 #[doc = "SDMMC state control bits. These bits can only be written when the SDMMC is not in the power-on state (PWRCTRL?11). These bits are used to define the functional state of the SDMMC signals: Any further write will be ignored, PWRCTRL value will keep 11."]
12210 pub const fn pwrctrl(&self) -> u8 {
12211 let val = (self.0 >> 0usize) & 0x03;
12212 val as u8
12213 }
12214 #[doc = "SDMMC state control bits. These bits can only be written when the SDMMC is not in the power-on state (PWRCTRL?11). These bits are used to define the functional state of the SDMMC signals: Any further write will be ignored, PWRCTRL value will keep 11."]
12215 pub fn set_pwrctrl(&mut self, val: u8) {
12216 self.0 = (self.0 & !(0x03 << 0usize)) | (((val as u32) & 0x03) << 0usize);
12217 }
12218 #[doc = "Voltage switch sequence start. This bit is used to start the timing critical section of the voltage switch sequence:"]
12219 pub const fn vswitch(&self) -> bool {
12220 let val = (self.0 >> 2usize) & 0x01;
12221 val != 0
12222 }
12223 #[doc = "Voltage switch sequence start. This bit is used to start the timing critical section of the voltage switch sequence:"]
12224 pub fn set_vswitch(&mut self, val: bool) {
12225 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
12226 }
12227 #[doc = "Voltage switch procedure enable. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). This bit is used to stop the SDMMC_CK after the voltage switch command response:"]
12228 pub const fn vswitchen(&self) -> bool {
12229 let val = (self.0 >> 3usize) & 0x01;
12230 val != 0
12231 }
12232 #[doc = "Voltage switch procedure enable. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). This bit is used to stop the SDMMC_CK after the voltage switch command response:"]
12233 pub fn set_vswitchen(&mut self, val: bool) {
12234 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
12235 }
12236 #[doc = "Data and command direction signals polarity selection. This bit can only be written when the SDMMC is in the power-off state (PWRCTRL = 00)."]
12237 pub const fn dirpol(&self) -> bool {
12238 let val = (self.0 >> 4usize) & 0x01;
12239 val != 0
12240 }
12241 #[doc = "Data and command direction signals polarity selection. This bit can only be written when the SDMMC is in the power-off state (PWRCTRL = 00)."]
12242 pub fn set_dirpol(&mut self, val: bool) {
12243 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
12244 }
12245 }
12246 impl Default for Power {
12247 fn default() -> Power {
12248 Power(0)
12249 }
12250 }
12251 #[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."]
12252 #[repr(transparent)]
12253 #[derive(Copy, Clone, Eq, PartialEq)]
12254 pub struct Dlenr(pub u32);
12255 impl Dlenr {
12256 #[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."]
12257 pub const fn datalength(&self) -> u32 {
12258 let val = (self.0 >> 0usize) & 0x01ff_ffff;
12259 val as u32
12260 }
12261 #[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."]
12262 pub fn set_datalength(&mut self, val: u32) {
12263 self.0 =
12264 (self.0 & !(0x01ff_ffff << 0usize)) | (((val as u32) & 0x01ff_ffff) << 0usize);
12265 }
12266 }
12267 impl Default for Dlenr {
12268 fn default() -> Dlenr {
12269 Dlenr(0)
12270 }
12271 }
12272 #[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."]
12273 #[repr(transparent)]
12274 #[derive(Copy, Clone, Eq, PartialEq)]
12275 pub struct Icr(pub u32);
12276 impl Icr {
12277 #[doc = "CCRCFAIL flag clear bit Set by software to clear the CCRCFAIL flag."]
12278 pub const fn ccrcfailc(&self) -> bool {
3326 let val = (self.0 >> 0usize) & 0x01; 12279 let val = (self.0 >> 0usize) & 0x01;
3327 val != 0 12280 val != 0
3328 } 12281 }
12282 #[doc = "CCRCFAIL flag clear bit Set by software to clear the CCRCFAIL flag."]
12283 pub fn set_ccrcfailc(&mut self, val: bool) {
12284 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
12285 }
12286 #[doc = "DCRCFAIL flag clear bit Set by software to clear the DCRCFAIL flag."]
12287 pub const fn dcrcfailc(&self) -> bool {
12288 let val = (self.0 >> 1usize) & 0x01;
12289 val != 0
12290 }
12291 #[doc = "DCRCFAIL flag clear bit Set by software to clear the DCRCFAIL flag."]
12292 pub fn set_dcrcfailc(&mut self, val: bool) {
12293 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
12294 }
12295 #[doc = "CTIMEOUT flag clear bit Set by software to clear the CTIMEOUT flag."]
12296 pub const fn ctimeoutc(&self) -> bool {
12297 let val = (self.0 >> 2usize) & 0x01;
12298 val != 0
12299 }
12300 #[doc = "CTIMEOUT flag clear bit Set by software to clear the CTIMEOUT flag."]
12301 pub fn set_ctimeoutc(&mut self, val: bool) {
12302 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
12303 }
12304 #[doc = "DTIMEOUT flag clear bit Set by software to clear the DTIMEOUT flag."]
12305 pub const fn dtimeoutc(&self) -> bool {
12306 let val = (self.0 >> 3usize) & 0x01;
12307 val != 0
12308 }
12309 #[doc = "DTIMEOUT flag clear bit Set by software to clear the DTIMEOUT flag."]
12310 pub fn set_dtimeoutc(&mut self, val: bool) {
12311 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
12312 }
12313 #[doc = "TXUNDERR flag clear bit Set by software to clear TXUNDERR flag."]
12314 pub const fn txunderrc(&self) -> bool {
12315 let val = (self.0 >> 4usize) & 0x01;
12316 val != 0
12317 }
12318 #[doc = "TXUNDERR flag clear bit Set by software to clear TXUNDERR flag."]
12319 pub fn set_txunderrc(&mut self, val: bool) {
12320 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
12321 }
12322 #[doc = "RXOVERR flag clear bit Set by software to clear the RXOVERR flag."]
12323 pub const fn rxoverrc(&self) -> bool {
12324 let val = (self.0 >> 5usize) & 0x01;
12325 val != 0
12326 }
12327 #[doc = "RXOVERR flag clear bit Set by software to clear the RXOVERR flag."]
12328 pub fn set_rxoverrc(&mut self, val: bool) {
12329 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
12330 }
12331 #[doc = "CMDREND flag clear bit Set by software to clear the CMDREND flag."]
12332 pub const fn cmdrendc(&self) -> bool {
12333 let val = (self.0 >> 6usize) & 0x01;
12334 val != 0
12335 }
12336 #[doc = "CMDREND flag clear bit Set by software to clear the CMDREND flag."]
12337 pub fn set_cmdrendc(&mut self, val: bool) {
12338 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
12339 }
12340 #[doc = "CMDSENT flag clear bit Set by software to clear the CMDSENT flag."]
12341 pub const fn cmdsentc(&self) -> bool {
12342 let val = (self.0 >> 7usize) & 0x01;
12343 val != 0
12344 }
12345 #[doc = "CMDSENT flag clear bit Set by software to clear the CMDSENT flag."]
12346 pub fn set_cmdsentc(&mut self, val: bool) {
12347 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
12348 }
12349 #[doc = "DATAEND flag clear bit Set by software to clear the DATAEND flag."]
12350 pub const fn dataendc(&self) -> bool {
12351 let val = (self.0 >> 8usize) & 0x01;
12352 val != 0
12353 }
12354 #[doc = "DATAEND flag clear bit Set by software to clear the DATAEND flag."]
12355 pub fn set_dataendc(&mut self, val: bool) {
12356 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
12357 }
12358 #[doc = "DHOLD flag clear bit Set by software to clear the DHOLD flag."]
12359 pub const fn dholdc(&self) -> bool {
12360 let val = (self.0 >> 9usize) & 0x01;
12361 val != 0
12362 }
12363 #[doc = "DHOLD flag clear bit Set by software to clear the DHOLD flag."]
12364 pub fn set_dholdc(&mut self, val: bool) {
12365 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
12366 }
12367 #[doc = "DBCKEND flag clear bit Set by software to clear the DBCKEND flag."]
12368 pub const fn dbckendc(&self) -> bool {
12369 let val = (self.0 >> 10usize) & 0x01;
12370 val != 0
12371 }
12372 #[doc = "DBCKEND flag clear bit Set by software to clear the DBCKEND flag."]
12373 pub fn set_dbckendc(&mut self, val: bool) {
12374 self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize);
12375 }
12376 #[doc = "DABORT flag clear bit Set by software to clear the DABORT flag."]
12377 pub const fn dabortc(&self) -> bool {
12378 let val = (self.0 >> 11usize) & 0x01;
12379 val != 0
12380 }
12381 #[doc = "DABORT flag clear bit Set by software to clear the DABORT flag."]
12382 pub fn set_dabortc(&mut self, val: bool) {
12383 self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize);
12384 }
12385 #[doc = "BUSYD0END flag clear bit Set by software to clear the BUSYD0END flag."]
12386 pub const fn busyd0endc(&self) -> bool {
12387 let val = (self.0 >> 21usize) & 0x01;
12388 val != 0
12389 }
12390 #[doc = "BUSYD0END flag clear bit Set by software to clear the BUSYD0END flag."]
12391 pub fn set_busyd0endc(&mut self, val: bool) {
12392 self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize);
12393 }
12394 #[doc = "SDIOIT flag clear bit Set by software to clear the SDIOIT flag."]
12395 pub const fn sdioitc(&self) -> bool {
12396 let val = (self.0 >> 22usize) & 0x01;
12397 val != 0
12398 }
12399 #[doc = "SDIOIT flag clear bit Set by software to clear the SDIOIT flag."]
12400 pub fn set_sdioitc(&mut self, val: bool) {
12401 self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize);
12402 }
12403 #[doc = "ACKFAIL flag clear bit Set by software to clear the ACKFAIL flag."]
12404 pub const fn ackfailc(&self) -> bool {
12405 let val = (self.0 >> 23usize) & 0x01;
12406 val != 0
12407 }
12408 #[doc = "ACKFAIL flag clear bit Set by software to clear the ACKFAIL flag."]
12409 pub fn set_ackfailc(&mut self, val: bool) {
12410 self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize);
12411 }
12412 #[doc = "ACKTIMEOUT flag clear bit Set by software to clear the ACKTIMEOUT flag."]
12413 pub const fn acktimeoutc(&self) -> bool {
12414 let val = (self.0 >> 24usize) & 0x01;
12415 val != 0
12416 }
12417 #[doc = "ACKTIMEOUT flag clear bit Set by software to clear the ACKTIMEOUT flag."]
12418 pub fn set_acktimeoutc(&mut self, val: bool) {
12419 self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize);
12420 }
12421 #[doc = "VSWEND flag clear bit Set by software to clear the VSWEND flag."]
12422 pub const fn vswendc(&self) -> bool {
12423 let val = (self.0 >> 25usize) & 0x01;
12424 val != 0
12425 }
12426 #[doc = "VSWEND flag clear bit Set by software to clear the VSWEND flag."]
12427 pub fn set_vswendc(&mut self, val: bool) {
12428 self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize);
12429 }
12430 #[doc = "CKSTOP flag clear bit Set by software to clear the CKSTOP flag."]
12431 pub const fn ckstopc(&self) -> bool {
12432 let val = (self.0 >> 26usize) & 0x01;
12433 val != 0
12434 }
12435 #[doc = "CKSTOP flag clear bit Set by software to clear the CKSTOP flag."]
12436 pub fn set_ckstopc(&mut self, val: bool) {
12437 self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize);
12438 }
12439 #[doc = "IDMA transfer error clear bit Set by software to clear the IDMATE flag."]
12440 pub const fn idmatec(&self) -> bool {
12441 let val = (self.0 >> 27usize) & 0x01;
12442 val != 0
12443 }
12444 #[doc = "IDMA transfer error clear bit Set by software to clear the IDMATE flag."]
12445 pub fn set_idmatec(&mut self, val: bool) {
12446 self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize);
12447 }
12448 #[doc = "IDMA buffer transfer complete clear bit Set by software to clear the IDMABTC flag."]
12449 pub const fn idmabtcc(&self) -> bool {
12450 let val = (self.0 >> 28usize) & 0x01;
12451 val != 0
12452 }
12453 #[doc = "IDMA buffer transfer complete clear bit Set by software to clear the IDMABTC flag."]
12454 pub fn set_idmabtcc(&mut self, val: bool) {
12455 self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize);
12456 }
12457 }
12458 impl Default for Icr {
12459 fn default() -> Icr {
12460 Icr(0)
12461 }
12462 }
12463 #[doc = "The SDMMC_RESP1/2/3/4R registers contain the status of a card, which is part of the received response."]
12464 #[repr(transparent)]
12465 #[derive(Copy, Clone, Eq, PartialEq)]
12466 pub struct Resp1r(pub u32);
12467 impl Resp1r {
12468 #[doc = "see Table 432"]
12469 pub const fn cardstatus1(&self) -> u32 {
12470 let val = (self.0 >> 0usize) & 0xffff_ffff;
12471 val as u32
12472 }
12473 #[doc = "see Table 432"]
12474 pub fn set_cardstatus1(&mut self, val: u32) {
12475 self.0 =
12476 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
12477 }
12478 }
12479 impl Default for Resp1r {
12480 fn default() -> Resp1r {
12481 Resp1r(0)
12482 }
12483 }
12484 #[doc = "The SDMMC_DCTRL register control the data path state machine (DPSM)."]
12485 #[repr(transparent)]
12486 #[derive(Copy, Clone, Eq, PartialEq)]
12487 pub struct Dctrl(pub u32);
12488 impl Dctrl {
12489 #[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."]
12490 pub const fn dten(&self) -> bool {
12491 let val = (self.0 >> 0usize) & 0x01;
12492 val != 0
12493 }
12494 #[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."]
12495 pub fn set_dten(&mut self, val: bool) {
12496 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
12497 }
12498 #[doc = "Data transfer direction selection This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
12499 pub const fn dtdir(&self) -> bool {
12500 let val = (self.0 >> 1usize) & 0x01;
12501 val != 0
12502 }
12503 #[doc = "Data transfer direction selection This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
12504 pub fn set_dtdir(&mut self, val: bool) {
12505 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
12506 }
12507 #[doc = "Data transfer mode selection. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
12508 pub const fn dtmode(&self) -> u8 {
12509 let val = (self.0 >> 2usize) & 0x03;
12510 val as u8
12511 }
12512 #[doc = "Data transfer mode selection. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
12513 pub fn set_dtmode(&mut self, val: u8) {
12514 self.0 = (self.0 & !(0x03 << 2usize)) | (((val as u32) & 0x03) << 2usize);
12515 }
12516 #[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)"]
12517 pub const fn dblocksize(&self) -> u8 {
12518 let val = (self.0 >> 4usize) & 0x0f;
12519 val as u8
12520 }
12521 #[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)"]
12522 pub fn set_dblocksize(&mut self, val: u8) {
12523 self.0 = (self.0 & !(0x0f << 4usize)) | (((val as u32) & 0x0f) << 4usize);
12524 }
12525 #[doc = "Read wait start. If this bit is set, read wait operation starts."]
12526 pub const fn rwstart(&self) -> bool {
12527 let val = (self.0 >> 8usize) & 0x01;
12528 val != 0
12529 }
12530 #[doc = "Read wait start. If this bit is set, read wait operation starts."]
12531 pub fn set_rwstart(&mut self, val: bool) {
12532 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
12533 }
12534 #[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."]
12535 pub const fn rwstop(&self) -> bool {
12536 let val = (self.0 >> 9usize) & 0x01;
12537 val != 0
12538 }
12539 #[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."]
12540 pub fn set_rwstop(&mut self, val: bool) {
12541 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
12542 }
12543 #[doc = "Read wait mode. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
12544 pub const fn rwmod(&self) -> bool {
12545 let val = (self.0 >> 10usize) & 0x01;
12546 val != 0
12547 }
12548 #[doc = "Read wait mode. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
12549 pub fn set_rwmod(&mut self, val: bool) {
12550 self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize);
12551 }
12552 #[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."]
12553 pub const fn sdioen(&self) -> bool {
12554 let val = (self.0 >> 11usize) & 0x01;
12555 val != 0
12556 }
12557 #[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."]
12558 pub fn set_sdioen(&mut self, val: bool) {
12559 self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize);
12560 }
12561 #[doc = "Enable the reception of the boot acknowledgment. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
12562 pub const fn bootacken(&self) -> bool {
12563 let val = (self.0 >> 12usize) & 0x01;
12564 val != 0
12565 }
12566 #[doc = "Enable the reception of the boot acknowledgment. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
12567 pub fn set_bootacken(&mut self, val: bool) {
12568 self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize);
12569 }
12570 #[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."]
12571 pub const fn fiforst(&self) -> bool {
12572 let val = (self.0 >> 13usize) & 0x01;
12573 val != 0
12574 }
12575 #[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."]
12576 pub fn set_fiforst(&mut self, val: bool) {
12577 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize);
12578 }
12579 }
12580 impl Default for Dctrl {
12581 fn default() -> Dctrl {
12582 Dctrl(0)
12583 }
12584 }
12585 #[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."]
12586 #[repr(transparent)]
12587 #[derive(Copy, Clone, Eq, PartialEq)]
12588 pub struct Dcntr(pub u32);
12589 impl Dcntr {
12590 #[doc = "Data count value When read, the number of remaining data bytes to be transferred is returned. Write has no effect."]
12591 pub const fn datacount(&self) -> u32 {
12592 let val = (self.0 >> 0usize) & 0x01ff_ffff;
12593 val as u32
12594 }
12595 #[doc = "Data count value When read, the number of remaining data bytes to be transferred is returned. Write has no effect."]
12596 pub fn set_datacount(&mut self, val: u32) {
12597 self.0 =
12598 (self.0 & !(0x01ff_ffff << 0usize)) | (((val as u32) & 0x01ff_ffff) << 0usize);
12599 }
12600 }
12601 impl Default for Dcntr {
12602 fn default() -> Dcntr {
12603 Dcntr(0)
12604 }
12605 }
12606 #[doc = "The SDMMC_CLKCR register controls the SDMMC_CK output clock, the SDMMC_RX_CLK receive clock, and the bus width."]
12607 #[repr(transparent)]
12608 #[derive(Copy, Clone, Eq, PartialEq)]
12609 pub struct Clkcr(pub u32);
12610 impl Clkcr {
12611 #[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.."]
12612 pub const fn clkdiv(&self) -> u16 {
12613 let val = (self.0 >> 0usize) & 0x03ff;
12614 val as u16
12615 }
12616 #[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.."]
12617 pub fn set_clkdiv(&mut self, val: u16) {
12618 self.0 = (self.0 & !(0x03ff << 0usize)) | (((val as u32) & 0x03ff) << 0usize);
12619 }
12620 #[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:"]
12621 pub const fn pwrsav(&self) -> bool {
12622 let val = (self.0 >> 12usize) & 0x01;
12623 val != 0
12624 }
12625 #[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:"]
12626 pub fn set_pwrsav(&mut self, val: bool) {
12627 self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize);
12628 }
12629 #[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)"]
12630 pub const fn widbus(&self) -> u8 {
12631 let val = (self.0 >> 14usize) & 0x03;
12632 val as u8
12633 }
12634 #[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)"]
12635 pub fn set_widbus(&mut self, val: u8) {
12636 self.0 = (self.0 & !(0x03 << 14usize)) | (((val as u32) & 0x03) << 14usize);
12637 }
12638 #[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."]
12639 pub const fn negedge(&self) -> bool {
12640 let val = (self.0 >> 16usize) & 0x01;
12641 val != 0
12642 }
12643 #[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."]
12644 pub fn set_negedge(&mut self, val: bool) {
12645 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
12646 }
12647 #[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."]
12648 pub const fn hwfc_en(&self) -> bool {
12649 let val = (self.0 >> 17usize) & 0x01;
12650 val != 0
12651 }
12652 #[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."]
12653 pub fn set_hwfc_en(&mut self, val: bool) {
12654 self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize);
12655 }
12656 #[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)"]
12657 pub const fn ddr(&self) -> bool {
12658 let val = (self.0 >> 18usize) & 0x01;
12659 val != 0
12660 }
12661 #[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)"]
12662 pub fn set_ddr(&mut self, val: bool) {
12663 self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize);
12664 }
12665 #[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)"]
12666 pub const fn busspeed(&self) -> bool {
12667 let val = (self.0 >> 19usize) & 0x01;
12668 val != 0
12669 }
12670 #[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)"]
12671 pub fn set_busspeed(&mut self, val: bool) {
12672 self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize);
12673 }
12674 #[doc = "Receive clock selection. These bits can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0)"]
12675 pub const fn selclkrx(&self) -> u8 {
12676 let val = (self.0 >> 20usize) & 0x03;
12677 val as u8
12678 }
12679 #[doc = "Receive clock selection. These bits can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0)"]
12680 pub fn set_selclkrx(&mut self, val: u8) {
12681 self.0 = (self.0 & !(0x03 << 20usize)) | (((val as u32) & 0x03) << 20usize);
12682 }
12683 }
12684 impl Default for Clkcr {
12685 fn default() -> Clkcr {
12686 Clkcr(0)
12687 }
12688 }
12689 #[doc = "The SDMMC_ARGR register contains a 32-bit command argument, which is sent to a card as part of a command message."]
12690 #[repr(transparent)]
12691 #[derive(Copy, Clone, Eq, PartialEq)]
12692 pub struct Argr(pub u32);
12693 impl Argr {
12694 #[doc = "Command argument. These bits can only be written by firmware when CPSM is disabled (CPSMEN = 0). Command argument sent to a card as part of a command message. If a command contains an argument, it must be loaded into this register before writing a command to the command register."]
12695 pub const fn cmdarg(&self) -> u32 {
12696 let val = (self.0 >> 0usize) & 0xffff_ffff;
12697 val as u32
12698 }
12699 #[doc = "Command argument. These bits can only be written by firmware when CPSM is disabled (CPSMEN = 0). Command argument sent to a card as part of a command message. If a command contains an argument, it must be loaded into this register before writing a command to the command register."]
12700 pub fn set_cmdarg(&mut self, val: u32) {
12701 self.0 =
12702 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
12703 }
12704 }
12705 impl Default for Argr {
12706 fn default() -> Argr {
12707 Argr(0)
12708 }
12709 }
12710 #[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."]
12711 #[repr(transparent)]
12712 #[derive(Copy, Clone, Eq, PartialEq)]
12713 pub struct Idmactrlr(pub u32);
12714 impl Idmactrlr {
12715 #[doc = "IDMA enable This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
12716 pub const fn idmaen(&self) -> bool {
12717 let val = (self.0 >> 0usize) & 0x01;
12718 val != 0
12719 }
12720 #[doc = "IDMA enable This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
12721 pub fn set_idmaen(&mut self, val: bool) {
12722 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
12723 }
12724 #[doc = "Buffer mode selection. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
12725 pub const fn idmabmode(&self) -> bool {
12726 let val = (self.0 >> 1usize) & 0x01;
12727 val != 0
12728 }
12729 #[doc = "Buffer mode selection. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
12730 pub fn set_idmabmode(&mut self, val: bool) {
12731 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
12732 }
12733 #[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."]
12734 pub const fn idmabact(&self) -> bool {
12735 let val = (self.0 >> 2usize) & 0x01;
12736 val != 0
12737 }
12738 #[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."]
12739 pub fn set_idmabact(&mut self, val: bool) {
12740 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
12741 }
12742 }
12743 impl Default for Idmactrlr {
12744 fn default() -> Idmactrlr {
12745 Idmactrlr(0)
12746 }
12747 }
12748 #[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."]
12749 #[repr(transparent)]
12750 #[derive(Copy, Clone, Eq, PartialEq)]
12751 pub struct Fifor(pub u32);
12752 impl Fifor {
12753 #[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."]
12754 pub const fn fifodata(&self) -> u32 {
12755 let val = (self.0 >> 0usize) & 0xffff_ffff;
12756 val as u32
12757 }
12758 #[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."]
12759 pub fn set_fifodata(&mut self, val: u32) {
12760 self.0 =
12761 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
12762 }
12763 }
12764 impl Default for Fifor {
12765 fn default() -> Fifor {
12766 Fifor(0)
12767 }
12768 }
12769 #[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."]
12770 #[repr(transparent)]
12771 #[derive(Copy, Clone, Eq, PartialEq)]
12772 pub struct Dtimer(pub u32);
12773 impl Dtimer {
12774 #[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."]
12775 pub const fn datatime(&self) -> u32 {
12776 let val = (self.0 >> 0usize) & 0xffff_ffff;
12777 val as u32
12778 }
12779 #[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."]
12780 pub fn set_datatime(&mut self, val: u32) {
12781 self.0 =
12782 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
12783 }
12784 }
12785 impl Default for Dtimer {
12786 fn default() -> Dtimer {
12787 Dtimer(0)
12788 }
12789 }
12790 #[doc = "The SDMMC_RESP1/2/3/4R registers contain the status of a card, which is part of the received response."]
12791 #[repr(transparent)]
12792 #[derive(Copy, Clone, Eq, PartialEq)]
12793 pub struct Resp2r(pub u32);
12794 impl Resp2r {
12795 #[doc = "see Table404."]
12796 pub const fn cardstatus2(&self) -> u32 {
12797 let val = (self.0 >> 0usize) & 0xffff_ffff;
12798 val as u32
12799 }
12800 #[doc = "see Table404."]
12801 pub fn set_cardstatus2(&mut self, val: u32) {
12802 self.0 =
12803 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
12804 }
12805 }
12806 impl Default for Resp2r {
12807 fn default() -> Resp2r {
12808 Resp2r(0)
12809 }
12810 }
12811 #[doc = "SDMMC IP version register"]
12812 #[repr(transparent)]
12813 #[derive(Copy, Clone, Eq, PartialEq)]
12814 pub struct Ver(pub u32);
12815 impl Ver {
12816 #[doc = "IP minor revision number."]
12817 pub const fn minrev(&self) -> u8 {
12818 let val = (self.0 >> 0usize) & 0x0f;
12819 val as u8
12820 }
12821 #[doc = "IP minor revision number."]
12822 pub fn set_minrev(&mut self, val: u8) {
12823 self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize);
12824 }
12825 #[doc = "IP major revision number."]
12826 pub const fn majrev(&self) -> u8 {
12827 let val = (self.0 >> 4usize) & 0x0f;
12828 val as u8
12829 }
12830 #[doc = "IP major revision number."]
12831 pub fn set_majrev(&mut self, val: u8) {
12832 self.0 = (self.0 & !(0x0f << 4usize)) | (((val as u32) & 0x0f) << 4usize);
12833 }
12834 }
12835 impl Default for Ver {
12836 fn default() -> Ver {
12837 Ver(0)
12838 }
12839 }
12840 #[doc = "The SDMMC_RESP1/2/3/4R registers contain the status of a card, which is part of the received response."]
12841 #[repr(transparent)]
12842 #[derive(Copy, Clone, Eq, PartialEq)]
12843 pub struct Resp3r(pub u32);
12844 impl Resp3r {
12845 #[doc = "see Table404."]
12846 pub const fn cardstatus3(&self) -> u32 {
12847 let val = (self.0 >> 0usize) & 0xffff_ffff;
12848 val as u32
12849 }
12850 #[doc = "see Table404."]
12851 pub fn set_cardstatus3(&mut self, val: u32) {
12852 self.0 =
12853 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
12854 }
12855 }
12856 impl Default for Resp3r {
12857 fn default() -> Resp3r {
12858 Resp3r(0)
12859 }
12860 }
12861 #[doc = "The SDMMC_IDMABASE1R register contains the double buffer configuration second buffer memory base address."]
12862 #[repr(transparent)]
12863 #[derive(Copy, Clone, Eq, PartialEq)]
12864 pub struct Idmabase1r(pub u32);
12865 impl Idmabase1r {
12866 #[doc = "Buffer 1 memory base address, shall be word aligned (bit [1:0]
12867are 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)."]
12868 pub const fn idmabase1(&self) -> u32 {
12869 let val = (self.0 >> 0usize) & 0xffff_ffff;
12870 val as u32
12871 }
12872 #[doc = "Buffer 1 memory base address, shall be word aligned (bit [1:0]
12873are 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)."]
12874 pub fn set_idmabase1(&mut self, val: u32) {
12875 self.0 =
12876 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
12877 }
12878 }
12879 impl Default for Idmabase1r {
12880 fn default() -> Idmabase1r {
12881 Idmabase1r(0)
12882 }
12883 }
12884 #[doc = "SDMMC command response register"]
12885 #[repr(transparent)]
12886 #[derive(Copy, Clone, Eq, PartialEq)]
12887 pub struct Respcmdr(pub u32);
12888 impl Respcmdr {
12889 #[doc = "Response command index"]
12890 pub const fn respcmd(&self) -> u8 {
12891 let val = (self.0 >> 0usize) & 0x3f;
12892 val as u8
12893 }
12894 #[doc = "Response command index"]
12895 pub fn set_respcmd(&mut self, val: u8) {
12896 self.0 = (self.0 & !(0x3f << 0usize)) | (((val as u32) & 0x3f) << 0usize);
12897 }
12898 }
12899 impl Default for Respcmdr {
12900 fn default() -> Respcmdr {
12901 Respcmdr(0)
12902 }
12903 }
12904 #[doc = "The SDMMC_RESP1/2/3/4R registers contain the status of a card, which is part of the received response."]
12905 #[repr(transparent)]
12906 #[derive(Copy, Clone, Eq, PartialEq)]
12907 pub struct Resp4r(pub u32);
12908 impl Resp4r {
12909 #[doc = "see Table404."]
12910 pub const fn cardstatus4(&self) -> u32 {
12911 let val = (self.0 >> 0usize) & 0xffff_ffff;
12912 val as u32
12913 }
12914 #[doc = "see Table404."]
12915 pub fn set_cardstatus4(&mut self, val: u32) {
12916 self.0 =
12917 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
12918 }
12919 }
12920 impl Default for Resp4r {
12921 fn default() -> Resp4r {
12922 Resp4r(0)
12923 }
12924 }
12925 #[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."]
12926 #[repr(transparent)]
12927 #[derive(Copy, Clone, Eq, PartialEq)]
12928 pub struct Idmabase0r(pub u32);
12929 impl Idmabase0r {
12930 #[doc = "Buffer 0 memory base address bits [31:2], shall be word aligned (bit [1:0]
12931are 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)."]
12932 pub const fn idmabase0(&self) -> u32 {
12933 let val = (self.0 >> 0usize) & 0xffff_ffff;
12934 val as u32
12935 }
12936 #[doc = "Buffer 0 memory base address bits [31:2], shall be word aligned (bit [1:0]
12937are 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)."]
12938 pub fn set_idmabase0(&mut self, val: u32) {
12939 self.0 =
12940 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
12941 }
12942 }
12943 impl Default for Idmabase0r {
12944 fn default() -> Idmabase0r {
12945 Idmabase0r(0)
12946 }
12947 }
12948 #[doc = "The SDMMC_IDMABSIZER register contains the buffers size when in double buffer configuration."]
12949 #[repr(transparent)]
12950 #[derive(Copy, Clone, Eq, PartialEq)]
12951 pub struct Idmabsizer(pub u32);
12952 impl Idmabsizer {
12953 #[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)."]
12954 pub const fn idmabndt(&self) -> u8 {
12955 let val = (self.0 >> 5usize) & 0xff;
12956 val as u8
12957 }
12958 #[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)."]
12959 pub fn set_idmabndt(&mut self, val: u8) {
12960 self.0 = (self.0 & !(0xff << 5usize)) | (((val as u32) & 0xff) << 5usize);
12961 }
12962 }
12963 impl Default for Idmabsizer {
12964 fn default() -> Idmabsizer {
12965 Idmabsizer(0)
12966 }
12967 }
12968 #[doc = "SDMMC IP identification register"]
12969 #[repr(transparent)]
12970 #[derive(Copy, Clone, Eq, PartialEq)]
12971 pub struct Id(pub u32);
12972 impl Id {
12973 #[doc = "SDMMC IP identification."]
12974 pub const fn ip_id(&self) -> u32 {
12975 let val = (self.0 >> 0usize) & 0xffff_ffff;
12976 val as u32
12977 }
12978 #[doc = "SDMMC IP identification."]
12979 pub fn set_ip_id(&mut self, val: u32) {
12980 self.0 =
12981 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
12982 }
12983 }
12984 impl Default for Id {
12985 fn default() -> Id {
12986 Id(0)
12987 }
12988 }
12989 }
12990}
12991pub mod spi_v2 {
12992 use crate::generic::*;
12993 #[doc = "Serial peripheral interface"]
12994 #[derive(Copy, Clone)]
12995 pub struct Spi(pub *mut u8);
12996 unsafe impl Send for Spi {}
12997 unsafe impl Sync for Spi {}
12998 impl Spi {
12999 #[doc = "control register 1"]
13000 pub fn cr1(self) -> Reg<regs::Cr1, RW> {
13001 unsafe { Reg::from_ptr(self.0.add(0usize)) }
13002 }
13003 #[doc = "control register 2"]
13004 pub fn cr2(self) -> Reg<regs::Cr2, RW> {
13005 unsafe { Reg::from_ptr(self.0.add(4usize)) }
13006 }
13007 #[doc = "status register"]
13008 pub fn sr(self) -> Reg<regs::Sr, RW> {
13009 unsafe { Reg::from_ptr(self.0.add(8usize)) }
13010 }
13011 #[doc = "data register"]
13012 pub fn dr(self) -> Reg<regs::Dr, RW> {
13013 unsafe { Reg::from_ptr(self.0.add(12usize)) }
13014 }
13015 #[doc = "CRC polynomial register"]
13016 pub fn crcpr(self) -> Reg<regs::Crcpr, RW> {
13017 unsafe { Reg::from_ptr(self.0.add(16usize)) }
13018 }
13019 #[doc = "RX CRC register"]
13020 pub fn rxcrcr(self) -> Reg<regs::Rxcrcr, R> {
13021 unsafe { Reg::from_ptr(self.0.add(20usize)) }
13022 }
13023 #[doc = "TX CRC register"]
13024 pub fn txcrcr(self) -> Reg<regs::Txcrcr, R> {
13025 unsafe { Reg::from_ptr(self.0.add(24usize)) }
13026 }
13027 }
13028 pub mod vals {
13029 use crate::generic::*;
13030 #[repr(transparent)]
13031 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
13032 pub struct Br(pub u8);
13033 impl Br {
13034 #[doc = "f_PCLK / 2"]
13035 pub const DIV2: Self = Self(0);
13036 #[doc = "f_PCLK / 4"]
13037 pub const DIV4: Self = Self(0x01);
13038 #[doc = "f_PCLK / 8"]
13039 pub const DIV8: Self = Self(0x02);
13040 #[doc = "f_PCLK / 16"]
13041 pub const DIV16: Self = Self(0x03);
13042 #[doc = "f_PCLK / 32"]
13043 pub const DIV32: Self = Self(0x04);
13044 #[doc = "f_PCLK / 64"]
13045 pub const DIV64: Self = Self(0x05);
13046 #[doc = "f_PCLK / 128"]
13047 pub const DIV128: Self = Self(0x06);
13048 #[doc = "f_PCLK / 256"]
13049 pub const DIV256: Self = Self(0x07);
13050 }
13051 #[repr(transparent)]
13052 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
13053 pub struct Lsbfirst(pub u8);
13054 impl Lsbfirst {
13055 #[doc = "Data is transmitted/received with the MSB first"]
13056 pub const MSBFIRST: Self = Self(0);
13057 #[doc = "Data is transmitted/received with the LSB first"]
13058 pub const LSBFIRST: Self = Self(0x01);
13059 }
13060 #[repr(transparent)]
13061 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
13062 pub struct LdmaTx(pub u8);
13063 impl LdmaTx {
13064 #[doc = "Number of data to transfer for transmit is even"]
13065 pub const EVEN: Self = Self(0);
13066 #[doc = "Number of data to transfer for transmit is odd"]
13067 pub const ODD: Self = Self(0x01);
13068 }
13069 #[repr(transparent)]
13070 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
13071 pub struct Frf(pub u8);
13072 impl Frf {
13073 #[doc = "SPI Motorola mode"]
13074 pub const MOTOROLA: Self = Self(0);
13075 #[doc = "SPI TI mode"]
13076 pub const TI: Self = Self(0x01);
13077 }
13078 #[repr(transparent)]
13079 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
13080 pub struct Bidioe(pub u8);
13081 impl Bidioe {
13082 #[doc = "Output disabled (receive-only mode)"]
13083 pub const OUTPUTDISABLED: Self = Self(0);
13084 #[doc = "Output enabled (transmit-only mode)"]
13085 pub const OUTPUTENABLED: Self = Self(0x01);
13086 }
13087 #[repr(transparent)]
13088 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
13089 pub struct Frer(pub u8);
13090 impl Frer {
13091 #[doc = "No frame format error"]
13092 pub const NOERROR: Self = Self(0);
13093 #[doc = "A frame format error occurred"]
13094 pub const ERROR: Self = Self(0x01);
13095 }
13096 #[repr(transparent)]
13097 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
13098 pub struct Crcnext(pub u8);
13099 impl Crcnext {
13100 #[doc = "Next transmit value is from Tx buffer"]
13101 pub const TXBUFFER: Self = Self(0);
13102 #[doc = "Next transmit value is from Tx CRC register"]
13103 pub const CRC: Self = Self(0x01);
13104 }
13105 #[repr(transparent)]
13106 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
13107 pub struct Ds(pub u8);
13108 impl Ds {
13109 #[doc = "4-bit"]
13110 pub const FOURBIT: Self = Self(0x03);
13111 #[doc = "5-bit"]
13112 pub const FIVEBIT: Self = Self(0x04);
13113 #[doc = "6-bit"]
13114 pub const SIXBIT: Self = Self(0x05);
13115 #[doc = "7-bit"]
13116 pub const SEVENBIT: Self = Self(0x06);
13117 #[doc = "8-bit"]
13118 pub const EIGHTBIT: Self = Self(0x07);
13119 #[doc = "9-bit"]
13120 pub const NINEBIT: Self = Self(0x08);
13121 #[doc = "10-bit"]
13122 pub const TENBIT: Self = Self(0x09);
13123 #[doc = "11-bit"]
13124 pub const ELEVENBIT: Self = Self(0x0a);
13125 #[doc = "12-bit"]
13126 pub const TWELVEBIT: Self = Self(0x0b);
13127 #[doc = "13-bit"]
13128 pub const THIRTEENBIT: Self = Self(0x0c);
13129 #[doc = "14-bit"]
13130 pub const FOURTEENBIT: Self = Self(0x0d);
13131 #[doc = "15-bit"]
13132 pub const FIFTEENBIT: Self = Self(0x0e);
13133 #[doc = "16-bit"]
13134 pub const SIXTEENBIT: Self = Self(0x0f);
13135 }
13136 #[repr(transparent)]
13137 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
13138 pub struct Cpha(pub u8);
13139 impl Cpha {
13140 #[doc = "The first clock transition is the first data capture edge"]
13141 pub const FIRSTEDGE: Self = Self(0);
13142 #[doc = "The second clock transition is the first data capture edge"]
13143 pub const SECONDEDGE: Self = Self(0x01);
13144 }
13145 #[repr(transparent)]
13146 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
13147 pub struct Frlvlr(pub u8);
13148 impl Frlvlr {
13149 #[doc = "Rx FIFO Empty"]
13150 pub const EMPTY: Self = Self(0);
13151 #[doc = "Rx 1/4 FIFO"]
13152 pub const QUARTER: Self = Self(0x01);
13153 #[doc = "Rx 1/2 FIFO"]
13154 pub const HALF: Self = Self(0x02);
13155 #[doc = "Rx FIFO full"]
13156 pub const FULL: Self = Self(0x03);
13157 }
13158 #[repr(transparent)]
13159 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
13160 pub struct Bidimode(pub u8);
13161 impl Bidimode {
13162 #[doc = "2-line unidirectional data mode selected"]
13163 pub const UNIDIRECTIONAL: Self = Self(0);
13164 #[doc = "1-line bidirectional data mode selected"]
13165 pub const BIDIRECTIONAL: Self = Self(0x01);
13166 }
13167 #[repr(transparent)]
13168 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
13169 pub struct Mstr(pub u8);
13170 impl Mstr {
13171 #[doc = "Slave configuration"]
13172 pub const SLAVE: Self = Self(0);
13173 #[doc = "Master configuration"]
13174 pub const MASTER: Self = Self(0x01);
13175 }
13176 #[repr(transparent)]
13177 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
13178 pub struct Crcl(pub u8);
13179 impl Crcl {
13180 #[doc = "8-bit CRC length"]
13181 pub const EIGHTBIT: Self = Self(0);
13182 #[doc = "16-bit CRC length"]
13183 pub const SIXTEENBIT: Self = Self(0x01);
13184 }
13185 #[repr(transparent)]
13186 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
13187 pub struct Rxonly(pub u8);
13188 impl Rxonly {
13189 #[doc = "Full duplex (Transmit and receive)"]
13190 pub const FULLDUPLEX: Self = Self(0);
13191 #[doc = "Output disabled (Receive-only mode)"]
13192 pub const OUTPUTDISABLED: Self = Self(0x01);
13193 }
13194 #[repr(transparent)]
13195 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
13196 pub struct Ftlvlr(pub u8);
13197 impl Ftlvlr {
13198 #[doc = "Tx FIFO Empty"]
13199 pub const EMPTY: Self = Self(0);
13200 #[doc = "Tx 1/4 FIFO"]
13201 pub const QUARTER: Self = Self(0x01);
13202 #[doc = "Tx 1/2 FIFO"]
13203 pub const HALF: Self = Self(0x02);
13204 #[doc = "Tx FIFO full"]
13205 pub const FULL: Self = Self(0x03);
13206 }
13207 #[repr(transparent)]
13208 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
13209 pub struct Frxth(pub u8);
13210 impl Frxth {
13211 #[doc = "RXNE event is generated if the FIFO level is greater than or equal to 1/2 (16-bit)"]
13212 pub const HALF: Self = Self(0);
13213 #[doc = "RXNE event is generated if the FIFO level is greater than or equal to 1/4 (8-bit)"]
13214 pub const QUARTER: Self = Self(0x01);
13215 }
13216 #[repr(transparent)]
13217 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
13218 pub struct LdmaRx(pub u8);
13219 impl LdmaRx {
13220 #[doc = "Number of data to transfer for receive is even"]
13221 pub const EVEN: Self = Self(0);
13222 #[doc = "Number of data to transfer for receive is odd"]
13223 pub const ODD: Self = Self(0x01);
13224 }
13225 #[repr(transparent)]
13226 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
13227 pub struct Cpol(pub u8);
13228 impl Cpol {
13229 #[doc = "CK to 0 when idle"]
13230 pub const IDLELOW: Self = Self(0);
13231 #[doc = "CK to 1 when idle"]
13232 pub const IDLEHIGH: Self = Self(0x01);
13233 }
13234 }
13235 pub mod regs {
13236 use crate::generic::*;
13237 #[doc = "control register 1"]
13238 #[repr(transparent)]
13239 #[derive(Copy, Clone, Eq, PartialEq)]
13240 pub struct Cr1(pub u32);
13241 impl Cr1 {
13242 #[doc = "Clock phase"]
13243 pub const fn cpha(&self) -> super::vals::Cpha {
13244>>>>>>> fc21f52 (Better interrupt handling)
13245 let val = (self.0 >> 0usize) & 0x01;
13246 super::vals::Cpha(val as u8)
13247 }
13248<<<<<<< HEAD
3329 #[doc = "Update generation"] 13249 #[doc = "Update generation"]
3330 pub fn set_ug(&mut self, val: bool) { 13250 pub fn set_ug(&mut self, val: bool) {
3331 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 13251 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
@@ -3363,9 +13283,54 @@ pub mod timer_v1 {
3363 } 13283 }
3364 #[doc = "Break generation"] 13284 #[doc = "Break generation"]
3365 pub const fn bg(&self) -> bool { 13285 pub const fn bg(&self) -> bool {
3366 let val = (self.0 >> 7usize) & 0x01; 13286=======
13287 #[doc = "Clock phase"]
13288 pub fn set_cpha(&mut self, val: super::vals::Cpha) {
13289 self.0 = (self.0 & !(0x01 << 0usize)) | (((val.0 as u32) & 0x01) << 0usize);
13290 }
13291 #[doc = "Clock polarity"]
13292 pub const fn cpol(&self) -> super::vals::Cpol {
13293 let val = (self.0 >> 1usize) & 0x01;
13294 super::vals::Cpol(val as u8)
13295 }
13296 #[doc = "Clock polarity"]
13297 pub fn set_cpol(&mut self, val: super::vals::Cpol) {
13298 self.0 = (self.0 & !(0x01 << 1usize)) | (((val.0 as u32) & 0x01) << 1usize);
13299 }
13300 #[doc = "Master selection"]
13301 pub const fn mstr(&self) -> super::vals::Mstr {
13302 let val = (self.0 >> 2usize) & 0x01;
13303 super::vals::Mstr(val as u8)
13304 }
13305 #[doc = "Master selection"]
13306 pub fn set_mstr(&mut self, val: super::vals::Mstr) {
13307 self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize);
13308 }
13309 #[doc = "Baud rate control"]
13310 pub const fn br(&self) -> super::vals::Br {
13311 let val = (self.0 >> 3usize) & 0x07;
13312 super::vals::Br(val as u8)
13313 }
13314 #[doc = "Baud rate control"]
13315 pub fn set_br(&mut self, val: super::vals::Br) {
13316 self.0 = (self.0 & !(0x07 << 3usize)) | (((val.0 as u32) & 0x07) << 3usize);
13317 }
13318 #[doc = "SPI enable"]
13319 pub const fn spe(&self) -> bool {
13320 let val = (self.0 >> 6usize) & 0x01;
3367 val != 0 13321 val != 0
3368 } 13322 }
13323 #[doc = "SPI enable"]
13324 pub fn set_spe(&mut self, val: bool) {
13325 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
13326 }
13327 #[doc = "Frame format"]
13328 pub const fn lsbfirst(&self) -> super::vals::Lsbfirst {
13329>>>>>>> fc21f52 (Better interrupt handling)
13330 let val = (self.0 >> 7usize) & 0x01;
13331 super::vals::Lsbfirst(val as u8)
13332 }
13333<<<<<<< HEAD
3369 #[doc = "Break generation"] 13334 #[doc = "Break generation"]
3370 pub fn set_bg(&mut self, val: bool) { 13335 pub fn set_bg(&mut self, val: bool) {
3371 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); 13336 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
@@ -4464,9 +14429,1016 @@ pub mod syscfg_l4 {
4464 impl Cfgr1 { 14429 impl Cfgr1 {
4465 #[doc = "Firewall disable"] 14430 #[doc = "Firewall disable"]
4466 pub const fn fwdis(&self) -> bool { 14431 pub const fn fwdis(&self) -> bool {
14432=======
14433 #[doc = "Frame format"]
14434 pub fn set_lsbfirst(&mut self, val: super::vals::Lsbfirst) {
14435 self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize);
14436 }
14437 #[doc = "Internal slave select"]
14438 pub const fn ssi(&self) -> bool {
14439 let val = (self.0 >> 8usize) & 0x01;
14440 val != 0
14441 }
14442 #[doc = "Internal slave select"]
14443 pub fn set_ssi(&mut self, val: bool) {
14444 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
14445 }
14446 #[doc = "Software slave management"]
14447 pub const fn ssm(&self) -> bool {
14448 let val = (self.0 >> 9usize) & 0x01;
14449 val != 0
14450 }
14451 #[doc = "Software slave management"]
14452 pub fn set_ssm(&mut self, val: bool) {
14453 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
14454 }
14455 #[doc = "Receive only"]
14456 pub const fn rxonly(&self) -> super::vals::Rxonly {
14457 let val = (self.0 >> 10usize) & 0x01;
14458 super::vals::Rxonly(val as u8)
14459 }
14460 #[doc = "Receive only"]
14461 pub fn set_rxonly(&mut self, val: super::vals::Rxonly) {
14462 self.0 = (self.0 & !(0x01 << 10usize)) | (((val.0 as u32) & 0x01) << 10usize);
14463 }
14464 #[doc = "CRC length"]
14465 pub const fn crcl(&self) -> super::vals::Crcl {
14466 let val = (self.0 >> 11usize) & 0x01;
14467 super::vals::Crcl(val as u8)
14468 }
14469 #[doc = "CRC length"]
14470 pub fn set_crcl(&mut self, val: super::vals::Crcl) {
14471 self.0 = (self.0 & !(0x01 << 11usize)) | (((val.0 as u32) & 0x01) << 11usize);
14472 }
14473 #[doc = "CRC transfer next"]
14474 pub const fn crcnext(&self) -> super::vals::Crcnext {
14475 let val = (self.0 >> 12usize) & 0x01;
14476 super::vals::Crcnext(val as u8)
14477 }
14478 #[doc = "CRC transfer next"]
14479 pub fn set_crcnext(&mut self, val: super::vals::Crcnext) {
14480 self.0 = (self.0 & !(0x01 << 12usize)) | (((val.0 as u32) & 0x01) << 12usize);
14481 }
14482 #[doc = "Hardware CRC calculation enable"]
14483 pub const fn crcen(&self) -> bool {
14484 let val = (self.0 >> 13usize) & 0x01;
14485 val != 0
14486 }
14487 #[doc = "Hardware CRC calculation enable"]
14488 pub fn set_crcen(&mut self, val: bool) {
14489 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize);
14490 }
14491 #[doc = "Output enable in bidirectional mode"]
14492 pub const fn bidioe(&self) -> super::vals::Bidioe {
14493 let val = (self.0 >> 14usize) & 0x01;
14494 super::vals::Bidioe(val as u8)
14495 }
14496 #[doc = "Output enable in bidirectional mode"]
14497 pub fn set_bidioe(&mut self, val: super::vals::Bidioe) {
14498 self.0 = (self.0 & !(0x01 << 14usize)) | (((val.0 as u32) & 0x01) << 14usize);
14499 }
14500 #[doc = "Bidirectional data mode enable"]
14501 pub const fn bidimode(&self) -> super::vals::Bidimode {
14502 let val = (self.0 >> 15usize) & 0x01;
14503 super::vals::Bidimode(val as u8)
14504 }
14505 #[doc = "Bidirectional data mode enable"]
14506 pub fn set_bidimode(&mut self, val: super::vals::Bidimode) {
14507 self.0 = (self.0 & !(0x01 << 15usize)) | (((val.0 as u32) & 0x01) << 15usize);
14508 }
14509 }
14510 impl Default for Cr1 {
14511 fn default() -> Cr1 {
14512 Cr1(0)
14513 }
14514 }
14515 #[doc = "status register"]
14516 #[repr(transparent)]
14517 #[derive(Copy, Clone, Eq, PartialEq)]
14518 pub struct Sr(pub u32);
14519 impl Sr {
14520 #[doc = "Receive buffer not empty"]
14521 pub const fn rxne(&self) -> bool {
14522 let val = (self.0 >> 0usize) & 0x01;
14523 val != 0
14524 }
14525 #[doc = "Receive buffer not empty"]
14526 pub fn set_rxne(&mut self, val: bool) {
14527 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
14528 }
14529 #[doc = "Transmit buffer empty"]
14530 pub const fn txe(&self) -> bool {
14531 let val = (self.0 >> 1usize) & 0x01;
14532 val != 0
14533 }
14534 #[doc = "Transmit buffer empty"]
14535 pub fn set_txe(&mut self, val: bool) {
14536 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
14537 }
14538 #[doc = "CRC error flag"]
14539 pub const fn crcerr(&self) -> bool {
14540 let val = (self.0 >> 4usize) & 0x01;
14541 val != 0
14542 }
14543 #[doc = "CRC error flag"]
14544 pub fn set_crcerr(&mut self, val: bool) {
14545 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
14546 }
14547 #[doc = "Mode fault"]
14548 pub const fn modf(&self) -> bool {
14549 let val = (self.0 >> 5usize) & 0x01;
14550 val != 0
14551 }
14552 #[doc = "Mode fault"]
14553 pub fn set_modf(&mut self, val: bool) {
14554 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
14555 }
14556 #[doc = "Overrun flag"]
14557 pub const fn ovr(&self) -> bool {
14558 let val = (self.0 >> 6usize) & 0x01;
14559 val != 0
14560 }
14561 #[doc = "Overrun flag"]
14562 pub fn set_ovr(&mut self, val: bool) {
14563 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
14564 }
14565 #[doc = "Busy flag"]
14566 pub const fn bsy(&self) -> bool {
14567 let val = (self.0 >> 7usize) & 0x01;
14568 val != 0
14569 }
14570 #[doc = "Busy flag"]
14571 pub fn set_bsy(&mut self, val: bool) {
14572 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
14573 }
14574 #[doc = "Frame format error"]
14575 pub const fn fre(&self) -> bool {
14576 let val = (self.0 >> 8usize) & 0x01;
14577 val != 0
14578 }
14579 #[doc = "Frame format error"]
14580 pub fn set_fre(&mut self, val: bool) {
14581 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
14582 }
14583 #[doc = "FIFO reception level"]
14584 pub const fn frlvl(&self) -> u8 {
14585 let val = (self.0 >> 9usize) & 0x03;
14586 val as u8
14587 }
14588 #[doc = "FIFO reception level"]
14589 pub fn set_frlvl(&mut self, val: u8) {
14590 self.0 = (self.0 & !(0x03 << 9usize)) | (((val as u32) & 0x03) << 9usize);
14591 }
14592 #[doc = "FIFO Transmission Level"]
14593 pub const fn ftlvl(&self) -> u8 {
14594 let val = (self.0 >> 11usize) & 0x03;
14595 val as u8
14596 }
14597 #[doc = "FIFO Transmission Level"]
14598 pub fn set_ftlvl(&mut self, val: u8) {
14599 self.0 = (self.0 & !(0x03 << 11usize)) | (((val as u32) & 0x03) << 11usize);
14600 }
14601 }
14602 impl Default for Sr {
14603 fn default() -> Sr {
14604 Sr(0)
14605 }
14606 }
14607 #[doc = "control register 2"]
14608 #[repr(transparent)]
14609 #[derive(Copy, Clone, Eq, PartialEq)]
14610 pub struct Cr2(pub u32);
14611 impl Cr2 {
14612 #[doc = "Rx buffer DMA enable"]
14613 pub const fn rxdmaen(&self) -> bool {
4467 let val = (self.0 >> 0usize) & 0x01; 14614 let val = (self.0 >> 0usize) & 0x01;
4468 val != 0 14615 val != 0
4469 } 14616 }
14617 #[doc = "Rx buffer DMA enable"]
14618 pub fn set_rxdmaen(&mut self, val: bool) {
14619 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
14620 }
14621 #[doc = "Tx buffer DMA enable"]
14622 pub const fn txdmaen(&self) -> bool {
14623 let val = (self.0 >> 1usize) & 0x01;
14624 val != 0
14625 }
14626 #[doc = "Tx buffer DMA enable"]
14627 pub fn set_txdmaen(&mut self, val: bool) {
14628 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
14629 }
14630 #[doc = "SS output enable"]
14631 pub const fn ssoe(&self) -> bool {
14632 let val = (self.0 >> 2usize) & 0x01;
14633 val != 0
14634 }
14635 #[doc = "SS output enable"]
14636 pub fn set_ssoe(&mut self, val: bool) {
14637 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
14638 }
14639 #[doc = "NSS pulse management"]
14640 pub const fn nssp(&self) -> bool {
14641 let val = (self.0 >> 3usize) & 0x01;
14642 val != 0
14643 }
14644 #[doc = "NSS pulse management"]
14645 pub fn set_nssp(&mut self, val: bool) {
14646 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
14647 }
14648 #[doc = "Frame format"]
14649 pub const fn frf(&self) -> super::vals::Frf {
14650 let val = (self.0 >> 4usize) & 0x01;
14651 super::vals::Frf(val as u8)
14652 }
14653 #[doc = "Frame format"]
14654 pub fn set_frf(&mut self, val: super::vals::Frf) {
14655 self.0 = (self.0 & !(0x01 << 4usize)) | (((val.0 as u32) & 0x01) << 4usize);
14656 }
14657 #[doc = "Error interrupt enable"]
14658 pub const fn errie(&self) -> bool {
14659 let val = (self.0 >> 5usize) & 0x01;
14660 val != 0
14661 }
14662 #[doc = "Error interrupt enable"]
14663 pub fn set_errie(&mut self, val: bool) {
14664 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
14665 }
14666 #[doc = "RX buffer not empty interrupt enable"]
14667 pub const fn rxneie(&self) -> bool {
14668 let val = (self.0 >> 6usize) & 0x01;
14669 val != 0
14670 }
14671 #[doc = "RX buffer not empty interrupt enable"]
14672 pub fn set_rxneie(&mut self, val: bool) {
14673 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
14674 }
14675 #[doc = "Tx buffer empty interrupt enable"]
14676 pub const fn txeie(&self) -> bool {
14677 let val = (self.0 >> 7usize) & 0x01;
14678 val != 0
14679 }
14680 #[doc = "Tx buffer empty interrupt enable"]
14681 pub fn set_txeie(&mut self, val: bool) {
14682 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
14683 }
14684 #[doc = "Data size"]
14685 pub const fn ds(&self) -> super::vals::Ds {
14686 let val = (self.0 >> 8usize) & 0x0f;
14687 super::vals::Ds(val as u8)
14688 }
14689 #[doc = "Data size"]
14690 pub fn set_ds(&mut self, val: super::vals::Ds) {
14691 self.0 = (self.0 & !(0x0f << 8usize)) | (((val.0 as u32) & 0x0f) << 8usize);
14692 }
14693 #[doc = "FIFO reception threshold"]
14694 pub const fn frxth(&self) -> super::vals::Frxth {
14695 let val = (self.0 >> 12usize) & 0x01;
14696 super::vals::Frxth(val as u8)
14697 }
14698 #[doc = "FIFO reception threshold"]
14699 pub fn set_frxth(&mut self, val: super::vals::Frxth) {
14700 self.0 = (self.0 & !(0x01 << 12usize)) | (((val.0 as u32) & 0x01) << 12usize);
14701 }
14702 #[doc = "Last DMA transfer for reception"]
14703 pub const fn ldma_rx(&self) -> super::vals::LdmaRx {
14704 let val = (self.0 >> 13usize) & 0x01;
14705 super::vals::LdmaRx(val as u8)
14706 }
14707 #[doc = "Last DMA transfer for reception"]
14708 pub fn set_ldma_rx(&mut self, val: super::vals::LdmaRx) {
14709 self.0 = (self.0 & !(0x01 << 13usize)) | (((val.0 as u32) & 0x01) << 13usize);
14710 }
14711 #[doc = "Last DMA transfer for transmission"]
14712 pub const fn ldma_tx(&self) -> super::vals::LdmaTx {
14713 let val = (self.0 >> 14usize) & 0x01;
14714 super::vals::LdmaTx(val as u8)
14715 }
14716 #[doc = "Last DMA transfer for transmission"]
14717 pub fn set_ldma_tx(&mut self, val: super::vals::LdmaTx) {
14718 self.0 = (self.0 & !(0x01 << 14usize)) | (((val.0 as u32) & 0x01) << 14usize);
14719 }
14720 }
14721 impl Default for Cr2 {
14722 fn default() -> Cr2 {
14723 Cr2(0)
14724 }
14725=======
14726 #[doc = "STOP bits"]
14727 pub fn set_stop(&mut self, val: super::vals::Stop) {
14728 self.0 = (self.0 & !(0x03 << 12usize)) | (((val.0 as u32) & 0x03) << 12usize);
14729 }
14730 #[doc = "LIN mode enable"]
14731 pub const fn linen(&self) -> bool {
14732 let val = (self.0 >> 14usize) & 0x01;
14733 val != 0
14734 }
14735 #[doc = "LIN mode enable"]
14736 pub fn set_linen(&mut self, val: bool) {
14737 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize);
14738 }
14739 }
14740 impl Default for Cr2Usart {
14741 fn default() -> Cr2Usart {
14742 Cr2Usart(0)
14743 }
14744 }
14745 #[doc = "Control register 3"]
14746 #[repr(transparent)]
14747 #[derive(Copy, Clone, Eq, PartialEq)]
14748 pub struct Cr3(pub u32);
14749 impl Cr3 {
14750 #[doc = "Error interrupt enable"]
14751 pub const fn eie(&self) -> bool {
14752 let val = (self.0 >> 0usize) & 0x01;
14753 val != 0
14754 }
14755 #[doc = "Error interrupt enable"]
14756 pub fn set_eie(&mut self, val: bool) {
14757 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
14758 }
14759 #[doc = "IrDA mode enable"]
14760 pub const fn iren(&self) -> bool {
14761 let val = (self.0 >> 1usize) & 0x01;
14762 val != 0
14763 }
14764 #[doc = "IrDA mode enable"]
14765 pub fn set_iren(&mut self, val: bool) {
14766 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
14767 }
14768 #[doc = "IrDA low-power"]
14769 pub const fn irlp(&self) -> super::vals::Irlp {
14770 let val = (self.0 >> 2usize) & 0x01;
14771 super::vals::Irlp(val as u8)
14772 }
14773 #[doc = "IrDA low-power"]
14774 pub fn set_irlp(&mut self, val: super::vals::Irlp) {
14775 self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize);
14776 }
14777 #[doc = "Half-duplex selection"]
14778 pub const fn hdsel(&self) -> super::vals::Hdsel {
14779 let val = (self.0 >> 3usize) & 0x01;
14780 super::vals::Hdsel(val as u8)
14781 }
14782 #[doc = "Half-duplex selection"]
14783 pub fn set_hdsel(&mut self, val: super::vals::Hdsel) {
14784 self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize);
14785 }
14786 #[doc = "DMA enable receiver"]
14787 pub const fn dmar(&self) -> bool {
14788 let val = (self.0 >> 6usize) & 0x01;
14789 val != 0
14790 }
14791 #[doc = "DMA enable receiver"]
14792 pub fn set_dmar(&mut self, val: bool) {
14793 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
14794 }
14795 #[doc = "DMA enable transmitter"]
14796 pub const fn dmat(&self) -> bool {
14797 let val = (self.0 >> 7usize) & 0x01;
14798 val != 0
14799 }
14800 #[doc = "DMA enable transmitter"]
14801 pub fn set_dmat(&mut self, val: bool) {
14802 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
14803 }
14804 }
14805 impl Default for Cr3 {
14806 fn default() -> Cr3 {
14807 Cr3(0)
14808 }
14809 }
14810 #[doc = "Control register 3"]
14811 #[repr(transparent)]
14812 #[derive(Copy, Clone, Eq, PartialEq)]
14813 pub struct Cr3Usart(pub u32);
14814 impl Cr3Usart {
14815 #[doc = "Error interrupt enable"]
14816 pub const fn eie(&self) -> bool {
14817 let val = (self.0 >> 0usize) & 0x01;
14818 val != 0
14819 }
14820 #[doc = "Error interrupt enable"]
14821 pub fn set_eie(&mut self, val: bool) {
14822 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
14823 }
14824 #[doc = "IrDA mode enable"]
14825 pub const fn iren(&self) -> bool {
14826 let val = (self.0 >> 1usize) & 0x01;
14827 val != 0
14828 }
14829 #[doc = "IrDA mode enable"]
14830 pub fn set_iren(&mut self, val: bool) {
14831 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
14832 }
14833 #[doc = "IrDA low-power"]
14834 pub const fn irlp(&self) -> super::vals::Irlp {
14835 let val = (self.0 >> 2usize) & 0x01;
14836 super::vals::Irlp(val as u8)
14837 }
14838 #[doc = "IrDA low-power"]
14839 pub fn set_irlp(&mut self, val: super::vals::Irlp) {
14840 self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize);
14841 }
14842 #[doc = "Half-duplex selection"]
14843 pub const fn hdsel(&self) -> super::vals::Hdsel {
14844 let val = (self.0 >> 3usize) & 0x01;
14845 super::vals::Hdsel(val as u8)
14846 }
14847 #[doc = "Half-duplex selection"]
14848 pub fn set_hdsel(&mut self, val: super::vals::Hdsel) {
14849 self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize);
14850 }
14851 #[doc = "Smartcard NACK enable"]
14852 pub const fn nack(&self) -> bool {
14853 let val = (self.0 >> 4usize) & 0x01;
14854 val != 0
14855 }
14856 #[doc = "Smartcard NACK enable"]
14857 pub fn set_nack(&mut self, val: bool) {
14858 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
14859 }
14860 #[doc = "Smartcard mode enable"]
14861 pub const fn scen(&self) -> bool {
14862 let val = (self.0 >> 5usize) & 0x01;
14863 val != 0
14864 }
14865 #[doc = "Smartcard mode enable"]
14866 pub fn set_scen(&mut self, val: bool) {
14867 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
14868 }
14869 #[doc = "DMA enable receiver"]
14870 pub const fn dmar(&self) -> bool {
14871 let val = (self.0 >> 6usize) & 0x01;
14872 val != 0
14873 }
14874 #[doc = "DMA enable receiver"]
14875 pub fn set_dmar(&mut self, val: bool) {
14876 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
14877 }
14878 #[doc = "DMA enable transmitter"]
14879 pub const fn dmat(&self) -> bool {
14880 let val = (self.0 >> 7usize) & 0x01;
14881 val != 0
14882 }
14883 #[doc = "DMA enable transmitter"]
14884 pub fn set_dmat(&mut self, val: bool) {
14885 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
14886 }
14887 #[doc = "RTS enable"]
14888 pub const fn rtse(&self) -> bool {
14889 let val = (self.0 >> 8usize) & 0x01;
14890 val != 0
14891 }
14892 #[doc = "RTS enable"]
14893 pub fn set_rtse(&mut self, val: bool) {
14894 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
14895 }
14896 #[doc = "CTS enable"]
14897 pub const fn ctse(&self) -> bool {
14898 let val = (self.0 >> 9usize) & 0x01;
14899 val != 0
14900 }
14901 #[doc = "CTS enable"]
14902 pub fn set_ctse(&mut self, val: bool) {
14903 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
14904 }
14905 #[doc = "CTS interrupt enable"]
14906 pub const fn ctsie(&self) -> bool {
14907 let val = (self.0 >> 10usize) & 0x01;
14908 val != 0
14909 }
14910 #[doc = "CTS interrupt enable"]
14911 pub fn set_ctsie(&mut self, val: bool) {
14912 self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize);
14913 }
14914 }
14915 impl Default for Cr3Usart {
14916 fn default() -> Cr3Usart {
14917 Cr3Usart(0)
14918 }
14919 }
14920 #[doc = "Data register"]
14921 #[repr(transparent)]
14922 #[derive(Copy, Clone, Eq, PartialEq)]
14923 pub struct Dr(pub u32);
14924 impl Dr {
14925 #[doc = "Data value"]
14926 pub const fn dr(&self) -> u16 {
14927 let val = (self.0 >> 0usize) & 0x01ff;
14928 val as u16
14929 }
14930 #[doc = "Data value"]
14931 pub fn set_dr(&mut self, val: u16) {
14932 self.0 = (self.0 & !(0x01ff << 0usize)) | (((val as u32) & 0x01ff) << 0usize);
14933 }
14934 }
14935 impl Default for Dr {
14936 fn default() -> Dr {
14937 Dr(0)
14938 }
14939 }
14940 }
14941}
14942pub mod spi_v2 {
14943 use crate::generic::*;
14944 #[doc = "Serial peripheral interface"]
14945 #[derive(Copy, Clone)]
14946 pub struct Spi(pub *mut u8);
14947 unsafe impl Send for Spi {}
14948 unsafe impl Sync for Spi {}
14949 impl Spi {
14950 #[doc = "control register 1"]
14951 pub fn cr1(self) -> Reg<regs::Cr1, RW> {
14952 unsafe { Reg::from_ptr(self.0.add(0usize)) }
14953 }
14954 #[doc = "control register 2"]
14955 pub fn cr2(self) -> Reg<regs::Cr2, RW> {
14956 unsafe { Reg::from_ptr(self.0.add(4usize)) }
14957 }
14958 #[doc = "status register"]
14959 pub fn sr(self) -> Reg<regs::Sr, RW> {
14960 unsafe { Reg::from_ptr(self.0.add(8usize)) }
14961 }
14962 #[doc = "data register"]
14963 pub fn dr(self) -> Reg<regs::Dr, RW> {
14964 unsafe { Reg::from_ptr(self.0.add(12usize)) }
14965 }
14966 #[doc = "CRC polynomial register"]
14967 pub fn crcpr(self) -> Reg<regs::Crcpr, RW> {
14968 unsafe { Reg::from_ptr(self.0.add(16usize)) }
14969 }
14970 #[doc = "RX CRC register"]
14971 pub fn rxcrcr(self) -> Reg<regs::Rxcrcr, R> {
14972 unsafe { Reg::from_ptr(self.0.add(20usize)) }
14973 }
14974 #[doc = "TX CRC register"]
14975 pub fn txcrcr(self) -> Reg<regs::Txcrcr, R> {
14976 unsafe { Reg::from_ptr(self.0.add(24usize)) }
14977 }
14978 }
14979 pub mod vals {
14980 use crate::generic::*;
14981 #[repr(transparent)]
14982 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
14983 pub struct LdmaTx(pub u8);
14984 impl LdmaTx {
14985 #[doc = "Number of data to transfer for transmit is even"]
14986 pub const EVEN: Self = Self(0);
14987 #[doc = "Number of data to transfer for transmit is odd"]
14988 pub const ODD: Self = Self(0x01);
14989 }
14990 #[repr(transparent)]
14991 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
14992 pub struct Br(pub u8);
14993 impl Br {
14994 #[doc = "f_PCLK / 2"]
14995 pub const DIV2: Self = Self(0);
14996 #[doc = "f_PCLK / 4"]
14997 pub const DIV4: Self = Self(0x01);
14998 #[doc = "f_PCLK / 8"]
14999 pub const DIV8: Self = Self(0x02);
15000 #[doc = "f_PCLK / 16"]
15001 pub const DIV16: Self = Self(0x03);
15002 #[doc = "f_PCLK / 32"]
15003 pub const DIV32: Self = Self(0x04);
15004 #[doc = "f_PCLK / 64"]
15005 pub const DIV64: Self = Self(0x05);
15006 #[doc = "f_PCLK / 128"]
15007 pub const DIV128: Self = Self(0x06);
15008 #[doc = "f_PCLK / 256"]
15009 pub const DIV256: Self = Self(0x07);
15010 }
15011 #[repr(transparent)]
15012 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
15013 pub struct Cpol(pub u8);
15014 impl Cpol {
15015 #[doc = "CK to 0 when idle"]
15016 pub const IDLELOW: Self = Self(0);
15017 #[doc = "CK to 1 when idle"]
15018 pub const IDLEHIGH: Self = Self(0x01);
15019 }
15020 #[repr(transparent)]
15021 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
15022 pub struct Bidimode(pub u8);
15023 impl Bidimode {
15024 #[doc = "2-line unidirectional data mode selected"]
15025 pub const UNIDIRECTIONAL: Self = Self(0);
15026 #[doc = "1-line bidirectional data mode selected"]
15027 pub const BIDIRECTIONAL: Self = Self(0x01);
15028 }
15029 #[repr(transparent)]
15030 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
15031 pub struct Mstr(pub u8);
15032 impl Mstr {
15033 #[doc = "Slave configuration"]
15034 pub const SLAVE: Self = Self(0);
15035 #[doc = "Master configuration"]
15036 pub const MASTER: Self = Self(0x01);
15037 }
15038 #[repr(transparent)]
15039 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
15040 pub struct Rxonly(pub u8);
15041 impl Rxonly {
15042 #[doc = "Full duplex (Transmit and receive)"]
15043 pub const FULLDUPLEX: Self = Self(0);
15044 #[doc = "Output disabled (Receive-only mode)"]
15045 pub const OUTPUTDISABLED: Self = Self(0x01);
15046 }
15047 #[repr(transparent)]
15048 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
15049 pub struct Frxth(pub u8);
15050 impl Frxth {
15051 #[doc = "RXNE event is generated if the FIFO level is greater than or equal to 1/2 (16-bit)"]
15052 pub const HALF: Self = Self(0);
15053 #[doc = "RXNE event is generated if the FIFO level is greater than or equal to 1/4 (8-bit)"]
15054 pub const QUARTER: Self = Self(0x01);
15055 }
15056 #[repr(transparent)]
15057 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
15058 pub struct Bidioe(pub u8);
15059 impl Bidioe {
15060 #[doc = "Output disabled (receive-only mode)"]
15061 pub const OUTPUTDISABLED: Self = Self(0);
15062 #[doc = "Output enabled (transmit-only mode)"]
15063 pub const OUTPUTENABLED: Self = Self(0x01);
15064 }
15065 #[repr(transparent)]
15066 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
15067 pub struct Frlvlr(pub u8);
15068 impl Frlvlr {
15069 #[doc = "Rx FIFO Empty"]
15070 pub const EMPTY: Self = Self(0);
15071 #[doc = "Rx 1/4 FIFO"]
15072 pub const QUARTER: Self = Self(0x01);
15073 #[doc = "Rx 1/2 FIFO"]
15074 pub const HALF: Self = Self(0x02);
15075 #[doc = "Rx FIFO full"]
15076 pub const FULL: Self = Self(0x03);
15077 }
15078 #[repr(transparent)]
15079 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
15080 pub struct Frer(pub u8);
15081 impl Frer {
15082 #[doc = "No frame format error"]
15083 pub const NOERROR: Self = Self(0);
15084 #[doc = "A frame format error occurred"]
15085 pub const ERROR: Self = Self(0x01);
15086 }
15087 #[repr(transparent)]
15088 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
15089 pub struct Crcnext(pub u8);
15090 impl Crcnext {
15091 #[doc = "Next transmit value is from Tx buffer"]
15092 pub const TXBUFFER: Self = Self(0);
15093 #[doc = "Next transmit value is from Tx CRC register"]
15094 pub const CRC: Self = Self(0x01);
15095 }
15096 #[repr(transparent)]
15097 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
15098 pub struct Frf(pub u8);
15099 impl Frf {
15100 #[doc = "SPI Motorola mode"]
15101 pub const MOTOROLA: Self = Self(0);
15102 #[doc = "SPI TI mode"]
15103 pub const TI: Self = Self(0x01);
15104 }
15105 #[repr(transparent)]
15106 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
15107 pub struct LdmaRx(pub u8);
15108 impl LdmaRx {
15109 #[doc = "Number of data to transfer for receive is even"]
15110 pub const EVEN: Self = Self(0);
15111 #[doc = "Number of data to transfer for receive is odd"]
15112 pub const ODD: Self = Self(0x01);
15113 }
15114 #[repr(transparent)]
15115 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
15116 pub struct Lsbfirst(pub u8);
15117 impl Lsbfirst {
15118 #[doc = "Data is transmitted/received with the MSB first"]
15119 pub const MSBFIRST: Self = Self(0);
15120 #[doc = "Data is transmitted/received with the LSB first"]
15121 pub const LSBFIRST: Self = Self(0x01);
15122 }
15123 #[repr(transparent)]
15124 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
15125 pub struct Crcl(pub u8);
15126 impl Crcl {
15127 #[doc = "8-bit CRC length"]
15128 pub const EIGHTBIT: Self = Self(0);
15129 #[doc = "16-bit CRC length"]
15130 pub const SIXTEENBIT: Self = Self(0x01);
15131>>>>>>> Better interrupt handling
15132 }
15133 #[doc = "data register"]
15134 #[repr(transparent)]
15135<<<<<<< HEAD
15136 #[derive(Copy, Clone, Eq, PartialEq)]
15137 pub struct Dr(pub u32);
15138 impl Dr {
15139 #[doc = "Data register"]
15140 pub const fn dr(&self) -> u16 {
15141 let val = (self.0 >> 0usize) & 0xffff;
15142 val as u16
15143 }
15144 #[doc = "Data register"]
15145 pub fn set_dr(&mut self, val: u16) {
15146 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
15147 }
15148 }
15149 impl Default for Dr {
15150 fn default() -> Dr {
15151 Dr(0)
15152 }
15153=======
15154 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
15155 pub struct Ftlvlr(pub u8);
15156 impl Ftlvlr {
15157 #[doc = "Tx FIFO Empty"]
15158 pub const EMPTY: Self = Self(0);
15159 #[doc = "Tx 1/4 FIFO"]
15160 pub const QUARTER: Self = Self(0x01);
15161 #[doc = "Tx 1/2 FIFO"]
15162 pub const HALF: Self = Self(0x02);
15163 #[doc = "Tx FIFO full"]
15164 pub const FULL: Self = Self(0x03);
15165>>>>>>> Better interrupt handling
15166 }
15167 #[doc = "CRC polynomial register"]
15168 #[repr(transparent)]
15169<<<<<<< HEAD
15170 #[derive(Copy, Clone, Eq, PartialEq)]
15171 pub struct Crcpr(pub u32);
15172 impl Crcpr {
15173 #[doc = "CRC polynomial register"]
15174 pub const fn crcpoly(&self) -> u16 {
15175 let val = (self.0 >> 0usize) & 0xffff;
15176 val as u16
15177 }
15178 #[doc = "CRC polynomial register"]
15179 pub fn set_crcpoly(&mut self, val: u16) {
15180 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
15181 }
15182 }
15183 impl Default for Crcpr {
15184 fn default() -> Crcpr {
15185 Crcpr(0)
15186 }
15187 }
15188 #[doc = "RX CRC register"]
15189 #[repr(transparent)]
15190 #[derive(Copy, Clone, Eq, PartialEq)]
15191 pub struct Rxcrcr(pub u32);
15192 impl Rxcrcr {
15193 #[doc = "Rx CRC register"]
15194 pub const fn rx_crc(&self) -> u16 {
15195 let val = (self.0 >> 0usize) & 0xffff;
15196 val as u16
15197 }
15198 #[doc = "Rx CRC register"]
15199 pub fn set_rx_crc(&mut self, val: u16) {
15200 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
15201 }
15202 }
15203 impl Default for Rxcrcr {
15204 fn default() -> Rxcrcr {
15205 Rxcrcr(0)
15206 }
15207 }
15208 #[doc = "TX CRC register"]
15209 #[repr(transparent)]
15210 #[derive(Copy, Clone, Eq, PartialEq)]
15211 pub struct Txcrcr(pub u32);
15212 impl Txcrcr {
15213 #[doc = "Tx CRC register"]
15214 pub const fn tx_crc(&self) -> u16 {
15215 let val = (self.0 >> 0usize) & 0xffff;
15216 val as u16
15217 }
15218 #[doc = "Tx CRC register"]
15219 pub fn set_tx_crc(&mut self, val: u16) {
15220 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
15221 }
15222 }
15223 impl Default for Txcrcr {
15224 fn default() -> Txcrcr {
15225 Txcrcr(0)
15226 }
15227 }
15228 }
15229}
15230pub mod dma_v2 {
15231 use crate::generic::*;
15232 #[doc = "DMA controller"]
15233 #[derive(Copy, Clone)]
15234 pub struct Dma(pub *mut u8);
15235 unsafe impl Send for Dma {}
15236 unsafe impl Sync for Dma {}
15237 impl Dma {
15238 #[doc = "low interrupt status register"]
15239 pub fn isr(self, n: usize) -> Reg<regs::Isr, R> {
15240 assert!(n < 2usize);
15241 unsafe { Reg::from_ptr(self.0.add(0usize + n * 4usize)) }
15242 }
15243 #[doc = "low interrupt flag clear register"]
15244 pub fn ifcr(self, n: usize) -> Reg<regs::Ifcr, W> {
15245 assert!(n < 2usize);
15246 unsafe { Reg::from_ptr(self.0.add(8usize + n * 4usize)) }
15247 }
15248 #[doc = "Stream cluster: S?CR, S?NDTR, S?M0AR, S?M1AR and S?FCR registers"]
15249 pub fn st(self, n: usize) -> St {
15250 assert!(n < 8usize);
15251 unsafe { St(self.0.add(16usize + n * 24usize)) }
15252 }
15253 }
15254 #[doc = "Stream cluster: S?CR, S?NDTR, S?M0AR, S?M1AR and S?FCR registers"]
15255 #[derive(Copy, Clone)]
15256 pub struct St(pub *mut u8);
15257 unsafe impl Send for St {}
15258 unsafe impl Sync for St {}
15259 impl St {
15260 #[doc = "stream x configuration register"]
15261 pub fn cr(self) -> Reg<regs::Cr, RW> {
15262 unsafe { Reg::from_ptr(self.0.add(0usize)) }
15263 }
15264 #[doc = "stream x number of data register"]
15265 pub fn ndtr(self) -> Reg<regs::Ndtr, RW> {
15266 unsafe { Reg::from_ptr(self.0.add(4usize)) }
15267 }
15268 #[doc = "stream x peripheral address register"]
15269 pub fn par(self) -> Reg<u32, RW> {
15270 unsafe { Reg::from_ptr(self.0.add(8usize)) }
15271 }
15272 #[doc = "stream x memory 0 address register"]
15273 pub fn m0ar(self) -> Reg<u32, RW> {
15274 unsafe { Reg::from_ptr(self.0.add(12usize)) }
15275 }
15276 #[doc = "stream x memory 1 address register"]
15277 pub fn m1ar(self) -> Reg<u32, RW> {
15278 unsafe { Reg::from_ptr(self.0.add(16usize)) }
15279 }
15280 #[doc = "stream x FIFO control register"]
15281 pub fn fcr(self) -> Reg<regs::Fcr, RW> {
15282 unsafe { Reg::from_ptr(self.0.add(20usize)) }
15283 }
15284 }
15285 pub mod vals {
15286 use crate::generic::*;
15287 #[repr(transparent)]
15288 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
15289 pub struct Pincos(pub u8);
15290 impl Pincos {
15291 #[doc = "The offset size for the peripheral address calculation is linked to the PSIZE"]
15292 pub const PSIZE: Self = Self(0);
15293 #[doc = "The offset size for the peripheral address calculation is fixed to 4 (32-bit alignment)"]
15294 pub const FIXED4: Self = Self(0x01);
15295=======
15296 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
15297 pub struct Ds(pub u8);
15298 impl Ds {
15299 #[doc = "4-bit"]
15300 pub const FOURBIT: Self = Self(0x03);
15301 #[doc = "5-bit"]
15302 pub const FIVEBIT: Self = Self(0x04);
15303 #[doc = "6-bit"]
15304 pub const SIXBIT: Self = Self(0x05);
15305 #[doc = "7-bit"]
15306 pub const SEVENBIT: Self = Self(0x06);
15307 #[doc = "8-bit"]
15308 pub const EIGHTBIT: Self = Self(0x07);
15309 #[doc = "9-bit"]
15310 pub const NINEBIT: Self = Self(0x08);
15311 #[doc = "10-bit"]
15312 pub const TENBIT: Self = Self(0x09);
15313 #[doc = "11-bit"]
15314 pub const ELEVENBIT: Self = Self(0x0a);
15315 #[doc = "12-bit"]
15316 pub const TWELVEBIT: Self = Self(0x0b);
15317 #[doc = "13-bit"]
15318 pub const THIRTEENBIT: Self = Self(0x0c);
15319 #[doc = "14-bit"]
15320 pub const FOURTEENBIT: Self = Self(0x0d);
15321 #[doc = "15-bit"]
15322 pub const FIFTEENBIT: Self = Self(0x0e);
15323 #[doc = "16-bit"]
15324 pub const SIXTEENBIT: Self = Self(0x0f);
15325 }
15326 #[repr(transparent)]
15327 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
15328 pub struct Cpha(pub u8);
15329 impl Cpha {
15330 #[doc = "The first clock transition is the first data capture edge"]
15331 pub const FIRSTEDGE: Self = Self(0);
15332 #[doc = "The second clock transition is the first data capture edge"]
15333 pub const SECONDEDGE: Self = Self(0x01);
15334 }
15335 }
15336 pub mod regs {
15337 use crate::generic::*;
15338 #[doc = "status register"]
15339 #[repr(transparent)]
15340 #[derive(Copy, Clone, Eq, PartialEq)]
15341 pub struct Sr(pub u32);
15342 impl Sr {
15343 #[doc = "Receive buffer not empty"]
15344 pub const fn rxne(&self) -> bool {
15345 let val = (self.0 >> 0usize) & 0x01;
15346 val != 0
15347 }
15348 #[doc = "Receive buffer not empty"]
15349 pub fn set_rxne(&mut self, val: bool) {
15350 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
15351 }
15352 #[doc = "Transmit buffer empty"]
15353 pub const fn txe(&self) -> bool {
15354 let val = (self.0 >> 1usize) & 0x01;
15355 val != 0
15356 }
15357 #[doc = "Transmit buffer empty"]
15358 pub fn set_txe(&mut self, val: bool) {
15359 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
15360 }
15361 #[doc = "CRC error flag"]
15362 pub const fn crcerr(&self) -> bool {
15363 let val = (self.0 >> 4usize) & 0x01;
15364 val != 0
15365 }
15366 #[doc = "CRC error flag"]
15367 pub fn set_crcerr(&mut self, val: bool) {
15368 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
15369 }
15370 #[doc = "Mode fault"]
15371 pub const fn modf(&self) -> bool {
15372 let val = (self.0 >> 5usize) & 0x01;
15373 val != 0
15374 }
15375 #[doc = "Mode fault"]
15376 pub fn set_modf(&mut self, val: bool) {
15377 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
15378 }
15379 #[doc = "Overrun flag"]
15380 pub const fn ovr(&self) -> bool {
15381 let val = (self.0 >> 6usize) & 0x01;
15382 val != 0
15383 }
15384 #[doc = "Overrun flag"]
15385 pub fn set_ovr(&mut self, val: bool) {
15386 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
15387 }
15388 #[doc = "Busy flag"]
15389 pub const fn bsy(&self) -> bool {
15390 let val = (self.0 >> 7usize) & 0x01;
15391 val != 0
15392 }
15393 #[doc = "Busy flag"]
15394 pub fn set_bsy(&mut self, val: bool) {
15395 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
15396 }
15397 #[doc = "Frame format error"]
15398 pub const fn fre(&self) -> bool {
15399 let val = (self.0 >> 8usize) & 0x01;
15400 val != 0
15401 }
15402 #[doc = "Frame format error"]
15403 pub fn set_fre(&mut self, val: bool) {
15404 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
15405 }
15406 #[doc = "FIFO reception level"]
15407 pub const fn frlvl(&self) -> u8 {
15408 let val = (self.0 >> 9usize) & 0x03;
15409 val as u8
15410 }
15411 #[doc = "FIFO reception level"]
15412 pub fn set_frlvl(&mut self, val: u8) {
15413 self.0 = (self.0 & !(0x03 << 9usize)) | (((val as u32) & 0x03) << 9usize);
15414 }
15415 #[doc = "FIFO Transmission Level"]
15416 pub const fn ftlvl(&self) -> u8 {
15417 let val = (self.0 >> 11usize) & 0x03;
15418 val as u8
15419 }
15420 #[doc = "FIFO Transmission Level"]
15421 pub fn set_ftlvl(&mut self, val: u8) {
15422 self.0 = (self.0 & !(0x03 << 11usize)) | (((val as u32) & 0x03) << 11usize);
15423 }
15424 }
15425 impl Default for Sr {
15426 fn default() -> Sr {
15427 Sr(0)
15428 }
15429 }
15430 #[doc = "control register 1"]
15431 #[repr(transparent)]
15432 #[derive(Copy, Clone, Eq, PartialEq)]
15433 pub struct Cr1(pub u32);
15434 impl Cr1 {
15435 #[doc = "Clock phase"]
15436 pub const fn cpha(&self) -> super::vals::Cpha {
15437>>>>>>> fc21f52 (Better interrupt handling)
15438 let val = (self.0 >> 0usize) & 0x01;
15439 super::vals::Cpha(val as u8)
15440 }
15441<<<<<<< HEAD
4470 #[doc = "Firewall disable"] 15442 #[doc = "Firewall disable"]
4471 pub fn set_fwdis(&mut self, val: bool) { 15443 pub fn set_fwdis(&mut self, val: bool) {
4472 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 15444 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
@@ -4674,11 +15646,352 @@ pub mod syscfg_l4 {
4674 impl Default for Cfgr2 { 15646 impl Default for Cfgr2 {
4675 fn default() -> Cfgr2 { 15647 fn default() -> Cfgr2 {
4676 Cfgr2(0) 15648 Cfgr2(0)
15649=======
15650 #[doc = "Clock phase"]
15651 pub fn set_cpha(&mut self, val: super::vals::Cpha) {
15652 self.0 = (self.0 & !(0x01 << 0usize)) | (((val.0 as u32) & 0x01) << 0usize);
15653 }
15654 #[doc = "Clock polarity"]
15655 pub const fn cpol(&self) -> super::vals::Cpol {
15656 let val = (self.0 >> 1usize) & 0x01;
15657 super::vals::Cpol(val as u8)
15658 }
15659 #[doc = "Clock polarity"]
15660 pub fn set_cpol(&mut self, val: super::vals::Cpol) {
15661 self.0 = (self.0 & !(0x01 << 1usize)) | (((val.0 as u32) & 0x01) << 1usize);
15662 }
15663 #[doc = "Master selection"]
15664 pub const fn mstr(&self) -> super::vals::Mstr {
15665 let val = (self.0 >> 2usize) & 0x01;
15666 super::vals::Mstr(val as u8)
15667 }
15668 #[doc = "Master selection"]
15669 pub fn set_mstr(&mut self, val: super::vals::Mstr) {
15670 self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize);
15671 }
15672 #[doc = "Baud rate control"]
15673 pub const fn br(&self) -> super::vals::Br {
15674 let val = (self.0 >> 3usize) & 0x07;
15675 super::vals::Br(val as u8)
15676 }
15677 #[doc = "Baud rate control"]
15678 pub fn set_br(&mut self, val: super::vals::Br) {
15679 self.0 = (self.0 & !(0x07 << 3usize)) | (((val.0 as u32) & 0x07) << 3usize);
15680 }
15681 #[doc = "SPI enable"]
15682 pub const fn spe(&self) -> bool {
15683 let val = (self.0 >> 6usize) & 0x01;
15684 val != 0
15685 }
15686 #[doc = "SPI enable"]
15687 pub fn set_spe(&mut self, val: bool) {
15688 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
15689 }
15690 #[doc = "Frame format"]
15691 pub const fn lsbfirst(&self) -> super::vals::Lsbfirst {
15692 let val = (self.0 >> 7usize) & 0x01;
15693 super::vals::Lsbfirst(val as u8)
15694 }
15695 #[doc = "Frame format"]
15696 pub fn set_lsbfirst(&mut self, val: super::vals::Lsbfirst) {
15697 self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize);
15698 }
15699 #[doc = "Internal slave select"]
15700 pub const fn ssi(&self) -> bool {
15701 let val = (self.0 >> 8usize) & 0x01;
15702 val != 0
15703 }
15704 #[doc = "Internal slave select"]
15705 pub fn set_ssi(&mut self, val: bool) {
15706 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
15707 }
15708 #[doc = "Software slave management"]
15709 pub const fn ssm(&self) -> bool {
15710 let val = (self.0 >> 9usize) & 0x01;
15711 val != 0
15712 }
15713 #[doc = "Software slave management"]
15714 pub fn set_ssm(&mut self, val: bool) {
15715 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
15716 }
15717 #[doc = "Receive only"]
15718 pub const fn rxonly(&self) -> super::vals::Rxonly {
15719 let val = (self.0 >> 10usize) & 0x01;
15720 super::vals::Rxonly(val as u8)
15721 }
15722 #[doc = "Receive only"]
15723 pub fn set_rxonly(&mut self, val: super::vals::Rxonly) {
15724 self.0 = (self.0 & !(0x01 << 10usize)) | (((val.0 as u32) & 0x01) << 10usize);
15725 }
15726 #[doc = "CRC length"]
15727 pub const fn crcl(&self) -> super::vals::Crcl {
15728 let val = (self.0 >> 11usize) & 0x01;
15729 super::vals::Crcl(val as u8)
15730 }
15731 #[doc = "CRC length"]
15732 pub fn set_crcl(&mut self, val: super::vals::Crcl) {
15733 self.0 = (self.0 & !(0x01 << 11usize)) | (((val.0 as u32) & 0x01) << 11usize);
15734 }
15735 #[doc = "CRC transfer next"]
15736 pub const fn crcnext(&self) -> super::vals::Crcnext {
15737 let val = (self.0 >> 12usize) & 0x01;
15738 super::vals::Crcnext(val as u8)
15739 }
15740 #[doc = "CRC transfer next"]
15741 pub fn set_crcnext(&mut self, val: super::vals::Crcnext) {
15742 self.0 = (self.0 & !(0x01 << 12usize)) | (((val.0 as u32) & 0x01) << 12usize);
15743 }
15744 #[doc = "Hardware CRC calculation enable"]
15745 pub const fn crcen(&self) -> bool {
15746 let val = (self.0 >> 13usize) & 0x01;
15747 val != 0
15748 }
15749 #[doc = "Hardware CRC calculation enable"]
15750 pub fn set_crcen(&mut self, val: bool) {
15751 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize);
15752 }
15753 #[doc = "Output enable in bidirectional mode"]
15754 pub const fn bidioe(&self) -> super::vals::Bidioe {
15755 let val = (self.0 >> 14usize) & 0x01;
15756 super::vals::Bidioe(val as u8)
15757 }
15758 #[doc = "Output enable in bidirectional mode"]
15759 pub fn set_bidioe(&mut self, val: super::vals::Bidioe) {
15760 self.0 = (self.0 & !(0x01 << 14usize)) | (((val.0 as u32) & 0x01) << 14usize);
15761 }
15762 #[doc = "Bidirectional data mode enable"]
15763 pub const fn bidimode(&self) -> super::vals::Bidimode {
15764 let val = (self.0 >> 15usize) & 0x01;
15765 super::vals::Bidimode(val as u8)
15766 }
15767 #[doc = "Bidirectional data mode enable"]
15768 pub fn set_bidimode(&mut self, val: super::vals::Bidimode) {
15769 self.0 = (self.0 & !(0x01 << 15usize)) | (((val.0 as u32) & 0x01) << 15usize);
15770 }
15771 }
15772 impl Default for Cr1 {
15773 fn default() -> Cr1 {
15774 Cr1(0)
15775 }
15776 }
15777 #[doc = "data register"]
15778 #[repr(transparent)]
15779 #[derive(Copy, Clone, Eq, PartialEq)]
15780 pub struct Dr(pub u32);
15781 impl Dr {
15782 #[doc = "Data register"]
15783 pub const fn dr(&self) -> u16 {
15784 let val = (self.0 >> 0usize) & 0xffff;
15785 val as u16
15786 }
15787 #[doc = "Data register"]
15788 pub fn set_dr(&mut self, val: u16) {
15789 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
15790 }
15791 }
15792 impl Default for Dr {
15793 fn default() -> Dr {
15794 Dr(0)
4677 } 15795 }
4678 } 15796 }
15797 #[doc = "control register 2"]
15798 #[repr(transparent)]
15799 #[derive(Copy, Clone, Eq, PartialEq)]
15800 pub struct Cr2(pub u32);
15801 impl Cr2 {
15802 #[doc = "Rx buffer DMA enable"]
15803 pub const fn rxdmaen(&self) -> bool {
15804 let val = (self.0 >> 0usize) & 0x01;
15805 val != 0
15806 }
15807 #[doc = "Rx buffer DMA enable"]
15808 pub fn set_rxdmaen(&mut self, val: bool) {
15809 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
15810 }
15811 #[doc = "Tx buffer DMA enable"]
15812 pub const fn txdmaen(&self) -> bool {
15813 let val = (self.0 >> 1usize) & 0x01;
15814 val != 0
15815 }
15816 #[doc = "Tx buffer DMA enable"]
15817 pub fn set_txdmaen(&mut self, val: bool) {
15818 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
15819 }
15820 #[doc = "SS output enable"]
15821 pub const fn ssoe(&self) -> bool {
15822 let val = (self.0 >> 2usize) & 0x01;
15823 val != 0
15824 }
15825 #[doc = "SS output enable"]
15826 pub fn set_ssoe(&mut self, val: bool) {
15827 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
15828 }
15829 #[doc = "NSS pulse management"]
15830 pub const fn nssp(&self) -> bool {
15831 let val = (self.0 >> 3usize) & 0x01;
15832 val != 0
15833 }
15834 #[doc = "NSS pulse management"]
15835 pub fn set_nssp(&mut self, val: bool) {
15836 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
15837 }
15838 #[doc = "Frame format"]
15839 pub const fn frf(&self) -> super::vals::Frf {
15840 let val = (self.0 >> 4usize) & 0x01;
15841 super::vals::Frf(val as u8)
15842 }
15843 #[doc = "Frame format"]
15844 pub fn set_frf(&mut self, val: super::vals::Frf) {
15845 self.0 = (self.0 & !(0x01 << 4usize)) | (((val.0 as u32) & 0x01) << 4usize);
15846 }
15847 #[doc = "Error interrupt enable"]
15848 pub const fn errie(&self) -> bool {
15849 let val = (self.0 >> 5usize) & 0x01;
15850 val != 0
15851 }
15852 #[doc = "Error interrupt enable"]
15853 pub fn set_errie(&mut self, val: bool) {
15854 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
15855 }
15856 #[doc = "RX buffer not empty interrupt enable"]
15857 pub const fn rxneie(&self) -> bool {
15858 let val = (self.0 >> 6usize) & 0x01;
15859 val != 0
15860 }
15861 #[doc = "RX buffer not empty interrupt enable"]
15862 pub fn set_rxneie(&mut self, val: bool) {
15863 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
15864 }
15865 #[doc = "Tx buffer empty interrupt enable"]
15866 pub const fn txeie(&self) -> bool {
15867 let val = (self.0 >> 7usize) & 0x01;
15868 val != 0
15869 }
15870 #[doc = "Tx buffer empty interrupt enable"]
15871 pub fn set_txeie(&mut self, val: bool) {
15872 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
15873 }
15874 #[doc = "Data size"]
15875 pub const fn ds(&self) -> super::vals::Ds {
15876 let val = (self.0 >> 8usize) & 0x0f;
15877 super::vals::Ds(val as u8)
15878 }
15879 #[doc = "Data size"]
15880 pub fn set_ds(&mut self, val: super::vals::Ds) {
15881 self.0 = (self.0 & !(0x0f << 8usize)) | (((val.0 as u32) & 0x0f) << 8usize);
15882 }
15883 #[doc = "FIFO reception threshold"]
15884 pub const fn frxth(&self) -> super::vals::Frxth {
15885 let val = (self.0 >> 12usize) & 0x01;
15886 super::vals::Frxth(val as u8)
15887 }
15888 #[doc = "FIFO reception threshold"]
15889 pub fn set_frxth(&mut self, val: super::vals::Frxth) {
15890 self.0 = (self.0 & !(0x01 << 12usize)) | (((val.0 as u32) & 0x01) << 12usize);
15891 }
15892 #[doc = "Last DMA transfer for reception"]
15893 pub const fn ldma_rx(&self) -> super::vals::LdmaRx {
15894 let val = (self.0 >> 13usize) & 0x01;
15895 super::vals::LdmaRx(val as u8)
15896 }
15897 #[doc = "Last DMA transfer for reception"]
15898 pub fn set_ldma_rx(&mut self, val: super::vals::LdmaRx) {
15899 self.0 = (self.0 & !(0x01 << 13usize)) | (((val.0 as u32) & 0x01) << 13usize);
15900 }
15901 #[doc = "Last DMA transfer for transmission"]
15902 pub const fn ldma_tx(&self) -> super::vals::LdmaTx {
15903 let val = (self.0 >> 14usize) & 0x01;
15904 super::vals::LdmaTx(val as u8)
15905 }
15906 #[doc = "Last DMA transfer for transmission"]
15907 pub fn set_ldma_tx(&mut self, val: super::vals::LdmaTx) {
15908 self.0 = (self.0 & !(0x01 << 14usize)) | (((val.0 as u32) & 0x01) << 14usize);
15909 }
15910 }
15911 impl Default for Cr2 {
15912 fn default() -> Cr2 {
15913 Cr2(0)
15914 }
15915>>>>>>> Better interrupt handling
15916 }
15917 #[doc = "CRC polynomial register"]
15918 #[repr(transparent)]
15919<<<<<<< HEAD
15920 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
15921 pub struct Fs(pub u8);
15922 impl Fs {
15923 #[doc = "0 < fifo_level < 1/4"]
15924 pub const QUARTER1: Self = Self(0);
15925 #[doc = "1/4 <= fifo_level < 1/2"]
15926 pub const QUARTER2: Self = Self(0x01);
15927 #[doc = "1/2 <= fifo_level < 3/4"]
15928 pub const QUARTER3: Self = Self(0x02);
15929 #[doc = "3/4 <= fifo_level < full"]
15930 pub const QUARTER4: Self = Self(0x03);
15931 #[doc = "FIFO is empty"]
15932 pub const EMPTY: Self = Self(0x04);
15933 #[doc = "FIFO is full"]
15934 pub const FULL: Self = Self(0x05);
15935 }
15936 #[repr(transparent)]
15937 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
15938 pub struct Burst(pub u8);
15939 impl Burst {
15940 #[doc = "Single transfer"]
15941 pub const SINGLE: Self = Self(0);
15942 #[doc = "Incremental burst of 4 beats"]
15943 pub const INCR4: Self = Self(0x01);
15944 #[doc = "Incremental burst of 8 beats"]
15945 pub const INCR8: Self = Self(0x02);
15946 #[doc = "Incremental burst of 16 beats"]
15947 pub const INCR16: Self = Self(0x03);
15948=======
15949 #[derive(Copy, Clone, Eq, PartialEq)]
15950 pub struct Crcpr(pub u32);
15951 impl Crcpr {
15952 #[doc = "CRC polynomial register"]
15953 pub const fn crcpoly(&self) -> u16 {
15954 let val = (self.0 >> 0usize) & 0xffff;
15955 val as u16
15956 }
15957 #[doc = "CRC polynomial register"]
15958 pub fn set_crcpoly(&mut self, val: u16) {
15959 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
15960 }
15961 }
15962 impl Default for Crcpr {
15963 fn default() -> Crcpr {
15964 Crcpr(0)
15965>>>>>>> fc21f52 (Better interrupt handling)
15966 }
15967>>>>>>> Better interrupt handling
15968 }
15969 #[doc = "RX CRC register"]
15970 #[repr(transparent)]
15971<<<<<<< HEAD
15972 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
15973 pub struct Dbm(pub u8);
15974 impl Dbm {
15975 #[doc = "No buffer switching at the end of transfer"]
15976 pub const DISABLED: Self = Self(0);
15977 #[doc = "Memory target switched at the end of the DMA transfer"]
15978 pub const ENABLED: Self = Self(0x01);
15979 }
15980<<<<<<< HEAD
4679 #[doc = "SCSR"] 15981 #[doc = "SCSR"]
15982=======
15983>>>>>>> fc21f52 (Better interrupt handling)
4680 #[repr(transparent)] 15984 #[repr(transparent)]
15985 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
15986 pub struct Inc(pub u8);
15987 impl Inc {
15988 #[doc = "Address pointer is fixed"]
15989 pub const FIXED: Self = Self(0);
15990 #[doc = "Address pointer is incremented after each data transfer"]
15991 pub const INCREMENTED: Self = Self(0x01);
15992=======
4681 #[derive(Copy, Clone, Eq, PartialEq)] 15993 #[derive(Copy, Clone, Eq, PartialEq)]
15994<<<<<<< HEAD
4682 pub struct Scsr(pub u32); 15995 pub struct Scsr(pub u32);
4683 impl Scsr { 15996 impl Scsr {
4684 #[doc = "SRAM2 Erase"] 15997 #[doc = "SRAM2 Erase"]
@@ -4795,8 +16108,27 @@ pub mod usart_v1 {
4795 impl Default for Dr { 16108 impl Default for Dr {
4796 fn default() -> Dr { 16109 fn default() -> Dr {
4797 Dr(0) 16110 Dr(0)
16111=======
16112 pub struct Rxcrcr(pub u32);
16113 impl Rxcrcr {
16114 #[doc = "Rx CRC register"]
16115 pub const fn rx_crc(&self) -> u16 {
16116 let val = (self.0 >> 0usize) & 0xffff;
16117 val as u16
16118 }
16119 #[doc = "Rx CRC register"]
16120 pub fn set_rx_crc(&mut self, val: u16) {
16121 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
4798 } 16122 }
4799 } 16123 }
16124 impl Default for Rxcrcr {
16125 fn default() -> Rxcrcr {
16126 Rxcrcr(0)
16127>>>>>>> fc21f52 (Better interrupt handling)
16128 }
16129>>>>>>> Better interrupt handling
16130 }
16131<<<<<<< HEAD
4800 #[doc = "Status register"] 16132 #[doc = "Status register"]
4801 #[repr(transparent)] 16133 #[repr(transparent)]
4802 #[derive(Copy, Clone, Eq, PartialEq)] 16134 #[derive(Copy, Clone, Eq, PartialEq)]
@@ -5613,41 +16945,813 @@ pub mod usart_v1 {
5613 pub const IDLELINE: Self = Self(0); 16945 pub const IDLELINE: Self = Self(0);
5614 #[doc = "USART wakeup on address mark"] 16946 #[doc = "USART wakeup on address mark"]
5615 pub const ADDRESSMARK: Self = Self(0x01); 16947 pub const ADDRESSMARK: Self = Self(0x01);
16948=======
16949 #[doc = "TX CRC register"]
16950 #[repr(transparent)]
16951<<<<<<< HEAD
16952 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
16953 pub struct Dir(pub u8);
16954 impl Dir {
16955 #[doc = "Peripheral-to-memory"]
16956 pub const PERIPHERALTOMEMORY: Self = Self(0);
16957 #[doc = "Memory-to-peripheral"]
16958 pub const MEMORYTOPERIPHERAL: Self = Self(0x01);
16959 #[doc = "Memory-to-memory"]
16960 pub const MEMORYTOMEMORY: Self = Self(0x02);
16961 }
16962 #[repr(transparent)]
16963 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
16964 pub struct Pfctrl(pub u8);
16965 impl Pfctrl {
16966 #[doc = "The DMA is the flow controller"]
16967 pub const DMA: Self = Self(0);
16968 #[doc = "The peripheral is the flow controller"]
16969 pub const PERIPHERAL: Self = Self(0x01);
16970 }
16971 #[repr(transparent)]
16972 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
16973 pub struct Pl(pub u8);
16974 impl Pl {
16975 #[doc = "Low"]
16976 pub const LOW: Self = Self(0);
16977 #[doc = "Medium"]
16978 pub const MEDIUM: Self = Self(0x01);
16979 #[doc = "High"]
16980 pub const HIGH: Self = Self(0x02);
16981 #[doc = "Very high"]
16982 pub const VERYHIGH: Self = Self(0x03);
16983 }
16984 #[repr(transparent)]
16985 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
16986 pub struct Circ(pub u8);
16987 impl Circ {
16988 #[doc = "Circular mode disabled"]
16989 pub const DISABLED: Self = Self(0);
16990 #[doc = "Circular mode enabled"]
16991 pub const ENABLED: Self = Self(0x01);
16992 }
16993 #[repr(transparent)]
16994 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
16995 pub struct Fth(pub u8);
16996 impl Fth {
16997 #[doc = "1/4 full FIFO"]
16998 pub const QUARTER: Self = Self(0);
16999 #[doc = "1/2 full FIFO"]
17000 pub const HALF: Self = Self(0x01);
17001 #[doc = "3/4 full FIFO"]
17002 pub const THREEQUARTERS: Self = Self(0x02);
17003 #[doc = "Full FIFO"]
17004 pub const FULL: Self = Self(0x03);
17005 }
17006 #[repr(transparent)]
17007 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
17008 pub struct Ct(pub u8);
17009 impl Ct {
17010 #[doc = "The current target memory is Memory 0"]
17011 pub const MEMORY0: Self = Self(0);
17012 #[doc = "The current target memory is Memory 1"]
17013 pub const MEMORY1: Self = Self(0x01);
17014 }
17015 #[repr(transparent)]
17016 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
17017 pub struct Dmdis(pub u8);
17018 impl Dmdis {
17019 #[doc = "Direct mode is enabled"]
17020 pub const ENABLED: Self = Self(0);
17021 #[doc = "Direct mode is disabled"]
17022 pub const DISABLED: Self = Self(0x01);
17023 }
17024 #[repr(transparent)]
17025 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
17026 pub struct Size(pub u8);
17027 impl Size {
17028 #[doc = "Byte (8-bit)"]
17029 pub const BITS8: Self = Self(0);
17030 #[doc = "Half-word (16-bit)"]
17031 pub const BITS16: Self = Self(0x01);
17032 #[doc = "Word (32-bit)"]
17033 pub const BITS32: Self = Self(0x02);
17034 }
17035 }
17036 pub mod regs {
17037 use crate::generic::*;
17038 #[doc = "low interrupt flag clear register"]
17039 #[repr(transparent)]
17040 #[derive(Copy, Clone, Eq, PartialEq)]
17041 pub struct Ifcr(pub u32);
17042 impl Ifcr {
17043 #[doc = "Stream x clear FIFO error interrupt flag (x = 3..0)"]
17044 pub fn cfeif(&self, n: usize) -> bool {
17045 assert!(n < 4usize);
17046 let offs = 0usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
17047 let val = (self.0 >> offs) & 0x01;
17048 val != 0
17049 }
17050 #[doc = "Stream x clear FIFO error interrupt flag (x = 3..0)"]
17051 pub fn set_cfeif(&mut self, n: usize, val: bool) {
17052 assert!(n < 4usize);
17053 let offs = 0usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
17054 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
17055 }
17056 #[doc = "Stream x clear direct mode error interrupt flag (x = 3..0)"]
17057 pub fn cdmeif(&self, n: usize) -> bool {
17058 assert!(n < 4usize);
17059 let offs = 2usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
17060 let val = (self.0 >> offs) & 0x01;
17061 val != 0
17062 }
17063 #[doc = "Stream x clear direct mode error interrupt flag (x = 3..0)"]
17064 pub fn set_cdmeif(&mut self, n: usize, val: bool) {
17065 assert!(n < 4usize);
17066 let offs = 2usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
17067 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
17068 }
17069 #[doc = "Stream x clear transfer error interrupt flag (x = 3..0)"]
17070 pub fn cteif(&self, n: usize) -> bool {
17071 assert!(n < 4usize);
17072 let offs = 3usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
17073 let val = (self.0 >> offs) & 0x01;
17074 val != 0
17075 }
17076 #[doc = "Stream x clear transfer error interrupt flag (x = 3..0)"]
17077 pub fn set_cteif(&mut self, n: usize, val: bool) {
17078 assert!(n < 4usize);
17079 let offs = 3usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
17080 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
17081 }
17082 #[doc = "Stream x clear half transfer interrupt flag (x = 3..0)"]
17083 pub fn chtif(&self, n: usize) -> bool {
17084 assert!(n < 4usize);
17085 let offs = 4usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
17086 let val = (self.0 >> offs) & 0x01;
17087 val != 0
17088 }
17089 #[doc = "Stream x clear half transfer interrupt flag (x = 3..0)"]
17090 pub fn set_chtif(&mut self, n: usize, val: bool) {
17091 assert!(n < 4usize);
17092 let offs = 4usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
17093 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
17094 }
17095 #[doc = "Stream x clear transfer complete interrupt flag (x = 3..0)"]
17096 pub fn ctcif(&self, n: usize) -> bool {
17097 assert!(n < 4usize);
17098 let offs = 5usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
17099 let val = (self.0 >> offs) & 0x01;
17100 val != 0
17101 }
17102 #[doc = "Stream x clear transfer complete interrupt flag (x = 3..0)"]
17103 pub fn set_ctcif(&mut self, n: usize, val: bool) {
17104 assert!(n < 4usize);
17105 let offs = 5usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
17106 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
17107 }
17108 }
17109 impl Default for Ifcr {
17110 fn default() -> Ifcr {
17111 Ifcr(0)
17112 }
17113 }
17114 #[doc = "stream x FIFO control register"]
17115 #[repr(transparent)]
17116 #[derive(Copy, Clone, Eq, PartialEq)]
17117 pub struct Fcr(pub u32);
17118 impl Fcr {
17119 #[doc = "FIFO threshold selection"]
17120 pub const fn fth(&self) -> super::vals::Fth {
17121 let val = (self.0 >> 0usize) & 0x03;
17122 super::vals::Fth(val as u8)
17123 }
17124 #[doc = "FIFO threshold selection"]
17125 pub fn set_fth(&mut self, val: super::vals::Fth) {
17126 self.0 = (self.0 & !(0x03 << 0usize)) | (((val.0 as u32) & 0x03) << 0usize);
17127 }
17128 #[doc = "Direct mode disable"]
17129 pub const fn dmdis(&self) -> super::vals::Dmdis {
17130 let val = (self.0 >> 2usize) & 0x01;
17131 super::vals::Dmdis(val as u8)
17132 }
17133 #[doc = "Direct mode disable"]
17134 pub fn set_dmdis(&mut self, val: super::vals::Dmdis) {
17135 self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize);
17136 }
17137 #[doc = "FIFO status"]
17138 pub const fn fs(&self) -> super::vals::Fs {
17139 let val = (self.0 >> 3usize) & 0x07;
17140 super::vals::Fs(val as u8)
17141 }
17142 #[doc = "FIFO status"]
17143 pub fn set_fs(&mut self, val: super::vals::Fs) {
17144 self.0 = (self.0 & !(0x07 << 3usize)) | (((val.0 as u32) & 0x07) << 3usize);
17145 }
17146 #[doc = "FIFO error interrupt enable"]
17147 pub const fn feie(&self) -> bool {
17148 let val = (self.0 >> 7usize) & 0x01;
17149 val != 0
17150 }
17151 #[doc = "FIFO error interrupt enable"]
17152 pub fn set_feie(&mut self, val: bool) {
17153 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
17154 }
17155 }
17156 impl Default for Fcr {
17157 fn default() -> Fcr {
17158 Fcr(0)
17159 }
17160 }
17161 #[doc = "stream x number of data register"]
17162 #[repr(transparent)]
17163 #[derive(Copy, Clone, Eq, PartialEq)]
17164 pub struct Ndtr(pub u32);
17165 impl Ndtr {
17166 #[doc = "Number of data items to transfer"]
17167 pub const fn ndt(&self) -> u16 {
17168 let val = (self.0 >> 0usize) & 0xffff;
17169 val as u16
17170 }
17171 #[doc = "Number of data items to transfer"]
17172 pub fn set_ndt(&mut self, val: u16) {
17173 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
17174 }
17175 }
17176 impl Default for Ndtr {
17177 fn default() -> Ndtr {
17178 Ndtr(0)
17179 }
17180 }
17181 #[doc = "low interrupt status register"]
17182 #[repr(transparent)]
17183 #[derive(Copy, Clone, Eq, PartialEq)]
17184 pub struct Isr(pub u32);
17185 impl Isr {
17186 #[doc = "Stream x FIFO error interrupt flag (x=3..0)"]
17187 pub fn feif(&self, n: usize) -> bool {
17188=======
17189 #[derive(Copy, Clone, Eq, PartialEq)]
17190 pub struct Txcrcr(pub u32);
17191 impl Txcrcr {
17192 #[doc = "Tx CRC register"]
17193 pub const fn tx_crc(&self) -> u16 {
17194 let val = (self.0 >> 0usize) & 0xffff;
17195 val as u16
17196 }
17197 #[doc = "Tx CRC register"]
17198 pub fn set_tx_crc(&mut self, val: u16) {
17199 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
17200 }
17201 }
17202 impl Default for Txcrcr {
17203 fn default() -> Txcrcr {
17204 Txcrcr(0)
17205 }
5616 } 17206 }
5617 } 17207 }
5618} 17208}
5619pub mod spi_v2 { 17209pub mod dma_v2 {
5620 use crate::generic::*; 17210 use crate::generic::*;
5621 #[doc = "Serial peripheral interface"] 17211 #[doc = "Stream cluster: S?CR, S?NDTR, S?M0AR, S?M1AR and S?FCR registers"]
5622 #[derive(Copy, Clone)] 17212 #[derive(Copy, Clone)]
5623 pub struct Spi(pub *mut u8); 17213 pub struct St(pub *mut u8);
5624 unsafe impl Send for Spi {} 17214 unsafe impl Send for St {}
5625 unsafe impl Sync for Spi {} 17215 unsafe impl Sync for St {}
5626 impl Spi { 17216 impl St {
17217 #[doc = "stream x configuration register"]
17218 pub fn cr(self) -> Reg<regs::Cr, RW> {
17219 unsafe { Reg::from_ptr(self.0.add(0usize)) }
17220 }
17221 #[doc = "stream x number of data register"]
17222 pub fn ndtr(self) -> Reg<regs::Ndtr, RW> {
17223 unsafe { Reg::from_ptr(self.0.add(4usize)) }
17224 }
17225 #[doc = "stream x peripheral address register"]
17226 pub fn par(self) -> Reg<u32, RW> {
17227 unsafe { Reg::from_ptr(self.0.add(8usize)) }
17228 }
17229 #[doc = "stream x memory 0 address register"]
17230 pub fn m0ar(self) -> Reg<u32, RW> {
17231 unsafe { Reg::from_ptr(self.0.add(12usize)) }
17232 }
17233 #[doc = "stream x memory 1 address register"]
17234 pub fn m1ar(self) -> Reg<u32, RW> {
17235 unsafe { Reg::from_ptr(self.0.add(16usize)) }
17236 }
17237 #[doc = "stream x FIFO control register"]
17238 pub fn fcr(self) -> Reg<regs::Fcr, RW> {
17239 unsafe { Reg::from_ptr(self.0.add(20usize)) }
17240 }
17241 }
17242 #[doc = "DMA controller"]
17243 #[derive(Copy, Clone)]
17244 pub struct Dma(pub *mut u8);
17245 unsafe impl Send for Dma {}
17246 unsafe impl Sync for Dma {}
17247 impl Dma {
17248 #[doc = "low interrupt status register"]
17249 pub fn isr(self, n: usize) -> Reg<regs::Isr, R> {
17250 assert!(n < 2usize);
17251 unsafe { Reg::from_ptr(self.0.add(0usize + n * 4usize)) }
17252 }
17253 #[doc = "low interrupt flag clear register"]
17254 pub fn ifcr(self, n: usize) -> Reg<regs::Ifcr, W> {
17255 assert!(n < 2usize);
17256 unsafe { Reg::from_ptr(self.0.add(8usize + n * 4usize)) }
17257 }
17258 #[doc = "Stream cluster: S?CR, S?NDTR, S?M0AR, S?M1AR and S?FCR registers"]
17259 pub fn st(self, n: usize) -> St {
17260 assert!(n < 8usize);
17261 unsafe { St(self.0.add(16usize + n * 24usize)) }
17262 }
17263 }
17264 pub mod regs {
17265 use crate::generic::*;
17266 #[doc = "low interrupt flag clear register"]
17267 #[repr(transparent)]
17268 #[derive(Copy, Clone, Eq, PartialEq)]
17269 pub struct Ifcr(pub u32);
17270 impl Ifcr {
17271 #[doc = "Stream x clear FIFO error interrupt flag (x = 3..0)"]
17272 pub fn cfeif(&self, n: usize) -> bool {
17273>>>>>>> Better interrupt handling
17274 assert!(n < 4usize);
17275 let offs = 0usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
17276 let val = (self.0 >> offs) & 0x01;
17277 val != 0
17278 }
17279<<<<<<< HEAD
17280 #[doc = "Stream x FIFO error interrupt flag (x=3..0)"]
17281 pub fn set_feif(&mut self, n: usize, val: bool) {
17282=======
17283 #[doc = "Stream x clear FIFO error interrupt flag (x = 3..0)"]
17284 pub fn set_cfeif(&mut self, n: usize, val: bool) {
17285>>>>>>> Better interrupt handling
17286 assert!(n < 4usize);
17287 let offs = 0usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
17288 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
17289 }
17290<<<<<<< HEAD
17291 #[doc = "Stream x direct mode error interrupt flag (x=3..0)"]
17292 pub fn dmeif(&self, n: usize) -> bool {
17293=======
17294 #[doc = "Stream x clear direct mode error interrupt flag (x = 3..0)"]
17295 pub fn cdmeif(&self, n: usize) -> bool {
17296>>>>>>> Better interrupt handling
17297 assert!(n < 4usize);
17298 let offs = 2usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
17299 let val = (self.0 >> offs) & 0x01;
17300 val != 0
17301 }
17302<<<<<<< HEAD
17303 #[doc = "Stream x direct mode error interrupt flag (x=3..0)"]
17304 pub fn set_dmeif(&mut self, n: usize, val: bool) {
17305=======
17306 #[doc = "Stream x clear direct mode error interrupt flag (x = 3..0)"]
17307 pub fn set_cdmeif(&mut self, n: usize, val: bool) {
17308>>>>>>> Better interrupt handling
17309 assert!(n < 4usize);
17310 let offs = 2usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
17311 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
17312 }
17313<<<<<<< HEAD
17314 #[doc = "Stream x transfer error interrupt flag (x=3..0)"]
17315 pub fn teif(&self, n: usize) -> bool {
17316=======
17317 #[doc = "Stream x clear transfer error interrupt flag (x = 3..0)"]
17318 pub fn cteif(&self, n: usize) -> bool {
17319>>>>>>> Better interrupt handling
17320 assert!(n < 4usize);
17321 let offs = 3usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
17322 let val = (self.0 >> offs) & 0x01;
17323 val != 0
17324 }
17325<<<<<<< HEAD
17326 #[doc = "Stream x transfer error interrupt flag (x=3..0)"]
17327 pub fn set_teif(&mut self, n: usize, val: bool) {
17328=======
17329 #[doc = "Stream x clear transfer error interrupt flag (x = 3..0)"]
17330 pub fn set_cteif(&mut self, n: usize, val: bool) {
17331>>>>>>> Better interrupt handling
17332 assert!(n < 4usize);
17333 let offs = 3usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
17334 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
17335 }
17336<<<<<<< HEAD
17337 #[doc = "Stream x half transfer interrupt flag (x=3..0)"]
17338 pub fn htif(&self, n: usize) -> bool {
17339=======
17340 #[doc = "Stream x clear half transfer interrupt flag (x = 3..0)"]
17341 pub fn chtif(&self, n: usize) -> bool {
17342>>>>>>> Better interrupt handling
17343 assert!(n < 4usize);
17344 let offs = 4usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
17345 let val = (self.0 >> offs) & 0x01;
17346 val != 0
17347 }
17348<<<<<<< HEAD
17349 #[doc = "Stream x half transfer interrupt flag (x=3..0)"]
17350 pub fn set_htif(&mut self, n: usize, val: bool) {
17351=======
17352 #[doc = "Stream x clear half transfer interrupt flag (x = 3..0)"]
17353 pub fn set_chtif(&mut self, n: usize, val: bool) {
17354>>>>>>> Better interrupt handling
17355 assert!(n < 4usize);
17356 let offs = 4usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
17357 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
17358 }
17359<<<<<<< HEAD
17360 #[doc = "Stream x transfer complete interrupt flag (x = 3..0)"]
17361 pub fn tcif(&self, n: usize) -> bool {
17362=======
17363 #[doc = "Stream x clear transfer complete interrupt flag (x = 3..0)"]
17364 pub fn ctcif(&self, n: usize) -> bool {
17365>>>>>>> Better interrupt handling
17366 assert!(n < 4usize);
17367 let offs = 5usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
17368 let val = (self.0 >> offs) & 0x01;
17369 val != 0
17370 }
17371<<<<<<< HEAD
17372 #[doc = "Stream x transfer complete interrupt flag (x = 3..0)"]
17373 pub fn set_tcif(&mut self, n: usize, val: bool) {
17374=======
17375 #[doc = "Stream x clear transfer complete interrupt flag (x = 3..0)"]
17376 pub fn set_ctcif(&mut self, n: usize, val: bool) {
17377>>>>>>> Better interrupt handling
17378 assert!(n < 4usize);
17379 let offs = 5usize + ([0usize, 6usize, 16usize, 22usize][n] as usize);
17380 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
17381 }
17382 }
17383<<<<<<< HEAD
17384 impl Default for Isr {
17385 fn default() -> Isr {
17386 Isr(0)
17387 }
17388 }
17389 #[doc = "stream x configuration register"]
17390 #[repr(transparent)]
17391 #[derive(Copy, Clone, Eq, PartialEq)]
17392 pub struct Cr(pub u32);
17393 impl Cr {
17394 #[doc = "Stream enable / flag stream ready when read low"]
17395 pub const fn en(&self) -> bool {
17396 let val = (self.0 >> 0usize) & 0x01;
17397 val != 0
17398 }
17399 #[doc = "Stream enable / flag stream ready when read low"]
17400 pub fn set_en(&mut self, val: bool) {
17401 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
17402 }
17403 #[doc = "Direct mode error interrupt enable"]
17404 pub const fn dmeie(&self) -> bool {
17405 let val = (self.0 >> 1usize) & 0x01;
17406 val != 0
17407 }
17408 #[doc = "Direct mode error interrupt enable"]
17409 pub fn set_dmeie(&mut self, val: bool) {
17410 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
17411 }
17412 #[doc = "Transfer error interrupt enable"]
17413 pub const fn teie(&self) -> bool {
17414 let val = (self.0 >> 2usize) & 0x01;
17415 val != 0
17416 }
17417 #[doc = "Transfer error interrupt enable"]
17418 pub fn set_teie(&mut self, val: bool) {
17419 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
17420 }
17421 #[doc = "Half transfer interrupt enable"]
17422 pub const fn htie(&self) -> bool {
17423 let val = (self.0 >> 3usize) & 0x01;
17424 val != 0
17425 }
17426 #[doc = "Half transfer interrupt enable"]
17427 pub fn set_htie(&mut self, val: bool) {
17428 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
17429 }
17430 #[doc = "Transfer complete interrupt enable"]
17431 pub const fn tcie(&self) -> bool {
17432 let val = (self.0 >> 4usize) & 0x01;
17433 val != 0
17434 }
17435 #[doc = "Transfer complete interrupt enable"]
17436 pub fn set_tcie(&mut self, val: bool) {
17437 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
17438 }
17439 #[doc = "Peripheral flow controller"]
17440 pub const fn pfctrl(&self) -> super::vals::Pfctrl {
17441 let val = (self.0 >> 5usize) & 0x01;
17442 super::vals::Pfctrl(val as u8)
17443 }
17444 #[doc = "Peripheral flow controller"]
17445 pub fn set_pfctrl(&mut self, val: super::vals::Pfctrl) {
17446 self.0 = (self.0 & !(0x01 << 5usize)) | (((val.0 as u32) & 0x01) << 5usize);
17447 }
17448 #[doc = "Data transfer direction"]
17449 pub const fn dir(&self) -> super::vals::Dir {
17450 let val = (self.0 >> 6usize) & 0x03;
17451 super::vals::Dir(val as u8)
17452 }
17453 #[doc = "Data transfer direction"]
17454 pub fn set_dir(&mut self, val: super::vals::Dir) {
17455 self.0 = (self.0 & !(0x03 << 6usize)) | (((val.0 as u32) & 0x03) << 6usize);
17456 }
17457 #[doc = "Circular mode"]
17458 pub const fn circ(&self) -> super::vals::Circ {
17459 let val = (self.0 >> 8usize) & 0x01;
17460 super::vals::Circ(val as u8)
17461 }
17462 #[doc = "Circular mode"]
17463 pub fn set_circ(&mut self, val: super::vals::Circ) {
17464 self.0 = (self.0 & !(0x01 << 8usize)) | (((val.0 as u32) & 0x01) << 8usize);
17465 }
17466 #[doc = "Peripheral increment mode"]
17467 pub const fn pinc(&self) -> super::vals::Inc {
17468 let val = (self.0 >> 9usize) & 0x01;
17469 super::vals::Inc(val as u8)
17470 }
17471 #[doc = "Peripheral increment mode"]
17472 pub fn set_pinc(&mut self, val: super::vals::Inc) {
17473 self.0 = (self.0 & !(0x01 << 9usize)) | (((val.0 as u32) & 0x01) << 9usize);
17474 }
17475 #[doc = "Memory increment mode"]
17476 pub const fn minc(&self) -> super::vals::Inc {
17477 let val = (self.0 >> 10usize) & 0x01;
17478 super::vals::Inc(val as u8)
17479 }
17480 #[doc = "Memory increment mode"]
17481 pub fn set_minc(&mut self, val: super::vals::Inc) {
17482 self.0 = (self.0 & !(0x01 << 10usize)) | (((val.0 as u32) & 0x01) << 10usize);
17483 }
17484 #[doc = "Peripheral data size"]
17485 pub const fn psize(&self) -> super::vals::Size {
17486 let val = (self.0 >> 11usize) & 0x03;
17487 super::vals::Size(val as u8)
17488 }
17489 #[doc = "Peripheral data size"]
17490 pub fn set_psize(&mut self, val: super::vals::Size) {
17491 self.0 = (self.0 & !(0x03 << 11usize)) | (((val.0 as u32) & 0x03) << 11usize);
17492 }
17493 #[doc = "Memory data size"]
17494 pub const fn msize(&self) -> super::vals::Size {
17495 let val = (self.0 >> 13usize) & 0x03;
17496 super::vals::Size(val as u8)
17497 }
17498 #[doc = "Memory data size"]
17499 pub fn set_msize(&mut self, val: super::vals::Size) {
17500 self.0 = (self.0 & !(0x03 << 13usize)) | (((val.0 as u32) & 0x03) << 13usize);
17501 }
17502 #[doc = "Peripheral increment offset size"]
17503 pub const fn pincos(&self) -> super::vals::Pincos {
17504 let val = (self.0 >> 15usize) & 0x01;
17505 super::vals::Pincos(val as u8)
17506 }
17507 #[doc = "Peripheral increment offset size"]
17508 pub fn set_pincos(&mut self, val: super::vals::Pincos) {
17509 self.0 = (self.0 & !(0x01 << 15usize)) | (((val.0 as u32) & 0x01) << 15usize);
17510 }
17511 #[doc = "Priority level"]
17512 pub const fn pl(&self) -> super::vals::Pl {
17513 let val = (self.0 >> 16usize) & 0x03;
17514 super::vals::Pl(val as u8)
17515 }
17516 #[doc = "Priority level"]
17517 pub fn set_pl(&mut self, val: super::vals::Pl) {
17518 self.0 = (self.0 & !(0x03 << 16usize)) | (((val.0 as u32) & 0x03) << 16usize);
17519 }
17520 #[doc = "Double buffer mode"]
17521 pub const fn dbm(&self) -> super::vals::Dbm {
17522 let val = (self.0 >> 18usize) & 0x01;
17523 super::vals::Dbm(val as u8)
17524 }
17525 #[doc = "Double buffer mode"]
17526 pub fn set_dbm(&mut self, val: super::vals::Dbm) {
17527 self.0 = (self.0 & !(0x01 << 18usize)) | (((val.0 as u32) & 0x01) << 18usize);
17528 }
17529 #[doc = "Current target (only in double buffer mode)"]
17530 pub const fn ct(&self) -> super::vals::Ct {
17531 let val = (self.0 >> 19usize) & 0x01;
17532 super::vals::Ct(val as u8)
17533 }
17534 #[doc = "Current target (only in double buffer mode)"]
17535 pub fn set_ct(&mut self, val: super::vals::Ct) {
17536 self.0 = (self.0 & !(0x01 << 19usize)) | (((val.0 as u32) & 0x01) << 19usize);
17537 }
17538 #[doc = "Peripheral burst transfer configuration"]
17539 pub const fn pburst(&self) -> super::vals::Burst {
17540 let val = (self.0 >> 21usize) & 0x03;
17541 super::vals::Burst(val as u8)
17542 }
17543 #[doc = "Peripheral burst transfer configuration"]
17544 pub fn set_pburst(&mut self, val: super::vals::Burst) {
17545 self.0 = (self.0 & !(0x03 << 21usize)) | (((val.0 as u32) & 0x03) << 21usize);
17546 }
17547 #[doc = "Memory burst transfer configuration"]
17548 pub const fn mburst(&self) -> super::vals::Burst {
17549 let val = (self.0 >> 23usize) & 0x03;
17550 super::vals::Burst(val as u8)
17551 }
17552 #[doc = "Memory burst transfer configuration"]
17553 pub fn set_mburst(&mut self, val: super::vals::Burst) {
17554 self.0 = (self.0 & !(0x03 << 23usize)) | (((val.0 as u32) & 0x03) << 23usize);
17555 }
17556 #[doc = "Channel selection"]
17557 pub const fn chsel(&self) -> u8 {
17558 let val = (self.0 >> 25usize) & 0x0f;
17559 val as u8
17560 }
17561 #[doc = "Channel selection"]
17562 pub fn set_chsel(&mut self, val: u8) {
17563 self.0 = (self.0 & !(0x0f << 25usize)) | (((val as u32) & 0x0f) << 25usize);
17564 }
17565 }
17566 impl Default for Cr {
17567 fn default() -> Cr {
17568 Cr(0)
17569 }
17570 }
17571 }
17572}
17573pub mod timer_v1 {
17574 use crate::generic::*;
17575 #[doc = "General purpose 32-bit timer"]
17576 #[derive(Copy, Clone)]
17577 pub struct TimGp32(pub *mut u8);
17578 unsafe impl Send for TimGp32 {}
17579 unsafe impl Sync for TimGp32 {}
17580 impl TimGp32 {
5627 #[doc = "control register 1"] 17581 #[doc = "control register 1"]
5628 pub fn cr1(self) -> Reg<regs::Cr1, RW> { 17582 pub fn cr1(self) -> Reg<regs::Cr1Gp, RW> {
5629 unsafe { Reg::from_ptr(self.0.add(0usize)) } 17583 unsafe { Reg::from_ptr(self.0.add(0usize)) }
5630 } 17584 }
5631 #[doc = "control register 2"] 17585 #[doc = "control register 2"]
5632 pub fn cr2(self) -> Reg<regs::Cr2, RW> { 17586 pub fn cr2(self) -> Reg<regs::Cr2Gp, RW> {
5633 unsafe { Reg::from_ptr(self.0.add(4usize)) } 17587 unsafe { Reg::from_ptr(self.0.add(4usize)) }
5634 } 17588 }
17589 #[doc = "slave mode control register"]
17590 pub fn smcr(self) -> Reg<regs::Smcr, RW> {
17591 unsafe { Reg::from_ptr(self.0.add(8usize)) }
17592 }
17593 #[doc = "DMA/Interrupt enable register"]
17594 pub fn dier(self) -> Reg<regs::DierGp, RW> {
17595 unsafe { Reg::from_ptr(self.0.add(12usize)) }
17596 }
5635 #[doc = "status register"] 17597 #[doc = "status register"]
5636 pub fn sr(self) -> Reg<regs::Sr, RW> { 17598 pub fn sr(self) -> Reg<regs::SrGp, RW> {
17599 unsafe { Reg::from_ptr(self.0.add(16usize)) }
17600 }
17601 #[doc = "event generation register"]
17602 pub fn egr(self) -> Reg<regs::EgrGp, W> {
17603 unsafe { Reg::from_ptr(self.0.add(20usize)) }
17604 }
17605 #[doc = "capture/compare mode register 1 (input mode)"]
17606 pub fn ccmr_input(self, n: usize) -> Reg<regs::CcmrInput, RW> {
17607 assert!(n < 2usize);
17608 unsafe { Reg::from_ptr(self.0.add(24usize + n * 4usize)) }
17609 }
17610 #[doc = "capture/compare mode register 1 (output mode)"]
17611 pub fn ccmr_output(self, n: usize) -> Reg<regs::CcmrOutput, RW> {
17612 assert!(n < 2usize);
17613 unsafe { Reg::from_ptr(self.0.add(24usize + n * 4usize)) }
17614 }
17615 #[doc = "capture/compare enable register"]
17616 pub fn ccer(self) -> Reg<regs::CcerGp, RW> {
17617 unsafe { Reg::from_ptr(self.0.add(32usize)) }
17618 }
17619 #[doc = "counter"]
17620 pub fn cnt(self) -> Reg<regs::Cnt32, RW> {
17621 unsafe { Reg::from_ptr(self.0.add(36usize)) }
17622 }
17623 #[doc = "prescaler"]
17624 pub fn psc(self) -> Reg<regs::Psc, RW> {
17625 unsafe { Reg::from_ptr(self.0.add(40usize)) }
17626 }
17627 #[doc = "auto-reload register"]
17628 pub fn arr(self) -> Reg<regs::Arr32, RW> {
17629 unsafe { Reg::from_ptr(self.0.add(44usize)) }
17630 }
17631 #[doc = "capture/compare register"]
17632 pub fn ccr(self, n: usize) -> Reg<regs::Ccr32, RW> {
17633 assert!(n < 4usize);
17634 unsafe { Reg::from_ptr(self.0.add(52usize + n * 4usize)) }
17635 }
17636 #[doc = "DMA control register"]
17637 pub fn dcr(self) -> Reg<regs::Dcr, RW> {
17638 unsafe { Reg::from_ptr(self.0.add(72usize)) }
17639 }
17640 #[doc = "DMA address for full transfer"]
17641 pub fn dmar(self) -> Reg<regs::Dmar, RW> {
17642 unsafe { Reg::from_ptr(self.0.add(76usize)) }
17643 }
17644 }
17645 #[doc = "Advanced-timers"]
17646 #[derive(Copy, Clone)]
17647 pub struct TimAdv(pub *mut u8);
17648 unsafe impl Send for TimAdv {}
17649 unsafe impl Sync for TimAdv {}
17650 impl TimAdv {
17651 #[doc = "control register 1"]
17652 pub fn cr1(self) -> Reg<regs::Cr1Gp, RW> {
17653 unsafe { Reg::from_ptr(self.0.add(0usize)) }
17654 }
17655 #[doc = "control register 2"]
17656 pub fn cr2(self) -> Reg<regs::Cr2Adv, RW> {
17657 unsafe { Reg::from_ptr(self.0.add(4usize)) }
17658 }
17659 #[doc = "slave mode control register"]
17660 pub fn smcr(self) -> Reg<regs::Smcr, RW> {
5637 unsafe { Reg::from_ptr(self.0.add(8usize)) } 17661 unsafe { Reg::from_ptr(self.0.add(8usize)) }
5638 } 17662 }
5639 #[doc = "data register"] 17663 #[doc = "DMA/Interrupt enable register"]
5640 pub fn dr(self) -> Reg<regs::Dr, RW> { 17664 pub fn dier(self) -> Reg<regs::DierAdv, RW> {
5641 unsafe { Reg::from_ptr(self.0.add(12usize)) } 17665 unsafe { Reg::from_ptr(self.0.add(12usize)) }
5642 } 17666 }
5643 #[doc = "CRC polynomial register"] 17667 #[doc = "status register"]
5644 pub fn crcpr(self) -> Reg<regs::Crcpr, RW> { 17668 pub fn sr(self) -> Reg<regs::SrAdv, RW> {
5645 unsafe { Reg::from_ptr(self.0.add(16usize)) } 17669 unsafe { Reg::from_ptr(self.0.add(16usize)) }
5646 } 17670 }
5647 #[doc = "RX CRC register"] 17671 #[doc = "event generation register"]
5648 pub fn rxcrcr(self) -> Reg<regs::Rxcrcr, R> { 17672 pub fn egr(self) -> Reg<regs::EgrAdv, W> {
5649 unsafe { Reg::from_ptr(self.0.add(20usize)) } 17673 unsafe { Reg::from_ptr(self.0.add(20usize)) }
5650 } 17674 }
17675 #[doc = "capture/compare mode register 1 (input mode)"]
17676 pub fn ccmr_input(self, n: usize) -> Reg<regs::CcmrInput, RW> {
17677 assert!(n < 2usize);
17678 unsafe { Reg::from_ptr(self.0.add(24usize + n * 4usize)) }
17679 }
17680 #[doc = "capture/compare mode register 1 (output mode)"]
17681 pub fn ccmr_output(self, n: usize) -> Reg<regs::CcmrOutput, RW> {
17682 assert!(n < 2usize);
17683 unsafe { Reg::from_ptr(self.0.add(24usize + n * 4usize)) }
17684 }
17685 #[doc = "capture/compare enable register"]
17686 pub fn ccer(self) -> Reg<regs::CcerAdv, RW> {
17687 unsafe { Reg::from_ptr(self.0.add(32usize)) }
17688 }
17689 #[doc = "counter"]
17690 pub fn cnt(self) -> Reg<regs::Cnt16, RW> {
17691 unsafe { Reg::from_ptr(self.0.add(36usize)) }
17692 }
17693 #[doc = "prescaler"]
17694 pub fn psc(self) -> Reg<regs::Psc, RW> {
17695 unsafe { Reg::from_ptr(self.0.add(40usize)) }
17696 }
17697 #[doc = "auto-reload register"]
17698 pub fn arr(self) -> Reg<regs::Arr16, RW> {
17699 unsafe { Reg::from_ptr(self.0.add(44usize)) }
17700 }
17701 #[doc = "repetition counter register"]
17702 pub fn rcr(self) -> Reg<regs::Rcr, RW> {
17703 unsafe { Reg::from_ptr(self.0.add(48usize)) }
17704 }
17705 #[doc = "capture/compare register"]
17706 pub fn ccr(self, n: usize) -> Reg<regs::Ccr16, RW> {
17707 assert!(n < 4usize);
17708 unsafe { Reg::from_ptr(self.0.add(52usize + n * 4usize)) }
17709 }
17710 #[doc = "break and dead-time register"]
17711 pub fn bdtr(self) -> Reg<regs::Bdtr, RW> {
17712 unsafe { Reg::from_ptr(self.0.add(68usize)) }
17713 }
17714 #[doc = "DMA control register"]
17715 pub fn dcr(self) -> Reg<regs::Dcr, RW> {
17716 unsafe { Reg::from_ptr(self.0.add(72usize)) }
17717 }
17718 #[doc = "DMA address for full transfer"]
17719 pub fn dmar(self) -> Reg<regs::Dmar, RW> {
17720 unsafe { Reg::from_ptr(self.0.add(76usize)) }
17721>>>>>>> fc21f52 (Better interrupt handling)
17722 }
17723 }
17724 #[doc = "General purpose 16-bit timer"]
17725 #[derive(Copy, Clone)]
17726 pub struct TimGp16(pub *mut u8);
17727 unsafe impl Send for TimGp16 {}
17728 unsafe impl Sync for TimGp16 {}
17729 impl TimGp16 {
17730 #[doc = "control register 1"]
17731 pub fn cr1(self) -> Reg<regs::Cr1Gp, RW> {
17732 unsafe { Reg::from_ptr(self.0.add(0usize)) }
17733 }
17734 #[doc = "control register 2"]
17735 pub fn cr2(self) -> Reg<regs::Cr2Gp, RW> {
17736 unsafe { Reg::from_ptr(self.0.add(4usize)) }
17737 }
17738 #[doc = "slave mode control register"]
17739 pub fn smcr(self) -> Reg<regs::Smcr, RW> {
17740 unsafe { Reg::from_ptr(self.0.add(8usize)) }
17741 }
17742 #[doc = "DMA/Interrupt enable register"]
17743 pub fn dier(self) -> Reg<regs::DierGp, RW> {
17744 unsafe { Reg::from_ptr(self.0.add(12usize)) }
17745 }
17746 #[doc = "status register"]
17747 pub fn sr(self) -> Reg<regs::SrGp, RW> {
17748 unsafe { Reg::from_ptr(self.0.add(16usize)) }
17749 }
17750 #[doc = "event generation register"]
17751 pub fn egr(self) -> Reg<regs::EgrGp, W> {
17752 unsafe { Reg::from_ptr(self.0.add(20usize)) }
17753 }
17754<<<<<<< HEAD
5651 #[doc = "TX CRC register"] 17755 #[doc = "TX CRC register"]
5652 pub fn txcrcr(self) -> Reg<regs::Txcrcr, R> { 17756 pub fn txcrcr(self) -> Reg<regs::Txcrcr, R> {
5653 unsafe { Reg::from_ptr(self.0.add(24usize)) } 17757 unsafe { Reg::from_ptr(self.0.add(24usize)) }
@@ -5716,16 +17820,27 @@ pub mod spi_v2 {
5716 pub const HALF: Self = Self(0x02); 17820 pub const HALF: Self = Self(0x02);
5717 #[doc = "Tx FIFO full"] 17821 #[doc = "Tx FIFO full"]
5718 pub const FULL: Self = Self(0x03); 17822 pub const FULL: Self = Self(0x03);
17823=======
17824 #[doc = "capture/compare mode register 1 (input mode)"]
17825 pub fn ccmr_input(self, n: usize) -> Reg<regs::CcmrInput, RW> {
17826 assert!(n < 2usize);
17827 unsafe { Reg::from_ptr(self.0.add(24usize + n * 4usize)) }
5719 } 17828 }
5720 #[repr(transparent)] 17829 #[doc = "capture/compare mode register 1 (output mode)"]
5721 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 17830 pub fn ccmr_output(self, n: usize) -> Reg<regs::CcmrOutput, RW> {
5722 pub struct Bidioe(pub u8); 17831 assert!(n < 2usize);
5723 impl Bidioe { 17832 unsafe { Reg::from_ptr(self.0.add(24usize + n * 4usize)) }
5724 #[doc = "Output disabled (receive-only mode)"]
5725 pub const OUTPUTDISABLED: Self = Self(0);
5726 #[doc = "Output enabled (transmit-only mode)"]
5727 pub const OUTPUTENABLED: Self = Self(0x01);
5728 } 17833 }
17834 #[doc = "capture/compare enable register"]
17835 pub fn ccer(self) -> Reg<regs::CcerGp, RW> {
17836 unsafe { Reg::from_ptr(self.0.add(32usize)) }
17837>>>>>>> fc21f52 (Better interrupt handling)
17838 }
17839 #[doc = "counter"]
17840 pub fn cnt(self) -> Reg<regs::Cnt16, RW> {
17841 unsafe { Reg::from_ptr(self.0.add(36usize)) }
17842 }
17843<<<<<<< HEAD
5729 #[repr(transparent)] 17844 #[repr(transparent)]
5730 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 17845 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5731 pub struct Lsbfirst(pub u8); 17846 pub struct Lsbfirst(pub u8);
@@ -5743,47 +17858,22 @@ pub mod spi_v2 {
5743 pub const EVEN: Self = Self(0); 17858 pub const EVEN: Self = Self(0);
5744 #[doc = "Number of data to transfer for transmit is odd"] 17859 #[doc = "Number of data to transfer for transmit is odd"]
5745 pub const ODD: Self = Self(0x01); 17860 pub const ODD: Self = Self(0x01);
17861=======
17862 #[doc = "prescaler"]
17863 pub fn psc(self) -> Reg<regs::Psc, RW> {
17864 unsafe { Reg::from_ptr(self.0.add(40usize)) }
17865>>>>>>> fc21f52 (Better interrupt handling)
5746 } 17866 }
5747 #[repr(transparent)] 17867 #[doc = "auto-reload register"]
5748 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 17868 pub fn arr(self) -> Reg<regs::Arr16, RW> {
5749 pub struct Crcnext(pub u8); 17869 unsafe { Reg::from_ptr(self.0.add(44usize)) }
5750 impl Crcnext {
5751 #[doc = "Next transmit value is from Tx buffer"]
5752 pub const TXBUFFER: Self = Self(0);
5753 #[doc = "Next transmit value is from Tx CRC register"]
5754 pub const CRC: Self = Self(0x01);
5755 } 17870 }
5756 #[repr(transparent)] 17871 #[doc = "capture/compare register"]
5757 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 17872 pub fn ccr(self, n: usize) -> Reg<regs::Ccr16, RW> {
5758 pub struct Ds(pub u8); 17873 assert!(n < 4usize);
5759 impl Ds { 17874 unsafe { Reg::from_ptr(self.0.add(52usize + n * 4usize)) }
5760 #[doc = "4-bit"]
5761 pub const FOURBIT: Self = Self(0x03);
5762 #[doc = "5-bit"]
5763 pub const FIVEBIT: Self = Self(0x04);
5764 #[doc = "6-bit"]
5765 pub const SIXBIT: Self = Self(0x05);
5766 #[doc = "7-bit"]
5767 pub const SEVENBIT: Self = Self(0x06);
5768 #[doc = "8-bit"]
5769 pub const EIGHTBIT: Self = Self(0x07);
5770 #[doc = "9-bit"]
5771 pub const NINEBIT: Self = Self(0x08);
5772 #[doc = "10-bit"]
5773 pub const TENBIT: Self = Self(0x09);
5774 #[doc = "11-bit"]
5775 pub const ELEVENBIT: Self = Self(0x0a);
5776 #[doc = "12-bit"]
5777 pub const TWELVEBIT: Self = Self(0x0b);
5778 #[doc = "13-bit"]
5779 pub const THIRTEENBIT: Self = Self(0x0c);
5780 #[doc = "14-bit"]
5781 pub const FOURTEENBIT: Self = Self(0x0d);
5782 #[doc = "15-bit"]
5783 pub const FIFTEENBIT: Self = Self(0x0e);
5784 #[doc = "16-bit"]
5785 pub const SIXTEENBIT: Self = Self(0x0f);
5786 } 17875 }
17876<<<<<<< HEAD
5787 #[repr(transparent)] 17877 #[repr(transparent)]
5788 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 17878 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5789 pub struct LdmaRx(pub u8); 17879 pub struct LdmaRx(pub u8);
@@ -5813,16 +17903,36 @@ pub mod spi_v2 {
5813 pub const DIV128: Self = Self(0x06); 17903 pub const DIV128: Self = Self(0x06);
5814 #[doc = "f_PCLK / 256"] 17904 #[doc = "f_PCLK / 256"]
5815 pub const DIV256: Self = Self(0x07); 17905 pub const DIV256: Self = Self(0x07);
17906=======
17907 #[doc = "DMA control register"]
17908 pub fn dcr(self) -> Reg<regs::Dcr, RW> {
17909 unsafe { Reg::from_ptr(self.0.add(72usize)) }
5816 } 17910 }
5817 #[repr(transparent)] 17911 #[doc = "DMA address for full transfer"]
5818 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 17912 pub fn dmar(self) -> Reg<regs::Dmar, RW> {
5819 pub struct Crcl(pub u8); 17913 unsafe { Reg::from_ptr(self.0.add(76usize)) }
5820 impl Crcl {
5821 #[doc = "8-bit CRC length"]
5822 pub const EIGHTBIT: Self = Self(0);
5823 #[doc = "16-bit CRC length"]
5824 pub const SIXTEENBIT: Self = Self(0x01);
5825 } 17914 }
17915 }
17916 #[doc = "Basic timer"]
17917 #[derive(Copy, Clone)]
17918 pub struct TimBasic(pub *mut u8);
17919 unsafe impl Send for TimBasic {}
17920 unsafe impl Sync for TimBasic {}
17921 impl TimBasic {
17922 #[doc = "control register 1"]
17923 pub fn cr1(self) -> Reg<regs::Cr1Basic, RW> {
17924 unsafe { Reg::from_ptr(self.0.add(0usize)) }
17925 }
17926 #[doc = "control register 2"]
17927 pub fn cr2(self) -> Reg<regs::Cr2Basic, RW> {
17928 unsafe { Reg::from_ptr(self.0.add(4usize)) }
17929>>>>>>> fc21f52 (Better interrupt handling)
17930 }
17931 #[doc = "DMA/Interrupt enable register"]
17932 pub fn dier(self) -> Reg<regs::DierBasic, RW> {
17933 unsafe { Reg::from_ptr(self.0.add(12usize)) }
17934 }
17935<<<<<<< HEAD
5826 #[repr(transparent)] 17936 #[repr(transparent)]
5827 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 17937 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
5828 pub struct Frer(pub u8); 17938 pub struct Frer(pub u8);
@@ -5849,156 +17959,82 @@ pub mod spi_v2 {
5849 pub const UNIDIRECTIONAL: Self = Self(0); 17959 pub const UNIDIRECTIONAL: Self = Self(0);
5850 #[doc = "1-line bidirectional data mode selected"] 17960 #[doc = "1-line bidirectional data mode selected"]
5851 pub const BIDIRECTIONAL: Self = Self(0x01); 17961 pub const BIDIRECTIONAL: Self = Self(0x01);
17962=======
17963 #[doc = "status register"]
17964 pub fn sr(self) -> Reg<regs::SrBasic, RW> {
17965 unsafe { Reg::from_ptr(self.0.add(16usize)) }
5852 } 17966 }
5853 #[repr(transparent)] 17967 #[doc = "event generation register"]
5854 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 17968 pub fn egr(self) -> Reg<regs::EgrBasic, W> {
5855 pub struct Cpol(pub u8); 17969 unsafe { Reg::from_ptr(self.0.add(20usize)) }
5856 impl Cpol { 17970 }
5857 #[doc = "CK to 0 when idle"] 17971 #[doc = "counter"]
5858 pub const IDLELOW: Self = Self(0); 17972 pub fn cnt(self) -> Reg<regs::Cnt16, RW> {
5859 #[doc = "CK to 1 when idle"] 17973 unsafe { Reg::from_ptr(self.0.add(36usize)) }
5860 pub const IDLEHIGH: Self = Self(0x01); 17974 }
17975 #[doc = "prescaler"]
17976 pub fn psc(self) -> Reg<regs::Psc, RW> {
17977 unsafe { Reg::from_ptr(self.0.add(40usize)) }
17978>>>>>>> fc21f52 (Better interrupt handling)
17979 }
17980 #[doc = "auto-reload register"]
17981 pub fn arr(self) -> Reg<regs::Arr16, RW> {
17982 unsafe { Reg::from_ptr(self.0.add(44usize)) }
5861 } 17983 }
5862 } 17984 }
5863 pub mod regs { 17985 pub mod regs {
5864 use crate::generic::*; 17986 use crate::generic::*;
5865 #[doc = "control register 1"] 17987 #[doc = "capture/compare mode register 1 (input mode)"]
5866 #[repr(transparent)] 17988 #[repr(transparent)]
5867 #[derive(Copy, Clone, Eq, PartialEq)] 17989 #[derive(Copy, Clone, Eq, PartialEq)]
5868 pub struct Cr1(pub u32); 17990 pub struct CcmrInput(pub u32);
5869 impl Cr1 { 17991 impl CcmrInput {
5870 #[doc = "Clock phase"] 17992 #[doc = "Capture/Compare 1 selection"]
5871 pub const fn cpha(&self) -> super::vals::Cpha { 17993 pub fn ccs(&self, n: usize) -> super::vals::CcmrInputCcs {
5872 let val = (self.0 >> 0usize) & 0x01; 17994 assert!(n < 2usize);
5873 super::vals::Cpha(val as u8) 17995 let offs = 0usize + n * 8usize;
5874 } 17996 let val = (self.0 >> offs) & 0x03;
5875 #[doc = "Clock phase"] 17997 super::vals::CcmrInputCcs(val as u8)
5876 pub fn set_cpha(&mut self, val: super::vals::Cpha) {
5877 self.0 = (self.0 & !(0x01 << 0usize)) | (((val.0 as u32) & 0x01) << 0usize);
5878 }
5879 #[doc = "Clock polarity"]
5880 pub const fn cpol(&self) -> super::vals::Cpol {
5881 let val = (self.0 >> 1usize) & 0x01;
5882 super::vals::Cpol(val as u8)
5883 }
5884 #[doc = "Clock polarity"]
5885 pub fn set_cpol(&mut self, val: super::vals::Cpol) {
5886 self.0 = (self.0 & !(0x01 << 1usize)) | (((val.0 as u32) & 0x01) << 1usize);
5887 }
5888 #[doc = "Master selection"]
5889 pub const fn mstr(&self) -> super::vals::Mstr {
5890 let val = (self.0 >> 2usize) & 0x01;
5891 super::vals::Mstr(val as u8)
5892 }
5893 #[doc = "Master selection"]
5894 pub fn set_mstr(&mut self, val: super::vals::Mstr) {
5895 self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize);
5896 }
5897 #[doc = "Baud rate control"]
5898 pub const fn br(&self) -> super::vals::Br {
5899 let val = (self.0 >> 3usize) & 0x07;
5900 super::vals::Br(val as u8)
5901 }
5902 #[doc = "Baud rate control"]
5903 pub fn set_br(&mut self, val: super::vals::Br) {
5904 self.0 = (self.0 & !(0x07 << 3usize)) | (((val.0 as u32) & 0x07) << 3usize);
5905 }
5906 #[doc = "SPI enable"]
5907 pub const fn spe(&self) -> bool {
5908 let val = (self.0 >> 6usize) & 0x01;
5909 val != 0
5910 }
5911 #[doc = "SPI enable"]
5912 pub fn set_spe(&mut self, val: bool) {
5913 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
5914 }
5915 #[doc = "Frame format"]
5916 pub const fn lsbfirst(&self) -> super::vals::Lsbfirst {
5917 let val = (self.0 >> 7usize) & 0x01;
5918 super::vals::Lsbfirst(val as u8)
5919 }
5920 #[doc = "Frame format"]
5921 pub fn set_lsbfirst(&mut self, val: super::vals::Lsbfirst) {
5922 self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize);
5923 }
5924 #[doc = "Internal slave select"]
5925 pub const fn ssi(&self) -> bool {
5926 let val = (self.0 >> 8usize) & 0x01;
5927 val != 0
5928 }
5929 #[doc = "Internal slave select"]
5930 pub fn set_ssi(&mut self, val: bool) {
5931 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
5932 }
5933 #[doc = "Software slave management"]
5934 pub const fn ssm(&self) -> bool {
5935 let val = (self.0 >> 9usize) & 0x01;
5936 val != 0
5937 }
5938 #[doc = "Software slave management"]
5939 pub fn set_ssm(&mut self, val: bool) {
5940 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
5941 }
5942 #[doc = "Receive only"]
5943 pub const fn rxonly(&self) -> super::vals::Rxonly {
5944 let val = (self.0 >> 10usize) & 0x01;
5945 super::vals::Rxonly(val as u8)
5946 }
5947 #[doc = "Receive only"]
5948 pub fn set_rxonly(&mut self, val: super::vals::Rxonly) {
5949 self.0 = (self.0 & !(0x01 << 10usize)) | (((val.0 as u32) & 0x01) << 10usize);
5950 }
5951 #[doc = "CRC length"]
5952 pub const fn crcl(&self) -> super::vals::Crcl {
5953 let val = (self.0 >> 11usize) & 0x01;
5954 super::vals::Crcl(val as u8)
5955 }
5956 #[doc = "CRC length"]
5957 pub fn set_crcl(&mut self, val: super::vals::Crcl) {
5958 self.0 = (self.0 & !(0x01 << 11usize)) | (((val.0 as u32) & 0x01) << 11usize);
5959 }
5960 #[doc = "CRC transfer next"]
5961 pub const fn crcnext(&self) -> super::vals::Crcnext {
5962 let val = (self.0 >> 12usize) & 0x01;
5963 super::vals::Crcnext(val as u8)
5964 }
5965 #[doc = "CRC transfer next"]
5966 pub fn set_crcnext(&mut self, val: super::vals::Crcnext) {
5967 self.0 = (self.0 & !(0x01 << 12usize)) | (((val.0 as u32) & 0x01) << 12usize);
5968 }
5969 #[doc = "Hardware CRC calculation enable"]
5970 pub const fn crcen(&self) -> bool {
5971 let val = (self.0 >> 13usize) & 0x01;
5972 val != 0
5973 } 17998 }
5974 #[doc = "Hardware CRC calculation enable"] 17999 #[doc = "Capture/Compare 1 selection"]
5975 pub fn set_crcen(&mut self, val: bool) { 18000 pub fn set_ccs(&mut self, n: usize, val: super::vals::CcmrInputCcs) {
5976 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); 18001 assert!(n < 2usize);
18002 let offs = 0usize + n * 8usize;
18003 self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs);
5977 } 18004 }
5978 #[doc = "Output enable in bidirectional mode"] 18005 #[doc = "Input capture 1 prescaler"]
5979 pub const fn bidioe(&self) -> super::vals::Bidioe { 18006 pub fn icpsc(&self, n: usize) -> u8 {
5980 let val = (self.0 >> 14usize) & 0x01; 18007 assert!(n < 2usize);
5981 super::vals::Bidioe(val as u8) 18008 let offs = 2usize + n * 8usize;
18009 let val = (self.0 >> offs) & 0x03;
18010 val as u8
5982 } 18011 }
5983 #[doc = "Output enable in bidirectional mode"] 18012 #[doc = "Input capture 1 prescaler"]
5984 pub fn set_bidioe(&mut self, val: super::vals::Bidioe) { 18013 pub fn set_icpsc(&mut self, n: usize, val: u8) {
5985 self.0 = (self.0 & !(0x01 << 14usize)) | (((val.0 as u32) & 0x01) << 14usize); 18014 assert!(n < 2usize);
18015 let offs = 2usize + n * 8usize;
18016 self.0 = (self.0 & !(0x03 << offs)) | (((val as u32) & 0x03) << offs);
5986 } 18017 }
5987 #[doc = "Bidirectional data mode enable"] 18018 #[doc = "Input capture 1 filter"]
5988 pub const fn bidimode(&self) -> super::vals::Bidimode { 18019 pub fn icf(&self, n: usize) -> super::vals::Icf {
5989 let val = (self.0 >> 15usize) & 0x01; 18020 assert!(n < 2usize);
5990 super::vals::Bidimode(val as u8) 18021 let offs = 4usize + n * 8usize;
18022 let val = (self.0 >> offs) & 0x0f;
18023 super::vals::Icf(val as u8)
5991 } 18024 }
5992 #[doc = "Bidirectional data mode enable"] 18025 #[doc = "Input capture 1 filter"]
5993 pub fn set_bidimode(&mut self, val: super::vals::Bidimode) { 18026 pub fn set_icf(&mut self, n: usize, val: super::vals::Icf) {
5994 self.0 = (self.0 & !(0x01 << 15usize)) | (((val.0 as u32) & 0x01) << 15usize); 18027 assert!(n < 2usize);
18028 let offs = 4usize + n * 8usize;
18029 self.0 = (self.0 & !(0x0f << offs)) | (((val.0 as u32) & 0x0f) << offs);
5995 } 18030 }
5996 } 18031 }
5997 impl Default for Cr1 { 18032 impl Default for CcmrInput {
5998 fn default() -> Cr1 { 18033 fn default() -> CcmrInput {
5999 Cr1(0) 18034 CcmrInput(0)
6000 } 18035 }
6001 } 18036 }
18037<<<<<<< HEAD
6002 #[doc = "data register"] 18038 #[doc = "data register"]
6003 #[repr(transparent)] 18039 #[repr(transparent)]
6004 #[derive(Copy, Clone, Eq, PartialEq)] 18040 #[derive(Copy, Clone, Eq, PartialEq)]
@@ -6020,165 +18056,130 @@ pub mod spi_v2 {
6020 } 18056 }
6021 } 18057 }
6022 #[doc = "status register"] 18058 #[doc = "status register"]
18059=======
18060 #[doc = "capture/compare mode register 2 (output mode)"]
18061>>>>>>> fc21f52 (Better interrupt handling)
6023 #[repr(transparent)] 18062 #[repr(transparent)]
6024 #[derive(Copy, Clone, Eq, PartialEq)] 18063 #[derive(Copy, Clone, Eq, PartialEq)]
6025 pub struct Sr(pub u32); 18064 pub struct CcmrOutput(pub u32);
6026 impl Sr { 18065 impl CcmrOutput {
6027 #[doc = "Receive buffer not empty"] 18066 #[doc = "Capture/Compare 3 selection"]
6028 pub const fn rxne(&self) -> bool { 18067 pub fn ccs(&self, n: usize) -> super::vals::CcmrOutputCcs {
6029 let val = (self.0 >> 0usize) & 0x01; 18068 assert!(n < 2usize);
6030 val != 0 18069 let offs = 0usize + n * 8usize;
6031 } 18070 let val = (self.0 >> offs) & 0x03;
6032 #[doc = "Receive buffer not empty"] 18071 super::vals::CcmrOutputCcs(val as u8)
6033 pub fn set_rxne(&mut self, val: bool) {
6034 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
6035 }
6036 #[doc = "Transmit buffer empty"]
6037 pub const fn txe(&self) -> bool {
6038 let val = (self.0 >> 1usize) & 0x01;
6039 val != 0
6040 }
6041 #[doc = "Transmit buffer empty"]
6042 pub fn set_txe(&mut self, val: bool) {
6043 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
6044 }
6045 #[doc = "CRC error flag"]
6046 pub const fn crcerr(&self) -> bool {
6047 let val = (self.0 >> 4usize) & 0x01;
6048 val != 0
6049 } 18072 }
6050 #[doc = "CRC error flag"] 18073 #[doc = "Capture/Compare 3 selection"]
6051 pub fn set_crcerr(&mut self, val: bool) { 18074 pub fn set_ccs(&mut self, n: usize, val: super::vals::CcmrOutputCcs) {
6052 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); 18075 assert!(n < 2usize);
18076 let offs = 0usize + n * 8usize;
18077 self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs);
6053 } 18078 }
6054 #[doc = "Mode fault"] 18079 #[doc = "Output compare 3 fast enable"]
6055 pub const fn modf(&self) -> bool { 18080 pub fn ocfe(&self, n: usize) -> bool {
6056 let val = (self.0 >> 5usize) & 0x01; 18081 assert!(n < 2usize);
18082 let offs = 2usize + n * 8usize;
18083 let val = (self.0 >> offs) & 0x01;
6057 val != 0 18084 val != 0
6058 } 18085 }
6059 #[doc = "Mode fault"] 18086 #[doc = "Output compare 3 fast enable"]
6060 pub fn set_modf(&mut self, val: bool) { 18087 pub fn set_ocfe(&mut self, n: usize, val: bool) {
6061 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); 18088 assert!(n < 2usize);
18089 let offs = 2usize + n * 8usize;
18090 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
6062 } 18091 }
6063 #[doc = "Overrun flag"] 18092 #[doc = "Output compare 3 preload enable"]
6064 pub const fn ovr(&self) -> bool { 18093 pub fn ocpe(&self, n: usize) -> super::vals::Ocpe {
6065 let val = (self.0 >> 6usize) & 0x01; 18094 assert!(n < 2usize);
6066 val != 0 18095 let offs = 3usize + n * 8usize;
18096 let val = (self.0 >> offs) & 0x01;
18097 super::vals::Ocpe(val as u8)
6067 } 18098 }
6068 #[doc = "Overrun flag"] 18099 #[doc = "Output compare 3 preload enable"]
6069 pub fn set_ovr(&mut self, val: bool) { 18100 pub fn set_ocpe(&mut self, n: usize, val: super::vals::Ocpe) {
6070 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); 18101 assert!(n < 2usize);
18102 let offs = 3usize + n * 8usize;
18103 self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs);
6071 } 18104 }
6072 #[doc = "Busy flag"] 18105 #[doc = "Output compare 3 mode"]
6073 pub const fn bsy(&self) -> bool { 18106 pub fn ocm(&self, n: usize) -> super::vals::Ocm {
6074 let val = (self.0 >> 7usize) & 0x01; 18107 assert!(n < 2usize);
6075 val != 0 18108 let offs = 4usize + n * 8usize;
18109 let val = (self.0 >> offs) & 0x07;
18110 super::vals::Ocm(val as u8)
6076 } 18111 }
6077 #[doc = "Busy flag"] 18112 #[doc = "Output compare 3 mode"]
6078 pub fn set_bsy(&mut self, val: bool) { 18113 pub fn set_ocm(&mut self, n: usize, val: super::vals::Ocm) {
6079 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); 18114 assert!(n < 2usize);
18115 let offs = 4usize + n * 8usize;
18116 self.0 = (self.0 & !(0x07 << offs)) | (((val.0 as u32) & 0x07) << offs);
6080 } 18117 }
6081 #[doc = "Frame format error"] 18118 #[doc = "Output compare 3 clear enable"]
6082 pub const fn fre(&self) -> bool { 18119 pub fn occe(&self, n: usize) -> bool {
6083 let val = (self.0 >> 8usize) & 0x01; 18120 assert!(n < 2usize);
18121 let offs = 7usize + n * 8usize;
18122 let val = (self.0 >> offs) & 0x01;
6084 val != 0 18123 val != 0
6085 } 18124 }
6086 #[doc = "Frame format error"] 18125 #[doc = "Output compare 3 clear enable"]
6087 pub fn set_fre(&mut self, val: bool) { 18126 pub fn set_occe(&mut self, n: usize, val: bool) {
6088 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); 18127 assert!(n < 2usize);
6089 } 18128 let offs = 7usize + n * 8usize;
6090 #[doc = "FIFO reception level"] 18129 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
6091 pub const fn frlvl(&self) -> u8 {
6092 let val = (self.0 >> 9usize) & 0x03;
6093 val as u8
6094 }
6095 #[doc = "FIFO reception level"]
6096 pub fn set_frlvl(&mut self, val: u8) {
6097 self.0 = (self.0 & !(0x03 << 9usize)) | (((val as u32) & 0x03) << 9usize);
6098 }
6099 #[doc = "FIFO Transmission Level"]
6100 pub const fn ftlvl(&self) -> u8 {
6101 let val = (self.0 >> 11usize) & 0x03;
6102 val as u8
6103 }
6104 #[doc = "FIFO Transmission Level"]
6105 pub fn set_ftlvl(&mut self, val: u8) {
6106 self.0 = (self.0 & !(0x03 << 11usize)) | (((val as u32) & 0x03) << 11usize);
6107 } 18130 }
6108 } 18131 }
6109 impl Default for Sr { 18132 impl Default for CcmrOutput {
6110 fn default() -> Sr { 18133 fn default() -> CcmrOutput {
6111 Sr(0) 18134 CcmrOutput(0)
6112 } 18135 }
6113 } 18136 }
6114 #[doc = "control register 2"] 18137 #[doc = "event generation register"]
6115 #[repr(transparent)] 18138 #[repr(transparent)]
6116 #[derive(Copy, Clone, Eq, PartialEq)] 18139 #[derive(Copy, Clone, Eq, PartialEq)]
6117 pub struct Cr2(pub u32); 18140 pub struct EgrGp(pub u32);
6118 impl Cr2 { 18141 impl EgrGp {
6119 #[doc = "Rx buffer DMA enable"] 18142 #[doc = "Update generation"]
6120 pub const fn rxdmaen(&self) -> bool { 18143 pub const fn ug(&self) -> bool {
6121 let val = (self.0 >> 0usize) & 0x01; 18144 let val = (self.0 >> 0usize) & 0x01;
6122 val != 0 18145 val != 0
6123 } 18146 }
6124 #[doc = "Rx buffer DMA enable"] 18147 #[doc = "Update generation"]
6125 pub fn set_rxdmaen(&mut self, val: bool) { 18148 pub fn set_ug(&mut self, val: bool) {
6126 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 18149 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
6127 } 18150 }
6128 #[doc = "Tx buffer DMA enable"] 18151 #[doc = "Capture/compare 1 generation"]
6129 pub const fn txdmaen(&self) -> bool { 18152 pub fn ccg(&self, n: usize) -> bool {
6130 let val = (self.0 >> 1usize) & 0x01; 18153 assert!(n < 4usize);
6131 val != 0 18154 let offs = 1usize + n * 1usize;
6132 } 18155 let val = (self.0 >> offs) & 0x01;
6133 #[doc = "Tx buffer DMA enable"]
6134 pub fn set_txdmaen(&mut self, val: bool) {
6135 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
6136 }
6137 #[doc = "SS output enable"]
6138 pub const fn ssoe(&self) -> bool {
6139 let val = (self.0 >> 2usize) & 0x01;
6140 val != 0
6141 }
6142 #[doc = "SS output enable"]
6143 pub fn set_ssoe(&mut self, val: bool) {
6144 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
6145 }
6146 #[doc = "NSS pulse management"]
6147 pub const fn nssp(&self) -> bool {
6148 let val = (self.0 >> 3usize) & 0x01;
6149 val != 0 18156 val != 0
6150 } 18157 }
6151 #[doc = "NSS pulse management"] 18158 #[doc = "Capture/compare 1 generation"]
6152 pub fn set_nssp(&mut self, val: bool) { 18159 pub fn set_ccg(&mut self, n: usize, val: bool) {
6153 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); 18160 assert!(n < 4usize);
6154 } 18161 let offs = 1usize + n * 1usize;
6155 #[doc = "Frame format"] 18162 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
6156 pub const fn frf(&self) -> super::vals::Frf {
6157 let val = (self.0 >> 4usize) & 0x01;
6158 super::vals::Frf(val as u8)
6159 }
6160 #[doc = "Frame format"]
6161 pub fn set_frf(&mut self, val: super::vals::Frf) {
6162 self.0 = (self.0 & !(0x01 << 4usize)) | (((val.0 as u32) & 0x01) << 4usize);
6163 } 18163 }
6164 #[doc = "Error interrupt enable"] 18164 #[doc = "Capture/Compare control update generation"]
6165 pub const fn errie(&self) -> bool { 18165 pub const fn comg(&self) -> bool {
6166 let val = (self.0 >> 5usize) & 0x01; 18166 let val = (self.0 >> 5usize) & 0x01;
6167 val != 0 18167 val != 0
6168 } 18168 }
6169 #[doc = "Error interrupt enable"] 18169 #[doc = "Capture/Compare control update generation"]
6170 pub fn set_errie(&mut self, val: bool) { 18170 pub fn set_comg(&mut self, val: bool) {
6171 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); 18171 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
6172 } 18172 }
6173 #[doc = "RX buffer not empty interrupt enable"] 18173 #[doc = "Trigger generation"]
6174 pub const fn rxneie(&self) -> bool { 18174 pub const fn tg(&self) -> bool {
6175 let val = (self.0 >> 6usize) & 0x01; 18175 let val = (self.0 >> 6usize) & 0x01;
6176 val != 0 18176 val != 0
6177 } 18177 }
6178 #[doc = "RX buffer not empty interrupt enable"] 18178 #[doc = "Trigger generation"]
6179 pub fn set_rxneie(&mut self, val: bool) { 18179 pub fn set_tg(&mut self, val: bool) {
6180 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); 18180 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
6181 } 18181 }
18182<<<<<<< HEAD
6182 #[doc = "Tx buffer empty interrupt enable"] 18183 #[doc = "Tx buffer empty interrupt enable"]
6183 pub const fn txeie(&self) -> bool { 18184 pub const fn txeie(&self) -> bool {
6184 let val = (self.0 >> 7usize) & 0x01; 18185 let val = (self.0 >> 7usize) & 0x01;
@@ -6283,13 +18284,24 @@ pub mod spi_v2 {
6283 #[doc = "Rx CRC register"] 18284 #[doc = "Rx CRC register"]
6284 pub fn set_rx_crc(&mut self, val: u16) { 18285 pub fn set_rx_crc(&mut self, val: u16) {
6285 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); 18286 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
18287=======
18288 #[doc = "Break generation"]
18289 pub const fn bg(&self) -> bool {
18290 let val = (self.0 >> 7usize) & 0x01;
18291 val != 0
18292 }
18293 #[doc = "Break generation"]
18294 pub fn set_bg(&mut self, val: bool) {
18295 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
18296>>>>>>> fc21f52 (Better interrupt handling)
6286 } 18297 }
6287 } 18298 }
6288 impl Default for Rxcrcr { 18299 impl Default for EgrGp {
6289 fn default() -> Rxcrcr { 18300 fn default() -> EgrGp {
6290 Rxcrcr(0) 18301 EgrGp(0)
6291 } 18302 }
6292 } 18303 }
18304<<<<<<< HEAD
6293 } 18305 }
6294} 18306}
6295pub mod syscfg_f4 { 18307pub mod syscfg_f4 {
@@ -6636,6 +18648,151 @@ pub mod spi_v1 {
6636 pub mod regs { 18648 pub mod regs {
6637 use crate::generic::*; 18649 use crate::generic::*;
6638 #[doc = "CRC polynomial register"] 18650 #[doc = "CRC polynomial register"]
18651=======
18652 #[doc = "counter"]
18653 #[repr(transparent)]
18654 #[derive(Copy, Clone, Eq, PartialEq)]
18655 pub struct Cnt16(pub u32);
18656 impl Cnt16 {
18657 #[doc = "counter value"]
18658 pub const fn cnt(&self) -> u16 {
18659 let val = (self.0 >> 0usize) & 0xffff;
18660 val as u16
18661 }
18662 #[doc = "counter value"]
18663 pub fn set_cnt(&mut self, val: u16) {
18664 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
18665 }
18666 }
18667 impl Default for Cnt16 {
18668 fn default() -> Cnt16 {
18669 Cnt16(0)
18670 }
18671 }
18672 #[doc = "control register 2"]
18673 #[repr(transparent)]
18674 #[derive(Copy, Clone, Eq, PartialEq)]
18675 pub struct Cr2Adv(pub u32);
18676 impl Cr2Adv {
18677 #[doc = "Capture/compare preloaded control"]
18678 pub const fn ccpc(&self) -> bool {
18679 let val = (self.0 >> 0usize) & 0x01;
18680 val != 0
18681 }
18682 #[doc = "Capture/compare preloaded control"]
18683 pub fn set_ccpc(&mut self, val: bool) {
18684 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
18685 }
18686 #[doc = "Capture/compare control update selection"]
18687 pub const fn ccus(&self) -> bool {
18688 let val = (self.0 >> 2usize) & 0x01;
18689 val != 0
18690 }
18691 #[doc = "Capture/compare control update selection"]
18692 pub fn set_ccus(&mut self, val: bool) {
18693 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
18694 }
18695 #[doc = "Capture/compare DMA selection"]
18696 pub const fn ccds(&self) -> super::vals::Ccds {
18697 let val = (self.0 >> 3usize) & 0x01;
18698 super::vals::Ccds(val as u8)
18699 }
18700 #[doc = "Capture/compare DMA selection"]
18701 pub fn set_ccds(&mut self, val: super::vals::Ccds) {
18702 self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize);
18703 }
18704 #[doc = "Master mode selection"]
18705 pub const fn mms(&self) -> super::vals::Mms {
18706 let val = (self.0 >> 4usize) & 0x07;
18707 super::vals::Mms(val as u8)
18708 }
18709 #[doc = "Master mode selection"]
18710 pub fn set_mms(&mut self, val: super::vals::Mms) {
18711 self.0 = (self.0 & !(0x07 << 4usize)) | (((val.0 as u32) & 0x07) << 4usize);
18712 }
18713 #[doc = "TI1 selection"]
18714 pub const fn ti1s(&self) -> super::vals::Tis {
18715 let val = (self.0 >> 7usize) & 0x01;
18716 super::vals::Tis(val as u8)
18717 }
18718 #[doc = "TI1 selection"]
18719 pub fn set_ti1s(&mut self, val: super::vals::Tis) {
18720 self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize);
18721 }
18722 #[doc = "Output Idle state 1"]
18723 pub fn ois(&self, n: usize) -> bool {
18724 assert!(n < 4usize);
18725 let offs = 8usize + n * 2usize;
18726 let val = (self.0 >> offs) & 0x01;
18727 val != 0
18728 }
18729 #[doc = "Output Idle state 1"]
18730 pub fn set_ois(&mut self, n: usize, val: bool) {
18731 assert!(n < 4usize);
18732 let offs = 8usize + n * 2usize;
18733 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
18734 }
18735 #[doc = "Output Idle state 1"]
18736 pub const fn ois1n(&self) -> bool {
18737 let val = (self.0 >> 9usize) & 0x01;
18738 val != 0
18739 }
18740 #[doc = "Output Idle state 1"]
18741 pub fn set_ois1n(&mut self, val: bool) {
18742 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
18743 }
18744 #[doc = "Output Idle state 2"]
18745 pub const fn ois2n(&self) -> bool {
18746 let val = (self.0 >> 11usize) & 0x01;
18747 val != 0
18748 }
18749 #[doc = "Output Idle state 2"]
18750 pub fn set_ois2n(&mut self, val: bool) {
18751 self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize);
18752 }
18753 #[doc = "Output Idle state 3"]
18754 pub const fn ois3n(&self) -> bool {
18755 let val = (self.0 >> 13usize) & 0x01;
18756 val != 0
18757 }
18758 #[doc = "Output Idle state 3"]
18759 pub fn set_ois3n(&mut self, val: bool) {
18760 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize);
18761 }
18762 }
18763 impl Default for Cr2Adv {
18764 fn default() -> Cr2Adv {
18765 Cr2Adv(0)
18766 }
18767 }
18768 #[doc = "auto-reload register"]
18769 #[repr(transparent)]
18770 #[derive(Copy, Clone, Eq, PartialEq)]
18771 pub struct Arr32(pub u32);
18772 impl Arr32 {
18773 #[doc = "Auto-reload value"]
18774 pub const fn arr(&self) -> u32 {
18775 let val = (self.0 >> 0usize) & 0xffff_ffff;
18776 val as u32
18777 }
18778 #[doc = "Auto-reload value"]
18779 pub fn set_arr(&mut self, val: u32) {
18780 self.0 =
18781 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
18782 }
18783 }
18784 impl Default for Arr32 {
18785 fn default() -> Arr32 {
18786 Arr32(0)
18787 }
18788=======
18789 impl Default for Ifcr {
18790 fn default() -> Ifcr {
18791 Ifcr(0)
18792 }
18793 }
18794 #[doc = "stream x FIFO control register"]
18795>>>>>>> fc21f52 (Better interrupt handling)
6639 #[repr(transparent)] 18796 #[repr(transparent)]
6640 #[derive(Copy, Clone, Eq, PartialEq)] 18797 #[derive(Copy, Clone, Eq, PartialEq)]
6641 pub struct Crcpr(pub u32); 18798 pub struct Crcpr(pub u32);
@@ -6936,6 +19093,7 @@ pub mod spi_v1 {
6936 let val = (self.0 >> 0usize) & 0x01; 19093 let val = (self.0 >> 0usize) & 0x01;
6937 val != 0 19094 val != 0
6938 } 19095 }
19096<<<<<<< HEAD
6939 #[doc = "Receive buffer not empty"] 19097 #[doc = "Receive buffer not empty"]
6940 pub fn set_rxne(&mut self, val: bool) { 19098 pub fn set_rxne(&mut self, val: bool) {
6941 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 19099 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
@@ -7568,6 +19726,471 @@ are always 0 and read only). This register can be written by firmware when DPSM
7568 #[doc = "Rx FIFO full interrupt enable Set and cleared by software to enable/disable interrupt caused by Rx FIFO full."] 19726 #[doc = "Rx FIFO full interrupt enable Set and cleared by software to enable/disable interrupt caused by Rx FIFO full."]
7569 pub const fn rxfifofie(&self) -> bool { 19727 pub const fn rxfifofie(&self) -> bool {
7570 let val = (self.0 >> 17usize) & 0x01; 19728 let val = (self.0 >> 17usize) & 0x01;
19729=======
19730 #[doc = "Peripheral increment offset size"]
19731 pub fn set_pincos(&mut self, val: super::vals::Pincos) {
19732 self.0 = (self.0 & !(0x01 << 15usize)) | (((val.0 as u32) & 0x01) << 15usize);
19733 }
19734 #[doc = "Priority level"]
19735 pub const fn pl(&self) -> super::vals::Pl {
19736 let val = (self.0 >> 16usize) & 0x03;
19737 super::vals::Pl(val as u8)
19738 }
19739 #[doc = "Priority level"]
19740 pub fn set_pl(&mut self, val: super::vals::Pl) {
19741 self.0 = (self.0 & !(0x03 << 16usize)) | (((val.0 as u32) & 0x03) << 16usize);
19742 }
19743 #[doc = "Double buffer mode"]
19744 pub const fn dbm(&self) -> super::vals::Dbm {
19745 let val = (self.0 >> 18usize) & 0x01;
19746 super::vals::Dbm(val as u8)
19747 }
19748 #[doc = "Double buffer mode"]
19749 pub fn set_dbm(&mut self, val: super::vals::Dbm) {
19750 self.0 = (self.0 & !(0x01 << 18usize)) | (((val.0 as u32) & 0x01) << 18usize);
19751 }
19752 #[doc = "Current target (only in double buffer mode)"]
19753 pub const fn ct(&self) -> super::vals::Ct {
19754 let val = (self.0 >> 19usize) & 0x01;
19755 super::vals::Ct(val as u8)
19756 }
19757 #[doc = "Current target (only in double buffer mode)"]
19758 pub fn set_ct(&mut self, val: super::vals::Ct) {
19759 self.0 = (self.0 & !(0x01 << 19usize)) | (((val.0 as u32) & 0x01) << 19usize);
19760 }
19761 #[doc = "Peripheral burst transfer configuration"]
19762 pub const fn pburst(&self) -> super::vals::Burst {
19763 let val = (self.0 >> 21usize) & 0x03;
19764 super::vals::Burst(val as u8)
19765 }
19766 #[doc = "Peripheral burst transfer configuration"]
19767 pub fn set_pburst(&mut self, val: super::vals::Burst) {
19768 self.0 = (self.0 & !(0x03 << 21usize)) | (((val.0 as u32) & 0x03) << 21usize);
19769 }
19770 #[doc = "Memory burst transfer configuration"]
19771 pub const fn mburst(&self) -> super::vals::Burst {
19772 let val = (self.0 >> 23usize) & 0x03;
19773 super::vals::Burst(val as u8)
19774 }
19775 #[doc = "Memory burst transfer configuration"]
19776 pub fn set_mburst(&mut self, val: super::vals::Burst) {
19777 self.0 = (self.0 & !(0x03 << 23usize)) | (((val.0 as u32) & 0x03) << 23usize);
19778 }
19779 #[doc = "Channel selection"]
19780 pub const fn chsel(&self) -> u8 {
19781 let val = (self.0 >> 25usize) & 0x0f;
19782 val as u8
19783 }
19784 #[doc = "Channel selection"]
19785 pub fn set_chsel(&mut self, val: u8) {
19786 self.0 = (self.0 & !(0x0f << 25usize)) | (((val as u32) & 0x0f) << 25usize);
19787 }
19788 }
19789 impl Default for Cr {
19790 fn default() -> Cr {
19791 Cr(0)
19792 }
19793 }
19794 }
19795 pub mod vals {
19796 use crate::generic::*;
19797 #[repr(transparent)]
19798 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
19799 pub struct Ct(pub u8);
19800 impl Ct {
19801 #[doc = "The current target memory is Memory 0"]
19802 pub const MEMORY0: Self = Self(0);
19803 #[doc = "The current target memory is Memory 1"]
19804 pub const MEMORY1: Self = Self(0x01);
19805 }
19806 #[repr(transparent)]
19807 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
19808 pub struct Burst(pub u8);
19809 impl Burst {
19810 #[doc = "Single transfer"]
19811 pub const SINGLE: Self = Self(0);
19812 #[doc = "Incremental burst of 4 beats"]
19813 pub const INCR4: Self = Self(0x01);
19814 #[doc = "Incremental burst of 8 beats"]
19815 pub const INCR8: Self = Self(0x02);
19816 #[doc = "Incremental burst of 16 beats"]
19817 pub const INCR16: Self = Self(0x03);
19818 }
19819 #[repr(transparent)]
19820 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
19821 pub struct Dbm(pub u8);
19822 impl Dbm {
19823 #[doc = "No buffer switching at the end of transfer"]
19824 pub const DISABLED: Self = Self(0);
19825 #[doc = "Memory target switched at the end of the DMA transfer"]
19826 pub const ENABLED: Self = Self(0x01);
19827 }
19828 #[repr(transparent)]
19829 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
19830 pub struct Pl(pub u8);
19831 impl Pl {
19832 #[doc = "Low"]
19833 pub const LOW: Self = Self(0);
19834 #[doc = "Medium"]
19835 pub const MEDIUM: Self = Self(0x01);
19836 #[doc = "High"]
19837 pub const HIGH: Self = Self(0x02);
19838 #[doc = "Very high"]
19839 pub const VERYHIGH: Self = Self(0x03);
19840 }
19841 #[repr(transparent)]
19842 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
19843 pub struct Circ(pub u8);
19844 impl Circ {
19845 #[doc = "Circular mode disabled"]
19846 pub const DISABLED: Self = Self(0);
19847 #[doc = "Circular mode enabled"]
19848 pub const ENABLED: Self = Self(0x01);
19849 }
19850 #[repr(transparent)]
19851 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
19852 pub struct Fth(pub u8);
19853 impl Fth {
19854 #[doc = "1/4 full FIFO"]
19855 pub const QUARTER: Self = Self(0);
19856 #[doc = "1/2 full FIFO"]
19857 pub const HALF: Self = Self(0x01);
19858 #[doc = "3/4 full FIFO"]
19859 pub const THREEQUARTERS: Self = Self(0x02);
19860 #[doc = "Full FIFO"]
19861 pub const FULL: Self = Self(0x03);
19862 }
19863 #[repr(transparent)]
19864 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
19865 pub struct Fs(pub u8);
19866 impl Fs {
19867 #[doc = "0 < fifo_level < 1/4"]
19868 pub const QUARTER1: Self = Self(0);
19869 #[doc = "1/4 <= fifo_level < 1/2"]
19870 pub const QUARTER2: Self = Self(0x01);
19871 #[doc = "1/2 <= fifo_level < 3/4"]
19872 pub const QUARTER3: Self = Self(0x02);
19873 #[doc = "3/4 <= fifo_level < full"]
19874 pub const QUARTER4: Self = Self(0x03);
19875 #[doc = "FIFO is empty"]
19876 pub const EMPTY: Self = Self(0x04);
19877 #[doc = "FIFO is full"]
19878 pub const FULL: Self = Self(0x05);
19879 }
19880 #[repr(transparent)]
19881 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
19882 pub struct Pfctrl(pub u8);
19883 impl Pfctrl {
19884 #[doc = "The DMA is the flow controller"]
19885 pub const DMA: Self = Self(0);
19886 #[doc = "The peripheral is the flow controller"]
19887 pub const PERIPHERAL: Self = Self(0x01);
19888 }
19889 #[repr(transparent)]
19890 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
19891 pub struct Size(pub u8);
19892 impl Size {
19893 #[doc = "Byte (8-bit)"]
19894 pub const BITS8: Self = Self(0);
19895 #[doc = "Half-word (16-bit)"]
19896 pub const BITS16: Self = Self(0x01);
19897 #[doc = "Word (32-bit)"]
19898 pub const BITS32: Self = Self(0x02);
19899 }
19900 #[repr(transparent)]
19901 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
19902 pub struct Inc(pub u8);
19903 impl Inc {
19904 #[doc = "Address pointer is fixed"]
19905 pub const FIXED: Self = Self(0);
19906 #[doc = "Address pointer is incremented after each data transfer"]
19907 pub const INCREMENTED: Self = Self(0x01);
19908 }
19909 #[repr(transparent)]
19910 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
19911 pub struct Pincos(pub u8);
19912 impl Pincos {
19913 #[doc = "The offset size for the peripheral address calculation is linked to the PSIZE"]
19914 pub const PSIZE: Self = Self(0);
19915 #[doc = "The offset size for the peripheral address calculation is fixed to 4 (32-bit alignment)"]
19916 pub const FIXED4: Self = Self(0x01);
19917 }
19918 #[repr(transparent)]
19919 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
19920 pub struct Dir(pub u8);
19921 impl Dir {
19922 #[doc = "Peripheral-to-memory"]
19923 pub const PERIPHERALTOMEMORY: Self = Self(0);
19924 #[doc = "Memory-to-peripheral"]
19925 pub const MEMORYTOPERIPHERAL: Self = Self(0x01);
19926 #[doc = "Memory-to-memory"]
19927 pub const MEMORYTOMEMORY: Self = Self(0x02);
19928 }
19929 #[repr(transparent)]
19930 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
19931 pub struct Dmdis(pub u8);
19932 impl Dmdis {
19933 #[doc = "Direct mode is enabled"]
19934 pub const ENABLED: Self = Self(0);
19935 #[doc = "Direct mode is disabled"]
19936 pub const DISABLED: Self = Self(0x01);
19937 }
19938 }
19939}
19940pub mod syscfg_h7 {
19941 use crate::generic::*;
19942 #[doc = "System configuration controller"]
19943 #[derive(Copy, Clone)]
19944 pub struct Syscfg(pub *mut u8);
19945 unsafe impl Send for Syscfg {}
19946 unsafe impl Sync for Syscfg {}
19947 impl Syscfg {
19948 #[doc = "peripheral mode configuration register"]
19949 pub fn pmcr(self) -> Reg<regs::Pmcr, RW> {
19950 unsafe { Reg::from_ptr(self.0.add(4usize)) }
19951 }
19952 #[doc = "external interrupt configuration register 1"]
19953 pub fn exticr(self, n: usize) -> Reg<regs::Exticr, RW> {
19954 assert!(n < 4usize);
19955 unsafe { Reg::from_ptr(self.0.add(8usize + n * 4usize)) }
19956 }
19957 #[doc = "compensation cell control/status register"]
19958 pub fn cccsr(self) -> Reg<regs::Cccsr, RW> {
19959 unsafe { Reg::from_ptr(self.0.add(32usize)) }
19960 }
19961 #[doc = "SYSCFG compensation cell value register"]
19962 pub fn ccvr(self) -> Reg<regs::Ccvr, R> {
19963 unsafe { Reg::from_ptr(self.0.add(36usize)) }
19964 }
19965 #[doc = "SYSCFG compensation cell code register"]
19966 pub fn cccr(self) -> Reg<regs::Cccr, RW> {
19967 unsafe { Reg::from_ptr(self.0.add(40usize)) }
19968 }
19969 #[doc = "SYSCFG power control register"]
19970 pub fn pwrcr(self) -> Reg<regs::Pwrcr, RW> {
19971 unsafe { Reg::from_ptr(self.0.add(44usize)) }
19972 }
19973 #[doc = "SYSCFG package register"]
19974 pub fn pkgr(self) -> Reg<regs::Pkgr, R> {
19975 unsafe { Reg::from_ptr(self.0.add(292usize)) }
19976 }
19977 #[doc = "SYSCFG user register 0"]
19978 pub fn ur0(self) -> Reg<regs::Ur0, R> {
19979 unsafe { Reg::from_ptr(self.0.add(768usize)) }
19980 }
19981 #[doc = "SYSCFG user register 2"]
19982 pub fn ur2(self) -> Reg<regs::Ur2, RW> {
19983 unsafe { Reg::from_ptr(self.0.add(776usize)) }
19984 }
19985 #[doc = "SYSCFG user register 3"]
19986 pub fn ur3(self) -> Reg<regs::Ur3, RW> {
19987 unsafe { Reg::from_ptr(self.0.add(780usize)) }
19988 }
19989 #[doc = "SYSCFG user register 4"]
19990 pub fn ur4(self) -> Reg<regs::Ur4, R> {
19991 unsafe { Reg::from_ptr(self.0.add(784usize)) }
19992 }
19993 #[doc = "SYSCFG user register 5"]
19994 pub fn ur5(self) -> Reg<regs::Ur5, R> {
19995 unsafe { Reg::from_ptr(self.0.add(788usize)) }
19996 }
19997 #[doc = "SYSCFG user register 6"]
19998 pub fn ur6(self) -> Reg<regs::Ur6, R> {
19999 unsafe { Reg::from_ptr(self.0.add(792usize)) }
20000 }
20001 #[doc = "SYSCFG user register 7"]
20002 pub fn ur7(self) -> Reg<regs::Ur7, R> {
20003 unsafe { Reg::from_ptr(self.0.add(796usize)) }
20004 }
20005 #[doc = "SYSCFG user register 8"]
20006 pub fn ur8(self) -> Reg<regs::Ur8, R> {
20007 unsafe { Reg::from_ptr(self.0.add(800usize)) }
20008 }
20009 #[doc = "SYSCFG user register 9"]
20010 pub fn ur9(self) -> Reg<regs::Ur9, R> {
20011 unsafe { Reg::from_ptr(self.0.add(804usize)) }
20012 }
20013 #[doc = "SYSCFG user register 10"]
20014 pub fn ur10(self) -> Reg<regs::Ur10, R> {
20015 unsafe { Reg::from_ptr(self.0.add(808usize)) }
20016 }
20017 #[doc = "SYSCFG user register 11"]
20018 pub fn ur11(self) -> Reg<regs::Ur11, R> {
20019 unsafe { Reg::from_ptr(self.0.add(812usize)) }
20020 }
20021 #[doc = "SYSCFG user register 12"]
20022 pub fn ur12(self) -> Reg<regs::Ur12, R> {
20023 unsafe { Reg::from_ptr(self.0.add(816usize)) }
20024>>>>>>> Better interrupt handling
20025 }
20026 #[doc = "SYSCFG user register 13"]
20027 pub fn ur13(self) -> Reg<regs::Ur13, R> {
20028 unsafe { Reg::from_ptr(self.0.add(820usize)) }
20029 }
20030 #[doc = "SYSCFG user register 14"]
20031 pub fn ur14(self) -> Reg<regs::Ur14, RW> {
20032 unsafe { Reg::from_ptr(self.0.add(824usize)) }
20033 }
20034<<<<<<< HEAD
20035 #[doc = "control register 2"]
20036 #[repr(transparent)]
20037 #[derive(Copy, Clone, Eq, PartialEq)]
20038 pub struct Cr2Gp(pub u32);
20039 impl Cr2Gp {
20040 #[doc = "Capture/compare DMA selection"]
20041 pub const fn ccds(&self) -> super::vals::Ccds {
20042 let val = (self.0 >> 3usize) & 0x01;
20043 super::vals::Ccds(val as u8)
20044 }
20045 #[doc = "Capture/compare DMA selection"]
20046 pub fn set_ccds(&mut self, val: super::vals::Ccds) {
20047 self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize);
20048 }
20049 #[doc = "Master mode selection"]
20050 pub const fn mms(&self) -> super::vals::Mms {
20051 let val = (self.0 >> 4usize) & 0x07;
20052 super::vals::Mms(val as u8)
20053 }
20054 #[doc = "Master mode selection"]
20055 pub fn set_mms(&mut self, val: super::vals::Mms) {
20056 self.0 = (self.0 & !(0x07 << 4usize)) | (((val.0 as u32) & 0x07) << 4usize);
20057 }
20058 #[doc = "TI1 selection"]
20059 pub const fn ti1s(&self) -> super::vals::Tis {
20060 let val = (self.0 >> 7usize) & 0x01;
20061 super::vals::Tis(val as u8)
20062 }
20063 #[doc = "TI1 selection"]
20064 pub fn set_ti1s(&mut self, val: super::vals::Tis) {
20065 self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize);
20066 }
20067 }
20068 impl Default for Cr2Gp {
20069 fn default() -> Cr2Gp {
20070 Cr2Gp(0)
20071 }
20072 }
20073 #[doc = "capture/compare register 1"]
20074 #[repr(transparent)]
20075 #[derive(Copy, Clone, Eq, PartialEq)]
20076 pub struct Ccr16(pub u32);
20077 impl Ccr16 {
20078 #[doc = "Capture/Compare 1 value"]
20079 pub const fn ccr(&self) -> u16 {
20080 let val = (self.0 >> 0usize) & 0xffff;
20081 val as u16
20082 }
20083 #[doc = "Capture/Compare 1 value"]
20084 pub fn set_ccr(&mut self, val: u16) {
20085 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
20086 }
20087 }
20088 impl Default for Ccr16 {
20089 fn default() -> Ccr16 {
20090 Ccr16(0)
20091 }
20092 }
20093 #[doc = "capture/compare enable register"]
20094 #[repr(transparent)]
20095 #[derive(Copy, Clone, Eq, PartialEq)]
20096 pub struct CcerAdv(pub u32);
20097 impl CcerAdv {
20098 #[doc = "Capture/Compare 1 output enable"]
20099 pub fn cce(&self, n: usize) -> bool {
20100 assert!(n < 4usize);
20101 let offs = 0usize + n * 4usize;
20102 let val = (self.0 >> offs) & 0x01;
20103 val != 0
20104 }
20105 #[doc = "Capture/Compare 1 output enable"]
20106 pub fn set_cce(&mut self, n: usize, val: bool) {
20107 assert!(n < 4usize);
20108 let offs = 0usize + n * 4usize;
20109 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
20110 }
20111 #[doc = "Capture/Compare 1 output Polarity"]
20112 pub fn ccp(&self, n: usize) -> bool {
20113 assert!(n < 4usize);
20114 let offs = 1usize + n * 4usize;
20115 let val = (self.0 >> offs) & 0x01;
20116 val != 0
20117 }
20118 #[doc = "Capture/Compare 1 output Polarity"]
20119 pub fn set_ccp(&mut self, n: usize, val: bool) {
20120 assert!(n < 4usize);
20121 let offs = 1usize + n * 4usize;
20122 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
20123 }
20124 #[doc = "Capture/Compare 1 complementary output enable"]
20125 pub fn ccne(&self, n: usize) -> bool {
20126 assert!(n < 4usize);
20127 let offs = 2usize + n * 4usize;
20128 let val = (self.0 >> offs) & 0x01;
20129 val != 0
20130 }
20131 #[doc = "Capture/Compare 1 complementary output enable"]
20132 pub fn set_ccne(&mut self, n: usize, val: bool) {
20133 assert!(n < 4usize);
20134 let offs = 2usize + n * 4usize;
20135 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
20136 }
20137 #[doc = "Capture/Compare 1 output Polarity"]
20138 pub fn ccnp(&self, n: usize) -> bool {
20139 assert!(n < 4usize);
20140 let offs = 3usize + n * 4usize;
20141 let val = (self.0 >> offs) & 0x01;
20142 val != 0
20143 }
20144 #[doc = "Capture/Compare 1 output Polarity"]
20145 pub fn set_ccnp(&mut self, n: usize, val: bool) {
20146 assert!(n < 4usize);
20147 let offs = 3usize + n * 4usize;
20148 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
20149 }
20150 }
20151 impl Default for CcerAdv {
20152 fn default() -> CcerAdv {
20153 CcerAdv(0)
20154 }
20155 }
20156 #[doc = "DMA/Interrupt enable register"]
20157 #[repr(transparent)]
20158 #[derive(Copy, Clone, Eq, PartialEq)]
20159 pub struct DierBasic(pub u32);
20160 impl DierBasic {
20161 #[doc = "Update interrupt enable"]
20162 pub const fn uie(&self) -> bool {
20163 let val = (self.0 >> 0usize) & 0x01;
20164 val != 0
20165 }
20166 #[doc = "Update interrupt enable"]
20167 pub fn set_uie(&mut self, val: bool) {
20168 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
20169 }
20170 #[doc = "Update DMA request enable"]
20171 pub const fn ude(&self) -> bool {
20172 let val = (self.0 >> 8usize) & 0x01;
20173 val != 0
20174 }
20175 #[doc = "Update DMA request enable"]
20176 pub fn set_ude(&mut self, val: bool) {
20177 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
20178 }
20179 }
20180 impl Default for DierBasic {
20181 fn default() -> DierBasic {
20182 DierBasic(0)
20183 }
20184 }
20185 #[doc = "event generation register"]
20186 #[repr(transparent)]
20187 #[derive(Copy, Clone, Eq, PartialEq)]
20188 pub struct EgrAdv(pub u32);
20189 impl EgrAdv {
20190 #[doc = "Update generation"]
20191 pub const fn ug(&self) -> bool {
20192 let val = (self.0 >> 0usize) & 0x01;
20193>>>>>>> fc21f52 (Better interrupt handling)
7571 val != 0 20194 val != 0
7572 } 20195 }
7573 #[doc = "Rx FIFO full interrupt enable Set and cleared by software to enable/disable interrupt caused by Rx FIFO full."] 20196 #[doc = "Rx FIFO full interrupt enable Set and cleared by software to enable/disable interrupt caused by Rx FIFO full."]
@@ -7710,6 +20333,7 @@ are always 0 and read only). This register can be written by firmware when DPSM
7710 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize); 20333 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
7711 } 20334 }
7712 } 20335 }
20336<<<<<<< HEAD
7713 impl Default for Resp2r { 20337 impl Default for Resp2r {
7714 fn default() -> Resp2r { 20338 fn default() -> Resp2r {
7715 Resp2r(0) 20339 Resp2r(0)
@@ -7961,8 +20585,342 @@ are always 0 and read only). This register can be written by firmware when DPSM
7961 #[doc = "Number of transfers per buffer. This 8-bit value shall be multiplied by 8 to get the size of the buffer in 32-bit words and by 32 to get the size of the buffer in bytes. Example: IDMABNDT = 0x01: buffer size = 8 words = 32 bytes. These bits can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] 20585 #[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)."]
7962 pub fn set_idmabndt(&mut self, val: u8) { 20586 pub fn set_idmabndt(&mut self, val: u8) {
7963 self.0 = (self.0 & !(0xff << 5usize)) | (((val as u32) & 0xff) << 5usize); 20587 self.0 = (self.0 & !(0xff << 5usize)) | (((val as u32) & 0xff) << 5usize);
20588=======
20589 impl Default for EgrAdv {
20590 fn default() -> EgrAdv {
20591 EgrAdv(0)
20592 }
20593 }
20594 #[doc = "control register 2"]
20595 #[repr(transparent)]
20596 #[derive(Copy, Clone, Eq, PartialEq)]
20597 pub struct Cr2Basic(pub u32);
20598 impl Cr2Basic {
20599 #[doc = "Master mode selection"]
20600 pub const fn mms(&self) -> super::vals::Mms {
20601 let val = (self.0 >> 4usize) & 0x07;
20602 super::vals::Mms(val as u8)
20603 }
20604 #[doc = "Master mode selection"]
20605 pub fn set_mms(&mut self, val: super::vals::Mms) {
20606 self.0 = (self.0 & !(0x07 << 4usize)) | (((val.0 as u32) & 0x07) << 4usize);
20607 }
20608 }
20609 impl Default for Cr2Basic {
20610 fn default() -> Cr2Basic {
20611 Cr2Basic(0)
20612=======
20613 #[doc = "SYSCFG user register 15"]
20614 pub fn ur15(self) -> Reg<regs::Ur15, R> {
20615 unsafe { Reg::from_ptr(self.0.add(828usize)) }
20616 }
20617 #[doc = "SYSCFG user register 16"]
20618 pub fn ur16(self) -> Reg<regs::Ur16, R> {
20619 unsafe { Reg::from_ptr(self.0.add(832usize)) }
20620 }
20621 #[doc = "SYSCFG user register 17"]
20622 pub fn ur17(self) -> Reg<regs::Ur17, R> {
20623 unsafe { Reg::from_ptr(self.0.add(836usize)) }
20624 }
20625 }
20626 pub mod regs {
20627 use crate::generic::*;
20628 #[doc = "SYSCFG compensation cell value register"]
20629 #[repr(transparent)]
20630 #[derive(Copy, Clone, Eq, PartialEq)]
20631 pub struct Ccvr(pub u32);
20632 impl Ccvr {
20633 #[doc = "NMOS compensation value"]
20634 pub const fn ncv(&self) -> u8 {
20635 let val = (self.0 >> 0usize) & 0x0f;
20636 val as u8
20637 }
20638 #[doc = "NMOS compensation value"]
20639 pub fn set_ncv(&mut self, val: u8) {
20640 self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize);
20641 }
20642 #[doc = "PMOS compensation value"]
20643 pub const fn pcv(&self) -> u8 {
20644 let val = (self.0 >> 4usize) & 0x0f;
20645 val as u8
20646 }
20647 #[doc = "PMOS compensation value"]
20648 pub fn set_pcv(&mut self, val: u8) {
20649 self.0 = (self.0 & !(0x0f << 4usize)) | (((val as u32) & 0x0f) << 4usize);
20650 }
20651 }
20652 impl Default for Ccvr {
20653 fn default() -> Ccvr {
20654 Ccvr(0)
20655 }
20656 }
20657 #[doc = "SYSCFG user register 12"]
20658 #[repr(transparent)]
20659 #[derive(Copy, Clone, Eq, PartialEq)]
20660 pub struct Ur12(pub u32);
20661 impl Ur12 {
20662 #[doc = "Secure mode"]
20663 pub const fn secure(&self) -> bool {
20664 let val = (self.0 >> 16usize) & 0x01;
20665 val != 0
20666 }
20667 #[doc = "Secure mode"]
20668 pub fn set_secure(&mut self, val: bool) {
20669 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
20670 }
20671 }
20672 impl Default for Ur12 {
20673 fn default() -> Ur12 {
20674 Ur12(0)
20675 }
20676 }
20677 #[doc = "SYSCFG user register 0"]
20678 #[repr(transparent)]
20679 #[derive(Copy, Clone, Eq, PartialEq)]
20680 pub struct Ur0(pub u32);
20681 impl Ur0 {
20682 #[doc = "Bank Swap"]
20683 pub const fn bks(&self) -> bool {
20684 let val = (self.0 >> 0usize) & 0x01;
20685 val != 0
20686 }
20687 #[doc = "Bank Swap"]
20688 pub fn set_bks(&mut self, val: bool) {
20689 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
20690 }
20691 #[doc = "Readout protection"]
20692 pub const fn rdp(&self) -> u8 {
20693 let val = (self.0 >> 16usize) & 0xff;
20694 val as u8
20695 }
20696 #[doc = "Readout protection"]
20697 pub fn set_rdp(&mut self, val: u8) {
20698 self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize);
20699 }
20700 }
20701 impl Default for Ur0 {
20702 fn default() -> Ur0 {
20703 Ur0(0)
20704 }
20705 }
20706 #[doc = "SYSCFG compensation cell code register"]
20707 #[repr(transparent)]
20708 #[derive(Copy, Clone, Eq, PartialEq)]
20709 pub struct Cccr(pub u32);
20710 impl Cccr {
20711 #[doc = "NMOS compensation code"]
20712 pub const fn ncc(&self) -> u8 {
20713 let val = (self.0 >> 0usize) & 0x0f;
20714 val as u8
20715 }
20716 #[doc = "NMOS compensation code"]
20717 pub fn set_ncc(&mut self, val: u8) {
20718 self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize);
20719 }
20720 #[doc = "PMOS compensation code"]
20721 pub const fn pcc(&self) -> u8 {
20722 let val = (self.0 >> 4usize) & 0x0f;
20723 val as u8
20724 }
20725 #[doc = "PMOS compensation code"]
20726 pub fn set_pcc(&mut self, val: u8) {
20727 self.0 = (self.0 & !(0x0f << 4usize)) | (((val as u32) & 0x0f) << 4usize);
20728 }
20729 }
20730 impl Default for Cccr {
20731 fn default() -> Cccr {
20732 Cccr(0)
20733 }
20734 }
20735 #[doc = "SYSCFG user register 5"]
20736 #[repr(transparent)]
20737 #[derive(Copy, Clone, Eq, PartialEq)]
20738 pub struct Ur5(pub u32);
20739 impl Ur5 {
20740 #[doc = "Mass erase secured area disabled for bank 1"]
20741 pub const fn mesad_1(&self) -> bool {
20742 let val = (self.0 >> 0usize) & 0x01;
20743 val != 0
20744 }
20745 #[doc = "Mass erase secured area disabled for bank 1"]
20746 pub fn set_mesad_1(&mut self, val: bool) {
20747 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
20748 }
20749 #[doc = "Write protection for flash bank 1"]
20750 pub const fn wrpn_1(&self) -> u8 {
20751 let val = (self.0 >> 16usize) & 0xff;
20752 val as u8
20753 }
20754 #[doc = "Write protection for flash bank 1"]
20755 pub fn set_wrpn_1(&mut self, val: u8) {
20756 self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize);
20757 }
20758 }
20759 impl Default for Ur5 {
20760 fn default() -> Ur5 {
20761 Ur5(0)
20762>>>>>>> Better interrupt handling
20763 }
20764 }
20765 #[doc = "SYSCFG user register 8"]
20766 #[repr(transparent)]
20767 #[derive(Copy, Clone, Eq, PartialEq)]
20768 pub struct Ur8(pub u32);
20769 impl Ur8 {
20770 #[doc = "Mass erase protected area disabled for bank 2"]
20771 pub const fn mepad_2(&self) -> bool {
20772 let val = (self.0 >> 0usize) & 0x01;
20773 val != 0
20774 }
20775 #[doc = "Mass erase protected area disabled for bank 2"]
20776 pub fn set_mepad_2(&mut self, val: bool) {
20777 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
20778 }
20779 #[doc = "Mass erase secured area disabled for bank 2"]
20780 pub const fn mesad_2(&self) -> bool {
20781 let val = (self.0 >> 16usize) & 0x01;
20782 val != 0
20783 }
20784 #[doc = "Mass erase secured area disabled for bank 2"]
20785 pub fn set_mesad_2(&mut self, val: bool) {
20786 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
7964 } 20787 }
7965 } 20788 }
20789 impl Default for Ur8 {
20790 fn default() -> Ur8 {
20791 Ur8(0)
20792 }
20793 }
20794 #[doc = "SYSCFG user register 7"]
20795 #[repr(transparent)]
20796 #[derive(Copy, Clone, Eq, PartialEq)]
20797 pub struct Ur7(pub u32);
20798 impl Ur7 {
20799 #[doc = "Secured area start address for bank 1"]
20800 pub const fn sa_beg_1(&self) -> u16 {
20801 let val = (self.0 >> 0usize) & 0x0fff;
20802 val as u16
20803 }
20804 #[doc = "Secured area start address for bank 1"]
20805 pub fn set_sa_beg_1(&mut self, val: u16) {
20806 self.0 = (self.0 & !(0x0fff << 0usize)) | (((val as u32) & 0x0fff) << 0usize);
20807 }
20808 #[doc = "Secured area end address for bank 1"]
20809 pub const fn sa_end_1(&self) -> u16 {
20810 let val = (self.0 >> 16usize) & 0x0fff;
20811 val as u16
20812 }
20813 #[doc = "Secured area end address for bank 1"]
20814 pub fn set_sa_end_1(&mut self, val: u16) {
20815 self.0 = (self.0 & !(0x0fff << 16usize)) | (((val as u32) & 0x0fff) << 16usize);
20816 }
20817 }
20818 impl Default for Ur7 {
20819 fn default() -> Ur7 {
20820 Ur7(0)
20821 }
20822 }
20823<<<<<<< HEAD
20824 #[doc = "event generation register"]
20825 #[repr(transparent)]
20826 #[derive(Copy, Clone, Eq, PartialEq)]
20827 pub struct EgrBasic(pub u32);
20828 impl EgrBasic {
20829 #[doc = "Update generation"]
20830 pub const fn ug(&self) -> bool {
20831 let val = (self.0 >> 0usize) & 0x01;
20832 val != 0
20833 }
20834 #[doc = "Update generation"]
20835 pub fn set_ug(&mut self, val: bool) {
20836 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
20837 }
20838 }
20839 impl Default for EgrBasic {
20840 fn default() -> EgrBasic {
20841 EgrBasic(0)
20842 }
20843 }
20844 #[doc = "control register 1"]
20845 #[repr(transparent)]
20846 #[derive(Copy, Clone, Eq, PartialEq)]
20847 pub struct Cr1Gp(pub u32);
20848 impl Cr1Gp {
20849 #[doc = "Counter enable"]
20850 pub const fn cen(&self) -> bool {
20851 let val = (self.0 >> 0usize) & 0x01;
20852 val != 0
20853 }
20854 #[doc = "Counter enable"]
20855 pub fn set_cen(&mut self, val: bool) {
20856 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
20857 }
20858 #[doc = "Update disable"]
20859 pub const fn udis(&self) -> bool {
20860 let val = (self.0 >> 1usize) & 0x01;
20861 val != 0
20862 }
20863 #[doc = "Update disable"]
20864 pub fn set_udis(&mut self, val: bool) {
20865 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
20866 }
20867 #[doc = "Update request source"]
20868 pub const fn urs(&self) -> super::vals::Urs {
20869 let val = (self.0 >> 2usize) & 0x01;
20870 super::vals::Urs(val as u8)
20871 }
20872 #[doc = "Update request source"]
20873 pub fn set_urs(&mut self, val: super::vals::Urs) {
20874 self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize);
20875 }
20876 #[doc = "One-pulse mode"]
20877 pub const fn opm(&self) -> super::vals::Opm {
20878 let val = (self.0 >> 3usize) & 0x01;
20879 super::vals::Opm(val as u8)
20880 }
20881 #[doc = "One-pulse mode"]
20882 pub fn set_opm(&mut self, val: super::vals::Opm) {
20883 self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize);
20884 }
20885 #[doc = "Direction"]
20886 pub const fn dir(&self) -> super::vals::Dir {
20887 let val = (self.0 >> 4usize) & 0x01;
20888 super::vals::Dir(val as u8)
20889 }
20890 #[doc = "Direction"]
20891 pub fn set_dir(&mut self, val: super::vals::Dir) {
20892 self.0 = (self.0 & !(0x01 << 4usize)) | (((val.0 as u32) & 0x01) << 4usize);
20893 }
20894 #[doc = "Center-aligned mode selection"]
20895 pub const fn cms(&self) -> super::vals::Cms {
20896 let val = (self.0 >> 5usize) & 0x03;
20897 super::vals::Cms(val as u8)
20898 }
20899 #[doc = "Center-aligned mode selection"]
20900 pub fn set_cms(&mut self, val: super::vals::Cms) {
20901 self.0 = (self.0 & !(0x03 << 5usize)) | (((val.0 as u32) & 0x03) << 5usize);
20902 }
20903 #[doc = "Auto-reload preload enable"]
20904 pub const fn arpe(&self) -> super::vals::Arpe {
20905 let val = (self.0 >> 7usize) & 0x01;
20906 super::vals::Arpe(val as u8)
20907 }
20908 #[doc = "Auto-reload preload enable"]
20909 pub fn set_arpe(&mut self, val: super::vals::Arpe) {
20910 self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize);
20911>>>>>>> fc21f52 (Better interrupt handling)
20912 }
20913 #[doc = "Clock division"]
20914 pub const fn ckd(&self) -> super::vals::Ckd {
20915 let val = (self.0 >> 8usize) & 0x03;
20916 super::vals::Ckd(val as u8)
20917 }
20918 #[doc = "Clock division"]
20919 pub fn set_ckd(&mut self, val: super::vals::Ckd) {
20920 self.0 = (self.0 & !(0x03 << 8usize)) | (((val.0 as u32) & 0x03) << 8usize);
20921 }
20922 }
20923<<<<<<< HEAD
7966 impl Default for Idmabsizer { 20924 impl Default for Idmabsizer {
7967 fn default() -> Idmabsizer { 20925 fn default() -> Idmabsizer {
7968 Idmabsizer(0) 20926 Idmabsizer(0)
@@ -8015,6 +20973,92 @@ are always 0 and read only). This register can be written by firmware when DPSM
8015 #[doc = "Double buffer mode active buffer indication This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0). When IDMA is enabled this bit is toggled by hardware."] 20973 #[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."]
8016 pub const fn idmabact(&self) -> bool { 20974 pub const fn idmabact(&self) -> bool {
8017 let val = (self.0 >> 2usize) & 0x01; 20975 let val = (self.0 >> 2usize) & 0x01;
20976=======
20977 impl Default for Cr1Gp {
20978 fn default() -> Cr1Gp {
20979 Cr1Gp(0)
20980 }
20981 }
20982 #[doc = "prescaler"]
20983 #[repr(transparent)]
20984 #[derive(Copy, Clone, Eq, PartialEq)]
20985 pub struct Psc(pub u32);
20986 impl Psc {
20987 #[doc = "Prescaler value"]
20988 pub const fn psc(&self) -> u16 {
20989 let val = (self.0 >> 0usize) & 0xffff;
20990 val as u16
20991 }
20992 #[doc = "Prescaler value"]
20993 pub fn set_psc(&mut self, val: u16) {
20994 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
20995 }
20996 }
20997 impl Default for Psc {
20998 fn default() -> Psc {
20999 Psc(0)
21000=======
21001 #[doc = "SYSCFG user register 17"]
21002 #[repr(transparent)]
21003 #[derive(Copy, Clone, Eq, PartialEq)]
21004 pub struct Ur17(pub u32);
21005 impl Ur17 {
21006 #[doc = "I/O high speed / low voltage"]
21007 pub const fn io_hslv(&self) -> bool {
21008 let val = (self.0 >> 0usize) & 0x01;
21009 val != 0
21010 }
21011 #[doc = "I/O high speed / low voltage"]
21012 pub fn set_io_hslv(&mut self, val: bool) {
21013 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
21014 }
21015 }
21016 impl Default for Ur17 {
21017 fn default() -> Ur17 {
21018 Ur17(0)
21019>>>>>>> Better interrupt handling
21020 }
21021 }
21022 #[doc = "compensation cell control/status register"]
21023 #[repr(transparent)]
21024 #[derive(Copy, Clone, Eq, PartialEq)]
21025<<<<<<< HEAD
21026 pub struct CcerGp(pub u32);
21027 impl CcerGp {
21028 #[doc = "Capture/Compare 1 output enable"]
21029 pub fn cce(&self, n: usize) -> bool {
21030 assert!(n < 4usize);
21031 let offs = 0usize + n * 4usize;
21032 let val = (self.0 >> offs) & 0x01;
21033=======
21034 pub struct Cccsr(pub u32);
21035 impl Cccsr {
21036 #[doc = "enable"]
21037 pub const fn en(&self) -> bool {
21038 let val = (self.0 >> 0usize) & 0x01;
21039>>>>>>> Better interrupt handling
21040 val != 0
21041 }
21042 #[doc = "enable"]
21043 pub fn set_en(&mut self, val: bool) {
21044 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
21045 }
21046 #[doc = "Code selection"]
21047 pub const fn cs(&self) -> bool {
21048 let val = (self.0 >> 1usize) & 0x01;
21049 val != 0
21050 }
21051 #[doc = "Code selection"]
21052 pub fn set_cs(&mut self, val: bool) {
21053 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
21054 }
21055<<<<<<< HEAD
21056 #[doc = "Capture/Compare 1 output Polarity"]
21057 pub fn ccnp(&self, n: usize) -> bool {
21058 assert!(n < 4usize);
21059 let offs = 3usize + n * 4usize;
21060 let val = (self.0 >> offs) & 0x01;
21061>>>>>>> fc21f52 (Better interrupt handling)
8018 val != 0 21062 val != 0
8019 } 21063 }
8020 #[doc = "Double buffer mode active buffer indication This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0). When IDMA is enabled this bit is toggled by hardware."] 21064 #[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."]
@@ -8022,18 +21066,31 @@ are always 0 and read only). This register can be written by firmware when DPSM
8022 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); 21066 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
8023 } 21067 }
8024 } 21068 }
21069<<<<<<< HEAD
8025 impl Default for Idmactrlr { 21070 impl Default for Idmactrlr {
8026 fn default() -> Idmactrlr { 21071 fn default() -> Idmactrlr {
8027 Idmactrlr(0) 21072 Idmactrlr(0)
21073=======
21074 impl Default for CcerGp {
21075 fn default() -> CcerGp {
21076 CcerGp(0)
21077>>>>>>> fc21f52 (Better interrupt handling)
8028 } 21078 }
8029 } 21079 }
8030 #[doc = "The SDMMC_DCTRL register control the data path state machine (DPSM)."] 21080 #[doc = "The SDMMC_DCTRL register control the data path state machine (DPSM)."]
8031 #[repr(transparent)] 21081 #[repr(transparent)]
8032 #[derive(Copy, Clone, Eq, PartialEq)] 21082 #[derive(Copy, Clone, Eq, PartialEq)]
21083<<<<<<< HEAD
8033 pub struct Dctrl(pub u32); 21084 pub struct Dctrl(pub u32);
8034 impl Dctrl { 21085 impl Dctrl {
8035 #[doc = "Data transfer enable bit This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0). This bit is cleared by Hardware when data transfer completes. This bit shall only be used to transfer data when no associated data transfer command is used, i.e. shall not be used with SD or eMMC cards."] 21086 #[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."]
8036 pub const fn dten(&self) -> bool { 21087 pub const fn dten(&self) -> bool {
21088=======
21089 pub struct DierAdv(pub u32);
21090 impl DierAdv {
21091 #[doc = "Update interrupt enable"]
21092 pub const fn uie(&self) -> bool {
21093>>>>>>> fc21f52 (Better interrupt handling)
8037 let val = (self.0 >> 0usize) & 0x01; 21094 let val = (self.0 >> 0usize) & 0x01;
8038 val != 0 21095 val != 0
8039 } 21096 }
@@ -8041,6 +21098,7 @@ are always 0 and read only). This register can be written by firmware when DPSM
8041 pub fn set_dten(&mut self, val: bool) { 21098 pub fn set_dten(&mut self, val: bool) {
8042 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); 21099 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
8043 } 21100 }
21101<<<<<<< HEAD
8044 #[doc = "Data transfer direction selection This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] 21102 #[doc = "Data transfer direction selection This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."]
8045 pub const fn dtdir(&self) -> bool { 21103 pub const fn dtdir(&self) -> bool {
8046 let val = (self.0 >> 1usize) & 0x01; 21104 let val = (self.0 >> 1usize) & 0x01;
@@ -8529,6 +21587,564 @@ are always 0 and read only). This register can be written by firmware when DPSM
8529 impl Default for Fifor { 21587 impl Default for Fifor {
8530 fn default() -> Fifor { 21588 fn default() -> Fifor {
8531 Fifor(0) 21589 Fifor(0)
21590=======
21591 #[doc = "Capture/Compare 1 interrupt enable"]
21592 pub fn ccie(&self, n: usize) -> bool {
21593 assert!(n < 4usize);
21594 let offs = 1usize + n * 1usize;
21595 let val = (self.0 >> offs) & 0x01;
21596 val != 0
21597 }
21598 #[doc = "Capture/Compare 1 interrupt enable"]
21599 pub fn set_ccie(&mut self, n: usize, val: bool) {
21600 assert!(n < 4usize);
21601 let offs = 1usize + n * 1usize;
21602 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
21603 }
21604 #[doc = "COM interrupt enable"]
21605 pub const fn comie(&self) -> bool {
21606 let val = (self.0 >> 5usize) & 0x01;
21607 val != 0
21608 }
21609 #[doc = "COM interrupt enable"]
21610 pub fn set_comie(&mut self, val: bool) {
21611 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
21612 }
21613 #[doc = "Trigger interrupt enable"]
21614 pub const fn tie(&self) -> bool {
21615 let val = (self.0 >> 6usize) & 0x01;
21616 val != 0
21617 }
21618 #[doc = "Trigger interrupt enable"]
21619 pub fn set_tie(&mut self, val: bool) {
21620 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
21621 }
21622 #[doc = "Break interrupt enable"]
21623 pub const fn bie(&self) -> bool {
21624 let val = (self.0 >> 7usize) & 0x01;
21625 val != 0
21626 }
21627 #[doc = "Break interrupt enable"]
21628 pub fn set_bie(&mut self, val: bool) {
21629 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
21630 }
21631 #[doc = "Update DMA request enable"]
21632 pub const fn ude(&self) -> bool {
21633 let val = (self.0 >> 8usize) & 0x01;
21634 val != 0
21635 }
21636 #[doc = "Update DMA request enable"]
21637 pub fn set_ude(&mut self, val: bool) {
21638 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
21639 }
21640 #[doc = "Capture/Compare 1 DMA request enable"]
21641 pub fn ccde(&self, n: usize) -> bool {
21642 assert!(n < 4usize);
21643 let offs = 9usize + n * 1usize;
21644 let val = (self.0 >> offs) & 0x01;
21645 val != 0
21646 }
21647 #[doc = "Capture/Compare 1 DMA request enable"]
21648 pub fn set_ccde(&mut self, n: usize, val: bool) {
21649 assert!(n < 4usize);
21650 let offs = 9usize + n * 1usize;
21651 self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs);
21652 }
21653 #[doc = "COM DMA request enable"]
21654 pub const fn comde(&self) -> bool {
21655 let val = (self.0 >> 13usize) & 0x01;
21656 val != 0
21657 }
21658 #[doc = "COM DMA request enable"]
21659 pub fn set_comde(&mut self, val: bool) {
21660 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize);
21661 }
21662 #[doc = "Trigger DMA request enable"]
21663 pub const fn tde(&self) -> bool {
21664 let val = (self.0 >> 14usize) & 0x01;
21665 val != 0
21666 }
21667 #[doc = "Trigger DMA request enable"]
21668 pub fn set_tde(&mut self, val: bool) {
21669 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize);
21670 }
21671 }
21672 impl Default for DierAdv {
21673 fn default() -> DierAdv {
21674 DierAdv(0)
21675 }
21676 }
21677 #[doc = "slave mode control register"]
21678 #[repr(transparent)]
21679 #[derive(Copy, Clone, Eq, PartialEq)]
21680 pub struct Smcr(pub u32);
21681 impl Smcr {
21682 #[doc = "Slave mode selection"]
21683 pub const fn sms(&self) -> super::vals::Sms {
21684 let val = (self.0 >> 0usize) & 0x07;
21685 super::vals::Sms(val as u8)
21686 }
21687 #[doc = "Slave mode selection"]
21688 pub fn set_sms(&mut self, val: super::vals::Sms) {
21689 self.0 = (self.0 & !(0x07 << 0usize)) | (((val.0 as u32) & 0x07) << 0usize);
21690 }
21691 #[doc = "Trigger selection"]
21692 pub const fn ts(&self) -> super::vals::Ts {
21693 let val = (self.0 >> 4usize) & 0x07;
21694 super::vals::Ts(val as u8)
21695 }
21696 #[doc = "Trigger selection"]
21697 pub fn set_ts(&mut self, val: super::vals::Ts) {
21698 self.0 = (self.0 & !(0x07 << 4usize)) | (((val.0 as u32) & 0x07) << 4usize);
21699 }
21700 #[doc = "Master/Slave mode"]
21701 pub const fn msm(&self) -> super::vals::Msm {
21702 let val = (self.0 >> 7usize) & 0x01;
21703 super::vals::Msm(val as u8)
21704 }
21705 #[doc = "Master/Slave mode"]
21706 pub fn set_msm(&mut self, val: super::vals::Msm) {
21707 self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize);
21708 }
21709 #[doc = "External trigger filter"]
21710 pub const fn etf(&self) -> super::vals::Etf {
21711 let val = (self.0 >> 8usize) & 0x0f;
21712 super::vals::Etf(val as u8)
21713 }
21714 #[doc = "External trigger filter"]
21715 pub fn set_etf(&mut self, val: super::vals::Etf) {
21716 self.0 = (self.0 & !(0x0f << 8usize)) | (((val.0 as u32) & 0x0f) << 8usize);
21717 }
21718 #[doc = "External trigger prescaler"]
21719 pub const fn etps(&self) -> super::vals::Etps {
21720 let val = (self.0 >> 12usize) & 0x03;
21721 super::vals::Etps(val as u8)
21722 }
21723 #[doc = "External trigger prescaler"]
21724 pub fn set_etps(&mut self, val: super::vals::Etps) {
21725 self.0 = (self.0 & !(0x03 << 12usize)) | (((val.0 as u32) & 0x03) << 12usize);
21726 }
21727 #[doc = "External clock enable"]
21728 pub const fn ece(&self) -> super::vals::Ece {
21729 let val = (self.0 >> 14usize) & 0x01;
21730 super::vals::Ece(val as u8)
21731 }
21732 #[doc = "External clock enable"]
21733 pub fn set_ece(&mut self, val: super::vals::Ece) {
21734 self.0 = (self.0 & !(0x01 << 14usize)) | (((val.0 as u32) & 0x01) << 14usize);
21735 }
21736 #[doc = "External trigger polarity"]
21737 pub const fn etp(&self) -> super::vals::Etp {
21738 let val = (self.0 >> 15usize) & 0x01;
21739 super::vals::Etp(val as u8)
21740 }
21741 #[doc = "External trigger polarity"]
21742 pub fn set_etp(&mut self, val: super::vals::Etp) {
21743 self.0 = (self.0 & !(0x01 << 15usize)) | (((val.0 as u32) & 0x01) << 15usize);
21744 }
21745 }
21746 impl Default for Smcr {
21747 fn default() -> Smcr {
21748 Smcr(0)
21749 }
21750 }
21751 #[doc = "DMA control register"]
21752 #[repr(transparent)]
21753 #[derive(Copy, Clone, Eq, PartialEq)]
21754 pub struct Dcr(pub u32);
21755 impl Dcr {
21756 #[doc = "DMA base address"]
21757 pub const fn dba(&self) -> u8 {
21758 let val = (self.0 >> 0usize) & 0x1f;
21759 val as u8
21760 }
21761 #[doc = "DMA base address"]
21762 pub fn set_dba(&mut self, val: u8) {
21763 self.0 = (self.0 & !(0x1f << 0usize)) | (((val as u32) & 0x1f) << 0usize);
21764 }
21765 #[doc = "DMA burst length"]
21766 pub const fn dbl(&self) -> u8 {
21767 let val = (self.0 >> 8usize) & 0x1f;
21768 val as u8
21769 }
21770 #[doc = "DMA burst length"]
21771 pub fn set_dbl(&mut self, val: u8) {
21772 self.0 = (self.0 & !(0x1f << 8usize)) | (((val as u32) & 0x1f) << 8usize);
21773 }
21774 }
21775 impl Default for Dcr {
21776 fn default() -> Dcr {
21777 Dcr(0)
21778 }
21779 }
21780 #[doc = "capture/compare register 1"]
21781 #[repr(transparent)]
21782 #[derive(Copy, Clone, Eq, PartialEq)]
21783 pub struct Ccr32(pub u32);
21784 impl Ccr32 {
21785 #[doc = "Capture/Compare 1 value"]
21786 pub const fn ccr(&self) -> u32 {
21787 let val = (self.0 >> 0usize) & 0xffff_ffff;
21788 val as u32
21789 }
21790 #[doc = "Capture/Compare 1 value"]
21791 pub fn set_ccr(&mut self, val: u32) {
21792 self.0 =
21793 (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
21794=======
21795 #[doc = "Compensation cell ready flag"]
21796 pub const fn ready(&self) -> bool {
21797 let val = (self.0 >> 8usize) & 0x01;
21798 val != 0
21799 }
21800 #[doc = "Compensation cell ready flag"]
21801 pub fn set_ready(&mut self, val: bool) {
21802 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
21803 }
21804 #[doc = "High-speed at low-voltage"]
21805 pub const fn hslv(&self) -> bool {
21806 let val = (self.0 >> 16usize) & 0x01;
21807 val != 0
21808 }
21809 #[doc = "High-speed at low-voltage"]
21810 pub fn set_hslv(&mut self, val: bool) {
21811 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
21812 }
21813 }
21814 impl Default for Cccsr {
21815 fn default() -> Cccsr {
21816 Cccsr(0)
21817 }
21818 }
21819 #[doc = "SYSCFG user register 2"]
21820 #[repr(transparent)]
21821 #[derive(Copy, Clone, Eq, PartialEq)]
21822 pub struct Ur2(pub u32);
21823 impl Ur2 {
21824 #[doc = "BOR_LVL Brownout Reset Threshold Level"]
21825 pub const fn borh(&self) -> u8 {
21826 let val = (self.0 >> 0usize) & 0x03;
21827 val as u8
21828 }
21829 #[doc = "BOR_LVL Brownout Reset Threshold Level"]
21830 pub fn set_borh(&mut self, val: u8) {
21831 self.0 = (self.0 & !(0x03 << 0usize)) | (((val as u32) & 0x03) << 0usize);
21832 }
21833 #[doc = "Boot Address 0"]
21834 pub const fn boot_add0(&self) -> u16 {
21835 let val = (self.0 >> 16usize) & 0xffff;
21836 val as u16
21837 }
21838 #[doc = "Boot Address 0"]
21839 pub fn set_boot_add0(&mut self, val: u16) {
21840 self.0 = (self.0 & !(0xffff << 16usize)) | (((val as u32) & 0xffff) << 16usize);
21841 }
21842 }
21843 impl Default for Ur2 {
21844 fn default() -> Ur2 {
21845 Ur2(0)
21846 }
21847 }
21848 #[doc = "SYSCFG user register 10"]
21849 #[repr(transparent)]
21850 #[derive(Copy, Clone, Eq, PartialEq)]
21851 pub struct Ur10(pub u32);
21852 impl Ur10 {
21853 #[doc = "Protected area end address for bank 2"]
21854 pub const fn pa_end_2(&self) -> u16 {
21855 let val = (self.0 >> 0usize) & 0x0fff;
21856 val as u16
21857 }
21858 #[doc = "Protected area end address for bank 2"]
21859 pub fn set_pa_end_2(&mut self, val: u16) {
21860 self.0 = (self.0 & !(0x0fff << 0usize)) | (((val as u32) & 0x0fff) << 0usize);
21861 }
21862 #[doc = "Secured area start address for bank 2"]
21863 pub const fn sa_beg_2(&self) -> u16 {
21864 let val = (self.0 >> 16usize) & 0x0fff;
21865 val as u16
21866 }
21867 #[doc = "Secured area start address for bank 2"]
21868 pub fn set_sa_beg_2(&mut self, val: u16) {
21869 self.0 = (self.0 & !(0x0fff << 16usize)) | (((val as u32) & 0x0fff) << 16usize);
21870 }
21871 }
21872 impl Default for Ur10 {
21873 fn default() -> Ur10 {
21874 Ur10(0)
21875 }
21876 }
21877 #[doc = "SYSCFG user register 3"]
21878 #[repr(transparent)]
21879 #[derive(Copy, Clone, Eq, PartialEq)]
21880 pub struct Ur3(pub u32);
21881 impl Ur3 {
21882 #[doc = "Boot Address 1"]
21883 pub const fn boot_add1(&self) -> u16 {
21884 let val = (self.0 >> 16usize) & 0xffff;
21885 val as u16
21886 }
21887 #[doc = "Boot Address 1"]
21888 pub fn set_boot_add1(&mut self, val: u16) {
21889 self.0 = (self.0 & !(0xffff << 16usize)) | (((val as u32) & 0xffff) << 16usize);
21890 }
21891 }
21892 impl Default for Ur3 {
21893 fn default() -> Ur3 {
21894 Ur3(0)
21895 }
21896 }
21897 #[doc = "peripheral mode configuration register"]
21898 #[repr(transparent)]
21899 #[derive(Copy, Clone, Eq, PartialEq)]
21900 pub struct Pmcr(pub u32);
21901 impl Pmcr {
21902 #[doc = "I2C1 Fm+"]
21903 pub const fn i2c1fmp(&self) -> bool {
21904 let val = (self.0 >> 0usize) & 0x01;
21905 val != 0
21906 }
21907 #[doc = "I2C1 Fm+"]
21908 pub fn set_i2c1fmp(&mut self, val: bool) {
21909 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
21910 }
21911 #[doc = "I2C2 Fm+"]
21912 pub const fn i2c2fmp(&self) -> bool {
21913 let val = (self.0 >> 1usize) & 0x01;
21914 val != 0
21915 }
21916 #[doc = "I2C2 Fm+"]
21917 pub fn set_i2c2fmp(&mut self, val: bool) {
21918 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
21919 }
21920 #[doc = "I2C3 Fm+"]
21921 pub const fn i2c3fmp(&self) -> bool {
21922 let val = (self.0 >> 2usize) & 0x01;
21923 val != 0
21924 }
21925 #[doc = "I2C3 Fm+"]
21926 pub fn set_i2c3fmp(&mut self, val: bool) {
21927 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
21928 }
21929 #[doc = "I2C4 Fm+"]
21930 pub const fn i2c4fmp(&self) -> bool {
21931 let val = (self.0 >> 3usize) & 0x01;
21932 val != 0
21933 }
21934 #[doc = "I2C4 Fm+"]
21935 pub fn set_i2c4fmp(&mut self, val: bool) {
21936 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
21937 }
21938 #[doc = "PB(6) Fm+"]
21939 pub const fn pb6fmp(&self) -> bool {
21940 let val = (self.0 >> 4usize) & 0x01;
21941 val != 0
21942 }
21943 #[doc = "PB(6) Fm+"]
21944 pub fn set_pb6fmp(&mut self, val: bool) {
21945 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
21946 }
21947 #[doc = "PB(7) Fast Mode Plus"]
21948 pub const fn pb7fmp(&self) -> bool {
21949 let val = (self.0 >> 5usize) & 0x01;
21950 val != 0
21951 }
21952 #[doc = "PB(7) Fast Mode Plus"]
21953 pub fn set_pb7fmp(&mut self, val: bool) {
21954 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
21955 }
21956 #[doc = "PB(8) Fast Mode Plus"]
21957 pub const fn pb8fmp(&self) -> bool {
21958 let val = (self.0 >> 6usize) & 0x01;
21959 val != 0
21960 }
21961 #[doc = "PB(8) Fast Mode Plus"]
21962 pub fn set_pb8fmp(&mut self, val: bool) {
21963 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
21964 }
21965 #[doc = "PB(9) Fm+"]
21966 pub const fn pb9fmp(&self) -> bool {
21967 let val = (self.0 >> 7usize) & 0x01;
21968 val != 0
21969 }
21970 #[doc = "PB(9) Fm+"]
21971 pub fn set_pb9fmp(&mut self, val: bool) {
21972 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
21973 }
21974 #[doc = "Booster Enable"]
21975 pub const fn booste(&self) -> bool {
21976 let val = (self.0 >> 8usize) & 0x01;
21977 val != 0
21978 }
21979 #[doc = "Booster Enable"]
21980 pub fn set_booste(&mut self, val: bool) {
21981 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
21982 }
21983 #[doc = "Analog switch supply voltage selection"]
21984 pub const fn boostvddsel(&self) -> bool {
21985 let val = (self.0 >> 9usize) & 0x01;
21986 val != 0
21987 }
21988 #[doc = "Analog switch supply voltage selection"]
21989 pub fn set_boostvddsel(&mut self, val: bool) {
21990 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
21991 }
21992 #[doc = "Ethernet PHY Interface Selection"]
21993 pub const fn epis(&self) -> u8 {
21994 let val = (self.0 >> 21usize) & 0x07;
21995 val as u8
21996 }
21997 #[doc = "Ethernet PHY Interface Selection"]
21998 pub fn set_epis(&mut self, val: u8) {
21999 self.0 = (self.0 & !(0x07 << 21usize)) | (((val as u32) & 0x07) << 21usize);
22000 }
22001 #[doc = "PA0 Switch Open"]
22002 pub const fn pa0so(&self) -> bool {
22003 let val = (self.0 >> 24usize) & 0x01;
22004 val != 0
22005 }
22006 #[doc = "PA0 Switch Open"]
22007 pub fn set_pa0so(&mut self, val: bool) {
22008 self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize);
22009 }
22010 #[doc = "PA1 Switch Open"]
22011 pub const fn pa1so(&self) -> bool {
22012 let val = (self.0 >> 25usize) & 0x01;
22013 val != 0
22014 }
22015 #[doc = "PA1 Switch Open"]
22016 pub fn set_pa1so(&mut self, val: bool) {
22017 self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize);
22018 }
22019 #[doc = "PC2 Switch Open"]
22020 pub const fn pc2so(&self) -> bool {
22021 let val = (self.0 >> 26usize) & 0x01;
22022 val != 0
22023 }
22024 #[doc = "PC2 Switch Open"]
22025 pub fn set_pc2so(&mut self, val: bool) {
22026 self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize);
22027 }
22028 #[doc = "PC3 Switch Open"]
22029 pub const fn pc3so(&self) -> bool {
22030 let val = (self.0 >> 27usize) & 0x01;
22031 val != 0
22032 }
22033 #[doc = "PC3 Switch Open"]
22034 pub fn set_pc3so(&mut self, val: bool) {
22035 self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize);
22036 }
22037 }
22038 impl Default for Pmcr {
22039 fn default() -> Pmcr {
22040 Pmcr(0)
22041 }
22042 }
22043 #[doc = "SYSCFG user register 15"]
22044 #[repr(transparent)]
22045 #[derive(Copy, Clone, Eq, PartialEq)]
22046 pub struct Ur15(pub u32);
22047 impl Ur15 {
22048 #[doc = "Freeze independent watchdog in Standby mode"]
22049 pub const fn fziwdgstb(&self) -> bool {
22050 let val = (self.0 >> 16usize) & 0x01;
22051 val != 0
22052 }
22053 #[doc = "Freeze independent watchdog in Standby mode"]
22054 pub fn set_fziwdgstb(&mut self, val: bool) {
22055 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
22056 }
22057 }
22058 impl Default for Ur15 {
22059 fn default() -> Ur15 {
22060 Ur15(0)
22061 }
22062 }
22063 #[doc = "SYSCFG user register 4"]
22064 #[repr(transparent)]
22065 #[derive(Copy, Clone, Eq, PartialEq)]
22066 pub struct Ur4(pub u32);
22067 impl Ur4 {
22068 #[doc = "Mass Erase Protected Area Disabled for bank 1"]
22069 pub const fn mepad_1(&self) -> bool {
22070 let val = (self.0 >> 16usize) & 0x01;
22071 val != 0
22072 }
22073 #[doc = "Mass Erase Protected Area Disabled for bank 1"]
22074 pub fn set_mepad_1(&mut self, val: bool) {
22075 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
22076 }
22077 }
22078 impl Default for Ur4 {
22079 fn default() -> Ur4 {
22080 Ur4(0)
22081 }
22082 }
22083 #[doc = "SYSCFG package register"]
22084 #[repr(transparent)]
22085 #[derive(Copy, Clone, Eq, PartialEq)]
22086 pub struct Pkgr(pub u32);
22087 impl Pkgr {
22088 #[doc = "Package"]
22089 pub const fn pkg(&self) -> u8 {
22090 let val = (self.0 >> 0usize) & 0x0f;
22091 val as u8
22092 }
22093 #[doc = "Package"]
22094 pub fn set_pkg(&mut self, val: u8) {
22095 self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize);
22096 }
22097 }
22098 impl Default for Pkgr {
22099 fn default() -> Pkgr {
22100 Pkgr(0)
22101 }
22102 }
22103 #[doc = "external interrupt configuration register 2"]
22104 #[repr(transparent)]
22105 #[derive(Copy, Clone, Eq, PartialEq)]
22106 pub struct Exticr(pub u32);
22107 impl Exticr {
22108 #[doc = "EXTI x configuration (x = 4 to 7)"]
22109 pub fn exti(&self, n: usize) -> u8 {
22110 assert!(n < 4usize);
22111 let offs = 0usize + n * 4usize;
22112 let val = (self.0 >> offs) & 0x0f;
22113 val as u8
22114 }
22115 #[doc = "EXTI x configuration (x = 4 to 7)"]
22116 pub fn set_exti(&mut self, n: usize, val: u8) {
22117 assert!(n < 4usize);
22118 let offs = 0usize + n * 4usize;
22119 self.0 = (self.0 & !(0x0f << offs)) | (((val as u32) & 0x0f) << offs);
22120>>>>>>> Better interrupt handling
22121 }
22122 }
22123 impl Default for Ccr32 {
22124 fn default() -> Ccr32 {
22125 Ccr32(0)
22126 }
22127 }
22128<<<<<<< HEAD
22129 #[doc = "auto-reload register"]
22130 #[repr(transparent)]
22131 #[derive(Copy, Clone, Eq, PartialEq)]
22132 pub struct Arr16(pub u32);
22133 impl Arr16 {
22134 #[doc = "Auto-reload value"]
22135 pub const fn arr(&self) -> u16 {
22136 let val = (self.0 >> 0usize) & 0xffff;
22137 val as u16
22138 }
22139 #[doc = "Auto-reload value"]
22140 pub fn set_arr(&mut self, val: u16) {
22141 self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
22142 }
22143 }
22144 impl Default for Arr16 {
22145 fn default() -> Arr16 {
22146 Arr16(0)
22147>>>>>>> fc21f52 (Better interrupt handling)
8532 } 22148 }
8533 } 22149 }
8534 #[doc = "SDMMC command response register"] 22150 #[doc = "SDMMC command response register"]
@@ -8613,6 +22229,7 @@ pub mod gpio_v1 {
8613 pub mod vals { 22229 pub mod vals {
8614 use crate::generic::*; 22230 use crate::generic::*;
8615 #[repr(transparent)] 22231 #[repr(transparent)]
22232<<<<<<< HEAD
8616 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 22233 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
8617 pub struct Cnf(pub u8); 22234 pub struct Cnf(pub u8);
8618 impl Cnf { 22235 impl Cnf {
@@ -8673,6 +22290,171 @@ pub mod gpio_v1 {
8673 pub const NOACTION: Self = Self(0); 22290 pub const NOACTION: Self = Self(0);
8674 #[doc = "Sets the corresponding ODRx bit"] 22291 #[doc = "Sets the corresponding ODRx bit"]
8675 pub const SET: Self = Self(0x01); 22292 pub const SET: Self = Self(0x01);
22293=======
22294 #[derive(Copy, Clone, Eq, PartialEq)]
22295 pub struct Bdtr(pub u32);
22296 impl Bdtr {
22297 #[doc = "Dead-time generator setup"]
22298 pub const fn dtg(&self) -> u8 {
22299 let val = (self.0 >> 0usize) & 0xff;
22300 val as u8
22301 }
22302 #[doc = "Dead-time generator setup"]
22303 pub fn set_dtg(&mut self, val: u8) {
22304 self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize);
22305=======
22306 #[doc = "SYSCFG user register 11"]
22307 #[repr(transparent)]
22308 #[derive(Copy, Clone, Eq, PartialEq)]
22309 pub struct Ur11(pub u32);
22310 impl Ur11 {
22311 #[doc = "Secured area end address for bank 2"]
22312 pub const fn sa_end_2(&self) -> u16 {
22313 let val = (self.0 >> 0usize) & 0x0fff;
22314 val as u16
22315 }
22316 #[doc = "Secured area end address for bank 2"]
22317 pub fn set_sa_end_2(&mut self, val: u16) {
22318 self.0 = (self.0 & !(0x0fff << 0usize)) | (((val as u32) & 0x0fff) << 0usize);
22319 }
22320 #[doc = "Independent Watchdog 1 mode"]
22321 pub const fn iwdg1m(&self) -> bool {
22322 let val = (self.0 >> 16usize) & 0x01;
22323 val != 0
22324 }
22325 #[doc = "Independent Watchdog 1 mode"]
22326 pub fn set_iwdg1m(&mut self, val: bool) {
22327 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
22328 }
22329 }
22330 impl Default for Ur11 {
22331 fn default() -> Ur11 {
22332 Ur11(0)
22333 }
22334 }
22335 #[doc = "SYSCFG user register 16"]
22336 #[repr(transparent)]
22337 #[derive(Copy, Clone, Eq, PartialEq)]
22338 pub struct Ur16(pub u32);
22339 impl Ur16 {
22340 #[doc = "Freeze independent watchdog in Stop mode"]
22341 pub const fn fziwdgstp(&self) -> bool {
22342 let val = (self.0 >> 0usize) & 0x01;
22343 val != 0
22344 }
22345 #[doc = "Freeze independent watchdog in Stop mode"]
22346 pub fn set_fziwdgstp(&mut self, val: bool) {
22347 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
22348 }
22349 #[doc = "Private key programmed"]
22350 pub const fn pkp(&self) -> bool {
22351 let val = (self.0 >> 16usize) & 0x01;
22352 val != 0
22353 }
22354 #[doc = "Private key programmed"]
22355 pub fn set_pkp(&mut self, val: bool) {
22356 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
22357 }
22358 }
22359 impl Default for Ur16 {
22360 fn default() -> Ur16 {
22361 Ur16(0)
22362 }
22363 }
22364 #[doc = "SYSCFG user register 13"]
22365 #[repr(transparent)]
22366 #[derive(Copy, Clone, Eq, PartialEq)]
22367 pub struct Ur13(pub u32);
22368 impl Ur13 {
22369 #[doc = "Secured DTCM RAM Size"]
22370 pub const fn sdrs(&self) -> u8 {
22371 let val = (self.0 >> 0usize) & 0x03;
22372 val as u8
22373 }
22374 #[doc = "Secured DTCM RAM Size"]
22375 pub fn set_sdrs(&mut self, val: u8) {
22376 self.0 = (self.0 & !(0x03 << 0usize)) | (((val as u32) & 0x03) << 0usize);
22377 }
22378 #[doc = "D1 Standby reset"]
22379 pub const fn d1sbrst(&self) -> bool {
22380 let val = (self.0 >> 16usize) & 0x01;
22381 val != 0
22382 }
22383 #[doc = "D1 Standby reset"]
22384 pub fn set_d1sbrst(&mut self, val: bool) {
22385 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
22386>>>>>>> Better interrupt handling
22387 }
22388 #[doc = "Lock configuration"]
22389 pub const fn lock(&self) -> u8 {
22390 let val = (self.0 >> 8usize) & 0x03;
22391 val as u8
22392 }
22393 #[doc = "Lock configuration"]
22394 pub fn set_lock(&mut self, val: u8) {
22395 self.0 = (self.0 & !(0x03 << 8usize)) | (((val as u32) & 0x03) << 8usize);
22396 }
22397 #[doc = "Off-state selection for Idle mode"]
22398 pub const fn ossi(&self) -> super::vals::Ossi {
22399 let val = (self.0 >> 10usize) & 0x01;
22400 super::vals::Ossi(val as u8)
22401 }
22402 #[doc = "Off-state selection for Idle mode"]
22403 pub fn set_ossi(&mut self, val: super::vals::Ossi) {
22404 self.0 = (self.0 & !(0x01 << 10usize)) | (((val.0 as u32) & 0x01) << 10usize);
22405 }
22406 #[doc = "Off-state selection for Run mode"]
22407 pub const fn ossr(&self) -> super::vals::Ossr {
22408 let val = (self.0 >> 11usize) & 0x01;
22409 super::vals::Ossr(val as u8)
22410 }
22411 #[doc = "Off-state selection for Run mode"]
22412 pub fn set_ossr(&mut self, val: super::vals::Ossr) {
22413 self.0 = (self.0 & !(0x01 << 11usize)) | (((val.0 as u32) & 0x01) << 11usize);
22414 }
22415 #[doc = "Break enable"]
22416 pub const fn bke(&self) -> bool {
22417 let val = (self.0 >> 12usize) & 0x01;
22418 val != 0
22419 }
22420 #[doc = "Break enable"]
22421 pub fn set_bke(&mut self, val: bool) {
22422 self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize);
22423 }
22424 #[doc = "Break polarity"]
22425 pub const fn bkp(&self) -> bool {
22426 let val = (self.0 >> 13usize) & 0x01;
22427 val != 0
22428 }
22429 #[doc = "Break polarity"]
22430 pub fn set_bkp(&mut self, val: bool) {
22431 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize);
22432 }
22433 #[doc = "Automatic output enable"]
22434 pub const fn aoe(&self) -> bool {
22435 let val = (self.0 >> 14usize) & 0x01;
22436 val != 0
22437 }
22438 #[doc = "Automatic output enable"]
22439 pub fn set_aoe(&mut self, val: bool) {
22440 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize);
22441 }
22442 #[doc = "Main output enable"]
22443 pub const fn moe(&self) -> bool {
22444 let val = (self.0 >> 15usize) & 0x01;
22445 val != 0
22446 }
22447 #[doc = "Main output enable"]
22448 pub fn set_moe(&mut self, val: bool) {
22449 self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize);
22450 }
22451 }
22452<<<<<<< HEAD
22453 impl Default for Bdtr {
22454 fn default() -> Bdtr {
22455 Bdtr(0)
22456 }
22457>>>>>>> fc21f52 (Better interrupt handling)
8676 } 22458 }
8677 #[repr(transparent)] 22459 #[repr(transparent)]
8678 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 22460 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
@@ -8935,6 +22717,7 @@ pub mod exti_v1 {
8935 Imr(0) 22717 Imr(0)
8936 } 22718 }
8937 } 22719 }
22720<<<<<<< HEAD
8938 #[doc = "Software interrupt event register (EXTI_SWIER)"] 22721 #[doc = "Software interrupt event register (EXTI_SWIER)"]
8939 #[repr(transparent)] 22722 #[repr(transparent)]
8940 #[derive(Copy, Clone, Eq, PartialEq)] 22723 #[derive(Copy, Clone, Eq, PartialEq)]
@@ -9064,8 +22847,344 @@ pub mod exti_v1 {
9064 impl Prw { 22847 impl Prw {
9065 #[doc = "Clears pending bit"] 22848 #[doc = "Clears pending bit"]
9066 pub const CLEAR: Self = Self(0x01); 22849 pub const CLEAR: Self = Self(0x01);
22850=======
22851 #[repr(transparent)]
22852 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
22853 pub struct CcmrInputCcs(pub u8);
22854 impl CcmrInputCcs {
22855 #[doc = "CCx channel is configured as input, normal mapping: ICx mapped to TIx"]
22856 pub const TI4: Self = Self(0x01);
22857 #[doc = "CCx channel is configured as input, alternate mapping (switches 1 with 2, 3 with 4)"]
22858 pub const TI3: Self = Self(0x02);
22859 #[doc = "CCx channel is configured as input, ICx is mapped on TRC"]
22860 pub const TRC: Self = Self(0x03);
22861 }
22862 #[repr(transparent)]
22863 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
22864 pub struct Opm(pub u8);
22865 impl Opm {
22866 #[doc = "Counter is not stopped at update event"]
22867 pub const DISABLED: Self = Self(0);
22868 #[doc = "Counter stops counting at the next update event (clearing the CEN bit)"]
22869 pub const ENABLED: Self = Self(0x01);
22870 }
22871 #[repr(transparent)]
22872 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
22873 pub struct CcmrOutputCcs(pub u8);
22874 impl CcmrOutputCcs {
22875 #[doc = "CCx channel is configured as output"]
22876 pub const OUTPUT: Self = Self(0);
22877 }
22878 #[repr(transparent)]
22879 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
22880 pub struct Ece(pub u8);
22881 impl Ece {
22882 #[doc = "External clock mode 2 disabled"]
22883 pub const DISABLED: Self = Self(0);
22884 #[doc = "External clock mode 2 enabled. The counter is clocked by any active edge on the ETRF signal."]
22885 pub const ENABLED: Self = Self(0x01);
22886 }
22887 #[repr(transparent)]
22888 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
22889 pub struct Etp(pub u8);
22890 impl Etp {
22891 #[doc = "ETR is noninverted, active at high level or rising edge"]
22892 pub const NOTINVERTED: Self = Self(0);
22893 #[doc = "ETR is inverted, active at low level or falling edge"]
22894 pub const INVERTED: Self = Self(0x01);
22895 }
22896 #[repr(transparent)]
22897 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
22898 pub struct Etf(pub u8);
22899 impl Etf {
22900 #[doc = "No filter, sampling is done at fDTS"]
22901 pub const NOFILTER: Self = Self(0);
22902 #[doc = "fSAMPLING=fCK_INT, N=2"]
22903 pub const FCK_INT_N2: Self = Self(0x01);
22904 #[doc = "fSAMPLING=fCK_INT, N=4"]
22905 pub const FCK_INT_N4: Self = Self(0x02);
22906 #[doc = "fSAMPLING=fCK_INT, N=8"]
22907 pub const FCK_INT_N8: Self = Self(0x03);
22908 #[doc = "fSAMPLING=fDTS/2, N=6"]
22909 pub const FDTS_DIV2_N6: Self = Self(0x04);
22910 #[doc = "fSAMPLING=fDTS/2, N=8"]
22911 pub const FDTS_DIV2_N8: Self = Self(0x05);
22912 #[doc = "fSAMPLING=fDTS/4, N=6"]
22913 pub const FDTS_DIV4_N6: Self = Self(0x06);
22914 #[doc = "fSAMPLING=fDTS/4, N=8"]
22915 pub const FDTS_DIV4_N8: Self = Self(0x07);
22916 #[doc = "fSAMPLING=fDTS/8, N=6"]
22917 pub const FDTS_DIV8_N6: Self = Self(0x08);
22918 #[doc = "fSAMPLING=fDTS/8, N=8"]
22919 pub const FDTS_DIV8_N8: Self = Self(0x09);
22920 #[doc = "fSAMPLING=fDTS/16, N=5"]
22921 pub const FDTS_DIV16_N5: Self = Self(0x0a);
22922 #[doc = "fSAMPLING=fDTS/16, N=6"]
22923 pub const FDTS_DIV16_N6: Self = Self(0x0b);
22924 #[doc = "fSAMPLING=fDTS/16, N=8"]
22925 pub const FDTS_DIV16_N8: Self = Self(0x0c);
22926 #[doc = "fSAMPLING=fDTS/32, N=5"]
22927 pub const FDTS_DIV32_N5: Self = Self(0x0d);
22928 #[doc = "fSAMPLING=fDTS/32, N=6"]
22929 pub const FDTS_DIV32_N6: Self = Self(0x0e);
22930 #[doc = "fSAMPLING=fDTS/32, N=8"]
22931 pub const FDTS_DIV32_N8: Self = Self(0x0f);
22932 }
22933 #[repr(transparent)]
22934 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
22935 pub struct Ts(pub u8);
22936 impl Ts {
22937 #[doc = "Internal Trigger 0 (ITR0)"]
22938 pub const ITR0: Self = Self(0);
22939 #[doc = "Internal Trigger 1 (ITR1)"]
22940 pub const ITR1: Self = Self(0x01);
22941 #[doc = "Internal Trigger 2 (ITR2)"]
22942 pub const ITR2: Self = Self(0x02);
22943 #[doc = "TI1 Edge Detector (TI1F_ED)"]
22944 pub const TI1F_ED: Self = Self(0x04);
22945 #[doc = "Filtered Timer Input 1 (TI1FP1)"]
22946 pub const TI1FP1: Self = Self(0x05);
22947 #[doc = "Filtered Timer Input 2 (TI2FP2)"]
22948 pub const TI2FP2: Self = Self(0x06);
22949 #[doc = "External Trigger input (ETRF)"]
22950 pub const ETRF: Self = Self(0x07);
22951 }
22952 #[repr(transparent)]
22953 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
22954 pub struct Ossr(pub u8);
22955 impl Ossr {
22956 #[doc = "When inactive, OC/OCN outputs are disabled"]
22957 pub const DISABLED: Self = Self(0);
22958 #[doc = "When inactive, OC/OCN outputs are enabled with their inactive level"]
22959 pub const IDLELEVEL: Self = Self(0x01);
22960 }
22961 #[repr(transparent)]
22962 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
22963 pub struct Etps(pub u8);
22964 impl Etps {
22965 #[doc = "Prescaler OFF"]
22966 pub const DIV1: Self = Self(0);
22967 #[doc = "ETRP frequency divided by 2"]
22968 pub const DIV2: Self = Self(0x01);
22969 #[doc = "ETRP frequency divided by 4"]
22970 pub const DIV4: Self = Self(0x02);
22971 #[doc = "ETRP frequency divided by 8"]
22972 pub const DIV8: Self = Self(0x03);
22973 }
22974 #[repr(transparent)]
22975 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
22976 pub struct Ossi(pub u8);
22977 impl Ossi {
22978 #[doc = "When inactive, OC/OCN outputs are disabled"]
22979 pub const DISABLED: Self = Self(0);
22980 #[doc = "When inactive, OC/OCN outputs are forced to idle level"]
22981 pub const IDLELEVEL: Self = Self(0x01);
22982 }
22983=======
22984 impl Default for Ur13 {
22985 fn default() -> Ur13 {
22986 Ur13(0)
22987 }
22988 }
22989 #[doc = "SYSCFG user register 6"]
22990 #[repr(transparent)]
22991 #[derive(Copy, Clone, Eq, PartialEq)]
22992 pub struct Ur6(pub u32);
22993 impl Ur6 {
22994 #[doc = "Protected area start address for bank 1"]
22995 pub const fn pa_beg_1(&self) -> u16 {
22996 let val = (self.0 >> 0usize) & 0x0fff;
22997 val as u16
22998 }
22999 #[doc = "Protected area start address for bank 1"]
23000 pub fn set_pa_beg_1(&mut self, val: u16) {
23001 self.0 = (self.0 & !(0x0fff << 0usize)) | (((val as u32) & 0x0fff) << 0usize);
23002 }
23003 #[doc = "Protected area end address for bank 1"]
23004 pub const fn pa_end_1(&self) -> u16 {
23005 let val = (self.0 >> 16usize) & 0x0fff;
23006 val as u16
23007 }
23008 #[doc = "Protected area end address for bank 1"]
23009 pub fn set_pa_end_1(&mut self, val: u16) {
23010 self.0 = (self.0 & !(0x0fff << 16usize)) | (((val as u32) & 0x0fff) << 16usize);
23011 }
23012 }
23013 impl Default for Ur6 {
23014 fn default() -> Ur6 {
23015 Ur6(0)
23016 }
23017 }
23018 #[doc = "SYSCFG user register 9"]
23019 #[repr(transparent)]
23020 #[derive(Copy, Clone, Eq, PartialEq)]
23021 pub struct Ur9(pub u32);
23022 impl Ur9 {
23023 #[doc = "Write protection for flash bank 2"]
23024 pub const fn wrpn_2(&self) -> u8 {
23025 let val = (self.0 >> 0usize) & 0xff;
23026 val as u8
23027 }
23028 #[doc = "Write protection for flash bank 2"]
23029 pub fn set_wrpn_2(&mut self, val: u8) {
23030 self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize);
23031 }
23032 #[doc = "Protected area start address for bank 2"]
23033 pub const fn pa_beg_2(&self) -> u16 {
23034 let val = (self.0 >> 16usize) & 0x0fff;
23035 val as u16
23036 }
23037 #[doc = "Protected area start address for bank 2"]
23038 pub fn set_pa_beg_2(&mut self, val: u16) {
23039 self.0 = (self.0 & !(0x0fff << 16usize)) | (((val as u32) & 0x0fff) << 16usize);
23040 }
23041 }
23042 impl Default for Ur9 {
23043 fn default() -> Ur9 {
23044 Ur9(0)
23045 }
23046 }
23047 #[doc = "SYSCFG user register 14"]
23048 #[repr(transparent)]
23049 #[derive(Copy, Clone, Eq, PartialEq)]
23050 pub struct Ur14(pub u32);
23051 impl Ur14 {
23052 #[doc = "D1 Stop Reset"]
23053 pub const fn d1stprst(&self) -> bool {
23054 let val = (self.0 >> 0usize) & 0x01;
23055 val != 0
23056 }
23057 #[doc = "D1 Stop Reset"]
23058 pub fn set_d1stprst(&mut self, val: bool) {
23059 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
23060 }
23061 }
23062 impl Default for Ur14 {
23063 fn default() -> Ur14 {
23064 Ur14(0)
23065 }
23066 }
23067 #[doc = "SYSCFG power control register"]
23068 #[repr(transparent)]
23069 #[derive(Copy, Clone, Eq, PartialEq)]
23070 pub struct Pwrcr(pub u32);
23071 impl Pwrcr {
23072 #[doc = "Overdrive enable"]
23073 pub const fn oden(&self) -> u8 {
23074 let val = (self.0 >> 0usize) & 0x0f;
23075 val as u8
23076 }
23077 #[doc = "Overdrive enable"]
23078 pub fn set_oden(&mut self, val: u8) {
23079 self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize);
23080 }
23081 }
23082 impl Default for Pwrcr {
23083 fn default() -> Pwrcr {
23084 Pwrcr(0)
23085 }
23086 }
23087 }
23088}
23089pub mod syscfg_f4 {
23090 use crate::generic::*;
23091 #[doc = "System configuration controller"]
23092 #[derive(Copy, Clone)]
23093 pub struct Syscfg(pub *mut u8);
23094 unsafe impl Send for Syscfg {}
23095 unsafe impl Sync for Syscfg {}
23096 impl Syscfg {
23097 #[doc = "memory remap register"]
23098 pub fn memrm(self) -> Reg<regs::Memrm, RW> {
23099 unsafe { Reg::from_ptr(self.0.add(0usize)) }
23100 }
23101 #[doc = "peripheral mode configuration register"]
23102 pub fn pmc(self) -> Reg<regs::Pmc, RW> {
23103 unsafe { Reg::from_ptr(self.0.add(4usize)) }
23104 }
23105 #[doc = "external interrupt configuration register"]
23106 pub fn exticr(self, n: usize) -> Reg<regs::Exticr, RW> {
23107 assert!(n < 4usize);
23108 unsafe { Reg::from_ptr(self.0.add(8usize + n * 4usize)) }
23109 }
23110 #[doc = "Compensation cell control register"]
23111 pub fn cmpcr(self) -> Reg<regs::Cmpcr, R> {
23112 unsafe { Reg::from_ptr(self.0.add(32usize)) }
23113 }
23114 }
23115 pub mod regs {
23116 use crate::generic::*;
23117 #[doc = "Compensation cell control register"]
23118 #[repr(transparent)]
23119 #[derive(Copy, Clone, Eq, PartialEq)]
23120 pub struct Cmpcr(pub u32);
23121 impl Cmpcr {
23122 #[doc = "Compensation cell power-down"]
23123 pub const fn cmp_pd(&self) -> bool {
23124 let val = (self.0 >> 0usize) & 0x01;
23125 val != 0
23126 }
23127 #[doc = "Compensation cell power-down"]
23128 pub fn set_cmp_pd(&mut self, val: bool) {
23129 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
23130 }
23131 #[doc = "READY"]
23132 pub const fn ready(&self) -> bool {
23133 let val = (self.0 >> 8usize) & 0x01;
23134 val != 0
23135 }
23136 #[doc = "READY"]
23137 pub fn set_ready(&mut self, val: bool) {
23138 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
23139 }
9067 } 23140 }
23141 impl Default for Cmpcr {
23142 fn default() -> Cmpcr {
23143 Cmpcr(0)
23144 }
23145 }
23146 #[doc = "memory remap register"]
9068 #[repr(transparent)] 23147 #[repr(transparent)]
23148 #[derive(Copy, Clone, Eq, PartialEq)]
23149 pub struct Memrm(pub u32);
23150 impl Memrm {
23151 #[doc = "Memory mapping selection"]
23152 pub const fn mem_mode(&self) -> u8 {
23153 let val = (self.0 >> 0usize) & 0x07;
23154 val as u8
23155 }
23156 #[doc = "Memory mapping selection"]
23157 pub fn set_mem_mode(&mut self, val: u8) {
23158 self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize);
23159 }
23160 #[doc = "Flash bank mode selection"]
23161 pub const fn fb_mode(&self) -> bool {
23162 let val = (self.0 >> 8usize) & 0x01;
23163 val != 0
23164 }
23165 #[doc = "Flash bank mode selection"]
23166 pub fn set_fb_mode(&mut self, val: bool) {
23167 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
23168 }
23169 #[doc = "FMC memory mapping swap"]
23170 pub const fn swp_fmc(&self) -> u8 {
23171 let val = (self.0 >> 10usize) & 0x03;
23172 val as u8
23173 }
23174 #[doc = "FMC memory mapping swap"]
23175 pub fn set_swp_fmc(&mut self, val: u8) {
23176 self.0 = (self.0 & !(0x03 << 10usize)) | (((val as u32) & 0x03) << 10usize);
23177 }
23178 }
23179 impl Default for Memrm {
23180 fn default() -> Memrm {
23181 Memrm(0)
23182 }
23183>>>>>>> fc21f52 (Better interrupt handling)
23184 }
23185 #[doc = "external interrupt configuration register"]
23186 #[repr(transparent)]
23187<<<<<<< HEAD
9069 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 23188 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
9070 pub struct Swierw(pub u8); 23189 pub struct Swierw(pub u8);
9071 impl Swierw { 23190 impl Swierw {
@@ -9080,8 +23199,33 @@ pub mod exti_v1 {
9080 pub const DISABLED: Self = Self(0); 23199 pub const DISABLED: Self = Self(0);
9081 #[doc = "Falling edge trigger is enabled"] 23200 #[doc = "Falling edge trigger is enabled"]
9082 pub const ENABLED: Self = Self(0x01); 23201 pub const ENABLED: Self = Self(0x01);
23202=======
23203 #[derive(Copy, Clone, Eq, PartialEq)]
23204 pub struct Exticr(pub u32);
23205 impl Exticr {
23206 #[doc = "EXTI x configuration"]
23207 pub fn exti(&self, n: usize) -> u8 {
23208 assert!(n < 4usize);
23209 let offs = 0usize + n * 4usize;
23210 let val = (self.0 >> offs) & 0x0f;
23211 val as u8
23212 }
23213 #[doc = "EXTI x configuration"]
23214 pub fn set_exti(&mut self, n: usize, val: u8) {
23215 assert!(n < 4usize);
23216 let offs = 0usize + n * 4usize;
23217 self.0 = (self.0 & !(0x0f << offs)) | (((val as u32) & 0x0f) << offs);
23218 }
9083 } 23219 }
23220 impl Default for Exticr {
23221 fn default() -> Exticr {
23222 Exticr(0)
23223 }
23224>>>>>>> fc21f52 (Better interrupt handling)
23225 }
23226 #[doc = "peripheral mode configuration register"]
9084 #[repr(transparent)] 23227 #[repr(transparent)]
23228<<<<<<< HEAD
9085 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 23229 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
9086 pub struct Prr(pub u8); 23230 pub struct Prr(pub u8);
9087 impl Prr { 23231 impl Prr {
@@ -9098,6 +23242,53 @@ pub mod exti_v1 {
9098 pub const MASKED: Self = Self(0); 23242 pub const MASKED: Self = Self(0);
9099 #[doc = "Interrupt request line is unmasked"] 23243 #[doc = "Interrupt request line is unmasked"]
9100 pub const UNMASKED: Self = Self(0x01); 23244 pub const UNMASKED: Self = Self(0x01);
23245=======
23246 #[derive(Copy, Clone, Eq, PartialEq)]
23247 pub struct Pmc(pub u32);
23248 impl Pmc {
23249 #[doc = "ADC1DC2"]
23250 pub const fn adc1dc2(&self) -> bool {
23251 let val = (self.0 >> 16usize) & 0x01;
23252 val != 0
23253 }
23254 #[doc = "ADC1DC2"]
23255 pub fn set_adc1dc2(&mut self, val: bool) {
23256 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
23257 }
23258 #[doc = "ADC2DC2"]
23259 pub const fn adc2dc2(&self) -> bool {
23260 let val = (self.0 >> 17usize) & 0x01;
23261 val != 0
23262 }
23263 #[doc = "ADC2DC2"]
23264 pub fn set_adc2dc2(&mut self, val: bool) {
23265 self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize);
23266 }
23267 #[doc = "ADC3DC2"]
23268 pub const fn adc3dc2(&self) -> bool {
23269 let val = (self.0 >> 18usize) & 0x01;
23270 val != 0
23271 }
23272 #[doc = "ADC3DC2"]
23273 pub fn set_adc3dc2(&mut self, val: bool) {
23274 self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize);
23275 }
23276 #[doc = "Ethernet PHY interface selection"]
23277 pub const fn mii_rmii_sel(&self) -> bool {
23278 let val = (self.0 >> 23usize) & 0x01;
23279 val != 0
23280 }
23281 #[doc = "Ethernet PHY interface selection"]
23282 pub fn set_mii_rmii_sel(&mut self, val: bool) {
23283 self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize);
23284 }
23285 }
23286 impl Default for Pmc {
23287 fn default() -> Pmc {
23288 Pmc(0)
23289 }
23290>>>>>>> fc21f52 (Better interrupt handling)
9101 } 23291 }
23292>>>>>>> Better interrupt handling
9102 } 23293 }
9103} 23294}
diff --git a/embassy-stm32/src/pac/stm32f401cb.rs b/embassy-stm32/src/pac/stm32f401cb.rs
index 34fa05d86..e5681dc32 100644
--- a/embassy-stm32/src/pac/stm32f401cb.rs
+++ b/embassy-stm32/src/pac/stm32f401cb.rs
@@ -209,7 +209,7 @@ pub mod interrupt {
209 209
210 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 210 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
211 #[allow(non_camel_case_types)] 211 #[allow(non_camel_case_types)]
212 enum InterruptEnum { 212 pub enum InterruptEnum {
213 ADC = 18, 213 ADC = 18,
214 DMA1_Stream0 = 11, 214 DMA1_Stream0 = 11,
215 DMA1_Stream1 = 12, 215 DMA1_Stream1 = 12,
diff --git a/embassy-stm32/src/pac/stm32f401cc.rs b/embassy-stm32/src/pac/stm32f401cc.rs
index 34fa05d86..e5681dc32 100644
--- a/embassy-stm32/src/pac/stm32f401cc.rs
+++ b/embassy-stm32/src/pac/stm32f401cc.rs
@@ -209,7 +209,7 @@ pub mod interrupt {
209 209
210 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 210 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
211 #[allow(non_camel_case_types)] 211 #[allow(non_camel_case_types)]
212 enum InterruptEnum { 212 pub enum InterruptEnum {
213 ADC = 18, 213 ADC = 18,
214 DMA1_Stream0 = 11, 214 DMA1_Stream0 = 11,
215 DMA1_Stream1 = 12, 215 DMA1_Stream1 = 12,
diff --git a/embassy-stm32/src/pac/stm32f401cd.rs b/embassy-stm32/src/pac/stm32f401cd.rs
index 34fa05d86..e5681dc32 100644
--- a/embassy-stm32/src/pac/stm32f401cd.rs
+++ b/embassy-stm32/src/pac/stm32f401cd.rs
@@ -209,7 +209,7 @@ pub mod interrupt {
209 209
210 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 210 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
211 #[allow(non_camel_case_types)] 211 #[allow(non_camel_case_types)]
212 enum InterruptEnum { 212 pub enum InterruptEnum {
213 ADC = 18, 213 ADC = 18,
214 DMA1_Stream0 = 11, 214 DMA1_Stream0 = 11,
215 DMA1_Stream1 = 12, 215 DMA1_Stream1 = 12,
diff --git a/embassy-stm32/src/pac/stm32f401ce.rs b/embassy-stm32/src/pac/stm32f401ce.rs
index 34fa05d86..e5681dc32 100644
--- a/embassy-stm32/src/pac/stm32f401ce.rs
+++ b/embassy-stm32/src/pac/stm32f401ce.rs
@@ -209,7 +209,7 @@ pub mod interrupt {
209 209
210 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 210 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
211 #[allow(non_camel_case_types)] 211 #[allow(non_camel_case_types)]
212 enum InterruptEnum { 212 pub enum InterruptEnum {
213 ADC = 18, 213 ADC = 18,
214 DMA1_Stream0 = 11, 214 DMA1_Stream0 = 11,
215 DMA1_Stream1 = 12, 215 DMA1_Stream1 = 12,
diff --git a/embassy-stm32/src/pac/stm32f401rb.rs b/embassy-stm32/src/pac/stm32f401rb.rs
index 34fa05d86..e5681dc32 100644
--- a/embassy-stm32/src/pac/stm32f401rb.rs
+++ b/embassy-stm32/src/pac/stm32f401rb.rs
@@ -209,7 +209,7 @@ pub mod interrupt {
209 209
210 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 210 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
211 #[allow(non_camel_case_types)] 211 #[allow(non_camel_case_types)]
212 enum InterruptEnum { 212 pub enum InterruptEnum {
213 ADC = 18, 213 ADC = 18,
214 DMA1_Stream0 = 11, 214 DMA1_Stream0 = 11,
215 DMA1_Stream1 = 12, 215 DMA1_Stream1 = 12,
diff --git a/embassy-stm32/src/pac/stm32f401rc.rs b/embassy-stm32/src/pac/stm32f401rc.rs
index 34fa05d86..e5681dc32 100644
--- a/embassy-stm32/src/pac/stm32f401rc.rs
+++ b/embassy-stm32/src/pac/stm32f401rc.rs
@@ -209,7 +209,7 @@ pub mod interrupt {
209 209
210 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 210 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
211 #[allow(non_camel_case_types)] 211 #[allow(non_camel_case_types)]
212 enum InterruptEnum { 212 pub enum InterruptEnum {
213 ADC = 18, 213 ADC = 18,
214 DMA1_Stream0 = 11, 214 DMA1_Stream0 = 11,
215 DMA1_Stream1 = 12, 215 DMA1_Stream1 = 12,
diff --git a/embassy-stm32/src/pac/stm32f401rd.rs b/embassy-stm32/src/pac/stm32f401rd.rs
index 34fa05d86..e5681dc32 100644
--- a/embassy-stm32/src/pac/stm32f401rd.rs
+++ b/embassy-stm32/src/pac/stm32f401rd.rs
@@ -209,7 +209,7 @@ pub mod interrupt {
209 209
210 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 210 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
211 #[allow(non_camel_case_types)] 211 #[allow(non_camel_case_types)]
212 enum InterruptEnum { 212 pub enum InterruptEnum {
213 ADC = 18, 213 ADC = 18,
214 DMA1_Stream0 = 11, 214 DMA1_Stream0 = 11,
215 DMA1_Stream1 = 12, 215 DMA1_Stream1 = 12,
diff --git a/embassy-stm32/src/pac/stm32f401re.rs b/embassy-stm32/src/pac/stm32f401re.rs
index 34fa05d86..e5681dc32 100644
--- a/embassy-stm32/src/pac/stm32f401re.rs
+++ b/embassy-stm32/src/pac/stm32f401re.rs
@@ -209,7 +209,7 @@ pub mod interrupt {
209 209
210 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 210 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
211 #[allow(non_camel_case_types)] 211 #[allow(non_camel_case_types)]
212 enum InterruptEnum { 212 pub enum InterruptEnum {
213 ADC = 18, 213 ADC = 18,
214 DMA1_Stream0 = 11, 214 DMA1_Stream0 = 11,
215 DMA1_Stream1 = 12, 215 DMA1_Stream1 = 12,
diff --git a/embassy-stm32/src/pac/stm32f401vb.rs b/embassy-stm32/src/pac/stm32f401vb.rs
index cc0e9bd85..12e33c160 100644
--- a/embassy-stm32/src/pac/stm32f401vb.rs
+++ b/embassy-stm32/src/pac/stm32f401vb.rs
@@ -217,7 +217,7 @@ pub mod interrupt {
217 217
218 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 218 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
219 #[allow(non_camel_case_types)] 219 #[allow(non_camel_case_types)]
220 enum InterruptEnum { 220 pub enum InterruptEnum {
221 ADC = 18, 221 ADC = 18,
222 DMA1_Stream0 = 11, 222 DMA1_Stream0 = 11,
223 DMA1_Stream1 = 12, 223 DMA1_Stream1 = 12,
diff --git a/embassy-stm32/src/pac/stm32f401vc.rs b/embassy-stm32/src/pac/stm32f401vc.rs
index cc0e9bd85..12e33c160 100644
--- a/embassy-stm32/src/pac/stm32f401vc.rs
+++ b/embassy-stm32/src/pac/stm32f401vc.rs
@@ -217,7 +217,7 @@ pub mod interrupt {
217 217
218 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 218 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
219 #[allow(non_camel_case_types)] 219 #[allow(non_camel_case_types)]
220 enum InterruptEnum { 220 pub enum InterruptEnum {
221 ADC = 18, 221 ADC = 18,
222 DMA1_Stream0 = 11, 222 DMA1_Stream0 = 11,
223 DMA1_Stream1 = 12, 223 DMA1_Stream1 = 12,
diff --git a/embassy-stm32/src/pac/stm32f401vd.rs b/embassy-stm32/src/pac/stm32f401vd.rs
index cc0e9bd85..12e33c160 100644
--- a/embassy-stm32/src/pac/stm32f401vd.rs
+++ b/embassy-stm32/src/pac/stm32f401vd.rs
@@ -217,7 +217,7 @@ pub mod interrupt {
217 217
218 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 218 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
219 #[allow(non_camel_case_types)] 219 #[allow(non_camel_case_types)]
220 enum InterruptEnum { 220 pub enum InterruptEnum {
221 ADC = 18, 221 ADC = 18,
222 DMA1_Stream0 = 11, 222 DMA1_Stream0 = 11,
223 DMA1_Stream1 = 12, 223 DMA1_Stream1 = 12,
diff --git a/embassy-stm32/src/pac/stm32f401ve.rs b/embassy-stm32/src/pac/stm32f401ve.rs
index cc0e9bd85..12e33c160 100644
--- a/embassy-stm32/src/pac/stm32f401ve.rs
+++ b/embassy-stm32/src/pac/stm32f401ve.rs
@@ -217,7 +217,7 @@ pub mod interrupt {
217 217
218 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 218 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
219 #[allow(non_camel_case_types)] 219 #[allow(non_camel_case_types)]
220 enum InterruptEnum { 220 pub enum InterruptEnum {
221 ADC = 18, 221 ADC = 18,
222 DMA1_Stream0 = 11, 222 DMA1_Stream0 = 11,
223 DMA1_Stream1 = 12, 223 DMA1_Stream1 = 12,
diff --git a/embassy-stm32/src/pac/stm32f405oe.rs b/embassy-stm32/src/pac/stm32f405oe.rs
index 60eadd64d..66fb4f9a4 100644
--- a/embassy-stm32/src/pac/stm32f405oe.rs
+++ b/embassy-stm32/src/pac/stm32f405oe.rs
@@ -287,7 +287,7 @@ pub mod interrupt {
287 287
288 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 288 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
289 #[allow(non_camel_case_types)] 289 #[allow(non_camel_case_types)]
290 enum InterruptEnum { 290 pub enum InterruptEnum {
291 ADC = 18, 291 ADC = 18,
292 CAN1_RX0 = 20, 292 CAN1_RX0 = 20,
293 CAN1_RX1 = 21, 293 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f405og.rs b/embassy-stm32/src/pac/stm32f405og.rs
index 60eadd64d..66fb4f9a4 100644
--- a/embassy-stm32/src/pac/stm32f405og.rs
+++ b/embassy-stm32/src/pac/stm32f405og.rs
@@ -287,7 +287,7 @@ pub mod interrupt {
287 287
288 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 288 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
289 #[allow(non_camel_case_types)] 289 #[allow(non_camel_case_types)]
290 enum InterruptEnum { 290 pub enum InterruptEnum {
291 ADC = 18, 291 ADC = 18,
292 CAN1_RX0 = 20, 292 CAN1_RX0 = 20,
293 CAN1_RX1 = 21, 293 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f405rg.rs b/embassy-stm32/src/pac/stm32f405rg.rs
index 60eadd64d..66fb4f9a4 100644
--- a/embassy-stm32/src/pac/stm32f405rg.rs
+++ b/embassy-stm32/src/pac/stm32f405rg.rs
@@ -287,7 +287,7 @@ pub mod interrupt {
287 287
288 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 288 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
289 #[allow(non_camel_case_types)] 289 #[allow(non_camel_case_types)]
290 enum InterruptEnum { 290 pub enum InterruptEnum {
291 ADC = 18, 291 ADC = 18,
292 CAN1_RX0 = 20, 292 CAN1_RX0 = 20,
293 CAN1_RX1 = 21, 293 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f405vg.rs b/embassy-stm32/src/pac/stm32f405vg.rs
index 60eadd64d..66fb4f9a4 100644
--- a/embassy-stm32/src/pac/stm32f405vg.rs
+++ b/embassy-stm32/src/pac/stm32f405vg.rs
@@ -287,7 +287,7 @@ pub mod interrupt {
287 287
288 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 288 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
289 #[allow(non_camel_case_types)] 289 #[allow(non_camel_case_types)]
290 enum InterruptEnum { 290 pub enum InterruptEnum {
291 ADC = 18, 291 ADC = 18,
292 CAN1_RX0 = 20, 292 CAN1_RX0 = 20,
293 CAN1_RX1 = 21, 293 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f405zg.rs b/embassy-stm32/src/pac/stm32f405zg.rs
index 60eadd64d..66fb4f9a4 100644
--- a/embassy-stm32/src/pac/stm32f405zg.rs
+++ b/embassy-stm32/src/pac/stm32f405zg.rs
@@ -287,7 +287,7 @@ pub mod interrupt {
287 287
288 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 288 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
289 #[allow(non_camel_case_types)] 289 #[allow(non_camel_case_types)]
290 enum InterruptEnum { 290 pub enum InterruptEnum {
291 ADC = 18, 291 ADC = 18,
292 CAN1_RX0 = 20, 292 CAN1_RX0 = 20,
293 CAN1_RX1 = 21, 293 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f407ie.rs b/embassy-stm32/src/pac/stm32f407ie.rs
index b02ca8d30..28d64b6d7 100644
--- a/embassy-stm32/src/pac/stm32f407ie.rs
+++ b/embassy-stm32/src/pac/stm32f407ie.rs
@@ -287,7 +287,7 @@ pub mod interrupt {
287 287
288 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 288 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
289 #[allow(non_camel_case_types)] 289 #[allow(non_camel_case_types)]
290 enum InterruptEnum { 290 pub enum InterruptEnum {
291 ADC = 18, 291 ADC = 18,
292 CAN1_RX0 = 20, 292 CAN1_RX0 = 20,
293 CAN1_RX1 = 21, 293 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f407ig.rs b/embassy-stm32/src/pac/stm32f407ig.rs
index b02ca8d30..28d64b6d7 100644
--- a/embassy-stm32/src/pac/stm32f407ig.rs
+++ b/embassy-stm32/src/pac/stm32f407ig.rs
@@ -287,7 +287,7 @@ pub mod interrupt {
287 287
288 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 288 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
289 #[allow(non_camel_case_types)] 289 #[allow(non_camel_case_types)]
290 enum InterruptEnum { 290 pub enum InterruptEnum {
291 ADC = 18, 291 ADC = 18,
292 CAN1_RX0 = 20, 292 CAN1_RX0 = 20,
293 CAN1_RX1 = 21, 293 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f407ve.rs b/embassy-stm32/src/pac/stm32f407ve.rs
index b02ca8d30..28d64b6d7 100644
--- a/embassy-stm32/src/pac/stm32f407ve.rs
+++ b/embassy-stm32/src/pac/stm32f407ve.rs
@@ -287,7 +287,7 @@ pub mod interrupt {
287 287
288 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 288 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
289 #[allow(non_camel_case_types)] 289 #[allow(non_camel_case_types)]
290 enum InterruptEnum { 290 pub enum InterruptEnum {
291 ADC = 18, 291 ADC = 18,
292 CAN1_RX0 = 20, 292 CAN1_RX0 = 20,
293 CAN1_RX1 = 21, 293 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f407vg.rs b/embassy-stm32/src/pac/stm32f407vg.rs
index b02ca8d30..28d64b6d7 100644
--- a/embassy-stm32/src/pac/stm32f407vg.rs
+++ b/embassy-stm32/src/pac/stm32f407vg.rs
@@ -287,7 +287,7 @@ pub mod interrupt {
287 287
288 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 288 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
289 #[allow(non_camel_case_types)] 289 #[allow(non_camel_case_types)]
290 enum InterruptEnum { 290 pub enum InterruptEnum {
291 ADC = 18, 291 ADC = 18,
292 CAN1_RX0 = 20, 292 CAN1_RX0 = 20,
293 CAN1_RX1 = 21, 293 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f407ze.rs b/embassy-stm32/src/pac/stm32f407ze.rs
index b02ca8d30..28d64b6d7 100644
--- a/embassy-stm32/src/pac/stm32f407ze.rs
+++ b/embassy-stm32/src/pac/stm32f407ze.rs
@@ -287,7 +287,7 @@ pub mod interrupt {
287 287
288 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 288 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
289 #[allow(non_camel_case_types)] 289 #[allow(non_camel_case_types)]
290 enum InterruptEnum { 290 pub enum InterruptEnum {
291 ADC = 18, 291 ADC = 18,
292 CAN1_RX0 = 20, 292 CAN1_RX0 = 20,
293 CAN1_RX1 = 21, 293 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f407zg.rs b/embassy-stm32/src/pac/stm32f407zg.rs
index b02ca8d30..28d64b6d7 100644
--- a/embassy-stm32/src/pac/stm32f407zg.rs
+++ b/embassy-stm32/src/pac/stm32f407zg.rs
@@ -287,7 +287,7 @@ pub mod interrupt {
287 287
288 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 288 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
289 #[allow(non_camel_case_types)] 289 #[allow(non_camel_case_types)]
290 enum InterruptEnum { 290 pub enum InterruptEnum {
291 ADC = 18, 291 ADC = 18,
292 CAN1_RX0 = 20, 292 CAN1_RX0 = 20,
293 CAN1_RX1 = 21, 293 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f410c8.rs b/embassy-stm32/src/pac/stm32f410c8.rs
index 938c0c052..c84702548 100644
--- a/embassy-stm32/src/pac/stm32f410c8.rs
+++ b/embassy-stm32/src/pac/stm32f410c8.rs
@@ -146,7 +146,7 @@ pub mod interrupt {
146 146
147 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 147 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
148 #[allow(non_camel_case_types)] 148 #[allow(non_camel_case_types)]
149 enum InterruptEnum { 149 pub enum InterruptEnum {
150 ADC = 18, 150 ADC = 18,
151 DMA1_Stream0 = 11, 151 DMA1_Stream0 = 11,
152 DMA1_Stream1 = 12, 152 DMA1_Stream1 = 12,
diff --git a/embassy-stm32/src/pac/stm32f410cb.rs b/embassy-stm32/src/pac/stm32f410cb.rs
index 938c0c052..c84702548 100644
--- a/embassy-stm32/src/pac/stm32f410cb.rs
+++ b/embassy-stm32/src/pac/stm32f410cb.rs
@@ -146,7 +146,7 @@ pub mod interrupt {
146 146
147 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 147 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
148 #[allow(non_camel_case_types)] 148 #[allow(non_camel_case_types)]
149 enum InterruptEnum { 149 pub enum InterruptEnum {
150 ADC = 18, 150 ADC = 18,
151 DMA1_Stream0 = 11, 151 DMA1_Stream0 = 11,
152 DMA1_Stream1 = 12, 152 DMA1_Stream1 = 12,
diff --git a/embassy-stm32/src/pac/stm32f410r8.rs b/embassy-stm32/src/pac/stm32f410r8.rs
index 938c0c052..c84702548 100644
--- a/embassy-stm32/src/pac/stm32f410r8.rs
+++ b/embassy-stm32/src/pac/stm32f410r8.rs
@@ -146,7 +146,7 @@ pub mod interrupt {
146 146
147 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 147 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
148 #[allow(non_camel_case_types)] 148 #[allow(non_camel_case_types)]
149 enum InterruptEnum { 149 pub enum InterruptEnum {
150 ADC = 18, 150 ADC = 18,
151 DMA1_Stream0 = 11, 151 DMA1_Stream0 = 11,
152 DMA1_Stream1 = 12, 152 DMA1_Stream1 = 12,
diff --git a/embassy-stm32/src/pac/stm32f410rb.rs b/embassy-stm32/src/pac/stm32f410rb.rs
index 938c0c052..c84702548 100644
--- a/embassy-stm32/src/pac/stm32f410rb.rs
+++ b/embassy-stm32/src/pac/stm32f410rb.rs
@@ -146,7 +146,7 @@ pub mod interrupt {
146 146
147 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 147 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
148 #[allow(non_camel_case_types)] 148 #[allow(non_camel_case_types)]
149 enum InterruptEnum { 149 pub enum InterruptEnum {
150 ADC = 18, 150 ADC = 18,
151 DMA1_Stream0 = 11, 151 DMA1_Stream0 = 11,
152 DMA1_Stream1 = 12, 152 DMA1_Stream1 = 12,
diff --git a/embassy-stm32/src/pac/stm32f410t8.rs b/embassy-stm32/src/pac/stm32f410t8.rs
index 74d238a1c..0c7b75136 100644
--- a/embassy-stm32/src/pac/stm32f410t8.rs
+++ b/embassy-stm32/src/pac/stm32f410t8.rs
@@ -139,7 +139,7 @@ pub mod interrupt {
139 139
140 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 140 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
141 #[allow(non_camel_case_types)] 141 #[allow(non_camel_case_types)]
142 enum InterruptEnum { 142 pub enum InterruptEnum {
143 ADC = 18, 143 ADC = 18,
144 DMA1_Stream0 = 11, 144 DMA1_Stream0 = 11,
145 DMA1_Stream1 = 12, 145 DMA1_Stream1 = 12,
diff --git a/embassy-stm32/src/pac/stm32f410tb.rs b/embassy-stm32/src/pac/stm32f410tb.rs
index 74d238a1c..0c7b75136 100644
--- a/embassy-stm32/src/pac/stm32f410tb.rs
+++ b/embassy-stm32/src/pac/stm32f410tb.rs
@@ -139,7 +139,7 @@ pub mod interrupt {
139 139
140 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 140 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
141 #[allow(non_camel_case_types)] 141 #[allow(non_camel_case_types)]
142 enum InterruptEnum { 142 pub enum InterruptEnum {
143 ADC = 18, 143 ADC = 18,
144 DMA1_Stream0 = 11, 144 DMA1_Stream0 = 11,
145 DMA1_Stream1 = 12, 145 DMA1_Stream1 = 12,
diff --git a/embassy-stm32/src/pac/stm32f411cc.rs b/embassy-stm32/src/pac/stm32f411cc.rs
index 2f3f0f0bf..c78d48061 100644
--- a/embassy-stm32/src/pac/stm32f411cc.rs
+++ b/embassy-stm32/src/pac/stm32f411cc.rs
@@ -237,7 +237,7 @@ pub mod interrupt {
237 237
238 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 238 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
239 #[allow(non_camel_case_types)] 239 #[allow(non_camel_case_types)]
240 enum InterruptEnum { 240 pub enum InterruptEnum {
241 ADC = 18, 241 ADC = 18,
242 DMA1_Stream0 = 11, 242 DMA1_Stream0 = 11,
243 DMA1_Stream1 = 12, 243 DMA1_Stream1 = 12,
diff --git a/embassy-stm32/src/pac/stm32f411ce.rs b/embassy-stm32/src/pac/stm32f411ce.rs
index 2f3f0f0bf..c78d48061 100644
--- a/embassy-stm32/src/pac/stm32f411ce.rs
+++ b/embassy-stm32/src/pac/stm32f411ce.rs
@@ -237,7 +237,7 @@ pub mod interrupt {
237 237
238 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 238 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
239 #[allow(non_camel_case_types)] 239 #[allow(non_camel_case_types)]
240 enum InterruptEnum { 240 pub enum InterruptEnum {
241 ADC = 18, 241 ADC = 18,
242 DMA1_Stream0 = 11, 242 DMA1_Stream0 = 11,
243 DMA1_Stream1 = 12, 243 DMA1_Stream1 = 12,
diff --git a/embassy-stm32/src/pac/stm32f411rc.rs b/embassy-stm32/src/pac/stm32f411rc.rs
index 2f3f0f0bf..c78d48061 100644
--- a/embassy-stm32/src/pac/stm32f411rc.rs
+++ b/embassy-stm32/src/pac/stm32f411rc.rs
@@ -237,7 +237,7 @@ pub mod interrupt {
237 237
238 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 238 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
239 #[allow(non_camel_case_types)] 239 #[allow(non_camel_case_types)]
240 enum InterruptEnum { 240 pub enum InterruptEnum {
241 ADC = 18, 241 ADC = 18,
242 DMA1_Stream0 = 11, 242 DMA1_Stream0 = 11,
243 DMA1_Stream1 = 12, 243 DMA1_Stream1 = 12,
diff --git a/embassy-stm32/src/pac/stm32f411re.rs b/embassy-stm32/src/pac/stm32f411re.rs
index 2f3f0f0bf..c78d48061 100644
--- a/embassy-stm32/src/pac/stm32f411re.rs
+++ b/embassy-stm32/src/pac/stm32f411re.rs
@@ -237,7 +237,7 @@ pub mod interrupt {
237 237
238 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 238 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
239 #[allow(non_camel_case_types)] 239 #[allow(non_camel_case_types)]
240 enum InterruptEnum { 240 pub enum InterruptEnum {
241 ADC = 18, 241 ADC = 18,
242 DMA1_Stream0 = 11, 242 DMA1_Stream0 = 11,
243 DMA1_Stream1 = 12, 243 DMA1_Stream1 = 12,
diff --git a/embassy-stm32/src/pac/stm32f411vc.rs b/embassy-stm32/src/pac/stm32f411vc.rs
index 2f3f0f0bf..c78d48061 100644
--- a/embassy-stm32/src/pac/stm32f411vc.rs
+++ b/embassy-stm32/src/pac/stm32f411vc.rs
@@ -237,7 +237,7 @@ pub mod interrupt {
237 237
238 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 238 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
239 #[allow(non_camel_case_types)] 239 #[allow(non_camel_case_types)]
240 enum InterruptEnum { 240 pub enum InterruptEnum {
241 ADC = 18, 241 ADC = 18,
242 DMA1_Stream0 = 11, 242 DMA1_Stream0 = 11,
243 DMA1_Stream1 = 12, 243 DMA1_Stream1 = 12,
diff --git a/embassy-stm32/src/pac/stm32f411ve.rs b/embassy-stm32/src/pac/stm32f411ve.rs
index 2f3f0f0bf..c78d48061 100644
--- a/embassy-stm32/src/pac/stm32f411ve.rs
+++ b/embassy-stm32/src/pac/stm32f411ve.rs
@@ -237,7 +237,7 @@ pub mod interrupt {
237 237
238 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 238 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
239 #[allow(non_camel_case_types)] 239 #[allow(non_camel_case_types)]
240 enum InterruptEnum { 240 pub enum InterruptEnum {
241 ADC = 18, 241 ADC = 18,
242 DMA1_Stream0 = 11, 242 DMA1_Stream0 = 11,
243 DMA1_Stream1 = 12, 243 DMA1_Stream1 = 12,
diff --git a/embassy-stm32/src/pac/stm32f412ce.rs b/embassy-stm32/src/pac/stm32f412ce.rs
index f3e125b70..482e667e7 100644
--- a/embassy-stm32/src/pac/stm32f412ce.rs
+++ b/embassy-stm32/src/pac/stm32f412ce.rs
@@ -196,7 +196,7 @@ pub mod interrupt {
196 196
197 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 197 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
198 #[allow(non_camel_case_types)] 198 #[allow(non_camel_case_types)]
199 enum InterruptEnum { 199 pub enum InterruptEnum {
200 ADC = 18, 200 ADC = 18,
201 CAN1_RX0 = 20, 201 CAN1_RX0 = 20,
202 CAN1_RX1 = 21, 202 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f412cg.rs b/embassy-stm32/src/pac/stm32f412cg.rs
index f3e125b70..482e667e7 100644
--- a/embassy-stm32/src/pac/stm32f412cg.rs
+++ b/embassy-stm32/src/pac/stm32f412cg.rs
@@ -196,7 +196,7 @@ pub mod interrupt {
196 196
197 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 197 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
198 #[allow(non_camel_case_types)] 198 #[allow(non_camel_case_types)]
199 enum InterruptEnum { 199 pub enum InterruptEnum {
200 ADC = 18, 200 ADC = 18,
201 CAN1_RX0 = 20, 201 CAN1_RX0 = 20,
202 CAN1_RX1 = 21, 202 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f412re.rs b/embassy-stm32/src/pac/stm32f412re.rs
index c390cb26c..3732fb172 100644
--- a/embassy-stm32/src/pac/stm32f412re.rs
+++ b/embassy-stm32/src/pac/stm32f412re.rs
@@ -226,7 +226,7 @@ pub mod interrupt {
226 226
227 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 227 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
228 #[allow(non_camel_case_types)] 228 #[allow(non_camel_case_types)]
229 enum InterruptEnum { 229 pub enum InterruptEnum {
230 ADC = 18, 230 ADC = 18,
231 CAN1_RX0 = 20, 231 CAN1_RX0 = 20,
232 CAN1_RX1 = 21, 232 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f412rg.rs b/embassy-stm32/src/pac/stm32f412rg.rs
index c390cb26c..3732fb172 100644
--- a/embassy-stm32/src/pac/stm32f412rg.rs
+++ b/embassy-stm32/src/pac/stm32f412rg.rs
@@ -226,7 +226,7 @@ pub mod interrupt {
226 226
227 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 227 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
228 #[allow(non_camel_case_types)] 228 #[allow(non_camel_case_types)]
229 enum InterruptEnum { 229 pub enum InterruptEnum {
230 ADC = 18, 230 ADC = 18,
231 CAN1_RX0 = 20, 231 CAN1_RX0 = 20,
232 CAN1_RX1 = 21, 232 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f412ve.rs b/embassy-stm32/src/pac/stm32f412ve.rs
index e951dcd09..ca1d669f7 100644
--- a/embassy-stm32/src/pac/stm32f412ve.rs
+++ b/embassy-stm32/src/pac/stm32f412ve.rs
@@ -299,7 +299,7 @@ pub mod interrupt {
299 299
300 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 300 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
301 #[allow(non_camel_case_types)] 301 #[allow(non_camel_case_types)]
302 enum InterruptEnum { 302 pub enum InterruptEnum {
303 ADC = 18, 303 ADC = 18,
304 CAN1_RX0 = 20, 304 CAN1_RX0 = 20,
305 CAN1_RX1 = 21, 305 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f412vg.rs b/embassy-stm32/src/pac/stm32f412vg.rs
index e951dcd09..ca1d669f7 100644
--- a/embassy-stm32/src/pac/stm32f412vg.rs
+++ b/embassy-stm32/src/pac/stm32f412vg.rs
@@ -299,7 +299,7 @@ pub mod interrupt {
299 299
300 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 300 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
301 #[allow(non_camel_case_types)] 301 #[allow(non_camel_case_types)]
302 enum InterruptEnum { 302 pub enum InterruptEnum {
303 ADC = 18, 303 ADC = 18,
304 CAN1_RX0 = 20, 304 CAN1_RX0 = 20,
305 CAN1_RX1 = 21, 305 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f412ze.rs b/embassy-stm32/src/pac/stm32f412ze.rs
index e951dcd09..ca1d669f7 100644
--- a/embassy-stm32/src/pac/stm32f412ze.rs
+++ b/embassy-stm32/src/pac/stm32f412ze.rs
@@ -299,7 +299,7 @@ pub mod interrupt {
299 299
300 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 300 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
301 #[allow(non_camel_case_types)] 301 #[allow(non_camel_case_types)]
302 enum InterruptEnum { 302 pub enum InterruptEnum {
303 ADC = 18, 303 ADC = 18,
304 CAN1_RX0 = 20, 304 CAN1_RX0 = 20,
305 CAN1_RX1 = 21, 305 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f412zg.rs b/embassy-stm32/src/pac/stm32f412zg.rs
index e951dcd09..ca1d669f7 100644
--- a/embassy-stm32/src/pac/stm32f412zg.rs
+++ b/embassy-stm32/src/pac/stm32f412zg.rs
@@ -299,7 +299,7 @@ pub mod interrupt {
299 299
300 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 300 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
301 #[allow(non_camel_case_types)] 301 #[allow(non_camel_case_types)]
302 enum InterruptEnum { 302 pub enum InterruptEnum {
303 ADC = 18, 303 ADC = 18,
304 CAN1_RX0 = 20, 304 CAN1_RX0 = 20,
305 CAN1_RX1 = 21, 305 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f413cg.rs b/embassy-stm32/src/pac/stm32f413cg.rs
index d826ffc9d..9eedd31e4 100644
--- a/embassy-stm32/src/pac/stm32f413cg.rs
+++ b/embassy-stm32/src/pac/stm32f413cg.rs
@@ -285,7 +285,7 @@ pub mod interrupt {
285 285
286 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 286 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
287 #[allow(non_camel_case_types)] 287 #[allow(non_camel_case_types)]
288 enum InterruptEnum { 288 pub enum InterruptEnum {
289 ADC = 18, 289 ADC = 18,
290 CAN1_RX0 = 20, 290 CAN1_RX0 = 20,
291 CAN1_RX1 = 21, 291 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f413ch.rs b/embassy-stm32/src/pac/stm32f413ch.rs
index d826ffc9d..9eedd31e4 100644
--- a/embassy-stm32/src/pac/stm32f413ch.rs
+++ b/embassy-stm32/src/pac/stm32f413ch.rs
@@ -285,7 +285,7 @@ pub mod interrupt {
285 285
286 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 286 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
287 #[allow(non_camel_case_types)] 287 #[allow(non_camel_case_types)]
288 enum InterruptEnum { 288 pub enum InterruptEnum {
289 ADC = 18, 289 ADC = 18,
290 CAN1_RX0 = 20, 290 CAN1_RX0 = 20,
291 CAN1_RX1 = 21, 291 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f413mg.rs b/embassy-stm32/src/pac/stm32f413mg.rs
index 7064cf6d3..718ff7fc3 100644
--- a/embassy-stm32/src/pac/stm32f413mg.rs
+++ b/embassy-stm32/src/pac/stm32f413mg.rs
@@ -302,7 +302,7 @@ pub mod interrupt {
302 302
303 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 303 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
304 #[allow(non_camel_case_types)] 304 #[allow(non_camel_case_types)]
305 enum InterruptEnum { 305 pub enum InterruptEnum {
306 ADC = 18, 306 ADC = 18,
307 CAN1_RX0 = 20, 307 CAN1_RX0 = 20,
308 CAN1_RX1 = 21, 308 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f413mh.rs b/embassy-stm32/src/pac/stm32f413mh.rs
index 7064cf6d3..718ff7fc3 100644
--- a/embassy-stm32/src/pac/stm32f413mh.rs
+++ b/embassy-stm32/src/pac/stm32f413mh.rs
@@ -302,7 +302,7 @@ pub mod interrupt {
302 302
303 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 303 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
304 #[allow(non_camel_case_types)] 304 #[allow(non_camel_case_types)]
305 enum InterruptEnum { 305 pub enum InterruptEnum {
306 ADC = 18, 306 ADC = 18,
307 CAN1_RX0 = 20, 307 CAN1_RX0 = 20,
308 CAN1_RX1 = 21, 308 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f413rg.rs b/embassy-stm32/src/pac/stm32f413rg.rs
index 7064cf6d3..718ff7fc3 100644
--- a/embassy-stm32/src/pac/stm32f413rg.rs
+++ b/embassy-stm32/src/pac/stm32f413rg.rs
@@ -302,7 +302,7 @@ pub mod interrupt {
302 302
303 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 303 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
304 #[allow(non_camel_case_types)] 304 #[allow(non_camel_case_types)]
305 enum InterruptEnum { 305 pub enum InterruptEnum {
306 ADC = 18, 306 ADC = 18,
307 CAN1_RX0 = 20, 307 CAN1_RX0 = 20,
308 CAN1_RX1 = 21, 308 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f413rh.rs b/embassy-stm32/src/pac/stm32f413rh.rs
index 7064cf6d3..718ff7fc3 100644
--- a/embassy-stm32/src/pac/stm32f413rh.rs
+++ b/embassy-stm32/src/pac/stm32f413rh.rs
@@ -302,7 +302,7 @@ pub mod interrupt {
302 302
303 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 303 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
304 #[allow(non_camel_case_types)] 304 #[allow(non_camel_case_types)]
305 enum InterruptEnum { 305 pub enum InterruptEnum {
306 ADC = 18, 306 ADC = 18,
307 CAN1_RX0 = 20, 307 CAN1_RX0 = 20,
308 CAN1_RX1 = 21, 308 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f413vg.rs b/embassy-stm32/src/pac/stm32f413vg.rs
index 7064cf6d3..718ff7fc3 100644
--- a/embassy-stm32/src/pac/stm32f413vg.rs
+++ b/embassy-stm32/src/pac/stm32f413vg.rs
@@ -302,7 +302,7 @@ pub mod interrupt {
302 302
303 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 303 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
304 #[allow(non_camel_case_types)] 304 #[allow(non_camel_case_types)]
305 enum InterruptEnum { 305 pub enum InterruptEnum {
306 ADC = 18, 306 ADC = 18,
307 CAN1_RX0 = 20, 307 CAN1_RX0 = 20,
308 CAN1_RX1 = 21, 308 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f413vh.rs b/embassy-stm32/src/pac/stm32f413vh.rs
index 7064cf6d3..718ff7fc3 100644
--- a/embassy-stm32/src/pac/stm32f413vh.rs
+++ b/embassy-stm32/src/pac/stm32f413vh.rs
@@ -302,7 +302,7 @@ pub mod interrupt {
302 302
303 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 303 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
304 #[allow(non_camel_case_types)] 304 #[allow(non_camel_case_types)]
305 enum InterruptEnum { 305 pub enum InterruptEnum {
306 ADC = 18, 306 ADC = 18,
307 CAN1_RX0 = 20, 307 CAN1_RX0 = 20,
308 CAN1_RX1 = 21, 308 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f413zg.rs b/embassy-stm32/src/pac/stm32f413zg.rs
index 7064cf6d3..718ff7fc3 100644
--- a/embassy-stm32/src/pac/stm32f413zg.rs
+++ b/embassy-stm32/src/pac/stm32f413zg.rs
@@ -302,7 +302,7 @@ pub mod interrupt {
302 302
303 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 303 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
304 #[allow(non_camel_case_types)] 304 #[allow(non_camel_case_types)]
305 enum InterruptEnum { 305 pub enum InterruptEnum {
306 ADC = 18, 306 ADC = 18,
307 CAN1_RX0 = 20, 307 CAN1_RX0 = 20,
308 CAN1_RX1 = 21, 308 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f413zh.rs b/embassy-stm32/src/pac/stm32f413zh.rs
index 7064cf6d3..718ff7fc3 100644
--- a/embassy-stm32/src/pac/stm32f413zh.rs
+++ b/embassy-stm32/src/pac/stm32f413zh.rs
@@ -302,7 +302,7 @@ pub mod interrupt {
302 302
303 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 303 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
304 #[allow(non_camel_case_types)] 304 #[allow(non_camel_case_types)]
305 enum InterruptEnum { 305 pub enum InterruptEnum {
306 ADC = 18, 306 ADC = 18,
307 CAN1_RX0 = 20, 307 CAN1_RX0 = 20,
308 CAN1_RX1 = 21, 308 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f415og.rs b/embassy-stm32/src/pac/stm32f415og.rs
index 212f6befd..0e429ffef 100644
--- a/embassy-stm32/src/pac/stm32f415og.rs
+++ b/embassy-stm32/src/pac/stm32f415og.rs
@@ -287,7 +287,7 @@ pub mod interrupt {
287 287
288 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 288 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
289 #[allow(non_camel_case_types)] 289 #[allow(non_camel_case_types)]
290 enum InterruptEnum { 290 pub enum InterruptEnum {
291 ADC = 18, 291 ADC = 18,
292 CAN1_RX0 = 20, 292 CAN1_RX0 = 20,
293 CAN1_RX1 = 21, 293 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f415rg.rs b/embassy-stm32/src/pac/stm32f415rg.rs
index 212f6befd..0e429ffef 100644
--- a/embassy-stm32/src/pac/stm32f415rg.rs
+++ b/embassy-stm32/src/pac/stm32f415rg.rs
@@ -287,7 +287,7 @@ pub mod interrupt {
287 287
288 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 288 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
289 #[allow(non_camel_case_types)] 289 #[allow(non_camel_case_types)]
290 enum InterruptEnum { 290 pub enum InterruptEnum {
291 ADC = 18, 291 ADC = 18,
292 CAN1_RX0 = 20, 292 CAN1_RX0 = 20,
293 CAN1_RX1 = 21, 293 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f415vg.rs b/embassy-stm32/src/pac/stm32f415vg.rs
index 212f6befd..0e429ffef 100644
--- a/embassy-stm32/src/pac/stm32f415vg.rs
+++ b/embassy-stm32/src/pac/stm32f415vg.rs
@@ -287,7 +287,7 @@ pub mod interrupt {
287 287
288 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 288 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
289 #[allow(non_camel_case_types)] 289 #[allow(non_camel_case_types)]
290 enum InterruptEnum { 290 pub enum InterruptEnum {
291 ADC = 18, 291 ADC = 18,
292 CAN1_RX0 = 20, 292 CAN1_RX0 = 20,
293 CAN1_RX1 = 21, 293 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f415zg.rs b/embassy-stm32/src/pac/stm32f415zg.rs
index 212f6befd..0e429ffef 100644
--- a/embassy-stm32/src/pac/stm32f415zg.rs
+++ b/embassy-stm32/src/pac/stm32f415zg.rs
@@ -287,7 +287,7 @@ pub mod interrupt {
287 287
288 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 288 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
289 #[allow(non_camel_case_types)] 289 #[allow(non_camel_case_types)]
290 enum InterruptEnum { 290 pub enum InterruptEnum {
291 ADC = 18, 291 ADC = 18,
292 CAN1_RX0 = 20, 292 CAN1_RX0 = 20,
293 CAN1_RX1 = 21, 293 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f417ie.rs b/embassy-stm32/src/pac/stm32f417ie.rs
index 4cdc36b6c..f8e463029 100644
--- a/embassy-stm32/src/pac/stm32f417ie.rs
+++ b/embassy-stm32/src/pac/stm32f417ie.rs
@@ -287,7 +287,7 @@ pub mod interrupt {
287 287
288 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 288 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
289 #[allow(non_camel_case_types)] 289 #[allow(non_camel_case_types)]
290 enum InterruptEnum { 290 pub enum InterruptEnum {
291 ADC = 18, 291 ADC = 18,
292 CAN1_RX0 = 20, 292 CAN1_RX0 = 20,
293 CAN1_RX1 = 21, 293 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f417ig.rs b/embassy-stm32/src/pac/stm32f417ig.rs
index 4cdc36b6c..f8e463029 100644
--- a/embassy-stm32/src/pac/stm32f417ig.rs
+++ b/embassy-stm32/src/pac/stm32f417ig.rs
@@ -287,7 +287,7 @@ pub mod interrupt {
287 287
288 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 288 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
289 #[allow(non_camel_case_types)] 289 #[allow(non_camel_case_types)]
290 enum InterruptEnum { 290 pub enum InterruptEnum {
291 ADC = 18, 291 ADC = 18,
292 CAN1_RX0 = 20, 292 CAN1_RX0 = 20,
293 CAN1_RX1 = 21, 293 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f417ve.rs b/embassy-stm32/src/pac/stm32f417ve.rs
index 4cdc36b6c..f8e463029 100644
--- a/embassy-stm32/src/pac/stm32f417ve.rs
+++ b/embassy-stm32/src/pac/stm32f417ve.rs
@@ -287,7 +287,7 @@ pub mod interrupt {
287 287
288 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 288 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
289 #[allow(non_camel_case_types)] 289 #[allow(non_camel_case_types)]
290 enum InterruptEnum { 290 pub enum InterruptEnum {
291 ADC = 18, 291 ADC = 18,
292 CAN1_RX0 = 20, 292 CAN1_RX0 = 20,
293 CAN1_RX1 = 21, 293 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f417vg.rs b/embassy-stm32/src/pac/stm32f417vg.rs
index 4cdc36b6c..f8e463029 100644
--- a/embassy-stm32/src/pac/stm32f417vg.rs
+++ b/embassy-stm32/src/pac/stm32f417vg.rs
@@ -287,7 +287,7 @@ pub mod interrupt {
287 287
288 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 288 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
289 #[allow(non_camel_case_types)] 289 #[allow(non_camel_case_types)]
290 enum InterruptEnum { 290 pub enum InterruptEnum {
291 ADC = 18, 291 ADC = 18,
292 CAN1_RX0 = 20, 292 CAN1_RX0 = 20,
293 CAN1_RX1 = 21, 293 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f417ze.rs b/embassy-stm32/src/pac/stm32f417ze.rs
index 4cdc36b6c..f8e463029 100644
--- a/embassy-stm32/src/pac/stm32f417ze.rs
+++ b/embassy-stm32/src/pac/stm32f417ze.rs
@@ -287,7 +287,7 @@ pub mod interrupt {
287 287
288 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 288 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
289 #[allow(non_camel_case_types)] 289 #[allow(non_camel_case_types)]
290 enum InterruptEnum { 290 pub enum InterruptEnum {
291 ADC = 18, 291 ADC = 18,
292 CAN1_RX0 = 20, 292 CAN1_RX0 = 20,
293 CAN1_RX1 = 21, 293 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f417zg.rs b/embassy-stm32/src/pac/stm32f417zg.rs
index 4cdc36b6c..f8e463029 100644
--- a/embassy-stm32/src/pac/stm32f417zg.rs
+++ b/embassy-stm32/src/pac/stm32f417zg.rs
@@ -287,7 +287,7 @@ pub mod interrupt {
287 287
288 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 288 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
289 #[allow(non_camel_case_types)] 289 #[allow(non_camel_case_types)]
290 enum InterruptEnum { 290 pub enum InterruptEnum {
291 ADC = 18, 291 ADC = 18,
292 CAN1_RX0 = 20, 292 CAN1_RX0 = 20,
293 CAN1_RX1 = 21, 293 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f423ch.rs b/embassy-stm32/src/pac/stm32f423ch.rs
index 5ba7b6eb5..c0bddb16c 100644
--- a/embassy-stm32/src/pac/stm32f423ch.rs
+++ b/embassy-stm32/src/pac/stm32f423ch.rs
@@ -285,7 +285,7 @@ pub mod interrupt {
285 285
286 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 286 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
287 #[allow(non_camel_case_types)] 287 #[allow(non_camel_case_types)]
288 enum InterruptEnum { 288 pub enum InterruptEnum {
289 ADC = 18, 289 ADC = 18,
290 AES = 79, 290 AES = 79,
291 CAN1_RX0 = 20, 291 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32f423mh.rs b/embassy-stm32/src/pac/stm32f423mh.rs
index 5f6f0feee..c6a327af4 100644
--- a/embassy-stm32/src/pac/stm32f423mh.rs
+++ b/embassy-stm32/src/pac/stm32f423mh.rs
@@ -302,7 +302,7 @@ pub mod interrupt {
302 302
303 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 303 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
304 #[allow(non_camel_case_types)] 304 #[allow(non_camel_case_types)]
305 enum InterruptEnum { 305 pub enum InterruptEnum {
306 ADC = 18, 306 ADC = 18,
307 AES = 79, 307 AES = 79,
308 CAN1_RX0 = 20, 308 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32f423rh.rs b/embassy-stm32/src/pac/stm32f423rh.rs
index 5f6f0feee..c6a327af4 100644
--- a/embassy-stm32/src/pac/stm32f423rh.rs
+++ b/embassy-stm32/src/pac/stm32f423rh.rs
@@ -302,7 +302,7 @@ pub mod interrupt {
302 302
303 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 303 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
304 #[allow(non_camel_case_types)] 304 #[allow(non_camel_case_types)]
305 enum InterruptEnum { 305 pub enum InterruptEnum {
306 ADC = 18, 306 ADC = 18,
307 AES = 79, 307 AES = 79,
308 CAN1_RX0 = 20, 308 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32f423vh.rs b/embassy-stm32/src/pac/stm32f423vh.rs
index 5f6f0feee..c6a327af4 100644
--- a/embassy-stm32/src/pac/stm32f423vh.rs
+++ b/embassy-stm32/src/pac/stm32f423vh.rs
@@ -302,7 +302,7 @@ pub mod interrupt {
302 302
303 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 303 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
304 #[allow(non_camel_case_types)] 304 #[allow(non_camel_case_types)]
305 enum InterruptEnum { 305 pub enum InterruptEnum {
306 ADC = 18, 306 ADC = 18,
307 AES = 79, 307 AES = 79,
308 CAN1_RX0 = 20, 308 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32f423zh.rs b/embassy-stm32/src/pac/stm32f423zh.rs
index 5f6f0feee..c6a327af4 100644
--- a/embassy-stm32/src/pac/stm32f423zh.rs
+++ b/embassy-stm32/src/pac/stm32f423zh.rs
@@ -302,7 +302,7 @@ pub mod interrupt {
302 302
303 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 303 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
304 #[allow(non_camel_case_types)] 304 #[allow(non_camel_case_types)]
305 enum InterruptEnum { 305 pub enum InterruptEnum {
306 ADC = 18, 306 ADC = 18,
307 AES = 79, 307 AES = 79,
308 CAN1_RX0 = 20, 308 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32f427ag.rs b/embassy-stm32/src/pac/stm32f427ag.rs
index 482d05539..847ddd3e4 100644
--- a/embassy-stm32/src/pac/stm32f427ag.rs
+++ b/embassy-stm32/src/pac/stm32f427ag.rs
@@ -341,7 +341,7 @@ pub mod interrupt {
341 341
342 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 342 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
343 #[allow(non_camel_case_types)] 343 #[allow(non_camel_case_types)]
344 enum InterruptEnum { 344 pub enum InterruptEnum {
345 ADC = 18, 345 ADC = 18,
346 CAN1_RX0 = 20, 346 CAN1_RX0 = 20,
347 CAN1_RX1 = 21, 347 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f427ai.rs b/embassy-stm32/src/pac/stm32f427ai.rs
index 482d05539..847ddd3e4 100644
--- a/embassy-stm32/src/pac/stm32f427ai.rs
+++ b/embassy-stm32/src/pac/stm32f427ai.rs
@@ -341,7 +341,7 @@ pub mod interrupt {
341 341
342 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 342 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
343 #[allow(non_camel_case_types)] 343 #[allow(non_camel_case_types)]
344 enum InterruptEnum { 344 pub enum InterruptEnum {
345 ADC = 18, 345 ADC = 18,
346 CAN1_RX0 = 20, 346 CAN1_RX0 = 20,
347 CAN1_RX1 = 21, 347 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f427ig.rs b/embassy-stm32/src/pac/stm32f427ig.rs
index 264fb1751..89ad349bb 100644
--- a/embassy-stm32/src/pac/stm32f427ig.rs
+++ b/embassy-stm32/src/pac/stm32f427ig.rs
@@ -346,7 +346,7 @@ pub mod interrupt {
346 346
347 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 347 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
348 #[allow(non_camel_case_types)] 348 #[allow(non_camel_case_types)]
349 enum InterruptEnum { 349 pub enum InterruptEnum {
350 ADC = 18, 350 ADC = 18,
351 CAN1_RX0 = 20, 351 CAN1_RX0 = 20,
352 CAN1_RX1 = 21, 352 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f427ii.rs b/embassy-stm32/src/pac/stm32f427ii.rs
index 264fb1751..89ad349bb 100644
--- a/embassy-stm32/src/pac/stm32f427ii.rs
+++ b/embassy-stm32/src/pac/stm32f427ii.rs
@@ -346,7 +346,7 @@ pub mod interrupt {
346 346
347 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 347 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
348 #[allow(non_camel_case_types)] 348 #[allow(non_camel_case_types)]
349 enum InterruptEnum { 349 pub enum InterruptEnum {
350 ADC = 18, 350 ADC = 18,
351 CAN1_RX0 = 20, 351 CAN1_RX0 = 20,
352 CAN1_RX1 = 21, 352 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f427vg.rs b/embassy-stm32/src/pac/stm32f427vg.rs
index 91b33ba5d..7986a1d21 100644
--- a/embassy-stm32/src/pac/stm32f427vg.rs
+++ b/embassy-stm32/src/pac/stm32f427vg.rs
@@ -333,7 +333,7 @@ pub mod interrupt {
333 333
334 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 334 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
335 #[allow(non_camel_case_types)] 335 #[allow(non_camel_case_types)]
336 enum InterruptEnum { 336 pub enum InterruptEnum {
337 ADC = 18, 337 ADC = 18,
338 CAN1_RX0 = 20, 338 CAN1_RX0 = 20,
339 CAN1_RX1 = 21, 339 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f427vi.rs b/embassy-stm32/src/pac/stm32f427vi.rs
index 91b33ba5d..7986a1d21 100644
--- a/embassy-stm32/src/pac/stm32f427vi.rs
+++ b/embassy-stm32/src/pac/stm32f427vi.rs
@@ -333,7 +333,7 @@ pub mod interrupt {
333 333
334 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 334 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
335 #[allow(non_camel_case_types)] 335 #[allow(non_camel_case_types)]
336 enum InterruptEnum { 336 pub enum InterruptEnum {
337 ADC = 18, 337 ADC = 18,
338 CAN1_RX0 = 20, 338 CAN1_RX0 = 20,
339 CAN1_RX1 = 21, 339 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f427zg.rs b/embassy-stm32/src/pac/stm32f427zg.rs
index 264fb1751..89ad349bb 100644
--- a/embassy-stm32/src/pac/stm32f427zg.rs
+++ b/embassy-stm32/src/pac/stm32f427zg.rs
@@ -346,7 +346,7 @@ pub mod interrupt {
346 346
347 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 347 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
348 #[allow(non_camel_case_types)] 348 #[allow(non_camel_case_types)]
349 enum InterruptEnum { 349 pub enum InterruptEnum {
350 ADC = 18, 350 ADC = 18,
351 CAN1_RX0 = 20, 351 CAN1_RX0 = 20,
352 CAN1_RX1 = 21, 352 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f427zi.rs b/embassy-stm32/src/pac/stm32f427zi.rs
index 264fb1751..89ad349bb 100644
--- a/embassy-stm32/src/pac/stm32f427zi.rs
+++ b/embassy-stm32/src/pac/stm32f427zi.rs
@@ -346,7 +346,7 @@ pub mod interrupt {
346 346
347 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 347 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
348 #[allow(non_camel_case_types)] 348 #[allow(non_camel_case_types)]
349 enum InterruptEnum { 349 pub enum InterruptEnum {
350 ADC = 18, 350 ADC = 18,
351 CAN1_RX0 = 20, 351 CAN1_RX0 = 20,
352 CAN1_RX1 = 21, 352 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f429ag.rs b/embassy-stm32/src/pac/stm32f429ag.rs
index ce1caee68..bc0f1b5ea 100644
--- a/embassy-stm32/src/pac/stm32f429ag.rs
+++ b/embassy-stm32/src/pac/stm32f429ag.rs
@@ -341,7 +341,7 @@ pub mod interrupt {
341 341
342 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 342 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
343 #[allow(non_camel_case_types)] 343 #[allow(non_camel_case_types)]
344 enum InterruptEnum { 344 pub enum InterruptEnum {
345 ADC = 18, 345 ADC = 18,
346 CAN1_RX0 = 20, 346 CAN1_RX0 = 20,
347 CAN1_RX1 = 21, 347 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f429ai.rs b/embassy-stm32/src/pac/stm32f429ai.rs
index ce1caee68..bc0f1b5ea 100644
--- a/embassy-stm32/src/pac/stm32f429ai.rs
+++ b/embassy-stm32/src/pac/stm32f429ai.rs
@@ -341,7 +341,7 @@ pub mod interrupt {
341 341
342 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 342 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
343 #[allow(non_camel_case_types)] 343 #[allow(non_camel_case_types)]
344 enum InterruptEnum { 344 pub enum InterruptEnum {
345 ADC = 18, 345 ADC = 18,
346 CAN1_RX0 = 20, 346 CAN1_RX0 = 20,
347 CAN1_RX1 = 21, 347 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f429be.rs b/embassy-stm32/src/pac/stm32f429be.rs
index 656c87e07..15bbdbb14 100644
--- a/embassy-stm32/src/pac/stm32f429be.rs
+++ b/embassy-stm32/src/pac/stm32f429be.rs
@@ -346,7 +346,7 @@ pub mod interrupt {
346 346
347 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 347 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
348 #[allow(non_camel_case_types)] 348 #[allow(non_camel_case_types)]
349 enum InterruptEnum { 349 pub enum InterruptEnum {
350 ADC = 18, 350 ADC = 18,
351 CAN1_RX0 = 20, 351 CAN1_RX0 = 20,
352 CAN1_RX1 = 21, 352 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f429bg.rs b/embassy-stm32/src/pac/stm32f429bg.rs
index 656c87e07..15bbdbb14 100644
--- a/embassy-stm32/src/pac/stm32f429bg.rs
+++ b/embassy-stm32/src/pac/stm32f429bg.rs
@@ -346,7 +346,7 @@ pub mod interrupt {
346 346
347 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 347 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
348 #[allow(non_camel_case_types)] 348 #[allow(non_camel_case_types)]
349 enum InterruptEnum { 349 pub enum InterruptEnum {
350 ADC = 18, 350 ADC = 18,
351 CAN1_RX0 = 20, 351 CAN1_RX0 = 20,
352 CAN1_RX1 = 21, 352 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f429bi.rs b/embassy-stm32/src/pac/stm32f429bi.rs
index 656c87e07..15bbdbb14 100644
--- a/embassy-stm32/src/pac/stm32f429bi.rs
+++ b/embassy-stm32/src/pac/stm32f429bi.rs
@@ -346,7 +346,7 @@ pub mod interrupt {
346 346
347 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 347 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
348 #[allow(non_camel_case_types)] 348 #[allow(non_camel_case_types)]
349 enum InterruptEnum { 349 pub enum InterruptEnum {
350 ADC = 18, 350 ADC = 18,
351 CAN1_RX0 = 20, 351 CAN1_RX0 = 20,
352 CAN1_RX1 = 21, 352 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f429ie.rs b/embassy-stm32/src/pac/stm32f429ie.rs
index 656c87e07..15bbdbb14 100644
--- a/embassy-stm32/src/pac/stm32f429ie.rs
+++ b/embassy-stm32/src/pac/stm32f429ie.rs
@@ -346,7 +346,7 @@ pub mod interrupt {
346 346
347 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 347 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
348 #[allow(non_camel_case_types)] 348 #[allow(non_camel_case_types)]
349 enum InterruptEnum { 349 pub enum InterruptEnum {
350 ADC = 18, 350 ADC = 18,
351 CAN1_RX0 = 20, 351 CAN1_RX0 = 20,
352 CAN1_RX1 = 21, 352 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f429ig.rs b/embassy-stm32/src/pac/stm32f429ig.rs
index 656c87e07..15bbdbb14 100644
--- a/embassy-stm32/src/pac/stm32f429ig.rs
+++ b/embassy-stm32/src/pac/stm32f429ig.rs
@@ -346,7 +346,7 @@ pub mod interrupt {
346 346
347 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 347 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
348 #[allow(non_camel_case_types)] 348 #[allow(non_camel_case_types)]
349 enum InterruptEnum { 349 pub enum InterruptEnum {
350 ADC = 18, 350 ADC = 18,
351 CAN1_RX0 = 20, 351 CAN1_RX0 = 20,
352 CAN1_RX1 = 21, 352 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f429ii.rs b/embassy-stm32/src/pac/stm32f429ii.rs
index 656c87e07..15bbdbb14 100644
--- a/embassy-stm32/src/pac/stm32f429ii.rs
+++ b/embassy-stm32/src/pac/stm32f429ii.rs
@@ -346,7 +346,7 @@ pub mod interrupt {
346 346
347 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 347 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
348 #[allow(non_camel_case_types)] 348 #[allow(non_camel_case_types)]
349 enum InterruptEnum { 349 pub enum InterruptEnum {
350 ADC = 18, 350 ADC = 18,
351 CAN1_RX0 = 20, 351 CAN1_RX0 = 20,
352 CAN1_RX1 = 21, 352 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f429ne.rs b/embassy-stm32/src/pac/stm32f429ne.rs
index 656c87e07..15bbdbb14 100644
--- a/embassy-stm32/src/pac/stm32f429ne.rs
+++ b/embassy-stm32/src/pac/stm32f429ne.rs
@@ -346,7 +346,7 @@ pub mod interrupt {
346 346
347 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 347 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
348 #[allow(non_camel_case_types)] 348 #[allow(non_camel_case_types)]
349 enum InterruptEnum { 349 pub enum InterruptEnum {
350 ADC = 18, 350 ADC = 18,
351 CAN1_RX0 = 20, 351 CAN1_RX0 = 20,
352 CAN1_RX1 = 21, 352 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f429ng.rs b/embassy-stm32/src/pac/stm32f429ng.rs
index 656c87e07..15bbdbb14 100644
--- a/embassy-stm32/src/pac/stm32f429ng.rs
+++ b/embassy-stm32/src/pac/stm32f429ng.rs
@@ -346,7 +346,7 @@ pub mod interrupt {
346 346
347 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 347 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
348 #[allow(non_camel_case_types)] 348 #[allow(non_camel_case_types)]
349 enum InterruptEnum { 349 pub enum InterruptEnum {
350 ADC = 18, 350 ADC = 18,
351 CAN1_RX0 = 20, 351 CAN1_RX0 = 20,
352 CAN1_RX1 = 21, 352 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f429ni.rs b/embassy-stm32/src/pac/stm32f429ni.rs
index 656c87e07..15bbdbb14 100644
--- a/embassy-stm32/src/pac/stm32f429ni.rs
+++ b/embassy-stm32/src/pac/stm32f429ni.rs
@@ -346,7 +346,7 @@ pub mod interrupt {
346 346
347 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 347 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
348 #[allow(non_camel_case_types)] 348 #[allow(non_camel_case_types)]
349 enum InterruptEnum { 349 pub enum InterruptEnum {
350 ADC = 18, 350 ADC = 18,
351 CAN1_RX0 = 20, 351 CAN1_RX0 = 20,
352 CAN1_RX1 = 21, 352 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f429ve.rs b/embassy-stm32/src/pac/stm32f429ve.rs
index 1d8b1c7c4..ab7908d16 100644
--- a/embassy-stm32/src/pac/stm32f429ve.rs
+++ b/embassy-stm32/src/pac/stm32f429ve.rs
@@ -333,7 +333,7 @@ pub mod interrupt {
333 333
334 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 334 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
335 #[allow(non_camel_case_types)] 335 #[allow(non_camel_case_types)]
336 enum InterruptEnum { 336 pub enum InterruptEnum {
337 ADC = 18, 337 ADC = 18,
338 CAN1_RX0 = 20, 338 CAN1_RX0 = 20,
339 CAN1_RX1 = 21, 339 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f429vg.rs b/embassy-stm32/src/pac/stm32f429vg.rs
index 1d8b1c7c4..ab7908d16 100644
--- a/embassy-stm32/src/pac/stm32f429vg.rs
+++ b/embassy-stm32/src/pac/stm32f429vg.rs
@@ -333,7 +333,7 @@ pub mod interrupt {
333 333
334 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 334 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
335 #[allow(non_camel_case_types)] 335 #[allow(non_camel_case_types)]
336 enum InterruptEnum { 336 pub enum InterruptEnum {
337 ADC = 18, 337 ADC = 18,
338 CAN1_RX0 = 20, 338 CAN1_RX0 = 20,
339 CAN1_RX1 = 21, 339 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f429vi.rs b/embassy-stm32/src/pac/stm32f429vi.rs
index 1d8b1c7c4..ab7908d16 100644
--- a/embassy-stm32/src/pac/stm32f429vi.rs
+++ b/embassy-stm32/src/pac/stm32f429vi.rs
@@ -333,7 +333,7 @@ pub mod interrupt {
333 333
334 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 334 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
335 #[allow(non_camel_case_types)] 335 #[allow(non_camel_case_types)]
336 enum InterruptEnum { 336 pub enum InterruptEnum {
337 ADC = 18, 337 ADC = 18,
338 CAN1_RX0 = 20, 338 CAN1_RX0 = 20,
339 CAN1_RX1 = 21, 339 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f429ze.rs b/embassy-stm32/src/pac/stm32f429ze.rs
index 656c87e07..15bbdbb14 100644
--- a/embassy-stm32/src/pac/stm32f429ze.rs
+++ b/embassy-stm32/src/pac/stm32f429ze.rs
@@ -346,7 +346,7 @@ pub mod interrupt {
346 346
347 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 347 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
348 #[allow(non_camel_case_types)] 348 #[allow(non_camel_case_types)]
349 enum InterruptEnum { 349 pub enum InterruptEnum {
350 ADC = 18, 350 ADC = 18,
351 CAN1_RX0 = 20, 351 CAN1_RX0 = 20,
352 CAN1_RX1 = 21, 352 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f429zg.rs b/embassy-stm32/src/pac/stm32f429zg.rs
index 656c87e07..15bbdbb14 100644
--- a/embassy-stm32/src/pac/stm32f429zg.rs
+++ b/embassy-stm32/src/pac/stm32f429zg.rs
@@ -346,7 +346,7 @@ pub mod interrupt {
346 346
347 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 347 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
348 #[allow(non_camel_case_types)] 348 #[allow(non_camel_case_types)]
349 enum InterruptEnum { 349 pub enum InterruptEnum {
350 ADC = 18, 350 ADC = 18,
351 CAN1_RX0 = 20, 351 CAN1_RX0 = 20,
352 CAN1_RX1 = 21, 352 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f429zi.rs b/embassy-stm32/src/pac/stm32f429zi.rs
index 656c87e07..15bbdbb14 100644
--- a/embassy-stm32/src/pac/stm32f429zi.rs
+++ b/embassy-stm32/src/pac/stm32f429zi.rs
@@ -346,7 +346,7 @@ pub mod interrupt {
346 346
347 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 347 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
348 #[allow(non_camel_case_types)] 348 #[allow(non_camel_case_types)]
349 enum InterruptEnum { 349 pub enum InterruptEnum {
350 ADC = 18, 350 ADC = 18,
351 CAN1_RX0 = 20, 351 CAN1_RX0 = 20,
352 CAN1_RX1 = 21, 352 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f437ai.rs b/embassy-stm32/src/pac/stm32f437ai.rs
index 6d5351b44..e9f9533f8 100644
--- a/embassy-stm32/src/pac/stm32f437ai.rs
+++ b/embassy-stm32/src/pac/stm32f437ai.rs
@@ -341,7 +341,7 @@ pub mod interrupt {
341 341
342 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 342 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
343 #[allow(non_camel_case_types)] 343 #[allow(non_camel_case_types)]
344 enum InterruptEnum { 344 pub enum InterruptEnum {
345 ADC = 18, 345 ADC = 18,
346 CAN1_RX0 = 20, 346 CAN1_RX0 = 20,
347 CAN1_RX1 = 21, 347 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f437ig.rs b/embassy-stm32/src/pac/stm32f437ig.rs
index 8bdfb2d0d..ab3111b88 100644
--- a/embassy-stm32/src/pac/stm32f437ig.rs
+++ b/embassy-stm32/src/pac/stm32f437ig.rs
@@ -346,7 +346,7 @@ pub mod interrupt {
346 346
347 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 347 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
348 #[allow(non_camel_case_types)] 348 #[allow(non_camel_case_types)]
349 enum InterruptEnum { 349 pub enum InterruptEnum {
350 ADC = 18, 350 ADC = 18,
351 CAN1_RX0 = 20, 351 CAN1_RX0 = 20,
352 CAN1_RX1 = 21, 352 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f437ii.rs b/embassy-stm32/src/pac/stm32f437ii.rs
index 8bdfb2d0d..ab3111b88 100644
--- a/embassy-stm32/src/pac/stm32f437ii.rs
+++ b/embassy-stm32/src/pac/stm32f437ii.rs
@@ -346,7 +346,7 @@ pub mod interrupt {
346 346
347 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 347 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
348 #[allow(non_camel_case_types)] 348 #[allow(non_camel_case_types)]
349 enum InterruptEnum { 349 pub enum InterruptEnum {
350 ADC = 18, 350 ADC = 18,
351 CAN1_RX0 = 20, 351 CAN1_RX0 = 20,
352 CAN1_RX1 = 21, 352 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f437vg.rs b/embassy-stm32/src/pac/stm32f437vg.rs
index f3d6048db..395f3c256 100644
--- a/embassy-stm32/src/pac/stm32f437vg.rs
+++ b/embassy-stm32/src/pac/stm32f437vg.rs
@@ -333,7 +333,7 @@ pub mod interrupt {
333 333
334 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 334 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
335 #[allow(non_camel_case_types)] 335 #[allow(non_camel_case_types)]
336 enum InterruptEnum { 336 pub enum InterruptEnum {
337 ADC = 18, 337 ADC = 18,
338 CAN1_RX0 = 20, 338 CAN1_RX0 = 20,
339 CAN1_RX1 = 21, 339 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f437vi.rs b/embassy-stm32/src/pac/stm32f437vi.rs
index f3d6048db..395f3c256 100644
--- a/embassy-stm32/src/pac/stm32f437vi.rs
+++ b/embassy-stm32/src/pac/stm32f437vi.rs
@@ -333,7 +333,7 @@ pub mod interrupt {
333 333
334 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 334 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
335 #[allow(non_camel_case_types)] 335 #[allow(non_camel_case_types)]
336 enum InterruptEnum { 336 pub enum InterruptEnum {
337 ADC = 18, 337 ADC = 18,
338 CAN1_RX0 = 20, 338 CAN1_RX0 = 20,
339 CAN1_RX1 = 21, 339 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f437zg.rs b/embassy-stm32/src/pac/stm32f437zg.rs
index 8bdfb2d0d..ab3111b88 100644
--- a/embassy-stm32/src/pac/stm32f437zg.rs
+++ b/embassy-stm32/src/pac/stm32f437zg.rs
@@ -346,7 +346,7 @@ pub mod interrupt {
346 346
347 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 347 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
348 #[allow(non_camel_case_types)] 348 #[allow(non_camel_case_types)]
349 enum InterruptEnum { 349 pub enum InterruptEnum {
350 ADC = 18, 350 ADC = 18,
351 CAN1_RX0 = 20, 351 CAN1_RX0 = 20,
352 CAN1_RX1 = 21, 352 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f437zi.rs b/embassy-stm32/src/pac/stm32f437zi.rs
index 8bdfb2d0d..ab3111b88 100644
--- a/embassy-stm32/src/pac/stm32f437zi.rs
+++ b/embassy-stm32/src/pac/stm32f437zi.rs
@@ -346,7 +346,7 @@ pub mod interrupt {
346 346
347 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 347 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
348 #[allow(non_camel_case_types)] 348 #[allow(non_camel_case_types)]
349 enum InterruptEnum { 349 pub enum InterruptEnum {
350 ADC = 18, 350 ADC = 18,
351 CAN1_RX0 = 20, 351 CAN1_RX0 = 20,
352 CAN1_RX1 = 21, 352 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f439ai.rs b/embassy-stm32/src/pac/stm32f439ai.rs
index cd06ea3a6..d67721245 100644
--- a/embassy-stm32/src/pac/stm32f439ai.rs
+++ b/embassy-stm32/src/pac/stm32f439ai.rs
@@ -341,7 +341,7 @@ pub mod interrupt {
341 341
342 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 342 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
343 #[allow(non_camel_case_types)] 343 #[allow(non_camel_case_types)]
344 enum InterruptEnum { 344 pub enum InterruptEnum {
345 ADC = 18, 345 ADC = 18,
346 CAN1_RX0 = 20, 346 CAN1_RX0 = 20,
347 CAN1_RX1 = 21, 347 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f439bg.rs b/embassy-stm32/src/pac/stm32f439bg.rs
index 5a0019b3b..b0d6fa7d8 100644
--- a/embassy-stm32/src/pac/stm32f439bg.rs
+++ b/embassy-stm32/src/pac/stm32f439bg.rs
@@ -346,7 +346,7 @@ pub mod interrupt {
346 346
347 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 347 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
348 #[allow(non_camel_case_types)] 348 #[allow(non_camel_case_types)]
349 enum InterruptEnum { 349 pub enum InterruptEnum {
350 ADC = 18, 350 ADC = 18,
351 CAN1_RX0 = 20, 351 CAN1_RX0 = 20,
352 CAN1_RX1 = 21, 352 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f439bi.rs b/embassy-stm32/src/pac/stm32f439bi.rs
index 5a0019b3b..b0d6fa7d8 100644
--- a/embassy-stm32/src/pac/stm32f439bi.rs
+++ b/embassy-stm32/src/pac/stm32f439bi.rs
@@ -346,7 +346,7 @@ pub mod interrupt {
346 346
347 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 347 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
348 #[allow(non_camel_case_types)] 348 #[allow(non_camel_case_types)]
349 enum InterruptEnum { 349 pub enum InterruptEnum {
350 ADC = 18, 350 ADC = 18,
351 CAN1_RX0 = 20, 351 CAN1_RX0 = 20,
352 CAN1_RX1 = 21, 352 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f439ig.rs b/embassy-stm32/src/pac/stm32f439ig.rs
index 5a0019b3b..b0d6fa7d8 100644
--- a/embassy-stm32/src/pac/stm32f439ig.rs
+++ b/embassy-stm32/src/pac/stm32f439ig.rs
@@ -346,7 +346,7 @@ pub mod interrupt {
346 346
347 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 347 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
348 #[allow(non_camel_case_types)] 348 #[allow(non_camel_case_types)]
349 enum InterruptEnum { 349 pub enum InterruptEnum {
350 ADC = 18, 350 ADC = 18,
351 CAN1_RX0 = 20, 351 CAN1_RX0 = 20,
352 CAN1_RX1 = 21, 352 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f439ii.rs b/embassy-stm32/src/pac/stm32f439ii.rs
index 5a0019b3b..b0d6fa7d8 100644
--- a/embassy-stm32/src/pac/stm32f439ii.rs
+++ b/embassy-stm32/src/pac/stm32f439ii.rs
@@ -346,7 +346,7 @@ pub mod interrupt {
346 346
347 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 347 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
348 #[allow(non_camel_case_types)] 348 #[allow(non_camel_case_types)]
349 enum InterruptEnum { 349 pub enum InterruptEnum {
350 ADC = 18, 350 ADC = 18,
351 CAN1_RX0 = 20, 351 CAN1_RX0 = 20,
352 CAN1_RX1 = 21, 352 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f439ng.rs b/embassy-stm32/src/pac/stm32f439ng.rs
index 5a0019b3b..b0d6fa7d8 100644
--- a/embassy-stm32/src/pac/stm32f439ng.rs
+++ b/embassy-stm32/src/pac/stm32f439ng.rs
@@ -346,7 +346,7 @@ pub mod interrupt {
346 346
347 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 347 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
348 #[allow(non_camel_case_types)] 348 #[allow(non_camel_case_types)]
349 enum InterruptEnum { 349 pub enum InterruptEnum {
350 ADC = 18, 350 ADC = 18,
351 CAN1_RX0 = 20, 351 CAN1_RX0 = 20,
352 CAN1_RX1 = 21, 352 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f439ni.rs b/embassy-stm32/src/pac/stm32f439ni.rs
index 5a0019b3b..b0d6fa7d8 100644
--- a/embassy-stm32/src/pac/stm32f439ni.rs
+++ b/embassy-stm32/src/pac/stm32f439ni.rs
@@ -346,7 +346,7 @@ pub mod interrupt {
346 346
347 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 347 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
348 #[allow(non_camel_case_types)] 348 #[allow(non_camel_case_types)]
349 enum InterruptEnum { 349 pub enum InterruptEnum {
350 ADC = 18, 350 ADC = 18,
351 CAN1_RX0 = 20, 351 CAN1_RX0 = 20,
352 CAN1_RX1 = 21, 352 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f439vg.rs b/embassy-stm32/src/pac/stm32f439vg.rs
index 15642387b..037f67b9f 100644
--- a/embassy-stm32/src/pac/stm32f439vg.rs
+++ b/embassy-stm32/src/pac/stm32f439vg.rs
@@ -333,7 +333,7 @@ pub mod interrupt {
333 333
334 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 334 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
335 #[allow(non_camel_case_types)] 335 #[allow(non_camel_case_types)]
336 enum InterruptEnum { 336 pub enum InterruptEnum {
337 ADC = 18, 337 ADC = 18,
338 CAN1_RX0 = 20, 338 CAN1_RX0 = 20,
339 CAN1_RX1 = 21, 339 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f439vi.rs b/embassy-stm32/src/pac/stm32f439vi.rs
index 15642387b..037f67b9f 100644
--- a/embassy-stm32/src/pac/stm32f439vi.rs
+++ b/embassy-stm32/src/pac/stm32f439vi.rs
@@ -333,7 +333,7 @@ pub mod interrupt {
333 333
334 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 334 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
335 #[allow(non_camel_case_types)] 335 #[allow(non_camel_case_types)]
336 enum InterruptEnum { 336 pub enum InterruptEnum {
337 ADC = 18, 337 ADC = 18,
338 CAN1_RX0 = 20, 338 CAN1_RX0 = 20,
339 CAN1_RX1 = 21, 339 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f439zg.rs b/embassy-stm32/src/pac/stm32f439zg.rs
index 5a0019b3b..b0d6fa7d8 100644
--- a/embassy-stm32/src/pac/stm32f439zg.rs
+++ b/embassy-stm32/src/pac/stm32f439zg.rs
@@ -346,7 +346,7 @@ pub mod interrupt {
346 346
347 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 347 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
348 #[allow(non_camel_case_types)] 348 #[allow(non_camel_case_types)]
349 enum InterruptEnum { 349 pub enum InterruptEnum {
350 ADC = 18, 350 ADC = 18,
351 CAN1_RX0 = 20, 351 CAN1_RX0 = 20,
352 CAN1_RX1 = 21, 352 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f439zi.rs b/embassy-stm32/src/pac/stm32f439zi.rs
index 5a0019b3b..b0d6fa7d8 100644
--- a/embassy-stm32/src/pac/stm32f439zi.rs
+++ b/embassy-stm32/src/pac/stm32f439zi.rs
@@ -346,7 +346,7 @@ pub mod interrupt {
346 346
347 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 347 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
348 #[allow(non_camel_case_types)] 348 #[allow(non_camel_case_types)]
349 enum InterruptEnum { 349 pub enum InterruptEnum {
350 ADC = 18, 350 ADC = 18,
351 CAN1_RX0 = 20, 351 CAN1_RX0 = 20,
352 CAN1_RX1 = 21, 352 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f446mc.rs b/embassy-stm32/src/pac/stm32f446mc.rs
index 349fc72e1..9fe1c27c4 100644
--- a/embassy-stm32/src/pac/stm32f446mc.rs
+++ b/embassy-stm32/src/pac/stm32f446mc.rs
@@ -285,7 +285,7 @@ pub mod interrupt {
285 285
286 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 286 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
287 #[allow(non_camel_case_types)] 287 #[allow(non_camel_case_types)]
288 enum InterruptEnum { 288 pub enum InterruptEnum {
289 ADC = 18, 289 ADC = 18,
290 CAN1_RX0 = 20, 290 CAN1_RX0 = 20,
291 CAN1_RX1 = 21, 291 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f446me.rs b/embassy-stm32/src/pac/stm32f446me.rs
index 349fc72e1..9fe1c27c4 100644
--- a/embassy-stm32/src/pac/stm32f446me.rs
+++ b/embassy-stm32/src/pac/stm32f446me.rs
@@ -285,7 +285,7 @@ pub mod interrupt {
285 285
286 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 286 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
287 #[allow(non_camel_case_types)] 287 #[allow(non_camel_case_types)]
288 enum InterruptEnum { 288 pub enum InterruptEnum {
289 ADC = 18, 289 ADC = 18,
290 CAN1_RX0 = 20, 290 CAN1_RX0 = 20,
291 CAN1_RX1 = 21, 291 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f446rc.rs b/embassy-stm32/src/pac/stm32f446rc.rs
index 84c114821..87913b052 100644
--- a/embassy-stm32/src/pac/stm32f446rc.rs
+++ b/embassy-stm32/src/pac/stm32f446rc.rs
@@ -273,7 +273,7 @@ pub mod interrupt {
273 273
274 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 274 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
275 #[allow(non_camel_case_types)] 275 #[allow(non_camel_case_types)]
276 enum InterruptEnum { 276 pub enum InterruptEnum {
277 ADC = 18, 277 ADC = 18,
278 CAN1_RX0 = 20, 278 CAN1_RX0 = 20,
279 CAN1_RX1 = 21, 279 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f446re.rs b/embassy-stm32/src/pac/stm32f446re.rs
index 84c114821..87913b052 100644
--- a/embassy-stm32/src/pac/stm32f446re.rs
+++ b/embassy-stm32/src/pac/stm32f446re.rs
@@ -273,7 +273,7 @@ pub mod interrupt {
273 273
274 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 274 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
275 #[allow(non_camel_case_types)] 275 #[allow(non_camel_case_types)]
276 enum InterruptEnum { 276 pub enum InterruptEnum {
277 ADC = 18, 277 ADC = 18,
278 CAN1_RX0 = 20, 278 CAN1_RX0 = 20,
279 CAN1_RX1 = 21, 279 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f446vc.rs b/embassy-stm32/src/pac/stm32f446vc.rs
index 349fc72e1..9fe1c27c4 100644
--- a/embassy-stm32/src/pac/stm32f446vc.rs
+++ b/embassy-stm32/src/pac/stm32f446vc.rs
@@ -285,7 +285,7 @@ pub mod interrupt {
285 285
286 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 286 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
287 #[allow(non_camel_case_types)] 287 #[allow(non_camel_case_types)]
288 enum InterruptEnum { 288 pub enum InterruptEnum {
289 ADC = 18, 289 ADC = 18,
290 CAN1_RX0 = 20, 290 CAN1_RX0 = 20,
291 CAN1_RX1 = 21, 291 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f446ve.rs b/embassy-stm32/src/pac/stm32f446ve.rs
index 349fc72e1..9fe1c27c4 100644
--- a/embassy-stm32/src/pac/stm32f446ve.rs
+++ b/embassy-stm32/src/pac/stm32f446ve.rs
@@ -285,7 +285,7 @@ pub mod interrupt {
285 285
286 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 286 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
287 #[allow(non_camel_case_types)] 287 #[allow(non_camel_case_types)]
288 enum InterruptEnum { 288 pub enum InterruptEnum {
289 ADC = 18, 289 ADC = 18,
290 CAN1_RX0 = 20, 290 CAN1_RX0 = 20,
291 CAN1_RX1 = 21, 291 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f446zc.rs b/embassy-stm32/src/pac/stm32f446zc.rs
index 349fc72e1..9fe1c27c4 100644
--- a/embassy-stm32/src/pac/stm32f446zc.rs
+++ b/embassy-stm32/src/pac/stm32f446zc.rs
@@ -285,7 +285,7 @@ pub mod interrupt {
285 285
286 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 286 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
287 #[allow(non_camel_case_types)] 287 #[allow(non_camel_case_types)]
288 enum InterruptEnum { 288 pub enum InterruptEnum {
289 ADC = 18, 289 ADC = 18,
290 CAN1_RX0 = 20, 290 CAN1_RX0 = 20,
291 CAN1_RX1 = 21, 291 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f446ze.rs b/embassy-stm32/src/pac/stm32f446ze.rs
index 349fc72e1..9fe1c27c4 100644
--- a/embassy-stm32/src/pac/stm32f446ze.rs
+++ b/embassy-stm32/src/pac/stm32f446ze.rs
@@ -285,7 +285,7 @@ pub mod interrupt {
285 285
286 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 286 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
287 #[allow(non_camel_case_types)] 287 #[allow(non_camel_case_types)]
288 enum InterruptEnum { 288 pub enum InterruptEnum {
289 ADC = 18, 289 ADC = 18,
290 CAN1_RX0 = 20, 290 CAN1_RX0 = 20,
291 CAN1_RX1 = 21, 291 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f469ae.rs b/embassy-stm32/src/pac/stm32f469ae.rs
index c44fd8eee..d3821cf90 100644
--- a/embassy-stm32/src/pac/stm32f469ae.rs
+++ b/embassy-stm32/src/pac/stm32f469ae.rs
@@ -295,7 +295,7 @@ pub mod interrupt {
295 295
296 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 296 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
297 #[allow(non_camel_case_types)] 297 #[allow(non_camel_case_types)]
298 enum InterruptEnum { 298 pub enum InterruptEnum {
299 ADC = 18, 299 ADC = 18,
300 CAN1_RX0 = 20, 300 CAN1_RX0 = 20,
301 CAN1_RX1 = 21, 301 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f469ag.rs b/embassy-stm32/src/pac/stm32f469ag.rs
index c44fd8eee..d3821cf90 100644
--- a/embassy-stm32/src/pac/stm32f469ag.rs
+++ b/embassy-stm32/src/pac/stm32f469ag.rs
@@ -295,7 +295,7 @@ pub mod interrupt {
295 295
296 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 296 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
297 #[allow(non_camel_case_types)] 297 #[allow(non_camel_case_types)]
298 enum InterruptEnum { 298 pub enum InterruptEnum {
299 ADC = 18, 299 ADC = 18,
300 CAN1_RX0 = 20, 300 CAN1_RX0 = 20,
301 CAN1_RX1 = 21, 301 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f469ai.rs b/embassy-stm32/src/pac/stm32f469ai.rs
index c44fd8eee..d3821cf90 100644
--- a/embassy-stm32/src/pac/stm32f469ai.rs
+++ b/embassy-stm32/src/pac/stm32f469ai.rs
@@ -295,7 +295,7 @@ pub mod interrupt {
295 295
296 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 296 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
297 #[allow(non_camel_case_types)] 297 #[allow(non_camel_case_types)]
298 enum InterruptEnum { 298 pub enum InterruptEnum {
299 ADC = 18, 299 ADC = 18,
300 CAN1_RX0 = 20, 300 CAN1_RX0 = 20,
301 CAN1_RX1 = 21, 301 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f469be.rs b/embassy-stm32/src/pac/stm32f469be.rs
index c44fd8eee..d3821cf90 100644
--- a/embassy-stm32/src/pac/stm32f469be.rs
+++ b/embassy-stm32/src/pac/stm32f469be.rs
@@ -295,7 +295,7 @@ pub mod interrupt {
295 295
296 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 296 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
297 #[allow(non_camel_case_types)] 297 #[allow(non_camel_case_types)]
298 enum InterruptEnum { 298 pub enum InterruptEnum {
299 ADC = 18, 299 ADC = 18,
300 CAN1_RX0 = 20, 300 CAN1_RX0 = 20,
301 CAN1_RX1 = 21, 301 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f469bg.rs b/embassy-stm32/src/pac/stm32f469bg.rs
index c44fd8eee..d3821cf90 100644
--- a/embassy-stm32/src/pac/stm32f469bg.rs
+++ b/embassy-stm32/src/pac/stm32f469bg.rs
@@ -295,7 +295,7 @@ pub mod interrupt {
295 295
296 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 296 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
297 #[allow(non_camel_case_types)] 297 #[allow(non_camel_case_types)]
298 enum InterruptEnum { 298 pub enum InterruptEnum {
299 ADC = 18, 299 ADC = 18,
300 CAN1_RX0 = 20, 300 CAN1_RX0 = 20,
301 CAN1_RX1 = 21, 301 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f469bi.rs b/embassy-stm32/src/pac/stm32f469bi.rs
index c44fd8eee..d3821cf90 100644
--- a/embassy-stm32/src/pac/stm32f469bi.rs
+++ b/embassy-stm32/src/pac/stm32f469bi.rs
@@ -295,7 +295,7 @@ pub mod interrupt {
295 295
296 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 296 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
297 #[allow(non_camel_case_types)] 297 #[allow(non_camel_case_types)]
298 enum InterruptEnum { 298 pub enum InterruptEnum {
299 ADC = 18, 299 ADC = 18,
300 CAN1_RX0 = 20, 300 CAN1_RX0 = 20,
301 CAN1_RX1 = 21, 301 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f469ie.rs b/embassy-stm32/src/pac/stm32f469ie.rs
index c44fd8eee..d3821cf90 100644
--- a/embassy-stm32/src/pac/stm32f469ie.rs
+++ b/embassy-stm32/src/pac/stm32f469ie.rs
@@ -295,7 +295,7 @@ pub mod interrupt {
295 295
296 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 296 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
297 #[allow(non_camel_case_types)] 297 #[allow(non_camel_case_types)]
298 enum InterruptEnum { 298 pub enum InterruptEnum {
299 ADC = 18, 299 ADC = 18,
300 CAN1_RX0 = 20, 300 CAN1_RX0 = 20,
301 CAN1_RX1 = 21, 301 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f469ig.rs b/embassy-stm32/src/pac/stm32f469ig.rs
index c44fd8eee..d3821cf90 100644
--- a/embassy-stm32/src/pac/stm32f469ig.rs
+++ b/embassy-stm32/src/pac/stm32f469ig.rs
@@ -295,7 +295,7 @@ pub mod interrupt {
295 295
296 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 296 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
297 #[allow(non_camel_case_types)] 297 #[allow(non_camel_case_types)]
298 enum InterruptEnum { 298 pub enum InterruptEnum {
299 ADC = 18, 299 ADC = 18,
300 CAN1_RX0 = 20, 300 CAN1_RX0 = 20,
301 CAN1_RX1 = 21, 301 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f469ii.rs b/embassy-stm32/src/pac/stm32f469ii.rs
index c44fd8eee..d3821cf90 100644
--- a/embassy-stm32/src/pac/stm32f469ii.rs
+++ b/embassy-stm32/src/pac/stm32f469ii.rs
@@ -295,7 +295,7 @@ pub mod interrupt {
295 295
296 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 296 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
297 #[allow(non_camel_case_types)] 297 #[allow(non_camel_case_types)]
298 enum InterruptEnum { 298 pub enum InterruptEnum {
299 ADC = 18, 299 ADC = 18,
300 CAN1_RX0 = 20, 300 CAN1_RX0 = 20,
301 CAN1_RX1 = 21, 301 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f469ne.rs b/embassy-stm32/src/pac/stm32f469ne.rs
index c44fd8eee..d3821cf90 100644
--- a/embassy-stm32/src/pac/stm32f469ne.rs
+++ b/embassy-stm32/src/pac/stm32f469ne.rs
@@ -295,7 +295,7 @@ pub mod interrupt {
295 295
296 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 296 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
297 #[allow(non_camel_case_types)] 297 #[allow(non_camel_case_types)]
298 enum InterruptEnum { 298 pub enum InterruptEnum {
299 ADC = 18, 299 ADC = 18,
300 CAN1_RX0 = 20, 300 CAN1_RX0 = 20,
301 CAN1_RX1 = 21, 301 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f469ng.rs b/embassy-stm32/src/pac/stm32f469ng.rs
index c44fd8eee..d3821cf90 100644
--- a/embassy-stm32/src/pac/stm32f469ng.rs
+++ b/embassy-stm32/src/pac/stm32f469ng.rs
@@ -295,7 +295,7 @@ pub mod interrupt {
295 295
296 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 296 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
297 #[allow(non_camel_case_types)] 297 #[allow(non_camel_case_types)]
298 enum InterruptEnum { 298 pub enum InterruptEnum {
299 ADC = 18, 299 ADC = 18,
300 CAN1_RX0 = 20, 300 CAN1_RX0 = 20,
301 CAN1_RX1 = 21, 301 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f469ni.rs b/embassy-stm32/src/pac/stm32f469ni.rs
index c44fd8eee..d3821cf90 100644
--- a/embassy-stm32/src/pac/stm32f469ni.rs
+++ b/embassy-stm32/src/pac/stm32f469ni.rs
@@ -295,7 +295,7 @@ pub mod interrupt {
295 295
296 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 296 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
297 #[allow(non_camel_case_types)] 297 #[allow(non_camel_case_types)]
298 enum InterruptEnum { 298 pub enum InterruptEnum {
299 ADC = 18, 299 ADC = 18,
300 CAN1_RX0 = 20, 300 CAN1_RX0 = 20,
301 CAN1_RX1 = 21, 301 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f469ve.rs b/embassy-stm32/src/pac/stm32f469ve.rs
index c44fd8eee..d3821cf90 100644
--- a/embassy-stm32/src/pac/stm32f469ve.rs
+++ b/embassy-stm32/src/pac/stm32f469ve.rs
@@ -295,7 +295,7 @@ pub mod interrupt {
295 295
296 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 296 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
297 #[allow(non_camel_case_types)] 297 #[allow(non_camel_case_types)]
298 enum InterruptEnum { 298 pub enum InterruptEnum {
299 ADC = 18, 299 ADC = 18,
300 CAN1_RX0 = 20, 300 CAN1_RX0 = 20,
301 CAN1_RX1 = 21, 301 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f469vg.rs b/embassy-stm32/src/pac/stm32f469vg.rs
index c44fd8eee..d3821cf90 100644
--- a/embassy-stm32/src/pac/stm32f469vg.rs
+++ b/embassy-stm32/src/pac/stm32f469vg.rs
@@ -295,7 +295,7 @@ pub mod interrupt {
295 295
296 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 296 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
297 #[allow(non_camel_case_types)] 297 #[allow(non_camel_case_types)]
298 enum InterruptEnum { 298 pub enum InterruptEnum {
299 ADC = 18, 299 ADC = 18,
300 CAN1_RX0 = 20, 300 CAN1_RX0 = 20,
301 CAN1_RX1 = 21, 301 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f469vi.rs b/embassy-stm32/src/pac/stm32f469vi.rs
index c44fd8eee..d3821cf90 100644
--- a/embassy-stm32/src/pac/stm32f469vi.rs
+++ b/embassy-stm32/src/pac/stm32f469vi.rs
@@ -295,7 +295,7 @@ pub mod interrupt {
295 295
296 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 296 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
297 #[allow(non_camel_case_types)] 297 #[allow(non_camel_case_types)]
298 enum InterruptEnum { 298 pub enum InterruptEnum {
299 ADC = 18, 299 ADC = 18,
300 CAN1_RX0 = 20, 300 CAN1_RX0 = 20,
301 CAN1_RX1 = 21, 301 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f469ze.rs b/embassy-stm32/src/pac/stm32f469ze.rs
index c44fd8eee..d3821cf90 100644
--- a/embassy-stm32/src/pac/stm32f469ze.rs
+++ b/embassy-stm32/src/pac/stm32f469ze.rs
@@ -295,7 +295,7 @@ pub mod interrupt {
295 295
296 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 296 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
297 #[allow(non_camel_case_types)] 297 #[allow(non_camel_case_types)]
298 enum InterruptEnum { 298 pub enum InterruptEnum {
299 ADC = 18, 299 ADC = 18,
300 CAN1_RX0 = 20, 300 CAN1_RX0 = 20,
301 CAN1_RX1 = 21, 301 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f469zg.rs b/embassy-stm32/src/pac/stm32f469zg.rs
index c44fd8eee..d3821cf90 100644
--- a/embassy-stm32/src/pac/stm32f469zg.rs
+++ b/embassy-stm32/src/pac/stm32f469zg.rs
@@ -295,7 +295,7 @@ pub mod interrupt {
295 295
296 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 296 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
297 #[allow(non_camel_case_types)] 297 #[allow(non_camel_case_types)]
298 enum InterruptEnum { 298 pub enum InterruptEnum {
299 ADC = 18, 299 ADC = 18,
300 CAN1_RX0 = 20, 300 CAN1_RX0 = 20,
301 CAN1_RX1 = 21, 301 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f469zi.rs b/embassy-stm32/src/pac/stm32f469zi.rs
index c44fd8eee..d3821cf90 100644
--- a/embassy-stm32/src/pac/stm32f469zi.rs
+++ b/embassy-stm32/src/pac/stm32f469zi.rs
@@ -295,7 +295,7 @@ pub mod interrupt {
295 295
296 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 296 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
297 #[allow(non_camel_case_types)] 297 #[allow(non_camel_case_types)]
298 enum InterruptEnum { 298 pub enum InterruptEnum {
299 ADC = 18, 299 ADC = 18,
300 CAN1_RX0 = 20, 300 CAN1_RX0 = 20,
301 CAN1_RX1 = 21, 301 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f479ag.rs b/embassy-stm32/src/pac/stm32f479ag.rs
index fbb2b54cc..21c5647de 100644
--- a/embassy-stm32/src/pac/stm32f479ag.rs
+++ b/embassy-stm32/src/pac/stm32f479ag.rs
@@ -295,7 +295,7 @@ pub mod interrupt {
295 295
296 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 296 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
297 #[allow(non_camel_case_types)] 297 #[allow(non_camel_case_types)]
298 enum InterruptEnum { 298 pub enum InterruptEnum {
299 ADC = 18, 299 ADC = 18,
300 CAN1_RX0 = 20, 300 CAN1_RX0 = 20,
301 CAN1_RX1 = 21, 301 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f479ai.rs b/embassy-stm32/src/pac/stm32f479ai.rs
index fbb2b54cc..21c5647de 100644
--- a/embassy-stm32/src/pac/stm32f479ai.rs
+++ b/embassy-stm32/src/pac/stm32f479ai.rs
@@ -295,7 +295,7 @@ pub mod interrupt {
295 295
296 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 296 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
297 #[allow(non_camel_case_types)] 297 #[allow(non_camel_case_types)]
298 enum InterruptEnum { 298 pub enum InterruptEnum {
299 ADC = 18, 299 ADC = 18,
300 CAN1_RX0 = 20, 300 CAN1_RX0 = 20,
301 CAN1_RX1 = 21, 301 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f479bg.rs b/embassy-stm32/src/pac/stm32f479bg.rs
index fbb2b54cc..21c5647de 100644
--- a/embassy-stm32/src/pac/stm32f479bg.rs
+++ b/embassy-stm32/src/pac/stm32f479bg.rs
@@ -295,7 +295,7 @@ pub mod interrupt {
295 295
296 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 296 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
297 #[allow(non_camel_case_types)] 297 #[allow(non_camel_case_types)]
298 enum InterruptEnum { 298 pub enum InterruptEnum {
299 ADC = 18, 299 ADC = 18,
300 CAN1_RX0 = 20, 300 CAN1_RX0 = 20,
301 CAN1_RX1 = 21, 301 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f479bi.rs b/embassy-stm32/src/pac/stm32f479bi.rs
index fbb2b54cc..21c5647de 100644
--- a/embassy-stm32/src/pac/stm32f479bi.rs
+++ b/embassy-stm32/src/pac/stm32f479bi.rs
@@ -295,7 +295,7 @@ pub mod interrupt {
295 295
296 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 296 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
297 #[allow(non_camel_case_types)] 297 #[allow(non_camel_case_types)]
298 enum InterruptEnum { 298 pub enum InterruptEnum {
299 ADC = 18, 299 ADC = 18,
300 CAN1_RX0 = 20, 300 CAN1_RX0 = 20,
301 CAN1_RX1 = 21, 301 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f479ig.rs b/embassy-stm32/src/pac/stm32f479ig.rs
index fbb2b54cc..21c5647de 100644
--- a/embassy-stm32/src/pac/stm32f479ig.rs
+++ b/embassy-stm32/src/pac/stm32f479ig.rs
@@ -295,7 +295,7 @@ pub mod interrupt {
295 295
296 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 296 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
297 #[allow(non_camel_case_types)] 297 #[allow(non_camel_case_types)]
298 enum InterruptEnum { 298 pub enum InterruptEnum {
299 ADC = 18, 299 ADC = 18,
300 CAN1_RX0 = 20, 300 CAN1_RX0 = 20,
301 CAN1_RX1 = 21, 301 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f479ii.rs b/embassy-stm32/src/pac/stm32f479ii.rs
index fbb2b54cc..21c5647de 100644
--- a/embassy-stm32/src/pac/stm32f479ii.rs
+++ b/embassy-stm32/src/pac/stm32f479ii.rs
@@ -295,7 +295,7 @@ pub mod interrupt {
295 295
296 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 296 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
297 #[allow(non_camel_case_types)] 297 #[allow(non_camel_case_types)]
298 enum InterruptEnum { 298 pub enum InterruptEnum {
299 ADC = 18, 299 ADC = 18,
300 CAN1_RX0 = 20, 300 CAN1_RX0 = 20,
301 CAN1_RX1 = 21, 301 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f479ng.rs b/embassy-stm32/src/pac/stm32f479ng.rs
index fbb2b54cc..21c5647de 100644
--- a/embassy-stm32/src/pac/stm32f479ng.rs
+++ b/embassy-stm32/src/pac/stm32f479ng.rs
@@ -295,7 +295,7 @@ pub mod interrupt {
295 295
296 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 296 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
297 #[allow(non_camel_case_types)] 297 #[allow(non_camel_case_types)]
298 enum InterruptEnum { 298 pub enum InterruptEnum {
299 ADC = 18, 299 ADC = 18,
300 CAN1_RX0 = 20, 300 CAN1_RX0 = 20,
301 CAN1_RX1 = 21, 301 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f479ni.rs b/embassy-stm32/src/pac/stm32f479ni.rs
index fbb2b54cc..21c5647de 100644
--- a/embassy-stm32/src/pac/stm32f479ni.rs
+++ b/embassy-stm32/src/pac/stm32f479ni.rs
@@ -295,7 +295,7 @@ pub mod interrupt {
295 295
296 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 296 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
297 #[allow(non_camel_case_types)] 297 #[allow(non_camel_case_types)]
298 enum InterruptEnum { 298 pub enum InterruptEnum {
299 ADC = 18, 299 ADC = 18,
300 CAN1_RX0 = 20, 300 CAN1_RX0 = 20,
301 CAN1_RX1 = 21, 301 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f479vg.rs b/embassy-stm32/src/pac/stm32f479vg.rs
index fbb2b54cc..21c5647de 100644
--- a/embassy-stm32/src/pac/stm32f479vg.rs
+++ b/embassy-stm32/src/pac/stm32f479vg.rs
@@ -295,7 +295,7 @@ pub mod interrupt {
295 295
296 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 296 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
297 #[allow(non_camel_case_types)] 297 #[allow(non_camel_case_types)]
298 enum InterruptEnum { 298 pub enum InterruptEnum {
299 ADC = 18, 299 ADC = 18,
300 CAN1_RX0 = 20, 300 CAN1_RX0 = 20,
301 CAN1_RX1 = 21, 301 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f479vi.rs b/embassy-stm32/src/pac/stm32f479vi.rs
index fbb2b54cc..21c5647de 100644
--- a/embassy-stm32/src/pac/stm32f479vi.rs
+++ b/embassy-stm32/src/pac/stm32f479vi.rs
@@ -295,7 +295,7 @@ pub mod interrupt {
295 295
296 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 296 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
297 #[allow(non_camel_case_types)] 297 #[allow(non_camel_case_types)]
298 enum InterruptEnum { 298 pub enum InterruptEnum {
299 ADC = 18, 299 ADC = 18,
300 CAN1_RX0 = 20, 300 CAN1_RX0 = 20,
301 CAN1_RX1 = 21, 301 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f479zg.rs b/embassy-stm32/src/pac/stm32f479zg.rs
index fbb2b54cc..21c5647de 100644
--- a/embassy-stm32/src/pac/stm32f479zg.rs
+++ b/embassy-stm32/src/pac/stm32f479zg.rs
@@ -295,7 +295,7 @@ pub mod interrupt {
295 295
296 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 296 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
297 #[allow(non_camel_case_types)] 297 #[allow(non_camel_case_types)]
298 enum InterruptEnum { 298 pub enum InterruptEnum {
299 ADC = 18, 299 ADC = 18,
300 CAN1_RX0 = 20, 300 CAN1_RX0 = 20,
301 CAN1_RX1 = 21, 301 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32f479zi.rs b/embassy-stm32/src/pac/stm32f479zi.rs
index fbb2b54cc..21c5647de 100644
--- a/embassy-stm32/src/pac/stm32f479zi.rs
+++ b/embassy-stm32/src/pac/stm32f479zi.rs
@@ -295,7 +295,7 @@ pub mod interrupt {
295 295
296 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 296 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
297 #[allow(non_camel_case_types)] 297 #[allow(non_camel_case_types)]
298 enum InterruptEnum { 298 pub enum InterruptEnum {
299 ADC = 18, 299 ADC = 18,
300 CAN1_RX0 = 20, 300 CAN1_RX0 = 20,
301 CAN1_RX1 = 21, 301 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32h723ve.rs b/embassy-stm32/src/pac/stm32h723ve.rs
index 020adb15d..91eec1f84 100644
--- a/embassy-stm32/src/pac/stm32h723ve.rs
+++ b/embassy-stm32/src/pac/stm32h723ve.rs
@@ -179,7 +179,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
179pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 179pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
180impl_rng!(RNG); 180impl_rng!(RNG);
181pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 181pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
182impl_sdmmc!(SDMMC1, 0x52007000); 182impl_sdmmc!(SDMMC1);
183impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12); 183impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12);
184impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 184impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
185impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 185impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
@@ -192,7 +192,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
192impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 192impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
193impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 193impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
194pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 194pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
195impl_sdmmc!(SDMMC2, 0x48022400); 195impl_sdmmc!(SDMMC2);
196impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9); 196impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9);
197impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 197impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
198impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 198impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
@@ -241,7 +241,7 @@ pub mod interrupt {
241 241
242 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 242 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
243 #[allow(non_camel_case_types)] 243 #[allow(non_camel_case_types)]
244 enum InterruptEnum { 244 pub enum InterruptEnum {
245 ADC = 18, 245 ADC = 18,
246 ADC3 = 127, 246 ADC3 = 127,
247 BDMA_Channel0 = 129, 247 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h723vg.rs b/embassy-stm32/src/pac/stm32h723vg.rs
index 020adb15d..91eec1f84 100644
--- a/embassy-stm32/src/pac/stm32h723vg.rs
+++ b/embassy-stm32/src/pac/stm32h723vg.rs
@@ -179,7 +179,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
179pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 179pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
180impl_rng!(RNG); 180impl_rng!(RNG);
181pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 181pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
182impl_sdmmc!(SDMMC1, 0x52007000); 182impl_sdmmc!(SDMMC1);
183impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12); 183impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12);
184impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 184impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
185impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 185impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
@@ -192,7 +192,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
192impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 192impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
193impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 193impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
194pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 194pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
195impl_sdmmc!(SDMMC2, 0x48022400); 195impl_sdmmc!(SDMMC2);
196impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9); 196impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9);
197impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 197impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
198impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 198impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
@@ -241,7 +241,7 @@ pub mod interrupt {
241 241
242 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 242 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
243 #[allow(non_camel_case_types)] 243 #[allow(non_camel_case_types)]
244 enum InterruptEnum { 244 pub enum InterruptEnum {
245 ADC = 18, 245 ADC = 18,
246 ADC3 = 127, 246 ADC3 = 127,
247 BDMA_Channel0 = 129, 247 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h723ze.rs b/embassy-stm32/src/pac/stm32h723ze.rs
index 020adb15d..91eec1f84 100644
--- a/embassy-stm32/src/pac/stm32h723ze.rs
+++ b/embassy-stm32/src/pac/stm32h723ze.rs
@@ -179,7 +179,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
179pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 179pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
180impl_rng!(RNG); 180impl_rng!(RNG);
181pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 181pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
182impl_sdmmc!(SDMMC1, 0x52007000); 182impl_sdmmc!(SDMMC1);
183impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12); 183impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12);
184impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 184impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
185impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 185impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
@@ -192,7 +192,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
192impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 192impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
193impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 193impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
194pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 194pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
195impl_sdmmc!(SDMMC2, 0x48022400); 195impl_sdmmc!(SDMMC2);
196impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9); 196impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9);
197impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 197impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
198impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 198impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
@@ -241,7 +241,7 @@ pub mod interrupt {
241 241
242 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 242 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
243 #[allow(non_camel_case_types)] 243 #[allow(non_camel_case_types)]
244 enum InterruptEnum { 244 pub enum InterruptEnum {
245 ADC = 18, 245 ADC = 18,
246 ADC3 = 127, 246 ADC3 = 127,
247 BDMA_Channel0 = 129, 247 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h723zg.rs b/embassy-stm32/src/pac/stm32h723zg.rs
index 020adb15d..91eec1f84 100644
--- a/embassy-stm32/src/pac/stm32h723zg.rs
+++ b/embassy-stm32/src/pac/stm32h723zg.rs
@@ -179,7 +179,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
179pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 179pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
180impl_rng!(RNG); 180impl_rng!(RNG);
181pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 181pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
182impl_sdmmc!(SDMMC1, 0x52007000); 182impl_sdmmc!(SDMMC1);
183impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12); 183impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12);
184impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 184impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
185impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 185impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
@@ -192,7 +192,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
192impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 192impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
193impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 193impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
194pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 194pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
195impl_sdmmc!(SDMMC2, 0x48022400); 195impl_sdmmc!(SDMMC2);
196impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9); 196impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9);
197impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 197impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
198impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 198impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
@@ -241,7 +241,7 @@ pub mod interrupt {
241 241
242 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 242 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
243 #[allow(non_camel_case_types)] 243 #[allow(non_camel_case_types)]
244 enum InterruptEnum { 244 pub enum InterruptEnum {
245 ADC = 18, 245 ADC = 18,
246 ADC3 = 127, 246 ADC3 = 127,
247 BDMA_Channel0 = 129, 247 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h725ae.rs b/embassy-stm32/src/pac/stm32h725ae.rs
index 020adb15d..91eec1f84 100644
--- a/embassy-stm32/src/pac/stm32h725ae.rs
+++ b/embassy-stm32/src/pac/stm32h725ae.rs
@@ -179,7 +179,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
179pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 179pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
180impl_rng!(RNG); 180impl_rng!(RNG);
181pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 181pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
182impl_sdmmc!(SDMMC1, 0x52007000); 182impl_sdmmc!(SDMMC1);
183impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12); 183impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12);
184impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 184impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
185impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 185impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
@@ -192,7 +192,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
192impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 192impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
193impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 193impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
194pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 194pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
195impl_sdmmc!(SDMMC2, 0x48022400); 195impl_sdmmc!(SDMMC2);
196impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9); 196impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9);
197impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 197impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
198impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 198impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
@@ -241,7 +241,7 @@ pub mod interrupt {
241 241
242 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 242 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
243 #[allow(non_camel_case_types)] 243 #[allow(non_camel_case_types)]
244 enum InterruptEnum { 244 pub enum InterruptEnum {
245 ADC = 18, 245 ADC = 18,
246 ADC3 = 127, 246 ADC3 = 127,
247 BDMA_Channel0 = 129, 247 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h725ag.rs b/embassy-stm32/src/pac/stm32h725ag.rs
index 020adb15d..91eec1f84 100644
--- a/embassy-stm32/src/pac/stm32h725ag.rs
+++ b/embassy-stm32/src/pac/stm32h725ag.rs
@@ -179,7 +179,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
179pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 179pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
180impl_rng!(RNG); 180impl_rng!(RNG);
181pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 181pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
182impl_sdmmc!(SDMMC1, 0x52007000); 182impl_sdmmc!(SDMMC1);
183impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12); 183impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12);
184impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 184impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
185impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 185impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
@@ -192,7 +192,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
192impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 192impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
193impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 193impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
194pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 194pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
195impl_sdmmc!(SDMMC2, 0x48022400); 195impl_sdmmc!(SDMMC2);
196impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9); 196impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9);
197impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 197impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
198impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 198impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
@@ -241,7 +241,7 @@ pub mod interrupt {
241 241
242 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 242 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
243 #[allow(non_camel_case_types)] 243 #[allow(non_camel_case_types)]
244 enum InterruptEnum { 244 pub enum InterruptEnum {
245 ADC = 18, 245 ADC = 18,
246 ADC3 = 127, 246 ADC3 = 127,
247 BDMA_Channel0 = 129, 247 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h725ie.rs b/embassy-stm32/src/pac/stm32h725ie.rs
index 020adb15d..91eec1f84 100644
--- a/embassy-stm32/src/pac/stm32h725ie.rs
+++ b/embassy-stm32/src/pac/stm32h725ie.rs
@@ -179,7 +179,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
179pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 179pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
180impl_rng!(RNG); 180impl_rng!(RNG);
181pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 181pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
182impl_sdmmc!(SDMMC1, 0x52007000); 182impl_sdmmc!(SDMMC1);
183impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12); 183impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12);
184impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 184impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
185impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 185impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
@@ -192,7 +192,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
192impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 192impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
193impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 193impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
194pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 194pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
195impl_sdmmc!(SDMMC2, 0x48022400); 195impl_sdmmc!(SDMMC2);
196impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9); 196impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9);
197impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 197impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
198impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 198impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
@@ -241,7 +241,7 @@ pub mod interrupt {
241 241
242 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 242 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
243 #[allow(non_camel_case_types)] 243 #[allow(non_camel_case_types)]
244 enum InterruptEnum { 244 pub enum InterruptEnum {
245 ADC = 18, 245 ADC = 18,
246 ADC3 = 127, 246 ADC3 = 127,
247 BDMA_Channel0 = 129, 247 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h725ig.rs b/embassy-stm32/src/pac/stm32h725ig.rs
index 020adb15d..91eec1f84 100644
--- a/embassy-stm32/src/pac/stm32h725ig.rs
+++ b/embassy-stm32/src/pac/stm32h725ig.rs
@@ -179,7 +179,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
179pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 179pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
180impl_rng!(RNG); 180impl_rng!(RNG);
181pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 181pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
182impl_sdmmc!(SDMMC1, 0x52007000); 182impl_sdmmc!(SDMMC1);
183impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12); 183impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12);
184impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 184impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
185impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 185impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
@@ -192,7 +192,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
192impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 192impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
193impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 193impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
194pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 194pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
195impl_sdmmc!(SDMMC2, 0x48022400); 195impl_sdmmc!(SDMMC2);
196impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9); 196impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9);
197impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 197impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
198impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 198impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
@@ -241,7 +241,7 @@ pub mod interrupt {
241 241
242 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 242 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
243 #[allow(non_camel_case_types)] 243 #[allow(non_camel_case_types)]
244 enum InterruptEnum { 244 pub enum InterruptEnum {
245 ADC = 18, 245 ADC = 18,
246 ADC3 = 127, 246 ADC3 = 127,
247 BDMA_Channel0 = 129, 247 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h725re.rs b/embassy-stm32/src/pac/stm32h725re.rs
index 020adb15d..91eec1f84 100644
--- a/embassy-stm32/src/pac/stm32h725re.rs
+++ b/embassy-stm32/src/pac/stm32h725re.rs
@@ -179,7 +179,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
179pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 179pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
180impl_rng!(RNG); 180impl_rng!(RNG);
181pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 181pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
182impl_sdmmc!(SDMMC1, 0x52007000); 182impl_sdmmc!(SDMMC1);
183impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12); 183impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12);
184impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 184impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
185impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 185impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
@@ -192,7 +192,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
192impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 192impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
193impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 193impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
194pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 194pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
195impl_sdmmc!(SDMMC2, 0x48022400); 195impl_sdmmc!(SDMMC2);
196impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9); 196impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9);
197impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 197impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
198impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 198impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
@@ -241,7 +241,7 @@ pub mod interrupt {
241 241
242 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 242 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
243 #[allow(non_camel_case_types)] 243 #[allow(non_camel_case_types)]
244 enum InterruptEnum { 244 pub enum InterruptEnum {
245 ADC = 18, 245 ADC = 18,
246 ADC3 = 127, 246 ADC3 = 127,
247 BDMA_Channel0 = 129, 247 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h725rg.rs b/embassy-stm32/src/pac/stm32h725rg.rs
index 020adb15d..91eec1f84 100644
--- a/embassy-stm32/src/pac/stm32h725rg.rs
+++ b/embassy-stm32/src/pac/stm32h725rg.rs
@@ -179,7 +179,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
179pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 179pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
180impl_rng!(RNG); 180impl_rng!(RNG);
181pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 181pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
182impl_sdmmc!(SDMMC1, 0x52007000); 182impl_sdmmc!(SDMMC1);
183impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12); 183impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12);
184impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 184impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
185impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 185impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
@@ -192,7 +192,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
192impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 192impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
193impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 193impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
194pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 194pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
195impl_sdmmc!(SDMMC2, 0x48022400); 195impl_sdmmc!(SDMMC2);
196impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9); 196impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9);
197impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 197impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
198impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 198impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
@@ -241,7 +241,7 @@ pub mod interrupt {
241 241
242 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 242 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
243 #[allow(non_camel_case_types)] 243 #[allow(non_camel_case_types)]
244 enum InterruptEnum { 244 pub enum InterruptEnum {
245 ADC = 18, 245 ADC = 18,
246 ADC3 = 127, 246 ADC3 = 127,
247 BDMA_Channel0 = 129, 247 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h725ve.rs b/embassy-stm32/src/pac/stm32h725ve.rs
index 020adb15d..91eec1f84 100644
--- a/embassy-stm32/src/pac/stm32h725ve.rs
+++ b/embassy-stm32/src/pac/stm32h725ve.rs
@@ -179,7 +179,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
179pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 179pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
180impl_rng!(RNG); 180impl_rng!(RNG);
181pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 181pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
182impl_sdmmc!(SDMMC1, 0x52007000); 182impl_sdmmc!(SDMMC1);
183impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12); 183impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12);
184impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 184impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
185impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 185impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
@@ -192,7 +192,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
192impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 192impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
193impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 193impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
194pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 194pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
195impl_sdmmc!(SDMMC2, 0x48022400); 195impl_sdmmc!(SDMMC2);
196impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9); 196impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9);
197impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 197impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
198impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 198impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
@@ -241,7 +241,7 @@ pub mod interrupt {
241 241
242 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 242 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
243 #[allow(non_camel_case_types)] 243 #[allow(non_camel_case_types)]
244 enum InterruptEnum { 244 pub enum InterruptEnum {
245 ADC = 18, 245 ADC = 18,
246 ADC3 = 127, 246 ADC3 = 127,
247 BDMA_Channel0 = 129, 247 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h725vg.rs b/embassy-stm32/src/pac/stm32h725vg.rs
index 020adb15d..91eec1f84 100644
--- a/embassy-stm32/src/pac/stm32h725vg.rs
+++ b/embassy-stm32/src/pac/stm32h725vg.rs
@@ -179,7 +179,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
179pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 179pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
180impl_rng!(RNG); 180impl_rng!(RNG);
181pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 181pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
182impl_sdmmc!(SDMMC1, 0x52007000); 182impl_sdmmc!(SDMMC1);
183impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12); 183impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12);
184impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 184impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
185impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 185impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
@@ -192,7 +192,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
192impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 192impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
193impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 193impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
194pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 194pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
195impl_sdmmc!(SDMMC2, 0x48022400); 195impl_sdmmc!(SDMMC2);
196impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9); 196impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9);
197impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 197impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
198impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 198impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
@@ -241,7 +241,7 @@ pub mod interrupt {
241 241
242 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 242 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
243 #[allow(non_camel_case_types)] 243 #[allow(non_camel_case_types)]
244 enum InterruptEnum { 244 pub enum InterruptEnum {
245 ADC = 18, 245 ADC = 18,
246 ADC3 = 127, 246 ADC3 = 127,
247 BDMA_Channel0 = 129, 247 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h725ze.rs b/embassy-stm32/src/pac/stm32h725ze.rs
index 020adb15d..91eec1f84 100644
--- a/embassy-stm32/src/pac/stm32h725ze.rs
+++ b/embassy-stm32/src/pac/stm32h725ze.rs
@@ -179,7 +179,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
179pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 179pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
180impl_rng!(RNG); 180impl_rng!(RNG);
181pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 181pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
182impl_sdmmc!(SDMMC1, 0x52007000); 182impl_sdmmc!(SDMMC1);
183impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12); 183impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12);
184impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 184impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
185impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 185impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
@@ -192,7 +192,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
192impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 192impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
193impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 193impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
194pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 194pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
195impl_sdmmc!(SDMMC2, 0x48022400); 195impl_sdmmc!(SDMMC2);
196impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9); 196impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9);
197impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 197impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
198impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 198impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
@@ -241,7 +241,7 @@ pub mod interrupt {
241 241
242 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 242 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
243 #[allow(non_camel_case_types)] 243 #[allow(non_camel_case_types)]
244 enum InterruptEnum { 244 pub enum InterruptEnum {
245 ADC = 18, 245 ADC = 18,
246 ADC3 = 127, 246 ADC3 = 127,
247 BDMA_Channel0 = 129, 247 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h725zg.rs b/embassy-stm32/src/pac/stm32h725zg.rs
index 020adb15d..91eec1f84 100644
--- a/embassy-stm32/src/pac/stm32h725zg.rs
+++ b/embassy-stm32/src/pac/stm32h725zg.rs
@@ -179,7 +179,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
179pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 179pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
180impl_rng!(RNG); 180impl_rng!(RNG);
181pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 181pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
182impl_sdmmc!(SDMMC1, 0x52007000); 182impl_sdmmc!(SDMMC1);
183impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12); 183impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12);
184impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 184impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
185impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 185impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
@@ -192,7 +192,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
192impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 192impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
193impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 193impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
194pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 194pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
195impl_sdmmc!(SDMMC2, 0x48022400); 195impl_sdmmc!(SDMMC2);
196impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9); 196impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9);
197impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 197impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
198impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 198impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
@@ -241,7 +241,7 @@ pub mod interrupt {
241 241
242 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 242 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
243 #[allow(non_camel_case_types)] 243 #[allow(non_camel_case_types)]
244 enum InterruptEnum { 244 pub enum InterruptEnum {
245 ADC = 18, 245 ADC = 18,
246 ADC3 = 127, 246 ADC3 = 127,
247 BDMA_Channel0 = 129, 247 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h730ab.rs b/embassy-stm32/src/pac/stm32h730ab.rs
index b9d5b3b86..2f2bf2ebf 100644
--- a/embassy-stm32/src/pac/stm32h730ab.rs
+++ b/embassy-stm32/src/pac/stm32h730ab.rs
@@ -179,7 +179,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
179pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 179pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
180impl_rng!(RNG); 180impl_rng!(RNG);
181pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 181pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
182impl_sdmmc!(SDMMC1, 0x52007000); 182impl_sdmmc!(SDMMC1);
183impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12); 183impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12);
184impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 184impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
185impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 185impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
@@ -192,7 +192,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
192impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 192impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
193impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 193impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
194pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 194pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
195impl_sdmmc!(SDMMC2, 0x48022400); 195impl_sdmmc!(SDMMC2);
196impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9); 196impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9);
197impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 197impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
198impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 198impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
@@ -241,7 +241,7 @@ pub mod interrupt {
241 241
242 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 242 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
243 #[allow(non_camel_case_types)] 243 #[allow(non_camel_case_types)]
244 enum InterruptEnum { 244 pub enum InterruptEnum {
245 ADC = 18, 245 ADC = 18,
246 ADC3 = 127, 246 ADC3 = 127,
247 BDMA_Channel0 = 129, 247 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h730ib.rs b/embassy-stm32/src/pac/stm32h730ib.rs
index b9d5b3b86..2f2bf2ebf 100644
--- a/embassy-stm32/src/pac/stm32h730ib.rs
+++ b/embassy-stm32/src/pac/stm32h730ib.rs
@@ -179,7 +179,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
179pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 179pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
180impl_rng!(RNG); 180impl_rng!(RNG);
181pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 181pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
182impl_sdmmc!(SDMMC1, 0x52007000); 182impl_sdmmc!(SDMMC1);
183impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12); 183impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12);
184impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 184impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
185impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 185impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
@@ -192,7 +192,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
192impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 192impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
193impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 193impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
194pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 194pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
195impl_sdmmc!(SDMMC2, 0x48022400); 195impl_sdmmc!(SDMMC2);
196impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9); 196impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9);
197impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 197impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
198impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 198impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
@@ -241,7 +241,7 @@ pub mod interrupt {
241 241
242 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 242 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
243 #[allow(non_camel_case_types)] 243 #[allow(non_camel_case_types)]
244 enum InterruptEnum { 244 pub enum InterruptEnum {
245 ADC = 18, 245 ADC = 18,
246 ADC3 = 127, 246 ADC3 = 127,
247 BDMA_Channel0 = 129, 247 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h730vb.rs b/embassy-stm32/src/pac/stm32h730vb.rs
index b9d5b3b86..2f2bf2ebf 100644
--- a/embassy-stm32/src/pac/stm32h730vb.rs
+++ b/embassy-stm32/src/pac/stm32h730vb.rs
@@ -179,7 +179,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
179pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 179pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
180impl_rng!(RNG); 180impl_rng!(RNG);
181pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 181pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
182impl_sdmmc!(SDMMC1, 0x52007000); 182impl_sdmmc!(SDMMC1);
183impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12); 183impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12);
184impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 184impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
185impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 185impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
@@ -192,7 +192,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
192impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 192impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
193impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 193impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
194pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 194pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
195impl_sdmmc!(SDMMC2, 0x48022400); 195impl_sdmmc!(SDMMC2);
196impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9); 196impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9);
197impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 197impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
198impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 198impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
@@ -241,7 +241,7 @@ pub mod interrupt {
241 241
242 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 242 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
243 #[allow(non_camel_case_types)] 243 #[allow(non_camel_case_types)]
244 enum InterruptEnum { 244 pub enum InterruptEnum {
245 ADC = 18, 245 ADC = 18,
246 ADC3 = 127, 246 ADC3 = 127,
247 BDMA_Channel0 = 129, 247 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h730zb.rs b/embassy-stm32/src/pac/stm32h730zb.rs
index b9d5b3b86..2f2bf2ebf 100644
--- a/embassy-stm32/src/pac/stm32h730zb.rs
+++ b/embassy-stm32/src/pac/stm32h730zb.rs
@@ -179,7 +179,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
179pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 179pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
180impl_rng!(RNG); 180impl_rng!(RNG);
181pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 181pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
182impl_sdmmc!(SDMMC1, 0x52007000); 182impl_sdmmc!(SDMMC1);
183impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12); 183impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12);
184impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 184impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
185impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 185impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
@@ -192,7 +192,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
192impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 192impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
193impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 193impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
194pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 194pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
195impl_sdmmc!(SDMMC2, 0x48022400); 195impl_sdmmc!(SDMMC2);
196impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9); 196impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9);
197impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 197impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
198impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 198impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
@@ -241,7 +241,7 @@ pub mod interrupt {
241 241
242 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 242 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
243 #[allow(non_camel_case_types)] 243 #[allow(non_camel_case_types)]
244 enum InterruptEnum { 244 pub enum InterruptEnum {
245 ADC = 18, 245 ADC = 18,
246 ADC3 = 127, 246 ADC3 = 127,
247 BDMA_Channel0 = 129, 247 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h733vg.rs b/embassy-stm32/src/pac/stm32h733vg.rs
index b9d5b3b86..2f2bf2ebf 100644
--- a/embassy-stm32/src/pac/stm32h733vg.rs
+++ b/embassy-stm32/src/pac/stm32h733vg.rs
@@ -179,7 +179,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
179pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 179pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
180impl_rng!(RNG); 180impl_rng!(RNG);
181pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 181pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
182impl_sdmmc!(SDMMC1, 0x52007000); 182impl_sdmmc!(SDMMC1);
183impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12); 183impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12);
184impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 184impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
185impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 185impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
@@ -192,7 +192,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
192impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 192impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
193impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 193impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
194pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 194pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
195impl_sdmmc!(SDMMC2, 0x48022400); 195impl_sdmmc!(SDMMC2);
196impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9); 196impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9);
197impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 197impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
198impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 198impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
@@ -241,7 +241,7 @@ pub mod interrupt {
241 241
242 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 242 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
243 #[allow(non_camel_case_types)] 243 #[allow(non_camel_case_types)]
244 enum InterruptEnum { 244 pub enum InterruptEnum {
245 ADC = 18, 245 ADC = 18,
246 ADC3 = 127, 246 ADC3 = 127,
247 BDMA_Channel0 = 129, 247 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h733zg.rs b/embassy-stm32/src/pac/stm32h733zg.rs
index b9d5b3b86..2f2bf2ebf 100644
--- a/embassy-stm32/src/pac/stm32h733zg.rs
+++ b/embassy-stm32/src/pac/stm32h733zg.rs
@@ -179,7 +179,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
179pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 179pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
180impl_rng!(RNG); 180impl_rng!(RNG);
181pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 181pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
182impl_sdmmc!(SDMMC1, 0x52007000); 182impl_sdmmc!(SDMMC1);
183impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12); 183impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12);
184impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 184impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
185impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 185impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
@@ -192,7 +192,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
192impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 192impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
193impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 193impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
194pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 194pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
195impl_sdmmc!(SDMMC2, 0x48022400); 195impl_sdmmc!(SDMMC2);
196impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9); 196impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9);
197impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 197impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
198impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 198impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
@@ -241,7 +241,7 @@ pub mod interrupt {
241 241
242 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 242 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
243 #[allow(non_camel_case_types)] 243 #[allow(non_camel_case_types)]
244 enum InterruptEnum { 244 pub enum InterruptEnum {
245 ADC = 18, 245 ADC = 18,
246 ADC3 = 127, 246 ADC3 = 127,
247 BDMA_Channel0 = 129, 247 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h735ag.rs b/embassy-stm32/src/pac/stm32h735ag.rs
index b9d5b3b86..2f2bf2ebf 100644
--- a/embassy-stm32/src/pac/stm32h735ag.rs
+++ b/embassy-stm32/src/pac/stm32h735ag.rs
@@ -179,7 +179,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
179pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 179pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
180impl_rng!(RNG); 180impl_rng!(RNG);
181pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 181pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
182impl_sdmmc!(SDMMC1, 0x52007000); 182impl_sdmmc!(SDMMC1);
183impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12); 183impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12);
184impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 184impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
185impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 185impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
@@ -192,7 +192,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
192impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 192impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
193impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 193impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
194pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 194pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
195impl_sdmmc!(SDMMC2, 0x48022400); 195impl_sdmmc!(SDMMC2);
196impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9); 196impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9);
197impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 197impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
198impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 198impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
@@ -241,7 +241,7 @@ pub mod interrupt {
241 241
242 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 242 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
243 #[allow(non_camel_case_types)] 243 #[allow(non_camel_case_types)]
244 enum InterruptEnum { 244 pub enum InterruptEnum {
245 ADC = 18, 245 ADC = 18,
246 ADC3 = 127, 246 ADC3 = 127,
247 BDMA_Channel0 = 129, 247 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h735ig.rs b/embassy-stm32/src/pac/stm32h735ig.rs
index b9d5b3b86..2f2bf2ebf 100644
--- a/embassy-stm32/src/pac/stm32h735ig.rs
+++ b/embassy-stm32/src/pac/stm32h735ig.rs
@@ -179,7 +179,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
179pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 179pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
180impl_rng!(RNG); 180impl_rng!(RNG);
181pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 181pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
182impl_sdmmc!(SDMMC1, 0x52007000); 182impl_sdmmc!(SDMMC1);
183impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12); 183impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12);
184impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 184impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
185impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 185impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
@@ -192,7 +192,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
192impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 192impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
193impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 193impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
194pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 194pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
195impl_sdmmc!(SDMMC2, 0x48022400); 195impl_sdmmc!(SDMMC2);
196impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9); 196impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9);
197impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 197impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
198impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 198impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
@@ -241,7 +241,7 @@ pub mod interrupt {
241 241
242 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 242 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
243 #[allow(non_camel_case_types)] 243 #[allow(non_camel_case_types)]
244 enum InterruptEnum { 244 pub enum InterruptEnum {
245 ADC = 18, 245 ADC = 18,
246 ADC3 = 127, 246 ADC3 = 127,
247 BDMA_Channel0 = 129, 247 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h735rg.rs b/embassy-stm32/src/pac/stm32h735rg.rs
index b9d5b3b86..2f2bf2ebf 100644
--- a/embassy-stm32/src/pac/stm32h735rg.rs
+++ b/embassy-stm32/src/pac/stm32h735rg.rs
@@ -179,7 +179,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
179pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 179pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
180impl_rng!(RNG); 180impl_rng!(RNG);
181pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 181pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
182impl_sdmmc!(SDMMC1, 0x52007000); 182impl_sdmmc!(SDMMC1);
183impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12); 183impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12);
184impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 184impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
185impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 185impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
@@ -192,7 +192,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
192impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 192impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
193impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 193impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
194pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 194pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
195impl_sdmmc!(SDMMC2, 0x48022400); 195impl_sdmmc!(SDMMC2);
196impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9); 196impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9);
197impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 197impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
198impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 198impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
@@ -241,7 +241,7 @@ pub mod interrupt {
241 241
242 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 242 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
243 #[allow(non_camel_case_types)] 243 #[allow(non_camel_case_types)]
244 enum InterruptEnum { 244 pub enum InterruptEnum {
245 ADC = 18, 245 ADC = 18,
246 ADC3 = 127, 246 ADC3 = 127,
247 BDMA_Channel0 = 129, 247 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h735vg.rs b/embassy-stm32/src/pac/stm32h735vg.rs
index b9d5b3b86..2f2bf2ebf 100644
--- a/embassy-stm32/src/pac/stm32h735vg.rs
+++ b/embassy-stm32/src/pac/stm32h735vg.rs
@@ -179,7 +179,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
179pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 179pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
180impl_rng!(RNG); 180impl_rng!(RNG);
181pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 181pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
182impl_sdmmc!(SDMMC1, 0x52007000); 182impl_sdmmc!(SDMMC1);
183impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12); 183impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12);
184impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 184impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
185impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 185impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
@@ -192,7 +192,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
192impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 192impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
193impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 193impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
194pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 194pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
195impl_sdmmc!(SDMMC2, 0x48022400); 195impl_sdmmc!(SDMMC2);
196impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9); 196impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9);
197impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 197impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
198impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 198impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
@@ -241,7 +241,7 @@ pub mod interrupt {
241 241
242 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 242 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
243 #[allow(non_camel_case_types)] 243 #[allow(non_camel_case_types)]
244 enum InterruptEnum { 244 pub enum InterruptEnum {
245 ADC = 18, 245 ADC = 18,
246 ADC3 = 127, 246 ADC3 = 127,
247 BDMA_Channel0 = 129, 247 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h735zg.rs b/embassy-stm32/src/pac/stm32h735zg.rs
index b9d5b3b86..2f2bf2ebf 100644
--- a/embassy-stm32/src/pac/stm32h735zg.rs
+++ b/embassy-stm32/src/pac/stm32h735zg.rs
@@ -179,7 +179,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
179pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 179pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
180impl_rng!(RNG); 180impl_rng!(RNG);
181pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 181pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
182impl_sdmmc!(SDMMC1, 0x52007000); 182impl_sdmmc!(SDMMC1);
183impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12); 183impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12);
184impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 184impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
185impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 185impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
@@ -192,7 +192,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
192impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 192impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
193impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 193impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
194pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 194pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
195impl_sdmmc!(SDMMC2, 0x48022400); 195impl_sdmmc!(SDMMC2);
196impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9); 196impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9);
197impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 197impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
198impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 198impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
@@ -241,7 +241,7 @@ pub mod interrupt {
241 241
242 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 242 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
243 #[allow(non_camel_case_types)] 243 #[allow(non_camel_case_types)]
244 enum InterruptEnum { 244 pub enum InterruptEnum {
245 ADC = 18, 245 ADC = 18,
246 ADC3 = 127, 246 ADC3 = 127,
247 BDMA_Channel0 = 129, 247 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h742ag.rs b/embassy-stm32/src/pac/stm32h742ag.rs
index 27e083458..c75cec254 100644
--- a/embassy-stm32/src/pac/stm32h742ag.rs
+++ b/embassy-stm32/src/pac/stm32h742ag.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h742ai.rs b/embassy-stm32/src/pac/stm32h742ai.rs
index 27e083458..c75cec254 100644
--- a/embassy-stm32/src/pac/stm32h742ai.rs
+++ b/embassy-stm32/src/pac/stm32h742ai.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h742bg.rs b/embassy-stm32/src/pac/stm32h742bg.rs
index 27e083458..c75cec254 100644
--- a/embassy-stm32/src/pac/stm32h742bg.rs
+++ b/embassy-stm32/src/pac/stm32h742bg.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h742bi.rs b/embassy-stm32/src/pac/stm32h742bi.rs
index 27e083458..c75cec254 100644
--- a/embassy-stm32/src/pac/stm32h742bi.rs
+++ b/embassy-stm32/src/pac/stm32h742bi.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h742ig.rs b/embassy-stm32/src/pac/stm32h742ig.rs
index 27e083458..c75cec254 100644
--- a/embassy-stm32/src/pac/stm32h742ig.rs
+++ b/embassy-stm32/src/pac/stm32h742ig.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h742ii.rs b/embassy-stm32/src/pac/stm32h742ii.rs
index 27e083458..c75cec254 100644
--- a/embassy-stm32/src/pac/stm32h742ii.rs
+++ b/embassy-stm32/src/pac/stm32h742ii.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h742vg.rs b/embassy-stm32/src/pac/stm32h742vg.rs
index 27e083458..c75cec254 100644
--- a/embassy-stm32/src/pac/stm32h742vg.rs
+++ b/embassy-stm32/src/pac/stm32h742vg.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h742vi.rs b/embassy-stm32/src/pac/stm32h742vi.rs
index 27e083458..c75cec254 100644
--- a/embassy-stm32/src/pac/stm32h742vi.rs
+++ b/embassy-stm32/src/pac/stm32h742vi.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h742xg.rs b/embassy-stm32/src/pac/stm32h742xg.rs
index 27e083458..c75cec254 100644
--- a/embassy-stm32/src/pac/stm32h742xg.rs
+++ b/embassy-stm32/src/pac/stm32h742xg.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h742xi.rs b/embassy-stm32/src/pac/stm32h742xi.rs
index 27e083458..c75cec254 100644
--- a/embassy-stm32/src/pac/stm32h742xi.rs
+++ b/embassy-stm32/src/pac/stm32h742xi.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h742zg.rs b/embassy-stm32/src/pac/stm32h742zg.rs
index 27e083458..c75cec254 100644
--- a/embassy-stm32/src/pac/stm32h742zg.rs
+++ b/embassy-stm32/src/pac/stm32h742zg.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h742zi.rs b/embassy-stm32/src/pac/stm32h742zi.rs
index 27e083458..c75cec254 100644
--- a/embassy-stm32/src/pac/stm32h742zi.rs
+++ b/embassy-stm32/src/pac/stm32h742zi.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h743ag.rs b/embassy-stm32/src/pac/stm32h743ag.rs
index 46665ee58..0e4078d74 100644
--- a/embassy-stm32/src/pac/stm32h743ag.rs
+++ b/embassy-stm32/src/pac/stm32h743ag.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h743ai.rs b/embassy-stm32/src/pac/stm32h743ai.rs
index 46665ee58..0e4078d74 100644
--- a/embassy-stm32/src/pac/stm32h743ai.rs
+++ b/embassy-stm32/src/pac/stm32h743ai.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h743bg.rs b/embassy-stm32/src/pac/stm32h743bg.rs
index 46665ee58..0e4078d74 100644
--- a/embassy-stm32/src/pac/stm32h743bg.rs
+++ b/embassy-stm32/src/pac/stm32h743bg.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h743bi.rs b/embassy-stm32/src/pac/stm32h743bi.rs
index 46665ee58..0e4078d74 100644
--- a/embassy-stm32/src/pac/stm32h743bi.rs
+++ b/embassy-stm32/src/pac/stm32h743bi.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h743ig.rs b/embassy-stm32/src/pac/stm32h743ig.rs
index 46665ee58..0e4078d74 100644
--- a/embassy-stm32/src/pac/stm32h743ig.rs
+++ b/embassy-stm32/src/pac/stm32h743ig.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h743ii.rs b/embassy-stm32/src/pac/stm32h743ii.rs
index 46665ee58..0e4078d74 100644
--- a/embassy-stm32/src/pac/stm32h743ii.rs
+++ b/embassy-stm32/src/pac/stm32h743ii.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h743vg.rs b/embassy-stm32/src/pac/stm32h743vg.rs
index 46665ee58..0e4078d74 100644
--- a/embassy-stm32/src/pac/stm32h743vg.rs
+++ b/embassy-stm32/src/pac/stm32h743vg.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h743vi.rs b/embassy-stm32/src/pac/stm32h743vi.rs
index 46665ee58..0e4078d74 100644
--- a/embassy-stm32/src/pac/stm32h743vi.rs
+++ b/embassy-stm32/src/pac/stm32h743vi.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h743xg.rs b/embassy-stm32/src/pac/stm32h743xg.rs
index 46665ee58..0e4078d74 100644
--- a/embassy-stm32/src/pac/stm32h743xg.rs
+++ b/embassy-stm32/src/pac/stm32h743xg.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h743xi.rs b/embassy-stm32/src/pac/stm32h743xi.rs
index 46665ee58..0e4078d74 100644
--- a/embassy-stm32/src/pac/stm32h743xi.rs
+++ b/embassy-stm32/src/pac/stm32h743xi.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h743zg.rs b/embassy-stm32/src/pac/stm32h743zg.rs
index 46665ee58..0e4078d74 100644
--- a/embassy-stm32/src/pac/stm32h743zg.rs
+++ b/embassy-stm32/src/pac/stm32h743zg.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h743zi.rs b/embassy-stm32/src/pac/stm32h743zi.rs
index 46665ee58..0e4078d74 100644
--- a/embassy-stm32/src/pac/stm32h743zi.rs
+++ b/embassy-stm32/src/pac/stm32h743zi.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h745bg.rs b/embassy-stm32/src/pac/stm32h745bg.rs
index 1ae5e2e4b..732de5fb2 100644
--- a/embassy-stm32/src/pac/stm32h745bg.rs
+++ b/embassy-stm32/src/pac/stm32h745bg.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h745bi.rs b/embassy-stm32/src/pac/stm32h745bi.rs
index 1ae5e2e4b..732de5fb2 100644
--- a/embassy-stm32/src/pac/stm32h745bi.rs
+++ b/embassy-stm32/src/pac/stm32h745bi.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h745ig.rs b/embassy-stm32/src/pac/stm32h745ig.rs
index 1ae5e2e4b..732de5fb2 100644
--- a/embassy-stm32/src/pac/stm32h745ig.rs
+++ b/embassy-stm32/src/pac/stm32h745ig.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h745ii.rs b/embassy-stm32/src/pac/stm32h745ii.rs
index 1ae5e2e4b..732de5fb2 100644
--- a/embassy-stm32/src/pac/stm32h745ii.rs
+++ b/embassy-stm32/src/pac/stm32h745ii.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h745xg.rs b/embassy-stm32/src/pac/stm32h745xg.rs
index 1ae5e2e4b..732de5fb2 100644
--- a/embassy-stm32/src/pac/stm32h745xg.rs
+++ b/embassy-stm32/src/pac/stm32h745xg.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h745xi.rs b/embassy-stm32/src/pac/stm32h745xi.rs
index 1ae5e2e4b..732de5fb2 100644
--- a/embassy-stm32/src/pac/stm32h745xi.rs
+++ b/embassy-stm32/src/pac/stm32h745xi.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h745zg.rs b/embassy-stm32/src/pac/stm32h745zg.rs
index 1ae5e2e4b..732de5fb2 100644
--- a/embassy-stm32/src/pac/stm32h745zg.rs
+++ b/embassy-stm32/src/pac/stm32h745zg.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h745zi.rs b/embassy-stm32/src/pac/stm32h745zi.rs
index 1ae5e2e4b..732de5fb2 100644
--- a/embassy-stm32/src/pac/stm32h745zi.rs
+++ b/embassy-stm32/src/pac/stm32h745zi.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h747ag.rs b/embassy-stm32/src/pac/stm32h747ag.rs
index 6af4b325c..6e439b978 100644
--- a/embassy-stm32/src/pac/stm32h747ag.rs
+++ b/embassy-stm32/src/pac/stm32h747ag.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h747ai.rs b/embassy-stm32/src/pac/stm32h747ai.rs
index 6af4b325c..6e439b978 100644
--- a/embassy-stm32/src/pac/stm32h747ai.rs
+++ b/embassy-stm32/src/pac/stm32h747ai.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h747bg.rs b/embassy-stm32/src/pac/stm32h747bg.rs
index 6af4b325c..6e439b978 100644
--- a/embassy-stm32/src/pac/stm32h747bg.rs
+++ b/embassy-stm32/src/pac/stm32h747bg.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h747bi.rs b/embassy-stm32/src/pac/stm32h747bi.rs
index 6af4b325c..6e439b978 100644
--- a/embassy-stm32/src/pac/stm32h747bi.rs
+++ b/embassy-stm32/src/pac/stm32h747bi.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h747ig.rs b/embassy-stm32/src/pac/stm32h747ig.rs
index 6af4b325c..6e439b978 100644
--- a/embassy-stm32/src/pac/stm32h747ig.rs
+++ b/embassy-stm32/src/pac/stm32h747ig.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h747ii.rs b/embassy-stm32/src/pac/stm32h747ii.rs
index 6af4b325c..6e439b978 100644
--- a/embassy-stm32/src/pac/stm32h747ii.rs
+++ b/embassy-stm32/src/pac/stm32h747ii.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h747xg.rs b/embassy-stm32/src/pac/stm32h747xg.rs
index 6af4b325c..6e439b978 100644
--- a/embassy-stm32/src/pac/stm32h747xg.rs
+++ b/embassy-stm32/src/pac/stm32h747xg.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h747xi.rs b/embassy-stm32/src/pac/stm32h747xi.rs
index 6af4b325c..6e439b978 100644
--- a/embassy-stm32/src/pac/stm32h747xi.rs
+++ b/embassy-stm32/src/pac/stm32h747xi.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h747zi.rs b/embassy-stm32/src/pac/stm32h747zi.rs
index 6af4b325c..6e439b978 100644
--- a/embassy-stm32/src/pac/stm32h747zi.rs
+++ b/embassy-stm32/src/pac/stm32h747zi.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h750ib.rs b/embassy-stm32/src/pac/stm32h750ib.rs
index 2144403dc..63152b191 100644
--- a/embassy-stm32/src/pac/stm32h750ib.rs
+++ b/embassy-stm32/src/pac/stm32h750ib.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h750vb.rs b/embassy-stm32/src/pac/stm32h750vb.rs
index 980984e14..63152b191 100644
--- a/embassy-stm32/src/pac/stm32h750vb.rs
+++ b/embassy-stm32/src/pac/stm32h750vb.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
diff --git a/embassy-stm32/src/pac/stm32h750xb.rs b/embassy-stm32/src/pac/stm32h750xb.rs
index 2144403dc..63152b191 100644
--- a/embassy-stm32/src/pac/stm32h750xb.rs
+++ b/embassy-stm32/src/pac/stm32h750xb.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h750zb.rs b/embassy-stm32/src/pac/stm32h750zb.rs
index 2144403dc..63152b191 100644
--- a/embassy-stm32/src/pac/stm32h750zb.rs
+++ b/embassy-stm32/src/pac/stm32h750zb.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h753ai.rs b/embassy-stm32/src/pac/stm32h753ai.rs
index 2144403dc..63152b191 100644
--- a/embassy-stm32/src/pac/stm32h753ai.rs
+++ b/embassy-stm32/src/pac/stm32h753ai.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h753bi.rs b/embassy-stm32/src/pac/stm32h753bi.rs
index 2144403dc..63152b191 100644
--- a/embassy-stm32/src/pac/stm32h753bi.rs
+++ b/embassy-stm32/src/pac/stm32h753bi.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h753ii.rs b/embassy-stm32/src/pac/stm32h753ii.rs
index 2144403dc..63152b191 100644
--- a/embassy-stm32/src/pac/stm32h753ii.rs
+++ b/embassy-stm32/src/pac/stm32h753ii.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h753vi.rs b/embassy-stm32/src/pac/stm32h753vi.rs
index 2144403dc..63152b191 100644
--- a/embassy-stm32/src/pac/stm32h753vi.rs
+++ b/embassy-stm32/src/pac/stm32h753vi.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h753xi.rs b/embassy-stm32/src/pac/stm32h753xi.rs
index 2144403dc..63152b191 100644
--- a/embassy-stm32/src/pac/stm32h753xi.rs
+++ b/embassy-stm32/src/pac/stm32h753xi.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h753zi.rs b/embassy-stm32/src/pac/stm32h753zi.rs
index 2144403dc..63152b191 100644
--- a/embassy-stm32/src/pac/stm32h753zi.rs
+++ b/embassy-stm32/src/pac/stm32h753zi.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h755bi.rs b/embassy-stm32/src/pac/stm32h755bi.rs
index 434e73a5d..09f7173bf 100644
--- a/embassy-stm32/src/pac/stm32h755bi.rs
+++ b/embassy-stm32/src/pac/stm32h755bi.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h755ii.rs b/embassy-stm32/src/pac/stm32h755ii.rs
index 434e73a5d..09f7173bf 100644
--- a/embassy-stm32/src/pac/stm32h755ii.rs
+++ b/embassy-stm32/src/pac/stm32h755ii.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h755xi.rs b/embassy-stm32/src/pac/stm32h755xi.rs
index 434e73a5d..09f7173bf 100644
--- a/embassy-stm32/src/pac/stm32h755xi.rs
+++ b/embassy-stm32/src/pac/stm32h755xi.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h755zi.rs b/embassy-stm32/src/pac/stm32h755zi.rs
index 434e73a5d..09f7173bf 100644
--- a/embassy-stm32/src/pac/stm32h755zi.rs
+++ b/embassy-stm32/src/pac/stm32h755zi.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h757ai.rs b/embassy-stm32/src/pac/stm32h757ai.rs
index 0c225bf33..ba7bde783 100644
--- a/embassy-stm32/src/pac/stm32h757ai.rs
+++ b/embassy-stm32/src/pac/stm32h757ai.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h757bi.rs b/embassy-stm32/src/pac/stm32h757bi.rs
index 0c225bf33..ba7bde783 100644
--- a/embassy-stm32/src/pac/stm32h757bi.rs
+++ b/embassy-stm32/src/pac/stm32h757bi.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h757ii.rs b/embassy-stm32/src/pac/stm32h757ii.rs
index 0c225bf33..ba7bde783 100644
--- a/embassy-stm32/src/pac/stm32h757ii.rs
+++ b/embassy-stm32/src/pac/stm32h757ii.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h757xi.rs b/embassy-stm32/src/pac/stm32h757xi.rs
index 0c225bf33..ba7bde783 100644
--- a/embassy-stm32/src/pac/stm32h757xi.rs
+++ b/embassy-stm32/src/pac/stm32h757xi.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h757zi.rs b/embassy-stm32/src/pac/stm32h757zi.rs
index 0c225bf33..ba7bde783 100644
--- a/embassy-stm32/src/pac/stm32h757zi.rs
+++ b/embassy-stm32/src/pac/stm32h757zi.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 200impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 201impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12); 202impl_sdmmc_pin!(SDMMC1, D2Pin, PC10, 12);
@@ -208,7 +208,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 208impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 209impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 210pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
211impl_sdmmc!(SDMMC2, 0x48022400); 211impl_sdmmc!(SDMMC2);
212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 212impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 213impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9); 214impl_sdmmc_pin!(SDMMC2, D2Pin, PB3, 9);
@@ -252,7 +252,7 @@ pub mod interrupt {
252 252
253 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 253 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
254 #[allow(non_camel_case_types)] 254 #[allow(non_camel_case_types)]
255 enum InterruptEnum { 255 pub enum InterruptEnum {
256 ADC = 18, 256 ADC = 18,
257 ADC3 = 127, 257 ADC3 = 127,
258 BDMA_Channel0 = 129, 258 BDMA_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h7a3ag.rs b/embassy-stm32/src/pac/stm32h7a3ag.rs
index afd388550..4d2bba675 100644
--- a/embassy-stm32/src/pac/stm32h7a3ag.rs
+++ b/embassy-stm32/src/pac/stm32h7a3ag.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12); 200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12);
201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
@@ -209,7 +209,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
212impl_sdmmc!(SDMMC2, 0x48022400); 212impl_sdmmc!(SDMMC2);
213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9); 213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9);
214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
@@ -259,7 +259,7 @@ pub mod interrupt {
259 259
260 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 260 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
261 #[allow(non_camel_case_types)] 261 #[allow(non_camel_case_types)]
262 enum InterruptEnum { 262 pub enum InterruptEnum {
263 ADC = 18, 263 ADC = 18,
264 BDMA1 = 154, 264 BDMA1 = 154,
265 BDMA2_Channel0 = 129, 265 BDMA2_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h7a3ai.rs b/embassy-stm32/src/pac/stm32h7a3ai.rs
index afd388550..4d2bba675 100644
--- a/embassy-stm32/src/pac/stm32h7a3ai.rs
+++ b/embassy-stm32/src/pac/stm32h7a3ai.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12); 200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12);
201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
@@ -209,7 +209,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
212impl_sdmmc!(SDMMC2, 0x48022400); 212impl_sdmmc!(SDMMC2);
213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9); 213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9);
214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
@@ -259,7 +259,7 @@ pub mod interrupt {
259 259
260 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 260 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
261 #[allow(non_camel_case_types)] 261 #[allow(non_camel_case_types)]
262 enum InterruptEnum { 262 pub enum InterruptEnum {
263 ADC = 18, 263 ADC = 18,
264 BDMA1 = 154, 264 BDMA1 = 154,
265 BDMA2_Channel0 = 129, 265 BDMA2_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h7a3ig.rs b/embassy-stm32/src/pac/stm32h7a3ig.rs
index afd388550..4d2bba675 100644
--- a/embassy-stm32/src/pac/stm32h7a3ig.rs
+++ b/embassy-stm32/src/pac/stm32h7a3ig.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12); 200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12);
201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
@@ -209,7 +209,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
212impl_sdmmc!(SDMMC2, 0x48022400); 212impl_sdmmc!(SDMMC2);
213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9); 213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9);
214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
@@ -259,7 +259,7 @@ pub mod interrupt {
259 259
260 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 260 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
261 #[allow(non_camel_case_types)] 261 #[allow(non_camel_case_types)]
262 enum InterruptEnum { 262 pub enum InterruptEnum {
263 ADC = 18, 263 ADC = 18,
264 BDMA1 = 154, 264 BDMA1 = 154,
265 BDMA2_Channel0 = 129, 265 BDMA2_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h7a3ii.rs b/embassy-stm32/src/pac/stm32h7a3ii.rs
index afd388550..4d2bba675 100644
--- a/embassy-stm32/src/pac/stm32h7a3ii.rs
+++ b/embassy-stm32/src/pac/stm32h7a3ii.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12); 200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12);
201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
@@ -209,7 +209,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
212impl_sdmmc!(SDMMC2, 0x48022400); 212impl_sdmmc!(SDMMC2);
213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9); 213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9);
214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
@@ -259,7 +259,7 @@ pub mod interrupt {
259 259
260 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 260 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
261 #[allow(non_camel_case_types)] 261 #[allow(non_camel_case_types)]
262 enum InterruptEnum { 262 pub enum InterruptEnum {
263 ADC = 18, 263 ADC = 18,
264 BDMA1 = 154, 264 BDMA1 = 154,
265 BDMA2_Channel0 = 129, 265 BDMA2_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h7a3lg.rs b/embassy-stm32/src/pac/stm32h7a3lg.rs
index afd388550..4d2bba675 100644
--- a/embassy-stm32/src/pac/stm32h7a3lg.rs
+++ b/embassy-stm32/src/pac/stm32h7a3lg.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12); 200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12);
201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
@@ -209,7 +209,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
212impl_sdmmc!(SDMMC2, 0x48022400); 212impl_sdmmc!(SDMMC2);
213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9); 213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9);
214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
@@ -259,7 +259,7 @@ pub mod interrupt {
259 259
260 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 260 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
261 #[allow(non_camel_case_types)] 261 #[allow(non_camel_case_types)]
262 enum InterruptEnum { 262 pub enum InterruptEnum {
263 ADC = 18, 263 ADC = 18,
264 BDMA1 = 154, 264 BDMA1 = 154,
265 BDMA2_Channel0 = 129, 265 BDMA2_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h7a3li.rs b/embassy-stm32/src/pac/stm32h7a3li.rs
index afd388550..4d2bba675 100644
--- a/embassy-stm32/src/pac/stm32h7a3li.rs
+++ b/embassy-stm32/src/pac/stm32h7a3li.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12); 200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12);
201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
@@ -209,7 +209,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
212impl_sdmmc!(SDMMC2, 0x48022400); 212impl_sdmmc!(SDMMC2);
213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9); 213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9);
214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
@@ -259,7 +259,7 @@ pub mod interrupt {
259 259
260 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 260 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
261 #[allow(non_camel_case_types)] 261 #[allow(non_camel_case_types)]
262 enum InterruptEnum { 262 pub enum InterruptEnum {
263 ADC = 18, 263 ADC = 18,
264 BDMA1 = 154, 264 BDMA1 = 154,
265 BDMA2_Channel0 = 129, 265 BDMA2_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h7a3ng.rs b/embassy-stm32/src/pac/stm32h7a3ng.rs
index afd388550..4d2bba675 100644
--- a/embassy-stm32/src/pac/stm32h7a3ng.rs
+++ b/embassy-stm32/src/pac/stm32h7a3ng.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12); 200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12);
201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
@@ -209,7 +209,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
212impl_sdmmc!(SDMMC2, 0x48022400); 212impl_sdmmc!(SDMMC2);
213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9); 213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9);
214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
@@ -259,7 +259,7 @@ pub mod interrupt {
259 259
260 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 260 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
261 #[allow(non_camel_case_types)] 261 #[allow(non_camel_case_types)]
262 enum InterruptEnum { 262 pub enum InterruptEnum {
263 ADC = 18, 263 ADC = 18,
264 BDMA1 = 154, 264 BDMA1 = 154,
265 BDMA2_Channel0 = 129, 265 BDMA2_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h7a3ni.rs b/embassy-stm32/src/pac/stm32h7a3ni.rs
index afd388550..4d2bba675 100644
--- a/embassy-stm32/src/pac/stm32h7a3ni.rs
+++ b/embassy-stm32/src/pac/stm32h7a3ni.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12); 200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12);
201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
@@ -209,7 +209,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
212impl_sdmmc!(SDMMC2, 0x48022400); 212impl_sdmmc!(SDMMC2);
213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9); 213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9);
214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
@@ -259,7 +259,7 @@ pub mod interrupt {
259 259
260 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 260 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
261 #[allow(non_camel_case_types)] 261 #[allow(non_camel_case_types)]
262 enum InterruptEnum { 262 pub enum InterruptEnum {
263 ADC = 18, 263 ADC = 18,
264 BDMA1 = 154, 264 BDMA1 = 154,
265 BDMA2_Channel0 = 129, 265 BDMA2_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h7a3qi.rs b/embassy-stm32/src/pac/stm32h7a3qi.rs
index afd388550..4d2bba675 100644
--- a/embassy-stm32/src/pac/stm32h7a3qi.rs
+++ b/embassy-stm32/src/pac/stm32h7a3qi.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12); 200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12);
201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
@@ -209,7 +209,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
212impl_sdmmc!(SDMMC2, 0x48022400); 212impl_sdmmc!(SDMMC2);
213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9); 213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9);
214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
@@ -259,7 +259,7 @@ pub mod interrupt {
259 259
260 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 260 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
261 #[allow(non_camel_case_types)] 261 #[allow(non_camel_case_types)]
262 enum InterruptEnum { 262 pub enum InterruptEnum {
263 ADC = 18, 263 ADC = 18,
264 BDMA1 = 154, 264 BDMA1 = 154,
265 BDMA2_Channel0 = 129, 265 BDMA2_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h7a3rg.rs b/embassy-stm32/src/pac/stm32h7a3rg.rs
index afd388550..4d2bba675 100644
--- a/embassy-stm32/src/pac/stm32h7a3rg.rs
+++ b/embassy-stm32/src/pac/stm32h7a3rg.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12); 200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12);
201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
@@ -209,7 +209,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
212impl_sdmmc!(SDMMC2, 0x48022400); 212impl_sdmmc!(SDMMC2);
213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9); 213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9);
214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
@@ -259,7 +259,7 @@ pub mod interrupt {
259 259
260 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 260 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
261 #[allow(non_camel_case_types)] 261 #[allow(non_camel_case_types)]
262 enum InterruptEnum { 262 pub enum InterruptEnum {
263 ADC = 18, 263 ADC = 18,
264 BDMA1 = 154, 264 BDMA1 = 154,
265 BDMA2_Channel0 = 129, 265 BDMA2_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h7a3ri.rs b/embassy-stm32/src/pac/stm32h7a3ri.rs
index afd388550..4d2bba675 100644
--- a/embassy-stm32/src/pac/stm32h7a3ri.rs
+++ b/embassy-stm32/src/pac/stm32h7a3ri.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12); 200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12);
201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
@@ -209,7 +209,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
212impl_sdmmc!(SDMMC2, 0x48022400); 212impl_sdmmc!(SDMMC2);
213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9); 213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9);
214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
@@ -259,7 +259,7 @@ pub mod interrupt {
259 259
260 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 260 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
261 #[allow(non_camel_case_types)] 261 #[allow(non_camel_case_types)]
262 enum InterruptEnum { 262 pub enum InterruptEnum {
263 ADC = 18, 263 ADC = 18,
264 BDMA1 = 154, 264 BDMA1 = 154,
265 BDMA2_Channel0 = 129, 265 BDMA2_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h7a3vg.rs b/embassy-stm32/src/pac/stm32h7a3vg.rs
index afd388550..4d2bba675 100644
--- a/embassy-stm32/src/pac/stm32h7a3vg.rs
+++ b/embassy-stm32/src/pac/stm32h7a3vg.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12); 200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12);
201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
@@ -209,7 +209,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
212impl_sdmmc!(SDMMC2, 0x48022400); 212impl_sdmmc!(SDMMC2);
213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9); 213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9);
214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
@@ -259,7 +259,7 @@ pub mod interrupt {
259 259
260 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 260 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
261 #[allow(non_camel_case_types)] 261 #[allow(non_camel_case_types)]
262 enum InterruptEnum { 262 pub enum InterruptEnum {
263 ADC = 18, 263 ADC = 18,
264 BDMA1 = 154, 264 BDMA1 = 154,
265 BDMA2_Channel0 = 129, 265 BDMA2_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h7a3vi.rs b/embassy-stm32/src/pac/stm32h7a3vi.rs
index afd388550..4d2bba675 100644
--- a/embassy-stm32/src/pac/stm32h7a3vi.rs
+++ b/embassy-stm32/src/pac/stm32h7a3vi.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12); 200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12);
201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
@@ -209,7 +209,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
212impl_sdmmc!(SDMMC2, 0x48022400); 212impl_sdmmc!(SDMMC2);
213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9); 213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9);
214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
@@ -259,7 +259,7 @@ pub mod interrupt {
259 259
260 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 260 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
261 #[allow(non_camel_case_types)] 261 #[allow(non_camel_case_types)]
262 enum InterruptEnum { 262 pub enum InterruptEnum {
263 ADC = 18, 263 ADC = 18,
264 BDMA1 = 154, 264 BDMA1 = 154,
265 BDMA2_Channel0 = 129, 265 BDMA2_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h7a3zg.rs b/embassy-stm32/src/pac/stm32h7a3zg.rs
index afd388550..4d2bba675 100644
--- a/embassy-stm32/src/pac/stm32h7a3zg.rs
+++ b/embassy-stm32/src/pac/stm32h7a3zg.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12); 200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12);
201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
@@ -209,7 +209,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
212impl_sdmmc!(SDMMC2, 0x48022400); 212impl_sdmmc!(SDMMC2);
213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9); 213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9);
214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
@@ -259,7 +259,7 @@ pub mod interrupt {
259 259
260 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 260 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
261 #[allow(non_camel_case_types)] 261 #[allow(non_camel_case_types)]
262 enum InterruptEnum { 262 pub enum InterruptEnum {
263 ADC = 18, 263 ADC = 18,
264 BDMA1 = 154, 264 BDMA1 = 154,
265 BDMA2_Channel0 = 129, 265 BDMA2_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h7a3zi.rs b/embassy-stm32/src/pac/stm32h7a3zi.rs
index afd388550..4d2bba675 100644
--- a/embassy-stm32/src/pac/stm32h7a3zi.rs
+++ b/embassy-stm32/src/pac/stm32h7a3zi.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12); 200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12);
201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
@@ -209,7 +209,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
212impl_sdmmc!(SDMMC2, 0x48022400); 212impl_sdmmc!(SDMMC2);
213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9); 213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9);
214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
@@ -259,7 +259,7 @@ pub mod interrupt {
259 259
260 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 260 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
261 #[allow(non_camel_case_types)] 261 #[allow(non_camel_case_types)]
262 enum InterruptEnum { 262 pub enum InterruptEnum {
263 ADC = 18, 263 ADC = 18,
264 BDMA1 = 154, 264 BDMA1 = 154,
265 BDMA2_Channel0 = 129, 265 BDMA2_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h7b0ab.rs b/embassy-stm32/src/pac/stm32h7b0ab.rs
index f5168f8de..425bc4b7c 100644
--- a/embassy-stm32/src/pac/stm32h7b0ab.rs
+++ b/embassy-stm32/src/pac/stm32h7b0ab.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12); 200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12);
201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
@@ -209,7 +209,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
212impl_sdmmc!(SDMMC2, 0x48022400); 212impl_sdmmc!(SDMMC2);
213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9); 213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9);
214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
@@ -259,7 +259,7 @@ pub mod interrupt {
259 259
260 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 260 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
261 #[allow(non_camel_case_types)] 261 #[allow(non_camel_case_types)]
262 enum InterruptEnum { 262 pub enum InterruptEnum {
263 ADC = 18, 263 ADC = 18,
264 BDMA1 = 154, 264 BDMA1 = 154,
265 BDMA2_Channel0 = 129, 265 BDMA2_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h7b0ib.rs b/embassy-stm32/src/pac/stm32h7b0ib.rs
index f5168f8de..425bc4b7c 100644
--- a/embassy-stm32/src/pac/stm32h7b0ib.rs
+++ b/embassy-stm32/src/pac/stm32h7b0ib.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12); 200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12);
201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
@@ -209,7 +209,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
212impl_sdmmc!(SDMMC2, 0x48022400); 212impl_sdmmc!(SDMMC2);
213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9); 213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9);
214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
@@ -259,7 +259,7 @@ pub mod interrupt {
259 259
260 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 260 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
261 #[allow(non_camel_case_types)] 261 #[allow(non_camel_case_types)]
262 enum InterruptEnum { 262 pub enum InterruptEnum {
263 ADC = 18, 263 ADC = 18,
264 BDMA1 = 154, 264 BDMA1 = 154,
265 BDMA2_Channel0 = 129, 265 BDMA2_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h7b0rb.rs b/embassy-stm32/src/pac/stm32h7b0rb.rs
index f5168f8de..425bc4b7c 100644
--- a/embassy-stm32/src/pac/stm32h7b0rb.rs
+++ b/embassy-stm32/src/pac/stm32h7b0rb.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12); 200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12);
201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
@@ -209,7 +209,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
212impl_sdmmc!(SDMMC2, 0x48022400); 212impl_sdmmc!(SDMMC2);
213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9); 213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9);
214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
@@ -259,7 +259,7 @@ pub mod interrupt {
259 259
260 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 260 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
261 #[allow(non_camel_case_types)] 261 #[allow(non_camel_case_types)]
262 enum InterruptEnum { 262 pub enum InterruptEnum {
263 ADC = 18, 263 ADC = 18,
264 BDMA1 = 154, 264 BDMA1 = 154,
265 BDMA2_Channel0 = 129, 265 BDMA2_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h7b0vb.rs b/embassy-stm32/src/pac/stm32h7b0vb.rs
index f5168f8de..425bc4b7c 100644
--- a/embassy-stm32/src/pac/stm32h7b0vb.rs
+++ b/embassy-stm32/src/pac/stm32h7b0vb.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12); 200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12);
201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
@@ -209,7 +209,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
212impl_sdmmc!(SDMMC2, 0x48022400); 212impl_sdmmc!(SDMMC2);
213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9); 213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9);
214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
@@ -259,7 +259,7 @@ pub mod interrupt {
259 259
260 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 260 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
261 #[allow(non_camel_case_types)] 261 #[allow(non_camel_case_types)]
262 enum InterruptEnum { 262 pub enum InterruptEnum {
263 ADC = 18, 263 ADC = 18,
264 BDMA1 = 154, 264 BDMA1 = 154,
265 BDMA2_Channel0 = 129, 265 BDMA2_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h7b0zb.rs b/embassy-stm32/src/pac/stm32h7b0zb.rs
index f5168f8de..425bc4b7c 100644
--- a/embassy-stm32/src/pac/stm32h7b0zb.rs
+++ b/embassy-stm32/src/pac/stm32h7b0zb.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12); 200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12);
201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
@@ -209,7 +209,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
212impl_sdmmc!(SDMMC2, 0x48022400); 212impl_sdmmc!(SDMMC2);
213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9); 213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9);
214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
@@ -259,7 +259,7 @@ pub mod interrupt {
259 259
260 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 260 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
261 #[allow(non_camel_case_types)] 261 #[allow(non_camel_case_types)]
262 enum InterruptEnum { 262 pub enum InterruptEnum {
263 ADC = 18, 263 ADC = 18,
264 BDMA1 = 154, 264 BDMA1 = 154,
265 BDMA2_Channel0 = 129, 265 BDMA2_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h7b3ai.rs b/embassy-stm32/src/pac/stm32h7b3ai.rs
index f5168f8de..425bc4b7c 100644
--- a/embassy-stm32/src/pac/stm32h7b3ai.rs
+++ b/embassy-stm32/src/pac/stm32h7b3ai.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12); 200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12);
201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
@@ -209,7 +209,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
212impl_sdmmc!(SDMMC2, 0x48022400); 212impl_sdmmc!(SDMMC2);
213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9); 213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9);
214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
@@ -259,7 +259,7 @@ pub mod interrupt {
259 259
260 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 260 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
261 #[allow(non_camel_case_types)] 261 #[allow(non_camel_case_types)]
262 enum InterruptEnum { 262 pub enum InterruptEnum {
263 ADC = 18, 263 ADC = 18,
264 BDMA1 = 154, 264 BDMA1 = 154,
265 BDMA2_Channel0 = 129, 265 BDMA2_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h7b3ii.rs b/embassy-stm32/src/pac/stm32h7b3ii.rs
index f5168f8de..425bc4b7c 100644
--- a/embassy-stm32/src/pac/stm32h7b3ii.rs
+++ b/embassy-stm32/src/pac/stm32h7b3ii.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12); 200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12);
201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
@@ -209,7 +209,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
212impl_sdmmc!(SDMMC2, 0x48022400); 212impl_sdmmc!(SDMMC2);
213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9); 213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9);
214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
@@ -259,7 +259,7 @@ pub mod interrupt {
259 259
260 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 260 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
261 #[allow(non_camel_case_types)] 261 #[allow(non_camel_case_types)]
262 enum InterruptEnum { 262 pub enum InterruptEnum {
263 ADC = 18, 263 ADC = 18,
264 BDMA1 = 154, 264 BDMA1 = 154,
265 BDMA2_Channel0 = 129, 265 BDMA2_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h7b3li.rs b/embassy-stm32/src/pac/stm32h7b3li.rs
index f5168f8de..425bc4b7c 100644
--- a/embassy-stm32/src/pac/stm32h7b3li.rs
+++ b/embassy-stm32/src/pac/stm32h7b3li.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12); 200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12);
201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
@@ -209,7 +209,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
212impl_sdmmc!(SDMMC2, 0x48022400); 212impl_sdmmc!(SDMMC2);
213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9); 213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9);
214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
@@ -259,7 +259,7 @@ pub mod interrupt {
259 259
260 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 260 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
261 #[allow(non_camel_case_types)] 261 #[allow(non_camel_case_types)]
262 enum InterruptEnum { 262 pub enum InterruptEnum {
263 ADC = 18, 263 ADC = 18,
264 BDMA1 = 154, 264 BDMA1 = 154,
265 BDMA2_Channel0 = 129, 265 BDMA2_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h7b3ni.rs b/embassy-stm32/src/pac/stm32h7b3ni.rs
index f5168f8de..425bc4b7c 100644
--- a/embassy-stm32/src/pac/stm32h7b3ni.rs
+++ b/embassy-stm32/src/pac/stm32h7b3ni.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12); 200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12);
201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
@@ -209,7 +209,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
212impl_sdmmc!(SDMMC2, 0x48022400); 212impl_sdmmc!(SDMMC2);
213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9); 213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9);
214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
@@ -259,7 +259,7 @@ pub mod interrupt {
259 259
260 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 260 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
261 #[allow(non_camel_case_types)] 261 #[allow(non_camel_case_types)]
262 enum InterruptEnum { 262 pub enum InterruptEnum {
263 ADC = 18, 263 ADC = 18,
264 BDMA1 = 154, 264 BDMA1 = 154,
265 BDMA2_Channel0 = 129, 265 BDMA2_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h7b3qi.rs b/embassy-stm32/src/pac/stm32h7b3qi.rs
index f5168f8de..425bc4b7c 100644
--- a/embassy-stm32/src/pac/stm32h7b3qi.rs
+++ b/embassy-stm32/src/pac/stm32h7b3qi.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12); 200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12);
201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
@@ -209,7 +209,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
212impl_sdmmc!(SDMMC2, 0x48022400); 212impl_sdmmc!(SDMMC2);
213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9); 213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9);
214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
@@ -259,7 +259,7 @@ pub mod interrupt {
259 259
260 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 260 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
261 #[allow(non_camel_case_types)] 261 #[allow(non_camel_case_types)]
262 enum InterruptEnum { 262 pub enum InterruptEnum {
263 ADC = 18, 263 ADC = 18,
264 BDMA1 = 154, 264 BDMA1 = 154,
265 BDMA2_Channel0 = 129, 265 BDMA2_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h7b3ri.rs b/embassy-stm32/src/pac/stm32h7b3ri.rs
index f5168f8de..425bc4b7c 100644
--- a/embassy-stm32/src/pac/stm32h7b3ri.rs
+++ b/embassy-stm32/src/pac/stm32h7b3ri.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12); 200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12);
201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
@@ -209,7 +209,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
212impl_sdmmc!(SDMMC2, 0x48022400); 212impl_sdmmc!(SDMMC2);
213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9); 213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9);
214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
@@ -259,7 +259,7 @@ pub mod interrupt {
259 259
260 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 260 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
261 #[allow(non_camel_case_types)] 261 #[allow(non_camel_case_types)]
262 enum InterruptEnum { 262 pub enum InterruptEnum {
263 ADC = 18, 263 ADC = 18,
264 BDMA1 = 154, 264 BDMA1 = 154,
265 BDMA2_Channel0 = 129, 265 BDMA2_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h7b3vi.rs b/embassy-stm32/src/pac/stm32h7b3vi.rs
index f5168f8de..425bc4b7c 100644
--- a/embassy-stm32/src/pac/stm32h7b3vi.rs
+++ b/embassy-stm32/src/pac/stm32h7b3vi.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12); 200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12);
201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
@@ -209,7 +209,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
212impl_sdmmc!(SDMMC2, 0x48022400); 212impl_sdmmc!(SDMMC2);
213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9); 213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9);
214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
@@ -259,7 +259,7 @@ pub mod interrupt {
259 259
260 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 260 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
261 #[allow(non_camel_case_types)] 261 #[allow(non_camel_case_types)]
262 enum InterruptEnum { 262 pub enum InterruptEnum {
263 ADC = 18, 263 ADC = 18,
264 BDMA1 = 154, 264 BDMA1 = 154,
265 BDMA2_Channel0 = 129, 265 BDMA2_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32h7b3zi.rs b/embassy-stm32/src/pac/stm32h7b3zi.rs
index f5168f8de..425bc4b7c 100644
--- a/embassy-stm32/src/pac/stm32h7b3zi.rs
+++ b/embassy-stm32/src/pac/stm32h7b3zi.rs
@@ -196,7 +196,7 @@ pub const GPIOK: gpio::Gpio = gpio::Gpio(0x58022800 as _);
196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _); 196pub const RNG: rng::Rng = rng::Rng(0x48021800 as _);
197impl_rng!(RNG); 197impl_rng!(RNG);
198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _); 198pub const SDMMC1: sdmmc::Sdmmc = sdmmc::Sdmmc(0x52007000 as _);
199impl_sdmmc!(SDMMC1, 0x52007000); 199impl_sdmmc!(SDMMC1);
200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12); 200impl_sdmmc_pin!(SDMMC1, D0Pin, PB13, 12);
201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12); 201impl_sdmmc_pin!(SDMMC1, D4Pin, PB8, 12);
202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12); 202impl_sdmmc_pin!(SDMMC1, D5Pin, PB9, 12);
@@ -209,7 +209,7 @@ impl_sdmmc_pin!(SDMMC1, D0Pin, PC8, 12);
209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12); 209impl_sdmmc_pin!(SDMMC1, D1Pin, PC9, 12);
210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12); 210impl_sdmmc_pin!(SDMMC1, CmdPin, PD2, 12);
211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _); 211pub const SDMMC2: sdmmc::Sdmmc = sdmmc::Sdmmc(0x48022400 as _);
212impl_sdmmc!(SDMMC2, 0x48022400); 212impl_sdmmc!(SDMMC2);
213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9); 213impl_sdmmc_pin!(SDMMC2, CmdPin, PA0, 9);
214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9); 214impl_sdmmc_pin!(SDMMC2, D0Pin, PB14, 9);
215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9); 215impl_sdmmc_pin!(SDMMC2, D1Pin, PB15, 9);
@@ -259,7 +259,7 @@ pub mod interrupt {
259 259
260 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 260 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
261 #[allow(non_camel_case_types)] 261 #[allow(non_camel_case_types)]
262 enum InterruptEnum { 262 pub enum InterruptEnum {
263 ADC = 18, 263 ADC = 18,
264 BDMA1 = 154, 264 BDMA1 = 154,
265 BDMA2_Channel0 = 129, 265 BDMA2_Channel0 = 129,
diff --git a/embassy-stm32/src/pac/stm32l412c8.rs b/embassy-stm32/src/pac/stm32l412c8.rs
index 6f7f9d3b4..10967834b 100644
--- a/embassy-stm32/src/pac/stm32l412c8.rs
+++ b/embassy-stm32/src/pac/stm32l412c8.rs
@@ -176,7 +176,7 @@ pub mod interrupt {
176 176
177 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 177 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
178 #[allow(non_camel_case_types)] 178 #[allow(non_camel_case_types)]
179 enum InterruptEnum { 179 pub enum InterruptEnum {
180 ADC1_2 = 18, 180 ADC1_2 = 18,
181 COMP = 64, 181 COMP = 64,
182 CRS = 82, 182 CRS = 82,
diff --git a/embassy-stm32/src/pac/stm32l412cb.rs b/embassy-stm32/src/pac/stm32l412cb.rs
index 6f7f9d3b4..10967834b 100644
--- a/embassy-stm32/src/pac/stm32l412cb.rs
+++ b/embassy-stm32/src/pac/stm32l412cb.rs
@@ -176,7 +176,7 @@ pub mod interrupt {
176 176
177 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 177 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
178 #[allow(non_camel_case_types)] 178 #[allow(non_camel_case_types)]
179 enum InterruptEnum { 179 pub enum InterruptEnum {
180 ADC1_2 = 18, 180 ADC1_2 = 18,
181 COMP = 64, 181 COMP = 64,
182 CRS = 82, 182 CRS = 82,
diff --git a/embassy-stm32/src/pac/stm32l412k8.rs b/embassy-stm32/src/pac/stm32l412k8.rs
index a8f1ee4bc..1954ee899 100644
--- a/embassy-stm32/src/pac/stm32l412k8.rs
+++ b/embassy-stm32/src/pac/stm32l412k8.rs
@@ -159,7 +159,7 @@ pub mod interrupt {
159 159
160 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 160 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
161 #[allow(non_camel_case_types)] 161 #[allow(non_camel_case_types)]
162 enum InterruptEnum { 162 pub enum InterruptEnum {
163 ADC1_2 = 18, 163 ADC1_2 = 18,
164 COMP = 64, 164 COMP = 64,
165 CRS = 82, 165 CRS = 82,
diff --git a/embassy-stm32/src/pac/stm32l412kb.rs b/embassy-stm32/src/pac/stm32l412kb.rs
index a8f1ee4bc..1954ee899 100644
--- a/embassy-stm32/src/pac/stm32l412kb.rs
+++ b/embassy-stm32/src/pac/stm32l412kb.rs
@@ -159,7 +159,7 @@ pub mod interrupt {
159 159
160 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 160 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
161 #[allow(non_camel_case_types)] 161 #[allow(non_camel_case_types)]
162 enum InterruptEnum { 162 pub enum InterruptEnum {
163 ADC1_2 = 18, 163 ADC1_2 = 18,
164 COMP = 64, 164 COMP = 64,
165 CRS = 82, 165 CRS = 82,
diff --git a/embassy-stm32/src/pac/stm32l412r8.rs b/embassy-stm32/src/pac/stm32l412r8.rs
index 6f7f9d3b4..10967834b 100644
--- a/embassy-stm32/src/pac/stm32l412r8.rs
+++ b/embassy-stm32/src/pac/stm32l412r8.rs
@@ -176,7 +176,7 @@ pub mod interrupt {
176 176
177 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 177 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
178 #[allow(non_camel_case_types)] 178 #[allow(non_camel_case_types)]
179 enum InterruptEnum { 179 pub enum InterruptEnum {
180 ADC1_2 = 18, 180 ADC1_2 = 18,
181 COMP = 64, 181 COMP = 64,
182 CRS = 82, 182 CRS = 82,
diff --git a/embassy-stm32/src/pac/stm32l412rb.rs b/embassy-stm32/src/pac/stm32l412rb.rs
index 6f7f9d3b4..10967834b 100644
--- a/embassy-stm32/src/pac/stm32l412rb.rs
+++ b/embassy-stm32/src/pac/stm32l412rb.rs
@@ -176,7 +176,7 @@ pub mod interrupt {
176 176
177 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 177 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
178 #[allow(non_camel_case_types)] 178 #[allow(non_camel_case_types)]
179 enum InterruptEnum { 179 pub enum InterruptEnum {
180 ADC1_2 = 18, 180 ADC1_2 = 18,
181 COMP = 64, 181 COMP = 64,
182 CRS = 82, 182 CRS = 82,
diff --git a/embassy-stm32/src/pac/stm32l412t8.rs b/embassy-stm32/src/pac/stm32l412t8.rs
index a8f1ee4bc..1954ee899 100644
--- a/embassy-stm32/src/pac/stm32l412t8.rs
+++ b/embassy-stm32/src/pac/stm32l412t8.rs
@@ -159,7 +159,7 @@ pub mod interrupt {
159 159
160 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 160 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
161 #[allow(non_camel_case_types)] 161 #[allow(non_camel_case_types)]
162 enum InterruptEnum { 162 pub enum InterruptEnum {
163 ADC1_2 = 18, 163 ADC1_2 = 18,
164 COMP = 64, 164 COMP = 64,
165 CRS = 82, 165 CRS = 82,
diff --git a/embassy-stm32/src/pac/stm32l412tb.rs b/embassy-stm32/src/pac/stm32l412tb.rs
index a8f1ee4bc..1954ee899 100644
--- a/embassy-stm32/src/pac/stm32l412tb.rs
+++ b/embassy-stm32/src/pac/stm32l412tb.rs
@@ -159,7 +159,7 @@ pub mod interrupt {
159 159
160 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 160 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
161 #[allow(non_camel_case_types)] 161 #[allow(non_camel_case_types)]
162 enum InterruptEnum { 162 pub enum InterruptEnum {
163 ADC1_2 = 18, 163 ADC1_2 = 18,
164 COMP = 64, 164 COMP = 64,
165 CRS = 82, 165 CRS = 82,
diff --git a/embassy-stm32/src/pac/stm32l422cb.rs b/embassy-stm32/src/pac/stm32l422cb.rs
index 2faebe71e..39b471a77 100644
--- a/embassy-stm32/src/pac/stm32l422cb.rs
+++ b/embassy-stm32/src/pac/stm32l422cb.rs
@@ -176,7 +176,7 @@ pub mod interrupt {
176 176
177 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 177 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
178 #[allow(non_camel_case_types)] 178 #[allow(non_camel_case_types)]
179 enum InterruptEnum { 179 pub enum InterruptEnum {
180 ADC1_2 = 18, 180 ADC1_2 = 18,
181 AES = 79, 181 AES = 79,
182 COMP = 64, 182 COMP = 64,
diff --git a/embassy-stm32/src/pac/stm32l422kb.rs b/embassy-stm32/src/pac/stm32l422kb.rs
index 36dca78dd..42318d113 100644
--- a/embassy-stm32/src/pac/stm32l422kb.rs
+++ b/embassy-stm32/src/pac/stm32l422kb.rs
@@ -159,7 +159,7 @@ pub mod interrupt {
159 159
160 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 160 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
161 #[allow(non_camel_case_types)] 161 #[allow(non_camel_case_types)]
162 enum InterruptEnum { 162 pub enum InterruptEnum {
163 ADC1_2 = 18, 163 ADC1_2 = 18,
164 AES = 79, 164 AES = 79,
165 COMP = 64, 165 COMP = 64,
diff --git a/embassy-stm32/src/pac/stm32l422rb.rs b/embassy-stm32/src/pac/stm32l422rb.rs
index 2faebe71e..39b471a77 100644
--- a/embassy-stm32/src/pac/stm32l422rb.rs
+++ b/embassy-stm32/src/pac/stm32l422rb.rs
@@ -176,7 +176,7 @@ pub mod interrupt {
176 176
177 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 177 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
178 #[allow(non_camel_case_types)] 178 #[allow(non_camel_case_types)]
179 enum InterruptEnum { 179 pub enum InterruptEnum {
180 ADC1_2 = 18, 180 ADC1_2 = 18,
181 AES = 79, 181 AES = 79,
182 COMP = 64, 182 COMP = 64,
diff --git a/embassy-stm32/src/pac/stm32l422tb.rs b/embassy-stm32/src/pac/stm32l422tb.rs
index 36dca78dd..42318d113 100644
--- a/embassy-stm32/src/pac/stm32l422tb.rs
+++ b/embassy-stm32/src/pac/stm32l422tb.rs
@@ -159,7 +159,7 @@ pub mod interrupt {
159 159
160 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 160 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
161 #[allow(non_camel_case_types)] 161 #[allow(non_camel_case_types)]
162 enum InterruptEnum { 162 pub enum InterruptEnum {
163 ADC1_2 = 18, 163 ADC1_2 = 18,
164 AES = 79, 164 AES = 79,
165 COMP = 64, 165 COMP = 64,
diff --git a/embassy-stm32/src/pac/stm32l431cb.rs b/embassy-stm32/src/pac/stm32l431cb.rs
index 73f31d278..5cdbfe4ad 100644
--- a/embassy-stm32/src/pac/stm32l431cb.rs
+++ b/embassy-stm32/src/pac/stm32l431cb.rs
@@ -238,7 +238,7 @@ pub mod interrupt {
238 238
239 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 239 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
240 #[allow(non_camel_case_types)] 240 #[allow(non_camel_case_types)]
241 enum InterruptEnum { 241 pub enum InterruptEnum {
242 ADC1 = 18, 242 ADC1 = 18,
243 CAN1_RX0 = 20, 243 CAN1_RX0 = 20,
244 CAN1_RX1 = 21, 244 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32l431cc.rs b/embassy-stm32/src/pac/stm32l431cc.rs
index 73f31d278..5cdbfe4ad 100644
--- a/embassy-stm32/src/pac/stm32l431cc.rs
+++ b/embassy-stm32/src/pac/stm32l431cc.rs
@@ -238,7 +238,7 @@ pub mod interrupt {
238 238
239 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 239 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
240 #[allow(non_camel_case_types)] 240 #[allow(non_camel_case_types)]
241 enum InterruptEnum { 241 pub enum InterruptEnum {
242 ADC1 = 18, 242 ADC1 = 18,
243 CAN1_RX0 = 20, 243 CAN1_RX0 = 20,
244 CAN1_RX1 = 21, 244 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32l431kb.rs b/embassy-stm32/src/pac/stm32l431kb.rs
index f4fe06052..c127f72a9 100644
--- a/embassy-stm32/src/pac/stm32l431kb.rs
+++ b/embassy-stm32/src/pac/stm32l431kb.rs
@@ -205,7 +205,7 @@ pub mod interrupt {
205 205
206 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 206 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
207 #[allow(non_camel_case_types)] 207 #[allow(non_camel_case_types)]
208 enum InterruptEnum { 208 pub enum InterruptEnum {
209 ADC1 = 18, 209 ADC1 = 18,
210 CAN1_RX0 = 20, 210 CAN1_RX0 = 20,
211 CAN1_RX1 = 21, 211 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32l431kc.rs b/embassy-stm32/src/pac/stm32l431kc.rs
index f4fe06052..c127f72a9 100644
--- a/embassy-stm32/src/pac/stm32l431kc.rs
+++ b/embassy-stm32/src/pac/stm32l431kc.rs
@@ -205,7 +205,7 @@ pub mod interrupt {
205 205
206 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 206 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
207 #[allow(non_camel_case_types)] 207 #[allow(non_camel_case_types)]
208 enum InterruptEnum { 208 pub enum InterruptEnum {
209 ADC1 = 18, 209 ADC1 = 18,
210 CAN1_RX0 = 20, 210 CAN1_RX0 = 20,
211 CAN1_RX1 = 21, 211 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32l431rb.rs b/embassy-stm32/src/pac/stm32l431rb.rs
index 73f31d278..5cdbfe4ad 100644
--- a/embassy-stm32/src/pac/stm32l431rb.rs
+++ b/embassy-stm32/src/pac/stm32l431rb.rs
@@ -238,7 +238,7 @@ pub mod interrupt {
238 238
239 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 239 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
240 #[allow(non_camel_case_types)] 240 #[allow(non_camel_case_types)]
241 enum InterruptEnum { 241 pub enum InterruptEnum {
242 ADC1 = 18, 242 ADC1 = 18,
243 CAN1_RX0 = 20, 243 CAN1_RX0 = 20,
244 CAN1_RX1 = 21, 244 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32l431rc.rs b/embassy-stm32/src/pac/stm32l431rc.rs
index 73f31d278..5cdbfe4ad 100644
--- a/embassy-stm32/src/pac/stm32l431rc.rs
+++ b/embassy-stm32/src/pac/stm32l431rc.rs
@@ -238,7 +238,7 @@ pub mod interrupt {
238 238
239 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 239 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
240 #[allow(non_camel_case_types)] 240 #[allow(non_camel_case_types)]
241 enum InterruptEnum { 241 pub enum InterruptEnum {
242 ADC1 = 18, 242 ADC1 = 18,
243 CAN1_RX0 = 20, 243 CAN1_RX0 = 20,
244 CAN1_RX1 = 21, 244 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32l431vc.rs b/embassy-stm32/src/pac/stm32l431vc.rs
index 73f31d278..5cdbfe4ad 100644
--- a/embassy-stm32/src/pac/stm32l431vc.rs
+++ b/embassy-stm32/src/pac/stm32l431vc.rs
@@ -238,7 +238,7 @@ pub mod interrupt {
238 238
239 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 239 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
240 #[allow(non_camel_case_types)] 240 #[allow(non_camel_case_types)]
241 enum InterruptEnum { 241 pub enum InterruptEnum {
242 ADC1 = 18, 242 ADC1 = 18,
243 CAN1_RX0 = 20, 243 CAN1_RX0 = 20,
244 CAN1_RX1 = 21, 244 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32l432kb.rs b/embassy-stm32/src/pac/stm32l432kb.rs
index 6f49490e1..710b9a553 100644
--- a/embassy-stm32/src/pac/stm32l432kb.rs
+++ b/embassy-stm32/src/pac/stm32l432kb.rs
@@ -162,7 +162,7 @@ pub mod interrupt {
162 162
163 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 163 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
164 #[allow(non_camel_case_types)] 164 #[allow(non_camel_case_types)]
165 enum InterruptEnum { 165 pub enum InterruptEnum {
166 ADC1 = 18, 166 ADC1 = 18,
167 CAN1_RX0 = 20, 167 CAN1_RX0 = 20,
168 CAN1_RX1 = 21, 168 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32l432kc.rs b/embassy-stm32/src/pac/stm32l432kc.rs
index 6f49490e1..710b9a553 100644
--- a/embassy-stm32/src/pac/stm32l432kc.rs
+++ b/embassy-stm32/src/pac/stm32l432kc.rs
@@ -162,7 +162,7 @@ pub mod interrupt {
162 162
163 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 163 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
164 #[allow(non_camel_case_types)] 164 #[allow(non_camel_case_types)]
165 enum InterruptEnum { 165 pub enum InterruptEnum {
166 ADC1 = 18, 166 ADC1 = 18,
167 CAN1_RX0 = 20, 167 CAN1_RX0 = 20,
168 CAN1_RX1 = 21, 168 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32l433cb.rs b/embassy-stm32/src/pac/stm32l433cb.rs
index 523c14eb5..c0a20384b 100644
--- a/embassy-stm32/src/pac/stm32l433cb.rs
+++ b/embassy-stm32/src/pac/stm32l433cb.rs
@@ -238,7 +238,7 @@ pub mod interrupt {
238 238
239 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 239 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
240 #[allow(non_camel_case_types)] 240 #[allow(non_camel_case_types)]
241 enum InterruptEnum { 241 pub enum InterruptEnum {
242 ADC1 = 18, 242 ADC1 = 18,
243 CAN1_RX0 = 20, 243 CAN1_RX0 = 20,
244 CAN1_RX1 = 21, 244 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32l433cc.rs b/embassy-stm32/src/pac/stm32l433cc.rs
index 523c14eb5..c0a20384b 100644
--- a/embassy-stm32/src/pac/stm32l433cc.rs
+++ b/embassy-stm32/src/pac/stm32l433cc.rs
@@ -238,7 +238,7 @@ pub mod interrupt {
238 238
239 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 239 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
240 #[allow(non_camel_case_types)] 240 #[allow(non_camel_case_types)]
241 enum InterruptEnum { 241 pub enum InterruptEnum {
242 ADC1 = 18, 242 ADC1 = 18,
243 CAN1_RX0 = 20, 243 CAN1_RX0 = 20,
244 CAN1_RX1 = 21, 244 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32l433rb.rs b/embassy-stm32/src/pac/stm32l433rb.rs
index 523c14eb5..c0a20384b 100644
--- a/embassy-stm32/src/pac/stm32l433rb.rs
+++ b/embassy-stm32/src/pac/stm32l433rb.rs
@@ -238,7 +238,7 @@ pub mod interrupt {
238 238
239 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 239 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
240 #[allow(non_camel_case_types)] 240 #[allow(non_camel_case_types)]
241 enum InterruptEnum { 241 pub enum InterruptEnum {
242 ADC1 = 18, 242 ADC1 = 18,
243 CAN1_RX0 = 20, 243 CAN1_RX0 = 20,
244 CAN1_RX1 = 21, 244 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32l433rc.rs b/embassy-stm32/src/pac/stm32l433rc.rs
index 523c14eb5..c0a20384b 100644
--- a/embassy-stm32/src/pac/stm32l433rc.rs
+++ b/embassy-stm32/src/pac/stm32l433rc.rs
@@ -238,7 +238,7 @@ pub mod interrupt {
238 238
239 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 239 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
240 #[allow(non_camel_case_types)] 240 #[allow(non_camel_case_types)]
241 enum InterruptEnum { 241 pub enum InterruptEnum {
242 ADC1 = 18, 242 ADC1 = 18,
243 CAN1_RX0 = 20, 243 CAN1_RX0 = 20,
244 CAN1_RX1 = 21, 244 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32l433vc.rs b/embassy-stm32/src/pac/stm32l433vc.rs
index 523c14eb5..c0a20384b 100644
--- a/embassy-stm32/src/pac/stm32l433vc.rs
+++ b/embassy-stm32/src/pac/stm32l433vc.rs
@@ -238,7 +238,7 @@ pub mod interrupt {
238 238
239 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 239 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
240 #[allow(non_camel_case_types)] 240 #[allow(non_camel_case_types)]
241 enum InterruptEnum { 241 pub enum InterruptEnum {
242 ADC1 = 18, 242 ADC1 = 18,
243 CAN1_RX0 = 20, 243 CAN1_RX0 = 20,
244 CAN1_RX1 = 21, 244 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32l442kc.rs b/embassy-stm32/src/pac/stm32l442kc.rs
index 43847827e..50327e478 100644
--- a/embassy-stm32/src/pac/stm32l442kc.rs
+++ b/embassy-stm32/src/pac/stm32l442kc.rs
@@ -162,7 +162,7 @@ pub mod interrupt {
162 162
163 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 163 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
164 #[allow(non_camel_case_types)] 164 #[allow(non_camel_case_types)]
165 enum InterruptEnum { 165 pub enum InterruptEnum {
166 ADC1 = 18, 166 ADC1 = 18,
167 AES = 79, 167 AES = 79,
168 CAN1_RX0 = 20, 168 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l443cc.rs b/embassy-stm32/src/pac/stm32l443cc.rs
index 221a674a0..7b2c924d2 100644
--- a/embassy-stm32/src/pac/stm32l443cc.rs
+++ b/embassy-stm32/src/pac/stm32l443cc.rs
@@ -238,7 +238,7 @@ pub mod interrupt {
238 238
239 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 239 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
240 #[allow(non_camel_case_types)] 240 #[allow(non_camel_case_types)]
241 enum InterruptEnum { 241 pub enum InterruptEnum {
242 ADC1 = 18, 242 ADC1 = 18,
243 AES = 79, 243 AES = 79,
244 CAN1_RX0 = 20, 244 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l443rc.rs b/embassy-stm32/src/pac/stm32l443rc.rs
index 221a674a0..7b2c924d2 100644
--- a/embassy-stm32/src/pac/stm32l443rc.rs
+++ b/embassy-stm32/src/pac/stm32l443rc.rs
@@ -238,7 +238,7 @@ pub mod interrupt {
238 238
239 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 239 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
240 #[allow(non_camel_case_types)] 240 #[allow(non_camel_case_types)]
241 enum InterruptEnum { 241 pub enum InterruptEnum {
242 ADC1 = 18, 242 ADC1 = 18,
243 AES = 79, 243 AES = 79,
244 CAN1_RX0 = 20, 244 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l443vc.rs b/embassy-stm32/src/pac/stm32l443vc.rs
index 221a674a0..7b2c924d2 100644
--- a/embassy-stm32/src/pac/stm32l443vc.rs
+++ b/embassy-stm32/src/pac/stm32l443vc.rs
@@ -238,7 +238,7 @@ pub mod interrupt {
238 238
239 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 239 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
240 #[allow(non_camel_case_types)] 240 #[allow(non_camel_case_types)]
241 enum InterruptEnum { 241 pub enum InterruptEnum {
242 ADC1 = 18, 242 ADC1 = 18,
243 AES = 79, 243 AES = 79,
244 CAN1_RX0 = 20, 244 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l451cc.rs b/embassy-stm32/src/pac/stm32l451cc.rs
index f574c379c..d7fac3bfe 100644
--- a/embassy-stm32/src/pac/stm32l451cc.rs
+++ b/embassy-stm32/src/pac/stm32l451cc.rs
@@ -204,7 +204,7 @@ pub mod interrupt {
204 204
205 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 205 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
206 #[allow(non_camel_case_types)] 206 #[allow(non_camel_case_types)]
207 enum InterruptEnum { 207 pub enum InterruptEnum {
208 ADC1 = 18, 208 ADC1 = 18,
209 CAN1_RX0 = 20, 209 CAN1_RX0 = 20,
210 CAN1_RX1 = 21, 210 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32l451ce.rs b/embassy-stm32/src/pac/stm32l451ce.rs
index f574c379c..d7fac3bfe 100644
--- a/embassy-stm32/src/pac/stm32l451ce.rs
+++ b/embassy-stm32/src/pac/stm32l451ce.rs
@@ -204,7 +204,7 @@ pub mod interrupt {
204 204
205 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 205 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
206 #[allow(non_camel_case_types)] 206 #[allow(non_camel_case_types)]
207 enum InterruptEnum { 207 pub enum InterruptEnum {
208 ADC1 = 18, 208 ADC1 = 18,
209 CAN1_RX0 = 20, 209 CAN1_RX0 = 20,
210 CAN1_RX1 = 21, 210 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32l451rc.rs b/embassy-stm32/src/pac/stm32l451rc.rs
index f574c379c..d7fac3bfe 100644
--- a/embassy-stm32/src/pac/stm32l451rc.rs
+++ b/embassy-stm32/src/pac/stm32l451rc.rs
@@ -204,7 +204,7 @@ pub mod interrupt {
204 204
205 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 205 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
206 #[allow(non_camel_case_types)] 206 #[allow(non_camel_case_types)]
207 enum InterruptEnum { 207 pub enum InterruptEnum {
208 ADC1 = 18, 208 ADC1 = 18,
209 CAN1_RX0 = 20, 209 CAN1_RX0 = 20,
210 CAN1_RX1 = 21, 210 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32l451re.rs b/embassy-stm32/src/pac/stm32l451re.rs
index f574c379c..d7fac3bfe 100644
--- a/embassy-stm32/src/pac/stm32l451re.rs
+++ b/embassy-stm32/src/pac/stm32l451re.rs
@@ -204,7 +204,7 @@ pub mod interrupt {
204 204
205 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 205 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
206 #[allow(non_camel_case_types)] 206 #[allow(non_camel_case_types)]
207 enum InterruptEnum { 207 pub enum InterruptEnum {
208 ADC1 = 18, 208 ADC1 = 18,
209 CAN1_RX0 = 20, 209 CAN1_RX0 = 20,
210 CAN1_RX1 = 21, 210 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32l451vc.rs b/embassy-stm32/src/pac/stm32l451vc.rs
index f574c379c..d7fac3bfe 100644
--- a/embassy-stm32/src/pac/stm32l451vc.rs
+++ b/embassy-stm32/src/pac/stm32l451vc.rs
@@ -204,7 +204,7 @@ pub mod interrupt {
204 204
205 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 205 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
206 #[allow(non_camel_case_types)] 206 #[allow(non_camel_case_types)]
207 enum InterruptEnum { 207 pub enum InterruptEnum {
208 ADC1 = 18, 208 ADC1 = 18,
209 CAN1_RX0 = 20, 209 CAN1_RX0 = 20,
210 CAN1_RX1 = 21, 210 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32l451ve.rs b/embassy-stm32/src/pac/stm32l451ve.rs
index f574c379c..d7fac3bfe 100644
--- a/embassy-stm32/src/pac/stm32l451ve.rs
+++ b/embassy-stm32/src/pac/stm32l451ve.rs
@@ -204,7 +204,7 @@ pub mod interrupt {
204 204
205 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 205 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
206 #[allow(non_camel_case_types)] 206 #[allow(non_camel_case_types)]
207 enum InterruptEnum { 207 pub enum InterruptEnum {
208 ADC1 = 18, 208 ADC1 = 18,
209 CAN1_RX0 = 20, 209 CAN1_RX0 = 20,
210 CAN1_RX1 = 21, 210 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32l452cc.rs b/embassy-stm32/src/pac/stm32l452cc.rs
index fdb8f0e75..c63b796eb 100644
--- a/embassy-stm32/src/pac/stm32l452cc.rs
+++ b/embassy-stm32/src/pac/stm32l452cc.rs
@@ -204,7 +204,7 @@ pub mod interrupt {
204 204
205 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 205 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
206 #[allow(non_camel_case_types)] 206 #[allow(non_camel_case_types)]
207 enum InterruptEnum { 207 pub enum InterruptEnum {
208 ADC1 = 18, 208 ADC1 = 18,
209 CAN1_RX0 = 20, 209 CAN1_RX0 = 20,
210 CAN1_RX1 = 21, 210 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32l452ce.rs b/embassy-stm32/src/pac/stm32l452ce.rs
index fdb8f0e75..c63b796eb 100644
--- a/embassy-stm32/src/pac/stm32l452ce.rs
+++ b/embassy-stm32/src/pac/stm32l452ce.rs
@@ -204,7 +204,7 @@ pub mod interrupt {
204 204
205 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 205 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
206 #[allow(non_camel_case_types)] 206 #[allow(non_camel_case_types)]
207 enum InterruptEnum { 207 pub enum InterruptEnum {
208 ADC1 = 18, 208 ADC1 = 18,
209 CAN1_RX0 = 20, 209 CAN1_RX0 = 20,
210 CAN1_RX1 = 21, 210 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32l452rc.rs b/embassy-stm32/src/pac/stm32l452rc.rs
index fdb8f0e75..c63b796eb 100644
--- a/embassy-stm32/src/pac/stm32l452rc.rs
+++ b/embassy-stm32/src/pac/stm32l452rc.rs
@@ -204,7 +204,7 @@ pub mod interrupt {
204 204
205 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 205 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
206 #[allow(non_camel_case_types)] 206 #[allow(non_camel_case_types)]
207 enum InterruptEnum { 207 pub enum InterruptEnum {
208 ADC1 = 18, 208 ADC1 = 18,
209 CAN1_RX0 = 20, 209 CAN1_RX0 = 20,
210 CAN1_RX1 = 21, 210 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32l452re.rs b/embassy-stm32/src/pac/stm32l452re.rs
index fdb8f0e75..c63b796eb 100644
--- a/embassy-stm32/src/pac/stm32l452re.rs
+++ b/embassy-stm32/src/pac/stm32l452re.rs
@@ -204,7 +204,7 @@ pub mod interrupt {
204 204
205 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 205 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
206 #[allow(non_camel_case_types)] 206 #[allow(non_camel_case_types)]
207 enum InterruptEnum { 207 pub enum InterruptEnum {
208 ADC1 = 18, 208 ADC1 = 18,
209 CAN1_RX0 = 20, 209 CAN1_RX0 = 20,
210 CAN1_RX1 = 21, 210 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32l452vc.rs b/embassy-stm32/src/pac/stm32l452vc.rs
index fdb8f0e75..c63b796eb 100644
--- a/embassy-stm32/src/pac/stm32l452vc.rs
+++ b/embassy-stm32/src/pac/stm32l452vc.rs
@@ -204,7 +204,7 @@ pub mod interrupt {
204 204
205 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 205 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
206 #[allow(non_camel_case_types)] 206 #[allow(non_camel_case_types)]
207 enum InterruptEnum { 207 pub enum InterruptEnum {
208 ADC1 = 18, 208 ADC1 = 18,
209 CAN1_RX0 = 20, 209 CAN1_RX0 = 20,
210 CAN1_RX1 = 21, 210 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32l452ve.rs b/embassy-stm32/src/pac/stm32l452ve.rs
index fdb8f0e75..c63b796eb 100644
--- a/embassy-stm32/src/pac/stm32l452ve.rs
+++ b/embassy-stm32/src/pac/stm32l452ve.rs
@@ -204,7 +204,7 @@ pub mod interrupt {
204 204
205 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 205 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
206 #[allow(non_camel_case_types)] 206 #[allow(non_camel_case_types)]
207 enum InterruptEnum { 207 pub enum InterruptEnum {
208 ADC1 = 18, 208 ADC1 = 18,
209 CAN1_RX0 = 20, 209 CAN1_RX0 = 20,
210 CAN1_RX1 = 21, 210 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32l462ce.rs b/embassy-stm32/src/pac/stm32l462ce.rs
index c039d6a86..1e16213e7 100644
--- a/embassy-stm32/src/pac/stm32l462ce.rs
+++ b/embassy-stm32/src/pac/stm32l462ce.rs
@@ -204,7 +204,7 @@ pub mod interrupt {
204 204
205 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 205 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
206 #[allow(non_camel_case_types)] 206 #[allow(non_camel_case_types)]
207 enum InterruptEnum { 207 pub enum InterruptEnum {
208 ADC1 = 18, 208 ADC1 = 18,
209 AES = 79, 209 AES = 79,
210 CAN1_RX0 = 20, 210 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l462re.rs b/embassy-stm32/src/pac/stm32l462re.rs
index c039d6a86..1e16213e7 100644
--- a/embassy-stm32/src/pac/stm32l462re.rs
+++ b/embassy-stm32/src/pac/stm32l462re.rs
@@ -204,7 +204,7 @@ pub mod interrupt {
204 204
205 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 205 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
206 #[allow(non_camel_case_types)] 206 #[allow(non_camel_case_types)]
207 enum InterruptEnum { 207 pub enum InterruptEnum {
208 ADC1 = 18, 208 ADC1 = 18,
209 AES = 79, 209 AES = 79,
210 CAN1_RX0 = 20, 210 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l462ve.rs b/embassy-stm32/src/pac/stm32l462ve.rs
index c039d6a86..1e16213e7 100644
--- a/embassy-stm32/src/pac/stm32l462ve.rs
+++ b/embassy-stm32/src/pac/stm32l462ve.rs
@@ -204,7 +204,7 @@ pub mod interrupt {
204 204
205 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 205 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
206 #[allow(non_camel_case_types)] 206 #[allow(non_camel_case_types)]
207 enum InterruptEnum { 207 pub enum InterruptEnum {
208 ADC1 = 18, 208 ADC1 = 18,
209 AES = 79, 209 AES = 79,
210 CAN1_RX0 = 20, 210 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l471qe.rs b/embassy-stm32/src/pac/stm32l471qe.rs
index 2a9444a62..9bd000b6d 100644
--- a/embassy-stm32/src/pac/stm32l471qe.rs
+++ b/embassy-stm32/src/pac/stm32l471qe.rs
@@ -243,7 +243,7 @@ pub mod interrupt {
243 243
244 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 244 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
245 #[allow(non_camel_case_types)] 245 #[allow(non_camel_case_types)]
246 enum InterruptEnum { 246 pub enum InterruptEnum {
247 ADC1_2 = 18, 247 ADC1_2 = 18,
248 ADC3 = 47, 248 ADC3 = 47,
249 CAN1_RX0 = 20, 249 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l471qg.rs b/embassy-stm32/src/pac/stm32l471qg.rs
index 2a9444a62..9bd000b6d 100644
--- a/embassy-stm32/src/pac/stm32l471qg.rs
+++ b/embassy-stm32/src/pac/stm32l471qg.rs
@@ -243,7 +243,7 @@ pub mod interrupt {
243 243
244 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 244 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
245 #[allow(non_camel_case_types)] 245 #[allow(non_camel_case_types)]
246 enum InterruptEnum { 246 pub enum InterruptEnum {
247 ADC1_2 = 18, 247 ADC1_2 = 18,
248 ADC3 = 47, 248 ADC3 = 47,
249 CAN1_RX0 = 20, 249 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l471re.rs b/embassy-stm32/src/pac/stm32l471re.rs
index 2a9444a62..9bd000b6d 100644
--- a/embassy-stm32/src/pac/stm32l471re.rs
+++ b/embassy-stm32/src/pac/stm32l471re.rs
@@ -243,7 +243,7 @@ pub mod interrupt {
243 243
244 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 244 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
245 #[allow(non_camel_case_types)] 245 #[allow(non_camel_case_types)]
246 enum InterruptEnum { 246 pub enum InterruptEnum {
247 ADC1_2 = 18, 247 ADC1_2 = 18,
248 ADC3 = 47, 248 ADC3 = 47,
249 CAN1_RX0 = 20, 249 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l471rg.rs b/embassy-stm32/src/pac/stm32l471rg.rs
index 2a9444a62..9bd000b6d 100644
--- a/embassy-stm32/src/pac/stm32l471rg.rs
+++ b/embassy-stm32/src/pac/stm32l471rg.rs
@@ -243,7 +243,7 @@ pub mod interrupt {
243 243
244 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 244 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
245 #[allow(non_camel_case_types)] 245 #[allow(non_camel_case_types)]
246 enum InterruptEnum { 246 pub enum InterruptEnum {
247 ADC1_2 = 18, 247 ADC1_2 = 18,
248 ADC3 = 47, 248 ADC3 = 47,
249 CAN1_RX0 = 20, 249 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l471ve.rs b/embassy-stm32/src/pac/stm32l471ve.rs
index 2a9444a62..9bd000b6d 100644
--- a/embassy-stm32/src/pac/stm32l471ve.rs
+++ b/embassy-stm32/src/pac/stm32l471ve.rs
@@ -243,7 +243,7 @@ pub mod interrupt {
243 243
244 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 244 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
245 #[allow(non_camel_case_types)] 245 #[allow(non_camel_case_types)]
246 enum InterruptEnum { 246 pub enum InterruptEnum {
247 ADC1_2 = 18, 247 ADC1_2 = 18,
248 ADC3 = 47, 248 ADC3 = 47,
249 CAN1_RX0 = 20, 249 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l471vg.rs b/embassy-stm32/src/pac/stm32l471vg.rs
index 2a9444a62..9bd000b6d 100644
--- a/embassy-stm32/src/pac/stm32l471vg.rs
+++ b/embassy-stm32/src/pac/stm32l471vg.rs
@@ -243,7 +243,7 @@ pub mod interrupt {
243 243
244 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 244 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
245 #[allow(non_camel_case_types)] 245 #[allow(non_camel_case_types)]
246 enum InterruptEnum { 246 pub enum InterruptEnum {
247 ADC1_2 = 18, 247 ADC1_2 = 18,
248 ADC3 = 47, 248 ADC3 = 47,
249 CAN1_RX0 = 20, 249 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l471ze.rs b/embassy-stm32/src/pac/stm32l471ze.rs
index 2a9444a62..9bd000b6d 100644
--- a/embassy-stm32/src/pac/stm32l471ze.rs
+++ b/embassy-stm32/src/pac/stm32l471ze.rs
@@ -243,7 +243,7 @@ pub mod interrupt {
243 243
244 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 244 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
245 #[allow(non_camel_case_types)] 245 #[allow(non_camel_case_types)]
246 enum InterruptEnum { 246 pub enum InterruptEnum {
247 ADC1_2 = 18, 247 ADC1_2 = 18,
248 ADC3 = 47, 248 ADC3 = 47,
249 CAN1_RX0 = 20, 249 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l471zg.rs b/embassy-stm32/src/pac/stm32l471zg.rs
index 2a9444a62..9bd000b6d 100644
--- a/embassy-stm32/src/pac/stm32l471zg.rs
+++ b/embassy-stm32/src/pac/stm32l471zg.rs
@@ -243,7 +243,7 @@ pub mod interrupt {
243 243
244 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 244 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
245 #[allow(non_camel_case_types)] 245 #[allow(non_camel_case_types)]
246 enum InterruptEnum { 246 pub enum InterruptEnum {
247 ADC1_2 = 18, 247 ADC1_2 = 18,
248 ADC3 = 47, 248 ADC3 = 47,
249 CAN1_RX0 = 20, 249 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l475rc.rs b/embassy-stm32/src/pac/stm32l475rc.rs
index 40de9ba86..869f68222 100644
--- a/embassy-stm32/src/pac/stm32l475rc.rs
+++ b/embassy-stm32/src/pac/stm32l475rc.rs
@@ -243,7 +243,7 @@ pub mod interrupt {
243 243
244 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 244 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
245 #[allow(non_camel_case_types)] 245 #[allow(non_camel_case_types)]
246 enum InterruptEnum { 246 pub enum InterruptEnum {
247 ADC1_2 = 18, 247 ADC1_2 = 18,
248 ADC3 = 47, 248 ADC3 = 47,
249 CAN1_RX0 = 20, 249 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l475re.rs b/embassy-stm32/src/pac/stm32l475re.rs
index 40de9ba86..869f68222 100644
--- a/embassy-stm32/src/pac/stm32l475re.rs
+++ b/embassy-stm32/src/pac/stm32l475re.rs
@@ -243,7 +243,7 @@ pub mod interrupt {
243 243
244 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 244 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
245 #[allow(non_camel_case_types)] 245 #[allow(non_camel_case_types)]
246 enum InterruptEnum { 246 pub enum InterruptEnum {
247 ADC1_2 = 18, 247 ADC1_2 = 18,
248 ADC3 = 47, 248 ADC3 = 47,
249 CAN1_RX0 = 20, 249 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l475rg.rs b/embassy-stm32/src/pac/stm32l475rg.rs
index 40de9ba86..869f68222 100644
--- a/embassy-stm32/src/pac/stm32l475rg.rs
+++ b/embassy-stm32/src/pac/stm32l475rg.rs
@@ -243,7 +243,7 @@ pub mod interrupt {
243 243
244 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 244 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
245 #[allow(non_camel_case_types)] 245 #[allow(non_camel_case_types)]
246 enum InterruptEnum { 246 pub enum InterruptEnum {
247 ADC1_2 = 18, 247 ADC1_2 = 18,
248 ADC3 = 47, 248 ADC3 = 47,
249 CAN1_RX0 = 20, 249 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l475vc.rs b/embassy-stm32/src/pac/stm32l475vc.rs
index 40de9ba86..869f68222 100644
--- a/embassy-stm32/src/pac/stm32l475vc.rs
+++ b/embassy-stm32/src/pac/stm32l475vc.rs
@@ -243,7 +243,7 @@ pub mod interrupt {
243 243
244 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 244 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
245 #[allow(non_camel_case_types)] 245 #[allow(non_camel_case_types)]
246 enum InterruptEnum { 246 pub enum InterruptEnum {
247 ADC1_2 = 18, 247 ADC1_2 = 18,
248 ADC3 = 47, 248 ADC3 = 47,
249 CAN1_RX0 = 20, 249 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l475ve.rs b/embassy-stm32/src/pac/stm32l475ve.rs
index 40de9ba86..869f68222 100644
--- a/embassy-stm32/src/pac/stm32l475ve.rs
+++ b/embassy-stm32/src/pac/stm32l475ve.rs
@@ -243,7 +243,7 @@ pub mod interrupt {
243 243
244 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 244 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
245 #[allow(non_camel_case_types)] 245 #[allow(non_camel_case_types)]
246 enum InterruptEnum { 246 pub enum InterruptEnum {
247 ADC1_2 = 18, 247 ADC1_2 = 18,
248 ADC3 = 47, 248 ADC3 = 47,
249 CAN1_RX0 = 20, 249 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l475vg.rs b/embassy-stm32/src/pac/stm32l475vg.rs
index 40de9ba86..869f68222 100644
--- a/embassy-stm32/src/pac/stm32l475vg.rs
+++ b/embassy-stm32/src/pac/stm32l475vg.rs
@@ -243,7 +243,7 @@ pub mod interrupt {
243 243
244 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 244 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
245 #[allow(non_camel_case_types)] 245 #[allow(non_camel_case_types)]
246 enum InterruptEnum { 246 pub enum InterruptEnum {
247 ADC1_2 = 18, 247 ADC1_2 = 18,
248 ADC3 = 47, 248 ADC3 = 47,
249 CAN1_RX0 = 20, 249 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l476je.rs b/embassy-stm32/src/pac/stm32l476je.rs
index c2230994a..6b5cb4ba6 100644
--- a/embassy-stm32/src/pac/stm32l476je.rs
+++ b/embassy-stm32/src/pac/stm32l476je.rs
@@ -243,7 +243,7 @@ pub mod interrupt {
243 243
244 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 244 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
245 #[allow(non_camel_case_types)] 245 #[allow(non_camel_case_types)]
246 enum InterruptEnum { 246 pub enum InterruptEnum {
247 ADC1_2 = 18, 247 ADC1_2 = 18,
248 ADC3 = 47, 248 ADC3 = 47,
249 CAN1_RX0 = 20, 249 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l476jg.rs b/embassy-stm32/src/pac/stm32l476jg.rs
index c2230994a..6b5cb4ba6 100644
--- a/embassy-stm32/src/pac/stm32l476jg.rs
+++ b/embassy-stm32/src/pac/stm32l476jg.rs
@@ -243,7 +243,7 @@ pub mod interrupt {
243 243
244 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 244 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
245 #[allow(non_camel_case_types)] 245 #[allow(non_camel_case_types)]
246 enum InterruptEnum { 246 pub enum InterruptEnum {
247 ADC1_2 = 18, 247 ADC1_2 = 18,
248 ADC3 = 47, 248 ADC3 = 47,
249 CAN1_RX0 = 20, 249 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l476me.rs b/embassy-stm32/src/pac/stm32l476me.rs
index c2230994a..6b5cb4ba6 100644
--- a/embassy-stm32/src/pac/stm32l476me.rs
+++ b/embassy-stm32/src/pac/stm32l476me.rs
@@ -243,7 +243,7 @@ pub mod interrupt {
243 243
244 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 244 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
245 #[allow(non_camel_case_types)] 245 #[allow(non_camel_case_types)]
246 enum InterruptEnum { 246 pub enum InterruptEnum {
247 ADC1_2 = 18, 247 ADC1_2 = 18,
248 ADC3 = 47, 248 ADC3 = 47,
249 CAN1_RX0 = 20, 249 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l476mg.rs b/embassy-stm32/src/pac/stm32l476mg.rs
index c2230994a..6b5cb4ba6 100644
--- a/embassy-stm32/src/pac/stm32l476mg.rs
+++ b/embassy-stm32/src/pac/stm32l476mg.rs
@@ -243,7 +243,7 @@ pub mod interrupt {
243 243
244 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 244 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
245 #[allow(non_camel_case_types)] 245 #[allow(non_camel_case_types)]
246 enum InterruptEnum { 246 pub enum InterruptEnum {
247 ADC1_2 = 18, 247 ADC1_2 = 18,
248 ADC3 = 47, 248 ADC3 = 47,
249 CAN1_RX0 = 20, 249 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l476qe.rs b/embassy-stm32/src/pac/stm32l476qe.rs
index c2230994a..6b5cb4ba6 100644
--- a/embassy-stm32/src/pac/stm32l476qe.rs
+++ b/embassy-stm32/src/pac/stm32l476qe.rs
@@ -243,7 +243,7 @@ pub mod interrupt {
243 243
244 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 244 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
245 #[allow(non_camel_case_types)] 245 #[allow(non_camel_case_types)]
246 enum InterruptEnum { 246 pub enum InterruptEnum {
247 ADC1_2 = 18, 247 ADC1_2 = 18,
248 ADC3 = 47, 248 ADC3 = 47,
249 CAN1_RX0 = 20, 249 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l476qg.rs b/embassy-stm32/src/pac/stm32l476qg.rs
index c2230994a..6b5cb4ba6 100644
--- a/embassy-stm32/src/pac/stm32l476qg.rs
+++ b/embassy-stm32/src/pac/stm32l476qg.rs
@@ -243,7 +243,7 @@ pub mod interrupt {
243 243
244 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 244 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
245 #[allow(non_camel_case_types)] 245 #[allow(non_camel_case_types)]
246 enum InterruptEnum { 246 pub enum InterruptEnum {
247 ADC1_2 = 18, 247 ADC1_2 = 18,
248 ADC3 = 47, 248 ADC3 = 47,
249 CAN1_RX0 = 20, 249 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l476rc.rs b/embassy-stm32/src/pac/stm32l476rc.rs
index c2230994a..6b5cb4ba6 100644
--- a/embassy-stm32/src/pac/stm32l476rc.rs
+++ b/embassy-stm32/src/pac/stm32l476rc.rs
@@ -243,7 +243,7 @@ pub mod interrupt {
243 243
244 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 244 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
245 #[allow(non_camel_case_types)] 245 #[allow(non_camel_case_types)]
246 enum InterruptEnum { 246 pub enum InterruptEnum {
247 ADC1_2 = 18, 247 ADC1_2 = 18,
248 ADC3 = 47, 248 ADC3 = 47,
249 CAN1_RX0 = 20, 249 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l476re.rs b/embassy-stm32/src/pac/stm32l476re.rs
index c2230994a..6b5cb4ba6 100644
--- a/embassy-stm32/src/pac/stm32l476re.rs
+++ b/embassy-stm32/src/pac/stm32l476re.rs
@@ -243,7 +243,7 @@ pub mod interrupt {
243 243
244 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 244 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
245 #[allow(non_camel_case_types)] 245 #[allow(non_camel_case_types)]
246 enum InterruptEnum { 246 pub enum InterruptEnum {
247 ADC1_2 = 18, 247 ADC1_2 = 18,
248 ADC3 = 47, 248 ADC3 = 47,
249 CAN1_RX0 = 20, 249 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l476rg.rs b/embassy-stm32/src/pac/stm32l476rg.rs
index c2230994a..6b5cb4ba6 100644
--- a/embassy-stm32/src/pac/stm32l476rg.rs
+++ b/embassy-stm32/src/pac/stm32l476rg.rs
@@ -243,7 +243,7 @@ pub mod interrupt {
243 243
244 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 244 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
245 #[allow(non_camel_case_types)] 245 #[allow(non_camel_case_types)]
246 enum InterruptEnum { 246 pub enum InterruptEnum {
247 ADC1_2 = 18, 247 ADC1_2 = 18,
248 ADC3 = 47, 248 ADC3 = 47,
249 CAN1_RX0 = 20, 249 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l476vc.rs b/embassy-stm32/src/pac/stm32l476vc.rs
index c2230994a..6b5cb4ba6 100644
--- a/embassy-stm32/src/pac/stm32l476vc.rs
+++ b/embassy-stm32/src/pac/stm32l476vc.rs
@@ -243,7 +243,7 @@ pub mod interrupt {
243 243
244 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 244 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
245 #[allow(non_camel_case_types)] 245 #[allow(non_camel_case_types)]
246 enum InterruptEnum { 246 pub enum InterruptEnum {
247 ADC1_2 = 18, 247 ADC1_2 = 18,
248 ADC3 = 47, 248 ADC3 = 47,
249 CAN1_RX0 = 20, 249 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l476ve.rs b/embassy-stm32/src/pac/stm32l476ve.rs
index c2230994a..6b5cb4ba6 100644
--- a/embassy-stm32/src/pac/stm32l476ve.rs
+++ b/embassy-stm32/src/pac/stm32l476ve.rs
@@ -243,7 +243,7 @@ pub mod interrupt {
243 243
244 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 244 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
245 #[allow(non_camel_case_types)] 245 #[allow(non_camel_case_types)]
246 enum InterruptEnum { 246 pub enum InterruptEnum {
247 ADC1_2 = 18, 247 ADC1_2 = 18,
248 ADC3 = 47, 248 ADC3 = 47,
249 CAN1_RX0 = 20, 249 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l476vg.rs b/embassy-stm32/src/pac/stm32l476vg.rs
index c2230994a..6b5cb4ba6 100644
--- a/embassy-stm32/src/pac/stm32l476vg.rs
+++ b/embassy-stm32/src/pac/stm32l476vg.rs
@@ -243,7 +243,7 @@ pub mod interrupt {
243 243
244 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 244 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
245 #[allow(non_camel_case_types)] 245 #[allow(non_camel_case_types)]
246 enum InterruptEnum { 246 pub enum InterruptEnum {
247 ADC1_2 = 18, 247 ADC1_2 = 18,
248 ADC3 = 47, 248 ADC3 = 47,
249 CAN1_RX0 = 20, 249 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l476ze.rs b/embassy-stm32/src/pac/stm32l476ze.rs
index c2230994a..6b5cb4ba6 100644
--- a/embassy-stm32/src/pac/stm32l476ze.rs
+++ b/embassy-stm32/src/pac/stm32l476ze.rs
@@ -243,7 +243,7 @@ pub mod interrupt {
243 243
244 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 244 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
245 #[allow(non_camel_case_types)] 245 #[allow(non_camel_case_types)]
246 enum InterruptEnum { 246 pub enum InterruptEnum {
247 ADC1_2 = 18, 247 ADC1_2 = 18,
248 ADC3 = 47, 248 ADC3 = 47,
249 CAN1_RX0 = 20, 249 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l476zg.rs b/embassy-stm32/src/pac/stm32l476zg.rs
index c2230994a..6b5cb4ba6 100644
--- a/embassy-stm32/src/pac/stm32l476zg.rs
+++ b/embassy-stm32/src/pac/stm32l476zg.rs
@@ -243,7 +243,7 @@ pub mod interrupt {
243 243
244 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 244 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
245 #[allow(non_camel_case_types)] 245 #[allow(non_camel_case_types)]
246 enum InterruptEnum { 246 pub enum InterruptEnum {
247 ADC1_2 = 18, 247 ADC1_2 = 18,
248 ADC3 = 47, 248 ADC3 = 47,
249 CAN1_RX0 = 20, 249 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l485jc.rs b/embassy-stm32/src/pac/stm32l485jc.rs
index bab45b914..7d2a07af2 100644
--- a/embassy-stm32/src/pac/stm32l485jc.rs
+++ b/embassy-stm32/src/pac/stm32l485jc.rs
@@ -243,7 +243,7 @@ pub mod interrupt {
243 243
244 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 244 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
245 #[allow(non_camel_case_types)] 245 #[allow(non_camel_case_types)]
246 enum InterruptEnum { 246 pub enum InterruptEnum {
247 ADC1_2 = 18, 247 ADC1_2 = 18,
248 ADC3 = 47, 248 ADC3 = 47,
249 AES = 79, 249 AES = 79,
diff --git a/embassy-stm32/src/pac/stm32l485je.rs b/embassy-stm32/src/pac/stm32l485je.rs
index bab45b914..7d2a07af2 100644
--- a/embassy-stm32/src/pac/stm32l485je.rs
+++ b/embassy-stm32/src/pac/stm32l485je.rs
@@ -243,7 +243,7 @@ pub mod interrupt {
243 243
244 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 244 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
245 #[allow(non_camel_case_types)] 245 #[allow(non_camel_case_types)]
246 enum InterruptEnum { 246 pub enum InterruptEnum {
247 ADC1_2 = 18, 247 ADC1_2 = 18,
248 ADC3 = 47, 248 ADC3 = 47,
249 AES = 79, 249 AES = 79,
diff --git a/embassy-stm32/src/pac/stm32l486jg.rs b/embassy-stm32/src/pac/stm32l486jg.rs
index 89067584a..7a76d404d 100644
--- a/embassy-stm32/src/pac/stm32l486jg.rs
+++ b/embassy-stm32/src/pac/stm32l486jg.rs
@@ -243,7 +243,7 @@ pub mod interrupt {
243 243
244 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 244 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
245 #[allow(non_camel_case_types)] 245 #[allow(non_camel_case_types)]
246 enum InterruptEnum { 246 pub enum InterruptEnum {
247 ADC1_2 = 18, 247 ADC1_2 = 18,
248 ADC3 = 47, 248 ADC3 = 47,
249 AES = 79, 249 AES = 79,
diff --git a/embassy-stm32/src/pac/stm32l486qg.rs b/embassy-stm32/src/pac/stm32l486qg.rs
index 89067584a..7a76d404d 100644
--- a/embassy-stm32/src/pac/stm32l486qg.rs
+++ b/embassy-stm32/src/pac/stm32l486qg.rs
@@ -243,7 +243,7 @@ pub mod interrupt {
243 243
244 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 244 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
245 #[allow(non_camel_case_types)] 245 #[allow(non_camel_case_types)]
246 enum InterruptEnum { 246 pub enum InterruptEnum {
247 ADC1_2 = 18, 247 ADC1_2 = 18,
248 ADC3 = 47, 248 ADC3 = 47,
249 AES = 79, 249 AES = 79,
diff --git a/embassy-stm32/src/pac/stm32l486rg.rs b/embassy-stm32/src/pac/stm32l486rg.rs
index 89067584a..7a76d404d 100644
--- a/embassy-stm32/src/pac/stm32l486rg.rs
+++ b/embassy-stm32/src/pac/stm32l486rg.rs
@@ -243,7 +243,7 @@ pub mod interrupt {
243 243
244 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 244 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
245 #[allow(non_camel_case_types)] 245 #[allow(non_camel_case_types)]
246 enum InterruptEnum { 246 pub enum InterruptEnum {
247 ADC1_2 = 18, 247 ADC1_2 = 18,
248 ADC3 = 47, 248 ADC3 = 47,
249 AES = 79, 249 AES = 79,
diff --git a/embassy-stm32/src/pac/stm32l486vg.rs b/embassy-stm32/src/pac/stm32l486vg.rs
index 89067584a..7a76d404d 100644
--- a/embassy-stm32/src/pac/stm32l486vg.rs
+++ b/embassy-stm32/src/pac/stm32l486vg.rs
@@ -243,7 +243,7 @@ pub mod interrupt {
243 243
244 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 244 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
245 #[allow(non_camel_case_types)] 245 #[allow(non_camel_case_types)]
246 enum InterruptEnum { 246 pub enum InterruptEnum {
247 ADC1_2 = 18, 247 ADC1_2 = 18,
248 ADC3 = 47, 248 ADC3 = 47,
249 AES = 79, 249 AES = 79,
diff --git a/embassy-stm32/src/pac/stm32l486zg.rs b/embassy-stm32/src/pac/stm32l486zg.rs
index 89067584a..7a76d404d 100644
--- a/embassy-stm32/src/pac/stm32l486zg.rs
+++ b/embassy-stm32/src/pac/stm32l486zg.rs
@@ -243,7 +243,7 @@ pub mod interrupt {
243 243
244 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 244 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
245 #[allow(non_camel_case_types)] 245 #[allow(non_camel_case_types)]
246 enum InterruptEnum { 246 pub enum InterruptEnum {
247 ADC1_2 = 18, 247 ADC1_2 = 18,
248 ADC3 = 47, 248 ADC3 = 47,
249 AES = 79, 249 AES = 79,
diff --git a/embassy-stm32/src/pac/stm32l496ae.rs b/embassy-stm32/src/pac/stm32l496ae.rs
index 1b48e2042..f10fd969e 100644
--- a/embassy-stm32/src/pac/stm32l496ae.rs
+++ b/embassy-stm32/src/pac/stm32l496ae.rs
@@ -309,7 +309,7 @@ pub mod interrupt {
309 309
310 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 310 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
311 #[allow(non_camel_case_types)] 311 #[allow(non_camel_case_types)]
312 enum InterruptEnum { 312 pub enum InterruptEnum {
313 ADC1_2 = 18, 313 ADC1_2 = 18,
314 ADC3 = 47, 314 ADC3 = 47,
315 CAN1_RX0 = 20, 315 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l496ag.rs b/embassy-stm32/src/pac/stm32l496ag.rs
index 1b48e2042..f10fd969e 100644
--- a/embassy-stm32/src/pac/stm32l496ag.rs
+++ b/embassy-stm32/src/pac/stm32l496ag.rs
@@ -309,7 +309,7 @@ pub mod interrupt {
309 309
310 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 310 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
311 #[allow(non_camel_case_types)] 311 #[allow(non_camel_case_types)]
312 enum InterruptEnum { 312 pub enum InterruptEnum {
313 ADC1_2 = 18, 313 ADC1_2 = 18,
314 ADC3 = 47, 314 ADC3 = 47,
315 CAN1_RX0 = 20, 315 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l496qe.rs b/embassy-stm32/src/pac/stm32l496qe.rs
index 1b48e2042..f10fd969e 100644
--- a/embassy-stm32/src/pac/stm32l496qe.rs
+++ b/embassy-stm32/src/pac/stm32l496qe.rs
@@ -309,7 +309,7 @@ pub mod interrupt {
309 309
310 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 310 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
311 #[allow(non_camel_case_types)] 311 #[allow(non_camel_case_types)]
312 enum InterruptEnum { 312 pub enum InterruptEnum {
313 ADC1_2 = 18, 313 ADC1_2 = 18,
314 ADC3 = 47, 314 ADC3 = 47,
315 CAN1_RX0 = 20, 315 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l496qg.rs b/embassy-stm32/src/pac/stm32l496qg.rs
index 1b48e2042..f10fd969e 100644
--- a/embassy-stm32/src/pac/stm32l496qg.rs
+++ b/embassy-stm32/src/pac/stm32l496qg.rs
@@ -309,7 +309,7 @@ pub mod interrupt {
309 309
310 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 310 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
311 #[allow(non_camel_case_types)] 311 #[allow(non_camel_case_types)]
312 enum InterruptEnum { 312 pub enum InterruptEnum {
313 ADC1_2 = 18, 313 ADC1_2 = 18,
314 ADC3 = 47, 314 ADC3 = 47,
315 CAN1_RX0 = 20, 315 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l496re.rs b/embassy-stm32/src/pac/stm32l496re.rs
index 1b48e2042..f10fd969e 100644
--- a/embassy-stm32/src/pac/stm32l496re.rs
+++ b/embassy-stm32/src/pac/stm32l496re.rs
@@ -309,7 +309,7 @@ pub mod interrupt {
309 309
310 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 310 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
311 #[allow(non_camel_case_types)] 311 #[allow(non_camel_case_types)]
312 enum InterruptEnum { 312 pub enum InterruptEnum {
313 ADC1_2 = 18, 313 ADC1_2 = 18,
314 ADC3 = 47, 314 ADC3 = 47,
315 CAN1_RX0 = 20, 315 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l496rg.rs b/embassy-stm32/src/pac/stm32l496rg.rs
index 1b48e2042..f10fd969e 100644
--- a/embassy-stm32/src/pac/stm32l496rg.rs
+++ b/embassy-stm32/src/pac/stm32l496rg.rs
@@ -309,7 +309,7 @@ pub mod interrupt {
309 309
310 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 310 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
311 #[allow(non_camel_case_types)] 311 #[allow(non_camel_case_types)]
312 enum InterruptEnum { 312 pub enum InterruptEnum {
313 ADC1_2 = 18, 313 ADC1_2 = 18,
314 ADC3 = 47, 314 ADC3 = 47,
315 CAN1_RX0 = 20, 315 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l496ve.rs b/embassy-stm32/src/pac/stm32l496ve.rs
index 1b48e2042..f10fd969e 100644
--- a/embassy-stm32/src/pac/stm32l496ve.rs
+++ b/embassy-stm32/src/pac/stm32l496ve.rs
@@ -309,7 +309,7 @@ pub mod interrupt {
309 309
310 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 310 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
311 #[allow(non_camel_case_types)] 311 #[allow(non_camel_case_types)]
312 enum InterruptEnum { 312 pub enum InterruptEnum {
313 ADC1_2 = 18, 313 ADC1_2 = 18,
314 ADC3 = 47, 314 ADC3 = 47,
315 CAN1_RX0 = 20, 315 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l496vg.rs b/embassy-stm32/src/pac/stm32l496vg.rs
index 1b48e2042..f10fd969e 100644
--- a/embassy-stm32/src/pac/stm32l496vg.rs
+++ b/embassy-stm32/src/pac/stm32l496vg.rs
@@ -309,7 +309,7 @@ pub mod interrupt {
309 309
310 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 310 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
311 #[allow(non_camel_case_types)] 311 #[allow(non_camel_case_types)]
312 enum InterruptEnum { 312 pub enum InterruptEnum {
313 ADC1_2 = 18, 313 ADC1_2 = 18,
314 ADC3 = 47, 314 ADC3 = 47,
315 CAN1_RX0 = 20, 315 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l496wg.rs b/embassy-stm32/src/pac/stm32l496wg.rs
index 1b48e2042..f10fd969e 100644
--- a/embassy-stm32/src/pac/stm32l496wg.rs
+++ b/embassy-stm32/src/pac/stm32l496wg.rs
@@ -309,7 +309,7 @@ pub mod interrupt {
309 309
310 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 310 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
311 #[allow(non_camel_case_types)] 311 #[allow(non_camel_case_types)]
312 enum InterruptEnum { 312 pub enum InterruptEnum {
313 ADC1_2 = 18, 313 ADC1_2 = 18,
314 ADC3 = 47, 314 ADC3 = 47,
315 CAN1_RX0 = 20, 315 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l496ze.rs b/embassy-stm32/src/pac/stm32l496ze.rs
index 1b48e2042..f10fd969e 100644
--- a/embassy-stm32/src/pac/stm32l496ze.rs
+++ b/embassy-stm32/src/pac/stm32l496ze.rs
@@ -309,7 +309,7 @@ pub mod interrupt {
309 309
310 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 310 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
311 #[allow(non_camel_case_types)] 311 #[allow(non_camel_case_types)]
312 enum InterruptEnum { 312 pub enum InterruptEnum {
313 ADC1_2 = 18, 313 ADC1_2 = 18,
314 ADC3 = 47, 314 ADC3 = 47,
315 CAN1_RX0 = 20, 315 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l496zg.rs b/embassy-stm32/src/pac/stm32l496zg.rs
index 1b48e2042..f10fd969e 100644
--- a/embassy-stm32/src/pac/stm32l496zg.rs
+++ b/embassy-stm32/src/pac/stm32l496zg.rs
@@ -309,7 +309,7 @@ pub mod interrupt {
309 309
310 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 310 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
311 #[allow(non_camel_case_types)] 311 #[allow(non_camel_case_types)]
312 enum InterruptEnum { 312 pub enum InterruptEnum {
313 ADC1_2 = 18, 313 ADC1_2 = 18,
314 ADC3 = 47, 314 ADC3 = 47,
315 CAN1_RX0 = 20, 315 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l4a6ag.rs b/embassy-stm32/src/pac/stm32l4a6ag.rs
index 250bd6d9c..863a12743 100644
--- a/embassy-stm32/src/pac/stm32l4a6ag.rs
+++ b/embassy-stm32/src/pac/stm32l4a6ag.rs
@@ -309,7 +309,7 @@ pub mod interrupt {
309 309
310 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 310 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
311 #[allow(non_camel_case_types)] 311 #[allow(non_camel_case_types)]
312 enum InterruptEnum { 312 pub enum InterruptEnum {
313 ADC1_2 = 18, 313 ADC1_2 = 18,
314 ADC3 = 47, 314 ADC3 = 47,
315 AES = 79, 315 AES = 79,
diff --git a/embassy-stm32/src/pac/stm32l4a6qg.rs b/embassy-stm32/src/pac/stm32l4a6qg.rs
index 250bd6d9c..863a12743 100644
--- a/embassy-stm32/src/pac/stm32l4a6qg.rs
+++ b/embassy-stm32/src/pac/stm32l4a6qg.rs
@@ -309,7 +309,7 @@ pub mod interrupt {
309 309
310 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 310 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
311 #[allow(non_camel_case_types)] 311 #[allow(non_camel_case_types)]
312 enum InterruptEnum { 312 pub enum InterruptEnum {
313 ADC1_2 = 18, 313 ADC1_2 = 18,
314 ADC3 = 47, 314 ADC3 = 47,
315 AES = 79, 315 AES = 79,
diff --git a/embassy-stm32/src/pac/stm32l4a6rg.rs b/embassy-stm32/src/pac/stm32l4a6rg.rs
index 250bd6d9c..863a12743 100644
--- a/embassy-stm32/src/pac/stm32l4a6rg.rs
+++ b/embassy-stm32/src/pac/stm32l4a6rg.rs
@@ -309,7 +309,7 @@ pub mod interrupt {
309 309
310 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 310 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
311 #[allow(non_camel_case_types)] 311 #[allow(non_camel_case_types)]
312 enum InterruptEnum { 312 pub enum InterruptEnum {
313 ADC1_2 = 18, 313 ADC1_2 = 18,
314 ADC3 = 47, 314 ADC3 = 47,
315 AES = 79, 315 AES = 79,
diff --git a/embassy-stm32/src/pac/stm32l4a6vg.rs b/embassy-stm32/src/pac/stm32l4a6vg.rs
index 250bd6d9c..863a12743 100644
--- a/embassy-stm32/src/pac/stm32l4a6vg.rs
+++ b/embassy-stm32/src/pac/stm32l4a6vg.rs
@@ -309,7 +309,7 @@ pub mod interrupt {
309 309
310 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 310 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
311 #[allow(non_camel_case_types)] 311 #[allow(non_camel_case_types)]
312 enum InterruptEnum { 312 pub enum InterruptEnum {
313 ADC1_2 = 18, 313 ADC1_2 = 18,
314 ADC3 = 47, 314 ADC3 = 47,
315 AES = 79, 315 AES = 79,
diff --git a/embassy-stm32/src/pac/stm32l4a6zg.rs b/embassy-stm32/src/pac/stm32l4a6zg.rs
index 250bd6d9c..863a12743 100644
--- a/embassy-stm32/src/pac/stm32l4a6zg.rs
+++ b/embassy-stm32/src/pac/stm32l4a6zg.rs
@@ -309,7 +309,7 @@ pub mod interrupt {
309 309
310 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 310 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
311 #[allow(non_camel_case_types)] 311 #[allow(non_camel_case_types)]
312 enum InterruptEnum { 312 pub enum InterruptEnum {
313 ADC1_2 = 18, 313 ADC1_2 = 18,
314 ADC3 = 47, 314 ADC3 = 47,
315 AES = 79, 315 AES = 79,
diff --git a/embassy-stm32/src/pac/stm32l4p5ae.rs b/embassy-stm32/src/pac/stm32l4p5ae.rs
index 44abb83bc..c68939c44 100644
--- a/embassy-stm32/src/pac/stm32l4p5ae.rs
+++ b/embassy-stm32/src/pac/stm32l4p5ae.rs
@@ -257,7 +257,7 @@ pub mod interrupt {
257 257
258 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 258 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
259 #[allow(non_camel_case_types)] 259 #[allow(non_camel_case_types)]
260 enum InterruptEnum { 260 pub enum InterruptEnum {
261 ADC1_2 = 18, 261 ADC1_2 = 18,
262 CAN1_RX0 = 20, 262 CAN1_RX0 = 20,
263 CAN1_RX1 = 21, 263 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32l4p5ag.rs b/embassy-stm32/src/pac/stm32l4p5ag.rs
index 44abb83bc..c68939c44 100644
--- a/embassy-stm32/src/pac/stm32l4p5ag.rs
+++ b/embassy-stm32/src/pac/stm32l4p5ag.rs
@@ -257,7 +257,7 @@ pub mod interrupt {
257 257
258 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 258 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
259 #[allow(non_camel_case_types)] 259 #[allow(non_camel_case_types)]
260 enum InterruptEnum { 260 pub enum InterruptEnum {
261 ADC1_2 = 18, 261 ADC1_2 = 18,
262 CAN1_RX0 = 20, 262 CAN1_RX0 = 20,
263 CAN1_RX1 = 21, 263 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32l4p5ce.rs b/embassy-stm32/src/pac/stm32l4p5ce.rs
index 44abb83bc..c68939c44 100644
--- a/embassy-stm32/src/pac/stm32l4p5ce.rs
+++ b/embassy-stm32/src/pac/stm32l4p5ce.rs
@@ -257,7 +257,7 @@ pub mod interrupt {
257 257
258 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 258 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
259 #[allow(non_camel_case_types)] 259 #[allow(non_camel_case_types)]
260 enum InterruptEnum { 260 pub enum InterruptEnum {
261 ADC1_2 = 18, 261 ADC1_2 = 18,
262 CAN1_RX0 = 20, 262 CAN1_RX0 = 20,
263 CAN1_RX1 = 21, 263 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32l4p5cg.rs b/embassy-stm32/src/pac/stm32l4p5cg.rs
index 44abb83bc..c68939c44 100644
--- a/embassy-stm32/src/pac/stm32l4p5cg.rs
+++ b/embassy-stm32/src/pac/stm32l4p5cg.rs
@@ -257,7 +257,7 @@ pub mod interrupt {
257 257
258 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 258 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
259 #[allow(non_camel_case_types)] 259 #[allow(non_camel_case_types)]
260 enum InterruptEnum { 260 pub enum InterruptEnum {
261 ADC1_2 = 18, 261 ADC1_2 = 18,
262 CAN1_RX0 = 20, 262 CAN1_RX0 = 20,
263 CAN1_RX1 = 21, 263 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32l4p5qe.rs b/embassy-stm32/src/pac/stm32l4p5qe.rs
index 44abb83bc..c68939c44 100644
--- a/embassy-stm32/src/pac/stm32l4p5qe.rs
+++ b/embassy-stm32/src/pac/stm32l4p5qe.rs
@@ -257,7 +257,7 @@ pub mod interrupt {
257 257
258 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 258 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
259 #[allow(non_camel_case_types)] 259 #[allow(non_camel_case_types)]
260 enum InterruptEnum { 260 pub enum InterruptEnum {
261 ADC1_2 = 18, 261 ADC1_2 = 18,
262 CAN1_RX0 = 20, 262 CAN1_RX0 = 20,
263 CAN1_RX1 = 21, 263 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32l4p5qg.rs b/embassy-stm32/src/pac/stm32l4p5qg.rs
index 44abb83bc..c68939c44 100644
--- a/embassy-stm32/src/pac/stm32l4p5qg.rs
+++ b/embassy-stm32/src/pac/stm32l4p5qg.rs
@@ -257,7 +257,7 @@ pub mod interrupt {
257 257
258 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 258 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
259 #[allow(non_camel_case_types)] 259 #[allow(non_camel_case_types)]
260 enum InterruptEnum { 260 pub enum InterruptEnum {
261 ADC1_2 = 18, 261 ADC1_2 = 18,
262 CAN1_RX0 = 20, 262 CAN1_RX0 = 20,
263 CAN1_RX1 = 21, 263 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32l4p5re.rs b/embassy-stm32/src/pac/stm32l4p5re.rs
index 44abb83bc..c68939c44 100644
--- a/embassy-stm32/src/pac/stm32l4p5re.rs
+++ b/embassy-stm32/src/pac/stm32l4p5re.rs
@@ -257,7 +257,7 @@ pub mod interrupt {
257 257
258 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 258 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
259 #[allow(non_camel_case_types)] 259 #[allow(non_camel_case_types)]
260 enum InterruptEnum { 260 pub enum InterruptEnum {
261 ADC1_2 = 18, 261 ADC1_2 = 18,
262 CAN1_RX0 = 20, 262 CAN1_RX0 = 20,
263 CAN1_RX1 = 21, 263 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32l4p5rg.rs b/embassy-stm32/src/pac/stm32l4p5rg.rs
index 44abb83bc..c68939c44 100644
--- a/embassy-stm32/src/pac/stm32l4p5rg.rs
+++ b/embassy-stm32/src/pac/stm32l4p5rg.rs
@@ -257,7 +257,7 @@ pub mod interrupt {
257 257
258 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 258 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
259 #[allow(non_camel_case_types)] 259 #[allow(non_camel_case_types)]
260 enum InterruptEnum { 260 pub enum InterruptEnum {
261 ADC1_2 = 18, 261 ADC1_2 = 18,
262 CAN1_RX0 = 20, 262 CAN1_RX0 = 20,
263 CAN1_RX1 = 21, 263 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32l4p5ve.rs b/embassy-stm32/src/pac/stm32l4p5ve.rs
index 44abb83bc..c68939c44 100644
--- a/embassy-stm32/src/pac/stm32l4p5ve.rs
+++ b/embassy-stm32/src/pac/stm32l4p5ve.rs
@@ -257,7 +257,7 @@ pub mod interrupt {
257 257
258 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 258 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
259 #[allow(non_camel_case_types)] 259 #[allow(non_camel_case_types)]
260 enum InterruptEnum { 260 pub enum InterruptEnum {
261 ADC1_2 = 18, 261 ADC1_2 = 18,
262 CAN1_RX0 = 20, 262 CAN1_RX0 = 20,
263 CAN1_RX1 = 21, 263 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32l4p5vg.rs b/embassy-stm32/src/pac/stm32l4p5vg.rs
index 44abb83bc..c68939c44 100644
--- a/embassy-stm32/src/pac/stm32l4p5vg.rs
+++ b/embassy-stm32/src/pac/stm32l4p5vg.rs
@@ -257,7 +257,7 @@ pub mod interrupt {
257 257
258 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 258 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
259 #[allow(non_camel_case_types)] 259 #[allow(non_camel_case_types)]
260 enum InterruptEnum { 260 pub enum InterruptEnum {
261 ADC1_2 = 18, 261 ADC1_2 = 18,
262 CAN1_RX0 = 20, 262 CAN1_RX0 = 20,
263 CAN1_RX1 = 21, 263 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32l4p5ze.rs b/embassy-stm32/src/pac/stm32l4p5ze.rs
index 44abb83bc..c68939c44 100644
--- a/embassy-stm32/src/pac/stm32l4p5ze.rs
+++ b/embassy-stm32/src/pac/stm32l4p5ze.rs
@@ -257,7 +257,7 @@ pub mod interrupt {
257 257
258 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 258 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
259 #[allow(non_camel_case_types)] 259 #[allow(non_camel_case_types)]
260 enum InterruptEnum { 260 pub enum InterruptEnum {
261 ADC1_2 = 18, 261 ADC1_2 = 18,
262 CAN1_RX0 = 20, 262 CAN1_RX0 = 20,
263 CAN1_RX1 = 21, 263 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32l4p5zg.rs b/embassy-stm32/src/pac/stm32l4p5zg.rs
index 44abb83bc..c68939c44 100644
--- a/embassy-stm32/src/pac/stm32l4p5zg.rs
+++ b/embassy-stm32/src/pac/stm32l4p5zg.rs
@@ -257,7 +257,7 @@ pub mod interrupt {
257 257
258 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 258 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
259 #[allow(non_camel_case_types)] 259 #[allow(non_camel_case_types)]
260 enum InterruptEnum { 260 pub enum InterruptEnum {
261 ADC1_2 = 18, 261 ADC1_2 = 18,
262 CAN1_RX0 = 20, 262 CAN1_RX0 = 20,
263 CAN1_RX1 = 21, 263 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32l4q5ag.rs b/embassy-stm32/src/pac/stm32l4q5ag.rs
index e302792a2..e7e561f96 100644
--- a/embassy-stm32/src/pac/stm32l4q5ag.rs
+++ b/embassy-stm32/src/pac/stm32l4q5ag.rs
@@ -257,7 +257,7 @@ pub mod interrupt {
257 257
258 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 258 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
259 #[allow(non_camel_case_types)] 259 #[allow(non_camel_case_types)]
260 enum InterruptEnum { 260 pub enum InterruptEnum {
261 ADC1_2 = 18, 261 ADC1_2 = 18,
262 AES = 79, 262 AES = 79,
263 CAN1_RX0 = 20, 263 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l4q5cg.rs b/embassy-stm32/src/pac/stm32l4q5cg.rs
index e302792a2..e7e561f96 100644
--- a/embassy-stm32/src/pac/stm32l4q5cg.rs
+++ b/embassy-stm32/src/pac/stm32l4q5cg.rs
@@ -257,7 +257,7 @@ pub mod interrupt {
257 257
258 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 258 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
259 #[allow(non_camel_case_types)] 259 #[allow(non_camel_case_types)]
260 enum InterruptEnum { 260 pub enum InterruptEnum {
261 ADC1_2 = 18, 261 ADC1_2 = 18,
262 AES = 79, 262 AES = 79,
263 CAN1_RX0 = 20, 263 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l4q5qg.rs b/embassy-stm32/src/pac/stm32l4q5qg.rs
index e302792a2..e7e561f96 100644
--- a/embassy-stm32/src/pac/stm32l4q5qg.rs
+++ b/embassy-stm32/src/pac/stm32l4q5qg.rs
@@ -257,7 +257,7 @@ pub mod interrupt {
257 257
258 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 258 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
259 #[allow(non_camel_case_types)] 259 #[allow(non_camel_case_types)]
260 enum InterruptEnum { 260 pub enum InterruptEnum {
261 ADC1_2 = 18, 261 ADC1_2 = 18,
262 AES = 79, 262 AES = 79,
263 CAN1_RX0 = 20, 263 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l4q5rg.rs b/embassy-stm32/src/pac/stm32l4q5rg.rs
index e302792a2..e7e561f96 100644
--- a/embassy-stm32/src/pac/stm32l4q5rg.rs
+++ b/embassy-stm32/src/pac/stm32l4q5rg.rs
@@ -257,7 +257,7 @@ pub mod interrupt {
257 257
258 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 258 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
259 #[allow(non_camel_case_types)] 259 #[allow(non_camel_case_types)]
260 enum InterruptEnum { 260 pub enum InterruptEnum {
261 ADC1_2 = 18, 261 ADC1_2 = 18,
262 AES = 79, 262 AES = 79,
263 CAN1_RX0 = 20, 263 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l4q5vg.rs b/embassy-stm32/src/pac/stm32l4q5vg.rs
index e302792a2..e7e561f96 100644
--- a/embassy-stm32/src/pac/stm32l4q5vg.rs
+++ b/embassy-stm32/src/pac/stm32l4q5vg.rs
@@ -257,7 +257,7 @@ pub mod interrupt {
257 257
258 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 258 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
259 #[allow(non_camel_case_types)] 259 #[allow(non_camel_case_types)]
260 enum InterruptEnum { 260 pub enum InterruptEnum {
261 ADC1_2 = 18, 261 ADC1_2 = 18,
262 AES = 79, 262 AES = 79,
263 CAN1_RX0 = 20, 263 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l4q5zg.rs b/embassy-stm32/src/pac/stm32l4q5zg.rs
index e302792a2..e7e561f96 100644
--- a/embassy-stm32/src/pac/stm32l4q5zg.rs
+++ b/embassy-stm32/src/pac/stm32l4q5zg.rs
@@ -257,7 +257,7 @@ pub mod interrupt {
257 257
258 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 258 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
259 #[allow(non_camel_case_types)] 259 #[allow(non_camel_case_types)]
260 enum InterruptEnum { 260 pub enum InterruptEnum {
261 ADC1_2 = 18, 261 ADC1_2 = 18,
262 AES = 79, 262 AES = 79,
263 CAN1_RX0 = 20, 263 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l4r5ag.rs b/embassy-stm32/src/pac/stm32l4r5ag.rs
index 588b46839..7cc4382db 100644
--- a/embassy-stm32/src/pac/stm32l4r5ag.rs
+++ b/embassy-stm32/src/pac/stm32l4r5ag.rs
@@ -257,7 +257,7 @@ pub mod interrupt {
257 257
258 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 258 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
259 #[allow(non_camel_case_types)] 259 #[allow(non_camel_case_types)]
260 enum InterruptEnum { 260 pub enum InterruptEnum {
261 ADC1 = 18, 261 ADC1 = 18,
262 CAN1_RX0 = 20, 262 CAN1_RX0 = 20,
263 CAN1_RX1 = 21, 263 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32l4r5ai.rs b/embassy-stm32/src/pac/stm32l4r5ai.rs
index 588b46839..7cc4382db 100644
--- a/embassy-stm32/src/pac/stm32l4r5ai.rs
+++ b/embassy-stm32/src/pac/stm32l4r5ai.rs
@@ -257,7 +257,7 @@ pub mod interrupt {
257 257
258 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 258 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
259 #[allow(non_camel_case_types)] 259 #[allow(non_camel_case_types)]
260 enum InterruptEnum { 260 pub enum InterruptEnum {
261 ADC1 = 18, 261 ADC1 = 18,
262 CAN1_RX0 = 20, 262 CAN1_RX0 = 20,
263 CAN1_RX1 = 21, 263 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32l4r5qg.rs b/embassy-stm32/src/pac/stm32l4r5qg.rs
index 588b46839..7cc4382db 100644
--- a/embassy-stm32/src/pac/stm32l4r5qg.rs
+++ b/embassy-stm32/src/pac/stm32l4r5qg.rs
@@ -257,7 +257,7 @@ pub mod interrupt {
257 257
258 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 258 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
259 #[allow(non_camel_case_types)] 259 #[allow(non_camel_case_types)]
260 enum InterruptEnum { 260 pub enum InterruptEnum {
261 ADC1 = 18, 261 ADC1 = 18,
262 CAN1_RX0 = 20, 262 CAN1_RX0 = 20,
263 CAN1_RX1 = 21, 263 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32l4r5qi.rs b/embassy-stm32/src/pac/stm32l4r5qi.rs
index 588b46839..7cc4382db 100644
--- a/embassy-stm32/src/pac/stm32l4r5qi.rs
+++ b/embassy-stm32/src/pac/stm32l4r5qi.rs
@@ -257,7 +257,7 @@ pub mod interrupt {
257 257
258 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 258 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
259 #[allow(non_camel_case_types)] 259 #[allow(non_camel_case_types)]
260 enum InterruptEnum { 260 pub enum InterruptEnum {
261 ADC1 = 18, 261 ADC1 = 18,
262 CAN1_RX0 = 20, 262 CAN1_RX0 = 20,
263 CAN1_RX1 = 21, 263 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32l4r5vg.rs b/embassy-stm32/src/pac/stm32l4r5vg.rs
index 588b46839..7cc4382db 100644
--- a/embassy-stm32/src/pac/stm32l4r5vg.rs
+++ b/embassy-stm32/src/pac/stm32l4r5vg.rs
@@ -257,7 +257,7 @@ pub mod interrupt {
257 257
258 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 258 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
259 #[allow(non_camel_case_types)] 259 #[allow(non_camel_case_types)]
260 enum InterruptEnum { 260 pub enum InterruptEnum {
261 ADC1 = 18, 261 ADC1 = 18,
262 CAN1_RX0 = 20, 262 CAN1_RX0 = 20,
263 CAN1_RX1 = 21, 263 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32l4r5vi.rs b/embassy-stm32/src/pac/stm32l4r5vi.rs
index 588b46839..7cc4382db 100644
--- a/embassy-stm32/src/pac/stm32l4r5vi.rs
+++ b/embassy-stm32/src/pac/stm32l4r5vi.rs
@@ -257,7 +257,7 @@ pub mod interrupt {
257 257
258 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 258 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
259 #[allow(non_camel_case_types)] 259 #[allow(non_camel_case_types)]
260 enum InterruptEnum { 260 pub enum InterruptEnum {
261 ADC1 = 18, 261 ADC1 = 18,
262 CAN1_RX0 = 20, 262 CAN1_RX0 = 20,
263 CAN1_RX1 = 21, 263 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32l4r5zg.rs b/embassy-stm32/src/pac/stm32l4r5zg.rs
index 588b46839..7cc4382db 100644
--- a/embassy-stm32/src/pac/stm32l4r5zg.rs
+++ b/embassy-stm32/src/pac/stm32l4r5zg.rs
@@ -257,7 +257,7 @@ pub mod interrupt {
257 257
258 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 258 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
259 #[allow(non_camel_case_types)] 259 #[allow(non_camel_case_types)]
260 enum InterruptEnum { 260 pub enum InterruptEnum {
261 ADC1 = 18, 261 ADC1 = 18,
262 CAN1_RX0 = 20, 262 CAN1_RX0 = 20,
263 CAN1_RX1 = 21, 263 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32l4r5zi.rs b/embassy-stm32/src/pac/stm32l4r5zi.rs
index 588b46839..7cc4382db 100644
--- a/embassy-stm32/src/pac/stm32l4r5zi.rs
+++ b/embassy-stm32/src/pac/stm32l4r5zi.rs
@@ -257,7 +257,7 @@ pub mod interrupt {
257 257
258 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 258 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
259 #[allow(non_camel_case_types)] 259 #[allow(non_camel_case_types)]
260 enum InterruptEnum { 260 pub enum InterruptEnum {
261 ADC1 = 18, 261 ADC1 = 18,
262 CAN1_RX0 = 20, 262 CAN1_RX0 = 20,
263 CAN1_RX1 = 21, 263 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32l4r7ai.rs b/embassy-stm32/src/pac/stm32l4r7ai.rs
index 39c03935b..a55594bbd 100644
--- a/embassy-stm32/src/pac/stm32l4r7ai.rs
+++ b/embassy-stm32/src/pac/stm32l4r7ai.rs
@@ -257,7 +257,7 @@ pub mod interrupt {
257 257
258 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 258 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
259 #[allow(non_camel_case_types)] 259 #[allow(non_camel_case_types)]
260 enum InterruptEnum { 260 pub enum InterruptEnum {
261 ADC1 = 18, 261 ADC1 = 18,
262 CAN1_RX0 = 20, 262 CAN1_RX0 = 20,
263 CAN1_RX1 = 21, 263 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32l4r7vi.rs b/embassy-stm32/src/pac/stm32l4r7vi.rs
index 39c03935b..a55594bbd 100644
--- a/embassy-stm32/src/pac/stm32l4r7vi.rs
+++ b/embassy-stm32/src/pac/stm32l4r7vi.rs
@@ -257,7 +257,7 @@ pub mod interrupt {
257 257
258 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 258 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
259 #[allow(non_camel_case_types)] 259 #[allow(non_camel_case_types)]
260 enum InterruptEnum { 260 pub enum InterruptEnum {
261 ADC1 = 18, 261 ADC1 = 18,
262 CAN1_RX0 = 20, 262 CAN1_RX0 = 20,
263 CAN1_RX1 = 21, 263 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32l4r7zi.rs b/embassy-stm32/src/pac/stm32l4r7zi.rs
index 39c03935b..a55594bbd 100644
--- a/embassy-stm32/src/pac/stm32l4r7zi.rs
+++ b/embassy-stm32/src/pac/stm32l4r7zi.rs
@@ -257,7 +257,7 @@ pub mod interrupt {
257 257
258 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 258 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
259 #[allow(non_camel_case_types)] 259 #[allow(non_camel_case_types)]
260 enum InterruptEnum { 260 pub enum InterruptEnum {
261 ADC1 = 18, 261 ADC1 = 18,
262 CAN1_RX0 = 20, 262 CAN1_RX0 = 20,
263 CAN1_RX1 = 21, 263 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32l4r9ag.rs b/embassy-stm32/src/pac/stm32l4r9ag.rs
index d4bc778fd..7d4e36993 100644
--- a/embassy-stm32/src/pac/stm32l4r9ag.rs
+++ b/embassy-stm32/src/pac/stm32l4r9ag.rs
@@ -257,7 +257,7 @@ pub mod interrupt {
257 257
258 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 258 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
259 #[allow(non_camel_case_types)] 259 #[allow(non_camel_case_types)]
260 enum InterruptEnum { 260 pub enum InterruptEnum {
261 ADC1 = 18, 261 ADC1 = 18,
262 CAN1_RX0 = 20, 262 CAN1_RX0 = 20,
263 CAN1_RX1 = 21, 263 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32l4r9ai.rs b/embassy-stm32/src/pac/stm32l4r9ai.rs
index d4bc778fd..7d4e36993 100644
--- a/embassy-stm32/src/pac/stm32l4r9ai.rs
+++ b/embassy-stm32/src/pac/stm32l4r9ai.rs
@@ -257,7 +257,7 @@ pub mod interrupt {
257 257
258 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 258 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
259 #[allow(non_camel_case_types)] 259 #[allow(non_camel_case_types)]
260 enum InterruptEnum { 260 pub enum InterruptEnum {
261 ADC1 = 18, 261 ADC1 = 18,
262 CAN1_RX0 = 20, 262 CAN1_RX0 = 20,
263 CAN1_RX1 = 21, 263 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32l4r9vg.rs b/embassy-stm32/src/pac/stm32l4r9vg.rs
index d4bc778fd..7d4e36993 100644
--- a/embassy-stm32/src/pac/stm32l4r9vg.rs
+++ b/embassy-stm32/src/pac/stm32l4r9vg.rs
@@ -257,7 +257,7 @@ pub mod interrupt {
257 257
258 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 258 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
259 #[allow(non_camel_case_types)] 259 #[allow(non_camel_case_types)]
260 enum InterruptEnum { 260 pub enum InterruptEnum {
261 ADC1 = 18, 261 ADC1 = 18,
262 CAN1_RX0 = 20, 262 CAN1_RX0 = 20,
263 CAN1_RX1 = 21, 263 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32l4r9vi.rs b/embassy-stm32/src/pac/stm32l4r9vi.rs
index d4bc778fd..7d4e36993 100644
--- a/embassy-stm32/src/pac/stm32l4r9vi.rs
+++ b/embassy-stm32/src/pac/stm32l4r9vi.rs
@@ -257,7 +257,7 @@ pub mod interrupt {
257 257
258 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 258 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
259 #[allow(non_camel_case_types)] 259 #[allow(non_camel_case_types)]
260 enum InterruptEnum { 260 pub enum InterruptEnum {
261 ADC1 = 18, 261 ADC1 = 18,
262 CAN1_RX0 = 20, 262 CAN1_RX0 = 20,
263 CAN1_RX1 = 21, 263 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32l4r9zg.rs b/embassy-stm32/src/pac/stm32l4r9zg.rs
index d4bc778fd..7d4e36993 100644
--- a/embassy-stm32/src/pac/stm32l4r9zg.rs
+++ b/embassy-stm32/src/pac/stm32l4r9zg.rs
@@ -257,7 +257,7 @@ pub mod interrupt {
257 257
258 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 258 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
259 #[allow(non_camel_case_types)] 259 #[allow(non_camel_case_types)]
260 enum InterruptEnum { 260 pub enum InterruptEnum {
261 ADC1 = 18, 261 ADC1 = 18,
262 CAN1_RX0 = 20, 262 CAN1_RX0 = 20,
263 CAN1_RX1 = 21, 263 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32l4r9zi.rs b/embassy-stm32/src/pac/stm32l4r9zi.rs
index d4bc778fd..7d4e36993 100644
--- a/embassy-stm32/src/pac/stm32l4r9zi.rs
+++ b/embassy-stm32/src/pac/stm32l4r9zi.rs
@@ -257,7 +257,7 @@ pub mod interrupt {
257 257
258 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 258 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
259 #[allow(non_camel_case_types)] 259 #[allow(non_camel_case_types)]
260 enum InterruptEnum { 260 pub enum InterruptEnum {
261 ADC1 = 18, 261 ADC1 = 18,
262 CAN1_RX0 = 20, 262 CAN1_RX0 = 20,
263 CAN1_RX1 = 21, 263 CAN1_RX1 = 21,
diff --git a/embassy-stm32/src/pac/stm32l4s5ai.rs b/embassy-stm32/src/pac/stm32l4s5ai.rs
index 86caf9c50..18e5329f9 100644
--- a/embassy-stm32/src/pac/stm32l4s5ai.rs
+++ b/embassy-stm32/src/pac/stm32l4s5ai.rs
@@ -257,7 +257,7 @@ pub mod interrupt {
257 257
258 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 258 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
259 #[allow(non_camel_case_types)] 259 #[allow(non_camel_case_types)]
260 enum InterruptEnum { 260 pub enum InterruptEnum {
261 ADC1 = 18, 261 ADC1 = 18,
262 AES = 79, 262 AES = 79,
263 CAN1_RX0 = 20, 263 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l4s5qi.rs b/embassy-stm32/src/pac/stm32l4s5qi.rs
index 86caf9c50..18e5329f9 100644
--- a/embassy-stm32/src/pac/stm32l4s5qi.rs
+++ b/embassy-stm32/src/pac/stm32l4s5qi.rs
@@ -257,7 +257,7 @@ pub mod interrupt {
257 257
258 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 258 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
259 #[allow(non_camel_case_types)] 259 #[allow(non_camel_case_types)]
260 enum InterruptEnum { 260 pub enum InterruptEnum {
261 ADC1 = 18, 261 ADC1 = 18,
262 AES = 79, 262 AES = 79,
263 CAN1_RX0 = 20, 263 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l4s5vi.rs b/embassy-stm32/src/pac/stm32l4s5vi.rs
index 86caf9c50..18e5329f9 100644
--- a/embassy-stm32/src/pac/stm32l4s5vi.rs
+++ b/embassy-stm32/src/pac/stm32l4s5vi.rs
@@ -257,7 +257,7 @@ pub mod interrupt {
257 257
258 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 258 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
259 #[allow(non_camel_case_types)] 259 #[allow(non_camel_case_types)]
260 enum InterruptEnum { 260 pub enum InterruptEnum {
261 ADC1 = 18, 261 ADC1 = 18,
262 AES = 79, 262 AES = 79,
263 CAN1_RX0 = 20, 263 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l4s5zi.rs b/embassy-stm32/src/pac/stm32l4s5zi.rs
index 86caf9c50..18e5329f9 100644
--- a/embassy-stm32/src/pac/stm32l4s5zi.rs
+++ b/embassy-stm32/src/pac/stm32l4s5zi.rs
@@ -257,7 +257,7 @@ pub mod interrupt {
257 257
258 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 258 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
259 #[allow(non_camel_case_types)] 259 #[allow(non_camel_case_types)]
260 enum InterruptEnum { 260 pub enum InterruptEnum {
261 ADC1 = 18, 261 ADC1 = 18,
262 AES = 79, 262 AES = 79,
263 CAN1_RX0 = 20, 263 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l4s7ai.rs b/embassy-stm32/src/pac/stm32l4s7ai.rs
index abee0fd92..ff250542d 100644
--- a/embassy-stm32/src/pac/stm32l4s7ai.rs
+++ b/embassy-stm32/src/pac/stm32l4s7ai.rs
@@ -257,7 +257,7 @@ pub mod interrupt {
257 257
258 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 258 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
259 #[allow(non_camel_case_types)] 259 #[allow(non_camel_case_types)]
260 enum InterruptEnum { 260 pub enum InterruptEnum {
261 ADC1 = 18, 261 ADC1 = 18,
262 AES = 79, 262 AES = 79,
263 CAN1_RX0 = 20, 263 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l4s7vi.rs b/embassy-stm32/src/pac/stm32l4s7vi.rs
index abee0fd92..ff250542d 100644
--- a/embassy-stm32/src/pac/stm32l4s7vi.rs
+++ b/embassy-stm32/src/pac/stm32l4s7vi.rs
@@ -257,7 +257,7 @@ pub mod interrupt {
257 257
258 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 258 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
259 #[allow(non_camel_case_types)] 259 #[allow(non_camel_case_types)]
260 enum InterruptEnum { 260 pub enum InterruptEnum {
261 ADC1 = 18, 261 ADC1 = 18,
262 AES = 79, 262 AES = 79,
263 CAN1_RX0 = 20, 263 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l4s7zi.rs b/embassy-stm32/src/pac/stm32l4s7zi.rs
index abee0fd92..ff250542d 100644
--- a/embassy-stm32/src/pac/stm32l4s7zi.rs
+++ b/embassy-stm32/src/pac/stm32l4s7zi.rs
@@ -257,7 +257,7 @@ pub mod interrupt {
257 257
258 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 258 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
259 #[allow(non_camel_case_types)] 259 #[allow(non_camel_case_types)]
260 enum InterruptEnum { 260 pub enum InterruptEnum {
261 ADC1 = 18, 261 ADC1 = 18,
262 AES = 79, 262 AES = 79,
263 CAN1_RX0 = 20, 263 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l4s9ai.rs b/embassy-stm32/src/pac/stm32l4s9ai.rs
index 1207d866c..ebd64c96b 100644
--- a/embassy-stm32/src/pac/stm32l4s9ai.rs
+++ b/embassy-stm32/src/pac/stm32l4s9ai.rs
@@ -257,7 +257,7 @@ pub mod interrupt {
257 257
258 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 258 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
259 #[allow(non_camel_case_types)] 259 #[allow(non_camel_case_types)]
260 enum InterruptEnum { 260 pub enum InterruptEnum {
261 ADC1 = 18, 261 ADC1 = 18,
262 AES = 79, 262 AES = 79,
263 CAN1_RX0 = 20, 263 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l4s9vi.rs b/embassy-stm32/src/pac/stm32l4s9vi.rs
index 1207d866c..ebd64c96b 100644
--- a/embassy-stm32/src/pac/stm32l4s9vi.rs
+++ b/embassy-stm32/src/pac/stm32l4s9vi.rs
@@ -257,7 +257,7 @@ pub mod interrupt {
257 257
258 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 258 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
259 #[allow(non_camel_case_types)] 259 #[allow(non_camel_case_types)]
260 enum InterruptEnum { 260 pub enum InterruptEnum {
261 ADC1 = 18, 261 ADC1 = 18,
262 AES = 79, 262 AES = 79,
263 CAN1_RX0 = 20, 263 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/pac/stm32l4s9zi.rs b/embassy-stm32/src/pac/stm32l4s9zi.rs
index 1207d866c..ebd64c96b 100644
--- a/embassy-stm32/src/pac/stm32l4s9zi.rs
+++ b/embassy-stm32/src/pac/stm32l4s9zi.rs
@@ -257,7 +257,7 @@ pub mod interrupt {
257 257
258 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 258 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
259 #[allow(non_camel_case_types)] 259 #[allow(non_camel_case_types)]
260 enum InterruptEnum { 260 pub enum InterruptEnum {
261 ADC1 = 18, 261 ADC1 = 18,
262 AES = 79, 262 AES = 79,
263 CAN1_RX0 = 20, 263 CAN1_RX0 = 20,
diff --git a/embassy-stm32/src/sdmmc_v2.rs b/embassy-stm32/src/sdmmc_v2.rs
index 5ab5313e1..a3094f691 100644
--- a/embassy-stm32/src/sdmmc_v2.rs
+++ b/embassy-stm32/src/sdmmc_v2.rs
@@ -1,14 +1,13 @@
1use core::marker::PhantomData; 1use core::marker::PhantomData;
2use core::task::{Context, Poll}; 2use core::task::{Context, Poll};
3 3
4use embassy::interrupt::InterruptExt;
4use embassy::util::{AtomicWaker, OnDrop, Unborrow}; 5use embassy::util::{AtomicWaker, OnDrop, Unborrow};
5use embassy_extras::unborrow; 6use embassy_extras::unborrow;
6use futures::future::poll_fn; 7use futures::future::poll_fn;
7use sdio_host::{BusWidth, CardCapacity, CardStatus, CurrentState, SDStatus, CID, CSD, OCR, SCR}; 8use sdio_host::{BusWidth, CardCapacity, CardStatus, CurrentState, SDStatus, CID, CSD, OCR, SCR};
8 9
9use crate::fmt::*; 10use crate::fmt::*;
10use crate::gpio::AnyPin;
11use crate::interrupt;
12use crate::pac; 11use crate::pac;
13use crate::pac::gpio::Gpio; 12use crate::pac::gpio::Gpio;
14use crate::pac::interrupt::{Interrupt, InterruptEnum}; 13use crate::pac::interrupt::{Interrupt, InterruptEnum};
@@ -132,117 +131,113 @@ fn clk_div(ker_ck: Hertz, sdmmc_ck: u32) -> Result<(u16, Hertz), Error> {
132 } 131 }
133} 132}
134 133
135struct SdmmcPins {
136 clk: AnyPin,
137 cmd: AnyPin,
138 d0: AnyPin,
139 d1: Option<AnyPin>,
140 d2: Option<AnyPin>,
141 d3: Option<AnyPin>,
142}
143
144impl SdmmcPins {
145 /// # Safety
146 ///
147 /// Must have exclusive access to the gpio(s)' registers
148 unsafe fn deconfigure(&mut self) {
149 use crate::gpio::sealed::Pin as _;
150 use crate::gpio::Pin;
151 use pac::gpio::vals::Moder;
152
153 let n = self.clk.pin().into();
154 self.clk
155 .block()
156 .moder()
157 .modify(|w| w.set_moder(n, Moder::ANALOG));
158
159 let n = self.cmd.pin().into();
160 self.cmd
161 .block()
162 .moder()
163 .modify(|w| w.set_moder(n, Moder::ANALOG));
164
165 let n = self.d0.pin().into();
166 self.d0
167 .block()
168 .moder()
169 .modify(|w| w.set_moder(n, Moder::ANALOG));
170
171 if let Some(pin) = &self.d1 {
172 let n = pin.pin().into();
173 pin.block()
174 .moder()
175 .modify(|w| w.set_moder(n, Moder::ANALOG));
176 }
177
178 if let Some(pin) = &self.d2 {
179 let n = pin.pin().into();
180 pin.block()
181 .moder()
182 .modify(|w| w.set_moder(n, Moder::ANALOG));
183 }
184
185 if let Some(pin) = &self.d3 {
186 let n = pin.pin().into();
187 pin.block()
188 .moder()
189 .modify(|w| w.set_moder(n, Moder::ANALOG));
190 }
191 }
192}
193
194#[repr(transparent)]
195pub struct DataBlock {
196 pub buf: [u32; 128],
197}
198
199/// Sdmmc device 134/// Sdmmc device
200pub struct Sdmmc<'d> { 135pub struct Sdmmc<'d, T: Instance, P: Pins<T>> {
201 sdmmc: PhantomData<&'d mut ()>, 136 sdmmc: PhantomData<&'d mut T>,
202 regs_addr: u32, 137 pins: P,
138 irq: T::Interrupt,
203 /// SDMMC kernel clock 139 /// SDMMC kernel clock
204 ker_ck: Hertz, 140 ker_ck: Hertz,
205 /// AHB clock 141 /// AHB clock
206 hclk: Hertz, 142 hclk: Hertz,
207 /// Data bus width
208 bus_width: BusWidth,
209 /// Current clock to card 143 /// Current clock to card
210 clock: Hertz, 144 clock: Hertz,
211 /// Current signalling scheme to card 145 /// Current signalling scheme to card
212 signalling: Signalling, 146 signalling: Signalling,
213 /// Card 147 /// Card
214 card: Option<Card>, 148 card: Option<Card>,
215 pins: SdmmcPins,
216 interrupt_sdmmc1: bool,
217} 149}
218 150
219impl<'d> Sdmmc<'d> { 151impl<'d, T: Instance, P: Pins<T>> Sdmmc<'d, T, P> {
152 /// # Safety
153 ///
154 /// Futures that borrow this type can't be leaked
155 #[inline(always)]
156 pub unsafe fn new(
157 _peripheral: impl Unborrow<Target = T> + 'd,
158 pins: impl Unborrow<Target = P> + 'd,
159 irq: impl Unborrow<Target = T::Interrupt>,
160 hclk: Hertz,
161 kernel_clk: Hertz,
162 ) -> Self {
163 unborrow!(irq, pins);
164 pins.configure();
165
166 let inner = T::inner();
167 let clock = inner.new_inner(kernel_clk);
168
169 irq.set_handler(Self::on_interrupt);
170 irq.unpend();
171 irq.enable();
172
173 Self {
174 sdmmc: PhantomData,
175 pins,
176 irq,
177 ker_ck: kernel_clk,
178 hclk,
179 clock,
180 signalling: Default::default(),
181 card: None,
182 }
183 }
184
220 #[inline(always)] 185 #[inline(always)]
221 fn regs(&mut self) -> RegBlock { 186 pub async fn init_card(&mut self, freq: impl Into<Hertz>) -> Result<(), Error> {
222 RegBlock(self.regs_addr as _) 187 let inner = T::inner();
188 let freq = freq.into();
189
190 inner
191 .init_card(
192 freq,
193 P::BUSWIDTH,
194 &mut self.card,
195 &mut self.signalling,
196 self.hclk,
197 self.ker_ck,
198 &mut self.clock,
199 T::state(),
200 )
201 .await
223 } 202 }
224 203
225 /// # Safety 204 /// Get a reference to the initialized card
226 /// 205 ///
227 /// Access to `block` registers should be exclusive 206 /// # Errors
228 unsafe fn configure_pin(block: Gpio, n: usize, afr_num: u8, pup: bool) { 207 ///
229 use pac::gpio::vals::{Afr, Moder, Ospeedr, Pupdr}; 208 /// Returns Error::NoCard if [`init_card`](#method.init_card)
230 209 /// has not previously succeeded
231 let (afr, n_af) = if n < 8 { (0, n) } else { (1, n - 8) }; 210 pub fn card(&self) -> Result<&Card, Error> {
232 block.afr(afr).modify(|w| w.set_afr(n_af, Afr(afr_num))); 211 self.card.as_ref().ok_or(Error::NoCard)
233 block.moder().modify(|w| w.set_moder(n, Moder::ALTERNATE)); 212 }
234 if pup { 213
235 block.pupdr().modify(|w| w.set_pupdr(n, Pupdr::PULLUP)); 214 fn on_interrupt(_: *mut ()) {
236 } 215 let regs = T::inner();
237 block 216 let state = T::state();
238 .ospeedr() 217
239 .modify(|w| w.set_ospeedr(n, Ospeedr::VERYHIGHSPEED)); 218 regs.data_interrupts(false);
219 state.wake();
220 }
221}
222
223impl<'d, T: Instance, P: Pins<T>> Drop for Sdmmc<'d, T, P> {
224 fn drop(&mut self) {
225 self.irq.disable();
226 let inner = T::inner();
227 unsafe { inner.on_drop() };
228 self.pins.deconfigure();
240 } 229 }
230}
231
232pub struct SdmmcInner(pub(crate) RegBlock);
241 233
234impl SdmmcInner {
242 /// # Safety 235 /// # Safety
243 /// 236 ///
244 /// Access to `regs` registers should be exclusive 237 /// Access to `regs` registers should be exclusive
245 unsafe fn new_inner(regs: RegBlock, kernel_clk: Hertz) -> Hertz { 238 unsafe fn new_inner(&self, kernel_clk: Hertz) -> Hertz {
239 let regs = self.0;
240
246 // While the SD/SDIO card or eMMC is in identification mode, 241 // While the SD/SDIO card or eMMC is in identification mode,
247 // the SDMMC_CK frequency must be less than 400 kHz. 242 // the SDMMC_CK frequency must be less than 400 kHz.
248 let (clkdiv, clock) = unwrap!(clk_div(kernel_clk, 400_000)); 243 let (clkdiv, clock) = unwrap!(clk_div(kernel_clk, 400_000));
@@ -262,103 +257,21 @@ impl<'d> Sdmmc<'d> {
262 clock 257 clock
263 } 258 }
264 259
265 /// # Safety
266 ///
267 /// Futures that borrow this type can't be leaked
268 #[allow(clippy::too_many_arguments)]
269 pub unsafe fn new_four_width<T, CLK, CMD, D0, D1, D2, D3>(
270 _peripheral: impl Unborrow<Target = T> + 'd,
271 interrupt: u16,
272 clk_pin: impl Unborrow<Target = CLK> + 'd,
273 cmd_pin: impl Unborrow<Target = CMD> + 'd,
274 d0_pin: impl Unborrow<Target = D0> + 'd,
275 d1_pin: impl Unborrow<Target = D1> + 'd,
276 d2_pin: impl Unborrow<Target = D2> + 'd,
277 d3_pin: impl Unborrow<Target = D3> + 'd,
278 hclk: Hertz,
279 kernel_clk: Hertz,
280 ) -> Self
281 where
282 T: Instance,
283 CLK: CkPin<T>,
284 CMD: CmdPin<T>,
285 D0: D0Pin<T>,
286 D1: D1Pin<T>,
287 D2: D2Pin<T>,
288 D3: D3Pin<T>,
289 {
290 unborrow!(clk_pin, cmd_pin, d0_pin, d1_pin, d2_pin, d3_pin);
291
292 // Configure Pins
293 cortex_m::interrupt::free(|_| {
294 // clk
295 let block = clk_pin.block();
296 let n = clk_pin.pin() as usize;
297 let afr_num = CLK::AF_NUM;
298 Self::configure_pin(block, n, afr_num, false);
299
300 // cmd
301 let block = cmd_pin.block();
302 let n = cmd_pin.pin() as usize;
303 let afr_num = CMD::AF_NUM;
304 Self::configure_pin(block, n, afr_num, true);
305
306 // d0
307 let block = d0_pin.block();
308 let n = d0_pin.pin() as usize;
309 let afr_num = D0::AF_NUM;
310 Self::configure_pin(block, n, afr_num, true);
311
312 // d1
313 let block = d1_pin.block();
314 let n = d1_pin.pin() as usize;
315 let afr_num = D1::AF_NUM;
316 Self::configure_pin(block, n, afr_num, true);
317
318 // d2
319 let block = d2_pin.block();
320 let n = d2_pin.pin() as usize;
321 let afr_num = D2::AF_NUM;
322 Self::configure_pin(block, n, afr_num, true);
323
324 // d3
325 let block = d3_pin.block();
326 let n = d3_pin.pin() as usize;
327 let afr_num = D3::AF_NUM;
328 Self::configure_pin(block, n, afr_num, true);
329 });
330
331 let regs = RegBlock(T::ADDR as _);
332 let clock = Self::new_inner(regs, kernel_clk);
333
334 let pins = SdmmcPins {
335 cmd: cmd_pin.degrade(),
336 clk: clk_pin.degrade(),
337 d0: d0_pin.degrade(),
338 d1: Some(d1_pin.degrade()),
339 d2: Some(d2_pin.degrade()),
340 d3: Some(d3_pin.degrade()),
341 };
342
343 Self {
344 sdmmc: PhantomData,
345 regs_addr: T::ADDR,
346 bus_width: BusWidth::Four,
347 ker_ck: kernel_clk,
348 hclk,
349 clock,
350 signalling: Default::default(),
351 card: None,
352 pins,
353 interrupt_sdmmc1: interrupt == SDMMC1_INR,
354 }
355 }
356
357 /// Initializes card (if present) and sets the bus at the 260 /// Initializes card (if present) and sets the bus at the
358 /// specified frequency. 261 /// specified frequency.
359 pub async fn init_card(&mut self, freq: impl Into<Hertz>) -> Result<(), Error> { 262 #[allow(clippy::too_many_arguments)]
360 let freq = freq.into(); 263 pub async fn init_card(
361 let regs = self.regs(); 264 &self,
265 freq: Hertz,
266 bus_width: BusWidth,
267 old_card: &mut Option<Card>,
268 signalling: &mut Signalling,
269 hclk: Hertz,
270 ker_ck: Hertz,
271 clock: &mut Hertz,
272 waker_reg: &AtomicWaker,
273 ) -> Result<(), Error> {
274 let regs = self.0;
362 275
363 // NOTE(unsafe) We have exclusive access to the peripheral 276 // NOTE(unsafe) We have exclusive access to the peripheral
364 unsafe { 277 unsafe {
@@ -426,10 +339,10 @@ impl<'d> Sdmmc<'d> {
426 card.csd = csd.into(); 339 card.csd = csd.into();
427 340
428 self.select_card(Some(&card))?; 341 self.select_card(Some(&card))?;
429 self.get_scr(&mut card).await?; 342 self.get_scr(&mut card, waker_reg).await?;
430 343
431 // Set bus width 344 // Set bus width
432 let (width, acmd_arg) = match self.bus_width { 345 let (width, acmd_arg) = match bus_width {
433 BusWidth::Eight => unimplemented!(), 346 BusWidth::Eight => unimplemented!(),
434 BusWidth::Four if card.scr.bus_width_four() => (BusWidth::Four, 2), 347 BusWidth::Four if card.scr.bus_width_four() => (BusWidth::Four, 2),
435 _ => (BusWidth::One, 0), 348 _ => (BusWidth::One, 0),
@@ -452,72 +365,51 @@ impl<'d> Sdmmc<'d> {
452 // Set Clock 365 // Set Clock
453 if freq.0 <= 25_000_000 { 366 if freq.0 <= 25_000_000 {
454 // Final clock frequency 367 // Final clock frequency
455 self.clkcr_set_clkdiv(freq.0, width)?; 368 self.clkcr_set_clkdiv(freq.0, width, hclk, ker_ck, clock)?;
456 } else { 369 } else {
457 // Switch to max clock for SDR12 370 // Switch to max clock for SDR12
458 self.clkcr_set_clkdiv(25_000_000, width)?; 371 self.clkcr_set_clkdiv(25_000_000, width, hclk, ker_ck, clock)?;
459 } 372 }
460 373
461 // Read status 374 // Read status
462 self.card.replace(card); 375 self.read_sd_status(&mut card, waker_reg).await?;
463 self.read_sd_status().await?;
464 376
465 if freq.0 > 25_000_000 { 377 if freq.0 > 25_000_000 {
466 // Switch to SDR25 378 // Switch to SDR25
467 self.signalling = self.switch_signalling_mode(Signalling::SDR25).await?; 379 *signalling = self
380 .switch_signalling_mode(Signalling::SDR25, waker_reg)
381 .await?;
468 382
469 if self.signalling == Signalling::SDR25 { 383 if *signalling == Signalling::SDR25 {
470 // Set final clock frequency 384 // Set final clock frequency
471 self.clkcr_set_clkdiv(freq.0, width)?; 385 self.clkcr_set_clkdiv(freq.0, width, hclk, ker_ck, clock)?;
472 386
473 if self.read_status()?.state() != CurrentState::Transfer { 387 if self.read_status(&card)?.state() != CurrentState::Transfer {
474 return Err(Error::SignalingSwitchFailed); 388 return Err(Error::SignalingSwitchFailed);
475 } 389 }
476 } 390 }
477 } 391 }
478 // Read status after signalling change 392 // Read status after signalling change
479 self.read_sd_status().await?; 393 self.read_sd_status(&mut card, waker_reg).await?;
394 old_card.replace(card);
480 } 395 }
481 Ok(())
482 }
483
484 /// Get a reference to the initialized card
485 ///
486 /// # Errors
487 ///
488 /// Returns Error::NoCard if [`init_card`](#method.init_card)
489 /// has not previously succeeded
490 pub fn card(&self) -> Result<&Card, Error> {
491 self.card.as_ref().ok_or(Error::NoCard)
492 }
493 396
494 /// Get a mutable reference to the initialized card 397 Ok(())
495 ///
496 /// # Errors
497 ///
498 /// Returns Error::NoCard if [`init_card`](#method.init_card)
499 /// has not previously succeeded
500 pub fn card_mut(&mut self) -> Result<&mut Card, Error> {
501 self.card.as_mut().ok_or(Error::NoCard)
502 } 398 }
503 399
504 pub async fn read_block( 400 async fn read_block(&mut self, block_idx: u32, buffer: &mut [u32; 128]) -> Result<(), Error> {
505 &mut self,
506 block_idx: u32,
507 buffer: &mut DataBlock,
508 ) -> Result<(), Error> {
509 self::todo!() 401 self::todo!()
510 } 402 }
511 403
512 /// Get the current SDMMC bus clock 404 /// Get the current SDMMC bus clock
513 pub fn clock(&self) -> Hertz { 405 //pub fn clock(&self) -> Hertz {
514 self.clock 406 // self.clock
515 } 407 //}
516 408
517 /// Wait idle on DOSNACT and CPSMACT 409 /// Wait idle on DOSNACT and CPSMACT
518 #[inline(always)] 410 #[inline(always)]
519 fn wait_idle(&mut self) { 411 fn wait_idle(&self) {
520 let regs = self.regs(); 412 let regs = self.0;
521 413
522 // NOTE(unsafe) Atomic read with no side-effects 414 // NOTE(unsafe) Atomic read with no side-effects
523 unsafe { 415 unsafe {
@@ -532,14 +424,14 @@ impl<'d> Sdmmc<'d> {
532 /// 424 ///
533 /// `buffer_addr` must be valid for the whole transfer and word aligned 425 /// `buffer_addr` must be valid for the whole transfer and word aligned
534 unsafe fn prepare_datapath_transfer( 426 unsafe fn prepare_datapath_transfer(
535 &mut self, 427 &self,
536 buffer_addr: u32, 428 buffer_addr: u32,
537 length_bytes: u32, 429 length_bytes: u32,
538 block_size: u8, 430 block_size: u8,
539 direction: Dir, 431 direction: Dir,
540 ) { 432 ) {
541 self::assert!(block_size <= 14, "Block size up to 2^14 bytes"); 433 self::assert!(block_size <= 14, "Block size up to 2^14 bytes");
542 let regs = self.regs(); 434 let regs = self.0;
543 435
544 let dtdir = match direction { 436 let dtdir = match direction {
545 Dir::CardToHost => true, 437 Dir::CardToHost => true,
@@ -548,7 +440,7 @@ impl<'d> Sdmmc<'d> {
548 440
549 // Command AND Data state machines must be idle 441 // Command AND Data state machines must be idle
550 self.wait_idle(); 442 self.wait_idle();
551 Self::clear_interrupt_flags(regs); 443 self.clear_interrupt_flags();
552 444
553 // NOTE(unsafe) We have exclusive access to the regisers 445 // NOTE(unsafe) We have exclusive access to the regisers
554 446
@@ -565,15 +457,22 @@ impl<'d> Sdmmc<'d> {
565 } 457 }
566 458
567 /// Sets the CLKDIV field in CLKCR. Updates clock field in self 459 /// Sets the CLKDIV field in CLKCR. Updates clock field in self
568 fn clkcr_set_clkdiv(&mut self, freq: u32, width: BusWidth) -> Result<(), Error> { 460 fn clkcr_set_clkdiv(
569 let regs = self.regs(); 461 &self,
462 freq: u32,
463 width: BusWidth,
464 hclk: Hertz,
465 ker_ck: Hertz,
466 clock: &mut Hertz,
467 ) -> Result<(), Error> {
468 let regs = self.0;
570 469
571 let (clkdiv, new_clock) = clk_div(self.ker_ck, freq)?; 470 let (clkdiv, new_clock) = clk_div(ker_ck, freq)?;
572 // Enforce AHB and SDMMC_CK clock relation. See RM0433 Rev 7 471 // Enforce AHB and SDMMC_CK clock relation. See RM0433 Rev 7
573 // Section 55.5.8 472 // Section 55.5.8
574 let sdmmc_bus_bandwidth = new_clock.0 * (width as u32); 473 let sdmmc_bus_bandwidth = new_clock.0 * (width as u32);
575 self::assert!(self.hclk.0 > 3 * sdmmc_bus_bandwidth / 32); 474 self::assert!(hclk.0 > 3 * sdmmc_bus_bandwidth / 32);
576 self.clock = new_clock; 475 *clock = new_clock;
577 476
578 // NOTE(unsafe) We have exclusive access to the regblock 477 // NOTE(unsafe) We have exclusive access to the regblock
579 unsafe { 478 unsafe {
@@ -591,8 +490,9 @@ impl<'d> Sdmmc<'d> {
591 /// signalling mode is returned. Expects the current clock 490 /// signalling mode is returned. Expects the current clock
592 /// frequency to be > 12.5MHz. 491 /// frequency to be > 12.5MHz.
593 async fn switch_signalling_mode( 492 async fn switch_signalling_mode(
594 &mut self, 493 &self,
595 signalling: Signalling, 494 signalling: Signalling,
495 waker_reg: &AtomicWaker,
596 ) -> Result<Signalling, Error> { 496 ) -> Result<Signalling, Error> {
597 // NB PLSS v7_10 4.3.10.4: "the use of SET_BLK_LEN command is not 497 // NB PLSS v7_10 4.3.10.4: "the use of SET_BLK_LEN command is not
598 // necessary" 498 // necessary"
@@ -611,17 +511,17 @@ impl<'d> Sdmmc<'d> {
611 let status_addr = &mut status as *mut [u32; 16] as u32; 511 let status_addr = &mut status as *mut [u32; 16] as u32;
612 512
613 // Arm `OnDrop` after the buffer, so it will be dropped first 513 // Arm `OnDrop` after the buffer, so it will be dropped first
614 let regs = self.regs(); 514 let regs = self.0;
615 let on_drop = OnDrop::new(move || unsafe { Self::on_drop(regs) }); 515 let on_drop = OnDrop::new(|| unsafe { self.on_drop() });
616 516
617 unsafe { 517 unsafe {
618 self.prepare_datapath_transfer(status_addr, 64, 6, Dir::CardToHost); 518 self.prepare_datapath_transfer(status_addr, 64, 6, Dir::CardToHost);
619 Self::data_interrupts(regs, true); 519 self.data_interrupts(true);
620 } 520 }
621 self.cmd(Cmd::cmd6(set_function), true)?; // CMD6 521 self.cmd(Cmd::cmd6(set_function), true)?; // CMD6
622 522
623 let res = poll_fn(|cx| { 523 let res = poll_fn(|cx| {
624 self.store_waker_and_unmask(&cx); 524 waker_reg.register(cx.waker());
625 let status = unsafe { regs.star().read() }; 525 let status = unsafe { regs.star().read() };
626 526
627 if status.dcrcfail() { 527 if status.dcrcfail() {
@@ -634,11 +534,7 @@ impl<'d> Sdmmc<'d> {
634 Poll::Pending 534 Poll::Pending
635 }) 535 })
636 .await; 536 .await;
637 537 self.clear_interrupt_flags();
638 unsafe {
639 Self::data_interrupts(regs, false);
640 }
641 Self::clear_interrupt_flags(regs);
642 538
643 // Host is allowed to use the new functions at least 8 539 // Host is allowed to use the new functions at least 8
644 // clocks after the end of the switch command 540 // clocks after the end of the switch command
@@ -672,9 +568,9 @@ impl<'d> Sdmmc<'d> {
672 568
673 /// Query the card status (CMD13, returns R1) 569 /// Query the card status (CMD13, returns R1)
674 /// 570 ///
675 fn read_status(&mut self) -> Result<CardStatus, Error> { 571 fn read_status(&self, card: &Card) -> Result<CardStatus, Error> {
676 let regs = self.regs(); 572 let regs = self.0;
677 let rca = self.card()?.rca; 573 let rca = card.rca;
678 574
679 self.cmd(Cmd::card_status(rca << 16), false)?; // CMD13 575 self.cmd(Cmd::card_status(rca << 16), false)?; // CMD13
680 576
@@ -684,8 +580,7 @@ impl<'d> Sdmmc<'d> {
684 } 580 }
685 581
686 /// Reads the SD Status (ACMD13) 582 /// Reads the SD Status (ACMD13)
687 async fn read_sd_status(&mut self) -> Result<(), Error> { 583 async fn read_sd_status(&self, card: &mut Card, waker_reg: &AtomicWaker) -> Result<(), Error> {
688 let card = self.card()?;
689 let rca = card.rca; 584 let rca = card.rca;
690 self.cmd(Cmd::set_block_length(64), false)?; // CMD16 585 self.cmd(Cmd::set_block_length(64), false)?; // CMD16
691 self.cmd(Cmd::app_cmd(rca << 16), false)?; // APP 586 self.cmd(Cmd::app_cmd(rca << 16), false)?; // APP
@@ -694,17 +589,17 @@ impl<'d> Sdmmc<'d> {
694 let status_addr = &mut status as *mut [u32; 16] as u32; 589 let status_addr = &mut status as *mut [u32; 16] as u32;
695 590
696 // Arm `OnDrop` after the buffer, so it will be dropped first 591 // Arm `OnDrop` after the buffer, so it will be dropped first
697 let regs = self.regs(); 592 let regs = self.0;
698 let on_drop = OnDrop::new(move || unsafe { Self::on_drop(regs) }); 593 let on_drop = OnDrop::new(|| unsafe { self.on_drop() });
699 594
700 unsafe { 595 unsafe {
701 self.prepare_datapath_transfer(status_addr, 64, 6, Dir::CardToHost); 596 self.prepare_datapath_transfer(status_addr, 64, 6, Dir::CardToHost);
702 Self::data_interrupts(regs, true); 597 self.data_interrupts(true);
703 } 598 }
704 self.cmd(Cmd::card_status(0), true)?; 599 self.cmd(Cmd::card_status(0), true)?;
705 600
706 let res = poll_fn(|cx| { 601 let res = poll_fn(|cx| {
707 self.store_waker_and_unmask(&cx); 602 waker_reg.register(cx.waker());
708 let status = unsafe { regs.star().read() }; 603 let status = unsafe { regs.star().read() };
709 604
710 if status.dcrcfail() { 605 if status.dcrcfail() {
@@ -717,13 +612,9 @@ impl<'d> Sdmmc<'d> {
717 Poll::Pending 612 Poll::Pending
718 }) 613 })
719 .await; 614 .await;
615 self.clear_interrupt_flags();
720 616
721 unsafe { 617 if res.is_ok() {
722 Self::data_interrupts(regs, false);
723 }
724 Self::clear_interrupt_flags(regs);
725
726 if let Ok(_) = &res {
727 on_drop.defuse(); 618 on_drop.defuse();
728 unsafe { 619 unsafe {
729 regs.idmactrlr().modify(|w| w.set_idmaen(false)); 620 regs.idmactrlr().modify(|w| w.set_idmaen(false));
@@ -731,7 +622,7 @@ impl<'d> Sdmmc<'d> {
731 for byte in status.iter_mut() { 622 for byte in status.iter_mut() {
732 *byte = u32::from_be(*byte); 623 *byte = u32::from_be(*byte);
733 } 624 }
734 self.card_mut()?.status = status.into(); 625 card.status = status.into();
735 } 626 }
736 res 627 res
737 } 628 }
@@ -740,7 +631,7 @@ impl<'d> Sdmmc<'d> {
740 /// 631 ///
741 /// If `None` is specifed for `card`, all cards are put back into 632 /// If `None` is specifed for `card`, all cards are put back into
742 /// _Stand-by State_ 633 /// _Stand-by State_
743 fn select_card(&mut self, card: Option<&Card>) -> Result<(), Error> { 634 fn select_card(&self, card: Option<&Card>) -> Result<(), Error> {
744 // Determine Relative Card Address (RCA) of given card 635 // Determine Relative Card Address (RCA) of given card
745 let rca = card.map(|c| c.rca << 16).unwrap_or(0); 636 let rca = card.map(|c| c.rca << 16).unwrap_or(0);
746 637
@@ -753,7 +644,8 @@ impl<'d> Sdmmc<'d> {
753 644
754 /// Clear flags in interrupt clear register 645 /// Clear flags in interrupt clear register
755 #[inline(always)] 646 #[inline(always)]
756 fn clear_interrupt_flags(regs: RegBlock) { 647 fn clear_interrupt_flags(&self) {
648 let regs = self.0;
757 // NOTE(unsafe) Atomic write 649 // NOTE(unsafe) Atomic write
758 unsafe { 650 unsafe {
759 regs.icr().write(|w| { 651 regs.icr().write(|w| {
@@ -782,21 +674,21 @@ impl<'d> Sdmmc<'d> {
782 } 674 }
783 675
784 /// Enables the interrupts for data transfer 676 /// Enables the interrupts for data transfer
785 ///
786 /// # Safety
787 ///
788 /// Access to `regs` must be exclusive
789 #[inline(always)] 677 #[inline(always)]
790 unsafe fn data_interrupts(regs: RegBlock, enable: bool) { 678 fn data_interrupts(&self, enable: bool) {
791 regs.maskr().modify(|w| { 679 let regs = self.0;
792 w.set_dcrcfailie(enable); 680 // NOTE(unsafe) Atomic write
793 w.set_dtimeoutie(enable); 681 unsafe {
794 w.set_dataendie(enable); 682 regs.maskr().write(|w| {
795 w.set_dabortie(enable); 683 w.set_dcrcfailie(enable);
796 }); 684 w.set_dtimeoutie(enable);
685 w.set_dataendie(enable);
686 w.set_dabortie(enable);
687 });
688 }
797 } 689 }
798 690
799 async fn get_scr(&mut self, card: &mut Card) -> Result<(), Error> { 691 async fn get_scr(&self, card: &mut Card, waker_reg: &AtomicWaker) -> Result<(), Error> {
800 // Read the the 64-bit SCR register 692 // Read the the 64-bit SCR register
801 self.cmd(Cmd::set_block_length(8), false)?; // CMD16 693 self.cmd(Cmd::set_block_length(8), false)?; // CMD16
802 self.cmd(Cmd::app_cmd(card.rca << 16), false)?; 694 self.cmd(Cmd::app_cmd(card.rca << 16), false)?;
@@ -805,17 +697,17 @@ impl<'d> Sdmmc<'d> {
805 let scr_addr = &mut scr as *mut u32 as u32; 697 let scr_addr = &mut scr as *mut u32 as u32;
806 698
807 // Arm `OnDrop` after the buffer, so it will be dropped first 699 // Arm `OnDrop` after the buffer, so it will be dropped first
808 let regs = self.regs(); 700 let regs = self.0;
809 let on_drop = OnDrop::new(move || unsafe { Self::on_drop(regs) }); 701 let on_drop = OnDrop::new(move || unsafe { self.on_drop() });
810 702
811 unsafe { 703 unsafe {
812 self.prepare_datapath_transfer(scr_addr, 8, 3, Dir::CardToHost); 704 self.prepare_datapath_transfer(scr_addr, 8, 3, Dir::CardToHost);
813 Self::data_interrupts(regs, true); 705 self.data_interrupts(true);
814 } 706 }
815 self.cmd(Cmd::cmd51(), true)?; 707 self.cmd(Cmd::cmd51(), true)?;
816 708
817 let res = poll_fn(|cx| { 709 let res = poll_fn(|cx| {
818 self.store_waker_and_unmask(&cx); 710 waker_reg.register(cx.waker());
819 let status = unsafe { regs.star().read() }; 711 let status = unsafe { regs.star().read() };
820 712
821 if status.dcrcfail() { 713 if status.dcrcfail() {
@@ -828,13 +720,9 @@ impl<'d> Sdmmc<'d> {
828 Poll::Pending 720 Poll::Pending
829 }) 721 })
830 .await; 722 .await;
723 self.clear_interrupt_flags();
831 724
832 unsafe { 725 if res.is_ok() {
833 Self::data_interrupts(regs, false);
834 }
835 Self::clear_interrupt_flags(regs);
836
837 if let Ok(_) = &res {
838 on_drop.defuse(); 726 on_drop.defuse();
839 727
840 unsafe { 728 unsafe {
@@ -847,10 +735,10 @@ impl<'d> Sdmmc<'d> {
847 } 735 }
848 736
849 /// Send command to card 737 /// Send command to card
850 fn cmd(&mut self, cmd: Cmd, data: bool) -> Result<(), Error> { 738 fn cmd(&self, cmd: Cmd, data: bool) -> Result<(), Error> {
851 let regs = self.regs(); 739 let regs = self.0;
852 740
853 Self::clear_interrupt_flags(regs); 741 self.clear_interrupt_flags();
854 // NOTE(safety) Atomic operations 742 // NOTE(safety) Atomic operations
855 unsafe { 743 unsafe {
856 // CP state machine must be idle 744 // CP state machine must be idle
@@ -907,16 +795,21 @@ impl<'d> Sdmmc<'d> {
907 } 795 }
908 } 796 }
909 797
910 fn store_waker_and_unmask(&self, cx: &Context) { 798 fn store_waker_and_unmask(
799 &self,
800 cx: &Context,
801 interrupt_sdmmc1: bool,
802 waker_reg: &AtomicWaker,
803 ) {
911 use cortex_m::peripheral::NVIC; 804 use cortex_m::peripheral::NVIC;
912 805
913 // NOTE(unsafe) We own the interrupt and can unmask it, it won't cause unsoundness 806 // NOTE(unsafe) We own the interrupt and can unmask it, it won't cause unsoundness
914 unsafe { 807 unsafe {
915 if self.interrupt_sdmmc1 { 808 if interrupt_sdmmc1 {
916 WAKER_1.register(cx.waker()); 809 waker_reg.register(cx.waker());
917 NVIC::unmask(InterruptEnum::SDMMC1); 810 NVIC::unmask(InterruptEnum::SDMMC1);
918 } else { 811 } else {
919 WAKER_2.register(cx.waker()); 812 waker_reg.register(cx.waker());
920 NVIC::unmask(InterruptEnum::SDMMC2); 813 NVIC::unmask(InterruptEnum::SDMMC2);
921 } 814 }
922 } 815 }
@@ -925,7 +818,8 @@ impl<'d> Sdmmc<'d> {
925 /// # Safety 818 /// # Safety
926 /// 819 ///
927 /// Ensure that `regs` has exclusive access to the regblocks 820 /// Ensure that `regs` has exclusive access to the regblocks
928 unsafe fn on_drop(regs: RegBlock) { 821 unsafe fn on_drop(&self) {
822 let regs = self.0;
929 if regs.star().read().dpsmact() { 823 if regs.star().read().dpsmact() {
930 // Send abort 824 // Send abort
931 // CP state machine must be idle 825 // CP state machine must be idle
@@ -947,25 +841,12 @@ impl<'d> Sdmmc<'d> {
947 // Wait for the abort 841 // Wait for the abort
948 while regs.star().read().dpsmact() {} 842 while regs.star().read().dpsmact() {}
949 } 843 }
950 Self::data_interrupts(regs, false); 844 self.data_interrupts(false);
951 Self::clear_interrupt_flags(regs); 845 self.clear_interrupt_flags();
952 regs.idmactrlr().modify(|w| w.set_idmaen(false)); 846 regs.idmactrlr().modify(|w| w.set_idmaen(false));
953 } 847 }
954} 848}
955 849
956impl<'d> Drop for Sdmmc<'d> {
957 fn drop(&mut self) {
958 unsafe {
959 Self::on_drop(self.regs());
960 }
961
962 // NOTE(unsafe) With `free` we will have exclusive access to the registers
963 cortex_m::interrupt::free(|_| unsafe {
964 self.pins.deconfigure();
965 })
966 }
967}
968
969/// SD card Commands 850/// SD card Commands
970impl Cmd { 851impl Cmd {
971 const fn new(cmd: u8, arg: u32, resp: Response) -> Cmd { 852 const fn new(cmd: u8, arg: u32, resp: Response) -> Cmd {
@@ -1055,30 +936,15 @@ impl Cmd {
1055 936
1056////////////////////////////////////////////////////// 937//////////////////////////////////////////////////////
1057 938
1058const SDMMC1_INR: u16 = 49;
1059static WAKER_1: AtomicWaker = AtomicWaker::new();
1060static WAKER_2: AtomicWaker = AtomicWaker::new();
1061
1062#[interrupt]
1063unsafe fn SDMMC1() {
1064 cortex_m::peripheral::NVIC::mask(InterruptEnum::SDMMC1);
1065 WAKER_1.wake();
1066}
1067
1068#[cfg(feature = "2sdmmc")]
1069#[interrupt]
1070unsafe fn SDMMC2() {
1071 cortex_m::peripheral::NVIC::mask(InterruptEnum::SDMMC2);
1072 WAKER_2.wake();
1073}
1074
1075pub(crate) mod sealed { 939pub(crate) mod sealed {
1076 use super::*; 940 use super::*;
1077 use crate::gpio::Pin as GpioPin; 941 use crate::gpio::Pin as GpioPin;
1078 942
1079 pub trait Instance { 943 pub trait Instance {
1080 const ADDR: u32;
1081 type Interrupt: Interrupt; 944 type Interrupt: Interrupt;
945
946 fn inner() -> SdmmcInner;
947 fn state() -> &'static AtomicWaker;
1082 } 948 }
1083 pub trait CkPin<T: Instance>: GpioPin { 949 pub trait CkPin<T: Instance>: GpioPin {
1084 const AF_NUM: u8; 950 const AF_NUM: u8;
@@ -1110,25 +976,248 @@ pub(crate) mod sealed {
1110 pub trait D7Pin<T: Instance>: GpioPin { 976 pub trait D7Pin<T: Instance>: GpioPin {
1111 const AF_NUM: u8; 977 const AF_NUM: u8;
1112 } 978 }
979
980 pub trait Pins<T: Instance> {}
1113} 981}
1114 982
1115pub trait Instance: sealed::Instance {} 983pub trait Instance: sealed::Instance + 'static {}
1116pub trait CkPin<T: Instance>: sealed::CkPin<T> {} 984pub trait CkPin<T: Instance>: sealed::CkPin<T> + 'static {}
1117pub trait CmdPin<T: Instance>: sealed::CmdPin<T> {} 985pub trait CmdPin<T: Instance>: sealed::CmdPin<T> + 'static {}
1118pub trait D0Pin<T: Instance>: sealed::D0Pin<T> {} 986pub trait D0Pin<T: Instance>: sealed::D0Pin<T> + 'static {}
1119pub trait D1Pin<T: Instance>: sealed::D1Pin<T> {} 987pub trait D1Pin<T: Instance>: sealed::D1Pin<T> + 'static {}
1120pub trait D2Pin<T: Instance>: sealed::D2Pin<T> {} 988pub trait D2Pin<T: Instance>: sealed::D2Pin<T> + 'static {}
1121pub trait D3Pin<T: Instance>: sealed::D3Pin<T> {} 989pub trait D3Pin<T: Instance>: sealed::D3Pin<T> + 'static {}
1122pub trait D4Pin<T: Instance>: sealed::D4Pin<T> {} 990pub trait D4Pin<T: Instance>: sealed::D4Pin<T> + 'static {}
1123pub trait D5Pin<T: Instance>: sealed::D5Pin<T> {} 991pub trait D5Pin<T: Instance>: sealed::D5Pin<T> + 'static {}
1124pub trait D6Pin<T: Instance>: sealed::D6Pin<T> {} 992pub trait D6Pin<T: Instance>: sealed::D6Pin<T> + 'static {}
1125pub trait D7Pin<T: Instance>: sealed::D7Pin<T> {} 993pub trait D7Pin<T: Instance>: sealed::D7Pin<T> + 'static {}
994
995pub trait Pins<T: Instance>: sealed::Pins<T> + 'static {
996 const BUSWIDTH: BusWidth;
997
998 fn configure(&mut self);
999 fn deconfigure(&mut self);
1000}
1001
1002impl<T, CLK, CMD, D0, D1, D2, D3> sealed::Pins<T> for (CLK, CMD, D0, D1, D2, D3)
1003where
1004 T: Instance,
1005 CLK: CkPin<T>,
1006 CMD: CmdPin<T>,
1007 D0: D0Pin<T>,
1008 D1: D1Pin<T>,
1009 D2: D2Pin<T>,
1010 D3: D3Pin<T>,
1011{
1012}
1013
1014impl<T, CLK, CMD, D0> sealed::Pins<T> for (CLK, CMD, D0)
1015where
1016 T: Instance,
1017 CLK: CkPin<T>,
1018 CMD: CmdPin<T>,
1019 D0: D0Pin<T>,
1020{
1021}
1022
1023/// # Safety
1024///
1025/// Access to `block` registers should be exclusive
1026unsafe fn configure_pin(block: Gpio, n: usize, afr_num: u8, pup: bool) {
1027 use pac::gpio::vals::{Afr, Moder, Ospeedr, Pupdr};
1028
1029 let (afr, n_af) = if n < 8 { (0, n) } else { (1, n - 8) };
1030 block.afr(afr).modify(|w| w.set_afr(n_af, Afr(afr_num)));
1031 block.moder().modify(|w| w.set_moder(n, Moder::ALTERNATE));
1032 if pup {
1033 block.pupdr().modify(|w| w.set_pupdr(n, Pupdr::PULLUP));
1034 }
1035 block
1036 .ospeedr()
1037 .modify(|w| w.set_ospeedr(n, Ospeedr::VERYHIGHSPEED));
1038}
1039
1040impl<T, CLK, CMD, D0, D1, D2, D3> Pins<T> for (CLK, CMD, D0, D1, D2, D3)
1041where
1042 T: Instance,
1043 CLK: CkPin<T>,
1044 CMD: CmdPin<T>,
1045 D0: D0Pin<T>,
1046 D1: D1Pin<T>,
1047 D2: D2Pin<T>,
1048 D3: D3Pin<T>,
1049{
1050 const BUSWIDTH: BusWidth = BusWidth::Four;
1051
1052 fn configure(&mut self) {
1053 let (clk_pin, cmd_pin, d0_pin, d1_pin, d2_pin, d3_pin) = self;
1054
1055 cortex_m::interrupt::free(|_| unsafe {
1056 // clk
1057 let block = clk_pin.block();
1058 let n = clk_pin.pin() as usize;
1059 let afr_num = CLK::AF_NUM;
1060 configure_pin(block, n, afr_num, false);
1061
1062 // cmd
1063 let block = cmd_pin.block();
1064 let n = cmd_pin.pin() as usize;
1065 let afr_num = CMD::AF_NUM;
1066 configure_pin(block, n, afr_num, true);
1067
1068 // d0
1069 let block = d0_pin.block();
1070 let n = d0_pin.pin() as usize;
1071 let afr_num = D0::AF_NUM;
1072 configure_pin(block, n, afr_num, true);
1073
1074 // d1
1075 let block = d1_pin.block();
1076 let n = d1_pin.pin() as usize;
1077 let afr_num = D1::AF_NUM;
1078 configure_pin(block, n, afr_num, true);
1079
1080 // d2
1081 let block = d2_pin.block();
1082 let n = d2_pin.pin() as usize;
1083 let afr_num = D2::AF_NUM;
1084 configure_pin(block, n, afr_num, true);
1085
1086 // d3
1087 let block = d3_pin.block();
1088 let n = d3_pin.pin() as usize;
1089 let afr_num = D3::AF_NUM;
1090 configure_pin(block, n, afr_num, true);
1091 });
1092 }
1093
1094 fn deconfigure(&mut self) {
1095 use pac::gpio::vals::{Moder, Ospeedr, Pupdr};
1096
1097 let (clk_pin, cmd_pin, d0_pin, d1_pin, d2_pin, d3_pin) = self;
1098
1099 cortex_m::interrupt::free(|_| unsafe {
1100 // clk
1101 let n = clk_pin.pin().into();
1102 clk_pin
1103 .block()
1104 .moder()
1105 .modify(|w| w.set_moder(n, Moder::ANALOG));
1106 clk_pin
1107 .block()
1108 .ospeedr()
1109 .modify(|w| w.set_ospeedr(n, Ospeedr::LOWSPEED));
1110
1111 // cmd
1112 let n = cmd_pin.pin().into();
1113 cmd_pin
1114 .block()
1115 .moder()
1116 .modify(|w| w.set_moder(n, Moder::ANALOG));
1117 cmd_pin
1118 .block()
1119 .ospeedr()
1120 .modify(|w| w.set_ospeedr(n, Ospeedr::LOWSPEED));
1121 cmd_pin
1122 .block()
1123 .pupdr()
1124 .modify(|w| w.set_pupdr(n, Pupdr::FLOATING));
1125
1126 // d0
1127 let n = d0_pin.pin().into();
1128 d0_pin
1129 .block()
1130 .moder()
1131 .modify(|w| w.set_moder(n, Moder::ANALOG));
1132 d0_pin
1133 .block()
1134 .ospeedr()
1135 .modify(|w| w.set_ospeedr(n, Ospeedr::LOWSPEED));
1136 d0_pin
1137 .block()
1138 .pupdr()
1139 .modify(|w| w.set_pupdr(n, Pupdr::FLOATING));
1140
1141 // d1
1142 let n = d1_pin.pin().into();
1143 d1_pin
1144 .block()
1145 .moder()
1146 .modify(|w| w.set_moder(n, Moder::ANALOG));
1147 d1_pin
1148 .block()
1149 .ospeedr()
1150 .modify(|w| w.set_ospeedr(n, Ospeedr::LOWSPEED));
1151 d1_pin
1152 .block()
1153 .pupdr()
1154 .modify(|w| w.set_pupdr(n, Pupdr::FLOATING));
1155
1156 // d2
1157 let n = d2_pin.pin().into();
1158 d2_pin
1159 .block()
1160 .moder()
1161 .modify(|w| w.set_moder(n, Moder::ANALOG));
1162 d2_pin
1163 .block()
1164 .ospeedr()
1165 .modify(|w| w.set_ospeedr(n, Ospeedr::LOWSPEED));
1166 d2_pin
1167 .block()
1168 .pupdr()
1169 .modify(|w| w.set_pupdr(n, Pupdr::FLOATING));
1170
1171 // d3
1172 let n = d3_pin.pin().into();
1173 d3_pin
1174 .block()
1175 .moder()
1176 .modify(|w| w.set_moder(n, Moder::ANALOG));
1177 d3_pin
1178 .block()
1179 .ospeedr()
1180 .modify(|w| w.set_ospeedr(n, Ospeedr::LOWSPEED));
1181 d3_pin
1182 .block()
1183 .pupdr()
1184 .modify(|w| w.set_pupdr(n, Pupdr::FLOATING));
1185 });
1186 }
1187}
1188
1189impl<T, CLK, CMD, D0> Pins<T> for (CLK, CMD, D0)
1190where
1191 T: Instance,
1192 CLK: CkPin<T>,
1193 CMD: CmdPin<T>,
1194 D0: D0Pin<T>,
1195{
1196 const BUSWIDTH: BusWidth = BusWidth::One;
1197
1198 fn configure(&mut self) {
1199 self::todo!()
1200 }
1201
1202 fn deconfigure(&mut self) {
1203 self::todo!()
1204 }
1205}
1126 1206
1127macro_rules! impl_sdmmc { 1207macro_rules! impl_sdmmc {
1128 ($inst:ident, $addr:expr) => { 1208 ($inst:ident) => {
1129 impl crate::sdmmc_v2::sealed::Instance for peripherals::$inst { 1209 impl crate::sdmmc_v2::sealed::Instance for peripherals::$inst {
1130 const ADDR: u32 = $addr;
1131 type Interrupt = interrupt::$inst; 1210 type Interrupt = interrupt::$inst;
1211
1212 fn inner() -> crate::sdmmc_v2::SdmmcInner {
1213 const INNER: crate::sdmmc_v2::SdmmcInner = crate::sdmmc_v2::SdmmcInner($inst);
1214 INNER
1215 }
1216
1217 fn state() -> &'static ::embassy::util::AtomicWaker {
1218 static WAKER: ::embassy::util::AtomicWaker = ::embassy::util::AtomicWaker::new();
1219 &WAKER
1220 }
1132 } 1221 }
1133 1222
1134 impl crate::sdmmc_v2::Instance for peripherals::$inst {} 1223 impl crate::sdmmc_v2::Instance for peripherals::$inst {}
diff --git a/embassy/src/util/mod.rs b/embassy/src/util/mod.rs
index cace0d190..bd96f6318 100644
--- a/embassy/src/util/mod.rs
+++ b/embassy/src/util/mod.rs
@@ -27,3 +27,44 @@ pub trait Unborrow {
27pub trait Steal { 27pub trait Steal {
28 unsafe fn steal() -> Self; 28 unsafe fn steal() -> Self;
29} 29}
30
31macro_rules! impl_unborrow_tuples {
32 ($($t:ident),+) => {
33 impl<$($t),+> Unborrow for ($($t),+)
34 where
35 $(
36 $t: Unborrow<Target = $t>
37 ),+
38 {
39 type Target = ($($t),+);
40 unsafe fn unborrow(self) -> Self::Target {
41 self
42 }
43 }
44
45 impl<'a, $($t),+> Unborrow for &'a mut($($t),+)
46 where
47 $(
48 $t: Unborrow<Target = $t>
49 ),+
50 {
51 type Target = ($($t),+);
52 unsafe fn unborrow(self) -> Self::Target {
53 ::core::ptr::read(self)
54 }
55 }
56
57 };
58}
59
60impl_unborrow_tuples!(A, B);
61impl_unborrow_tuples!(A, B, C);
62impl_unborrow_tuples!(A, B, C, D);
63impl_unborrow_tuples!(A, B, C, D, E);
64impl_unborrow_tuples!(A, B, C, D, E, F);
65impl_unborrow_tuples!(A, B, C, D, E, F, G);
66impl_unborrow_tuples!(A, B, C, D, E, F, G, H);
67impl_unborrow_tuples!(A, B, C, D, E, F, G, H, I);
68impl_unborrow_tuples!(A, B, C, D, E, F, G, H, I, J);
69impl_unborrow_tuples!(A, B, C, D, E, F, G, H, I, J, K);
70impl_unborrow_tuples!(A, B, C, D, E, F, G, H, I, J, K, L);