Coder Social home page Coder Social logo

intergatedcircuits / hid-usage-tables Goto Github PK

View Code? Open in Web Editor NEW
8.0 3.0 3.0 136 KB

Documenting the HID usage tables in a parsable format for code generation

Python 100.00%
hid hid-keyboard hid-report-descriptor hid-usage-tables code-generator

hid-usage-tables's Introduction

HID usage tables database

This repository contains the HID usage tables in a machine-readable format (under pages), and accompanying Python3 scripts (under src) to parse them into a database, and generate code for different programming languages. The recent versions of the HID usage tables document contain a JSON attachment, which can also serve as the input of the code generator.

Supported formats

  • C++ (to be used with hid-rp)

Additional languages can be easily added by taking src/hid/codegen/cpp.py as a template.

hid-usage-tables's People

Contributors

benedekkupper avatar thargy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

hid-usage-tables's Issues

Code generator ID to string conversion

The code generator is currently only prepared to generate the enums from the pages, to add support for ID to string conversion some refactoring will be necessary. No timeline for implementing this yet.

Use embedded HidUsageTables.json when available

Since version 1.3 (Issue Date January 1, 2022), HID Usage Tables for Universal Serial Bus includes embedded HidUsageTables.json file. It is preferred to use the JSON file as opposed to page text scanning.

Handle inline usage switches

The sensors page has many IUS entries at the bottom, which are usage ID masks that modify the original sensor usage (which is normally done by encapsulating the original usage with a collection). We need to consider what are the possible options for representing this combination of usage values, and choose the option that fits best for the end programmer.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.