Logo
Explore Help
Register Sign In
fengqi/lv_micropython
1
0
Fork 0
You've already forked lv_micropython
Code Issues Pull Requests 1 Actions Packages Projects Releases Wiki Activity
lv_micropython/tests/pyb/pyb_f405.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
303 B
Python
Raw Normal View History

tests/pyb: Adjust tests so they can run on PYB and PYBLITE. A few tests still fail on PYBLITE, and that's due to differences in the available peripheral block numbers on the different MCUs (eg I2C(2) exists on one, but it's I2C(3) on the other).
2017-02-06 13:48:01 +11:00
# test pyb module on F405 MCUs
import os, pyb
if not "STM32F405" in os.uname().machine:
print("SKIP")
tests: Convert remaining "sys.exit()" to "raise SystemExit".
2017-06-10 20:14:16 +03:00
raise SystemExit
tests/pyb: Adjust tests so they can run on PYB and PYBLITE. A few tests still fail on PYBLITE, and that's due to differences in the available peripheral block numbers on the different MCUs (eg I2C(2) exists on one, but it's I2C(3) on the other).
2017-02-06 13:48:01 +11:00
print(pyb.freq())
print(type(pyb.rng()))
tests/pyb: Refactor pyboard tests to work on PYBv1, PYBLITEv1 and PYBD.
2019-12-13 16:43:17 +11:00
# test HAL error specific to F405
i2c = pyb.I2C(2, pyb.I2C.MASTER)
try:
i2c.recv(1, 1)
except OSError as e:
print(repr(e))
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 89ms Template: 1ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API