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
//! # Device Layer
//!
//! This module deals with transmitting the raw IR pulses to the hardware.
//! - On Linux with the `cir` feature, `CirPulseTransmitter` uses `/dev/lirc<X>`.
//! - On other platforms (or if `cir` is disabled), it uses `PulseTransmitterEmulator`,
//! which simply prints pulses for testing or development.
//!
//! `DefaultPulseTransmitter` is aliased to whichever implementation is active
//! on your platform/features.
/// On non–Linux platforms, the `send_pulses` functions simply print the encoded pulse sequence, acting as a development/testing emulator.
/// The library abstracts the underlying hardware differences by using the `DefaultPulseTransmitter`:
///
/// • On Linux, this corresponds to the `CirPulseTransmitter`, which uses the `/dev/lirc0` interface.
///
/// • On other platforms, it uses an emulator (`PulseTransmitterEmulator`) that mimics the interface while doing nothing.
///
pub use PulseTransmitter;
pub use CirPulseTransmitter; // See note below.
// Note: PulseTransmitterEmulator is for development/testing on non-Linux platforms only.
pub use PulseTransmitterEmulator;
/// Default PulseTransmitter implementation.
/// On Linux, this is the actual IR transmitter; on other platforms, it is simulated.
pub type DefaultPulseTransmitter = crateCirPulseTransmitter;
pub type DefaultPulseTransmitter = cratePulseTransmitterEmulator;