Working struct?
This commit is contained in:
16
src/webee.rs
16
src/webee.rs
@@ -1,21 +1,27 @@
|
||||
use arduino_hal::Usart;
|
||||
use arduino_hal::usart::UsartOps;
|
||||
use arduino_hal::clock::Clock;
|
||||
use arduino_hal::hal::Atmega;
|
||||
// use arduino_hal::port;
|
||||
// use arduino_hal::port::mode::{Input, Output};
|
||||
use arduino_hal::usart::{Usart, UsartOps};
|
||||
use arduino_hal::prelude::*;
|
||||
|
||||
use embedded_hal::serial::{Read};
|
||||
|
||||
mod vector;
|
||||
|
||||
pub use vector::Vector;
|
||||
|
||||
pub struct Webee<USART, RX, TX> where
|
||||
USART: UsartOps<H, RX, TX>
|
||||
pub struct Webee<USART: UsartOps<Atmega, RX, TX>, RX, TX> //where
|
||||
// USART: UsartOps<Atmega, port::Pin<Input, RX>, port::Pin<Output, TX>>
|
||||
{
|
||||
webee: Usart<USART, RX, TX>,
|
||||
}
|
||||
|
||||
enum SEND_CMD {}
|
||||
|
||||
impl<USART, RX, TX> Webee<USART, RX, TX> {
|
||||
impl<USART: UsartOps<Atmega, RX, TX>, RX, TX> Webee<USART, RX, TX> // where
|
||||
// USART: UsartOps<Atmega, port::Pin<Input, RX>, port::Pin<Output, TX>>
|
||||
{
|
||||
const STOP: u8 = 0xFF;
|
||||
|
||||
pub fn new(device: USART, rx: RX, tx: TX) -> Self {
|
||||
|
||||
Reference in New Issue
Block a user