Expand description
MCP2003A LIN Transceiver Library
This library provides an embedded-hal abstraction for the MCP2003A LIN transceiver using UART
and a GPIO output pin for the break signal.
LIN (Local Interconnect Network) is a serial network protocol used in automotive and industrial applications. Most automobiles on the road today have several LIN bus networks for various systems like climate control, power windows, lighting, and more.
§MCP2003A
The MCP2003A is a LIN transceiver that provides a physical interface between a LIN master and the LIN bus. As such, this code is intended to be used on a LIN master device that communicates with LIN slave devices.
See more:
§Usage
ⓘ
let mut mcp2003a = Mcp2003a::new(uart2_driver, break_pin_driver, delay, lin_bus_config);Then you can use the mcp2003a instance to send and receive LIN frames.
ⓘ
mcp2003a.send_wakeup();
mc2003a.send_frame(0x01, &[0x02, 0x03], 0x05).unwrap();
let mut read_buffer = [0u8; 11];
let len = mcp2003a.read_frame(0xC1, &mut read_buffer).unwrap();Modules§
Structs§
- MCP2003A LIN Transceiver