Skip to content
This repository has been archived by the owner on Dec 18, 2024. It is now read-only.

Commit

Permalink
Merge pull request #349 from UltimateHackingKeyboard/different-usb-vs…
Browse files Browse the repository at this point in the history
…-ble-pid

Make BLE PIDs larger by 0x8000 than USB PIDs.
  • Loading branch information
ert78gb authored Nov 3, 2024
2 parents 43fba79 + 9effd00 commit 6dcaafa
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
6 changes: 6 additions & 0 deletions device/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,9 @@ config KEYBOARD_MAX_SCANCODE
The default is set so Android devices (which don't exchange the MTU from the default 23)
still receive the "NKRO" report layout. If a higher scancode is used, the report size will exceed this size,
causing a fallback to 6KRO report layout on Android.

config USB_PID
hex "USB product ID"
range 0x0000 0xFFFF
help
The USB product ID is used to identify the specific UHK device.
3 changes: 2 additions & 1 deletion device/prj.conf.overlays/uhk-80-left.prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ CONFIG_SHELL_PROMPT_UART="uhk80:left$ "
CONFIG_SHELL_PROMPT_RTT="uhk80:left$ "

CONFIG_BT_DIS_MODEL="UHK 80 left half"
CONFIG_BT_DIS_PNP_PID=0x0007
CONFIG_BT_DIS_PNP_PID=0x8007
CONFIG_USB_PID=0x0007
3 changes: 2 additions & 1 deletion device/prj.conf.overlays/uhk-80-right.prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ CONFIG_SHELL_PROMPT_UART="uhk80:right$ "
CONFIG_SHELL_PROMPT_RTT="uhk80:right$ "

CONFIG_BT_DIS_MODEL="UHK 80 right half"
CONFIG_BT_DIS_PNP_PID=0x0009
CONFIG_BT_DIS_PNP_PID=0x8009
CONFIG_USB_PID=0x0009
3 changes: 2 additions & 1 deletion device/prj.conf.overlays/uhk-dongle.prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ CONFIG_SHELL_PROMPT_UART="uhk-dongle$ "
CONFIG_SHELL_PROMPT_RTT="uhk-dongle$ "

CONFIG_BT_DIS_MODEL="UHK dongle"
CONFIG_BT_DIS_PNP_PID=0x0005
CONFIG_BT_DIS_PNP_PID=0x8005
CONFIG_USB_PID=0x0005
2 changes: 1 addition & 1 deletion device/src/usb/usb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ static_assert(CONFIG_BT_DIS_PNP_VID_SRC == 2);
uint8_t UsbSerialNumber[5];

constexpr usb::product_info product_info{CONFIG_BT_DIS_PNP_VID, CONFIG_BT_DIS_MANUF,
CONFIG_BT_DIS_PNP_PID, CONFIG_BT_DIS_MODEL,
CONFIG_USB_PID, CONFIG_BT_DIS_MODEL,
usb::version(CONFIG_BT_DIS_PNP_VER >> 8, CONFIG_BT_DIS_PNP_VER), UsbSerialNumber};

template <typename... Args>
Expand Down

0 comments on commit 6dcaafa

Please sign in to comment.