Skip to content

Releases: nonNoise/PyMCP2221A

Bug Fix.

15 Aug 06:14
Compare
Choose a tag to compare

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.

Release v1.3.1

17 Mar 08:27
Compare
Choose a tag to compare

Bug fix.

Release v1.3.0

17 Mar 08:24
Compare
Choose a tag to compare
Release v1.3.0 Pre-release
Pre-release

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)

Release v1.2.0

15 Mar 05:46
Compare
Choose a tag to compare
Release v1.2.0 Pre-release
Pre-release

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.

PyMCP2221A v1.0

02 Mar 09:53
Compare
Choose a tag to compare
Release v1.0.0