Compare commits
3 Commits
master
...
subvendor_
Author | SHA1 | Date | |
---|---|---|---|
|
522876dc5a | ||
|
f2991c639d | ||
|
c31070dd3f |
17
docs/subvendor_ids.md
Normal file
17
docs/subvendor_ids.md
Normal file
@ -0,0 +1,17 @@
|
||||
# Vendor, Product, Project IDs in QMK
|
||||
|
||||
#define VENDOR_ID 0x03A8
|
||||
^
|
||||
+ QMK's self-assigned Vendor ID
|
||||
|
||||
#define PRODUCT_ID 0x0000
|
||||
^
|
||||
+ 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 (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.
|
||||
|
||||
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).
|
@ -21,11 +21,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x6060
|
||||
#define VENDOR_ID 0x03A8
|
||||
#define PRODUCT_ID 0x5A61
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER Ortholinear Keyboards
|
||||
#define PRODUCT The Atomic Keyboard
|
||||
#define MANUFACTURER OLKB
|
||||
#define PRODUCT Atomic
|
||||
#define DESCRIPTION A compact ortholinear keyboard
|
||||
|
||||
/* key matrix size */
|
||||
|
@ -21,10 +21,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x6060
|
||||
#define VENDOR_ID 0x03A8
|
||||
#define PRODUCT_ID 0x5A60
|
||||
#define MANUFACTURER OLKB
|
||||
#define PRODUCT The Planck Keyboard
|
||||
#define PRODUCT Planck
|
||||
#define DESCRIPTION A compact ortholinear keyboard
|
||||
|
||||
/* key matrix size */
|
||||
|
@ -2,7 +2,7 @@
|
||||
"keyboard_name": "Planck",
|
||||
"keyboard_folder": "planck",
|
||||
"manufacturer": "OLKB",
|
||||
"identifier": "FEED:6060:0001",
|
||||
"identifier": "03A8:5A60:0001",
|
||||
"url": "https://olkb.com/planck",
|
||||
"maintainer": "jackhumbert",
|
||||
"processor": "atmega32u4",
|
||||
|
@ -21,11 +21,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x6061
|
||||
#define VENDOR_ID 0x03A8
|
||||
#define PRODUCT_ID 0x5A62
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER OLKB
|
||||
#define PRODUCT The Preonic Keyboard
|
||||
#define PRODUCT Preonic
|
||||
#define DESCRIPTION A compact ortholinear keyboard
|
||||
|
||||
/* key matrix size */
|
||||
|
@ -2,7 +2,7 @@
|
||||
"keyboard_name": "Preonic",
|
||||
"keyboard_folder": "preonic",
|
||||
"manufacturer": "OLKB",
|
||||
"identifier": "FEED:6061:0001",
|
||||
"identifier": "03A8:5A60:0001",
|
||||
"url": "https://olkb.com/preonic",
|
||||
"maintainer": "jackhumbert",
|
||||
"processor": "atmega32u4",
|
||||
|
1
subvendor_ids.txt
Normal file
1
subvendor_ids.txt
Normal file
@ -0,0 +1 @@
|
||||
0x5A6: OLKB
|
35
util/new_subvendor_id.sh
Normal file
35
util/new_subvendor_id.sh
Normal file
@ -0,0 +1,35 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ $0 != *"util"* ]]; then
|
||||
echo "Please run from the root qmk_firmware folder"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
echo "Need a subvendor"
|
||||
echo "usage: $0 <subvendor>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
function generate_random() {
|
||||
subvendor_id=`printf '0x%X%X%X' $(( ( RANDOM % 16 ) )) $(( ( RANDOM % 16 ) )) $(( ( RANDOM % 8 ) * 2 ))`
|
||||
}
|
||||
|
||||
function find_existing() {
|
||||
existing=`grep "${subvendor_id}" subvendor_ids.txt`
|
||||
}
|
||||
|
||||
while : ; do
|
||||
generate_random
|
||||
find_existing
|
||||
(( -z "$existing" )) || break
|
||||
done
|
||||
|
||||
echo ${subvendor_id}: ${1} >> subvendor_ids.txt
|
||||
echo " * ${subvendor_id}: ${1}" >> docs/subvendor_ids.md
|
||||
echo "The Subvendor ID ${subvendor_id} is now associated with \"${1}\", and has been added to the list"
|
||||
echo "Add your Project ID (0x0-0xF) to the end and use it in your config.h:"
|
||||
echo
|
||||
echo " #define VENDOR_ID 0x03A8"
|
||||
echo " #define PRODUCT_ID ${subvendor_id}0"
|
||||
echo
|
Reference in New Issue
Block a user