Skip to content

CDC doesn't implement the periodic status reporting #1

@mithro

Description

@mithro

The CDC protocol requires that you continually report the status of the CDC device using an interrupt endpoint. The current firmware doesn't do this.

This is what the TD_poll code is doing in the HDMI2USB Cypress firmware at https://github.com/timvideos/HDMI2USB/blob/master/cypress/app.c#L549

void TD_Poll(void)             // Called repeatedly while the device is idle
{


if (!(EP1INCS & 0x02))      // check if EP1IN is available
  {
    EP1INBUF[0] = 0x0A;       // if it is available, then fill the first 10 bytes of the buffer with 
    EP1INBUF[1] = 0x20;       // appropriate data. 
    EP1INBUF[2] = 0x00;
    EP1INBUF[3] = 0x00;
    EP1INBUF[4] = 0x00;
    EP1INBUF[5] = 0x00;
    EP1INBUF[6] = 0x00;
    EP1INBUF[7] = 0x02;
    EP1INBUF[8] = 0x00;
    EP1INBUF[9] = 0x00;
    EP1INBC = 10;            // manually commit once the buffer is filled
  }


}

See also the cdc.h file at https://github.com/mithro/fx2lib/blob/master/examples/cdc/common/cdc.h#L119-L143

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions