Developer World
Spresense SDK Library v3.2.0-ebc0364
cxd56_automount.h
1/****************************************************************************
2 * boards/arm/cxd56xx/spresense/include/cxd56_automount.h
3 *
4 * Licensed to the Apache Software Foundation (ASF) under one or more
5 * contributor license agreements. See the NOTICE file distributed with
6 * this work for additional information regarding copyright ownership. The
7 * ASF licenses this file to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance with the
9 * License. You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
16 * License for the specific language governing permissions and limitations
17 * under the License.
18 *
19 ****************************************************************************/
20
21#ifndef __BOARDS_ARM_CXD56XX_SPRESENSE_INCLUDE_CXD56_AUTOMOUNT_H
22#define __BOARDS_ARM_CXD56XX_SPRESENSE_INCLUDE_CXD56_AUTOMOUNT_H
23
24/****************************************************************************
25 * Pre-processor Definitions
26 ****************************************************************************/
27
28#ifndef CONFIG_CXD56_SDCARD_AUTOMOUNT_FSTYPE
29# define CONFIG_CXD56_SDCARD_AUTOMOUNT_FSTYPE "vfat"
30#endif
31
32#ifndef CONFIG_CXD56_SDCARD_AUTOMOUNT_BLKDEV
33# define CONFIG_CXD56_SDCARD_AUTOMOUNT_BLKDEV "/dev/mmcds0"
34#endif
35
36#ifndef CONFIG_CXD56_SDCARD_AUTOMOUNT_MOUNTPOINT
37# define CONFIG_CXD56_SDCARD_AUTOMOUNT_MOUNTPOINT "/mnt/sd0"
38#endif
39
40#ifndef CONFIG_CXD56_SDCARD_AUTOMOUNT_DDELAY
41# define CONFIG_CXD56_SDCARD_AUTOMOUNT_DDELAY 1000
42#endif
43
44#ifndef CONFIG_CXD56_SDCARD_AUTOMOUNT_UDELAY
45# define CONFIG_CXD56_SDCARD_AUTOMOUNT_UDELAY 2000
46#endif
47
48/****************************************************************************
49 * Public Types
50 ****************************************************************************/
51
52/****************************************************************************
53 * Public Data
54 ****************************************************************************/
55
56#ifndef __ASSEMBLY__
57
58#undef EXTERN
59#if defined(__cplusplus)
60#define EXTERN extern "C"
61extern "C"
62{
63#else
64#define EXTERN extern
65#endif
66
67/****************************************************************************
68 * Public Functions Definitions
69 ****************************************************************************/
70
71/****************************************************************************
72 * Name: board_automount_initialize
73 *
74 * Description:
75 * Configure auto-mounters for each enable and so configured SDCARD
76 *
77 * Input Parameters:
78 * None
79 *
80 * Returned Value:
81 * None
82 *
83 ****************************************************************************/
84
85void board_automount_initialize(void);
86
87/****************************************************************************
88 * Name: board_automount_event
89 *
90 * Description:
91 * The HSMCI card detection logic has detected an insertion or removal
92 * event. It has already scheduled the MMC/SD block driver operations.
93 * Now we need to schedule the auto-mount event which will occur with a
94 * substantial delay to make sure that everything has settle down.
95 *
96 * Input Parameters:
97 * slotno - Identifies the HSMCI0 slot: HSMCI0 or HSMCI1_SLOTNO.
98 * There is a terminology problem here: Each HSMCI supports two slots,
99 * slot A and slot B. Only slot A is used. So this is not a really a
100 * slot, but an HSCMI peripheral number.
101 * inserted - True if the card is inserted in the slot. False otherwise.
102 *
103 * Returned Value:
104 * None
105 *
106 * Assumptions:
107 * Interrupts are disabled.
108 *
109 ****************************************************************************/
110
111void board_automount_event(int slotno, bool inserted);
112
113#undef EXTERN
114#if defined(__cplusplus)
115}
116#endif
117
118#endif /* __ASSEMBLY__ */
119#endif /* __BOARDS_ARM_CXD56XX_SPRESENSE_INCLUDE_CXD56_AUTOMOUNT_H */