Skip to content

Commit

Permalink
240630
Browse files Browse the repository at this point in the history
  • Loading branch information
Pozsar Zsolt committed Jun 30, 2024
1 parent c101faa commit 01773a4
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
4 changes: 2 additions & 2 deletions programs/mm8d-test-mm8d.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,8 @@ while True:
if HW == 0:
GPIO.cleanup()
else:
portio.outb(0, lpt_address + lpt_bits[5][0])
portio.outb(0, lpt_address + lpt_bits[9][0])
writetolo(0,0,0,0)
writetoro(0,0,0,0,0,0,0,0)
sys.exit(0)

if selection == '1':
Expand Down
16 changes: 15 additions & 1 deletion programs/mm8d.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -1044,22 +1044,36 @@ def closelocalports():
lpterror = 0
outdata = 0
outbit = 0
outdata = 0
outbit = 0
outbit = lpt_bits[5][2] ^ 0
outdata = outdata | (2 ** lpt_bits[5][1]) * outbit
outbit = lpt_bits[6][2] ^ 0
outdata = outdata | (2 ** lpt_bits[6][1]) * outbit
outbit = lpt_bits[7][2] ^ 0
outdata = outdata | (2 ** lpt_bits[7][1]) * outbit
outbit = lpt_bits[8][2] ^ 0
outdata = outdata | (2 ** lpt_bits[8][1]) * outbit
portio.outb(outdata,lpt_address + lpt_bits[5][0])
portio.outb(outdata, lpt_address + lpt_bits[5][0])
if (0x0F & portio.inb(lpt_address + lpt_bits[5][0]) == outdata):
outdata = 0
outbit = 0
outbit = lpt_bits[9][2] ^ 0
outdata = outdata | (2 ** lpt_bits[9][1]) * outbit
outbit = lpt_bits[10][2] ^ 0
outdata = outdata | (2 ** lpt_bits[10][1]) * outbit
outbit = lpt_bits[11][2] ^ 0
outdata = outdata | (2 ** lpt_bits[11][1]) * outbit
outbit = lpt_bits[12][2] ^ 0
outdata = outdata | (2 ** lpt_bits[12][1]) * outbit
outbit = lpt_bits[13][2] ^ 0
# unused outputs
outdata = outdata | (2 ** lpt_bits[13][1]) * outbit
outbit = lpt_bits[14][2] ^ 0
outdata = outdata | (2 ** lpt_bits[14][1]) * outbit
outbit = lpt_bits[15][2] ^ 0
outdata = outdata | (2 ** lpt_bits[15][1]) * outbit
outbit = lpt_bits[16][2] ^ 0
outdata = outdata | (2 ** lpt_bits[16][1]) * outbit
portio.outb(outdata,lpt_address + lpt_bits[9][0])
if (portio.inb(lpt_address + lpt_bits[9][0]) != outdata):
Expand Down

0 comments on commit 01773a4

Please sign in to comment.