Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 1.16 KB

README.md

File metadata and controls

26 lines (18 loc) · 1.16 KB

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