question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MCP2210 Device Binding

See original GitHub issue

@joperezr

I’m looking at working on a new MCP2210 (USB-to-SPI Protocol Converter with GPIO) binding.

This is controlled via a USB interface. Before starting the development, I wanted to know if I would be allowed to reference the HidSharp NuGet package for the communications? It appears it is under Apache license.

The plan is to not expose anything from HidSharp in the device’s public API. I haven’t reviewed all details from the datasheet, but the device provides 9 GPIO and a SPI bus. I’m assuming it would look something like the following (but not confirmed yet).


var mcp2210 = new Mcp2210("[serialNumber]")  // serialNumber would allow to communicate with multiples.

// Allow for direct control of GPIO.
mcp2210.GpioController.SetPinMode(3, PinMode.Output);
mcp2210.GpioController.Write(3, PinValue.High);

// Allow for direct SPI communications.
mcp2210.SpiDevice.WriteByte(0x12);

// Or control another device binding.
var mcp23s08 = new Mcp23S08(mcp2210.SpiDevice, 0x20, 1, 2, mcp2210.GpioController);
mcp23s08.SetPinMode(7, PinMode.Output);
mcp23s08.Write(7, PinValue.High);

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
shaggygicommented, Apr 29, 2020

And welcome back @shaggygi! Hope you’re doing well!

Thanks buddy! Been super busy with work life, but trust me… I’ve been watching the repo’s progress when I can. Actually, this new binding is for a work-related project.

1reaction
krwqcommented, Apr 30, 2020

@shaggygi feel free to add dependency on the library with following conditions:

Read more comments on GitHub >

github_iconTop Results From Across the Web

MCP2210 Breakout Module User's Guide
This kit allows communication with several. SPI slave devices (I/O expander, EEPROM, ADC and temperature sensor). For more details on examples using the...
Read more >
USB to SPI driver for MCP2210
these inexpensive Microchip MCP2210 USB to SPI bridge w/ GPIO devices. ... to bind to the device. * The MCP2210 has 9 GP...
Read more >
Re: USB to SPI driver for MCP2210 — Linux USB - spinics.net
My bother & I are working on a project where we're planning on using these inexpensive Microchip MCP2210 USB to SPI bridge w/...
Read more >
mcp2210 - crates.io: Rust Package Registry
mcp2210 -rs: Microchip MCP2210 library using hiddraw (Linux-only). Minimum Rust version: 1.31. MCP2210 datasheet.
Read more >
Linux/udev: Unbinding from one kernel driver, and ...
Under Linux, one can easily unbind the usbhid driver from a particular usb device, but this gets tedious after a few dozen times....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found