1# test stm module
2
3import stm
4import pyb
5
6# test storing a full 32-bit number
7# turn on then off the A15(=yellow) LED
8BSRR = 0x18
9stm.mem32[stm.GPIOA + BSRR] = 0x00008000
10pyb.delay(100)
11print(hex(stm.mem32[stm.GPIOA + stm.GPIO_ODR] & 0x00008000))
12stm.mem32[stm.GPIOA + BSRR] = 0x80000000
13print(hex(stm.mem32[stm.GPIOA + stm.GPIO_ODR] & 0x00008000))
14