Home |
Function USBAX772Init Function USBAX772AcceptMulticastList |
Function USBAX772InitUSBAX772Init must be called by the network driver at program startup for each interface to be supported: int USBAX772Init(int DeviceIndex, void * DriverID); ParametersDeviceIndexZero-based index of the AX772/AX178 interface. The default configuration of the driver accepts values in the range 0 to 1. The first AX772/AX178 device to be attached can be addressed with index 0, the second with 1. DriverIDThe value the AX772 driver should pass to system driver functions RTUSYSNewEthernetDevice and RTUSYSPostEthernetFrame. This parameter has no meaning to the AX772 driver itself. It can be used by the network stack driver to identify an interface. If this parameter is NULL, the AX772 driver will no longer call RTUSYSNewEthernetDevice or RTUSYSPostEthernetFrame for this device index. return valueRTU_SUCCESS or a negative error code on failure. Code RTU_DISCONNECTED means that no AX772/AX178 device is currently connected on the given index, but the interface can be used if one is attached at a later time. No packets are sent or received as long as this function has not been called with a non-NULL DeviceID. If an AX772/AX178 device is available at the time USBAX772Init is called, USBAX772Init calls system driver function RTUSYSNewEthernetDevice. Otherwise RTUSYSNewEthernetDevice may be called at a later time when a device is attached. At program shutdown, it is recommended to call this function with parameter DriverID set to NULL.
|