Testing performed: That a card is successfully mounted on Pygamer with
the built in SD card slot
This module is enabled for most FULL_BUILD boards, but is disabled for
samd21 ("M0"), litex, and pca10100 for various reasons.
I noticed that this code was referring to samd-specific functionality,
and isn't enabled except in one samd board (pewpew10). Move it.
There is incomplte support for _pew in mimxrt10xx which then caused build
errors; adding a #if guard to check for _pew being enabled fixes it.
The _pew module is not likely to be important on mimxrt but I'll leave the
choice to remove it to someone else.
This improves, but does not entirely fix, the broken links that result
from the autoapi change. It fixes module-level links, but class links
still do not work (e.g., /shared-bindings/displayio/Palette.html (5.0.x)
is now just /shared-bindings/displayio/#displayio.Palette).
This is almost, but not entirely, a whitespace change.
"..." was missing or mis-placed in several places
The invalid syntax 'def f(self, ):' was used in several places.
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>
When handling negative steps, start and stop need to be mp_int_t so they
can be checked against a potential negative value during the for loop
used to set the slice values.