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.
Library Interface
Name | Description |
---|---|
Macros | |
_DRV_MIIM_CONFIG_H | This is macro _DRV_MIIM_CONFIG_H. |
_DRV_MIIM_H | This is macro _DRV_MIIM_H. |
DRV_MIIM_CLIENT_OP_PROTECTION | Enables/Disables Client Operation Protection feature. |
DRV_MIIM_COMMANDS | Enables/Disables MIIM commands feature. |
DRV_MIIM_INDEX_0 | MIIM driver index definitions. |
DRV_MIIM_INDEX_COUNT | Number of valid MIIM driver indices. |
DRV_MIIM_INSTANCE_CLIENTS | Selects the maximum number of clients. |
DRV_MIIM_INSTANCE_OPERATIONS | Selects the maximum number of simultaneous operations for an instance. |
DRV_MIIM_INSTANCES_NUMBER | Selects the maximum number of hardware instances that can be supported by the dynamic driver. |
Functions | |
DRV_MIIM_ClientStatus | Gets the current client-specific status the MIIM driver. |
DRV_MIIM_Close | Closes an opened instance of the MIIM driver. |
DRV_MIIM_Deinitialize | Deinitializes the specified instance of the MIIM driver module. |
DRV_MIIM_DeregisterCallback | Deregisters an notification callback function for the client operations. |
DRV_MIIM_Initialize | Initializes the MIIM driver. |
DRV_MIIM_Open | Opens the specified MIIM driver instance and returns a handle to it. |
DRV_MIIM_OperationAbort | Aborts a current client operation initiated by the MIIM driver. |
DRV_MIIM_OperationResult | Gets the result of a client operation initiated by the MIIM driver. |
DRV_MIIM_Read | Initiates a SMI/MIIM read transaction. |
DRV_MIIM_RegisterCallback | Registers an notification callback function for the client operations. |
DRV_MIIM_Reinitialize | Reinitializes the driver and refreshes any associated hardware settings. |
DRV_MIIM_Scan | Initiates a SMI/MIIM scan (periodic read)transaction. |
DRV_MIIM_Setup | Sets up a MIIM client. |
DRV_MIIM_Status | Provides the current status of the MIIM driver module. |
DRV_MIIM_Tasks | Maintains the driver's state machine. |
DRV_MIIM_Write | Initiates a SMI/MIIM write transaction. |
Enumerations | |
DRV_MIIM_CLIENT_STATUS | Defines the possible results of operations that can succeed or fail |
DRV_MIIM_OPERATION_FLAGS | List of flags that apply to a client operation. |
DRV_MIIM_SETUP_FLAGS | List of flags that apply to a client setup operation. |
Structures | |
DRV_MIIM_INIT | Contains all the data necessary to initialize the MIIM device. |
DRV_MIIM_OBJECT_BASE | Declaration of a MIIM base object. |
DRV_MIIM_SETUP | Contains all the data necessary to set up the MIIM device. |
Types | |
DRV_MIIM_CALLBACK_HANDLE | Handle that identifies a client registration operation. |
DRV_MIIM_OPERATION_CALLBACK | Notification function that will be called when a MIIM operation is completed and the driver client needs to be notified. |
DRV_MIIM_OPERATION_HANDLE | MIIM operation handle. |
Variables | |
DRV_MIIM_OBJECT_BASE_Default | The 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. |