Add support for changing the DS and DSi battery level

The DS battery level is configured via the SPI Power Management Device,
and the DSi's is configured via the I2C BPTWL. Add support for changing
these registers and add the "Power Management" dialog in the UI.
This commit is contained in:
Rayyan Ansari
2022-02-18 15:32:46 +00:00
committed by Arisotura
parent c3adf6f606
commit 2569c67a13
16 changed files with 1360 additions and 0 deletions

View File

@ -0,0 +1,171 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="12.236976mm"
height="6.2838535mm"
viewBox="0 0 12.236976 6.283854"
version="1.1"
id="svg5"
inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
sodipodi:docname="dsi_batteryalmostempty.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview7"
pagecolor="#ff8100"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="1"
inkscape:pagecheckerboard="false"
inkscape:document-units="mm"
showgrid="true"
height="200mm"
showborder="true"
inkscape:showpageshadow="false"
borderlayer="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:zoom="14.481547"
inkscape:cx="35.389866"
inkscape:cy="16.503762"
inkscape:window-width="1920"
inkscape:window-height="1011"
inkscape:window-x="0"
inkscape:window-y="32"
inkscape:window-maximized="1"
inkscape:current-layer="layer1">
<inkscape:grid
type="xygrid"
id="grid11"
spacingx="0.26458333"
spacingy="0.26458333"
originx="-91.77735"
originy="-47.128928" />
</sodipodi:namedview>
<defs
id="defs2" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-91.777344,-47.12891)">
<rect
style="fill:#ff2a2a;fill-rule:evenodd;stroke-width:0.0211535"
id="rect153"
width="1.3229166"
height="2.9765623"
x="91.777344"
y="48.782555" />
<rect
style="fill:#ff2a2a;stroke-width:0.0162915"
id="rect177"
width="10.914062"
height="0.66145831"
x="93.100258"
y="47.12891" />
<rect
style="fill:#ff2a2a;stroke-width:0.0165364"
id="rect179"
width="0.66145831"
height="4.9609375"
x="93.100258"
y="47.790367" />
<rect
style="fill:#ff2a2a;stroke-width:0.0162915"
id="rect181"
width="10.914062"
height="0.66145873"
x="93.100258"
y="52.751305" />
<rect
style="fill:#ff2a2a;stroke-width:0.0165364"
id="rect183"
width="0.66145831"
height="4.9609375"
x="103.35286"
y="47.790367" />
<rect
style="fill:#ffffff;stroke-width:0.0162585"
id="rect318"
width="9.5911455"
height="0.49609375"
x="93.761719"
y="47.790367" />
<rect
style="fill:#ffffff;stroke-width:0.0158876"
id="rect408"
width="0.49609372"
height="3.96875"
x="93.761719"
y="48.286461" />
<rect
style="fill:#ffffff;stroke-width:0.015706"
id="rect410"
width="9.5911455"
height="0.49609351"
x="93.761719"
y="52.255211" />
<rect
style="fill:#ffffff;stroke-width:0.0158876"
id="rect412"
width="0.4960939"
height="3.9687498"
x="102.85677"
y="48.286461" />
<rect
style="fill:#ffffff;stroke-width:0.0224686"
id="rect414"
width="0.66145849"
height="3.9687498"
x="95.911453"
y="48.286461" />
<rect
style="fill:#ffffff;stroke-width:0.0158876"
id="rect414-3"
width="0.66145885"
height="3.9687498"
x="98.226562"
y="48.286461" />
<rect
style="fill:#ffffff;stroke-width:0.0158876"
id="rect414-6"
width="0.66145819"
height="3.9687498"
x="100.54166"
y="48.286461" />
<rect
style="fill:#999999;stroke-width:0.0165364"
id="rect1736"
width="1.6536455"
height="3.9687498"
x="94.257812"
y="48.286461" />
<rect
style="fill:#999999;stroke-width:0.0165364"
id="rect1738"
width="1.6536458"
height="3.96875"
x="96.572914"
y="48.286461" />
<rect
style="fill:#999999;stroke-width:0.0165364"
id="rect1740"
width="1.6536458"
height="3.96875"
x="98.888016"
y="48.286461" />
<rect
style="fill:#ff2a2a;stroke-width:0.0165364"
id="rect1742"
width="1.6536458"
height="3.96875"
x="101.20312"
y="48.286461" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.4 KiB