#-*-coding:utf-8-*-
import smbus
import time
DRV8830_addr = 0x60
i2c = smbus.SMBus(1)
min_pow = 0x06
max_pow = 0x26
try:
#test DC motor
for i in range(min_pow, max_pow + 1, 1):
"CPU can access SRAM1 memory via S-bus, when SRAM1 is mapped at the address range:
0x2000 0000 to 0x2003 FFFF.
CPU can access SRAM2 memory via S-bus, when SRAM2 is mapped at the address range:
0x2004 0000 to 0x2004 FFFF."
5.2.1.1 Universal stack constraints
At all times the following basic constraints must hold:
(中略)
SP mod 4 = 0. The stack must at all times be aligned to a word boundary.
(中略)
5.2.1.2 Stack constraints at a public interface
The stack must also conform to the following constraint at a public interface:
SP mod 8 = 0. The stack must be double-word aligned.