Pymcp2221a

Latest version: v1.4.0

Safety actively analyzes 621876 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

1.4.0

VID/PID unused 4

PyMCP2221A.py

class PyMCP2221A:
def __init__(self,VID = 0x04D8,PID = 0x00DD,devnum = 0):
self.mcp2221a = hid.device()
self.mcp2221a.open_path(hid.enumerate(0x04D8, 0x00DD)[devnum]["path"])

Oh... Sorry I'm mistake.
Do you want to change VID?
Do you want to distinguish and use the same VID device?
It will be changed in the next version.

and more bugfix.

1.3.1

Bug fix.

1.3.0

MCP2221 used SMBus (system management bus) compatible function!

from PyMCP2221A import SMBus
bus = SMBus.SMBus()
bus. read_byte(addrs)
bus. write_byte(addrs,val)
bus.write_byte_data(addrs,cmd,val)
bus.read_byte_data(addrs,cmd)
bus.read_word_data(addrs,cmd)
bus.write_word_data(addrs,cmd,val)
bus.read_i2c_block_data(addrs,cmd,size)
bus.write_i2c_block_data(self, addrs,cmd,vals)

1.2.0

Mr.K4zuki
add more I2C functions to follow datasheet

add i2c{read,write}() to handle low level controls
add I2C_Write_Repeated() to handle write sequence
starting with Repeated Start condition
add I2C_Write_No_Stop() to handle write sequence
without Stop condition
add I2C_Read_Repeated() to handle read sequence
starting with Repeated Start condition
apply autopep8(again)

and Add

def __init__(self,VID = 0x04D8,PID = 0x00DD,devnum = 0):
self.mcp2221a = hid.device()
self.mcp2221a.open_path(hid.enumerate(0x04D8, 0x00DD)[devnum]["path"])

HID Device Select Option.

HID DeviceDriver Info
def DeviceDriverInfo(self):
print("Manufacturer: %s" % self.mcp2221a.get_manufacturer_string())
print("Product: %s" % self.mcp2221a.get_product_string())
print("Serial No: %s" % self.mcp2221a.get_serial_number_string())

View a Device Info.

1.0

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.