forked from len0rd/rockbox
Changed to void* for ata_read/write_sectors()
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@172 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
0f532a0041
commit
f32f78a0fb
2 changed files with 6 additions and 6 deletions
|
@ -84,7 +84,7 @@ static int wait_for_end_of_transfer(void)
|
||||||
|
|
||||||
int ata_read_sectors(unsigned long start,
|
int ata_read_sectors(unsigned long start,
|
||||||
unsigned char count,
|
unsigned char count,
|
||||||
unsigned short* buf)
|
void* buf)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ int ata_read_sectors(unsigned long start,
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
for (j=0; j<256; j++)
|
for (j=0; j<256; j++)
|
||||||
buf[j] = SWAB16(ATA_DATA);
|
((unsigned short*)buf)[j] = SWAB16(ATA_DATA);
|
||||||
}
|
}
|
||||||
|
|
||||||
led_turn_off();
|
led_turn_off();
|
||||||
|
@ -116,7 +116,7 @@ int ata_read_sectors(unsigned long start,
|
||||||
|
|
||||||
int ata_write_sectors(unsigned long start,
|
int ata_write_sectors(unsigned long start,
|
||||||
unsigned char count,
|
unsigned char count,
|
||||||
unsigned short* buf)
|
void* buf)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -138,7 +138,7 @@ int ata_write_sectors(unsigned long start,
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
for (j=0; j<256; j++)
|
for (j=0; j<256; j++)
|
||||||
ATA_DATA = SWAB16(buf[j]);
|
ATA_DATA = SWAB16(((unsigned short*)buf)[j]);
|
||||||
}
|
}
|
||||||
|
|
||||||
led_turn_off ();
|
led_turn_off ();
|
||||||
|
|
|
@ -24,9 +24,9 @@ extern int ata_soft_reset(void);
|
||||||
extern int ata_init(void);
|
extern int ata_init(void);
|
||||||
extern int ata_read_sectors(unsigned long start,
|
extern int ata_read_sectors(unsigned long start,
|
||||||
unsigned char count,
|
unsigned char count,
|
||||||
unsigned short* buf);
|
void* buf);
|
||||||
extern int ata_write_sectors(unsigned long start,
|
extern int ata_write_sectors(unsigned long start,
|
||||||
unsigned char count,
|
unsigned char count,
|
||||||
unsigned short* buf);
|
void* buf);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue