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
//! # Distributed Display Protocol (DDP) in Rust
//!
//! This crate allows you to write pixel data to LED strips over the
//! [Distributed Display Protocol (DDP)](http://www.3waylabs.com/ddp/) by 3waylabs.
//!
//! You can use this to stream pixel data to [WLED](https://github.com/Aircoookie/WLED)
//! or any other DDP-capable receiver.
//!
//! ## Quick Start
//!
//! ```no_run
//! use ddp_rs::connection::DDPConnection;
//! use ddp_rs::protocol::{PixelConfig, ID};
//! use std::net::UdpSocket;
//!
//! # fn main() -> Result<(), Box<dyn std::error::Error>> {
//! // Create a connection to your LED controller
//! let mut conn = DDPConnection::try_new(
//! "192.168.1.40:4048", // Device IP and DDP port
//! PixelConfig::default(), // RGB, 8 bits per channel
//! ID::Default, // Default ID
//! UdpSocket::bind("0.0.0.0:6969")? // Local socket
//! )?;
//!
//! // Send RGB pixel data (2 pixels: red and blue)
//! conn.write(&[
//! 255, 0, 0, // First pixel: Red
//! 0, 0, 255, // Second pixel: Blue
//! ])?;
//! # Ok(())
//! # }
//! ```
//!
//!
//! ## Modules
//!
//! - [`connection`] - Main connection type for sending pixel data
//! - [`protocol`] - DDP protocol types and structures
//! - [`packet`] - Packet parsing for receiving data from displays
//! - [`error`] - Error types used throughout the crate
//!
//!