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
  • Dear Tsuneo,

    I have an example code (made from this link:sourceforge.net/.../) which makes LPC2148 to be a USB joystick device, it's working good. Now I want to make LPC2148 to become a USB keyboard device, running on Keil MCB2140 board, I changed the report desciptor following HID 1.1 pdf, but the host PC still detects it as a HID-compliant game controller??

    Here is my report descriptor:
    static UNS_8 abReportDesc[] = { HID_UsagePage(HID_USAGE_PAGE_GENERIC), HID_Usage(HID_USAGE_GENERIC_KEYBOARD), HID_Collection(HID_Application), HID_UsagePage(HID_USAGE_PAGE_KEYBOARD), HID_UsageMin(224), HID_UsageMax(231), HID_LogicalMin(0), HID_LogicalMax(1), HID_ReportSize(1), HID_ReportCount(8), HID_Input(HID_Data | HID_Variable | HID_Absolute), HID_ReportCount(1), HID_ReportSize(8), HID_Input(HID_Constant), HID_ReportCount(8), HID_ReportSize(1), HID_UsagePage(HID_USAGE_PAGE_LED), HID_UsageMin(1), HID_UsageMax(8), HID_Output(HID_Data | HID_Variable | HID_Absolute), HID_UsagePage(HID_USAGE_PAGE_KEYBOARD), HID_UsageMin(0), HID_UsageMax(101), HID_LogicalMin(0), HID_LogicalMax(101), HID_ReportSize(8), HID_ReportCount(6), HID_Input(HID_Data | HID_Array), HID_EndCollection,
    };

    Please take a look and give me some advices!
    Thanks for your time!
    Tuong Nguyen

Reply
  • Dear Tsuneo,

    I have an example code (made from this link:sourceforge.net/.../) which makes LPC2148 to be a USB joystick device, it's working good. Now I want to make LPC2148 to become a USB keyboard device, running on Keil MCB2140 board, I changed the report desciptor following HID 1.1 pdf, but the host PC still detects it as a HID-compliant game controller??

    Here is my report descriptor:
    static UNS_8 abReportDesc[] = { HID_UsagePage(HID_USAGE_PAGE_GENERIC), HID_Usage(HID_USAGE_GENERIC_KEYBOARD), HID_Collection(HID_Application), HID_UsagePage(HID_USAGE_PAGE_KEYBOARD), HID_UsageMin(224), HID_UsageMax(231), HID_LogicalMin(0), HID_LogicalMax(1), HID_ReportSize(1), HID_ReportCount(8), HID_Input(HID_Data | HID_Variable | HID_Absolute), HID_ReportCount(1), HID_ReportSize(8), HID_Input(HID_Constant), HID_ReportCount(8), HID_ReportSize(1), HID_UsagePage(HID_USAGE_PAGE_LED), HID_UsageMin(1), HID_UsageMax(8), HID_Output(HID_Data | HID_Variable | HID_Absolute), HID_UsagePage(HID_USAGE_PAGE_KEYBOARD), HID_UsageMin(0), HID_UsageMax(101), HID_LogicalMin(0), HID_LogicalMax(101), HID_ReportSize(8), HID_ReportCount(6), HID_Input(HID_Data | HID_Array), HID_EndCollection,
    };

    Please take a look and give me some advices!
    Thanks for your time!
    Tuong Nguyen

Children