1.2.5.7 MIIM Driver Library

The MIIM Driver is implemented as a driver object that provides APIs for:

  • Asynchronous read/write and scan operations for accessing the external PHY registers

  • Notification when MIIM operations have completed

  • Driver status information

  • Possibility to query or abort an ongoing operation

Abstraction Model

The MIIM driver clients access PHY registers using the MIIM Driver API. The driver abstracts out the hardware details of the MIIM interface and provides a PHY register access mechanism to the application. The MIIM Driver provides read, write, and scan access to the PHY registers, together with driver and operation status APIs. The driver schedules operations requested by multiple clients and performs them sequentially, informing the clients about the operations outcome.

The user can poll for a certain operation status or can register callbacks to be notified of the completion of a scheduled operation.

A scheduled operation can be aborted, if not yet started.

MIIM_abstraction

Library Interface

NameDescription
Macros
_DRV_MIIM_CONFIG_HThis is macro _DRV_MIIM_CONFIG_H.
_DRV_MIIM_HThis is macro _DRV_MIIM_H.
DRV_MIIM_CLIENT_OP_PROTECTIONEnables/Disables Client Operation Protection feature.
DRV_MIIM_COMMANDSEnables/Disables MIIM commands feature.
DRV_MIIM_INDEX_0MIIM driver index definitions.
DRV_MIIM_INDEX_COUNTNumber of valid MIIM driver indices.
DRV_MIIM_INSTANCE_CLIENTSSelects the maximum number of clients.
DRV_MIIM_INSTANCE_OPERATIONSSelects the maximum number of simultaneous operations for an instance.
DRV_MIIM_INSTANCES_NUMBERSelects the maximum number of hardware instances that can be supported by the dynamic driver.
Functions
DRV_MIIM_ClientStatusGets the current client-specific status the MIIM driver.
DRV_MIIM_CloseCloses an opened instance of the MIIM driver.
DRV_MIIM_DeinitializeDeinitializes the specified instance of the MIIM driver module.
DRV_MIIM_DeregisterCallbackDeregisters an notification callback function for the client operations.
DRV_MIIM_InitializeInitializes the MIIM driver.
DRV_MIIM_OpenOpens the specified MIIM driver instance and returns a handle to it.
DRV_MIIM_OperationAbortAborts a current client operation initiated by the MIIM driver.
DRV_MIIM_OperationResultGets the result of a client operation initiated by the MIIM driver.
DRV_MIIM_ReadInitiates a SMI/MIIM read transaction.
DRV_MIIM_RegisterCallbackRegisters an notification callback function for the client operations.
DRV_MIIM_ReinitializeReinitializes the driver and refreshes any associated hardware settings.
DRV_MIIM_ScanInitiates a SMI/MIIM scan (periodic read)transaction.
DRV_MIIM_SetupSets up a MIIM client.
DRV_MIIM_StatusProvides the current status of the MIIM driver module.
DRV_MIIM_TasksMaintains the driver's state machine.
DRV_MIIM_WriteInitiates a SMI/MIIM write transaction.
Enumerations
DRV_MIIM_CLIENT_STATUSDefines the possible results of operations that can succeed or fail
DRV_MIIM_OPERATION_FLAGSList of flags that apply to a client operation.
DRV_MIIM_SETUP_FLAGSList of flags that apply to a client setup operation.
Structures
DRV_MIIM_INITContains all the data necessary to initialize the MIIM device.
DRV_MIIM_OBJECT_BASEDeclaration of a MIIM base object.
DRV_MIIM_SETUPContains all the data necessary to set up the MIIM device.
Types
DRV_MIIM_CALLBACK_HANDLEHandle that identifies a client registration operation.
DRV_MIIM_OPERATION_CALLBACKNotification function that will be called when a MIIM operation is completed and the driver client needs to be notified.
DRV_MIIM_OPERATION_HANDLEMIIM operation handle.
Variables
DRV_MIIM_OBJECT_BASE_DefaultThe supported basic MIIM driver (DRV_MIIM_OBJECT_BASE). This object is implemented by default as using the standard MIIM interface. It can be overwritten dynamically when needed.