mks979b 0.1.0

no_std driver for the MKS 979B Atmosphere to Vacuum Transducer. Based on the embedded-hal traits.
Documentation
#![no_std]

pub mod cmd;
pub mod errors;
pub mod fsm;
pub mod scinumber;
use embedded_hal::serial;

/// Maximum lenght of a complete response message from the instrument
pub const MAX_STR_LEN: usize = 32;

/// Maximum lenght of a string response by the driver
pub const MAX_STR_RESPONSE_LEN: usize = 60;

/// Lenght of the Response code (ACK or NAK)
pub const ACKNAK_LEN: usize = 3;

/// Lenght of the address string (such as 253)
pub const ADDR_LEN: usize = 3;

pub trait Serial: serial::Write<u8> + serial::Read<u8> {}
impl<T: serial::Read<u8> + serial::Write<u8>> Serial for T {}
pub type ReadError<S> = <S as serial::Read<u8>>::Error;
pub type WriteError<S> = <S as serial::Write<u8>>::Error;