This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

LPC2148 USB HID Question

Hello all, on my MCB2140 i have installed USb HID example, i try to understand some basic things how it's work.

1) In the current example i set bInterval=0x0A; //10ms, everything else is unchanged. On my sniffer on host side, i read the speed of 127 B/s. So if my bInterval of sending 1 report is 10ms, should i expect the speed to be equal 100*10ms*1B= 100 B/s?

2) Is it poisable to modify this example to support a isochronous transfer or isochronous is only reserved for audio..

Parents Reply Children
  • Mr Tsuneo in file hiduser.c i found this function:

    BOOL HID_GetIdle (void) {
      EP0Buf[0] = HID_IdleTime[SetupPacket.wValue.WB.L];
      return (__TRUE);
    }
    
    

    1) Is this SetupPacket.wValue.WB.L represent the lowest byte of my packet ?
    2) What is the purpose of this function ?
    3) I i want to increse my input report (InReport[64]), should i modify then this function
    for example:

    EP0Buf[1] = HID_IdleTime[SetupPacket.wValue.WB.L];
    ...
    EP0Buf[63] = HID_IdleTime[SetupPacket.wValue.WB.L];
    
    

  • > 1) Is this SetupPacket.wValue.WB.L represent the lowest byte of my packet ?

    Yes.
    For Get_Idle request, host passes target report ID to this parameter.

    2) What is the purpose of this function ?

    Refer to "7.2.3 Get_Idle Request" of the HID spec
    www.usb.org/.../HID1_11.pdf

    Host asks the current value of report interval, set by Set_Idle request or the default.

    3) I i want to increse my input report (InReport[64]), should i modify then this function

    No.
    The reasons are twofold,
    1) The report interval is set by host using Set_Idle request. Device should follow this order.

    2) Windows put Set_Idle( 0 ), indefinite interval, just after enumeration.
    It means, the device can return input report anytime as it likes.
    Therefore, the report interval is determined just by bInterval value of the endpoint descriptor.

    Tsuneo

  • Thanks Tsuneo, things are much clear now.