summaryrefslogtreecommitdiff
path: root/ioctl/hidraw.py
diff options
context:
space:
mode:
authorFilipe Laíns <lains@archlinux.org>2020-08-10 20:32:16 +0100
committerFilipe Laíns <lains@archlinux.org>2020-08-10 20:42:31 +0100
commit1dc57ea0e5088e34e7611baa8e2af2654bd846c7 (patch)
treec7bb1956464e9e756551bf5426c7cc454690c455 /ioctl/hidraw.py
parent60b7590f674f7fcb8bec1f525a5cb5d52623972e (diff)
ioctl/hidraw: add __all__ export
Signed-off-by: Filipe Laíns <lains@archlinux.org>
Diffstat (limited to 'ioctl/hidraw.py')
-rw-r--r--ioctl/hidraw.py21
1 files changed, 9 insertions, 12 deletions
diff --git a/ioctl/hidraw.py b/ioctl/hidraw.py
index 94cd1b4..d72ec33 100644
--- a/ioctl/hidraw.py
+++ b/ioctl/hidraw.py
@@ -10,6 +10,13 @@ from typing import BinaryIO, List, Tuple
import ioctl
+__all__ = [
+ 'HidrawReportDescriptor',
+ 'HidrawDevinfo',
+ 'Hidraw',
+]
+
+
class HidrawReportDescriptor(ctypes.Structure):
HID_MAX_DESCRIPTOR_SIZE = 4096
_fields_ = [
@@ -39,7 +46,6 @@ class Hidraw(object):
HIDIOCGRAWPHYS = 0x05
HIDIOCSFEATURE = 0x06
HIDIOCGFEATURE = 0x07
- HIDIOCGRAWUNIQ = 0x08
HID_NAME_SIZE = 1024
@@ -119,19 +125,10 @@ class Hidraw(object):
@property
def phys(self) -> str:
'''
- HID physical name of the hidraw node
+ Physical name of the hidraw node
'''
return ioctl.IOCTL.IOR(
'H', self.HIDIOCGRAWPHYS, self.HID_NAME_SIZE
).perform(self._fd).decode('utf-8').strip('\x00')
- @property
- def uniq(self) -> str:
- '''
- HID unique identifier of the hidraw node
- '''
- return ioctl.IOCTL.IOR(
- 'H', self.HIDIOCGRAWUNIQ, self.HID_NAME_SIZE
- ).perform(self._fd).decode('utf-8').strip('\x00')
-
- # TODO: HIDIOCSFEATURE, HIDIOCGFEATURE
+ # TODO: HIDIOCSFEATURE, HIDIOCGFEATURE, HIDIOCGRAWUNIQ