clf.py 文件源码

python
阅读 49 收藏 0 点赞 0 评论 0

项目:bitpay-brick 作者: javgh 项目源码 文件源码
def set_communication_mode(self, brm, **kwargs):
        """Set the hardware communication mode. The effect of calling
        this method depends on the hardware support, some drivers may
        purposely ignore this function. If supported, the parameter
        *brm* specifies the communication mode to choose as a string
        composed of the bitrate and modulation type, for example
        '212F' shall switch to 212 kbps Type F communication. Other
        communication parameters may be changed with optional keyword
        arguments. Currently implemented by the RC-S380 driver are the
        parameters 'add-crc' and 'check-crc' when running as
        initator. It is possible to set *brm* to an empty string if
        bitrate and modulation shall not be changed but only optional
        parameters executed.

        .. note:: This is a direct interface to the
           driver and not needed if :meth:`connect` is used.
        """
        if self.dev is None:
            raise IOError(errno.ENODEV, os.strerror(errno.ENODEV))

        with self.lock:
            self.dev.set_communication_mode(brm, **kwargs)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号