diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2002-07-28 15:16:36 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2002-07-28 15:16:36 +0000 |
commit | ad8ac5c3ceba6f44c2470730f1c34082c194ffdf (patch) | |
tree | 921b30436f88eff89e297a5a6ed513732bc8fa91 /firmware/drivers | |
parent | fce2a2898244a10f8155fd3cae52e8ac2be1c8a6 (diff) |
Added ata_disk_is_active() function
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1479 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers')
-rw-r--r-- | firmware/drivers/ata.c | 9 | ||||
-rw-r--r-- | firmware/drivers/ata.h | 1 |
2 files changed, 8 insertions, 2 deletions
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); |