Cover image
Try Now
2024-07-18

Biblioteca NO_STD para el MCP2510, MCP2515 y MCP25625 CAN CHIPS CONTROLADOR

3 years

Works with Finder

1

Github Watches

6

Github Forks

5

Github Stars

mcp25xx

github Crates.io docs.rs

no_std library for the MCP2510, MCP2515 and MCP25625 CAN controller chips.

API is implemented in terms of of the embedded_hal and embedded_can traits.

Activating the mcp2515 or mcp25625 feature will enable additional registers and instructions the MCP2510 does not support.

Example

use embedded_can::nb::Can;
use embedded_can::{Frame, StandardId};
use mcp25xx::bitrates::clock_16mhz::CNF_500K_BPS;
use mcp25xx::registers::{OperationMode, RXB0CTRL, RXM};
use mcp25xx::{CanFrame, Config, MCP25xx};

// spi is a struct implementing embedded_hal::spi::SpiDevice.

let mut mcp25xx = MCP25xx { spi };

let config = Config::default()
    .mode(OperationMode::NormalOperation)
    .bitrate(CNF_500K_BPS)
    .receive_buffer_0(RXB0CTRL::default().with_rxm(RXM::ReceiveAny));

mcp25xx.apply_config(&config).unwrap();

// Send a frame
let can_id = StandardId::new(123).unwrap();
let data = [1, 2, 3, 4, 5, 6, 7, 8];
let frame = CanFrame::new(can_id, &data).unwrap();
mcp25xx.transmit(&frame).unwrap();

// Receive a frame
if let Ok(frame) = mcp25xx.try_receive() {
    let _can_id = frame.id();
    let _data = frame.data();
}

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

相关推荐

  • 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.

  • 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!

  • 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.

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • apappascs
  • Descubra la colección más completa y actualizada de servidores MCP en el mercado. Este repositorio sirve como un centro centralizado, que ofrece un extenso catálogo de servidores MCP de código abierto y propietarios, completos con características, enlaces de documentación y colaboradores.

  • ShrimpingIt
  • Manipulación basada en Micrypthon I2C del expansor GPIO de la serie MCP, derivada de AdaFruit_MCP230xx

  • jae-jae
  • Servidor MCP para obtener contenido de la página web con el navegador sin cabeza de dramaturgo.

  • ravitemer
  • Un poderoso complemento Neovim para administrar servidores MCP (protocolo de contexto del modelo)

  • patruff
  • Puente entre los servidores Ollama y MCP, lo que permite a LLM locales utilizar herramientas de protocolo de contexto del modelo

  • pontusab
  • La comunidad de cursor y windsurf, encontrar reglas y MCP

  • av
  • Ejecute sin esfuerzo LLM Backends, API, frontends y servicios con un solo comando.

  • Mintplex-Labs
  • La aplicación AI de escritorio todo en uno y Docker con trapo incorporado, agentes de IA, creador de agentes sin código, compatibilidad de MCP y más.

  • WangRongsheng
  • 🧑‍🚀 全世界最好的 llM 资料总结(数据处理、模型训练、模型部署、 O1 模型、 MCP 、小语言模型、视觉语言模型) | Resumen de los mejores recursos del mundo.

    Reviews

    2 (1)
    Avatar
    user_fatRlT2k
    2025-04-18

    I have been using the mcp25xx by WMT-GmbH, and it has transformed my workflow! This product is highly efficient and user-friendly. The developers did an excellent job with its functionality and robustness. Check it out at https://github.com/WMT-GmbH/mcp25xx. Highly recommend!