mirror of
https://github.com/openmv/openmv.git
synced 2025-09-26 23:09:13 +08:00
Eth low power (#1362)
* Align eth low-power mode with upstream PR. * Add example Eth cable test.
This commit is contained in:
parent
5f4250e74e
commit
190c708e4c
@ -0,0 +1,20 @@
|
||||
# Ethernet Cable Status Example.
|
||||
#
|
||||
# This example prints the cable connection status.
|
||||
|
||||
import network, time
|
||||
|
||||
lan = network.LAN()
|
||||
|
||||
# Make sure Eth is not in low-power mode.
|
||||
lan.config(low_power=False)
|
||||
|
||||
# Delay for auto negotiation
|
||||
time.sleep(3.0)
|
||||
|
||||
while (True):
|
||||
print("Cable is", "connected." if lan.status() else "disconnected.")
|
||||
time.sleep(1.0)
|
||||
|
||||
# Put Eth back in low-power mode if needed.
|
||||
#lan.config(low_power=True)
|
@ -1 +1 @@
|
||||
Subproject commit a954efb9184ec020df2ce7a23f84e158c8b7f628
|
||||
Subproject commit b814ad51d6b51b94fb7dab01dc111d5053d98a82
|
Loading…
Reference in New Issue
Block a user