Coverage for src/bluetooth_sig/gatt/characteristics/hid_control_point.py: 100%
11 statements
« prev ^ index » next coverage.py v7.14.3, created at 2026-06-28 01:26 +0000
« prev ^ index » next coverage.py v7.14.3, created at 2026-06-28 01:26 +0000
1"""HID Control Point characteristic implementation."""
3from __future__ import annotations
5from enum import IntEnum
7from .base import BaseCharacteristic
8from .templates import EnumTemplate
10# Constants per Bluetooth HID specification
11HID_CONTROL_POINT_DATA_LENGTH = 1 # Fixed data length: 1 byte
14class HidControlPointCommand(IntEnum):
15 """HID Control Point commands."""
17 SUSPEND = 0
18 EXIT_SUSPEND = 1
21class HidControlPointCharacteristic(BaseCharacteristic[HidControlPointCommand]):
22 """HID Control Point characteristic (0x2A4C).
24 org.bluetooth.characteristic.hid_control_point
26 HID Control Point characteristic.
27 """
29 _template = EnumTemplate.uint8(HidControlPointCommand)
30 expected_length = HID_CONTROL_POINT_DATA_LENGTH