You are currently viewing the documentation for:
The ECUSB_Device_Attach attaches the USB device, i.e. it activates the USB Device Port which allows the host to communicate with it.
ECUSB_ErrorCode ECUSB_Device_Attach(
   struct ECUSB_Device *pDevice
A pointer to a struct ECUSB_Device previously initialized by ECUSB_Device_Init.
Return value
Returns one of the ECUSB error codes (ECUSB_SUCCESS on success)
If you have a self-powered device and a configurable pull-up, call ECUSB_Device_Attach when you want the host to detect the USB device and start initialisation. If you do not have a configurable pull-up you must call ECUSB_Device_Attach as soon as possible after init and power-up. If you wait too long, the host will give up trying to contact the device.