Files
GemBluetoothEmbeddedDevice/gem-remotes-lib/src/lib.rs

46 lines
686 B
Rust

/// Business logic (independent of hardware) for Gem Remotes ESP32 controller
// Modules in this crate
pub mod commands;
pub mod dispatch;
pub mod motor_controller;
// Re-published items
pub use commands::{
Button,
Commands
};
pub use motor_controller::{
AutoMode,
Controller,
LimitState,
MotorCommands,
MotorRecvQ,
MotorSendQ,
};
pub use dispatch::{
Dispatch,
DispatchSendQ,
DispatchRecvQ,
};
// Test Code for whole module
pub fn add(left: u64, right: u64) -> u64 {
left + right
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}