From ad8ac5c3ceba6f44c2470730f1c34082c194ffdf Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Sun, 28 Jul 2002 15:16:36 +0000 Subject: Added ata_disk_is_active() function git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1479 a1c6a512-1295-4272-9138-f99709370657 --- firmware/drivers/ata.c | 9 +++++++-- firmware/drivers/ata.h | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'firmware') diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c index 18f50b24df..e80d53c3d0 100644 --- a/firmware/drivers/ata.c +++ b/firmware/drivers/ata.c @@ -174,7 +174,7 @@ int ata_read_sectors(unsigned long start, return ret; } -#ifdef DISK_WRITE +//#ifdef DISK_WRITE int ata_write_sectors(unsigned long start, unsigned char count, void* buf) @@ -230,7 +230,7 @@ int ata_write_sectors(unsigned long start, mutex_unlock(&ata_mtx); return i; } -#endif +//#endif static int check_registers(void) { @@ -269,6 +269,11 @@ void ata_spindown(int seconds) sleep_timeout = seconds * HZ; } +bool ata_disk_is_active(void) +{ + return !sleeping; +} + static int ata_perform_sleep(void) { int ret = 0; diff --git a/firmware/drivers/ata.h b/firmware/drivers/ata.h index 77c4c2b7bf..aa9c767cbb 100644 --- a/firmware/drivers/ata.h +++ b/firmware/drivers/ata.h @@ -35,6 +35,7 @@ extern void ata_enable(bool on); extern void ata_spindown(int seconds); extern int ata_sleep(void); +extern bool ata_disk_is_active(void); extern int ata_hard_reset(void); extern int ata_soft_reset(void); extern int ata_init(void); -- cgit v1.2.3