Skip to content

Commit

Permalink
Merge pull request #430 from ARF1/master
Browse files Browse the repository at this point in the history
Add WaitCommEvent function to win32
  • Loading branch information
zsquareplusc committed May 13, 2019
2 parents a4d8f27 + 688e9b3 commit acab9d2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions serial/win32.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,10 @@ class _COMMTIMEOUTS(Structure):
WaitForSingleObject.restype = DWORD
WaitForSingleObject.argtypes = [HANDLE, DWORD]

WaitCommEvent = _stdcall_libraries['kernel32'].WaitCommEvent
WaitCommEvent.restype = BOOL
WaitCommEvent.argtypes = [HANDLE, LPDWORD, LPOVERLAPPED]

CancelIoEx = _stdcall_libraries['kernel32'].CancelIoEx
CancelIoEx.restype = BOOL
CancelIoEx.argtypes = [HANDLE, LPOVERLAPPED]
Expand Down Expand Up @@ -247,6 +251,12 @@ class _COMMTIMEOUTS(Structure):
PURGE_RXCLEAR = 8 # Variable c_int
INFINITE = 0xFFFFFFFF

CE_RXOVER = 0x0001
CE_OVERRUN = 0x0002
CE_RXPARITY = 0x0004
CE_FRAME = 0x0008
CE_BREAK = 0x0010


class N11_OVERLAPPED4DOLLAR_48E(Union):
pass
Expand Down

0 comments on commit acab9d2

Please sign in to comment.