summaryrefslogtreecommitdiff
path: root/ioctl
diff options
context:
space:
mode:
Diffstat (limited to 'ioctl')
-rw-r--r--ioctl/__init__.py3
-rw-r--r--ioctl/hidraw.py21
2 files changed, 12 insertions, 12 deletions
diff --git a/ioctl/__init__.py b/ioctl/__init__.py
index 820a4ba..a7b9ffb 100644
--- a/ioctl/__init__.py
+++ b/ioctl/__init__.py
@@ -6,6 +6,9 @@ import fcntl
from typing import BinaryIO, Optional, Union
+__all__ = ['IOCTL']
+
+
class IOCTL(object):
'''
Constructs and performs ioctl(s)
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