Skip to content

A I2CBus implementation over mcp2221 I²C interface

License

Notifications You must be signed in to change notification settings

johntalton/i2c-bus-mcp2221

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

I²C Bus MCP2221

An I²C interface I2CBus implementation over MCP2221

npm Version GitHub package.json version CI GitHub Downloads Per Month GitHub last commit

import { MCP2221 } from '@johntalton/mcp2221'
import { I2CBusMCP2221 } from '@johntalton/i2c-bus-mcp2221'

const hidDevice = /* navigator.hid.request ... */
const source = new WebHIDStreamSource(hidDevice) // or NodeHIDStreamSource
const device = MCP2221.from(source)
const bus = I2CBusMCP2221.from(device)

// bus.readI2CBlock(...) and friends