parameters: (self)
docstring: internal close port helper
docstring_summary: internal close port helper
docstring_tokens: internal close port helper
function: def _close(self):
          """internal close port helper"""
          if self.hComPort:
              # Restore original timeout values:
              win32.SetCommTimeouts(self.hComPort, self._orgTimeouts)
              # Close COM-Port:
              win32.CloseHandle(self.hComPort)
              if self._overlappedRead is not None:
                  win32.CloseHandle(self._overlappedRead.hEvent)
                  self._overlappedRead = None
              if self._overlappedWrite is not None:
                  win32.CloseHandle(self._overlappedWrite.hEvent)
                  self._overlappedWrite = None
              self.hComPort = None
function_tokens: def _close ( self ) : if self . hComPort : # Restore original timeout values: win32 . SetCommTimeouts ( self . hComPort , self . _orgTimeouts ) # Close COM-Port: win32 . CloseHandle ( self . hComPort ) if self . _overlappedRead is not None : win32 . CloseHandle ( self . _overlappedRead . hEvent ) self . _overlappedRead = None if self . _overlappedWrite is not None : win32 . CloseHandle ( self . _overlappedWrite . hEvent ) self . _overlappedWrite = None self . hComPort = None