當前位置: 首頁>>代碼示例>>Python>>正文


Python win32.EscapeCommFunction方法代碼示例

本文整理匯總了Python中serial.win32.EscapeCommFunction方法的典型用法代碼示例。如果您正苦於以下問題:Python win32.EscapeCommFunction方法的具體用法?Python win32.EscapeCommFunction怎麽用?Python win32.EscapeCommFunction使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在serial.win32的用法示例。


在下文中一共展示了win32.EscapeCommFunction方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: _update_rts_state

# 需要導入模塊: from serial import win32 [as 別名]
# 或者: from serial.win32 import EscapeCommFunction [as 別名]
def _update_rts_state(self):
        """Set terminal status line: Request To Send"""
        if self._rts_state:
            win32.EscapeCommFunction(self._port_handle, win32.SETRTS)
        else:
            win32.EscapeCommFunction(self._port_handle, win32.CLRRTS) 
開發者ID:sketchpunk,項目名稱:android3dblendermouse,代碼行數:8,代碼來源:serialwin32.py

示例2: _update_dtr_state

# 需要導入模塊: from serial import win32 [as 別名]
# 或者: from serial.win32 import EscapeCommFunction [as 別名]
def _update_dtr_state(self):
        """Set terminal status line: Data Terminal Ready"""
        if self._dtr_state:
            win32.EscapeCommFunction(self._port_handle, win32.SETDTR)
        else:
            win32.EscapeCommFunction(self._port_handle, win32.CLRDTR) 
開發者ID:sketchpunk,項目名稱:android3dblendermouse,代碼行數:8,代碼來源:serialwin32.py

示例3: set_output_flow_control

# 需要導入模塊: from serial import win32 [as 別名]
# 或者: from serial.win32 import EscapeCommFunction [as 別名]
def set_output_flow_control(self, enable=True):
        """\
        Manually control flow - when software flow control is enabled.
        This will do the same as if XON (true) or XOFF (false) are received
        from the other device and control the transmission accordingly.
        WARNING: this function is not portable to different platforms!
        """
        if not self._port_handle:
            raise portNotOpenError
        if enable:
            win32.EscapeCommFunction(self._port_handle, win32.SETXON)
        else:
            win32.EscapeCommFunction(self._port_handle, win32.SETXOFF) 
開發者ID:c0d3st0rm,項目名稱:microperi,代碼行數:15,代碼來源:serialwin32.py

示例4: setRTS

# 需要導入模塊: from serial import win32 [as 別名]
# 或者: from serial.win32 import EscapeCommFunction [as 別名]
def setRTS(self, level=1):
        """Set terminal status line: Request To Send"""
        # remember level for reconfigure
        if level:
            self._rtsState = win32.RTS_CONTROL_ENABLE
        else:
            self._rtsState = win32.RTS_CONTROL_DISABLE
        # also apply now if port is open
        if self.hComPort:
            if level:
                win32.EscapeCommFunction(self.hComPort, win32.SETRTS)
            else:
                win32.EscapeCommFunction(self.hComPort, win32.CLRRTS) 
開發者ID:whaleygeek,項目名稱:microbit-gateway,代碼行數:15,代碼來源:serialwin32.py

示例5: setDTR

# 需要導入模塊: from serial import win32 [as 別名]
# 或者: from serial.win32 import EscapeCommFunction [as 別名]
def setDTR(self, level=1):
        """Set terminal status line: Data Terminal Ready"""
        # remember level for reconfigure
        if level:
            self._dtrState = win32.DTR_CONTROL_ENABLE
        else:
            self._dtrState = win32.DTR_CONTROL_DISABLE
        # also apply now if port is open
        if self.hComPort:
            if level:
                win32.EscapeCommFunction(self.hComPort, win32.SETDTR)
            else:
                win32.EscapeCommFunction(self.hComPort, win32.CLRDTR) 
開發者ID:whaleygeek,項目名稱:microbit-gateway,代碼行數:15,代碼來源:serialwin32.py

示例6: setXON

# 需要導入模塊: from serial import win32 [as 別名]
# 或者: from serial.win32 import EscapeCommFunction [as 別名]
def setXON(self, level=True):
        """\
        Manually control flow - when software flow control is enabled.
        This will send XON (true) and XOFF (false) to the other device.
        WARNING: this function is not portable to different platforms!
        """
        if not self.hComPort: raise portNotOpenError
        if level:
            win32.EscapeCommFunction(self.hComPort, win32.SETXON)
        else:
            win32.EscapeCommFunction(self.hComPort, win32.SETXOFF) 
開發者ID:whaleygeek,項目名稱:microbit-gateway,代碼行數:13,代碼來源:serialwin32.py

示例7: set_output_flow_control

# 需要導入模塊: from serial import win32 [as 別名]
# 或者: from serial.win32 import EscapeCommFunction [as 別名]
def set_output_flow_control(self, enable=True):
        """\
        Manually control flow - when software flow control is enabled.
        This will do the same as if XON (true) or XOFF (false) are received
        from the other device and control the transmission accordingly.
        WARNING: this function is not portable to different platforms!
        """
        if not self.is_open:
            raise portNotOpenError
        if enable:
            win32.EscapeCommFunction(self._port_handle, win32.SETXON)
        else:
            win32.EscapeCommFunction(self._port_handle, win32.SETXOFF) 
開發者ID:arpruss,項目名稱:gcodeplot,代碼行數:15,代碼來源:serialwin32.py

示例8: setRTS

# 需要導入模塊: from serial import win32 [as 別名]
# 或者: from serial.win32 import EscapeCommFunction [as 別名]
def setRTS(self, level=1):
        """Set terminal status line: Request To Send"""
        if not self.hComPort: raise portNotOpenError
        if level:
            self._rtsState = win32.RTS_CONTROL_ENABLE
            win32.EscapeCommFunction(self.hComPort, win32.SETRTS)
        else:
            self._rtsState = win32.RTS_CONTROL_DISABLE
            win32.EscapeCommFunction(self.hComPort, win32.CLRRTS) 
開發者ID:respeaker,項目名稱:get_started_with_respeaker,代碼行數:11,代碼來源:serialwin32.py

示例9: setDTR

# 需要導入模塊: from serial import win32 [as 別名]
# 或者: from serial.win32 import EscapeCommFunction [as 別名]
def setDTR(self, level=1):
        """Set terminal status line: Data Terminal Ready"""
        if not self.hComPort: raise portNotOpenError
        if level:
            self._dtrState = win32.DTR_CONTROL_ENABLE
            win32.EscapeCommFunction(self.hComPort, win32.SETDTR)
        else:
            self._dtrState = win32.DTR_CONTROL_DISABLE
            win32.EscapeCommFunction(self.hComPort, win32.CLRDTR) 
開發者ID:respeaker,項目名稱:get_started_with_respeaker,代碼行數:11,代碼來源:serialwin32.py

示例10: setXON

# 需要導入模塊: from serial import win32 [as 別名]
# 或者: from serial.win32 import EscapeCommFunction [as 別名]
def setXON(self, level=True):
        """Platform specific - set flow state."""
        if not self.hComPort: raise portNotOpenError
        if level:
            win32.EscapeCommFunction(self.hComPort, win32.SETXON)
        else:
            win32.EscapeCommFunction(self.hComPort, win32.SETXOFF) 
開發者ID:respeaker,項目名稱:get_started_with_respeaker,代碼行數:9,代碼來源:serialwin32.py


注:本文中的serial.win32.EscapeCommFunction方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。