This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs. |
Register with the MII management library
int MDI_Register_Extended ( void * handle, MDIWriteFunc write, MDIReadFunc read, MDICallBack callback, mdi_t **mdi, struct sigevent *event, int priority, int callback_interval)
typedef void (*MDIWriteFunc)(void *handle, uint8_t phy_id, uint8_t location, uint16_t val);where
handle is the handle that was passed to MDI_Register_Extended(),
phy_id is the address of the PHY on the MII management bus,
location is the index of the PHY register to write to, and
val is the value to write to the register.
typedef uint16_t (*MDIReadFunc)(void *handle, uint8_t phy_id, uint8_t location);where
handle is the handle that was passed to MDI_Register_Extended(),
phy_id is the address of the PHY on the MII management bus, and
location is the index of the PHY register to read from.
typedef void (*MDICallback) (void *handle, uint8_t phy_id, uint8_t state)where
handle is the handle that was passed to MDI_Register_extended(),
phy_id is the address of the PHY on the MII management bus,
state is the link state.
The state can be one of:
Some device drivers may be able to receive an interrupt upon a link state change event. It's more efficient to use this interrupt, if possible, instead of using link monitor pulses. |
This function registers with the MII management library, and must be called before calling any other MII management library function.
MDI_SUCCESS if registration succeeds. If any other value is returned, the pointer to the mdi_t that was returned is invalid, and can't be used used to call other MII management library functions.
QNX Neutrino
Safety: | |
---|---|
Cancellation point | Yes |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |