Skip to content

Making custom firmware, trying to learn how HID works for custom bindings #36

Description

@Elrunner7

I'm trying to build a custom firmware that changes the bindings of the controller so it works like the lizard mode but with custom bindings, I've been looking at the code to understand how the firmware works and get the hang of it, so far I understand the basics of how both the Dev_Board_FW and the Switch_Wired_PowerA_FW works but I can't get around how exactly the USB-HID stack(I guess it's the communication stage where it gives the host how to handle the controller, right??) can be changed so the PC handles the controller as a mixed keyboard/mouse like in lizard mode. I choose to change the Switch FW since its more straightforward that the Dev_board FW.

I'm a little lost on how the "USB FSConfiguration Descriptor", "HID Get Report Request Callback", "HID Set Report Request Callback", "HID Controller interface init routine" and the "usbConfig" work, how the parameters affect the device and its communication with the PC. How this loops and functions should be modified so It gets recognized as a mixed keyboard/mouse?

I did a little research on the topic of HIDs and how others use the LPC library with its USB functions but still I get lost, this is not my field of knowledge but still hope I can manage to make it work out and understand it.

This are some references that I read about.
Open source code base for ARM Cortex M3 LPC1347 or Cortex M0 LPC11U37/LPC11U24 MCUs
AN249: HUMAN INTERFACE DEVICE TUTORIAL
Device Class Definition for Human Interface Devices (HID)
HID Usage Tables FOR Universal Serial Bus (USB)
UM10462-LPC11Uxx User manual

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions