1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2002 by Alan Korr
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
23 #include "config.h" /* for HAVE_MULTIVOLUME or not */
25 /* FixMe: These macros are a bit nasty and perhaps misplaced here.
26 We'll get rid of them once decided on how to proceed with multivolume. */
27 #ifdef HAVE_MULTIVOLUME
28 #define IF_MV(x) x /* optional volume/drive parameter */
29 #define IF_MV2(x,y) x,y /* same, for a list of arguments */
30 #define IF_MV_NONVOID(x) x /* for prototype with sole volume parameter */
32 #else /* empty definitions if no multi-volume */
35 #define IF_MV_NONVOID(x) void
39 extern void ata_enable(bool on
);
40 extern void ata_spindown(int seconds
);
41 extern void ata_sleep(void);
42 extern void ata_sleepnow(void);
43 /* NOTE: DO NOT use this to poll for disk activity.
44 If you are waiting for the disk to become active before
45 doing something use ata_idle_notify.h
47 extern bool ata_disk_is_active(void);
48 extern int ata_hard_reset(void);
49 extern int ata_soft_reset(void);
50 extern int ata_init(void);
51 extern void ata_close(void);
52 extern int ata_read_sectors(IF_MV2(int drive
,) unsigned long start
, int count
, void* buf
);
53 extern int ata_write_sectors(IF_MV2(int drive
,) unsigned long start
, int count
, const void* buf
);
54 extern void ata_spin(void);
55 #if (CONFIG_LED == LED_REAL)
56 extern void ata_set_led_enabled(bool enabled
);
58 extern unsigned short* ata_get_identify(void);
60 extern long last_disk_activity
;
61 extern int ata_spinup_time
; /* ticks */