Browse Source

Update subvendor_ids.md

subvendor_ids
Jack Humbert 4 years ago
committed by GitHub
parent
commit
522876dc5a
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 20 deletions
  1. +5
    -20
      docs/subvendor_ids.md

+ 5
- 20
docs/subvendor_ids.md View File

@ -1,32 +1,17 @@
# Vendor, Subvendor, Product, Project IDs in QMK
# Vendor, Product, Project IDs in QMK
#define VENDOR_ID 0x03A8
^
+ QMK's self-assigned Vendor ID
#define PRODUCT_ID 0x0000
^ ^
| + Project ID
+ Subvendor ID
^
+ Project IDs
There are many projects using QMK that aren't large enough where it would make sense to obtain a Vendor ID of their own, and [the USB-IF isn't interested in others transferring a VID to communities like ours](http://www.arachnidlabs.com/blog/2013/10/18/usb-if-no-vid-for-open-source/), so QMK uses the unassigned Vendor ID `0x03A8` for all Vendors/Makers/Companies (Subvendors for clarification) that aren't interested in obtaining their own, and maintains a master list (`subvendor_ids.txt`) in the repo to ensure unique values for each project.
There are many projects using QMK that aren't large enough where it would make sense to obtain a Vendor ID of their own, and [the USB-IF isn't interested in others transferring a VID to communities like ours](http://www.arachnidlabs.com/blog/2013/10/18/usb-if-no-vid-for-open-source/), so QMK uses the unassigned Vendor ID `0x03A8` for all Vendors/Makers/Companies (Projects for clarification) that aren't interested in obtaining their own, and maintains a master list (`project_ids.txt`) in the repo to ensure unique values for each project.
Subvendor IDs in QMK are a bitmask of the `PRODUCT_ID`: `0xFFE0` - this leaves 5 bits for the Project ID (0x001F bitmask), of which each Subvendor can have 32. If the Project ID is larger than 15, add 1 to the Subvendor ID (`0xFA4 -> 0xFA5`) - all Subvendor IDs are even (in hex) to allow this. All Subvendor IDs are randomly generated.
For projects that are heavily DIY in nature, hand-wired, or historical, a Subvendor ID may be established for each.
Project IDs are created from the first 4 digits of a SHA-256 hash of the main project location in QMK (e.g. `olkb/planck`), without the revision folder. If that ID exists in the list, the range is shifted down one digit (e.g. it would now selected digits 2 through 5).
## Using other values
It's not recommended using custom Vendor IDs, but some projects may have obtained their own, and are welcome to use them in QMK, but only with permission of the project's creator (the owner of the Vendor ID).
## Creating a new Subvendor ID
To generate a new valid, random ID, run this bash script from the root qmk_firmware folder by substituting `<subvendor>` with your company/vendor name (leave the quotes):
util/new_subvendor_id.sh "<subvendor>"
This script will output your ID, and automatically append it to the list below as well as the master list (`subvendor_ids.txt`).
# Currently used Subvendor IDs:
* 0x5A6: OLKB

Loading…
Cancel
Save