Cover image
Try Now
2014-09-27

用于与MCP2210 USB-SPI接口接口的Python库。

3 years

Works with Finder

7

Github Watches

18

Github Forks

25

Github Stars

mcp2210

Python library for interfacing with the MCP2210 USB-SPI interface.

Installation

$ pip install mcp2210

or, clone this repository and install from source:

$ git clone https://github.com/arachnidlabs/mcp2210.git
$ cd mcp2210
$ sudo setup.py install

Usage

>>> from mcp2210 import MCP2210
>>> dev = MCP2210(my_vid, my_pid)
>>> dev.transfer("data")

In addition to making transfers, device settings can be accessed and modified:

>>> dev.manufacturer_name = "Foobar Industries Ltd"
>>> print dev.manufacturer_name
Foobar Industries Ltd

>>> dev.product_name = "Foobinator 1.0"
>>> print dev.product_name
Foobinator 1.0

>>> settings = dev.boot_chip_settings
>>> settings.pin_designations[0] = 0x01  # GPIO 0 to chip select
>>> dev.boot_chip_settings = settings  # Settings are updated on property assignment

>>> spisettings = dev.boot_transfer_settings
>>> spisettings.idle_cs = 0x01
>>> spisettings.active_cs = 0x00  # Set pin 1 to go low on chip select
>>> dev.boot_transfer_settings = spisettings

chip_settings and boot_chip_settings define basic settings such as GPIO pin assignments. transfer_settings and boot_transfer_settings define SPI settings such as data rate, chip select value, and inter-byte timings. boot_usb_settings defines USB configuration options like VID, PID, and power requirements. On boot, the MCP2210 copies boot_transfer_settings and boot_chip_settings into transfer_settings and chip_settings respectively.

All properties are cached when fetched, and updated on the device when set, so storing results to the chip requires an assignment, as in the above code, even when the arguments are mutable.

See the MCP2210 datasheet for full details on available commands and arguments.

相关推荐

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • lumpenspace
  • Take an adjectivised noun, and create images making it progressively more adjective!

  • Lists Tailwind CSS classes in monospaced font

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • tomoyoshi hirata
  • Sony α7IIIマニュアルアシスタント

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • https://zenepic.net
  • Embark on a thrilling diplomatic quest across a galaxy on the brink of war. Navigate complex politics and alien cultures to forge peace and avert catastrophe in this immersive interstellar adventure.

  • jae-jae
  • MCP服务器使用剧作《无头浏览器》获取网页内容。

  • ravitemer
  • 一个功能强大的Neovim插件,用于管理MCP(模型上下文协议)服务器

  • patruff
  • Ollama和MCP服务器之间的桥梁,使本地LLMS可以使用模型上下文协议工具

  • pontusab
  • 光标与风浪冲浪社区,查找规则和MCP

  • av
  • 毫不费力地使用一个命令运行LLM后端,API,前端和服务。

  • Mintplex-Labs
  • 带有内置抹布,AI代理,无代理构建器,MCP兼容性等的多合一桌面和Docker AI应用程序。

  • WangRongsheng
  • 🧑‍🚀 llm 资料总结(数据处理、模型训练、模型部署、 o1 模型、mcp 、小语言模型、视觉语言模型)|摘要世界上最好的LLM资源。

  • appcypher
  • 很棒的MCP服务器 - 模型上下文协议服务器的策划列表

  • chongdashu
  • 使用模型上下文协议(MCP),启用Cursor,Windsurf和Claude Desktop等AI助手客户,以通过自然语言控制虚幻引擎。

  • wgpsec
  • 一款基于各大企业信息api的工具,解决在遇到的各种针对国内企业信息收集难题。一键收集控股公司icp 备案、 app 、小程序、微信公众号等信息聚合导出。支持 mcp接入

  • alexander-zuev
  • 查询MCP通过聊天接口启用Supabase的端到端管理:读取和编写查询执行,管理API支持,自动迁移版本,访问日志等等。

    Reviews

    3 (1)
    Avatar
    user_hEr7d0Tj
    2025-04-17

    The mcp2210 from arachnidlabs is an excellent USB-to-SPI protocol converter that has significantly streamlined my development process. Its reliable performance and ease of integration have made it an indispensable tool for my projects. Highly recommended for anyone working with SPI communication. Check it out at https://github.com/arachnidlabs/mcp2210.