Giter VIP home page Giter VIP logo

hid_descriptor_tool's Introduction

HID-PID Descriptor tool

an extendable hid descriptor tool, implements a free conversion between hexdemical codes, data structure definition and the report descriptor written in higher level language.

Files

  • \rptDsc:
    To get syntax highlighting, in Windows copy this to "C:\Users\Administrator\AppData\Roaming\Sublime Text 3\Packages\User", then choose language "rptDsc" when editing with Sublime Text 3.
  • HID_PID_Definitions.py:
    Human Interface Device & Physical Interface Device usage definitions.
  • DscToHex.py:
    parses the .rptDsc(report descriptor) into hexdemical codes.
  • DscToDataStructuren.py:
    parses the .rptDsc into c language data structure definitions.
  • HexToString.py:
    parses the hexdemical codes to the report descriptor written in natural language.

How to Use

  • Before writing report descriptor in DscInput.rptDsc, you are recommended to copy \rptDsc to the path refered above so that syntax highlight can work. To parse the descriptor into bytes run DescriptorGenTool, to parse into c language data structure run DataStructureGen.py.

Parser Limitations

For the purpose of freeing developers from the tedious and error prone works of writing the Report Descriptor or the data structure attached to it, i made this parser. However, the USB HID Report Descriptor itself was rather a flexible protocol. There is no perfect approach to an easy solution of all the problems we meet in developing.

bugs been found:

  • c doesn't support usage like "enum XXX : _type {...}" to designate specific type to the enum.

Screenshots

editing report descriptor in sublime text:

reportDescriptor.png

get parsed bytes from report descriptor:

outputBytes.png

get c data structure definitions from report descriptor:

dataStructure.png

hid_descriptor_tool's People

Contributors

beantowel avatar

Watchers

 avatar

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.