Home |
Function USBCDCECMInit Function USBCDCECMAcceptMulticastList |
Function USBCDCECMInitUSBCDCECMInit must be called by the network driver at program startup for each interface to be supported: int USBCDCECMInit(int DeviceIndex, void * DriverID); ParametersDeviceIndexZero-based index of the CDC ECM interface. The default configuration of the driver accepts values in the range 0 to 1. The first CDCECM device to be attached can be addressed with index 0, the second with 1. DriverIDThe value the CDC ECM driver should pass to system driver functions RTUSYSNewEthernetDevice and RTUSYSPostEthernetFrame. This parameter has no meaning to the CDC ECM driver itself. It can be used by the network stack driver to identify an interface. If this parameter is NULL, the CDC ECM 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 CDC ECM 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 CDC ECM device is available at the time USBCDCECMInit is called, USBCDCECMInit 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.
|