USBFS_New

Creates a new, empty file system.

This function allocates space for the file system header, which contains only label length and label fields.

Synopsis

int USBFS_New(
    void *handle, 
    char * label, 
    dev_properties_t *dp, 
    capacity_t *cap, 
    uint8_t **header
);

Input Parameters

Parameter Description
cap Capacity
dp Structure
handle Device handle
header Pointer to file system block 0
label File system label

Input Requirements

The USBFS library has been initialized with USBFS_Init(), and there is no current existing file system.

Return Value

The function returns CKR_USB_OK if successful, or one of the error codes in USB API Vendor-Defined Error Codes. If a file system already exists, CKR_USB_INITIALIZED is returned. Use USB_Destroy() first to erase the current file system.