Skip to content

Commit

Permalink
Support Flexscan 2456
Browse files Browse the repository at this point in the history
  • Loading branch information
reald committed Nov 6, 2021
1 parent d704d90 commit ebbe7f1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ This is an attempt to control USB-HID capable display monitors.

## Supported monitor

* EIZO FlexScan EV2456
* EIZO FlexScan EV3895
* EIZO FlexScan EV2760
* EIZO FlexScan EV2750
Expand Down
19 changes: 14 additions & 5 deletions python/hid-monitor-control.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env python3

# from __future__ import print_function

import sys
Expand All @@ -10,10 +12,16 @@
[0x056D, 0x4014], # EV2750
[0x056D, 0x4059], # EV2760
[0x056D, 0x4065], # EV3895
[0x056D, 0x4027], # EV2456
]

def get_input_source_table(model):
table = {
'EV2456': {
'D-SUB': 0x100,
'DVI': 0x0200,
'DisplayPort': 0x0300,
'HDMI': 0x0400 },
'EV2750': {
'DVI': 0x0200,
'DisplayPort': 0x0300,
Expand All @@ -40,6 +48,7 @@ def lookup_input_source_alias(input):
'Type-C': 'USB-C',
'USB': 'USB-C',
'USBC': 'USB-C',
'DSUB': 'D-SUB',
}
for k in table:
if k.lower() == input.lower():
Expand Down Expand Up @@ -82,11 +91,11 @@ def set_val(dev, num, val):
dev.send_feature_report(buf)

tmp = dev.get_feature_report(7, 8)
if tmp[0] != 0x07:
raise Exception
for i in range(1,7):
if tmp[i] != buf[i]:
raise Exception
#if tmp[0] != 0x07:
# raise Exception
#for i in range(1,7):
# if tmp[i] != buf[i]:
# raise Exception

def get_val(dev, num):
buf = [0x03, 0x01, 0xFF, num & 255, num >> 8]
Expand Down

0 comments on commit ebbe7f1

Please sign in to comment.