1
0
Fork 0
forked from len0rd/rockbox

Added ata_disk_is_active() function

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1479 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Linus Nielsen Feltzing 2002-07-28 15:16:36 +00:00
parent fce2a28982
commit ad8ac5c3ce
2 changed files with 8 additions and 2 deletions

View file

@ -174,7 +174,7 @@ int ata_read_sectors(unsigned long start,
return ret; return ret;
} }
#ifdef DISK_WRITE //#ifdef DISK_WRITE
int ata_write_sectors(unsigned long start, int ata_write_sectors(unsigned long start,
unsigned char count, unsigned char count,
void* buf) void* buf)
@ -230,7 +230,7 @@ int ata_write_sectors(unsigned long start,
mutex_unlock(&ata_mtx); mutex_unlock(&ata_mtx);
return i; return i;
} }
#endif //#endif
static int check_registers(void) static int check_registers(void)
{ {
@ -269,6 +269,11 @@ void ata_spindown(int seconds)
sleep_timeout = seconds * HZ; sleep_timeout = seconds * HZ;
} }
bool ata_disk_is_active(void)
{
return !sleeping;
}
static int ata_perform_sleep(void) static int ata_perform_sleep(void)
{ {
int ret = 0; int ret = 0;

View file

@ -35,6 +35,7 @@
extern void ata_enable(bool on); extern void ata_enable(bool on);
extern void ata_spindown(int seconds); extern void ata_spindown(int seconds);
extern int ata_sleep(void); extern int ata_sleep(void);
extern bool ata_disk_is_active(void);
extern int ata_hard_reset(void); extern int ata_hard_reset(void);
extern int ata_soft_reset(void); extern int ata_soft_reset(void);
extern int ata_init(void); extern int ata_init(void);