Skip to content

Commit ac483df

Browse files
committed
Fix peripheral range logic error
1 parent 0035d65 commit ac483df

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/peripherals.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ static inline void PreSetDataMem(Machine *m, Address16 address)
1111
UNUSED(m);
1212
UNUSED(address);
1313
#ifdef PERIPHERAL_USI
14-
if (address <= 0x10 || address >= 0x0D)
14+
if (address <= 0x10 && address >= 0x0D)
1515
{
1616
USI_PostGetDataMem(m, address);
1717
}
@@ -23,7 +23,7 @@ static inline void PostSetDataMem(Machine *m, Address16 address)
2323
UNUSED(m);
2424
UNUSED(address);
2525
#ifdef PERIPHERAL_USI
26-
if (address <= 0x10 || address >= 0x0D)
26+
if (address <= 0x10 && address >= 0x0D)
2727
{
2828
USI_PostGetDataMem(m, address);
2929
}
@@ -35,7 +35,7 @@ static inline void PreGetDataMem(Machine *m, Address16 address)
3535
UNUSED(m);
3636
UNUSED(address);
3737
#ifdef PERIPHERAL_USI
38-
if (address <= 0x10 || address >= 0x0D)
38+
if (address <= 0x10 && address >= 0x0D)
3939
{
4040
USI_PostGetDataMem(m, address);
4141
}
@@ -47,7 +47,7 @@ static inline void PostGetDataMem(Machine *m, Address16 address)
4747
UNUSED(m);
4848
UNUSED(address);
4949
#ifdef PERIPHERAL_USI
50-
if (address <= 0x10 || address >= 0x0D)
50+
if (address <= 0x10 && address >= 0x0D)
5151
{
5252
USI_PostGetDataMem(m, address);
5353
}

0 commit comments

Comments
 (0)