Skip to content

Commit 9c318b6

Browse files
committed
i8255.h: fix _i8255_write_port_pins (fixed #108)
1 parent 4d2f29f commit 9c318b6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

chips/i8255.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -386,10 +386,10 @@ static uint64_t _i8255_read(i8255_t* ppi, uint64_t pins) {
386386
}
387387

388388
static uint64_t _i8255_write_port_pins(i8255_t* ppi, uint64_t pins) {
389-
if ((ppi->control & I8255_CTRL_A_OUTPUT) == I8255_CTRL_A_OUTPUT) {
389+
if ((ppi->control & I8255_CTRL_A) == I8255_CTRL_A_OUTPUT) {
390390
I8255_SET_PA(pins, ppi->pa.outp);
391391
}
392-
if ((ppi->control & I8255_CTRL_B_OUTPUT) == I8255_CTRL_B_OUTPUT) {
392+
if ((ppi->control & I8255_CTRL_B) == I8255_CTRL_B_OUTPUT) {
393393
I8255_SET_PB(pins, ppi->pb.outp);
394394
}
395395
if ((ppi->control & I8255_CTRL_CHI) == I8255_CTRL_CHI_OUTPUT) {

0 commit comments

Comments
 (0)