当前位置: 首页>>代码示例>>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;未经允许,请勿转载。