mcp2003a
This Rust crate provides basic no_std LIN Bus communications with MCP2003A LIN Transceiver. Uses embedded-hal and embedded-io traits.
⚠️ WORK IN PROGRESS
Usage
use ;
let uart = // Your embedded-hal UART driver
let break_pin = // Your embedded-hal GPIO output pin driver
let delay_ns = // Your embedded-hal delay driver
let lin_bus_config = LinBusConfig ;
let mut mcp2003a = new;
// Read the feedback / diagnostic frame with Id 0x01:
// - Id: 0x01
// - Data: We provide an 8-byte buffer to store the data
let mut data = ;
match mcp2003a.read_frame
// Send a frame on the LIN bus to a device with Command frame of 0x00:
// - Id: 0x00
// - Data: [0x02, 0x03]
// - Checksum: 0x04
match mcp2003a.send_frame