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

USB HID Mouse Driver using LPC2148

Hi all,

Thanks for your contineous support from this site.

I want to detect my board as HID mouse when plugged to USB port of PC. For that I guess I need to write HID mouse driver.

I am using LPC2148 controller. Can i gett some reference code for it?

Thanks & Regards,
Kamal

Parents
  • Are you working on Keil HID example?

    Then, you don't need to swap entire descriptors.
    Replace just the report descriptor.

    I see some errors on the config descriptor set in above post, for example, wTotalLength field. But it's pain to examine the figures without any comment for the fields.
    I recomend you to recover the original descriptors from the example.

    For other change,

    demo.c
    
    BYTE InReport[3];      /* HID Input Report - 3 bytes for mouse */
    
    /*
     *  Get HID Input Report -> InReport
     */
    
    void GetInReport (void) {
      //
      //  Fill InReport[]
      //
      //   InReport[0]    mouse buttons, bit 0: left, bit 1: right, bit2: middle
      //   InReport[1]    X axis relative movement
      //   InReport[2]    Y axis relative movement
      //
    }
    

    Tsuneo

Reply
  • Are you working on Keil HID example?

    Then, you don't need to swap entire descriptors.
    Replace just the report descriptor.

    I see some errors on the config descriptor set in above post, for example, wTotalLength field. But it's pain to examine the figures without any comment for the fields.
    I recomend you to recover the original descriptors from the example.

    For other change,

    demo.c
    
    BYTE InReport[3];      /* HID Input Report - 3 bytes for mouse */
    
    /*
     *  Get HID Input Report -> InReport
     */
    
    void GetInReport (void) {
      //
      //  Fill InReport[]
      //
      //   InReport[0]    mouse buttons, bit 0: left, bit 1: right, bit2: middle
      //   InReport[1]    X axis relative movement
      //   InReport[2]    Y axis relative movement
      //
    }
    

    Tsuneo

Children