#![no_std]

pub mod receive;
pub mod send;

#[derive(Copy, Clone, PartialEq)]
pub enum Encoding {
    Nrz,
    Nrzi,
    Manchester,
}

pub const LOGIC_ONE_HIGH: bool = true;

pub fn level_for_bit(bit: u8) -> bool {
    (bit != 0) == LOGIC_ONE_HIGH
}

pub fn bit_for_level(level: bool) -> u8 {
    if level == LOGIC_ONE_HIGH { 1 } else { 0 }
}
