nfc_.py 文件源码

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

项目:nfc_py 作者: X286 项目源码 文件源码
def __init__(self, device='/dev/ttyAMA0', baud=115200,
                 parity_=serial.PARITY_NONE, stop_bits=serial.STOPBITS_ONE, byte_size=serial.EIGHTBITS, time_out=0):

        # ACK header for data recive
        self.Header = bytearray([0x00, 0x00, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff])
        # time out.
        if time_out != 0:
            self.connectUART = serial.Serial(port=device, baudrate=baud, stopbits=stop_bits, bytesize=byte_size,
                                               timeout=time_out)

        else:
            self.connectUART = serial.Serial(port=device, baudrate=baud, stopbits=stop_bits, bytesize=byte_size)

    # manually close connection
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号