-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SNS - High Power Relay #55
base: main
Are you sure you want to change the base?
Conversation
/// Abstraction for a GPIO pin so that sensors can be tested with a mock GPIO pin | ||
pub trait HypedGpioPin { | ||
fn is_high(&mut self) -> bool; | ||
fn switch_on(&mut self) -> bool; | ||
fn switch_off(&mut self) -> bool; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We actually need to separate the input and output GPIO pins, like in PR #40 lib/io/src/gpio.rs.
// need to take in a GPIO pin like Keyence does | ||
// functions: switch_on, switch_off | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
|
||
use hyped_io::gpio::HypedGpioPin; | ||
|
||
pub struct HighPowerRelay<T: HypedGpioPin> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a Rust doc comment here explaining what this does
No description provided.