Merge remote-tracking branch 'qmk/master' into merge-2025-02-08
This commit is contained in:
commit
760225f515
2029 changed files with 49658 additions and 84621 deletions
|
|
@ -34,15 +34,17 @@ if [ -z "$RUNTIME" ]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
|
||||
# IF we are using docker on non Linux and docker-machine isn't working print an error
|
||||
# ELSE set usb_args
|
||||
if [ ! "$(uname)" = "Linux" ] && [ "$RUNTIME" = "docker" ] && ! docker-machine active >/dev/null 2>&1; then
|
||||
errcho "Error: target requires docker-machine to work on your platform"
|
||||
errcho "See http://gw.tnode.com/docker/docker-machine-with-usb-support-on-windows-macos"
|
||||
exit 3
|
||||
else
|
||||
usb_args="--privileged -v /dev:/dev"
|
||||
# If SKIP_FLASHING_SUPPORT is defined, do not check for docker-machine and do not run a privileged container
|
||||
if [ -z "$SKIP_FLASHING_SUPPORT" ]; then
|
||||
# IF we are using docker on non Linux and docker-machine isn't working print an error
|
||||
# ELSE set usb_args
|
||||
if [ ! "$(uname)" = "Linux" ] && [ "$RUNTIME" = "docker" ] && ! docker-machine active >/dev/null 2>&1; then
|
||||
errcho "Error: target requires docker-machine to work on your platform"
|
||||
errcho "See http://gw.tnode.com/docker/docker-machine-with-usb-support-on-windows-macos"
|
||||
exit 3
|
||||
else
|
||||
usb_args="--privileged -v /dev:/dev"
|
||||
fi
|
||||
fi
|
||||
|
||||
qmk_firmware_dir=$(pwd -W 2>/dev/null) || qmk_firmware_dir=$PWD # Use Windows path if on Windows
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ _qmk_install() {
|
|||
|
||||
. /etc/os-release
|
||||
if [ "$VERSION_ID" -ge "39" ]; then
|
||||
sudo dnf copr -h >/dev/null 2>&1 || sudo dnf $SKIP_PROMPT install dnf-plugins-core
|
||||
sudo dnf $SKIP_PROMPT copr enable erovia/dfu-programmer
|
||||
fi
|
||||
|
||||
|
|
|
|||
82
util/polling_rate.py
Normal file
82
util/polling_rate.py
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import usb
|
||||
|
||||
USB_INTERFACE_CLASS_HID = 0x03
|
||||
|
||||
def usb_device_spec(spec):
|
||||
major = spec >> 8
|
||||
minor = (spec >> 4) & 0xF
|
||||
return f"{major}.{minor}"
|
||||
|
||||
def usb_device_speed(speed):
|
||||
if speed == 1:
|
||||
return "Low-speed"
|
||||
elif speed == 2:
|
||||
return "Full-speed"
|
||||
elif speed == 3:
|
||||
return "High-speed"
|
||||
elif speed == 4:
|
||||
return "SuperSpeed"
|
||||
elif speed == 5:
|
||||
return "SuperSpeed+"
|
||||
|
||||
return "Speed unknown"
|
||||
|
||||
def usb_hid_interface_subclass(subclass):
|
||||
if subclass == 0x00:
|
||||
return "None"
|
||||
elif subclass == 0x01:
|
||||
return "Boot"
|
||||
else:
|
||||
return f"Unknown (0x{subclass:02X})"
|
||||
|
||||
def usb_hid_interface_protocol(subclass, protocol):
|
||||
if subclass == 0x00 and protocol == 0x00:
|
||||
return "None"
|
||||
elif subclass == 0x01:
|
||||
if protocol == 0x00:
|
||||
return "None"
|
||||
elif protocol == 0x01:
|
||||
return "Keyboard"
|
||||
elif protocol == 0x02:
|
||||
return "Mouse"
|
||||
|
||||
return f"Unknown (0x{protocol:02X})"
|
||||
|
||||
def usb_interface_polling_rate(speed, interval):
|
||||
if speed >= 3:
|
||||
return f"{interval * 125} μs ({8000 // interval} Hz)"
|
||||
else:
|
||||
return f"{interval} ms ({1000 // interval} Hz)"
|
||||
|
||||
if __name__ == '__main__':
|
||||
devices = usb.core.find(find_all=True)
|
||||
|
||||
for device in devices:
|
||||
try:
|
||||
configuration = device.get_active_configuration()
|
||||
except NotImplementedError:
|
||||
continue
|
||||
|
||||
hid_interfaces = []
|
||||
for interface in configuration.interfaces():
|
||||
if interface.bInterfaceClass == USB_INTERFACE_CLASS_HID:
|
||||
hid_interfaces.append(interface)
|
||||
|
||||
if len(hid_interfaces) > 0:
|
||||
print(f"{device.manufacturer} {device.product} ({device.idVendor:04X}:{device.idProduct:04X}:{device.bcdDevice:04X}), {usb_device_spec(device.bcdUSB)} {usb_device_speed(device.speed)}")
|
||||
|
||||
for interface in hid_interfaces:
|
||||
print(f"└─ HID Interface {interface.bInterfaceNumber}")
|
||||
subclass = interface.bInterfaceSubClass
|
||||
protocol = interface.bInterfaceProtocol
|
||||
print(f" ├─ Subclass: {usb_hid_interface_subclass(subclass)}")
|
||||
print(f" ├─ Protocol: {usb_hid_interface_protocol(subclass, protocol)}")
|
||||
|
||||
for endpoint in interface.endpoints():
|
||||
endpoint_address = endpoint.bEndpointAddress & 0xF
|
||||
endpoint_direction = "IN" if endpoint.bEndpointAddress & 0x80 else "OUT"
|
||||
print(f" └─ Endpoint {endpoint_address} {endpoint_direction}")
|
||||
print(f" ├─ Endpoint Size: {endpoint.wMaxPacketSize} bytes")
|
||||
print(f" └─ Polling Rate: {usb_interface_polling_rate(device.speed, endpoint.bInterval)}")
|
||||
|
|
@ -84,3 +84,6 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="28e9", ATTRS{idProduct}=="0189", TAG+="uacc
|
|||
|
||||
# WB32 DFU
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="342d", ATTRS{idProduct}=="dfa0", TAG+="uaccess"
|
||||
|
||||
# AT32 DFU
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2e3c", ATTRS{idProduct}=="df11", TAG+="uaccess"
|
||||
|
|
|
|||
|
|
@ -174,11 +174,56 @@
|
|||
"short_name": "ESP32H2",
|
||||
"description": "ESP32-H2"
|
||||
},
|
||||
{
|
||||
"id": "0x540ddf62",
|
||||
"short_name": "ESP32C6",
|
||||
"description": "ESP32-C6"
|
||||
},
|
||||
{
|
||||
"id": "0x3d308e94",
|
||||
"short_name": "ESP32P4",
|
||||
"description": "ESP32-P4"
|
||||
},
|
||||
{
|
||||
"id": "0xf71c0343",
|
||||
"short_name": "ESP32C5",
|
||||
"description": "ESP32-C5"
|
||||
},
|
||||
{
|
||||
"id": "0x77d850c4",
|
||||
"short_name": "ESP32C61",
|
||||
"description": "ESP32-C61"
|
||||
},
|
||||
{
|
||||
"id": "0xe48bff56",
|
||||
"short_name": "RP2040",
|
||||
"description": "Raspberry Pi RP2040"
|
||||
},
|
||||
{
|
||||
"id": "0xe48bff57",
|
||||
"short_name": "RP2XXX_ABSOLUTE",
|
||||
"description": "Raspberry Pi Microcontrollers: Absolute (unpartitioned) download"
|
||||
},
|
||||
{
|
||||
"id": "0xe48bff58",
|
||||
"short_name": "RP2XXX_DATA",
|
||||
"description": "Raspberry Pi Microcontrollers: Data partition download"
|
||||
},
|
||||
{
|
||||
"id": "0xe48bff59",
|
||||
"short_name": "RP2350_ARM_S",
|
||||
"description": "Raspberry Pi RP2350, Secure Arm image"
|
||||
},
|
||||
{
|
||||
"id": "0xe48bff5a",
|
||||
"short_name": "RP2350_RISCV",
|
||||
"description": "Raspberry Pi RP2350, RISC-V image"
|
||||
},
|
||||
{
|
||||
"id": "0xe48bff5b",
|
||||
"short_name": "RP2350_ARM_NS",
|
||||
"description": "Raspberry Pi RP2350, Non-secure Arm image"
|
||||
},
|
||||
{
|
||||
"id": "0x00ff6919",
|
||||
"short_name": "STM32L4",
|
||||
|
|
@ -213,5 +258,40 @@
|
|||
"id": "0x9517422f",
|
||||
"short_name": "RZA1LU",
|
||||
"description": "Renesas RZ/A1LU (R7S7210xx)"
|
||||
},
|
||||
{
|
||||
"id": "0x2dc309c5",
|
||||
"short_name": "STM32F411xE",
|
||||
"description": "ST STM32F411xE"
|
||||
},
|
||||
{
|
||||
"id": "0x06d1097b",
|
||||
"short_name": "STM32F411xC",
|
||||
"description": "ST STM32F411xC"
|
||||
},
|
||||
{
|
||||
"id": "0x72721d4e",
|
||||
"short_name": "NRF52832xxAA",
|
||||
"description": "Nordic NRF52832xxAA"
|
||||
},
|
||||
{
|
||||
"id": "0x6f752678",
|
||||
"short_name": "NRF52832xxAB",
|
||||
"description": "Nordic NRF52832xxAB"
|
||||
},
|
||||
{
|
||||
"id": "0xa0c97b8e",
|
||||
"short_name": "AT32F415",
|
||||
"description": "ArteryTek AT32F415"
|
||||
},
|
||||
{
|
||||
"id": "0x699b62ec",
|
||||
"short_name": "CH32V",
|
||||
"description": "WCH CH32V2xx and CH32V3xx"
|
||||
},
|
||||
{
|
||||
"id": "0x7be8976d",
|
||||
"short_name": "RA4M1",
|
||||
"description": "Renesas RA4M1"
|
||||
}
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue