humpback-dds/src/lib.rs

34 lines
442 B
Rust
Raw Normal View History

2020-08-10 17:04:40 +08:00
#![no_std]
2020-08-11 00:07:07 +08:00
extern crate embedded_hal;
2020-08-10 17:04:40 +08:00
2020-08-10 18:06:15 +08:00
use core::cell;
use cortex_m;
use cortex_m_semihosting::hprintln;
2020-08-13 16:51:08 +08:00
#[macro_use]
pub mod bitmask_macro;
2020-08-10 18:06:15 +08:00
pub mod spi_slave;
2020-08-11 00:07:07 +08:00
use crate::spi_slave::Parts;
2020-08-31 09:31:56 +08:00
pub mod cpld;
2020-08-11 16:51:17 +08:00
pub mod config_register;
2020-08-11 00:07:07 +08:00
pub mod attenuator;
2020-08-17 12:15:11 +08:00
pub mod dds;
pub mod scpi;
2020-08-13 16:51:08 +08:00
2020-08-10 18:06:15 +08:00
/*
* Enum for structuring error
*/
#[derive(Debug)]
pub enum Error<E> {
SPI(E),
CSError,
GetRefMutDataError,
2020-08-11 11:29:47 +08:00
AttenuatorError,
2020-08-24 17:03:44 +08:00
IOUpdateError,
2020-08-26 13:18:50 +08:00
DDSError,
2020-08-10 18:06:15 +08:00
}