#.
## Installation
1. Install prerequisites for building on Bookworm Raspberry Pi
```bash
sudo apt-get update
sudo apt-get install wget gnupg software-properties-common
add-apt-repository "deb http://apt.llvm.org/bookworm/ llvm-toolchain-focal-17 main" && sudo apt-get update
sudo apt-get install llvm-17-dev llvm-17-tools libffi-dev
```
Ensure that `export LLVM_SYS_170_PREFIX="/usr/lib/llvm-17"` is available for cargo commands.
2. Add brickbeam as a cargo dependency
```bash
export LLVM_SYS_170_PREFIX="/usr/lib/llvm-17"
cargo add brickbeam
```
1. If you are building for a native Linux environment
and using the IR transmit device at `/dev/lirc0` for direct,
hardware-accelerated IR signal transmission via the cir library,
then use the default dependency configuration.
This setting ensures that brickbeam uses dedicated IR hardware dependencies.
```ignore
[dependencies]
brickbeam = { version = "0.1.0"}
```
2. For platforms such as macOS – where some of the IR hardware dependencies
(used by the default "cir" feature) may not compile – you can build using only the emulator.
To do so, disable the default features and enable the emulator feature as follows:
```ignore
[dependencies]
brickbeam = { version = "0.1.0", default-features = false}
```
> **NOTE:**
> Use the IR transmission emulator for **development** only (e.g., on macOS).
> Do not use `default-features = false` in production!
> In production, the cir feature must be enabled (this is the default setting).
For more complete examples, see the [examples](https://github.com/azachar/brickbeam/tree/main/examples) directory.
> **Disclaimer:**
> This project is **not** sponsored, authorized, or endorsed by the LEGO Group.
> “LEGO”® is a trademark of the LEGO Group. LEGO® and Power Functions™ are trademarks of the LEGO Group.
>
> The IRP protocols and data structures in this crate are re-expressions
> of publicly available timing information for LEGO® Power Functions signals.
> They are not copied verbatim from any confidential or proprietary document.
>
> **Acknowledgements:**
> Special thanks to my brother for his unwavering support throughout this project.
"#]
#[doc = include_str!("../README.md")]
#[cfg(doctest)]
pub struct ReadmeDoctests;
mod controller;
mod device;
mod errors;
mod protocols;
pub use controller::*;
pub use device::{DefaultPulseTransmitter, PulseTransmitter};
pub use errors::{Error, Result};
pub use protocols::{
Channel, ComboDirectCommand, ComboPwmCommand, DirectState, ExtendedCommand, Output,
SingleOutputCommand, SingleOutputDiscrete,
};