forked from M-Labs/artiq
coredevice/TCA6424A: convert 'outputs' value to little endian. Closes #437
This commit is contained in:
parent
9db9f4e624
commit
42c84e0c72
|
@ -3,6 +3,13 @@
|
|||
Release notes
|
||||
=============
|
||||
|
||||
1.1 (unreleased)
|
||||
----------------
|
||||
|
||||
* TCA6424A.set converts the "outputs" value to little-endian before programming
|
||||
it into the registers.
|
||||
|
||||
|
||||
1.0
|
||||
---
|
||||
|
||||
|
|
|
@ -108,5 +108,10 @@ class TCA6424A:
|
|||
|
||||
A bit set to 1 means the TTL is an output.
|
||||
"""
|
||||
outputs_le = (
|
||||
((outputs & 0xff0000) >> 16) |
|
||||
(outputs & 0x00ff00) |
|
||||
(outputs & 0x0000ff) << 16)
|
||||
|
||||
self._write24(0x8c, 0) # set all directions to output
|
||||
self._write24(0x84, outputs) # set levels
|
||||
self._write24(0x84, outputs_le) # set levels
|
||||
|
|
Loading…
Reference in New Issue