Skip to content

How to code a logical collection with both input and output items? #23

Open

Description

@FelixGruetzmacher

I am rewriting the descriptor for a Braille display with Waratah. As part of my pre-existing descriptor, I have the following:
0x05, 0x41, // Usage Page (Braille Display Page)
0x09, 0x02, // Usage (Braille Row)
0xA1, 0x02, // Collection (Logical)
0x09, 0x05, // Usage (Number of Braille Cells)
0x15, 0x00, // Logical Minimum (0)
0x26, 0xFF, 0x00, // Logical Maximum (255)
0x75, 0x08, // Report Size (8)
0x95, 0x01, // Report Count (1)
0x81, 0x02, // Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
0x09, 0x03, // Usage (8 Dot Braille Cell)
0x15, 0x00, // Logical Minimum (0)
0x26, 0xFF, 0x00, // Logical Maximum (255)
0x75, 0x08, // Report Size (8)
0x95, 0x28, // Report Count (40)
0x91, 0x02, // Output (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position,Non-volatile)
0x09, 0xFA, // Usage (Router Set 1)
0xA1, 0x02, // Collection (Logical)
0x0A, 0x00, 0x01, // Usage (Router Button)
0x15, 0x00, // Logical Minimum (0)
0x25, 0x01, // Logical Maximum (1)
0x75, 0x01, // Report Size (1)
0x95, 0x28, // Report Count (40)
0x81, 0x02, // Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
0xC0, // End Collection
In short, I have a logical collection (a Braille row) grouping output items (Braille cells) with input items (routing buttons).
The standard demands that I group the Braille cells and the routing buttons under the same Braille row logical collection.
How do I write this in Waratah?

Activity

  1. matwilli commented on May 19, 2025

    @matwilli
    Contributor

    There's no facility in Waratah do to this :(. There was a workaround done for Sensors with a similar back-compat requirement, but this won't work for your scenario.

    Choosing to have report 'types' as the top-level construct (and so can't be split amongst CL/CPs) was a deliberate decision to make writing Waratah HID descriptors easier (with the understood cost of significant flexibility).

    What platform is this Braille device targeting? If it's targeting Windows there might be another way to compose this descriptor to be compliant.

  2. FelixGruetzmacher commented on May 26, 2025

    @FelixGruetzmacher
    Author
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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions