Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
vfs_manager.h
00001 /** 00002 * @file vfs_manager.h 00003 * @brief Methods that build and manipulate a virtual file system 00004 * 00005 * DAPLink Interface Firmware 00006 * Copyright (c) 2009-2016, ARM Limited, All Rights Reserved 00007 * SPDX-License-Identifier: Apache-2.0 00008 * 00009 * Licensed under the Apache License, Version 2.0 (the "License"); you may 00010 * not use this file except in compliance with the License. 00011 * You may obtain a copy of the License at 00012 * 00013 * http://www.apache.org/licenses/LICENSE-2.0 00014 * 00015 * Unless required by applicable law or agreed to in writing, software 00016 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 00017 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00018 * See the License for the specific language governing permissions and 00019 * limitations under the License. 00020 */ 00021 00022 #ifndef VFS_MANAGER_USER_H 00023 #define VFS_MANAGER_USER_H 00024 00025 #include <stdint.h> 00026 #include <stdbool.h> 00027 00028 #include "virtual_fs.h" 00029 #include "error.h" 00030 00031 #ifdef __cplusplus 00032 extern "C" { 00033 #endif 00034 00035 00036 extern const vfs_filename_t daplink_mode_file_name; 00037 00038 /* Callable from anywhere */ 00039 00040 // Enable or disable the virtual filesystem 00041 void vfs_mngr_fs_enable(bool enabled); 00042 00043 // Remount the virtual filesystem 00044 void vfs_mngr_fs_remount(void); 00045 00046 00047 /* Callable only from the thread running the virtual fs */ 00048 00049 // Initialize the VFS manager 00050 // Must be called after USB has been initialized (usbd_init()) 00051 // Notes: Must only be called from the thread runnning USB 00052 void vfs_mngr_init(bool enabled); 00053 00054 // Run the vfs manager state machine 00055 // Notes: Must only be called from the thread runnning USB 00056 void vfs_mngr_periodic(uint32_t elapsed_ms); 00057 00058 // Return the status of the last transfer or ERROR_SUCCESS 00059 // if none have been performed yet 00060 error_t vfs_mngr_get_transfer_status(void); 00061 00062 00063 /* Use functions */ 00064 00065 // Build the filesystem by calling vfs_init and then adding files with vfs_create_file 00066 void vfs_user_build_filesystem(void); 00067 00068 // Called when a file on the filesystem changes 00069 void vfs_user_file_change_handler(const vfs_filename_t filename, vfs_file_change_t change, vfs_file_t file, vfs_file_t new_file_data); 00070 00071 // Called when VFS is disconnecting 00072 void vfs_user_disconnecting(void); 00073 00074 00075 #ifdef __cplusplus 00076 } 00077 #endif 00078 00079 #endif
Generated on Tue Jul 12 2022 15:37:27 by
1.7.2