Macros | |
#define | DEVICE_TO_HOST 0x01 |
#define | DIR_LOCAL_IN_NAME "IN" |
#define | DIR_LOCAL_OUT_NAME "OUT" |
#define | DIR_USB_IN_NAME "IN" |
#define | DIR_USB_OUT_NAME "OUT" |
#define | FULL_SYNC (DEVICE_TO_HOST | HOST_TO_DEVICE) |
#define | HOST_TO_DEVICE 0x02 |
#define | Is_host_ms_configured() (ms_connected && !Is_host_suspended()) |
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_dir (Fs_index *dst_fs_idx, const char *dst_dir, Fs_index *src_fs_idx, const char *src_dir, bool bDeleteSrc) |
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 |
#define DEVICE_TO_HOST 0x01 |
Referenced by e_usbsys_cp_cfg_to_local(), e_usbsys_cp_web_to_local(), and host_mass_storage_task_sync_drives().
#define DIR_LOCAL_IN_NAME "IN" |
#define DIR_LOCAL_OUT_NAME "OUT" |
#define DIR_USB_IN_NAME "IN" |
#define DIR_USB_OUT_NAME "OUT" |
#define FULL_SYNC (DEVICE_TO_HOST | HOST_TO_DEVICE) |
#define HOST_TO_DEVICE 0x02 |
#define Is_host_ms_configured | ( | ) | (ms_connected && !Is_host_suspended()) |
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_dir | ( | Fs_index * | dst_fs_idx, |
const char * | dst_dir, | ||
Fs_index * | src_fs_idx, | ||
const char * | src_dir, | ||
bool | bDeleteSrc | ||
) |
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().