From f184152c0501a80e95ad871927d766fdee50281b Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Wed, 8 Nov 2006 01:55:26 +0000 Subject: * changes to ata.c - idle callbacks are called after 2 sec of real idle, and shutdown and usb (it makes sense here). ata_sleep doesnt get broken by callbacks. * allow ata_sleep() at the end of buffering again * config block uses ata_idle instead of delayed sector when saving * remove delayed sector code from ata_mmc.c (idle callbacks are not yet implemented for ata_mmc.c tho) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11461 a1c6a512-1295-4272-9138-f99709370657 --- firmware/ata_idle_notify.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'firmware/ata_idle_notify.c') diff --git a/firmware/ata_idle_notify.c b/firmware/ata_idle_notify.c index a0a56e958b..c51c3800ce 100644 --- a/firmware/ata_idle_notify.c +++ b/firmware/ata_idle_notify.c @@ -18,8 +18,10 @@ ****************************************************************************/ #include #include "system.h" +#include "ata.h" #include "ata_idle_notify.h" #include "logf.h" +#include "string.h" #if USING_ATA_CALLBACK static ata_idle_notify ata_idle_notify_funcs[MAX_ATA_CALLBACKS]; @@ -52,7 +54,7 @@ bool register_ata_idle_func(ata_idle_notify function) } #if USING_ATA_CALLBACK -void unregister_ata_idle_func(ata_idle_notify func) +void unregister_ata_idle_func(ata_idle_notify func, bool run) { int i; for (i=0; i