USBFS_Init

Initializes the USB sub-system and returns the USB handle.

This is the first function required in any sequence of USB-related calls. It returns context, USB handler, properties and capacity structures, and the "Kernel Driver attached" flag (which indicates whether the kernel driver should be attached at the end of the execution).

Synopsis

int USBFS_Init(
    void *ctxv, 
    void **handlev, 
    dev_properties_t *dp, 
    capacity_t *cap, 
    int *kernelDriverAttachedFlag
);

Input Parameters

Parameter Description
cap Capacity
ctxv Current context
dp Structure
handlev Device handle
kernelDriverAttachedFlag If the kernel driver was attached before running the operation, this value will be TRUE.

Input Requirements

Refer to the FM sample usbdemo for the call sequence requirements.

Return Value

The function returns CKR_USB_OK if successful, or one of the error codes in USB API Vendor-Defined Error Codes.