summaryrefslogtreecommitdiff
path: root/firmware/export/ata_idle_notify.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/export/ata_idle_notify.h')
-rw-r--r--firmware/export/ata_idle_notify.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/firmware/export/ata_idle_notify.h b/firmware/export/ata_idle_notify.h
index aea2c92b06..ceba2eeda4 100644
--- a/firmware/export/ata_idle_notify.h
+++ b/firmware/export/ata_idle_notify.h
@@ -26,15 +26,15 @@
26#include "events.h" 26#include "events.h"
27 27
28/* 28/*
29 NOTE: ata_idle_notify usage notes.. 29 NOTE: storage_idle_notify usage notes..
30 30
311) The callbacks are called in the ata thread, not main/your thread. 311) The callbacks are called in the ata thread, not main/your thread.
322) Asynchronous callbacks (like the buffer refill) should be avoided. 322) Asynchronous callbacks (like the buffer refill) should be avoided.
33 If you must use an async callback, remember to check ata_is_active() before 33 If you must use an async callback, remember to check storage_is_active() before
34 accessing the disk, and do not call any functions between that check and the 34 accessing the disk, and do not call any functions between that check and the
35 disk access which may cause a yield (lcd_update() does this!). 35 disk access which may cause a yield (lcd_update() does this!).
363) Do not call any yielding functions in the callback. 363) Do not call any yielding functions in the callback.
374) Do not call ata_sleep in the callbacks. 374) Do not call storage_sleep in the callbacks.
385) Don't Panic! 385) Don't Panic!
39 39
40*/ 40*/
@@ -43,21 +43,21 @@ enum {
43 DISK_EVENT_SPINUP = (EVENT_CLASS_DISK|1), 43 DISK_EVENT_SPINUP = (EVENT_CLASS_DISK|1),
44}; 44};
45 45
46#define USING_ATA_CALLBACK !defined(SIMULATOR) \ 46#define USING_STORAGE_CALLBACK !defined(SIMULATOR) \
47 && ! ((CONFIG_STORAGE & STORAGE_NAND) \ 47 && ! ((CONFIG_STORAGE & STORAGE_NAND) \
48 && (CONFIG_NAND & NAND_IFP7XX)) \ 48 && (CONFIG_NAND & NAND_IFP7XX)) \
49 && !defined(BOOTLOADER) 49 && !defined(BOOTLOADER)
50 50
51typedef bool (*ata_idle_notify)(void); 51typedef bool (*storage_idle_notify)(void);
52 52
53extern void register_ata_idle_func(ata_idle_notify function); 53extern void register_storage_idle_func(storage_idle_notify function);
54#if USING_ATA_CALLBACK 54#if USING_STORAGE_CALLBACK
55extern void unregister_ata_idle_func(ata_idle_notify function, bool run); 55extern void unregister_storage_idle_func(storage_idle_notify function, bool run);
56extern bool call_ata_idle_notifys(bool force); 56extern bool call_storage_idle_notifys(bool force);
57#else 57#else
58#define unregister_ata_idle_func(f,r) 58#define unregister_storage_idle_func(f,r)
59#define call_ata_idle_notifys(f) 59#define call_storage_idle_notifys(f)
60#define ata_idle_notify_init(s) 60#define storage_idle_notify_init(s)
61#endif 61#endif
62 62
63#endif /* __ATACALLBACK_H__ */ 63#endif /* __ATACALLBACK_H__ */