mirror of
https://github.com/brmlab/edubrm.git
synced 2025-06-08 21:03:59 +02:00
fix shifts
This commit is contained in:
parent
af36fa43f0
commit
3e1c56c744
2 changed files with 6 additions and 6 deletions
|
@ -91,7 +91,7 @@ class Device:
|
|||
randint(0,1), randint(0,1), randint(0,1)) # IO1 .. IO3
|
||||
else:
|
||||
i = self.epi.read(self.INSIZE)
|
||||
return (i[0] + i[1]<<8, # AD0
|
||||
i[2] + i[3]<<8, i[4] + i[5]<<8, i[6] + i[7]<<8, # AD1 .. AD3
|
||||
i[9] + i[9]<<8, i[10] + i[11]<<8, i[12] + i[13]<<8, # AD4 .. AD6
|
||||
i[14] & 0x01, (i[14] & 0x02) >> 1, (i[14] & 0x04) >> 2) # IO1 .. IO3
|
||||
return (i[0] + (i[1]<<8), # AD0
|
||||
i[2] + (i[3]<<8), i[4] + (i[5]<<8), i[6] + (i[7]<<8), # AD1 .. AD3
|
||||
i[9] + (i[9]<<8), i[10] + (i[11]<<8), i[12] + (i[13]<<8), # AD4 .. AD6
|
||||
i[14] & 0x01, (i[14] & 0x02) >> 1, (i[14] & 0x04) >> 2) # IO1 .. IO3
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue