mirror of
https://github.com/micropython/micropython.git
synced 2026-01-07 04:30:24 +01:00
There should be no change to these tests for existing PYBV1x and PYBD_SFx boards. Signed-off-by: Damien George <damien@micropython.org>
14 lines
354 B
Python
14 lines
354 B
Python
# test stm module
|
|
|
|
import stm
|
|
import time
|
|
|
|
# test storing a full 32-bit number
|
|
# turn on then off the A15(=yellow) LED
|
|
BSRR = 0x18
|
|
stm.mem32[stm.GPIOA + BSRR] = 0x00008000
|
|
time.sleep_ms(100)
|
|
print(hex(stm.mem32[stm.GPIOA + stm.GPIO_ODR] & 0x00008000))
|
|
stm.mem32[stm.GPIOA + BSRR] = 0x80000000
|
|
print(hex(stm.mem32[stm.GPIOA + stm.GPIO_ODR] & 0x00008000))
|