| Age | Commit message (Collapse) | Author |
|
gcc has tightened the restrictions on forward declarations that lack
"extern". Fix them up.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This pulls all common functionality into `shared-bindings` and keeps
platform-specific code inside `nrf`. Additionally, this performs most
validation in the `shared-bindings` site.
The only validation that occurs inside platform-specific `common-hal`
code is related to timeout limits that are platform-specific.
Additionally, all documentation is now inside the `shared-bindings`
directory.
Signed-off-by: Sean Cross <sean@xobs.io>
|
|
With this patch, the exception can now be caught:
import microcontroller
import watchdog
import time
wdt = microcontroller.watchdog
wdt.timeout = 5
while True:
wdt.mode = watchdog.WatchDogMode.RAISE
print("Starting loop -- should exit after five seconds")
try:
while True:
time.sleep(10)
# pass # This also works for a spinloop
except watchdog.WatchDogTimeout as e:
print("Watchdog Expired (PASS)")
except Exception as e:
print("Other exception (FAIL)")
print("Exited loop")
This prints:
Starting loop -- should exit after five seconds
Watchdog Expired (PASS)
Starting loop -- should exit after five seconds
Watchdog Expired (PASS)
Starting loop -- should exit after five seconds
Watchdog Expired (PASS)
Signed-off-by: Sean Cross <sean@xobs.io>
|
|
Make this exception globally available to all platforms that have
enabled the watchdog timer.
Signed-off-by: Sean Cross <sean@xobs.io>
|
|
This refactors the WatchDogTimer API to use the format proposed in
https://github.com/adafruit/circuitpython/pull/2933#issuecomment-632268227
Signed-off-by: Sean Cross <sean@xobs.io>
|
|
Signed-off-by: Sean Cross <sean@xobs.io>
|
|
This also places it under the `microcontroller` object.
Signed-off-by: Sean Cross <sean@xobs.io>
|