From a0498330ef7d035890ab1b3632d789ee3c9fccdf Mon Sep 17 00:00:00 2001 From: Nathan Perry Date: Sat, 5 Oct 2024 17:54:31 -0400 Subject: dummy fw bme bringup --- common/src/lib.rs | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 common/src/lib.rs (limited to 'common/src') diff --git a/common/src/lib.rs b/common/src/lib.rs new file mode 100644 index 0000000..5dde0b9 --- /dev/null +++ b/common/src/lib.rs @@ -0,0 +1,32 @@ +#![no_std] + +extern crate alloc; + +use alloc::vec::Vec; + +#[derive(Debug, Clone, PartialEq, PartialOrd, serde::Serialize, serde::Deserialize)] +pub enum Uplink { + Ping, +} + +#[derive(Debug, Clone, PartialEq, PartialOrd, serde::Serialize, serde::Deserialize)] +pub enum Downlink { + Pong, + Sensor(Sensor), +} + +#[derive(Debug, Clone, PartialEq, PartialOrd, serde::Serialize, serde::Deserialize)] +pub enum Sensor { + Gas { + temp_c: f32, + pressure: f32, + }, + Lux { + lux: f32, + }, + IMU { + accel: na::Vector3, + gyro: na::Vector3, + }, + Pdm(Vec), +} -- cgit v1.3.1