This is an open source C/C++ library for Microchip's USB-to-SPI protocol converter chip MCP2210. It works under Linux. This library is released under Apache License, Version 2.0
The library uses signal11's hidapi. You can find the library documentations in the doc directory, or you can view online here. Some code examples are listed below:
- MCP2210 Library -- Setup and GPIO
- SPI Example Using MCP23S08
- SPI Example Using TC77
- SPI EEPROM Example
- MCP3204 SPI ADC Example
Note, the compiled code needs root access to the device and need to be run using "sudo". You may need to add the provided udev rule (99-hid.rules) to the /etc/udev/rules.d directory.
To build use cmake:
sudo apt install libusb-1.0-0-dev libudev-dev -y
git glone project-url
cd MCP2210-Library/ && mkdir build
cd build/ && cmake .. && make