1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//! Physical layer implementations for automotive protocols.
//!
//! This module provides implementations for the physical layer protocols:
//! - Classic CAN (Controller Area Network)
//! - CAN-FD (CAN with Flexible Data-Rate)
//!
//! The physical layer is responsible for the actual transmission and reception
//! of bits on the physical medium. It handles:
//! - Bit timing and synchronization
//! - Signal levels and electrical characteristics
//! - Frame formatting and bit stuffing
//! - Error detection at the physical level
//!
//! # Examples
//!
//! ```rust,no_run
//! use libautomotive::physical::{can, canfd};
//!
//! // Classic CAN example
//! let can_config = can::Config::default();
//! let can_interface = can::Interface::new(can_config);
//!
//! // CAN-FD example
//! let canfd_config = canfd::Config::default();
//! let canfd_interface = canfd::Interface::new(canfd_config);
//! ```
use crate;
use crate;
/// Physical layer trait that must be implemented by hardware interfaces