1# test pyb module on F405 MCUs 2 3import os, pyb 4 5if not "STM32F405" in os.uname().machine: 6 print("SKIP") 7 raise SystemExit 8 9print(pyb.freq()) 10print(type(pyb.rng())) 11 12# test HAL error specific to F405 13i2c = pyb.I2C(2, pyb.I2C.MASTER) 14try: 15 i2c.recv(1, 1) 16except OSError as e: 17 print(repr(e)) 18