Browse Source

Checkpoint usbuirt.

Douglas William Thrift 6 years ago
parent
commit
87c30d4e66
1 changed files with 8 additions and 1 deletions
  1. 8 1
      usbuirt.py

+ 8 - 1
usbuirt.py

@@ -22,10 +22,13 @@
 
 import ctypes
 
+UUIRTDRV_OPENEX_ATTRIBUTE_EXCLUSIVE     = 0x0001
+
 UUIRTDRV_ERR_NO_DEVICE  = 0x20000001
 UUIRTDRV_ERR_NO_RESP    = 0x20000002
 UUIRTDRV_ERR_NO_DLL     = 0x20000003
 UUIRTDRV_ERR_VERSION    = 0x20000004
+UUIRTDRV_ERR_ERR_IN_USE = 0x20000005
 
 UUIRTDRV_CFG_LEDRX      = 0x0001
 UUIRTDRV_CFG_LEDTX      = 0x0002
@@ -38,6 +41,10 @@ UUIRTDRV_IRFMT_LEARN_FORCERAW   = 0x0100
 UUIRTDRV_IRFMT_LEARN_FORCESTRUC = 0x0200
 UUIRTDRV_IRFMT_LEARN_FORCEFREQ  = 0x0400
 UUIRTDRV_IRFMT_LEARN_FREQDETECT = 0x0800
+UUIRTDRV_IRFMT_LEARN_UIR        = 0x4000
+UUIRTDRV_IRFMT_LEARN_DEBUG      = 0x8000
+
+UUIRTDRV_IRFMT_TRANSMIT_DC      = 0x0080
 
 class UUINFO(ctypes.Structure):
     _fields_ = [
@@ -52,7 +59,7 @@ if __name__ == '__main__':
     import sys
 
     uuirtdrv = ctypes.WinDLL('uuirtdrv', use_last_error = True)
-    handle = uuirtdrv.UUIRTOpen()
+    handle = uuirtdrv.UUIRTOpenEx("USB-UIRT", 0, None, None)
 
     uuirtdrv.UUIRTTransmitIR(handle, ' '.join(sys.argv[1:]), UUIRTDRV_IRFMT_PRONTO, 1, 0, None, None, None)