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
//! # MPSSE-rs
//! A builder for [FTDI's MPSSE commands](https://www.ftdichip.com/Support/Documents/AppNotes/AN_108_Command_Processor_for_MPSSE_and_MCU_Host_Bus_Emulation_Modes.pdf).
//!
//! ```
//! use mpsse::{Builder, ClockEdge};
//!
//! pub fn main() {
//!     let commands = Builder::new()
//!         .set_frequency(100_000.0)
//!         .then()
//!         .read_data(15)
//!         .with_clock_direction(ClockEdge::Rising)
//!         .build();
//!
//!
//!     assert_eq!(
//!         vec![0x86, 0x3B, 0x00, 0x20, 0x0E, 0x00],
//!         commands
//!     );
//! }
//! ```

pub mod builder;
pub mod command;

pub use command::{
    BitDirection, ClockEdge, PinDirection, PinDirectionArray, PinRange, PinValue,
    PinValueArray,
};

pub use builder::Builder;