damiao_codec/lib.rs
1#![no_std]
2#![forbid(unsafe_code)]
3#![warn(missing_docs)]
4//! Damiao motor codec — implements [`motor_codec::MotorCodec`] for the Damiao
5//! CAN protocol.
6//!
7//! All Damiao-specific behavior (motor SKU table, MIT bit-packing, CAN-ID
8//! offsets, the `0x7FF` parameter sub-protocol exposed via [`DamiaoCodecExt`])
9//! is confined to this crate. `can-motor-control` depends on [`motor_codec`] only;
10//! adding a future vendor (Robostride, MyActuator) is an additive crate with
11//! the same shape.
12
13extern crate alloc;
14
15mod bitpack;
16mod codec;
17mod ext;
18mod limits;
19mod types;
20
21pub use codec::DamiaoCodec;
22pub use ext::DamiaoCodecExt;
23pub use types::{parse_motor_type, DamiaoMotorType, DamiaoRid};
24
25/// Vendor short-name `can-motor-control`'s `CodecRegistry` uses to look up Damiao.
26pub const VENDOR_NAME: &str = "damiao";