0 Replies Latest reply on Nov 24, 2009 8:56 AM by nick.tyler

    Transmitting Data in response to class requests

    nick.tyler

      Posted here and in Host forum...

      Anybody out there done this with frameworks for the CY7C67300? I am trying to implement a CDC PSTN ACM...

      I have a fwx_class_handler, and call susb_send, but this seems to generate a new transaction rather than inserting a packet into the data stage of the class request.

      code fragment:
      // Interface 0, Control EndPoint (0)
      static USBTXRXINFO VCPClassMsgInfo ATTR_USB_XFER_BUF_SECTION
      = { 0 } ;
      static uint8 VCPClassDataBuffer[CLASS_BUFFER_SIZE] ATTR_USB_XFER_BUF_SECTION
      = { 0 } ;

      void susb2_class_handler ( struct USB_DEVICE_REQUEST *pRequest )
      {
      ...
      case GET_LINE_CODING: // Optional for class, returns UART control line structure
      if (...check pRequest contents){
      memcpy(VCPClassDataBuffer, &LineCoding, sizeof(LINE_CODING_STRUCTURE));
      VCPClassMsgInfo.buffer = VCPClassDataBuffer ;
      VCPClassMsgInfo.length = sizeof(LINE_CODING_STRUCTURE) ;
      VCPClassMsgInfo.done_func = & ClassCommandDone ;

      susb_send ( FALCON_SLAVE_SIE, EP0, & VCPClassMsgInfo ) ;
      }
      else{//failed errorcheck, so stall the endpoint
      susb2_stall ( ) ;
      }
      break;
      ...
      }
      Raised a support request but deadly silence for three days now.

      ?

      Thanks