tsl_umd/lib.rs
1//! This crate contains an implementation of TSL UMD protocols.
2//!
3//! These are a family of commonly-used protocols for controlling tally (on air) lights,
4//! particularly on multiviewers/under monitor displays/broadcast monitors. It was originally
5//! used over serial, but is commonly also sent over IP. v5 explicitly supports this.
6//!
7//! An existing buffer of bytes is interpreted as a TSL UMD packet with the `new_checked` functions:
8//! ```rust
9//! use tsl_umd::v3_1::{TSL31Packet, PACKET_LENGTH_31};
10//! let raw = [0u8; PACKET_LENGTH_31];
11//! let mut p = TSL31Packet::new_unchecked(raw);
12//! p.set_address(13);
13//! p.set_display_data("hello");
14//! p.set_tally([true, false, false, false]);
15//! assert_eq!(p.address(), 13);
16//! assert_eq!(p.display_data(), "hello");
17//! assert!(p.tally()[0]);
18//! ````
19#![no_std]
20pub mod v3_1;
21
22#[cfg(feature = "std")]
23extern crate std;