diff options
-rw-r--r-- | libmpio/fat.c | 4 | ||||
-rw-r--r-- | libmpio/io.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/libmpio/fat.c b/libmpio/fat.c index 00ec0f7..d83dfc5 100644 --- a/libmpio/fat.c +++ b/libmpio/fat.c @@ -1,6 +1,6 @@ /* * - * $Id: fat.c,v 1.21 2003/03/15 13:24:58 germeier Exp $ + * $Id: fat.c,v 1.22 2003/03/15 14:34:44 germeier Exp $ * * Library for USB MPIO-* * @@ -288,7 +288,7 @@ mpio_fatentry_entry2hw(mpio_t *m, mpio_fatentry_t *f) chip = f->entry / (sm->max_cluster / sm->chips); cluster = f->entry - ((sm->max_cluster / sm->chips) * chip); cluster *= 0x20; - cluster += 0x01000000 * (chip^2); + cluster += 0x01000000 * (1 << chip); f->hw_address=cluster; diff --git a/libmpio/io.c b/libmpio/io.c index d94b8d4..3022103 100644 --- a/libmpio/io.c +++ b/libmpio/io.c @@ -2,7 +2,7 @@ /* * - * $Id: io.c,v 1.22 2003/03/15 13:24:58 germeier Exp $ + * $Id: io.c,v 1.23 2003/03/15 14:34:44 germeier Exp $ * * Library for USB MPIO-* * @@ -982,7 +982,7 @@ mpio_io_spare_read(mpio_t *m, BYTE mem, DWORD index, BYTE size, for (chip = 1; chip <= chips; chip++) { if (mem == MPIO_INTERNAL_MEM) - mpio_io_set_cmdpacket(m, GET_SPARE_AREA, ((chip-1)^2), + mpio_io_set_cmdpacket(m, GET_SPARE_AREA, (1 << (chip-1)), index, size, wsize, cmdpacket); if (mem == MPIO_EXTERNAL_MEM) mpio_io_set_cmdpacket(m, GET_SPARE_AREA, mem, index, size, |