diff options
| -rw-r--r-- | firmware/ata.c | 8 | ||||
| -rw-r--r-- | firmware/ata.h | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/firmware/ata.c b/firmware/ata.c index 460808a..cb4e1e6 100644 --- a/firmware/ata.c +++ b/firmware/ata.c @@ -84,7 +84,7 @@ static int wait_for_end_of_transfer(void) int ata_read_sectors(unsigned long start, unsigned char count, - unsigned short* buf) + void* buf) { int i; @@ -106,7 +106,7 @@ int ata_read_sectors(unsigned long start, return 0; for (j=0; j<256; j++) - buf[j] = SWAB16(ATA_DATA); + ((unsigned short*)buf)[j] = SWAB16(ATA_DATA); } led_turn_off(); @@ -116,7 +116,7 @@ int ata_read_sectors(unsigned long start, int ata_write_sectors(unsigned long start, unsigned char count, - unsigned short* buf) + void* buf) { int i; @@ -138,7 +138,7 @@ int ata_write_sectors(unsigned long start, return 0; for (j=0; j<256; j++) - ATA_DATA = SWAB16(buf[j]); + ATA_DATA = SWAB16(((unsigned short*)buf)[j]); } led_turn_off (); diff --git a/firmware/ata.h b/firmware/ata.h index de94803..50cd85d 100644 --- a/firmware/ata.h +++ b/firmware/ata.h @@ -24,9 +24,9 @@ extern int ata_soft_reset(void); extern int ata_init(void); extern int ata_read_sectors(unsigned long start, unsigned char count, - unsigned short* buf); + void* buf); extern int ata_write_sectors(unsigned long start, unsigned char count, - unsigned short* buf); + void* buf); #endif |