Fix typo.
[Rockbox.git] / firmware / export / ata.h
blobd3323308e8fe5231bf42f290ce19a528b09f451e
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
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 ****************************************************************************/
19 #ifndef __ATA_H__
20 #define __ATA_H__
22 #include <stdbool.h>
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 */
31 #define NUM_VOLUMES 2
32 #else /* empty definitions if no multi-volume */
33 #define IF_MV(x)
34 #define IF_MV2(x,y)
35 #define IF_MV_NONVOID(x) void
36 #define NUM_VOLUMES 1
37 #endif
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 extern bool ata_disk_is_active(void);
44 extern int ata_hard_reset(void);
45 extern int ata_soft_reset(void);
46 extern int ata_init(void);
47 extern int ata_read_sectors(IF_MV2(int drive,) unsigned long start, int count, void* buf);
48 extern int ata_write_sectors(IF_MV2(int drive,) unsigned long start, int count, const void* buf);
49 extern void ata_spin(void);
50 #if (CONFIG_LED == LED_REAL)
51 extern void ata_set_led_enabled(bool enabled);
52 #endif
53 extern unsigned short* ata_get_identify(void);
55 extern long last_disk_activity;
56 extern int ata_spinup_time; /* ticks */
58 #endif