You are currently viewing the documentation for:
The ECUSB_Stream_Init function configures and initialises the stream function level driver.
ECUSB_ErrorCode ECUSB_Stream_Init(
   struct ECUSB_Stream_Function *pStreamFunction,
   struct ECUSB_Stream_Configuration *pConfiguration
A pointer to the struct ECUSB_Stream_Function previously initialized by ECUSB_Stream_Init().
A pointer to a struct ECUSB_Stream_Configuration. This struct needs to be created by the user, cleared and the necessary values needs to be filled in. See description of struct ECUSB_Stream_Configuration for a reference of the fields in this struct.
Return value
Returns one of the ECUSB error codes (ECUSB_SUCCESS on success)
Example Code
   // Initialize the USB Stream function driver
   struct ECUSB_Stream_Configuration streamConfiguration;
   memset(&streamConfiguration, 0, sizeof(streamConfiguration));
   streamConfiguration.m_pDevice = &myUsbDevice.m_device;
   printf("Calling ECUSB_Stream_Init()...");
   err = ECUSB_Stream_Init(&myUsbDevice.m_streamFunction, &streamConfiguration);
   if(err != ECUSB_SUCCESS) 
      halt("ECUSB_Stream_Init failed", err);