1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
use liballoc::string::String;
pub mod serial;
pub mod gpio;

pub trait GetByName<T> {
    fn get_by_name(name: &String) -> T;
}

/// Peripheral trait
/// Peripheral may also implement Drop to handle the Deinit but that's not mandatory.
pub trait Peripheral {
    fn init(&self) -> Result<(), String>;
}