#include "conf_usb.h"
#include "board.h"
#include "FreeRTOS.h"
#include "task.h"
#include "usb_drv.h"
#include "usb_host_enum.h"
#include "usb_host_task.h"
#include "host_mem.h"
#include "ctrl_access.h"
#include "navigation.h"
#include "fsaccess.h"
#include "host_mass_storage_task.h"
Functions | |
void | host_mass_storage_task (void *pvParameters) |
This function manages the host mass-storage task. More... | |
bool | host_mass_storage_task_copy_tree (const char *pcdir_name, U8 sync_direction, bool bDeleteSrc) |
Synchronize the contents of two directories between the USB drive and the AT45DBX dataflash file systems. More... | |
void | host_mass_storage_task_init (void) |
This function initializes the host mass-storage task. More... | |
bool | host_mass_storage_task_sync_drives (signed short FsNavId, U8 sync_direction, const char *pcdir_name, bool bDeleteSrc) |
Synchronize the contents of two drives (limited to files). More... | |
void | host_sof_action (void) |
host_sof_action More... | |
Variables | |
volatile bool | ms_connected |
volatile bool | ms_new_device_connected |
static char | ms_str [MAX_FILE_PATH_LENGTH] |
static U16 | sof_cnt |
This function manages the host mass-storage task.
pvParameters | Input. Unused. |
References capacity, configTSK_USB_HMS_PERIOD, CTRL_GOOD, g_pipe_ms_in, g_pipe_ms_out, Get_class, Get_ep_pipe, Get_nb_supported_interface, host_get_lun(), host_ms_inquiry(), host_ms_request_sense(), host_read_capacity(), host_selected_lun, host_test_unit_ready(), Is_ep_in, Is_host_ready, LOG_STR, MS_CLASS, ms_connected, ms_new_device_connected, vTaskDelayUntil(), and xTaskGetTickCount().
Referenced by host_mass_storage_task_init().
bool host_mass_storage_task_copy_tree | ( | const char * | pcdir_name, |
U8 | sync_direction, | ||
bool | bDeleteSrc | ||
) |
Synchronize the contents of two directories between the USB drive and the AT45DBX dataflash file systems.
pcdir_name | const char *: directory name null-terminated string |
sync_direction | U8: DEVICE_TO_HOST, HOST_TO_DEVICE or FULL_SYNC |
bDeleteSrc | bool: if true delete the src directory content. |
References COPY_BUSY, COPY_FINISH, FS_ERR_FILE_EXIST, FS_ERR_NO_DIR, FS_FIND_NEXT, fs_g_status, FS_NAME_GET, FS_NAV_ID_COPYFILE_TREE_DEST, FS_NAV_ID_COPYFILE_TREE_SRC, HOST_TO_DEVICE, LUN_ID_AT45DBX_MEM, LUN_ID_MEM_USB, MAX_FILE_PATH_LENGTH, ms_str, nav_dir_cd(), nav_dir_gotoparent(), nav_dir_make(), nav_drive_set(), nav_file_copy(), nav_file_del(), nav_file_isdir(), nav_file_name(), nav_file_paste_start(), nav_file_paste_state(), nav_filelist_findname(), nav_filelist_set(), nav_partition_mount(), and nav_select().
Referenced by host_mass_storage_task_sync_drives().
This function initializes the host mass-storage task.
References configTSK_USB_HMS_NAME, configTSK_USB_HMS_PRIORITY, configTSK_USB_HMS_STACK_SIZE, host_mass_storage_task(), ms_connected, ms_new_device_connected, NULL, sof_cnt, and xTaskCreate.
Referenced by b_usbsys_start().
bool host_mass_storage_task_sync_drives | ( | signed short | FsNavId, |
U8 | sync_direction, | ||
const char * | pcdir_name, | ||
bool | bDeleteSrc | ||
) |
Synchronize the contents of two drives (limited to files).
FsNavId | signed short: the file system navigator id to use. |
sync_direction | U8: DEVICE_TO_HOST, HOST_TO_DEVICE or FULL_SYNC |
pcdir_name | const char *: directory name to consider. |
bDeleteSrc | bool: if true delete the src directory content. |
References DEVICE_TO_HOST, fsaccess_give_mutex(), fsaccess_take_mutex(), host_mass_storage_task_copy_tree(), HOST_TO_DEVICE, and Is_host_ready.
Referenced by prv_e_usbsys_sync_cp_ukey().
|
static |
Referenced by host_mass_storage_task_copy_tree().
|
static |
Referenced by host_mass_storage_task_init(), and host_sof_action().