Skip to content

Improve cm108 utility's flexibility for testing PTT, etc #345

@dranch

Description

@dranch

Would it be difficult to add a feature to the cm108 tool to try setting the GPIO pin to test PTT?

Maybe add some options like:
-v : version of this tool
-d : the specific device to control
-g : the GPIO pin to control (default to GPIO3)
-a : action: 1 for high; 0 for low

I'm thinking it would be cool if it could maybe have two modes to help users confirm they have the right HID device for PTT control:

  • Specific device using the -d option : using the spacebar, toggle the state of the GPIO pin. Use control-c to return GPIO pin back to it's original state and then exit

  • Interactive Probe (if -d isn't specified):

    • Cycle through each GPIO pin on each found highdraw device that offers GPIO control
      Using the spacebar, each of the GPIO pin's state will be toggled until the spacebar is pressed again. At that point, the GPIO pin will be put back to it's previous state and it will toggle the state of the next GPIO pin. Once all available GPIO pins are touched, move on to the next valid hidraw interface. Use control-c to return GPIO pin back to it's original state and then exit

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