<p>我已经深入探讨了这个话题。找到了一个很好的<a href="https://github.com/raspberrypi/linux/issues/1332" rel="nofollow">discussion</a>。在RPi 3中,GPIO的电源LED控制已被移除,如OP所述。在</p>
<p>可能的原因:</p>
<blockquote>
<p>The power LED is different on Pi3. It is controlled from GPU through a
GPIO expander which is configured as an input. It may not be possible
to drive it from the arm (certainly it is not currently). <strong>Pi3's
BT/wifi support required a number of additional GPIOs compared to Pi2</strong>.
So, the ACT and PWR leds had to move to make that possible.</p>
</blockquote>
<p>同时:</p>
<blockquote>
<p>Since the B+ the functionality of PWR LED has doubled, power indicator
and as well as an under-voltage indicator. Since GPIOs are in short
supply, as well as being an indicator it is also the under-voltage
detector - there is some external circuitry that can detect the GPIO
direction so that it is either an input with an automatic LED or an
output. This circuitry is only present on the red LED. <strong>The ability to
change the "PWR" LED pin to an output, bypasses the under-voltage detection, which is permitted but
not recommended</strong>.</p>
<p>These GPIOs may never be available as fully
featured GPIOs because they are too slow to use in many circumstances.
There is a simple GPIO driver that can efficiently control the ACT
LED, but more effort is needed to make it work with the PWR LED and
change its direction to an output. <strong>This is something we may address,
but it isn't high on the list of priorities at the moment</strong>.</p>
</blockquote>
<hr/>
<p><strong>可能的出路</strong>:没有找到任何使用Python访问GPU的方法,但是发现了一些关于访问GPU配置的讨论-共享GPU配置可以帮助您复制Python中的等效功能。在</p>
<blockquote>
<p>There is also the mailbox service that would allow userspace to <strong>fiddle
with the outputs on the expander</strong>, but not set direction - see
<a href="https://www.raspberrypi.org/forums/viewtopic.php?f=43&t=109137&start=100#p990152" rel="nofollow">https://www.raspberrypi.org/forums/viewtopic.php?f=43&t=109137&start=100#p990152</a>
and <a href="https://github.com/6by9/rpi3-gpiovirtbuf" rel="nofollow">https://github.com/6by9/rpi3-gpiovirtbuf</a></p>
</blockquote>
<p><a href="https://github.com/raspberrypi/linux/issues/1332#issuecomment-231744888" rel="nofollow">Also</a>:</p>
<blockquote>
<p>For the complete list of GPIO allocations, look at the dt-blob.dts
that configures the GPU side -
<a href="https://github.com/raspberrypi/firmware/blob/master/extra/dt-blob.dts#L1175" rel="nofollow">https://github.com/raspberrypi/firmware/blob/master/extra/dt-blob.dts#L1175</a>
Documentation is at
<a href="https://www.raspberrypi.org/documentation/configuration/pin-configuration.md" rel="nofollow">https://www.raspberrypi.org/documentation/configuration/pin-configuration.md</a></p>
</blockquote>
<p>如果我有什么有用的东西,我会把它作为更新2发布。在</p>