Jump to main content

##

# 1.2.7.4.62 SYS_FS_MEDIA_MANAGER_Register Function

## C

    SYS_FS_MEDIA_HANDLE SYS_FS_MEDIA_MANAGER_Register
    (
        SYS_MODULE_OBJ obj,
        SYS_MODULE_INDEX index,
        const SYS_FS_MEDIA_FUNCTIONS *mediaFunctions,
        SYS_FS_MEDIA_TYPE mediaType
    )

## Summary

Function to register media drivers with the media manager.

## Description

This function is called by the media driver to register the functionalities with the media manager.

For static media, such as NVM or a SD card, the media drivers register with this function at the time of initialization.

For dynamic media, such as MSD, this register function is called dynamically, once the MSD media is connected.

## Precondition

None.

## Parameters

Param | Description
--- | ---
obj | driver object (of type SYS_MODULE_OBJ, value returned when driver is initialized)
index | driver index (of type SYS_MODULE_INDEX, value passed during driver initialization and opening)
mediaFunctions | List of media driver functions
mediaType | Type of media

## Returns

Valid handle of type SYS_FS_MEDIA_HANDLE on successful registration of the media driver.

Invalid handle of type SYS_FS_MEDIA_HANDLE_INVALID on unsuccessful registration of the media driver.

## Remarks

None