summaryrefslogtreecommitdiff
path: root/firmware/export/sd.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/export/sd.h')
-rw-r--r--firmware/export/sd.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/firmware/export/sd.h b/firmware/export/sd.h
new file mode 100644
index 0000000000..8e1fa88ceb
--- /dev/null
+++ b/firmware/export/sd.h
@@ -0,0 +1,54 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2002 by Alan Korr
11 * Copyright (C) 2008 by Frank Gevaerts
12 *
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License
15 * as published by the Free Software Foundation; either version 2
16 * of the License, or (at your option) any later version.
17 *
18 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 * KIND, either express or implied.
20 *
21 ****************************************************************************/
22#ifndef __SD_H__
23#define __SD_H__
24
25#include <stdbool.h>
26#include "mv.h" /* for HAVE_MULTIVOLUME or not */
27
28struct storage_info;
29
30void sd_enable(bool on);
31void sd_spindown(int seconds);
32void sd_sleep(void);
33bool sd_disk_is_active(void);
34int sd_hard_reset(void);
35int sd_soft_reset(void);
36int sd_init(void);
37void sd_close(void);
38int sd_read_sectors(IF_MV2(int drive,) unsigned long start, int count, void* buf);
39int sd_write_sectors(IF_MV2(int drive,) unsigned long start, int count, const void* buf);
40void sd_spin(void);
41
42#if (CONFIG_LED == LED_REAL)
43void sd_set_led_enabled(bool enabled);
44#endif
45
46void sd_get_info(IF_MV2(int drive,) struct storage_info *info);
47#ifdef HAVE_HOTSWAP
48bool sd_removable(IF_MV_NONVOID(int drive));
49bool sd_present(IF_MV_NONVOID(int drive));
50#endif
51
52long sd_last_disk_activity(void);
53
54#endif