void show_mount_usb_storage_menu() { // Build a list of Volume objects; some or all may not be valid Volume* volumes[MAX_NUM_USB_VOLUMES] = { volume_for_path("/sdcard"), volume_for_path("/emmc"), volume_for_path("/external_sd") }; // Enable USB storage if (control_usb_storage(volumes, 1)) return; static char* headers[] = { "USB Mass Storage device", "Leaving this menu unmounts", "your SD card from your PC.", "", NULL }; static char* list[] = { "Unmount", NULL }; for (;;) { int chosen_item = get_menu_selection(headers, list, 0, 0); if (chosen_item == GO_BACK || chosen_item == 0) break; } // Disable USB storage control_usb_storage(volumes, 0); }
void show_mount_usb_storage_menu() { // Build a list of Volume objects; some or all may not be valid Volume* volumes[MAX_NUM_USB_VOLUMES] = { volume_for_path("/sdcard"), volume_for_path("/emmc"), volume_for_path("/external_sd") }; // Enable USB storage if (control_usb_storage(volumes, 1)) return; static char* headers[] = { "U盘模式", "返回上级菜单", "U盘将会自动从电脑弹出.", "", NULL }; static char* list[] = { "卸载", NULL }; for (;;) { int chosen_item = get_menu_selection(headers, list, 0, 0); if (chosen_item == GO_BACK || chosen_item == 0) break; } // Disable USB storage control_usb_storage(volumes, 0); }