diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-07-29 16:36:15 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-07-29 16:36:15 -0600 |
commit | 1b0778ed3fd4c7f9de62becd2899378ecad34d76 (patch) | |
tree | ce04a91bda262b37afd4cc7ac06ffcd568929e30 | |
parent | f7cb40b81068b7be34c10eb15dc2fa8e019832d7 (diff) | |
download | nuttx-1b0778ed3fd4c7f9de62becd2899378ecad34d76.tar.gz nuttx-1b0778ed3fd4c7f9de62becd2899378ecad34d76.tar.bz2 nuttx-1b0778ed3fd4c7f9de62becd2899378ecad34d76.zip |
The SAMA5D4-EK NSH and NxWM configurations now have the auto-mounter configured to automatically mount the FAT file system on HSMCI0 at /mnt/sdcard
-rw-r--r-- | nuttx/configs/sama5d4-ek/nsh/defconfig | 7 | ||||
-rw-r--r-- | nuttx/configs/sama5d4-ek/nxwm/defconfig | 6 | ||||
-rw-r--r-- | nuttx/fs/fs_automount.c | 18 | ||||
-rw-r--r-- | nuttx/include/nuttx/fs/automount.h | 6 |
4 files changed, 25 insertions, 12 deletions
diff --git a/nuttx/configs/sama5d4-ek/nsh/defconfig b/nuttx/configs/sama5d4-ek/nsh/defconfig index bdd18e57e..0e503c67c 100644 --- a/nuttx/configs/sama5d4-ek/nsh/defconfig +++ b/nuttx/configs/sama5d4-ek/nsh/defconfig @@ -417,6 +417,12 @@ CONFIG_SAMA5D4_MB_REVC=y # CONFIG_SAMA5D4EK_396MHZ is not set CONFIG_SAMA5D4EK_528MHZ=y CONFIG_SAMA5D4EK_DRAM_BOOT=y +CONFIG_SAMA5D4EK_HSMCI0_AUTOMOUNT=y +CONFIG_SAMA5D4EK_HSMCI0_AUTOMOUNT_FSTYPE="vfat" +CONFIG_SAMA5D4EK_HSMCI0_AUTOMOUNT_BLKDEV="/dev/mmcsd0" +CONFIG_SAMA5D4EK_HSMCI0_AUTOMOUNT_MOUNTPOINT="/mnt/sdcard" +CONFIG_SAMA5D4EK_HSMCI0_AUTOMOUNT_DDELAY=1000 +CONFIG_SAMA5D4EK_HSMCI0_AUTOMOUNT_UDELAY=2000 CONFIG_SAMA5D4EK_MXT_I2CFREQUENCY=400000 CONFIG_SAMA5D4EK_MXT_DEVMINOR=0 @@ -811,6 +817,7 @@ CONFIG_NET_ETHERNET=y # File system configuration # # CONFIG_DISABLE_MOUNTPOINT is not set +CONFIG_FS_AUTOMOUNTER=y # CONFIG_DISABLE_PSEUDOFS_OPERATIONS is not set CONFIG_FS_READABLE=y CONFIG_FS_WRITABLE=y diff --git a/nuttx/configs/sama5d4-ek/nxwm/defconfig b/nuttx/configs/sama5d4-ek/nxwm/defconfig index 6de02f3a8..021ae2a29 100644 --- a/nuttx/configs/sama5d4-ek/nxwm/defconfig +++ b/nuttx/configs/sama5d4-ek/nxwm/defconfig @@ -411,6 +411,11 @@ CONFIG_NSH_MMCSDSLOTNO=0 # CONFIG_SAMA5D4EK_396MHZ is not set CONFIG_SAMA5D4EK_528MHZ=y CONFIG_SAMA5D4EK_DRAM_BOOT=y +CONFIG_SAMA5D4EK_HSMCI0_AUTOMOUNT_FSTYPE="vfat" +CONFIG_SAMA5D4EK_HSMCI0_AUTOMOUNT_BLKDEV="/dev/mmcsd0" +CONFIG_SAMA5D4EK_HSMCI0_AUTOMOUNT_MOUNTPOINT="/mnt/sdcard" +CONFIG_SAMA5D4EK_HSMCI0_AUTOMOUNT_DDELAY=1000 +CONFIG_SAMA5D4EK_HSMCI0_AUTOMOUNT_UDELAY=2000 CONFIG_SAMA5D4EK_MXT_I2CFREQUENCY=400000 CONFIG_SAMA5D4EK_MXT_DEVMINOR=0 @@ -807,6 +812,7 @@ CONFIG_NET_ETHERNET=y # File system configuration # # CONFIG_DISABLE_MOUNTPOINT is not set +CONFIG_FS_AUTOMOUNTER=y # CONFIG_DISABLE_PSEUDOFS_OPERATIONS is not set CONFIG_FS_READABLE=y CONFIG_FS_WRITABLE=y diff --git a/nuttx/fs/fs_automount.c b/nuttx/fs/fs_automount.c index 14b2420fc..51ffe70ef 100644 --- a/nuttx/fs/fs_automount.c +++ b/nuttx/fs/fs_automount.c @@ -397,7 +397,7 @@ static void automount_timeout(int argc, uint32_t arg1, ...) * Name: automount_worker * * Description: - * Performs automount actions on the worker thread. + * Performs auto-mount actions on the worker thread. * * Input Parameters: * arg - Work argument set by work_queue() @@ -450,7 +450,7 @@ static void automount_worker(FAR void *arg) * * Input Parameters: * lower - Persistent board configuration data - * arg - Data associated with the automounter + * arg - Data associated with the auto-mounter * inserted - True: Media has been inserted. False: media has been removed * * Returned Value: @@ -523,13 +523,13 @@ static int automount_interrupt(FAR const struct automount_lower_s *lower, * Name: automount_initialize * * Description: - * Configure the automounter. + * Configure the auto mounter. * * Input Parameters: * lower - Persistent board configuration data * * Returned Value: - * A void* handle. The only use for this handle is with auto_uninitialize(). + * A void* handle. The only use for this handle is with automount_uninitialize(). * NULL is returned on any failure. * ****************************************************************************/ @@ -542,7 +542,7 @@ FAR void *automount_initialize(FAR const struct automount_lower_s *lower) fvdbg("lower=%p\n", lower); DEBUGASSERT(lower); - /* Allocate an automounter state structure */ + /* Allocate an auto-mounter state structure */ priv = (FAR struct automounter_state_s *) kzalloc(sizeof(struct automounter_state_s)); @@ -563,7 +563,7 @@ FAR void *automount_initialize(FAR const struct automount_lower_s *lower) if (!priv->wdog) { fdbg("ERROR: Failed to create a timer\n"); - auto_uninitialize(priv); + automount_uninitialize(priv); return NULL; } @@ -590,7 +590,7 @@ FAR void *automount_initialize(FAR const struct automount_lower_s *lower) if (ret < 0) { fdbg("ERROR: Failed to attach automount interrupt: %d\n", ret); - auto_uninitialize(priv); + automount_uninitialize(priv); return NULL; } @@ -599,7 +599,7 @@ FAR void *automount_initialize(FAR const struct automount_lower_s *lower) } /**************************************************************************** - * Name: auto_uninitialize + * Name: automount_uninitialize * * Description: * Stop the automounter and free resources that it used. NOTE that the @@ -613,7 +613,7 @@ FAR void *automount_initialize(FAR const struct automount_lower_s *lower) * ****************************************************************************/ -void auto_uninitialize(FAR void *handle) +void automount_uninitialize(FAR void *handle) { FAR struct automounter_state_s *priv = (FAR struct automounter_state_s *)handle; FAR const struct automount_lower_s *lower; diff --git a/nuttx/include/nuttx/fs/automount.h b/nuttx/include/nuttx/fs/automount.h index cfc9eb2d6..3af62d5e0 100644 --- a/nuttx/include/nuttx/fs/automount.h +++ b/nuttx/include/nuttx/fs/automount.h @@ -161,7 +161,7 @@ extern "C" * lower - Persistent board configuration data * * Returned Value: - * A void* handle. The only use for this handle is with auto_uninitialize(). + * A void* handle. The only use for this handle is with automount_uninitialize(). * NULL is returned on any failure. * ****************************************************************************/ @@ -169,7 +169,7 @@ extern "C" FAR void *automount_initialize(FAR const struct automount_lower_s *lower); /**************************************************************************** - * Name: auto_uninitialize + * Name: automount_uninitialize * * Description: * Stop the automounter and free resources that it used. NOTE that the @@ -183,7 +183,7 @@ FAR void *automount_initialize(FAR const struct automount_lower_s *lower); * ****************************************************************************/ -void auto_uninitialize(FAR void *handle); +void automount_uninitialize(FAR void *handle); #undef EXTERN #ifdef __cplusplus |