forked from M-Labs/artiq
SUServo: apply bit masks to servo memory writes to prevent overflows
Signed-off-by: TPH <thomas.harty@physics.ox.ac.uk>
This commit is contained in:
parent
f6142816b8
commit
0ebff04ad7
|
@ -130,6 +130,7 @@ class SUServo:
|
|||
:param value: Data to be written.
|
||||
"""
|
||||
addr |= WE
|
||||
value &= (1 << COEFF_WIDTH) - 1
|
||||
value |= (addr >> 8) << COEFF_WIDTH
|
||||
addr = addr & 0xff
|
||||
rtio_output((self.channel << 8) | addr, value)
|
||||
|
|
Loading…
Reference in New Issue