@johntalton/i2c-bus-mcp2221
v4.0.1
Published
An [I²C interface](https://github.com/johntalton/and-other-delights) `I2CBus` implementation over [MCP2221](https://github.com/johntalton/mcp2221)
Downloads
3
Readme
I²C Bus MCP2221
An I²C interface I2CBus
implementation over MCP2221
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