The protocol is pretty straight forward.
First you have to set the frequency, eg. 16000 for 16khz.
write bytes [0,0,62,128] to 0x60
(62<<
+128 == 16000
0x60 = device addr (0x30) << 1
Next you send a command [motor,direction,duty msb,duty lsb]
eg. spin motor a, clockwise, 34.5%, write [16,2,13,122] to 0x60
Motor:
a = 16 (0 | 0x10)
b = 17 (0 | 0x10)
Direction:
short break(?) = 0
counter clockwise = 1
clockwise = 2
stop = 3
standby = 4
Duty:
duty *= 100, eg. 34.5% -> 3450
3450>>8 == 13
3450 & 0xFF = 122
msb = 13, lsb = 122
To stop motor a, write [16,3,39,16]
The default duty is 100% or 10000.
10000>>8 == 39
10000 & 0xFF == 16